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 --- widgets/e-timezone-dialog/Makefile.am | 6 +- widgets/e-timezone-dialog/e-timezone-dialog.c | 40 +- widgets/e-timezone-dialog/e-timezone-dialog.glade | 319 --- widgets/e-timezone-dialog/e-timezone-dialog.ui | 303 +++ widgets/menus/Makefile.am | 12 +- widgets/menus/gal-define-views-dialog.c | 32 +- widgets/menus/gal-define-views-dialog.h | 3 +- widgets/menus/gal-define-views.glade | 176 -- widgets/menus/gal-define-views.ui | 177 ++ widgets/menus/gal-view-instance-save-as-dialog.c | 29 +- .../menus/gal-view-instance-save-as-dialog.glade | 174 -- widgets/menus/gal-view-instance-save-as-dialog.h | 3 +- widgets/menus/gal-view-instance-save-as-dialog.ui | 174 ++ widgets/menus/gal-view-instance.c | 6 +- widgets/menus/gal-view-new-dialog.c | 26 +- widgets/menus/gal-view-new-dialog.glade | 185 -- widgets/menus/gal-view-new-dialog.h | 3 +- widgets/menus/gal-view-new-dialog.ui | 179 ++ widgets/misc/Makefile.am | 8 +- widgets/misc/e-dateedit.c | 136 +- widgets/misc/e-image-chooser.c | 99 +- widgets/misc/e-image-chooser.h | 3 +- widgets/misc/e-import-assistant.c | 1 - widgets/misc/e-send-options.c | 108 +- widgets/misc/e-send-options.glade | 822 ------- widgets/misc/e-send-options.ui | 942 ++++++++ widgets/table/Makefile.am | 9 +- widgets/table/e-table-config.c | 174 +- widgets/table/e-table-config.glade | 2432 -------------------- widgets/table/e-table-config.ui | 2142 +++++++++++++++++ widgets/table/e-table-field-chooser.c | 61 +- widgets/table/e-table-field-chooser.glade | 123 - widgets/table/e-table-field-chooser.h | 2 - 33 files changed, 4384 insertions(+), 4525 deletions(-) delete mode 100644 widgets/e-timezone-dialog/e-timezone-dialog.glade create mode 100644 widgets/e-timezone-dialog/e-timezone-dialog.ui delete mode 100644 widgets/menus/gal-define-views.glade create mode 100644 widgets/menus/gal-define-views.ui delete mode 100644 widgets/menus/gal-view-instance-save-as-dialog.glade create mode 100644 widgets/menus/gal-view-instance-save-as-dialog.ui delete mode 100644 widgets/menus/gal-view-new-dialog.glade create mode 100644 widgets/menus/gal-view-new-dialog.ui delete mode 100644 widgets/misc/e-send-options.glade create mode 100644 widgets/misc/e-send-options.ui delete mode 100644 widgets/table/e-table-config.glade create mode 100644 widgets/table/e-table-config.ui delete mode 100644 widgets/table/e-table-field-chooser.glade (limited to 'widgets') diff --git a/widgets/e-timezone-dialog/Makefile.am b/widgets/e-timezone-dialog/Makefile.am index d08bef18c2..ebdb6e2c00 100644 --- a/widgets/e-timezone-dialog/Makefile.am +++ b/widgets/e-timezone-dialog/Makefile.am @@ -4,7 +4,7 @@ libetimezonedialog_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ -I$(top_srcdir) \ -I$(top_srcdir)/widgets \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ + -DEVOLUTION_UIDIR=\""$(uidir)"\" \ -DG_LOG_DOMAIN=__FILE__ \ $(TZDIALOG_CFLAGS) @@ -19,8 +19,8 @@ libetimezonedialog_la_LIBADD = \ $(top_builddir)/widgets/misc/libemiscwidgets.la \ $(EVOLUTION_CALENDAR_LIBS) -glade_DATA = e-timezone-dialog.glade +ui_DATA = e-timezone-dialog.ui -EXTRA_DIST = $(glade_DATA) +EXTRA_DIST = $(ui_DATA) -include $(top_srcdir)/git.mk diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c index 8f22695916..a7ea43d9e9 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.c +++ b/widgets/e-timezone-dialog/e-timezone-dialog.c @@ -27,11 +27,11 @@ #include #include #include -#include #include #include #include +#include "e-util/e-util.h" #include "e-util/e-util-private.h" #include "e-timezone-dialog.h" @@ -58,8 +58,7 @@ struct _ETimezoneDialogPrivate { the displayed name is ""). */ icaltimezone *zone; - /* Glade XML data */ - GladeXML *xml; + GtkBuilder *builder; EMapPoint *point_selected; EMapPoint *point_hover; @@ -69,7 +68,7 @@ struct _ETimezoneDialogPrivate { /* The timeout used to flash the nearest point. */ guint timeout_id; - /* Widgets from the Glade file */ + /* Widgets from the UI file */ GtkWidget *app; GtkWidget *table; GtkWidget *map_window; @@ -161,9 +160,9 @@ e_timezone_dialog_dispose (GObject *object) priv->timeout_id = 0; } - if (priv->xml) { - g_object_unref (priv->xml); - priv->xml = NULL; + if (priv->builder) { + g_object_unref (priv->builder); + priv->builder = NULL; } (* G_OBJECT_CLASS (e_timezone_dialog_parent_class)->dispose) (object); @@ -261,7 +260,6 @@ e_timezone_dialog_construct (ETimezoneDialog *etd) { ETimezoneDialogPrivate *priv; GtkWidget *map; - gchar *filename; g_return_val_if_fail (etd != NULL, NULL); g_return_val_if_fail (E_IS_TIMEZONE_DIALOG (etd), NULL); @@ -270,16 +268,8 @@ e_timezone_dialog_construct (ETimezoneDialog *etd) /* Load the content widgets */ - filename = g_build_filename (EVOLUTION_GLADEDIR, - "e-timezone-dialog.glade", - NULL); - priv->xml = glade_xml_new (filename, NULL, NULL); - g_free (filename); - - if (!priv->xml) { - g_message ("e_timezone_dialog_construct(): Could not load the Glade XML file!"); - goto error; - } + priv->builder = gtk_builder_new (); + e_load_ui_builder_definition (priv->builder, "e-timezone-dialog.ui"); if (!get_widgets (etd)) { g_message ("e_timezone_dialog_construct(): Could not find all widgets in the XML file!"); @@ -364,16 +354,16 @@ static gboolean get_widgets (ETimezoneDialog *etd) { ETimezoneDialogPrivate *priv; + GtkBuilder *builder; priv = etd->priv; + builder = etd->priv->builder; -#define GW(name) glade_xml_get_widget (priv->xml, name) - - priv->app = GW ("timezone-dialog"); - priv->map_window = GW ("map-window"); - priv->timezone_combo = GW ("timezone-combo"); - priv->table = GW ("timezone-table"); - priv->preview_label = GW ("preview-label"); + priv->app = e_builder_get_widget (builder, "timezone-dialog"); + priv->map_window = e_builder_get_widget (builder, "map-window"); + priv->timezone_combo = e_builder_get_widget (builder, "timezone-combo"); + priv->table = e_builder_get_widget (builder, "timezone-table"); + priv->preview_label = e_builder_get_widget (builder, "preview-label"); return (priv->app && priv->map_window diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.glade b/widgets/e-timezone-dialog/e-timezone-dialog.glade deleted file mode 100644 index f23ee27027..0000000000 --- a/widgets/e-timezone-dialog/e-timezone-dialog.glade +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - - Select a Time Zone - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 500 - 400 - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - False - - - - True - False - 6 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -2 - - - - - - True - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -3 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 12 - True - False - 12 - - - - True - False - 12 - - - - True - gtk-dialog-info - 6 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Use the left mouse button to zoom in on an area of the map and select a time zone. -Use the right mouse button to zoom out. - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - <b>Time Zones</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - False - 6 - - - - True - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - - - - 0 - True - True - - - - - - True - America/New_York - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - <b>_Selection</b> - True - True - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - timezone-combo - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - False - True - - Timezone drop-down combination box - - - - 0 - True - True - - - - - 0 - False - False - - - - - 0 - True - True - - - - - - - diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.ui b/widgets/e-timezone-dialog/e-timezone-dialog.ui new file mode 100644 index 0000000000..7ce81a176c --- /dev/null +++ b/widgets/e-timezone-dialog/e-timezone-dialog.ui @@ -0,0 +1,303 @@ + + + + + Select a Time Zone + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 500 + 400 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + False + + + True + False + 6 + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + 12 + True + False + 12 + + + True + False + 12 + + + True + gtk-dialog-info + 6 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + Use the left mouse button to zoom in on an area of the map and select a time zone. +Use the right mouse button to zoom out. + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + 0 + False + False + + + + + True + <b>Time Zones</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + False + 12 + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + False + 6 + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + + + 0 + True + True + + + + + True + America/New_York + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + 0 + True + True + + + + + 0 + True + True + + + + + True + <b>_Selection</b> + True + True + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + timezone-combo + + + 0 + False + False + + + + + True + False + 12 + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + False + True + + + + + + Timezone drop-down combination box + + + + + 0 + True + True + + + + + 0 + False + False + + + + + 0 + True + True + + + + + + cancel-button + ok-button + + + diff --git a/widgets/menus/Makefile.am b/widgets/menus/Makefile.am index 920dae4685..3a33e64651 100644 --- a/widgets/menus/Makefile.am +++ b/widgets/menus/Makefile.am @@ -4,7 +4,7 @@ libmenus_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ -I$(top_srcdir) \ -I$(top_srcdir)/widgets \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ + -DEVOLUTION_UIDIR=\""$(uidir)"\" \ -DG_LOG_DOMAIN=\"menus\" \ $(GNOME_PLATFORM_CFLAGS) \ $(E_UTIL_CFLAGS) @@ -21,10 +21,10 @@ libmenus_la_SOURCES = \ gal-view-new-dialog.c \ gal-view.c -glade_DATA = \ - gal-define-views.glade \ - gal-view-new-dialog.glade \ - gal-view-instance-save-as-dialog.glade +ui_DATA = \ + gal-define-views.ui \ + gal-view-new-dialog.ui \ + gal-view-instance-save-as-dialog.ui libmenusincludedir = $(privincludedir)/menus @@ -52,6 +52,6 @@ libmenus_la_LIBADD = \ icons = EXTRA_DIST = \ $(icons) \ - $(glade_DATA) + $(ui_DATA) -include $(top_srcdir)/git.mk diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c index 148960e4d5..ade534bc02 100644 --- a/widgets/menus/gal-define-views-dialog.c +++ b/widgets/menus/gal-define-views-dialog.c @@ -186,7 +186,7 @@ gdvd_button_copy_callback(GtkWidget *widget, GalDefineViewsDialog *dialog) GtkWidget *scrolled; ETable *etable; - scrolled = glade_xml_get_widget(dialog->gui, "custom-table"); + scrolled = e_builder_get_widget(dialog->builder, "custom-table"); etable = e_table_scrolled_get_table(E_TABLE_SCROLLED(scrolled)); row = e_table_get_cursor_row (E_TABLE(etable)); @@ -210,10 +210,10 @@ gdvd_cursor_changed_callback (GtkWidget *widget, GalDefineViewsDialog *dialog) &iter)) { gtk_tree_model_get (dialog->model, &iter, COL_GALVIEW_DATA, &item, -1); - button = glade_xml_get_widget (dialog->gui, "button-delete"); + button = e_builder_get_widget (dialog->builder, "button-delete"); gtk_widget_set_sensitive (GTK_WIDGET (button), !item->built_in); - button = glade_xml_get_widget (dialog->gui, "button-modify"); + button = e_builder_get_widget (dialog->builder, "button-modify"); gtk_widget_set_sensitive (GTK_WIDGET (button), !item->built_in); } } @@ -223,7 +223,7 @@ gdvd_connect_signal(GalDefineViewsDialog *dialog, const gchar *widget_name, cons { GtkWidget *widget; - widget = glade_xml_get_widget (dialog->gui, widget_name); + widget = e_builder_get_widget (dialog->builder, widget_name); if (widget) g_signal_connect (widget, signal, handler, dialog); @@ -238,20 +238,14 @@ dialog_response (GalDefineViewsDialog *dialog, gint response_id, gpointer data) static void gal_define_views_dialog_init (GalDefineViewsDialog *dialog) { - GladeXML *gui; GtkWidget *widget; - gchar *filename = g_build_filename (EVOLUTION_GLADEDIR, - "gal-define-views.glade", - NULL); - dialog->collection = NULL; - gui = glade_xml_new (filename, NULL, GETTEXT_PACKAGE); - g_free (filename); - dialog->gui = gui; + dialog->builder = gtk_builder_new (); + e_load_ui_builder_definition (dialog->builder, "gal-define-views.ui"); - widget = glade_xml_get_widget (gui, "table-top"); + widget = e_builder_get_widget (dialog->builder, "table-top"); if (!widget) { return; } @@ -268,7 +262,7 @@ gal_define_views_dialog_init (GalDefineViewsDialog *dialog) GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); - dialog->treeview = GTK_TREE_VIEW (glade_xml_get_widget (dialog->gui, "treeview1")); + dialog->treeview = GTK_TREE_VIEW (e_builder_get_widget (dialog->builder, "treeview1")); gtk_tree_view_set_reorderable (GTK_TREE_VIEW (dialog->treeview), FALSE); gtk_tree_view_set_headers_visible (dialog->treeview, TRUE); @@ -291,9 +285,9 @@ gal_define_views_dialog_dispose (GObject *object) { GalDefineViewsDialog *gal_define_views_dialog = GAL_DEFINE_VIEWS_DIALOG(object); - if (gal_define_views_dialog->gui) - g_object_unref(gal_define_views_dialog->gui); - gal_define_views_dialog->gui = NULL; + if (gal_define_views_dialog->builder) + g_object_unref(gal_define_views_dialog->builder); + gal_define_views_dialog->builder = NULL; if (G_OBJECT_CLASS (gal_define_views_dialog_parent_class)->dispose) (* G_OBJECT_CLASS (gal_define_views_dialog_parent_class)->dispose) (object); @@ -349,8 +343,8 @@ gal_define_views_dialog_set_collection(GalDefineViewsDialog *dialog, gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (dialog->model), COL_GALVIEW_NAME, GTK_SORT_ASCENDING); - if (dialog->gui) { - GtkWidget *widget = glade_xml_get_widget(dialog->gui, "label-views"); + if (dialog->builder) { + GtkWidget *widget = e_builder_get_widget(dialog->builder, "label-views"); if (widget && GTK_IS_LABEL (widget)) { if (collection->title) { gchar *text = g_strdup_printf (_("Define Views for %s"), diff --git a/widgets/menus/gal-define-views-dialog.h b/widgets/menus/gal-define-views-dialog.h index a510679567..c4b79a7834 100644 --- a/widgets/menus/gal-define-views-dialog.h +++ b/widgets/menus/gal-define-views-dialog.h @@ -24,7 +24,6 @@ #define __GAL_DEFINE_VIEWS_DIALOG_H__ #include -#include #include @@ -52,7 +51,7 @@ struct _GalDefineViewsDialog GtkDialog parent; /* item specific fields */ - GladeXML *gui; + GtkBuilder *builder; GtkTreeView *treeview; GtkTreeModel *model; diff --git a/widgets/menus/gal-define-views.glade b/widgets/menus/gal-define-views.glade deleted file mode 100644 index 26976c4857..0000000000 --- a/widgets/menus/gal-define-views.glade +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - Define Views for "%s" - GDK_WINDOW_TYPE_HINT_NORMAL - - - True - 6 - - - True - 2 - 1 - 6 - 6 - - - True - 0 - Define Views for %s - - - GTK_FILL - - - - - - True - 6 - 6 - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - True - True - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 6 - GTK_BUTTONBOX_START - - - True - True - gtk-new - True - - - False - False - - - - - True - False - True - True - - - True - 0 - 0 - - - True - 2 - - - True - gtk-properties - - - False - False - - - - - True - _Edit - True - - - False - False - 1 - - - - - - - - - False - False - 1 - - - - - True - True - gtk-delete - True - - - False - False - 2 - - - - - False - False - 1 - - - - - 1 - 2 - - - - - 12 - 2 - - - - - True - GTK_BUTTONBOX_END - - - True - True - True - gtk-close - True - -5 - - - - - False - GTK_PACK_END - - - - - - \ No newline at end of file diff --git a/widgets/menus/gal-define-views.ui b/widgets/menus/gal-define-views.ui new file mode 100644 index 0000000000..b3314aa4ee --- /dev/null +++ b/widgets/menus/gal-define-views.ui @@ -0,0 +1,177 @@ + + + + + Define Views for "%s" + GDK_WINDOW_TYPE_HINT_NORMAL + + + True + 6 + + + True + 2 + 1 + 6 + 6 + + + True + 0 + Define Views for %s + + + GTK_FILL + + + + + + True + 6 + 6 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + True + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + GTK_BUTTONBOX_START + + + True + True + gtk-new + True + + + False + False + + + + + True + False + True + True + + + True + 0 + 0 + + + True + 2 + + + True + gtk-properties + + + False + False + + + + + True + _Edit + True + + + False + False + 1 + + + + + + + + + False + False + 1 + + + + + True + True + gtk-delete + True + + + False + False + 2 + + + + + False + False + 1 + + + + + 1 + 2 + + + + + 12 + 2 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-close + True + + + + + False + GTK_PACK_END + + + + + + button7 + + + diff --git a/widgets/menus/gal-view-instance-save-as-dialog.c b/widgets/menus/gal-view-instance-save-as-dialog.c index 76871594e2..37d903c630 100644 --- a/widgets/menus/gal-view-instance-save-as-dialog.c +++ b/widgets/menus/gal-view-instance-save-as-dialog.c @@ -198,9 +198,9 @@ gal_view_instance_save_as_dialog_dispose (GObject *object) { GalViewInstanceSaveAsDialog *gal_view_instance_save_as_dialog = GAL_VIEW_INSTANCE_SAVE_AS_DIALOG (object); - if (gal_view_instance_save_as_dialog->gui) - g_object_unref (gal_view_instance_save_as_dialog->gui); - gal_view_instance_save_as_dialog->gui = NULL; + if (gal_view_instance_save_as_dialog->builder) + g_object_unref (gal_view_instance_save_as_dialog->builder); + gal_view_instance_save_as_dialog->builder = NULL; if (G_OBJECT_CLASS (gal_view_instance_save_as_dialog_parent_class)->dispose) (* G_OBJECT_CLASS (gal_view_instance_save_as_dialog_parent_class)->dispose) (object); @@ -229,22 +229,17 @@ gal_view_instance_save_as_dialog_class_init (GalViewInstanceSaveAsDialogClass *k static void gal_view_instance_save_as_dialog_init (GalViewInstanceSaveAsDialog *dialog) { - GladeXML *gui; GtkWidget *widget; - gchar *filename = g_build_filename (EVOLUTION_GLADEDIR, - "gal-view-instance-save-as-dialog.glade", - NULL); - dialog->instance = NULL; dialog->model = NULL; dialog->collection = NULL; - gui = glade_xml_new_with_domain (filename , NULL, GETTEXT_PACKAGE); - g_free (filename); - dialog->gui = gui; + dialog->builder = gtk_builder_new (); + e_load_ui_builder_definition ( + dialog->builder, "gal-view-instance-save-as-dialog.ui"); - widget = glade_xml_get_widget (gui, "vbox-top"); + widget = e_builder_get_widget (dialog->builder, "vbox-top"); if (!widget) { return; } @@ -262,11 +257,11 @@ gal_view_instance_save_as_dialog_init (GalViewInstanceSaveAsDialog *dialog) GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); - dialog->scrolledwindow = glade_xml_get_widget (dialog->gui, "scrolledwindow2"); - dialog->treeview = GTK_TREE_VIEW (glade_xml_get_widget (dialog->gui, "custom-replace")); - dialog->entry_create = glade_xml_get_widget (dialog->gui, "entry-create"); - dialog->radiobutton_replace = glade_xml_get_widget (dialog->gui, "radiobutton-replace"); - dialog->radiobutton_create = glade_xml_get_widget (dialog->gui, "radiobutton-create"); + dialog->scrolledwindow = e_builder_get_widget (dialog->builder, "scrolledwindow2"); + dialog->treeview = GTK_TREE_VIEW (e_builder_get_widget (dialog->builder, "custom-replace")); + dialog->entry_create = e_builder_get_widget (dialog->builder, "entry-create"); + dialog->radiobutton_replace = e_builder_get_widget (dialog->builder, "radiobutton-replace"); + dialog->radiobutton_create = e_builder_get_widget (dialog->builder, "radiobutton-create"); gtk_tree_view_set_reorderable (GTK_TREE_VIEW (dialog->treeview), FALSE); gtk_tree_view_set_headers_visible (dialog->treeview, FALSE); diff --git a/widgets/menus/gal-view-instance-save-as-dialog.glade b/widgets/menus/gal-view-instance-save-as-dialog.glade deleted file mode 100644 index aa40910113..0000000000 --- a/widgets/menus/gal-view-instance-save-as-dialog.glade +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - GDK_WINDOW_TYPE_HINT_NORMAL - - - True - 8 - - - True - 18 - 12 - - - True - 6 - - - True - True - _Create new view - True - 0 - True - True - - - False - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 24 - - - True - 6 - - - True - _Name: - True - entry-create - - - False - False - - - - - True - False - True - - - 1 - - - - - - - 1 - - - - - False - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 6 - - - True - True - _Replace existing view - True - 0 - True - radiobutton-create - - - False - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 24 - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - - - - - - - 1 - - - - - 1 - - - - - 2 - - - - - True - GTK_BUTTONBOX_END - - - True - True - True - gtk-cancel - True - 0 - - - - - True - True - True - gtk-ok - True - 0 - - - 1 - - - - - False - GTK_PACK_END - - - - - - - diff --git a/widgets/menus/gal-view-instance-save-as-dialog.h b/widgets/menus/gal-view-instance-save-as-dialog.h index 64e97afde8..0f43666760 100644 --- a/widgets/menus/gal-view-instance-save-as-dialog.h +++ b/widgets/menus/gal-view-instance-save-as-dialog.h @@ -24,7 +24,6 @@ #define __GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_H__ #include -#include #include #include @@ -57,7 +56,7 @@ struct _GalViewInstanceSaveAsDialog GtkDialog parent; /* item specific fields */ - GladeXML *gui; + GtkBuilder *builder; GtkTreeView *treeview; GtkTreeModel *model; diff --git a/widgets/menus/gal-view-instance-save-as-dialog.ui b/widgets/menus/gal-view-instance-save-as-dialog.ui new file mode 100644 index 0000000000..c7db68aa5f --- /dev/null +++ b/widgets/menus/gal-view-instance-save-as-dialog.ui @@ -0,0 +1,174 @@ + + + + + GDK_WINDOW_TYPE_HINT_NORMAL + + + True + 8 + + + True + 18 + 12 + + + True + 6 + + + True + True + _Create new view + True + True + True + + + False + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 24 + + + True + 6 + + + True + _Name: + True + entry-create + + + False + False + + + + + True + False + True + + + 1 + + + + + + + 1 + + + + + False + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + + + True + True + _Replace existing view + True + True + radiobutton-create + + + False + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 24 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + + + + + + + 1 + + + + + 1 + + + + + 2 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-cancel + True + + + + + True + True + True + gtk-ok + True + + + 1 + + + + + False + GTK_PACK_END + + + + + + radiobutton-create + radiobutton-replace + button3 + button1 + + + diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c index bd93b64034..7b903107fe 100644 --- a/widgets/menus/gal-view-instance.c +++ b/widgets/menus/gal-view-instance.c @@ -419,7 +419,11 @@ dialog_response(GtkWidget *dialog, gint id, GalViewInstance *instance) void gal_view_instance_save_as (GalViewInstance *instance) { - GtkWidget *dialog = gal_view_instance_save_as_dialog_new(instance); + GtkWidget *dialog; + + g_return_if_fail (instance != NULL); + + dialog = gal_view_instance_save_as_dialog_new (instance); g_signal_connect(dialog, "response", G_CALLBACK(dialog_response), instance); gtk_widget_show(dialog); diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c index da90fb024d..328cc5e35e 100644 --- a/widgets/menus/gal-view-new-dialog.c +++ b/widgets/menus/gal-view-new-dialog.c @@ -74,17 +74,13 @@ gal_view_new_dialog_class_init (GalViewNewDialogClass *klass) static void gal_view_new_dialog_init (GalViewNewDialog *dialog) { - GladeXML *gui; GtkWidget *widget; - gchar *filename = g_build_filename (EVOLUTION_GLADEDIR, - "gal-view-new-dialog.glade", - NULL); - gui = glade_xml_new (filename, NULL, GETTEXT_PACKAGE); - g_free (filename); - dialog->gui = gui; + dialog->builder = gtk_builder_new (); + e_load_ui_builder_definition ( + dialog->builder, "gal-view-new-dialog.ui"); - widget = glade_xml_get_widget (gui, "table-top"); + widget = e_builder_get_widget (dialog->builder, "table-top"); if (!widget) { return; } @@ -111,9 +107,9 @@ gal_view_new_dialog_dispose (GObject *object) { GalViewNewDialog *gal_view_new_dialog = GAL_VIEW_NEW_DIALOG(object); - if (gal_view_new_dialog->gui) - g_object_unref(gal_view_new_dialog->gui); - gal_view_new_dialog->gui = NULL; + if (gal_view_new_dialog->builder) + g_object_unref(gal_view_new_dialog->builder); + gal_view_new_dialog->builder = NULL; if (G_OBJECT_CLASS (gal_view_new_dialog_parent_class)->dispose) (* G_OBJECT_CLASS (gal_view_new_dialog_parent_class)->dispose) (object); @@ -191,8 +187,8 @@ gal_view_new_dialog_construct (GalViewNewDialog *dialog, GtkCellRenderer *rend; dialog->collection = collection; - dialog->list = glade_xml_get_widget(dialog->gui,"list-type-list"); - dialog->entry = glade_xml_get_widget(dialog->gui, "entry-name"); + dialog->list = e_builder_get_widget(dialog->builder,"list-type-list"); + dialog->entry = e_builder_get_widget(dialog->builder, "entry-name"); dialog->list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); @@ -243,7 +239,7 @@ gal_view_new_dialog_set_property (GObject *object, guint prop_id, const GValue * switch (prop_id) { case PROP_NAME: - entry = glade_xml_get_widget(dialog->gui, "entry-name"); + entry = e_builder_get_widget(dialog->builder, "entry-name"); if (entry && GTK_IS_ENTRY(entry)) { gtk_entry_set_text(GTK_ENTRY(entry), g_value_get_string (value)); } @@ -264,7 +260,7 @@ gal_view_new_dialog_get_property (GObject *object, guint prop_id, GValue *value, switch (prop_id) { case PROP_NAME: - entry = glade_xml_get_widget(dialog->gui, "entry-name"); + entry = e_builder_get_widget(dialog->builder, "entry-name"); if (entry && GTK_IS_ENTRY(entry)) { g_value_set_string (value, gtk_entry_get_text (GTK_ENTRY (entry))); } diff --git a/widgets/menus/gal-view-new-dialog.glade b/widgets/menus/gal-view-new-dialog.glade deleted file mode 100644 index f182d63ab9..0000000000 --- a/widgets/menus/gal-view-new-dialog.glade +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - 0 - - - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - 0 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - 4 - 1 - False - 6 - 6 - - - - True - Name of new view: - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - entry-name - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - - - 0 - 1 - 1 - 2 - fill - - - - - - True - Type of view: - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - False - True - - Type of View - - - - - - 0 - 1 - 3 - 4 - fill - - - - - 0 - True - True - - - - - - - diff --git a/widgets/menus/gal-view-new-dialog.h b/widgets/menus/gal-view-new-dialog.h index 364e1ae472..6b7d2b0335 100644 --- a/widgets/menus/gal-view-new-dialog.h +++ b/widgets/menus/gal-view-new-dialog.h @@ -24,7 +24,6 @@ #define __GAL_VIEW_NEW_DIALOG_H__ #include -#include #include G_BEGIN_DECLS @@ -51,7 +50,7 @@ struct _GalViewNewDialog GtkDialog parent; /* item specific fields */ - GladeXML *gui; + GtkBuilder *builder; GalViewCollection *collection; GalViewFactory *selected_factory; diff --git a/widgets/menus/gal-view-new-dialog.ui b/widgets/menus/gal-view-new-dialog.ui new file mode 100644 index 0000000000..290bc15c54 --- /dev/null +++ b/widgets/menus/gal-view-new-dialog.ui @@ -0,0 +1,179 @@ + + + + + + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + True + False + 8 + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + True + 4 + 1 + False + 6 + 6 + + + True + Name of new view: + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + entry-name + + + 0 + 1 + 0 + 1 + fill + + + + + + True + True + True + True + 0 + + True + * + False + + + 0 + 1 + 1 + 2 + fill + + + + + True + Type of view: + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + True + True + False + False + False + True + + + + + + Type of View + + + + + + + 0 + 1 + 3 + 4 + fill + + + + + 0 + True + True + + + + + + button1 + button3 + + + diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am index e43494b879..33b9311d90 100644 --- a/widgets/misc/Makefile.am +++ b/widgets/misc/Makefile.am @@ -2,7 +2,7 @@ if OS_WIN32 WIN32_BOOTSTRAP_LIBS = $(top_builddir)/win32/libfilter.la endif -privsolib_LTLIBRARIES = libemiscwidgets.la +privsolib_LTLIBRARIES = libemiscwidgets.la widgetsincludedir = $(privincludedir)/misc @@ -14,7 +14,7 @@ pilot_sources = pilot_headers = endif -glade_DATA = e-send-options.glade +ui_DATA = e-send-options.ui widgetsinclude_HEADERS = \ $(pilot_headers) \ @@ -85,7 +85,7 @@ libemiscwidgets_la_CPPFLAGS = \ -I$(top_srcdir)/filter \ -I$(top_srcdir)/widgets \ -DEVOLUTION_IMAGES=\""$(imagesdir)"\" \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ + -DEVOLUTION_UIDIR=\""$(uidir)"\" \ -DG_LOG_DOMAIN=__FILE__ \ $(EVOLUTION_MAIL_CFLAGS) \ $(GNOME_PLATFORM_CFLAGS) @@ -220,7 +220,7 @@ test_preferences_window_LDADD = \ EXTRA_DIST = \ - $(glade_DATA) \ + $(ui_DATA) \ e-pilot-settings.h \ e-pilot-settings.c \ ChangeLog.pre-1-4 diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 2b0eb8acd5..268931a357 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "e-calendar.h" #define E_DATE_EDIT_GET_PRIVATE(obj) \ @@ -112,13 +113,20 @@ struct _EDateEditPrivate { /* set to TRUE when the date has been changed by typing to the entry */ gboolean has_been_changed; + + gboolean allow_no_date_set; }; enum { PROP_0, + PROP_ALLOW_NO_DATE_SET, + PROP_SHOW_DATE, + PROP_SHOW_TIME, PROP_SHOW_WEEK_NUMBERS, PROP_USE_24_HOUR_FORMAT, - PROP_WEEK_START_DAY + PROP_WEEK_START_DAY, + PROP_TWODIGIT_YEAR_CAN_FUTURE, + PROP_SET_NONE }; enum { @@ -207,6 +215,24 @@ date_edit_set_property (GObject *object, GParamSpec *pspec) { switch (property_id) { + case PROP_ALLOW_NO_DATE_SET: + e_date_edit_set_allow_no_date_set ( + E_DATE_EDIT (object), + g_value_get_boolean (value)); + return; + + case PROP_SHOW_DATE: + e_date_edit_set_show_date ( + E_DATE_EDIT (object), + g_value_get_boolean (value)); + return; + + case PROP_SHOW_TIME: + e_date_edit_set_show_time ( + E_DATE_EDIT (object), + g_value_get_boolean (value)); + return; + case PROP_SHOW_WEEK_NUMBERS: e_date_edit_set_show_week_numbers ( E_DATE_EDIT (object), @@ -224,6 +250,17 @@ date_edit_set_property (GObject *object, E_DATE_EDIT (object), g_value_get_int (value)); return; + + case PROP_TWODIGIT_YEAR_CAN_FUTURE: + e_date_edit_set_twodigit_year_can_future ( + E_DATE_EDIT (object), + g_value_get_boolean (value)); + return; + + case PROP_SET_NONE: + if (g_value_get_boolean (value)) + e_date_edit_set_time (E_DATE_EDIT (object), -1); + return; } G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -236,6 +273,24 @@ date_edit_get_property (GObject *object, GParamSpec *pspec) { switch (property_id) { + case PROP_ALLOW_NO_DATE_SET: + g_value_set_boolean ( + value, e_date_edit_get_allow_no_date_set ( + E_DATE_EDIT (object))); + return; + + case PROP_SHOW_DATE: + g_value_set_boolean ( + value, e_date_edit_get_show_date ( + E_DATE_EDIT (object))); + return; + + case PROP_SHOW_TIME: + g_value_set_boolean ( + value, e_date_edit_get_show_time ( + E_DATE_EDIT (object))); + return; + case PROP_SHOW_WEEK_NUMBERS: g_value_set_boolean ( value, e_date_edit_get_show_week_numbers ( @@ -253,6 +308,12 @@ date_edit_get_property (GObject *object, value, e_date_edit_get_week_start_day ( E_DATE_EDIT (object))); return; + + case PROP_TWODIGIT_YEAR_CAN_FUTURE: + g_value_set_boolean ( + value, e_date_edit_get_twodigit_year_can_future ( + E_DATE_EDIT (object))); + return; } G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -294,6 +355,36 @@ date_edit_class_init (EDateEditClass *class) widget_class->mnemonic_activate = e_date_edit_mnemonic_activate; widget_class->grab_focus = e_date_edit_grab_focus; + g_object_class_install_property ( + object_class, + PROP_ALLOW_NO_DATE_SET, + g_param_spec_boolean ( + "allow-no-date-set", + "Allow No Date Set", + NULL, + FALSE, + G_PARAM_READWRITE)); + + g_object_class_install_property ( + object_class, + PROP_SHOW_DATE, + g_param_spec_boolean ( + "show-date", + "Show Date", + NULL, + TRUE, + G_PARAM_READWRITE)); + + g_object_class_install_property ( + object_class, + PROP_SHOW_TIME, + g_param_spec_boolean ( + "show-time", + "Show Time", + NULL, + TRUE, + G_PARAM_READWRITE)); + g_object_class_install_property ( object_class, PROP_SHOW_WEEK_NUMBERS, @@ -326,6 +417,26 @@ date_edit_class_init (EDateEditClass *class) 0, G_PARAM_READWRITE)); + g_object_class_install_property ( + object_class, + PROP_TWODIGIT_YEAR_CAN_FUTURE, + g_param_spec_boolean ( + "twodigit-year-can-future", + "Two-digit year can be treated as future", + NULL, + TRUE, + G_PARAM_READWRITE)); + + g_object_class_install_property ( + object_class, + PROP_SET_NONE, + g_param_spec_boolean ( + "set-none", + "Sets None as selected date", + NULL, + TRUE, + G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + signals[CHANGED] = g_signal_new ( "changed", G_OBJECT_CLASS_TYPE (object_class), @@ -587,6 +698,9 @@ create_children (EDateEdit *dedit) gtk_container_add (GTK_CONTAINER (bbox), priv->none_button); g_signal_connect (priv->none_button, "clicked", G_CALLBACK (on_date_popup_none_button_clicked), dedit); + e_binding_new ( + dedit, "allow-no-date-set", + priv->none_button, "visible"); } /* GtkWidget::mnemonic_activate() handler for the EDateEdit */ @@ -965,6 +1079,8 @@ e_date_edit_set_show_date (EDateEdit *dedit, gtk_widget_show (priv->space); else gtk_widget_hide (priv->space); + + g_object_notify (G_OBJECT (dedit), "show-date"); } /** @@ -1006,6 +1122,8 @@ e_date_edit_set_show_time (EDateEdit *dedit, priv->show_time = show_time; e_date_edit_update_time_combo_state (dedit); + + g_object_notify (G_OBJECT (dedit), "show-time"); } /** @@ -1156,24 +1274,22 @@ e_date_edit_set_use_24_hour_format (EDateEdit *dedit, /* Whether we allow the date to be set to 'None'. e_date_edit_get_time() will return (time_t) -1 in this case. */ gboolean -e_date_edit_get_allow_no_date_set (EDateEdit *dedit) +e_date_edit_get_allow_no_date_set (EDateEdit *dedit) { g_return_val_if_fail (E_IS_DATE_EDIT (dedit), FALSE); - return GTK_WIDGET_VISIBLE (dedit->priv->none_button); + return dedit->priv->allow_no_date_set; } void -e_date_edit_set_allow_no_date_set (EDateEdit *dedit, - gboolean allow_no_date_set) +e_date_edit_set_allow_no_date_set (EDateEdit *dedit, + gboolean allow_no_date_set) { g_return_if_fail (E_IS_DATE_EDIT (dedit)); - if (allow_no_date_set) { - gtk_widget_show (dedit->priv->none_button); - } else { - gtk_widget_hide (dedit->priv->none_button); + dedit->priv->allow_no_date_set = allow_no_date_set; + if (!allow_no_date_set) { /* If the date is showing, we make sure it isn't 'None' (we don't really mind if the time is empty), else if just the time is showing we make sure it isn't 'None'. */ @@ -1185,6 +1301,8 @@ e_date_edit_set_allow_no_date_set (EDateEdit *dedit, e_date_edit_set_time (dedit, 0); } } + + g_object_notify (G_OBJECT (dedit), "allow-no-date-set"); } /* The range of time to show in the time combo popup. */ diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c index 32a3f2a899..5ef4e7cd3e 100644 --- a/widgets/misc/e-image-chooser.c +++ b/widgets/misc/e-image-chooser.c @@ -28,6 +28,7 @@ #include "e-image-chooser.h" #include "e-util/e-util.h" +#include "e-util/e-icon-factory.h" #define E_IMAGE_CHOOSER_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ @@ -41,6 +42,14 @@ struct _EImageChooserPrivate { gint image_buf_size; gint image_width; gint image_height; + + /* Default Image */ + gchar *icon_name; +}; + +enum { + PROP_0, + PROP_ICON_NAME }; enum { @@ -269,6 +278,66 @@ exit: gtk_drag_finish (context, handled, FALSE, time); } +static void +image_chooser_set_icon_name (EImageChooser *chooser, + const gchar *icon_name) +{ + GtkIconTheme *icon_theme; + GtkIconInfo *icon_info; + const gchar *filename; + gint width, height; + + g_return_if_fail (chooser->priv->icon_name == NULL); + + chooser->priv->icon_name = g_strdup (icon_name); + + icon_theme = gtk_icon_theme_get_default (); + gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &width, &height); + + icon_info = gtk_icon_theme_lookup_icon ( + icon_theme, icon_name, height, 0); + g_return_if_fail (icon_info != NULL); + + filename = gtk_icon_info_get_filename (icon_info); + e_image_chooser_set_from_file (chooser, filename); + gtk_icon_info_free (icon_info); +} + +static void +image_chooser_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec) +{ + switch (property_id) { + case PROP_ICON_NAME: + image_chooser_set_icon_name ( + E_IMAGE_CHOOSER (object), + g_value_get_string (value)); + return; + } + + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +} + +static void +image_chooser_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + switch (property_id) { + case PROP_ICON_NAME: + g_value_set_string ( + value, + e_image_chooser_get_icon_name ( + E_IMAGE_CHOOSER (object))); + return; + } + + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +} + static void image_chooser_dispose (GObject *object) { @@ -298,6 +367,7 @@ image_chooser_finalize (GObject *object) priv = E_IMAGE_CHOOSER_GET_PRIVATE (object); g_free (priv->image_buf); + g_free (priv->icon_name); /* Chain up to parent's finalize() method. */ G_OBJECT_CLASS (parent_class)->finalize (object); @@ -312,9 +382,22 @@ e_image_chooser_class_init (EImageChooserClass *class) g_type_class_add_private (class, sizeof (EImageChooserPrivate)); object_class = G_OBJECT_CLASS (class); + object_class->set_property = image_chooser_set_property; + object_class->get_property = image_chooser_get_property; object_class->dispose = image_chooser_dispose; object_class->finalize = image_chooser_finalize; + g_object_class_install_property ( + object_class, + PROP_ICON_NAME, + g_param_spec_string ( + "icon-name", + "Icon Name", + NULL, + "stock_person", + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + signals[CHANGED] = g_signal_new ( "changed", G_OBJECT_CLASS_TYPE (object_class), @@ -397,10 +480,22 @@ e_image_chooser_get_type (void) return type; } +const gchar * +e_image_chooser_get_icon_name (EImageChooser *chooser) +{ + g_return_val_if_fail (E_IS_IMAGE_CHOOSER (chooser), NULL); + + return chooser->priv->icon_name; +} + GtkWidget * -e_image_chooser_new (void) +e_image_chooser_new (const gchar *icon_name) { - return g_object_new (E_TYPE_IMAGE_CHOOSER, NULL); + g_return_val_if_fail (icon_name != NULL, NULL); + + return g_object_new ( + E_TYPE_IMAGE_CHOOSER, + "icon-name", icon_name, NULL); } gboolean diff --git a/widgets/misc/e-image-chooser.h b/widgets/misc/e-image-chooser.h index 7116500dc4..3338e16cd7 100644 --- a/widgets/misc/e-image-chooser.h +++ b/widgets/misc/e-image-chooser.h @@ -62,7 +62,8 @@ struct _EImageChooserClass { }; GType e_image_chooser_get_type (void); -GtkWidget * e_image_chooser_new (void); +GtkWidget * e_image_chooser_new (const gchar *icon_name); +const gchar * e_image_chooser_get_icon_name (EImageChooser *chooser); gboolean e_image_chooser_set_from_file (EImageChooser *chooser, const gchar *filename); gboolean e_image_chooser_set_image_data (EImageChooser *chooser, diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c index 10e60c6bfb..2a1b980eb5 100644 --- a/widgets/misc/e-import-assistant.c +++ b/widgets/misc/e-import-assistant.c @@ -27,7 +27,6 @@ #include #include -#include #include #include "e-util/e-error.h" diff --git a/widgets/misc/e-send-options.c b/widgets/misc/e-send-options.c index aa6c41e6d2..c134bfba6e 100644 --- a/widgets/misc/e-send-options.c +++ b/widgets/misc/e-send-options.c @@ -28,7 +28,6 @@ #include #include -#include #include #include "e-util/e-util.h" @@ -38,8 +37,7 @@ #include "e-send-options.h" struct _ESendOptionsDialogPrivate { - /* Glade XML data */ - GladeXML *xml; + GtkBuilder *builder; gboolean gopts_needed; gboolean global; @@ -403,48 +401,46 @@ static gboolean get_widgets (ESendOptionsDialog *sod) { ESendOptionsDialogPrivate *priv; + GtkBuilder *builder; priv = sod->priv; + builder = sod->priv->builder; -#define GW(name) glade_xml_get_widget (priv->xml, name) - - priv->main = GW ("send-options-dialog"); + priv->main = e_builder_get_widget (builder, "send-options-dialog"); if (!priv->main) return FALSE; - priv->priority = GW ("combo-priority"); - priv->status = GW ("status-tracking"); - priv->security = GW ("security-combo"); - priv->notebook = (GtkNotebook *)GW ("notebook"); - priv->reply_request = GW ("reply-request-button"); - priv->reply_convenient = GW ("reply-convinient"); - priv->reply_within = GW ("reply-within"); - priv->within_days = GW ("within-days"); - priv->delay_delivery = GW ("delay-delivery-button"); - priv->delay_until = GW ("until-date"); + priv->priority = e_builder_get_widget (builder, "combo-priority"); + priv->status = e_builder_get_widget (builder, "status-tracking"); + priv->security = e_builder_get_widget (builder, "security-combo"); + priv->notebook = (GtkNotebook *)e_builder_get_widget (builder, "notebook"); + priv->reply_request = e_builder_get_widget (builder, "reply-request-button"); + priv->reply_convenient = e_builder_get_widget (builder, "reply-convinient"); + priv->reply_within = e_builder_get_widget (builder, "reply-within"); + priv->within_days = e_builder_get_widget (builder, "within-days"); + priv->delay_delivery = e_builder_get_widget (builder, "delay-delivery-button"); + priv->delay_until = e_builder_get_widget (builder, "until-date"); gtk_widget_show (priv->delay_until); - priv->expiration = GW ("expiration-button"); - priv->expire_after = GW ("expire-after"); - priv->create_sent = GW ("create-sent-button"); - priv->delivered = GW ("delivered"); - priv->delivered_opened = GW ("delivered-opened"); - priv->all_info = GW ("all-info"); - priv->autodelete = GW ("autodelete"); - priv->when_opened = GW ("open-combo"); - priv->when_declined = GW ("delete-combo"); - priv->when_accepted = GW ("accept-combo"); - priv->when_completed = GW ("complete-combo"); - priv->security_label = GW ("security-label"); - priv->gopts_label = GW ("gopts-label"); - priv->sopts_label = GW ("slabel"); - priv->priority_label = GW ("priority-label"); - priv->until_label = GW ("until-label"); - priv->opened_label = GW ("opened-label"); - priv->declined_label = GW ("declined-label"); - priv->accepted_label = GW ("accepted-label"); - priv->completed_label = GW ("completed-label"); - -#undef GW + priv->expiration = e_builder_get_widget (builder, "expiration-button"); + priv->expire_after = e_builder_get_widget (builder, "expire-after"); + priv->create_sent = e_builder_get_widget (builder, "create-sent-button"); + priv->delivered = e_builder_get_widget (builder, "delivered"); + priv->delivered_opened = e_builder_get_widget (builder, "delivered-opened"); + priv->all_info = e_builder_get_widget (builder, "all-info"); + priv->autodelete = e_builder_get_widget (builder, "autodelete"); + priv->when_opened = e_builder_get_widget (builder, "open-combo"); + priv->when_declined = e_builder_get_widget (builder, "delete-combo"); + priv->when_accepted = e_builder_get_widget (builder, "accept-combo"); + priv->when_completed = e_builder_get_widget (builder, "complete-combo"); + priv->security_label = e_builder_get_widget (builder, "security-label"); + priv->gopts_label = e_builder_get_widget (builder, "gopts-label"); + priv->sopts_label = e_builder_get_widget (builder, "slabel"); + priv->priority_label = e_builder_get_widget (builder, "priority-label"); + priv->until_label = e_builder_get_widget (builder, "until-label"); + priv->opened_label = e_builder_get_widget (builder, "opened-label"); + priv->declined_label = e_builder_get_widget (builder, "declined-label"); + priv->accepted_label = e_builder_get_widget (builder, "accepted-label"); + priv->completed_label = e_builder_get_widget (builder, "completed-label"); return (priv->priority && priv->security @@ -558,21 +554,6 @@ e_sendoptions_get_need_general_options (ESendOptionsDialog *sod) return sod->priv->gopts_needed; } -GtkWidget * send_options_make_dateedit (void); - -GtkWidget * -send_options_make_dateedit (void) -{ - EDateEdit *dedit; - - dedit = E_DATE_EDIT (e_date_edit_new ()); - - e_date_edit_set_show_date (dedit, TRUE); - e_date_edit_set_show_time (dedit, TRUE); - - return GTK_WIDGET (dedit); -} - gboolean e_sendoptions_set_global (ESendOptionsDialog *sod, gboolean set) { @@ -597,7 +578,7 @@ static void e_send_options_cb (GtkDialog *dialog, gint state, gpointer func_data case GTK_RESPONSE_CANCEL: gtk_widget_hide (priv->main); gtk_widget_destroy (priv->main); - g_object_unref (priv->xml); + g_object_unref (priv->builder); break; case GTK_RESPONSE_HELP: e_display_help ( @@ -614,25 +595,20 @@ e_sendoptions_dialog_run (ESendOptionsDialog *sod, GtkWidget *parent, Item_type { ESendOptionsDialogPrivate *priv; GtkWidget *toplevel; - gchar *filename; g_return_val_if_fail (sod != NULL || E_IS_SENDOPTIONS_DIALOG (sod), FALSE); priv = sod->priv; - filename = g_build_filename (EVOLUTION_GLADEDIR, - "e-send-options.glade", - NULL); - priv->xml = glade_xml_new (filename, NULL, NULL); - g_free (filename); + /* Make sure our custom widget classes are registered with + * GType before we load the GtkBuilder definition file. */ + E_TYPE_DATE_EDIT; - if (!priv->xml) { - g_message ( G_STRLOC ": Could not load the Glade XML file "); - return FALSE; - } + priv->builder = gtk_builder_new (); + e_load_ui_builder_definition (priv->builder, "e-send-options.ui"); if (!get_widgets(sod)) { - g_object_unref (priv->xml); + g_object_unref (priv->builder); g_message (G_STRLOC ": Could not get the Widgets \n"); return FALSE; } @@ -745,7 +721,7 @@ e_sendoptions_dialog_init (GObject *object) sod->data->gopts->security = 0; priv->gopts_needed = TRUE; - priv->xml = NULL; + priv->builder = NULL; priv->main = NULL; priv->notebook = NULL; diff --git a/widgets/misc/e-send-options.glade b/widgets/misc/e-send-options.glade deleted file mode 100644 index 58ee7f32c4..0000000000 --- a/widgets/misc/e-send-options.glade +++ /dev/null @@ -1,822 +0,0 @@ - - - - - - True - True - Send Options - False - True - mouse - dialog - False - - - True - True - - - True - True - - - True - 12 - 4 - 4 - 12 - 12 - - - True - 0 - - - 2 - 4 - 1 - 2 - - - - - - True - 0 - none - - - True - 12 - 2 - 3 - 12 - 12 - - - R_eply requested - True - True - False - True - True - - - 3 - GTK_FILL - - - - - - True - 0 - 12 - - - True - 2 - 3 - 12 - 12 - - - Wi_thin - True - True - False - True - True - - - 1 - 2 - GTK_FILL - - - - - - True - True - 5 0 100 1 10 0 - 1 - - - 1 - 2 - 1 - 2 - - - - - - True - 0 - days - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - _When convenient - True - True - False - True - True - reply-within - - - 3 - GTK_FILL - - - - - - - - 3 - 1 - 2 - - - - - - - - - True - <b>Replies</b> - True - - - label_item - - - - - 4 - 2 - 3 - GTK_FILL - - - - - - True - 0 - none - - - True - 12 - 4 - 2 - - - _Delay message delivery - True - True - False - True - True - - - GTK_FILL - - - - - - True - 0 - - - 1 - 2 - - - - - - True - 12 - - - True - 12 - 12 - - - True - 0 - _After: - True - expire-after - - - False - False - 0 - - - - - True - True - 2 0 100 1 10 0 - 1 - - - False - False - 1 - - - - - True - 0 - days - - - False - False - 2 - - - - - - - 2 - 3 - 4 - GTK_EXPAND - - - - - _Set expiration date - True - True - False - True - True - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - - True - 12 - - - True - True - 12 - 12 - - - True - 0 - _Until: - True - until-date - - - False - False - 0 - - - - - True - send_options_make_dateedit - - - False - False - 1 - - - - - - - 2 - 1 - 2 - - - - - - - - True - <b>Delivery Options</b> - True - - - label_item - - - - - 4 - 3 - 4 - GTK_FILL - - - - - - True - Undefined -High -Standard -Low - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - 1 - _Priority: - True - combo-priority - - - 1 - 2 - - - - - - True - 1 - _Classification: - True - security-combo - - - GTK_FILL - - - - - - True - Normal -Proprietary -Confidential -Secret -Top Secret -For Your Eyes Only - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - - - - - - - - - True - Gene_ral Options - True - - - False - tab - - - - - True - 12 - 12 - - - True - 0 - none - - - True - 12 - - - True - 12 - 12 - - - Creat_e a sent item to track information - True - True - False - True - True - - - False - False - 0 - - - - - True - 19 - - - _Delivered - True - True - False - True - True - - - - - False - False - 1 - - - - - True - 19 - - - Deli_vered and opened - True - True - False - True - True - delivered - - - - - False - False - 2 - - - - - True - 19 - - - _All information - True - True - False - True - True - delivered - - - - - False - False - 3 - - - - - True - 19 - - - A_uto-delete sent item - True - True - False - True - True - - - - - False - False - 4 - - - - - - - - - True - <b>Status Tracking</b> - True - True - - - label_item - - - - - False - False - 0 - - - - - True - 0 - none - - - True - 12 - - - True - 12 - 4 - 2 - 12 - 12 - - - True - 1 - _When opened: - True - open-combo - - - GTK_FILL - - - - - - True - 1 - When decli_ned: - True - delete-combo - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - When co_mpleted: - True - complete-combo - - - 3 - 4 - GTK_FILL - - - - - - True - 1 - When acce_pted: - True - accept-combo - - - 2 - 3 - GTK_FILL - - - - - - True - None -Mail Receipt - - - 1 - 2 - GTK_FILL - - - - - True - None -Mail Receipt - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - None -Mail Receipt - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - True - None -Mail Receipt - - - 1 - 2 - 3 - 4 - - - - - - - - - True - <b>Return Notification</b> - True - True - - - label_item - - - - - False - False - 1 - - - - - 1 - - - - - True - Sta_tus Tracking - True - - - 1 - False - tab - - - - - 2 - - - - - True - end - - - gtk-help - -11 - True - True - True - False - True - - - False - False - 0 - - - - - gtk-cancel - -6 - True - True - True - False - True - - - False - False - 1 - - - - - gtk-ok - -5 - True - True - True - False - True - - - False - False - 2 - - - - - False - end - 0 - - - - - - diff --git a/widgets/misc/e-send-options.ui b/widgets/misc/e-send-options.ui new file mode 100644 index 0000000000..e43eb52eef --- /dev/null +++ b/widgets/misc/e-send-options.ui @@ -0,0 +1,942 @@ + + + + 100 + 0 + 10 + 1 + 0 + 5 + + + 100 + 0 + 10 + 1 + 0 + 2 + + + + + + + + Undefined + + + High + + + Standard + + + Low + + + + + + + + + + Normal + + + Proprietary + + + Confidential + + + Secret + + + Top Secret + + + For Your Eyes Only + + + + + + + + + + None + + + Mail Receipt + + + + + + + + + + None + + + Mail Receipt + + + + + + + + + + None + + + Mail Receipt + + + + + + + + + + None + + + Mail Receipt + + + + + + + True + True + Send Options + False + True + mouse + dialog + False + + + True + True + + + True + True + + + True + 12 + 4 + 4 + 12 + 12 + + + True + 0 + + + 2 + 4 + 1 + 2 + + + + + + True + 0 + none + + + True + 12 + 2 + 3 + 12 + 12 + + + R_eply requested + True + True + False + True + True + + + 3 + GTK_FILL + + + + + + True + 0 + 12 + + + True + 2 + 3 + 12 + 12 + + + Wi_thin + True + True + False + True + True + + + 1 + 2 + GTK_FILL + + + + + + True + True + adjustment1 + 1 + + + 1 + 2 + 1 + 2 + + + + + + True + 0 + days + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + _When convenient + True + True + False + True + True + reply-within + + + 3 + GTK_FILL + + + + + + + + 3 + 1 + 2 + + + + + + + + + True + <b>Replies</b> + True + + + + + 4 + 2 + 3 + GTK_FILL + + + + + + True + 0 + none + + + True + 12 + 4 + 2 + + + _Delay message delivery + True + True + False + True + True + + + GTK_FILL + + + + + + True + 0 + + + 1 + 2 + + + + + + True + 12 + + + True + 12 + 12 + + + True + 0 + _After: + True + expire-after + + + False + False + 0 + + + + + True + True + adjustment2 + 1 + + + False + False + 1 + + + + + True + 0 + days + + + False + False + 2 + + + + + + + 2 + 3 + 4 + GTK_EXPAND + + + + + _Set expiration date + True + True + False + True + True + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + + True + 12 + + + True + True + 12 + 12 + + + True + 0 + _Until: + True + until-date + + + False + False + 0 + + + + + True + + + False + False + 1 + + + + + + + 2 + 1 + 2 + + + + + + + + True + <b>Delivery Options</b> + True + + + + + 4 + 3 + 4 + GTK_FILL + + + + + + True + model1 + + + + 0 + + + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + 1 + _Priority: + True + combo-priority + + + 1 + 2 + + + + + + True + 1 + _Classification: + True + security-combo + + + GTK_FILL + + + + + + True + model2 + + + + 0 + + + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + + + + + + + + + True + Gene_ral Options + True + + + False + + + + + True + 12 + 12 + + + True + 0 + none + + + True + 12 + + + True + 12 + 12 + + + Creat_e a sent item to track information + True + True + False + True + True + + + False + False + 0 + + + + + True + 19 + + + _Delivered + True + True + False + True + True + + + + + False + False + 1 + + + + + True + 19 + + + Deli_vered and opened + True + True + False + True + True + delivered + + + + + False + False + 2 + + + + + True + 19 + + + _All information + True + True + False + True + True + delivered + + + + + False + False + 3 + + + + + True + 19 + + + A_uto-delete sent item + True + True + False + True + True + + + + + False + False + 4 + + + + + + + + + True + <b>Status Tracking</b> + True + True + + + + + False + False + 0 + + + + + True + 0 + none + + + True + 12 + + + True + 12 + 4 + 2 + 12 + 12 + + + True + 1 + _When opened: + True + open-combo + + + GTK_FILL + + + + + + True + 1 + When decli_ned: + True + delete-combo + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + When co_mpleted: + True + complete-combo + + + 3 + 4 + GTK_FILL + + + + + + True + 1 + When acce_pted: + True + accept-combo + + + 2 + 3 + GTK_FILL + + + + + + True + model3 + + + + 0 + + + + + 1 + 2 + GTK_FILL + + + + + True + model4 + + + + 0 + + + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + model5 + + + + 0 + + + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + True + model6 + + + + 0 + + + + + 1 + 2 + 3 + 4 + + + + + + + + + True + <b>Return Notification</b> + True + True + + + + + False + False + 1 + + + + + + + True + Sta_tus Tracking + True + + + 1 + False + + + + + 2 + + + + + True + end + + + gtk-help + True + True + True + False + True + + + False + False + 0 + + + + + gtk-cancel + True + True + True + False + True + + + False + False + 1 + + + + + gtk-ok + True + True + True + False + True + + + False + False + 2 + + + + + False + end + 0 + + + + + + helpbutton1 + cancelbutton1 + okbutton1 + + + diff --git a/widgets/table/Makefile.am b/widgets/table/Makefile.am index 56fc72d16a..8df9b4b122 100644 --- a/widgets/table/Makefile.am +++ b/widgets/table/Makefile.am @@ -1,6 +1,5 @@ -glade_DATA = \ - e-table-config.glade \ - e-table-field-chooser.glade +ui_DATA = \ + e-table-config.ui privsolib_LTLIBRARIES = libetable.la @@ -11,7 +10,7 @@ libetable_la_CPPFLAGS = \ $(E_UTIL_CFLAGS) \ $(E_WIDGETS_CFLAGS) \ $(GNOME_PLATFORM_CFLAGS) \ - -DEVOLUTION_GLADEDIR=\"$(gladedir)\" \ + -DEVOLUTION_UIDIR=\"$(uidir)\" \ -DG_LOG_DOMAIN=\"e-table\" libetable_la_SOURCES = \ @@ -196,6 +195,6 @@ icons = \ EXTRA_DIST = \ $(icons) \ - $(glade_DATA) + $(ui_DATA) -include $(top_srcdir)/git.mk diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index 375e2cf99f..226b04cdb3 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -33,7 +33,6 @@ #include #include -#include #include #include "e-util/e-util-private.h" @@ -153,8 +152,6 @@ e_table_config_class_init (ETableConfigClass *klass) /*_( */"XXX blurb" /*)*/, E_TABLE_STATE_TYPE, G_PARAM_READABLE)); - - glade_init (); } static void @@ -597,14 +594,13 @@ static ETableMemoryStoreColumnInfo store_columns[] = { E_TABLE_MEMORY_STORE_TERMINATOR }; -static ETableModel *global_store; /* Glade better not be reentrant any time soon. */ - -static void -create_global_store (ETableConfig *config) +static ETableModel * +create_store (ETableConfig *config) { gint i; + ETableModel *store; - global_store = e_table_memory_store_new (store_columns); + store = e_table_memory_store_new (store_columns); for (i = 0; config->source_spec->columns[i]; i++) { gchar *text; @@ -613,8 +609,10 @@ create_global_store (ETableConfig *config) continue; text = g_strdup (dgettext (config->domain, config->source_spec->columns[i]->title)); - e_table_memory_store_insert_adopt (E_TABLE_MEMORY_STORE (global_store), -1, NULL, text, i); + e_table_memory_store_insert_adopt (E_TABLE_MEMORY_STORE (store), -1, NULL, text, i); } + + return store; } static const gchar *spec = @@ -626,16 +624,14 @@ static const gchar *spec = "" ""; -GtkWidget *e_table_proxy_etable_shown_new (void); - -GtkWidget * -e_table_proxy_etable_shown_new (void) +static GtkWidget * +e_table_proxy_etable_shown_new (ETableModel *store) { ETableModel *model = NULL; GtkWidget *widget; ETableScrolled *ets; - model = e_table_subset_variable_new (global_store); + model = e_table_subset_variable_new (store); widget = e_table_scrolled_new (model, NULL, spec, NULL); ets = E_TABLE_SCROLLED (widget); @@ -644,16 +640,14 @@ e_table_proxy_etable_shown_new (void) return widget; } -GtkWidget *e_table_proxy_etable_available_new (void); - -GtkWidget * -e_table_proxy_etable_available_new (void) +static GtkWidget * +e_table_proxy_etable_available_new (ETableModel *store) { ETableModel *model; GtkWidget *widget; ETableScrolled *ets; - model = e_table_without_new (global_store, + model = e_table_without_new (store, NULL, NULL, NULL, NULL, NULL, NULL, NULL); e_table_without_show_all (E_TABLE_WITHOUT (model)); @@ -705,10 +699,9 @@ dialog_response (GtkWidget *dialog, gint response_id, ETableConfig *config) } /* - * Invoked by the Glade auto-connect code + * Invoked by the GtkBuilder auto-connect code */ -GtkWidget *e_table_proxy_gtk_combo_text_new (void); -GtkWidget * +static GtkWidget * e_table_proxy_gtk_combo_text_new (void) { GtkCellRenderer *renderer; @@ -737,22 +730,10 @@ e_table_proxy_gtk_combo_text_new (void) return combo_box; } -#if 0 -static GtkWidget * -configure_dialog (GladeXML *gui, const gchar *widget_name, ETableConfig *config) -{ - GtkWidget *w; - - w = glade_xml_get_widget (gui, widget_name); - - return w; -} -#endif - static void -connect_button (ETableConfig *config, GladeXML *gui, const gchar *widget_name, GCallback cback) +connect_button (ETableConfig *config, GtkBuilder *builder, const gchar *widget_name, GCallback cback) { - GtkWidget *button = glade_xml_get_widget (gui, widget_name); + GtkWidget *button = e_builder_get_widget (builder, widget_name); if (button) { g_signal_connect (G_OBJECT (button), "clicked", @@ -822,35 +803,37 @@ sort_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *sort) } static void -configure_sort_dialog (ETableConfig *config, GladeXML *gui) +configure_sort_dialog (ETableConfig *config, GtkBuilder *builder) { GSList *l; gint i; + const gchar *algs[] = {"alignment4", "alignment3", "alignment2", "alignment1", NULL}; for (i = 0; i < 4; i++) { gchar buffer [80]; snprintf (buffer, sizeof (buffer), "sort-combo-%d", i + 1); - config->sort [i].combo = glade_xml_get_widget (gui, buffer); + config->sort [i].combo = e_table_proxy_gtk_combo_text_new (); gtk_widget_show (GTK_WIDGET (config->sort [i].combo)); + gtk_container_add (GTK_CONTAINER (e_builder_get_widget (builder, algs [i])), config->sort [i].combo); configure_combo_box_add ( GTK_COMBO_BOX (config->sort[i].combo), "", ""); snprintf (buffer, sizeof (buffer), "frame-sort-%d", i + 1); config->sort [i].frames = - glade_xml_get_widget (gui, buffer); + e_builder_get_widget (builder, buffer); snprintf ( buffer, sizeof (buffer), "radiobutton-ascending-sort-%d", i+1); - config->sort [i].radio_ascending = glade_xml_get_widget ( - gui, buffer); + config->sort [i].radio_ascending = e_builder_get_widget ( + builder, buffer); snprintf ( buffer, sizeof (buffer), "radiobutton-descending-sort-%d", i+1); - config->sort [i].radio_descending = glade_xml_get_widget ( - gui, buffer); + config->sort [i].radio_descending = e_builder_get_widget ( + builder, buffer); config->sort [i].e_table_config = config; } @@ -932,42 +915,44 @@ group_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *group) } static void -configure_group_dialog (ETableConfig *config, GladeXML *gui) +configure_group_dialog (ETableConfig *config, GtkBuilder *builder) { GSList *l; gint i; + const gchar *vboxes[] = {"vbox7", "vbox9", "vbox11", "vbox13", NULL}; for (i = 0; i < 4; i++) { gchar buffer [80]; snprintf (buffer, sizeof (buffer), "group-combo-%d", i + 1); - config->group [i].combo = glade_xml_get_widget (gui, buffer); + config->group [i].combo = e_table_proxy_gtk_combo_text_new (); gtk_widget_show (GTK_WIDGET (config->group [i].combo)); + gtk_box_pack_start (GTK_BOX (e_builder_get_widget (builder, vboxes [i])), config->group [i].combo, FALSE, FALSE, 0); configure_combo_box_add ( GTK_COMBO_BOX (config->group[i].combo), "", ""); snprintf (buffer, sizeof (buffer), "frame-group-%d", i + 1); config->group [i].frames = - glade_xml_get_widget (gui, buffer); + e_builder_get_widget (builder, buffer); snprintf ( buffer, sizeof (buffer), "radiobutton-ascending-group-%d", i+1); - config->group [i].radio_ascending = glade_xml_get_widget ( - gui, buffer); + config->group [i].radio_ascending = e_builder_get_widget ( + builder, buffer); snprintf ( buffer, sizeof (buffer), "radiobutton-descending-group-%d", i+1); - config->group [i].radio_descending = glade_xml_get_widget ( - gui, buffer); + config->group [i].radio_descending = e_builder_get_widget ( + builder, buffer); snprintf ( buffer, sizeof (buffer), "checkbutton-group-%d", i+1); - config->group [i].view_check = glade_xml_get_widget ( - gui, buffer); + config->group [i].view_check = e_builder_get_widget ( + builder, buffer); config->group [i].e_table_config = config; } @@ -1165,82 +1150,85 @@ config_button_down (GtkWidget *widget, ETableConfig *config) } static void -configure_fields_dialog (ETableConfig *config, GladeXML *gui) +configure_fields_dialog (ETableConfig *config, GtkBuilder *builder) { GtkWidget *scrolled; + ETableModel *store = create_store (config); - scrolled = glade_xml_get_widget (gui, "custom-available"); + /* "custom-available" widget */ + scrolled = e_table_proxy_etable_available_new (store); + gtk_widget_show (scrolled); + gtk_box_pack_start (GTK_BOX (e_builder_get_widget (builder, "vbox4")), scrolled, TRUE, TRUE, 0); config->available = e_table_scrolled_get_table (E_TABLE_SCROLLED (scrolled)); g_object_get (config->available, "model", &config->available_model, NULL); gtk_widget_show_all (scrolled); + gtk_label_set_mnemonic_widget (GTK_LABEL (e_builder_get_widget (builder, "label-available")), scrolled); - scrolled = glade_xml_get_widget (gui, "custom-shown"); + /* "custom-shown" widget */ + scrolled = e_table_proxy_etable_shown_new (store); + gtk_widget_show (scrolled); + gtk_box_pack_start (GTK_BOX (e_builder_get_widget (builder, "vbox5")), scrolled, TRUE, TRUE, 0); config->shown = e_table_scrolled_get_table (E_TABLE_SCROLLED (scrolled)); g_object_get (config->shown, "model", &config->shown_model, NULL); gtk_widget_show_all (scrolled); + gtk_label_set_mnemonic_widget (GTK_LABEL (e_builder_get_widget (builder, "label-displayed")), scrolled); - connect_button (config, gui, "button-add", G_CALLBACK (config_button_add)); - connect_button (config, gui, "button-remove", G_CALLBACK (config_button_remove)); - connect_button (config, gui, "button-up", G_CALLBACK (config_button_up)); - connect_button (config, gui, "button-down", G_CALLBACK (config_button_down)); + connect_button (config, builder, "button-add", G_CALLBACK (config_button_add)); + connect_button (config, builder, "button-remove", G_CALLBACK (config_button_remove)); + connect_button (config, builder, "button-up", G_CALLBACK (config_button_up)); + connect_button (config, builder, "button-down", G_CALLBACK (config_button_down)); setup_fields (config); + + g_object_unref (store); } static void setup_gui (ETableConfig *config) { - GladeXML *gui; + GtkBuilder *builder; gboolean can_group; - gchar *filename; - - create_global_store (config); can_group = e_table_sort_info_get_can_group (config->state->sort_info); - filename = g_build_filename (EVOLUTION_GLADEDIR, - "e-table-config.glade", - NULL); - gui = glade_xml_new (filename, NULL, GETTEXT_PACKAGE); - g_free (filename); - - g_object_unref (global_store); + builder = gtk_builder_new (); + e_load_ui_builder_definition (builder, "e-table-config.ui"); - config->dialog_toplevel = glade_xml_get_widget ( - gui, "e-table-config"); + config->dialog_toplevel = e_builder_get_widget ( + builder, "e-table-config"); if (config->header) gtk_window_set_title (GTK_WINDOW (config->dialog_toplevel), config->header); - config->dialog_show_fields = glade_xml_get_widget ( - gui, "dialog-show-fields"); - config->dialog_group_by = glade_xml_get_widget ( - gui, "dialog-group-by"); - config->dialog_sort = glade_xml_get_widget ( - gui, "dialog-sort"); + config->dialog_show_fields = e_builder_get_widget ( + builder, "dialog-show-fields"); + config->dialog_group_by = e_builder_get_widget ( + builder, "dialog-group-by"); + config->dialog_sort = e_builder_get_widget ( + builder, "dialog-sort"); - config->sort_label = glade_xml_get_widget ( - gui, "label-sort"); - config->group_label = glade_xml_get_widget ( - gui, "label-group"); - config->fields_label = glade_xml_get_widget ( - gui, "label-fields"); + config->sort_label = e_builder_get_widget ( + builder, "label-sort"); + config->group_label = e_builder_get_widget ( + builder, "label-group"); + config->fields_label = e_builder_get_widget ( + builder, "label-fields"); - connect_button (config, gui, "button-sort", G_CALLBACK (config_button_sort)); - connect_button (config, gui, "button-group", G_CALLBACK (config_button_group)); - connect_button (config, gui, "button-fields", G_CALLBACK (config_button_fields)); + connect_button (config, builder, "button-sort", G_CALLBACK (config_button_sort)); + connect_button (config, builder, "button-group", G_CALLBACK (config_button_group)); + connect_button (config, builder, "button-fields", G_CALLBACK (config_button_fields)); if (!can_group) { GtkWidget *w; - w = glade_xml_get_widget (gui, "button-group"); + w = e_builder_get_widget (builder, "button-group"); if (w) gtk_widget_hide (w); - w = glade_xml_get_widget (gui, "label3"); + w = e_builder_get_widget (builder, "label3"); if (w) gtk_widget_hide (w); @@ -1249,9 +1237,9 @@ setup_gui (ETableConfig *config) gtk_widget_hide (w); } - configure_sort_dialog (config, gui); - configure_group_dialog (config, gui); - configure_fields_dialog (config, gui); + configure_sort_dialog (config, builder); + configure_group_dialog (config, builder); + configure_fields_dialog (config, builder); g_object_weak_ref (G_OBJECT (config->dialog_toplevel), dialog_destroyed, config); @@ -1259,7 +1247,7 @@ setup_gui (ETableConfig *config) g_signal_connect (config->dialog_toplevel, "response", G_CALLBACK (dialog_response), config); - g_object_unref (gui); + g_object_unref (builder); } static void diff --git a/widgets/table/e-table-config.glade b/widgets/table/e-table-config.glade deleted file mode 100644 index 9fa6519cce..0000000000 --- a/widgets/table/e-table-config.glade +++ /dev/null @@ -1,2432 +0,0 @@ - - - - - - - - Show Fields - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - False - 6 - - - - True - 1 - 5 - True - 6 - 6 - - - - True - A_vailable Fields: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - custom-available - - - 0 - 2 - 0 - 1 - fill - - - - - - True - _Show these fields in order: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - custom-shown - - - 3 - 5 - 0 - 1 - fill - - - - - 0 - False - True - - - - - - True - 1 - 5 - True - 6 - 6 - - - - True - False - 6 - - - - True - e_table_proxy_etable_available_new - 0 - 0 - Thu, 21 Feb 2002 16:09:53 GMT - - - 0 - True - True - - - - - 0 - 2 - 0 - 1 - - - - - - True - False - 6 - - - - True - e_table_proxy_etable_shown_new - 0 - 0 - Thu, 21 Feb 2002 16:09:58 GMT - - - 0 - True - True - - - - - - True - True - 6 - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-go-up - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Move _Up - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 0 - False - True - - - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-go-down - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Move _Down - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 0 - False - True - - - - - 0 - False - True - - - - - 3 - 5 - 0 - 1 - - - - - - True - False - 6 - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.7 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - _Add - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - gtk-go-forward - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - - 0 - False - False - - - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-go-back - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Remove - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - - - - - 2 - 3 - 0 - 1 - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - - Group - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - Clear _All - True - GTK_RELIEF_NORMAL - True - 0 - - - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - False - 0 - - - - True - False - 6 - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - False - 6 - - - - True - False - 0 - - - - True - e_table_proxy_gtk_combo_text_new - 0 - 0 - Fri, 19 Jan 2001 04:52:09 GMT - - - 0 - False - False - - - - - - True - True - _Show field in View - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - True - Ascending - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Descending - True - GTK_RELIEF_NORMAL - True - False - False - True - radiobutton-ascending-group-1 - - - 0 - False - False - - - - - 0 - False - True - - - - - - - - True - Group Items By - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - False - 6 - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - False - 6 - - - - True - False - 0 - - - - True - e_table_proxy_gtk_combo_text_new - 0 - 0 - Fri, 19 Jan 2001 04:52:14 GMT - - - 0 - False - False - - - - - - True - True - Show _field in View - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - True - Ascending - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Descending - True - GTK_RELIEF_NORMAL - True - False - False - True - radiobutton-ascending-group-2 - - - 0 - False - False - - - - - 0 - False - True - - - - - - - - True - Then By - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - False - 6 - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - False - 6 - - - - True - False - 0 - - - - True - e_table_proxy_gtk_combo_text_new - 0 - 0 - Fri, 19 Jan 2001 04:52:18 GMT - - - 0 - False - False - - - - - - True - True - Show field i_n View - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - True - Ascending - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Descending - True - GTK_RELIEF_NORMAL - True - False - False - True - radiobutton-ascending-group-3 - - - 0 - False - False - - - - - 0 - False - True - - - - - - - - True - Then By - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - False - 6 - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - False - 6 - - - - True - False - 0 - - - - True - e_table_proxy_gtk_combo_text_new - 0 - 0 - Fri, 19 Jan 2001 04:52:21 GMT - - - 0 - False - False - - - - - - True - True - Show field in _View - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - True - Ascending - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Descending - True - GTK_RELIEF_NORMAL - True - False - False - True - radiobutton-ascending-group-4 - - - 0 - False - False - - - - - 0 - False - True - - - - - - - - True - Then By - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - True - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - - Sort - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - Clear All - True - GTK_RELIEF_NORMAL - True - 0 - - - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - 4 - 1 - False - 6 - 6 - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - False - 6 - - - - True - 0.5 - 0.5 - 1 - 0 - 0 - 0 - 0 - 0 - - - - True - e_table_proxy_gtk_combo_text_new - 0 - 0 - Tue, 16 Jan 2001 08:33:52 GMT - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - True - Ascending - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Descending - True - GTK_RELIEF_NORMAL - True - False - False - True - radiobutton-ascending-sort-4 - - - 0 - False - False - - - - - 0 - False - True - - - - - - - - True - Then By - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - 1 - 3 - 4 - fill - - - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - False - 6 - - - - True - 0.5 - 0.5 - 1 - 0 - 0 - 0 - 0 - 0 - - - - True - e_table_proxy_gtk_combo_text_new - 0 - 0 - Tue, 16 Jan 2001 05:22:22 GMT - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - True - Ascending - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Descending - True - GTK_RELIEF_NORMAL - True - False - False - True - radiobutton-ascending-sort-3 - - - 0 - False - False - - - - - 0 - False - True - - - - - - - - True - Then By - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - 1 - 2 - 3 - fill - - - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - False - 6 - - - - True - 0.5 - 0.5 - 1 - 0 - 0 - 0 - 0 - 0 - - - - True - e_table_proxy_gtk_combo_text_new - 0 - 0 - Tue, 16 Jan 2001 05:22:15 GMT - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - True - Ascending - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Descending - True - GTK_RELIEF_NORMAL - True - False - False - True - radiobutton-ascending-sort-2 - - - 0 - False - False - - - - - 0 - False - True - - - - - - - - True - Then By - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - 1 - 1 - 2 - fill - - - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - False - 6 - - - - True - 0.5 - 0.5 - 1 - 0 - 0 - 0 - 0 - 0 - - - - True - True - True - e_table_proxy_gtk_combo_text_new - 0 - 0 - Tue, 16 Jan 2001 05:22:00 GMT - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - True - Ascending - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Descending - True - GTK_RELIEF_NORMAL - True - False - False - True - radiobutton-ascending-sort-1 - - - 0 - False - False - - - - - 0 - False - True - - - - - - - - True - Sort Items By - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - 1 - 0 - 1 - fill - - - - - 0 - True - True - - - - - - - - dialog1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - True - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - gtk-apply - True - GTK_RELIEF_NORMAL - True - -10 - - - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 2 - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - 2 - True - 3 - 3 - False - 2 - 4 - - - - True - True - True - _Sort... - True - GTK_RELIEF_NORMAL - True - - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - True - True - _Group By... - True - GTK_RELIEF_NORMAL - True - - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - True - False - 0 - 0.5 - 0 - 0 - - - 1 - 2 - 2 - 3 - fill - - - - - - True - True - True - _Fields Shown... - True - GTK_RELIEF_NORMAL - True - - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - True - False - 0 - 0.5 - 0 - 0 - - - 1 - 2 - 0 - 1 - fill - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 2 - 3 - 1 - 2 - fill - fill - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 2 - 3 - 2 - 3 - fill - fill - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 2 - 3 - 0 - 1 - fill - fill - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - True - False - 0 - 0.5 - 0 - 0 - - - 1 - 2 - 1 - 2 - fill - - - - - - - - - True - Description - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - True - True - - - - - - - diff --git a/widgets/table/e-table-config.ui b/widgets/table/e-table-config.ui new file mode 100644 index 0000000000..5e81172a29 --- /dev/null +++ b/widgets/table/e-table-config.ui @@ -0,0 +1,2142 @@ + + + + + Show Fields + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + True + False + 8 + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + True + False + 6 + + + True + 1 + 5 + True + 6 + 6 + + + True + A_vailable Fields: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 2 + 0 + 1 + fill + + + + + True + _Show these fields in order: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 3 + 5 + 0 + 1 + fill + + + + + 0 + False + True + + + + + True + 1 + 5 + True + 6 + 6 + + + True + False + 6 + + + + 0 + 2 + 0 + 1 + + + + + True + False + 6 + + + + True + True + 6 + + + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + gtk-go-up + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + Move _Up + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + True + + + + + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + gtk-go-down + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + Move _Down + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + True + + + + + 0 + False + True + + + + + 3 + 5 + 0 + 1 + + + + + True + False + 6 + + + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.7 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + _Add + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + gtk-go-forward + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + gtk-go-back + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + _Remove + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + + 2 + 3 + 0 + 1 + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + button22 + button20 + + + + Group + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + True + False + 8 + + + True + GTK_BUTTONBOX_END + + + True + True + True + Clear _All + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + True + False + 0 + + + True + False + 6 + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + True + False + 6 + + + True + False + 0 + + + + True + True + _Show field in View + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + 0 + True + True + + + + + True + False + 0 + + + True + True + Ascending + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + True + Descending + True + GTK_RELIEF_NORMAL + True + False + False + True + radiobutton-ascending-group-1 + + + 0 + False + False + + + + + 0 + False + True + + + + + + + True + Group Items By + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + 0 + True + True + + + + + True + False + 6 + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + True + False + 6 + + + True + False + 0 + + + + True + True + Show _field in View + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + 0 + True + True + + + + + True + False + 0 + + + True + True + Ascending + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + True + Descending + True + GTK_RELIEF_NORMAL + True + False + False + True + radiobutton-ascending-group-2 + + + 0 + False + False + + + + + 0 + False + True + + + + + + + True + Then By + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + 0 + True + True + + + + + True + False + 6 + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + True + False + 6 + + + True + False + 0 + + + + True + True + Show field i_n View + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + 0 + True + True + + + + + True + False + 0 + + + True + True + Ascending + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + True + Descending + True + GTK_RELIEF_NORMAL + True + False + False + True + radiobutton-ascending-group-3 + + + 0 + False + False + + + + + 0 + False + True + + + + + + + True + Then By + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + 0 + True + True + + + + + True + False + 6 + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + True + False + 6 + + + True + False + 0 + + + + True + True + Show field in _View + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + 0 + True + True + + + + + True + False + 0 + + + True + True + Ascending + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + True + Descending + True + GTK_RELIEF_NORMAL + True + False + False + True + radiobutton-ascending-group-4 + + + 0 + False + False + + + + + 0 + False + True + + + + + + + True + Then By + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + button39 + button42 + button41 + + + + Sort + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + True + False + 8 + + + True + GTK_BUTTONBOX_END + + + True + True + True + Clear All + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + True + 4 + 1 + False + 6 + 6 + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + True + False + 6 + + + True + 0.5 + 0.5 + 1 + 0 + 0 + 0 + 0 + 0 + + + + 0 + True + True + + + + + True + False + 0 + + + True + True + Ascending + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + True + Descending + True + GTK_RELIEF_NORMAL + True + False + False + True + radiobutton-ascending-sort-4 + + + 0 + False + False + + + + + 0 + False + True + + + + + + + True + Then By + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + + + 0 + 1 + 3 + 4 + fill + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + True + False + 6 + + + True + 0.5 + 0.5 + 1 + 0 + 0 + 0 + 0 + 0 + + + + 0 + True + True + + + + + True + False + 0 + + + True + True + Ascending + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + True + Descending + True + GTK_RELIEF_NORMAL + True + False + False + True + radiobutton-ascending-sort-3 + + + 0 + False + False + + + + + 0 + False + True + + + + + + + True + Then By + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + + + 0 + 1 + 2 + 3 + fill + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + True + False + 6 + + + True + 0.5 + 0.5 + 1 + 0 + 0 + 0 + 0 + 0 + + + + 0 + True + True + + + + + True + False + 0 + + + True + True + Ascending + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + True + Descending + True + GTK_RELIEF_NORMAL + True + False + False + True + radiobutton-ascending-sort-2 + + + 0 + False + False + + + + + 0 + False + True + + + + + + + True + Then By + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + + + 0 + 1 + 1 + 2 + fill + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + True + False + 6 + + + True + 0.5 + 0.5 + 1 + 0 + 0 + 0 + 0 + 0 + + + + 0 + True + True + + + + + True + False + 0 + + + True + True + Ascending + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + True + Descending + True + GTK_RELIEF_NORMAL + True + False + False + True + radiobutton-ascending-sort-1 + + + 0 + False + False + + + + + 0 + False + True + + + + + + + True + Sort Items By + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + + + 0 + 1 + 0 + 1 + fill + + + + + 0 + True + True + + + + + + button43 + button45 + button44 + + + + dialog1 + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + True + False + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + True + False + 0 + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-apply + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + 2 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + 2 + True + 3 + 3 + False + 2 + 4 + + + True + True + True + _Sort... + True + GTK_RELIEF_NORMAL + True + + + + 0 + 1 + 2 + 3 + fill + + + + + + True + True + True + _Group By... + True + GTK_RELIEF_NORMAL + True + + + + 0 + 1 + 1 + 2 + fill + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + True + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 2 + 3 + fill + + + + + True + True + True + _Fields Shown... + True + GTK_RELIEF_NORMAL + True + + + + 0 + 1 + 0 + 1 + fill + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + True + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 2 + 3 + 1 + 2 + fill + fill + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 2 + 3 + 2 + 3 + fill + fill + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 2 + 3 + 0 + 1 + fill + fill + + + + + True + + False + False + GTK_JUSTIFY_LEFT + True + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 1 + 2 + fill + + + + + + + + True + Description + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + cancelbutton2 + applybutton2 + okbutton2 + + + diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c index 231ad0801f..8d6ddb59e3 100644 --- a/widgets/table/e-table-field-chooser.c +++ b/widgets/table/e-table-field-chooser.c @@ -29,6 +29,8 @@ #include "e-util/e-util.h" #include "e-util/e-util-private.h" +#include "misc/e-canvas.h" + #include "e-table-field-chooser.h" #include "e-table-field-chooser-item.h" @@ -53,8 +55,6 @@ e_table_field_chooser_class_init (ETableFieldChooserClass *klass) object_class = (GObjectClass*) klass; - glade_init(); - object_class->set_property = e_table_field_chooser_set_property; object_class->get_property = e_table_field_chooser_get_property; object_class->dispose = e_table_field_chooser_dispose; @@ -135,28 +135,55 @@ static void resize(GnomeCanvas *canvas, ETableFieldChooser *etfc) ensure_nonzero_step_increments (etfc); } +static GtkWidget * +create_content (GnomeCanvas **canvas) +{ + GtkWidget *vbox_top; + GtkWidget *label1; + GtkWidget *scrolledwindow1; + GtkWidget *canvas_buttons; + + g_return_val_if_fail (canvas != NULL, NULL); + + vbox_top = gtk_vbox_new (FALSE, 4); + gtk_widget_show (vbox_top); + + label1 = gtk_label_new (_("To add a column to your table, drag it into\nthe location in which you want it to appear.")); + gtk_widget_show (label1); + gtk_box_pack_start (GTK_BOX (vbox_top), label1, FALSE, FALSE, 0); + gtk_label_set_justify (GTK_LABEL (label1), GTK_JUSTIFY_CENTER); + + scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_show (scrolledwindow1); + gtk_box_pack_start (GTK_BOX (vbox_top), scrolledwindow1, TRUE, TRUE, 0); + GTK_WIDGET_UNSET_FLAGS (scrolledwindow1, GTK_CAN_FOCUS); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + + canvas_buttons = e_canvas_new (); + gtk_widget_show (canvas_buttons); + gtk_container_add (GTK_CONTAINER (scrolledwindow1), canvas_buttons); + GTK_WIDGET_UNSET_FLAGS (canvas_buttons, GTK_CAN_FOCUS); + GTK_WIDGET_UNSET_FLAGS (canvas_buttons, GTK_CAN_DEFAULT); + + *canvas = GNOME_CANVAS (canvas_buttons); + + return vbox_top; +} + static void e_table_field_chooser_init (ETableFieldChooser *etfc) { - GladeXML *gui; GtkWidget *widget; - gchar *filename = g_build_filename (EVOLUTION_GLADEDIR, - "e-table-field-chooser.glade", - NULL); - gui = glade_xml_new (filename, NULL, GETTEXT_PACKAGE); - g_free (filename); - etfc->gui = gui; - - widget = glade_xml_get_widget(gui, "vbox-top"); + + widget = create_content (&etfc->canvas); if (!widget) { return; } - gtk_widget_reparent(widget, - GTK_WIDGET(etfc)); - gtk_widget_push_colormap (gdk_rgb_get_colormap ()); + gtk_widget_set_size_request (widget, -1, 250); + gtk_box_pack_start (GTK_BOX (etfc), widget, TRUE, TRUE, 0); - etfc->canvas = GNOME_CANVAS(glade_xml_get_widget(gui, "canvas-buttons")); + gtk_widget_push_colormap (gdk_rgb_get_colormap ()); etfc->rect = gnome_canvas_item_new(gnome_canvas_root( GNOME_CANVAS( etfc->canvas ) ), gnome_canvas_rect_get_type(), @@ -208,10 +235,6 @@ e_table_field_chooser_dispose (GObject *object) g_object_unref (etfc->header); etfc->header = NULL; - if (etfc->gui) - g_object_unref (etfc->gui); - etfc->gui = NULL; - if (G_OBJECT_CLASS (e_table_field_chooser_parent_class)->dispose) (* G_OBJECT_CLASS (e_table_field_chooser_parent_class)->dispose) (object); } diff --git a/widgets/table/e-table-field-chooser.glade b/widgets/table/e-table-field-chooser.glade deleted file mode 100644 index 4b6345b853..0000000000 --- a/widgets/table/e-table-field-chooser.glade +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - no - Field Chooser - GTK_WINDOW_TOPLEVEL - no - no - yes - GTK_WIN_POS_CENTER_ON_PARENT - - - - no - 8 - yes - - - - GTK_BUTTONBOX_END - 8 - yes - - - - yes - yes - yes - gtk-close - yes - yes - - - - - 0 - no - yes - GTK_PACK_END - - - - - - no - 4 - yes - - - - To add a column to your table, drag it into -the location in which you want it to appear. - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - 200 - 200 - yes - - - - e_canvas_new - 0 - 0 - Thu, 08 Jun 2000 07:27:33 GMT - yes - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - 4 - yes - yes - - - - diff --git a/widgets/table/e-table-field-chooser.h b/widgets/table/e-table-field-chooser.h index 996ae9f9b6..9d890decba 100644 --- a/widgets/table/e-table-field-chooser.h +++ b/widgets/table/e-table-field-chooser.h @@ -24,7 +24,6 @@ #ifndef __E_TABLE_FIELD_CHOOSER_H__ #define __E_TABLE_FIELD_CHOOSER_H__ -#include #include #include @@ -52,7 +51,6 @@ struct _ETableFieldChooser GtkVBox parent; /* item specific fields */ - GladeXML *gui; GnomeCanvas *canvas; GnomeCanvasItem *item; -- cgit v1.2.3