diff options
author | Dan Winship <danw@src.gnome.org> | 2000-04-08 04:07:32 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-04-08 04:07:32 +0800 |
commit | 2b55a1e90c9554540413d2e74716e9c60b3710ce (patch) | |
tree | 13913ecb8d692d44fa8aa2b5922b39108e76bc23 /mail/folder-browser-factory.c | |
parent | 5f93b830400c342ce0a20362df8d744120541478 (diff) | |
download | gsoc2013-evolution-2b55a1e90c9554540413d2e74716e9c60b3710ce.tar.gz gsoc2013-evolution-2b55a1e90c9554540413d2e74716e9c60b3710ce.tar.zst gsoc2013-evolution-2b55a1e90c9554540413d2e74716e9c60b3710ce.zip |
new file, for toolbar/menu callbacks (fetch_mail): fetch mail. Doesn't do
* mail-ops.c: new file, for toolbar/menu callbacks
(fetch_mail): fetch mail. Doesn't do mbox locking. Many kludges.
* folder-browser-factory.c (control_activate): use new fetch_mail
function as the callback for the "New mail" icon. Rename check_cb
to random_cb.
* Makefile.am: don't build test-sources since the version in
CVS doesn't do much and once I've fixed it it won't be a separate
program. Add mail-ops.[ch].
svn path=/trunk/; revision=2330
Diffstat (limited to 'mail/folder-browser-factory.c')
-rw-r--r-- | mail/folder-browser-factory.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c index 787e504693..8e2b7ec8f7 100644 --- a/mail/folder-browser-factory.c +++ b/mail/folder-browser-factory.c @@ -21,6 +21,7 @@ #include "shell/evolution-service-repository.h" #include "composer/e-msg-composer.h" #include <camel/camel-stream-fs.h> +#include "mail-ops.h" static void @@ -133,7 +134,7 @@ msg_composer_cb (BonoboUIHandler *uih, void *user_data, const char *path) } static void -check_cb (BonoboUIHandler *uih, void *user_data, const char *path) +random_cb (GtkWidget *button, gpointer user_data) { printf ("Yow! I am called back!\n"); } @@ -143,7 +144,7 @@ static void control_activate (BonoboControl *control, BonoboUIHandler *uih) { Bonobo_UIHandler remote_uih; - GtkWidget *toolbar; + GtkWidget *toolbar, *folder_browser; remote_uih = bonobo_control_get_remote_ui_handler (control); bonobo_ui_handler_set_container (uih, remote_uih); @@ -155,45 +156,46 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih) toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH); + folder_browser = bonobo_control_get_widget (control); gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "New mail", "Check for new mail", NULL, gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_MAIL_RCV), - check_cb, NULL); + fetch_mail, folder_browser); gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "Send", "Send a new message", NULL, gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_MAIL_SND), - check_cb, NULL); + random_cb, folder_browser); gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "Find", "Find messages", NULL, gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_SEARCH), - check_cb, NULL); + random_cb, folder_browser); gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "Reply", "Reply to the sender of this message", NULL, gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_MAIL_RPL), - check_cb, NULL); + random_cb, folder_browser); gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "Reply to All", "Reply to all recipients of this message", NULL, gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_MAIL_RPL), - check_cb, NULL); + random_cb, folder_browser); gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "Forward", "Forward this message", NULL, gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_MAIL_FWD), - check_cb, NULL); + random_cb, folder_browser); gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "Print", "Print the selected message", NULL, gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_PRINT), - check_cb, NULL); + random_cb, folder_browser); gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "Delete", "Delete this message", NULL, gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_TRASH), - check_cb, NULL); + random_cb, folder_browser); gtk_widget_show_all (toolbar); bonobo_ui_handler_dock_add (uih, "/Toolbar", - bonobo_object_corba_objref (bonobo_control_new (toolbar)), + bonobo_object_corba_objref (BONOBO_OBJECT (bonobo_control_new (toolbar))), GNOME_DOCK_ITEM_BEH_LOCKED | GNOME_DOCK_ITEM_BEH_EXCLUSIVE, GNOME_DOCK_TOP, |