diff --git a/mug/TODO b/mug/TODO index 4aa814b8..c9721dfc 100644 --- a/mug/TODO +++ b/mug/TODO @@ -1,27 +1,26 @@ * todo for mug -** TODO column sizing -** DONE query in status bar - CLOSED: [2010-11-02 Tue 22:18] -** TODO tool bar working -** TODO pretty-print addresses -** TODO pretty-print dates -** DONE up/down arrows => need msg-list-view support - CLOSED: [2010-11-02 Tue 21:56] -** TODO unread mails => bold, important mails => red -** TODO detail info about current msg -** DONE guess maildir - CLOSED: [2010-11-02 Tue 21:57] -** TODO properties dialog -** TODO bookmarks -** TODO icon / .desktop file -** DONE clear msg when starting new query - CLOSED: [2010-11-02 Tue 22:18] + - [ ] column sizing + - [X] query in status bar + - [ ] tool bar working + - [ ] pretty-print addresses + - [ ] pretty-print dates + - [X] up/down arrows => need msg-list-view support + - [ ] unread mails => bold, important mails => red + - [ ] detail info about current msg + - [X] guess maildir + - [ ] properties dialog + - [ ] bookmarks + - [ ] icon / .desktop file + - [X] clear msg when starting new query + - [X] focus search bar at startup + - [X] focus first msg after query + - [ ] sorting for columns + - [ ] add about menu + - [ ] make scrollbars automatic - - - -** TODO focus search bar at startup -** DONE focus first msg after query - CLOSED: [2010-11-02 Tue 22:44] -** TODO sorting for columns +# Local Variables: +# mode: org; org-startup-folded: t +# End: + + diff --git a/mug/mug-query-bar.c b/mug/mug-query-bar.c index 0516fe62..698010b0 100644 --- a/mug/mug-query-bar.c +++ b/mug/mug-query-bar.c @@ -115,6 +115,14 @@ mug_query_bar_new (void) return GTK_WIDGET(g_object_new(MUG_TYPE_QUERY_BAR, NULL)); } -/* following: other function implementations */ -/* such as mug_query_bar_do_something, or mug_query_bar_has_foo */ + + +void +mug_query_bar_grab_focus (MugQueryBar *self) +{ + g_return_if_fail (MUG_IS_QUERY_BAR(self)); + + gtk_widget_grab_focus + (GTK_WIDGET(MUG_QUERY_BAR_GET_PRIVATE(self)->_entry)); +} diff --git a/mug/mug-query-bar.h b/mug/mug-query-bar.h index c04a5097..7181a6aa 100644 --- a/mug/mug-query-bar.h +++ b/mug/mug-query-bar.h @@ -38,6 +38,7 @@ GType mug_query_bar_get_type (void) G_GNUC_CONST; /* if this is a kind of GtkWidget, it should probably return at GtkWidget* */ GtkWidget* mug_query_bar_new (void); +void mug_query_bar_grab_focus (MugQueryBar *self); G_END_DECLS diff --git a/mug/mug.cc b/mug/mug.cc index 67387127..8acca946 100644 --- a/mug/mug.cc +++ b/mug/mug.cc @@ -56,6 +56,7 @@ enum _ToolAction { ACTION_NEXT_MSG, ACTION_SHOW_PREFS, ACTION_DO_QUIT, + ACTION_ABOUT, ACTION_SEPARATOR /* pseudo action */ }; typedef enum _ToolAction ToolAction; @@ -76,7 +77,10 @@ on_tool_button_clicked (GtkToolButton *btn, MugData *mugdata) break; case ACTION_PREV_MSG: mug_msg_list_view_move_prev (MUG_MSG_LIST_VIEW(mugdata->mlist)); - break; + break; + case ACTION_ABOUT: + g_print ("About Mug\n"); + break; default: g_print ("%u\n", action); } @@ -95,8 +99,9 @@ mug_toolbar (MugData *mugdata) {GTK_STOCK_GO_DOWN, ACTION_NEXT_MSG}, {NULL, ACTION_SEPARATOR}, {GTK_STOCK_PREFERENCES, ACTION_SHOW_PREFS}, + {GTK_STOCK_ABOUT, ACTION_ABOUT}, {NULL, ACTION_SEPARATOR}, - {GTK_STOCK_QUIT, ACTION_DO_QUIT} + {GTK_STOCK_QUIT, ACTION_DO_QUIT}, }; for (toolbar = gtk_toolbar_new(), i = 0; i != G_N_ELEMENTS(tools); ++i) { @@ -295,7 +300,8 @@ main (int argc, char *argv[]) G_CALLBACK(gtk_main_quit), NULL); gtk_widget_show (mugshell); - + mug_query_bar_grab_focus (MUG_QUERY_BAR(mugdata.querybar)); + gtk_main (); return 0;