From 054c0881696a85f537e93b4950a28f505a3dc0f7 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 24 Sep 2009 18:04:36 -0400 Subject: =?UTF-8?q?Bug=C2=A0589153=20-=20Use=20GtkBuilder=20instead=20of?= =?UTF-8?q?=20libglade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/imap-features/Makefile.am | 7 +- plugins/imap-features/imap-headers.c | 33 ++- plugins/imap-features/imap-headers.glade | 377 ------------------------------- plugins/imap-features/imap-headers.ui | 328 +++++++++++++++++++++++++++ 4 files changed, 347 insertions(+), 398 deletions(-) delete mode 100644 plugins/imap-features/imap-headers.glade create mode 100644 plugins/imap-features/imap-headers.ui (limited to 'plugins/imap-features') diff --git a/plugins/imap-features/Makefile.am b/plugins/imap-features/Makefile.am index 09edf33303..f79fef3474 100644 --- a/plugins/imap-features/Makefile.am +++ b/plugins/imap-features/Makefile.am @@ -14,7 +14,7 @@ liborg_gnome_imap_features_la_CPPFLAGS = \ -I$(top_srcdir)/mail \ $(EVOLUTION_MAIL_CFLAGS) \ $(CAMEL_IMAP_CFLAGS) \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ + -DEVOLUTION_UIDIR=\""$(uidir)"\" \ -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" liborg_gnome_imap_features_la_SOURCES = imap-headers.c @@ -26,14 +26,15 @@ liborg_gnome_imap_features_la_LIBADD= \ liborg_gnome_imap_features_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED) -glade_DATA = imap-headers.glade +ui_DATA = \ + imap-headers.ui errordir = $(privdatadir)/errors BUILT_SOURCES = org-gnome-imap-features.eplug $(error_i18n) EXTRA_DIST = \ - $(glade_DATA) \ + $(ui_DATA) \ org-gnome-imap-features.eplug.xml CLEANFILES = $(BUILT_SOURCES) diff --git a/plugins/imap-features/imap-headers.c b/plugins/imap-features/imap-headers.c index baa6ee43dc..df567aa020 100644 --- a/plugins/imap-features/imap-headers.c +++ b/plugins/imap-features/imap-headers.c @@ -31,13 +31,12 @@ #include -#include "e-util/e-account-utils.h" +#include +#include #include #include -#include - #include typedef struct _epif_data EPImapFeaturesData; @@ -259,8 +258,7 @@ org_gnome_imap_headers (EPlugin *epl, EConfigHookItemFactoryData *data) GtkWidget *vbox; CamelURL *url = NULL; CamelException ex; - gchar *gladefile; - GladeXML *gladexml; + GtkBuilder *builder; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeIter iter; @@ -275,19 +273,18 @@ org_gnome_imap_headers (EPlugin *epl, EConfigHookItemFactoryData *data) if (!g_str_has_prefix (account->source->url, "imap://") && !(use_imap && g_str_has_prefix (account->source->url, "groupwise://"))) return NULL; - gladefile = g_build_filename (EVOLUTION_GLADEDIR, "imap-headers.glade", NULL); - gladexml = glade_xml_new (gladefile, "vbox2", NULL); - g_free (gladefile); - - vbox = glade_xml_get_widget (gladexml, "vbox2"); - ui->all_headers = glade_xml_get_widget (gladexml, "allHeaders"); - ui->basic_headers = glade_xml_get_widget (gladexml, "basicHeaders"); - ui->mailing_list_headers = glade_xml_get_widget (gladexml, "mailingListHeaders"); - ui->custom_headers_box = glade_xml_get_widget (gladexml, "custHeaderHbox"); - ui->custom_headers_tree = GTK_TREE_VIEW(glade_xml_get_widget (gladexml, "custHeaderTree")); - ui->add_header = GTK_BUTTON(glade_xml_get_widget (gladexml, "addHeader")); - ui->remove_header = GTK_BUTTON(glade_xml_get_widget (gladexml, "removeHeader")); - ui->entry_header = GTK_ENTRY (glade_xml_get_widget (gladexml, "customHeaderEntry")); + builder = gtk_builder_new (); + e_load_ui_builder_definition (builder, "imap-headers.ui"); + + vbox = e_builder_get_widget (builder, "vbox2"); + ui->all_headers = e_builder_get_widget (builder, "allHeaders"); + ui->basic_headers = e_builder_get_widget (builder, "basicHeaders"); + ui->mailing_list_headers = e_builder_get_widget (builder, "mailingListHeaders"); + ui->custom_headers_box = e_builder_get_widget (builder, "custHeaderHbox"); + ui->custom_headers_tree = GTK_TREE_VIEW(e_builder_get_widget (builder, "custHeaderTree")); + ui->add_header = GTK_BUTTON(e_builder_get_widget (builder, "addHeader")); + ui->remove_header = GTK_BUTTON(e_builder_get_widget (builder, "removeHeader")); + ui->entry_header = GTK_ENTRY (e_builder_get_widget (builder, "customHeaderEntry")); url = camel_url_new (e_account_get_string(account, E_ACCOUNT_SOURCE_URL), &ex); diff --git a/plugins/imap-features/imap-headers.glade b/plugins/imap-features/imap-headers.glade deleted file mode 100644 index 85ca962a9c..0000000000 --- a/plugins/imap-features/imap-headers.glade +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - True - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 6 - True - False - 6 - - - - 6 - True - 0 - 0 - GTK_SHADOW_NONE - - - - 6 - True - 0 - 0 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 6 - - - - True - Select your IMAP Header Preferences. -The more headers you have the more time it will take to download. - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - _Fetch All Headers - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - _Basic Headers - (Fastest) -Use this if you do not have filters based on mailing lists - True - GTK_RELIEF_NORMAL - True - False - False - True - allHeaders - - - 0 - False - False - - - - - - True - True - Basic and _Mailing List Headers (Default) - True - GTK_RELIEF_NORMAL - True - False - False - True - allHeaders - - - 0 - False - False - - - - - - - - - - True - <b>IMAP Headers</b> - False - True - GTK_JUSTIFY_LEFT - False - True - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - - 6 - True - 0 - 0 - GTK_SHADOW_NONE - - - - 6 - True - 0 - 0 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 6 - - - - True - True - Give the extra headers that you need to fetch in addition to the above standard headers. -You can ignore this if you choose "All Headers". - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - 1 - False - 0 - - - 0 - False - True - - - - - - True - False - 5 - - - - True - False - 6 - - - - True - True - True - True - 0 - - True - * - False - - - 0 - False - True - - - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - False - True - False - False - False - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_START - 6 - - - - True - True - gtk-add - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - True - - - - - 4 - False - False - - - - - 0 - True - True - - - - - - - - - - True - <b>Custom Headers</b> - False - True - GTK_JUSTIFY_LEFT - False - True - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - - - diff --git a/plugins/imap-features/imap-headers.ui b/plugins/imap-features/imap-headers.ui new file mode 100644 index 0000000000..3fe49afdc6 --- /dev/null +++ b/plugins/imap-features/imap-headers.ui @@ -0,0 +1,328 @@ + + + + + 6 + True + False + 6 + + + 6 + True + 0 + 0 + GTK_SHADOW_NONE + + + 6 + True + 0 + 0 + 1 + 1 + 0 + 0 + 12 + 0 + + + True + False + 6 + + + True + Select your IMAP Header Preferences. +more headers you have the more time it will take to download. + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + True + _Fetch All Headers + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + True + _Basic Headers - (Fastest) +this if you do not have filters based on mailing lists + True + GTK_RELIEF_NORMAL + True + False + False + True + allHeaders + + + 0 + False + False + + + + + True + True + Basic and _Mailing List Headers (Default) + True + GTK_RELIEF_NORMAL + True + False + False + True + allHeaders + + + 0 + False + False + + + + + + + + + True + <b>IMAP Headers</b> + False + True + GTK_JUSTIFY_LEFT + False + True + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + False + True + + + + + 6 + True + 0 + 0 + GTK_SHADOW_NONE + + + 6 + True + 0 + 0 + 1 + 1 + 0 + 0 + 12 + 0 + + + True + False + 6 + + + True + True + Give the extra headers that you need to fetch in addition to the above standard headers. +can ignore this if you choose "All Headers". + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 1 + False + 0 + + + 0 + False + True + + + + + True + False + 5 + + + True + False + 6 + + + True + True + True + True + 0 + + True + * + False + + + 0 + False + True + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + True + True + False + False + False + True + False + False + False + + + + + 0 + True + True + + + + + 0 + True + True + + + + + True + GTK_BUTTONBOX_START + 6 + + + True + True + gtk-add + True + GTK_RELIEF_NORMAL + True + + + + + True + True + gtk-remove + True + GTK_RELIEF_NORMAL + True + + + + + 4 + False + False + + + + + 0 + True + True + + + + + + + + + True + <b>Custom Headers</b> + False + True + GTK_JUSTIFY_LEFT + False + True + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + True + True + + + + -- cgit v1.2.3