mirror of https://github.com/djcb/mu.git
* add mug_query_bar_grab_focus, grab focus in querybar upon startup
This commit is contained in:
parent
6bfa535e6a
commit
55ac54124e
47
mug/TODO
47
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:
|
||||
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
12
mug/mug.cc
12
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;
|
||||
|
|
Loading…
Reference in New Issue