* add mug_query_bar_grab_focus, grab focus in querybar upon startup
This commit is contained in:
47
mug/TODO
47
mug/TODO
@ -1,27 +1,26 @@
|
|||||||
* todo for mug
|
* todo for mug
|
||||||
|
|
||||||
** TODO column sizing
|
- [ ] column sizing
|
||||||
** DONE query in status bar
|
- [X] query in status bar
|
||||||
CLOSED: [2010-11-02 Tue 22:18]
|
- [ ] tool bar working
|
||||||
** TODO tool bar working
|
- [ ] pretty-print addresses
|
||||||
** TODO pretty-print addresses
|
- [ ] pretty-print dates
|
||||||
** TODO pretty-print dates
|
- [X] up/down arrows => need msg-list-view support
|
||||||
** DONE up/down arrows => need msg-list-view support
|
- [ ] unread mails => bold, important mails => red
|
||||||
CLOSED: [2010-11-02 Tue 21:56]
|
- [ ] detail info about current msg
|
||||||
** TODO unread mails => bold, important mails => red
|
- [X] guess maildir
|
||||||
** TODO detail info about current msg
|
- [ ] properties dialog
|
||||||
** DONE guess maildir
|
- [ ] bookmarks
|
||||||
CLOSED: [2010-11-02 Tue 21:57]
|
- [ ] icon / .desktop file
|
||||||
** TODO properties dialog
|
- [X] clear msg when starting new query
|
||||||
** TODO bookmarks
|
- [X] focus search bar at startup
|
||||||
** TODO icon / .desktop file
|
- [X] focus first msg after query
|
||||||
** DONE clear msg when starting new query
|
- [ ] sorting for columns
|
||||||
CLOSED: [2010-11-02 Tue 22:18]
|
- [ ] add about menu
|
||||||
|
- [ ] make scrollbars automatic
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: org; org-startup-folded: t
|
||||||
|
# End:
|
||||||
** TODO focus search bar at startup
|
|
||||||
** DONE focus first msg after query
|
|
||||||
CLOSED: [2010-11-02 Tue 22:44]
|
|
||||||
** TODO sorting for columns
|
|
||||||
|
|||||||
@ -115,6 +115,14 @@ mug_query_bar_new (void)
|
|||||||
return GTK_WIDGET(g_object_new(MUG_TYPE_QUERY_BAR, NULL));
|
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* */
|
/* if this is a kind of GtkWidget, it should probably return at GtkWidget* */
|
||||||
GtkWidget* mug_query_bar_new (void);
|
GtkWidget* mug_query_bar_new (void);
|
||||||
|
|
||||||
|
void mug_query_bar_grab_focus (MugQueryBar *self);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|||||||
12
mug/mug.cc
12
mug/mug.cc
@ -56,6 +56,7 @@ enum _ToolAction {
|
|||||||
ACTION_NEXT_MSG,
|
ACTION_NEXT_MSG,
|
||||||
ACTION_SHOW_PREFS,
|
ACTION_SHOW_PREFS,
|
||||||
ACTION_DO_QUIT,
|
ACTION_DO_QUIT,
|
||||||
|
ACTION_ABOUT,
|
||||||
ACTION_SEPARATOR /* pseudo action */
|
ACTION_SEPARATOR /* pseudo action */
|
||||||
};
|
};
|
||||||
typedef enum _ToolAction ToolAction;
|
typedef enum _ToolAction ToolAction;
|
||||||
@ -76,7 +77,10 @@ on_tool_button_clicked (GtkToolButton *btn, MugData *mugdata)
|
|||||||
break;
|
break;
|
||||||
case ACTION_PREV_MSG:
|
case ACTION_PREV_MSG:
|
||||||
mug_msg_list_view_move_prev (MUG_MSG_LIST_VIEW(mugdata->mlist));
|
mug_msg_list_view_move_prev (MUG_MSG_LIST_VIEW(mugdata->mlist));
|
||||||
break;
|
break;
|
||||||
|
case ACTION_ABOUT:
|
||||||
|
g_print ("About Mug\n");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
g_print ("%u\n", action);
|
g_print ("%u\n", action);
|
||||||
}
|
}
|
||||||
@ -95,8 +99,9 @@ mug_toolbar (MugData *mugdata)
|
|||||||
{GTK_STOCK_GO_DOWN, ACTION_NEXT_MSG},
|
{GTK_STOCK_GO_DOWN, ACTION_NEXT_MSG},
|
||||||
{NULL, ACTION_SEPARATOR},
|
{NULL, ACTION_SEPARATOR},
|
||||||
{GTK_STOCK_PREFERENCES, ACTION_SHOW_PREFS},
|
{GTK_STOCK_PREFERENCES, ACTION_SHOW_PREFS},
|
||||||
|
{GTK_STOCK_ABOUT, ACTION_ABOUT},
|
||||||
{NULL, ACTION_SEPARATOR},
|
{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) {
|
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);
|
G_CALLBACK(gtk_main_quit), NULL);
|
||||||
|
|
||||||
gtk_widget_show (mugshell);
|
gtk_widget_show (mugshell);
|
||||||
|
mug_query_bar_grab_focus (MUG_QUERY_BAR(mugdata.querybar));
|
||||||
|
|
||||||
gtk_main ();
|
gtk_main ();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user