From 6bddc9bd17ae7dc82a379967efb2eb28814a10e8 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 2 Mar 2000 06:32:45 +0000 Subject: Don't use libglade for menus and toolbars in the message composer anymore. This is the first step; next step is to use BonoboUIHandler. svn path=/trunk/; revision=2010 --- composer/ChangeLog | 14 + composer/Makefile.am | 3 +- composer/e-msg-composer.c | 88 +------ composer/e-msg-composer.glade | 587 ------------------------------------------ composer/e-msg-composer.h | 4 - 5 files changed, 17 insertions(+), 679 deletions(-) delete mode 100644 composer/e-msg-composer.glade diff --git a/composer/ChangeLog b/composer/ChangeLog index 028b4060f3..19fefb02fa 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,17 @@ +2000-03-02 Ettore Perazzoli + + * e-msg-composer.c (glade_connect): Removed. + (setup_signals): Removed. + (e_msg_composer_construct): Do not use libglade to set the toolbar + and menubar up. + (destroy): Removed libglade stuff. + (init): Likewise. + + * e-msg-composer.h: Removed `menubar_gui', `toolbar_gui', + `appbar_gui'. + + * e-msg-composer.glade: Removed. + 2000-01-12 bertrand * Makefile.am (evolution_msg_composer_LDADD): diff --git a/composer/Makefile.am b/composer/Makefile.am index fa81843aa8..052c530789 100644 --- a/composer/Makefile.am +++ b/composer/Makefile.am @@ -2,8 +2,7 @@ gladedir = $(datadir)/evolution/glade glade_DATA = \ e-msg-composer-address-dialog.glade \ - e-msg-composer-attachment.glade \ - e-msg-composer.glade + e-msg-composer-attachment.glade INCLUDES = \ -I$(top_srcdir) \ diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index f4271ea7e6..f9a6471686 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -125,11 +125,13 @@ show_attachments (EMsgComposer *composer, /* Update the GUI. */ +#if 0 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (glade_xml_get_widget (composer->menubar_gui, "menu_view_attachments")), show); +#endif /* XXX we should update the toggle toolbar item as well. At this point, it is not a toggle because Glade is broken. */ @@ -257,23 +259,6 @@ address_dialog_cb (GtkWidget *widget, gdk_window_show (composer->address_dialog->window); } -static void -glade_connect (GladeXML *gui, - const gchar *widget_name, - const gchar *signal_name, - GtkSignalFunc callback, - gpointer callback_data) -{ - GtkWidget *widget; - - widget = glade_xml_get_widget (gui, widget_name); - if (widget == NULL) - g_warning ("Widget `%s' was not found.", widget_name); - else - gtk_signal_connect (GTK_OBJECT (widget), signal_name, - GTK_SIGNAL_FUNC (callback), callback_data); -} - static void attachment_bar_changed (EMsgComposerAttachmentBar *bar, gpointer data) @@ -288,47 +273,6 @@ attachment_bar_changed (EMsgComposerAttachmentBar *bar, e_msg_composer_show_attachments (composer, FALSE); } -static void -setup_signals (EMsgComposer *composer) -{ - glade_connect (composer->menubar_gui, "menu_send", - "activate", GTK_SIGNAL_FUNC (send_cb), composer); - glade_connect (composer->toolbar_gui, "toolbar_send", - "clicked", GTK_SIGNAL_FUNC (send_cb), composer); - - glade_connect (composer->menubar_gui, "menu_view_attachments", - "activate", - GTK_SIGNAL_FUNC (menu_view_attachments_activate_cb), - composer); - glade_connect (composer->toolbar_gui, "toolbar_view_attachments", - "clicked", - GTK_SIGNAL_FUNC (toolbar_view_attachments_clicked_cb), - composer); - - glade_connect (composer->menubar_gui, "menu_add_attachment", - "activate", - GTK_SIGNAL_FUNC (add_attachment_cb), composer); - glade_connect (composer->toolbar_gui, "toolbar_add_attachment", - "clicked", - GTK_SIGNAL_FUNC (add_attachment_cb), composer); - - glade_connect (composer->menubar_gui, "menubar_address_dialog", - "activate", - GTK_SIGNAL_FUNC (address_dialog_cb), composer); - glade_connect (composer->toolbar_gui, "toolbar_address_dialog", - "clicked", - GTK_SIGNAL_FUNC (address_dialog_cb), composer); - - gtk_signal_connect (GTK_OBJECT (composer->attachment_bar), - "changed", - GTK_SIGNAL_FUNC (attachment_bar_changed), - composer); - - gtk_signal_connect (GTK_OBJECT (composer->hdrs), "show_address_dialog", - GTK_SIGNAL_FUNC (address_dialog_cb), - composer); -} - /* GtkObject methods. */ @@ -339,10 +283,6 @@ destroy (GtkObject *object) composer = E_MSG_COMPOSER (object); - gtk_object_unref (GTK_OBJECT (composer->menubar_gui)); - gtk_object_unref (GTK_OBJECT (composer->toolbar_gui)); - gtk_object_unref (GTK_OBJECT (composer->appbar_gui)); - if (composer->address_dialog != NULL) gtk_widget_destroy (composer->address_dialog); @@ -384,10 +324,6 @@ class_init (EMsgComposerClass *klass) static void init (EMsgComposer *composer) { - composer->menubar_gui = NULL; - composer->toolbar_gui = NULL; - composer->appbar_gui = NULL; - composer->hdrs = NULL; composer->text = NULL; @@ -441,24 +377,6 @@ e_msg_composer_construct (EMsgComposer *composer) gnome_app_construct (GNOME_APP (composer), "e-msg-composer", "Compose a message"); - composer->menubar_gui = glade_xml_new (E_GLADEDIR "/e-msg-composer.glade", - "menubar"); - gnome_app_set_menus (GNOME_APP (composer), - GTK_MENU_BAR (glade_xml_get_widget (composer->menubar_gui, - "menubar"))); - - composer->toolbar_gui = glade_xml_new (E_GLADEDIR "/e-msg-composer.glade", - "toolbar"); - gnome_app_set_toolbar (GNOME_APP (composer), - GTK_TOOLBAR (glade_xml_get_widget (composer->toolbar_gui, - "toolbar"))); - - composer->appbar_gui = glade_xml_new (E_GLADEDIR "/e-msg-composer.glade", - "appbar"); - gnome_app_set_statusbar (GNOME_APP (composer), - glade_xml_get_widget (composer->appbar_gui, - "appbar")); - vbox = gtk_vbox_new (FALSE, 0); composer->hdrs = e_msg_composer_hdrs_new (); @@ -502,8 +420,6 @@ e_msg_composer_construct (EMsgComposer *composer) gtk_widget_show (vbox); e_msg_composer_show_attachments (composer, FALSE); - - setup_signals (composer); } /** diff --git a/composer/e-msg-composer.glade b/composer/e-msg-composer.glade deleted file mode 100644 index b747c6f979..0000000000 --- a/composer/e-msg-composer.glade +++ /dev/null @@ -1,587 +0,0 @@ - - - - - Message Composer - e-msg-composer - - src - pixmaps - C - True - True - False - True - True - True - True - interface.c - interface.h - callbacks.c - callbacks.h - support.c - support.h - - - - - GnomeApp - app1 - Message Composer - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - True - False - True - - - GnomeDock - GnomeApp:dock - dock1 - True - - 0 - True - True - - - - GnomeDockItem - dockitem1 - 2 - GNOME_DOCK_TOP - 0 - 0 - 0 - False - True - False - True - False - GTK_SHADOW_OUT - - - GtkMenuBar - menubar - GTK_SHADOW_NONE - - - GtkMenuItem - file - GNOMEUIINFO_MENU_FILE_TREE - - - GtkMenu - file_menu - - - GtkPixmapMenuItem - open - - activate - on_open_activate - Wed, 27 Oct 1999 22:25:08 GMT - - GNOMEUIINFO_MENU_OPEN_ITEM - - - - GtkPixmapMenuItem - save - - activate - on_save_activate - Wed, 27 Oct 1999 22:25:13 GMT - - GNOMEUIINFO_MENU_SAVE_ITEM - - - - GtkPixmapMenuItem - save_as - - activate - on_save_as_activate - Wed, 27 Oct 1999 22:25:16 GMT - - GNOMEUIINFO_MENU_SAVE_AS_ITEM - - - - GtkPixmapMenuItem - save_in_folder - - activate - on_save_in_folder_activate - Wed, 27 Oct 1999 22:25:20 GMT - - - False - GNOME_STOCK_MENU_SAVE_AS - - - - GtkMenuItem - separator8 - False - - - - GtkPixmapMenuItem - menu_send - - activate - on_send_activate - Wed, 27 Oct 1999 22:25:29 GMT - - - False - GNOME_STOCK_MENU_MAIL_SND - - - - GtkMenuItem - postpone - - activate - on_postpone_activate - Wed, 27 Oct 1999 22:25:37 GMT - - - False - - - - GtkMenuItem - separator1 - False - - - - GtkPixmapMenuItem - exit - - activate - on_exit_activate - Wed, 27 Oct 1999 22:25:59 GMT - - GNOMEUIINFO_MENU_EXIT_ITEM - - - - - - GtkMenuItem - edit - GNOMEUIINFO_MENU_EDIT_TREE - - - GtkMenu - edit_menu - - - GtkPixmapMenuItem - undo - - activate - on_undo_activate - Wed, 27 Oct 1999 22:26:10 GMT - - GNOMEUIINFO_MENU_UNDO_ITEM - - - - GtkPixmapMenuItem - redo - - activate - on_redo_activate - Wed, 27 Oct 1999 22:26:15 GMT - - GNOMEUIINFO_MENU_REDO_ITEM - - - - GtkMenuItem - separator3 - False - - - - GtkPixmapMenuItem - cut - - activate - on_cut_activate - Wed, 27 Oct 1999 22:26:21 GMT - - GNOMEUIINFO_MENU_CUT_ITEM - - - - GtkPixmapMenuItem - copy - - activate - on_copy_activate - Wed, 27 Oct 1999 22:26:26 GMT - - GNOMEUIINFO_MENU_COPY_ITEM - - - - GtkPixmapMenuItem - paste - - activate - on_paste_activate - Wed, 27 Oct 1999 22:26:31 GMT - - GNOMEUIINFO_MENU_PASTE_ITEM - - - - GtkMenuItem - separator2 - False - - - - GtkPixmapMenuItem - select_all - - activate - on_select_all_activate - Wed, 27 Oct 1999 22:26:37 GMT - - GNOMEUIINFO_MENU_SELECT_ALL_ITEM - - - - GtkMenuItem - separator5 - False - - - - GtkPixmapMenuItem - find - - activate - on_find_activate - Wed, 27 Oct 1999 22:26:42 GMT - - GNOMEUIINFO_MENU_FIND_ITEM - - - - GtkPixmapMenuItem - find_again - - activate - on_find_again_activate - Wed, 27 Oct 1999 22:26:47 GMT - - GNOMEUIINFO_MENU_FIND_AGAIN_ITEM - - - - GtkPixmapMenuItem - replace - - activate - on_replace_activate - Wed, 27 Oct 1999 22:26:53 GMT - - GNOMEUIINFO_MENU_REPLACE_ITEM - - - - GtkMenuItem - separator6 - False - - - - GtkPixmapMenuItem - properties - - activate - on_properties_activate - Wed, 27 Oct 1999 22:26:58 GMT - - GNOMEUIINFO_MENU_PROPERTIES_ITEM - - - - - - GtkMenuItem - view1 - GNOMEUIINFO_MENU_VIEW_TREE - - - GtkMenu - view1_menu - - - GtkCheckMenuItem - menu_view_attachments - - activate - on_view_attachments_activate - Fri, 05 Nov 1999 18:31:16 GMT - - - False - False - - - - - - GtkMenuItem - insert - - False - - - GtkMenu - insert_menu - - - GtkMenuItem - menu_add_attachment - - activate - on_attachment_activate - Wed, 27 Oct 1999 22:27:05 GMT - - - False - - - - GtkMenuItem - text_from_file - - activate - on_text_from_file_activate - Wed, 27 Oct 1999 22:27:16 GMT - - - False - - - - GtkMenuItem - separator6 - False - - - - GtkMenuItem - hypertext_link - - activate - on_hypertext_link_activate - Wed, 27 Oct 1999 22:27:21 GMT - - - False - - - - - - GtkMenuItem - settings - GNOMEUIINFO_MENU_SETTINGS_TREE - - - GtkMenu - settings_menu - - - GtkPixmapMenuItem - preferences - - activate - on_preferences_activate - Wed, 27 Oct 1999 22:27:37 GMT - - GNOMEUIINFO_MENU_PREFERENCES_ITEM - - - - - - GtkMenuItem - tools - - False - - - GtkMenu - tools_menu - - - GtkPixmapMenuItem - spell_check1 - - activate - on_spell_check_activate - Wed, 27 Oct 1999 22:27:44 GMT - - - False - GNOME_STOCK_MENU_SPELLCHECK - - - - GtkMenuItem - separator7 - False - - - - GtkMenuItem - check_names - - activate - on_check_names_activate - Wed, 27 Oct 1999 22:27:49 GMT - - - False - - - - GtkPixmapMenuItem - menubar_address_dialog - - activate - on_address_book_activate - Wed, 27 Oct 1999 22:27:53 GMT - - - False - GNOME_STOCK_MENU_BOOK_RED - - - - - - GtkMenuItem - help - GNOMEUIINFO_MENU_HELP_TREE - - - GtkMenu - help_menu - - - GtkPixmapMenuItem - about - - activate - on_about_activate - Wed, 27 Oct 1999 22:28:01 GMT - - GNOMEUIINFO_MENU_ABOUT_ITEM - - - - - - - - GnomeDockItem - dockitem2 - 1 - GNOME_DOCK_TOP - 1 - 0 - 0 - False - True - False - False - False - GTK_SHADOW_OUT - - - GtkToolbar - toolbar - 1 - GTK_ORIENTATION_HORIZONTAL - GTK_TOOLBAR_BOTH - 16 - GTK_TOOLBAR_SPACE_LINE - GTK_RELIEF_NONE - True - - - GtkButton - Toolbar:button - toolbar_send - Send this message - - GNOME_STOCK_PIXMAP_MAIL_SND - - - - GtkToggleButton - Toolbar:button - toolbar_view_attachments - Show attachments for this message - - False - - - - GtkButton - Toolbar:button - toolbar_add_attachment - Attach a file - - - - - GtkButton - Toolbar:button - toolbar_address_dialog - Go to addressbook - - GNOME_STOCK_PIXMAP_BOOK_RED - - - - - - Placeholder - GnomeDock:contents - - - - - GnomeAppBar - GnomeApp:appbar - appbar - True - True - - 0 - True - True - - - - - diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h index 3028dedca3..14b820d079 100644 --- a/composer/e-msg-composer.h +++ b/composer/e-msg-composer.h @@ -49,10 +49,6 @@ typedef struct _EMsgComposerClass EMsgComposerClass; struct _EMsgComposer { GnomeApp parent; - GladeXML *menubar_gui; - GladeXML *toolbar_gui; - GladeXML *appbar_gui; - GtkWidget *hdrs; GtkWidget *text; -- cgit v1.2.3