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 --- calendar/gui/Makefile.am | 12 +- calendar/gui/alarm-notify/Makefile.am | 8 +- calendar/gui/alarm-notify/alarm-notify-dialog.c | 51 +- calendar/gui/alarm-notify/alarm-notify.glade | 703 ----------- calendar/gui/alarm-notify/alarm-notify.ui | 678 ++++++++++ calendar/gui/alarm-notify/notify-main.c | 3 - calendar/gui/dialogs/Makefile.am | 27 +- calendar/gui/dialogs/alarm-dialog.c | 79 +- calendar/gui/dialogs/alarm-dialog.glade | 1098 ----------------- calendar/gui/dialogs/alarm-dialog.ui | 1122 +++++++++++++++++ calendar/gui/dialogs/alarm-list-dialog.c | 42 +- calendar/gui/dialogs/alarm-list-dialog.glade | 235 ---- calendar/gui/dialogs/alarm-list-dialog.ui | 218 ++++ calendar/gui/dialogs/cal-prefs-dialog.c | 121 +- calendar/gui/dialogs/cal-prefs-dialog.glade | 1352 -------------------- calendar/gui/dialogs/cal-prefs-dialog.h | 3 +- calendar/gui/dialogs/cal-prefs-dialog.ui | 1493 +++++++++++++++++++++++ calendar/gui/dialogs/comp-editor-util.c | 21 +- calendar/gui/dialogs/comp-editor-util.h | 2 + calendar/gui/dialogs/e-delegate-dialog.c | 28 +- calendar/gui/dialogs/e-delegate-dialog.glade | 113 -- calendar/gui/dialogs/e-delegate-dialog.ui | 104 ++ calendar/gui/dialogs/event-editor.c | 1 - calendar/gui/dialogs/event-page.c | 100 +- calendar/gui/dialogs/event-page.glade | 1181 ------------------ calendar/gui/dialogs/event-page.ui | 1164 ++++++++++++++++++ calendar/gui/dialogs/memo-editor.c | 1 - calendar/gui/dialogs/memo-page.c | 82 +- calendar/gui/dialogs/memo-page.glade | 487 -------- calendar/gui/dialogs/memo-page.ui | 460 +++++++ calendar/gui/dialogs/recurrence-page.c | 36 +- calendar/gui/dialogs/recurrence-page.glade | 615 ---------- calendar/gui/dialogs/recurrence-page.ui | 622 ++++++++++ calendar/gui/dialogs/schedule-page.c | 28 +- calendar/gui/dialogs/schedule-page.glade | 24 - calendar/gui/dialogs/schedule-page.ui | 20 + calendar/gui/dialogs/task-details-page.c | 54 +- calendar/gui/dialogs/task-details-page.glade | 431 ------- calendar/gui/dialogs/task-details-page.ui | 456 +++++++ calendar/gui/dialogs/task-editor.c | 1 - calendar/gui/dialogs/task-page.c | 129 +- calendar/gui/dialogs/task-page.glade | 739 ----------- calendar/gui/dialogs/task-page.ui | 687 +++++++++++ calendar/gui/e-itip-control.glade | 493 -------- calendar/gui/e-itip-control.ui | 464 +++++++ calendar/gui/goto-dialog.glade | 144 --- calendar/gui/goto-dialog.ui | 180 +++ calendar/gui/goto.c | 25 +- calendar/gui/goto.h | 2 +- 49 files changed, 7955 insertions(+), 8184 deletions(-) delete mode 100644 calendar/gui/alarm-notify/alarm-notify.glade create mode 100644 calendar/gui/alarm-notify/alarm-notify.ui delete mode 100644 calendar/gui/dialogs/alarm-dialog.glade create mode 100644 calendar/gui/dialogs/alarm-dialog.ui delete mode 100644 calendar/gui/dialogs/alarm-list-dialog.glade create mode 100644 calendar/gui/dialogs/alarm-list-dialog.ui delete mode 100644 calendar/gui/dialogs/cal-prefs-dialog.glade create mode 100644 calendar/gui/dialogs/cal-prefs-dialog.ui delete mode 100644 calendar/gui/dialogs/e-delegate-dialog.glade create mode 100644 calendar/gui/dialogs/e-delegate-dialog.ui delete mode 100644 calendar/gui/dialogs/event-page.glade create mode 100644 calendar/gui/dialogs/event-page.ui delete mode 100644 calendar/gui/dialogs/memo-page.glade create mode 100644 calendar/gui/dialogs/memo-page.ui delete mode 100644 calendar/gui/dialogs/recurrence-page.glade create mode 100644 calendar/gui/dialogs/recurrence-page.ui delete mode 100644 calendar/gui/dialogs/schedule-page.glade create mode 100644 calendar/gui/dialogs/schedule-page.ui delete mode 100644 calendar/gui/dialogs/task-details-page.glade create mode 100644 calendar/gui/dialogs/task-details-page.ui delete mode 100644 calendar/gui/dialogs/task-page.glade create mode 100644 calendar/gui/dialogs/task-page.ui delete mode 100644 calendar/gui/e-itip-control.glade create mode 100644 calendar/gui/e-itip-control.ui delete mode 100644 calendar/gui/goto-dialog.glade create mode 100644 calendar/gui/goto-dialog.ui (limited to 'calendar/gui') diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am index dd1357c6c5..ea14f63278 100644 --- a/calendar/gui/Makefile.am +++ b/calendar/gui/Makefile.am @@ -62,19 +62,19 @@ libevolution_calendar_la_CPPFLAGS = \ -I$(top_srcdir)/widgets \ -I$(top_srcdir)/widgets/misc \ -DSEARCH_RULE_DIR=\"$(ruledir)\" \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ + -DEVOLUTION_UIDIR=\""$(uidir)"\" \ -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \ -DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\" \ -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ - -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \ + -DEVOLUTION_UIDIR=\""$(uidir)"\" \ -DPREFIX=\""$(prefix)"\" \ $(GNOME_PLATFORM_CFLAGS) \ $(LIBSOUP_CFLAGS) \ $(EVOLUTION_CALENDAR_CFLAGS) -glade_DATA = \ - e-itip-control.glade \ - goto-dialog.glade +ui_DATA = \ + e-itip-control.ui \ + goto-dialog.ui etspec_DATA = \ e-calendar-table.etspec \ @@ -242,7 +242,7 @@ schema_DATA = $(schema_in_files:.schemas.in=.schemas) @INTLTOOL_SCHEMAS_RULE@ EXTRA_DIST = \ - $(glade_DATA) \ + $(ui_DATA) \ $(schema_in_files) \ $(etspec_DATA) \ $(search_files) diff --git a/calendar/gui/alarm-notify/Makefile.am b/calendar/gui/alarm-notify/Makefile.am index cd5033199a..e861267d1e 100644 --- a/calendar/gui/alarm-notify/Makefile.am +++ b/calendar/gui/alarm-notify/Makefile.am @@ -6,14 +6,14 @@ evolution_alarm_notify_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/widgets \ -I$(top_srcdir)/calendar \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ + -DEVOLUTION_UIDIR=\""$(uidir)"\" \ -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ -DEVOLUTION_LIBEXECDIR=\""$(privlibexecdir)"\" \ $(EVOLUTION_CALENDAR_CFLAGS) \ $(CANBERRA_CFLAGS) -glade_DATA = \ - alarm-notify.glade +ui_DATA = \ + alarm-notify.ui evolution_alarm_notify_SOURCES = \ alarm.c \ @@ -42,6 +42,6 @@ if OS_WIN32 evolution_alarm_notify_LDFLAGS = -mwindows endif -EXTRA_DIST = $(glade_DATA) +EXTRA_DIST = $(ui_DATA) -include $(top_srcdir)/git.mk diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c index 4efc863b1a..90d56d35d7 100644 --- a/calendar/gui/alarm-notify/alarm-notify-dialog.c +++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c @@ -26,12 +26,13 @@ #include #include #include -#include #include #include #include "alarm-notify-dialog.h" #include "config-data.h" #include "util.h" + +#include "e-util/e-util.h" #include "e-util/e-util-private.h" #include "misc/e-buffer-tagger.h" @@ -57,7 +58,7 @@ typedef struct { } AlarmFuncInfo; typedef struct { - GladeXML *xml; + GtkBuilder *builder; GtkWidget *dialog; GtkWidget *snooze_time_min; @@ -219,7 +220,7 @@ dialog_destroyed_cb (GtkWidget *dialog, gpointer user_data) { AlarmNotify *an = user_data; - g_object_unref (an->xml); + g_object_unref (an->builder); g_free (an); } @@ -252,37 +253,27 @@ notified_alarms_dialog_new (void) G_TYPE_POINTER /* FuncInfo*/)); - gchar *gladefile; - - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "alarm-notify.glade", - NULL); - an->xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - if (!an->xml) { - g_message ("alarm_notify_dialog(): Could not load the Glade XML file!"); - g_free (an); - return NULL; - } - - an->dialog = glade_xml_get_widget (an->xml, "alarm-notify"); - an->snooze_time_min = glade_xml_get_widget (an->xml, "snooze-time-min"); - an->minutes_label = glade_xml_get_widget (an->xml, "minutes-label"); - an->snooze_time_hrs = glade_xml_get_widget (an->xml, "snooze-time-hrs"); - an->hrs_label = glade_xml_get_widget (an->xml, "hrs-label"); - an->description = glade_xml_get_widget (an->xml, "description-label"); - an->location = glade_xml_get_widget (an->xml, "location-label"); - an->treeview = glade_xml_get_widget (an->xml, "appointments-treeview"); - an->scrolledwindow = glade_xml_get_widget (an->xml, "treeview-scrolledwindow"); - snooze_btn = glade_xml_get_widget (an->xml, "snooze-button"); + an->builder = gtk_builder_new (); + e_load_ui_builder_definition (an->builder, "alarm-notify.ui"); + + an->dialog = e_builder_get_widget (an->builder, "alarm-notify"); + an->snooze_time_min = e_builder_get_widget (an->builder, "snooze-time-min"); + an->minutes_label = e_builder_get_widget (an->builder, "minutes-label"); + an->snooze_time_hrs = e_builder_get_widget (an->builder, "snooze-time-hrs"); + an->hrs_label = e_builder_get_widget (an->builder, "hrs-label"); + an->description = e_builder_get_widget (an->builder, "description-label"); + an->location = e_builder_get_widget (an->builder, "location-label"); + an->treeview = e_builder_get_widget (an->builder, "appointments-treeview"); + an->scrolledwindow = e_builder_get_widget (an->builder, "treeview-scrolledwindow"); + snooze_btn = e_builder_get_widget (an->builder, "snooze-button"); an->snooze_btn = snooze_btn; - an->dismiss_btn = glade_xml_get_widget (an->xml, "dismiss-button"); - edit_btn = glade_xml_get_widget (an->xml, "edit-button"); + an->dismiss_btn = e_builder_get_widget (an->builder, "dismiss-button"); + edit_btn = e_builder_get_widget (an->builder, "edit-button"); if (!(an->dialog && an->scrolledwindow && an->treeview && an->snooze_time_min && an->snooze_time_hrs && an->description && an->location && edit_btn && snooze_btn && an->dismiss_btn)) { g_message ("alarm_notify_dialog(): Could not find all widgets in Glade file!"); - g_object_unref (an->xml); + g_object_unref (an->builder); g_free (an); return NULL; } @@ -309,7 +300,7 @@ notified_alarms_dialog_new (void) gtk_widget_realize (an->dialog); gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->vbox), 0); gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->action_area), 12); - image = glade_xml_get_widget (an->xml, "alarm-image"); + image = e_builder_get_widget (an->builder, "alarm-image"); gtk_image_set_from_icon_name ( GTK_IMAGE (image), "stock_alarm", GTK_ICON_SIZE_DIALOG); diff --git a/calendar/gui/alarm-notify/alarm-notify.glade b/calendar/gui/alarm-notify/alarm-notify.glade deleted file mode 100644 index e1e25bdb00..0000000000 --- a/calendar/gui/alarm-notify/alarm-notify.glade +++ /dev/null @@ -1,703 +0,0 @@ - - - - - - - True - Appointments - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 384 - 200 - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - GTK_RELIEF_NORMAL - True - -7 - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-close - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Dismiss _All - 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 - GTK_PACK_END - - - - - - 12 - True - False - 12 - - - - True - gtk-dialog-info - 6 - 0.5 - 0 - 0 - 0 - - - 0 - False - True - - - - - - True - False - 12 - - - - 375 - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - False - True - False - False - False - - - - - 0 - True - True - - - - - - True - False - 6 - - - - True - False - 12 - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - True - True - False - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_WORD - True - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - True - 2 - 2 - False - 6 - 6 - - - - True - Snooze _time: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - snooze-time - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - False - 6 - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 0 12 1 5 0 - - - 0 - False - False - - - - - - True - hours - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 5 0 59 1 10 0 - - - 0 - False - False - - - - - - True - minutes - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 1 - 2 - 1 - 2 - fill - - - - - - True - location of appointment - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 0 - 1 - fill - - - - - - - True - Location: - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - 0 - False - True - - - - - 0 - True - True - - - - - - True - False - 5 - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-refresh - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Snooze - 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 - - - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-properties - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Edit - 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 - - - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-apply - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Dismiss - 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 - - - - - 0 - False - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - diff --git a/calendar/gui/alarm-notify/alarm-notify.ui b/calendar/gui/alarm-notify/alarm-notify.ui new file mode 100644 index 0000000000..739b981f4e --- /dev/null +++ b/calendar/gui/alarm-notify/alarm-notify.ui @@ -0,0 +1,678 @@ + + + + + 12 + 0 + 5 + 1 + 0 + 0 + + + 59 + 0 + 10 + 1 + 0 + 5 + + + True + Appointments + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 384 + 200 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + + + True + False + 0 + + + True + GTK_BUTTONBOX_END + + + True + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + gtk-close + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + Dismiss _All + 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 + GTK_PACK_END + + + + + 12 + True + False + 12 + + + True + gtk-dialog-info + 6 + 0.5 + 0 + 0 + 0 + + + 0 + False + True + + + + + True + False + 12 + + + 375 + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + True + True + False + False + False + True + False + False + False + + + + + 0 + True + True + + + + + True + False + 6 + + + True + False + 12 + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + True + True + False + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + True + 2 + 2 + False + 6 + 6 + + + True + Snooze _time: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + snooze-time + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + True + False + 6 + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + adjustment1 + + + 0 + False + False + + + + + True + hours + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + adjustment2 + + + 0 + False + False + + + + + True + minutes + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 1 + 2 + 1 + 2 + fill + + + + + True + location of appointment + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + + True + Location: + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + 0 + False + True + + + + + 0 + True + True + + + + + True + False + 5 + + + True + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + gtk-refresh + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + _Snooze + 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 + + + + + True + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + gtk-properties + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + _Edit + 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 + + + + + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + gtk-apply + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + _Dismiss + 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 + + + + + 0 + False + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + button5 + + + diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index 18e0a5eadf..e0014099f8 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -62,8 +61,6 @@ main (gint argc, gchar **argv) if (unique_app_is_running (app)) goto exit; - glade_init (); - e_icon_factory_init (); alarm_notify_service = alarm_notify_new (); diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am index d09c906b13..8b7c456156 100644 --- a/calendar/gui/dialogs/Makefile.am +++ b/calendar/gui/dialogs/Makefile.am @@ -10,8 +10,7 @@ libcal_dialogs_la_CPPFLAGS = \ -I$(top_builddir)/shell \ -I$(top_srcdir)/shell \ -I$(top_srcdir)/widgets/misc \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \ + -DEVOLUTION_UIDIR=\""$(uidir)"\" \ -DEVOLUTION_ICONSDIR=\""$(imagesdir)"\" \ -DPREFIX=\""$(prefix)"\" \ $(GNOME_PLATFORM_CFLAGS) \ @@ -109,17 +108,17 @@ libcal_dialogs_la_SOURCES = \ task-page.c \ task-page.h -glade_DATA = \ - alarm-dialog.glade \ - alarm-list-dialog.glade \ - cal-prefs-dialog.glade \ - e-delegate-dialog.glade \ - event-page.glade \ - memo-page.glade \ - recurrence-page.glade \ - schedule-page.glade \ - task-details-page.glade \ - task-page.glade +ui_DATA = \ + alarm-dialog.ui \ + alarm-list-dialog.ui \ + cal-prefs-dialog.ui \ + e-delegate-dialog.ui \ + event-page.ui \ + memo-page.ui \ + recurrence-page.ui \ + schedule-page.ui \ + task-details-page.ui \ + task-page.ui CLEANFILES = $(BUILT_SOURCES) @@ -127,6 +126,6 @@ dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) EXTRA_DIST = \ - $(glade_DATA) + $(ui_DATA) -include $(top_srcdir)/git.mk diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index d72ad46759..c07af85a0f 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -31,11 +31,11 @@ #include #include #include -#include #include #include "e-util/e-dialog-widgets.h" #include #include +#include "e-util/e-util.h" #include "e-util/e-dialog-widgets.h" #include "e-util/e-util-private.h" #include @@ -48,8 +48,7 @@ typedef struct { - /* Glade XML data */ - GladeXML *xml; + GtkBuilder *builder; /* The alarm */ ECalComponentAlarm *alarm; @@ -777,45 +776,41 @@ dialog_to_alarm (Dialog *dialog) static gboolean get_widgets (Dialog *dialog) { -#define GW(name) glade_xml_get_widget (dialog->xml, name) - - dialog->toplevel = GW ("alarm-dialog"); + dialog->toplevel = e_builder_get_widget (dialog->builder, "alarm-dialog"); if (!dialog->toplevel) return FALSE; - dialog->action_combo = GW ("action-combobox"); - dialog->interval_value = GW ("interval-value"); - dialog->value_units_combo = GW ("value-units-combobox"); - dialog->relative_combo = GW ("relative-combobox"); - dialog->time_combo = GW ("time-combobox"); - - dialog->repeat_toggle = GW ("repeat-toggle"); - dialog->repeat_group = GW ("repeat-group"); - dialog->repeat_quantity = GW ("repeat-quantity"); - dialog->repeat_value = GW ("repeat-value"); - dialog->repeat_unit_combo = GW ("repeat-unit-combobox"); + dialog->action_combo = e_builder_get_widget (dialog->builder, "action-combobox"); + dialog->interval_value = e_builder_get_widget (dialog->builder, "interval-value"); + dialog->value_units_combo = e_builder_get_widget (dialog->builder, "value-units-combobox"); + dialog->relative_combo = e_builder_get_widget (dialog->builder, "relative-combobox"); + dialog->time_combo = e_builder_get_widget (dialog->builder, "time-combobox"); - dialog->option_notebook = GW ("option-notebook"); + dialog->repeat_toggle = e_builder_get_widget (dialog->builder, "repeat-toggle"); + dialog->repeat_group = e_builder_get_widget (dialog->builder, "repeat-group"); + dialog->repeat_quantity = e_builder_get_widget (dialog->builder, "repeat-quantity"); + dialog->repeat_value = e_builder_get_widget (dialog->builder, "repeat-value"); + dialog->repeat_unit_combo = e_builder_get_widget (dialog->builder, "repeat-unit-combobox"); - dialog->dalarm_group = GW ("dalarm-group"); - dialog->dalarm_message = GW ("dalarm-message"); - dialog->dalarm_description = GW ("dalarm-description"); + dialog->option_notebook = e_builder_get_widget (dialog->builder, "option-notebook"); - dialog->aalarm_group = GW ("aalarm-group"); - dialog->aalarm_sound = GW ("aalarm-sound"); - dialog->aalarm_file_chooser = GW ("aalarm-file-chooser"); + dialog->dalarm_group = e_builder_get_widget (dialog->builder, "dalarm-group"); + dialog->dalarm_message = e_builder_get_widget (dialog->builder, "dalarm-message"); + dialog->dalarm_description = e_builder_get_widget (dialog->builder, "dalarm-description"); - dialog->malarm_group = GW ("malarm-group"); - dialog->malarm_address_group = GW ("malarm-address-group"); - dialog->malarm_addressbook = GW ("malarm-addressbook"); - dialog->malarm_message = GW ("malarm-message"); - dialog->malarm_description = GW ("malarm-description"); + dialog->aalarm_group = e_builder_get_widget (dialog->builder, "aalarm-group"); + dialog->aalarm_sound = e_builder_get_widget (dialog->builder, "aalarm-sound"); + dialog->aalarm_file_chooser = e_builder_get_widget (dialog->builder, "aalarm-file-chooser"); - dialog->palarm_group = GW ("palarm-group"); - dialog->palarm_program = GW ("palarm-program"); - dialog->palarm_args = GW ("palarm-args"); + dialog->malarm_group = e_builder_get_widget (dialog->builder, "malarm-group"); + dialog->malarm_address_group = e_builder_get_widget (dialog->builder, "malarm-address-group"); + dialog->malarm_addressbook = e_builder_get_widget (dialog->builder, "malarm-addressbook"); + dialog->malarm_message = e_builder_get_widget (dialog->builder, "malarm-message"); + dialog->malarm_description = e_builder_get_widget (dialog->builder, "malarm-description"); -#undef GW + dialog->palarm_group = e_builder_get_widget (dialog->builder, "palarm-group"); + dialog->palarm_program = e_builder_get_widget (dialog->builder, "palarm-program"); + dialog->palarm_args = e_builder_get_widget (dialog->builder, "palarm-args"); if (dialog->action_combo) { const gchar *actions[] = { @@ -1215,30 +1210,22 @@ alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm) { Dialog dialog; gint response_id; - gchar *gladefile; g_return_val_if_fail (alarm != NULL, FALSE); dialog.alarm = alarm; dialog.ecal = ecal; - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "alarm-dialog.glade", - NULL); - dialog.xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - if (!dialog.xml) { - g_message (G_STRLOC ": Could not load the Glade XML file!"); - return FALSE; - } + dialog.builder = gtk_builder_new (); + e_load_ui_builder_definition (dialog.builder, "alarm-dialog.ui"); if (!get_widgets (&dialog)) { - g_object_unref(dialog.xml); + g_object_unref(dialog.builder); return FALSE; } if (!setup_select_names (&dialog)) { - g_object_unref (dialog.xml); + g_object_unref (dialog.builder); return FALSE; } @@ -1262,7 +1249,7 @@ alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm) dialog_to_alarm (&dialog); gtk_widget_destroy (dialog.toplevel); - g_object_unref (dialog.xml); + g_object_unref (dialog.builder); return response_id == GTK_RESPONSE_OK ? TRUE : FALSE; } diff --git a/calendar/gui/dialogs/alarm-dialog.glade b/calendar/gui/dialogs/alarm-dialog.glade deleted file mode 100644 index 6bf58aab63..0000000000 --- a/calendar/gui/dialogs/alarm-dialog.glade +++ /dev/null @@ -1,1098 +0,0 @@ - - - - - - - - 6 - True - Add Alarm - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - False - - - - True - False - 6 - - - - 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 - - - - - - 12 - True - False - 12 - - - - True - <b>Alarm</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 6 - - - - True - False - True - - - 0 - False - False - - - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 1 0 999 1 10 0 - - - 0 - False - True - - - - - - True - minute(s) -hour(s) -day(s) - False - True - - - 0 - False - False - - - - - - True - before -after - False - True - - - 0 - False - False - - - - - - True - start of appointment -end of appointment - False - True - - - 0 - False - False - - - - - 0 - True - True - - - - - 0 - False - False - - - - - - True - <b>Repeat</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 6 - - - - True - True - True - _Repeat the alarm - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - False - 6 - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 1 1 999 1 10 0 - - - 0 - True - True - - - - - - True - extra times every - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 5 0 999 1 10 0 - - - 0 - True - True - - - - - - True - minutes -hours -days - False - True - - - 0 - False - False - - - - - 0 - False - False - - - - - 0 - False - True - - - - - 0 - False - False - - - - - - True - <b>Options</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - False - GTK_POS_TOP - False - False - - - - True - False - 6 - - - - True - True - Custom _message - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - 1 - 2 - False - 6 - 6 - - - - True - Mes_sage: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0 - 0 - 0 - dalarm-description - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - fill - - - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_WORD - True - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - 1 - 2 - 0 - 1 - - - - - 0 - True - True - - - - - False - True - - - - - - True - label15 - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - True - False - 6 - - - - True - True - Custom alarm sound - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - False - 6 - - - - True - _Sound: - True - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - Select A File - GTK_FILE_CHOOSER_ACTION_OPEN - True - False - False - -1 - - - 0 - True - True - - - - - 0 - False - True - - - - - False - True - - - - - - True - label16 - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - True - False - 0 - - - - True - 2 - 2 - False - 6 - 6 - - - - True - _Program: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - palarm-program - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - _Arguments: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - palarm-args - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 0 - 1 - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 1 - 2 - - - - - - 0 - False - True - - - - - False - True - - - - - - True - label17 - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - True - False - 0 - - - - True - False - 6 - - - - True - False - 6 - - - - True - True - Send To: - True - GTK_RELIEF_NORMAL - True - - - 0 - False - False - - - - - - - - - 0 - True - True - - - - - - True - False - 6 - - - - True - True - Custom _message - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - 1 - 2 - False - 6 - 6 - - - - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_WORD - True - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - 1 - 2 - 0 - 1 - fill - - - - - - True - Mes_sage: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0 - 0 - 0 - malarm-description - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - fill - - - - - 0 - True - True - - - - - 0 - False - False - - - - - 0 - False - True - - - - - False - True - - - - - - True - label18 - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - 0 - True - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - diff --git a/calendar/gui/dialogs/alarm-dialog.ui b/calendar/gui/dialogs/alarm-dialog.ui new file mode 100644 index 0000000000..0bff899866 --- /dev/null +++ b/calendar/gui/dialogs/alarm-dialog.ui @@ -0,0 +1,1122 @@ + + + + + 999 + 0 + 10 + 1 + 0 + 1 + + + 999 + 1 + 10 + 1 + 0 + 1 + + + 999 + 0 + 10 + 1 + 0 + 5 + + + + + + + + minute(s) + + + hour(s) + + + day(s) + + + + + + + + + + before + + + after + + + + + + + + + + start of appointment + + + end of appointment + + + + + + + + + + minutes + + + hours + + + days + + + + + 6 + True + Add Alarm + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + False + + + True + False + 6 + + + 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 + + + + + 12 + True + False + 12 + + + True + <b>Alarm</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 12 + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 6 + + + True + False + True + + + 0 + False + False + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + adjustment1 + + + 0 + False + True + + + + + True + False + True + model1 + + + + 0 + + + + + 0 + False + False + + + + + True + False + True + model2 + + + + 0 + + + + + 0 + False + False + + + + + True + False + True + model3 + + + + 0 + + + + + 0 + False + False + + + + + 0 + True + True + + + + + 0 + False + False + + + + + True + <b>Repeat</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 12 + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 6 + + + True + True + True + _Repeat the alarm + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + False + 6 + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + adjustment2 + + + 0 + True + True + + + + + True + extra times every + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + adjustment3 + + + 0 + True + True + + + + + True + False + True + model4 + + + + 0 + + + + + 0 + False + False + + + + + 0 + False + False + + + + + 0 + False + True + + + + + 0 + False + False + + + + + True + <b>Options</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 12 + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + False + GTK_POS_TOP + False + False + + + True + False + 6 + + + True + True + Custom _message + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + 1 + 2 + False + 6 + 6 + + + True + Mes_sage: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0 + 0 + 0 + option-notebook + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + fill + + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + True + True + True + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + 1 + 2 + 0 + 1 + + + + + 0 + True + True + + + + + False + True + + + + + True + label15 + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + True + False + 6 + + + True + True + Custom alarm sound + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + False + 6 + + + True + _Sound: + True + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + Select A File + GTK_FILE_CHOOSER_ACTION_OPEN + True + False + False + -1 + + + 0 + True + True + + + + + 0 + False + True + + + + + False + True + + + + + True + label16 + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + True + False + 0 + + + True + 2 + 2 + False + 6 + 6 + + + True + _Program: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + palarm-program + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + True + _Arguments: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + palarm-args + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 0 + 1 + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 1 + 2 + + + + + + 0 + False + True + + + + + False + True + + + + + True + label17 + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + True + False + 0 + + + True + False + 6 + + + True + False + 6 + + + True + True + Send To: + True + GTK_RELIEF_NORMAL + True + + + 0 + False + False + + + + + + + + 0 + True + True + + + + + True + False + 6 + + + True + True + Custom _message + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + 1 + 2 + False + 6 + 6 + + + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + True + True + True + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + 1 + 2 + 0 + 1 + fill + + + + + True + Mes_sage: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0 + 0 + 0 + option-notebook + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + fill + + + + + 0 + True + True + + + + + 0 + False + False + + + + + 0 + False + True + + + + + False + True + + + + + True + label18 + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + True + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + cancelbutton + okbutton + + + diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c index 882f3fd0cc..c350b4774d 100644 --- a/calendar/gui/dialogs/alarm-list-dialog.c +++ b/calendar/gui/dialogs/alarm-list-dialog.c @@ -33,11 +33,10 @@ #include #include #include -#include #include -#include "e-util/e-dialog-widgets.h" #include #include +#include "e-util/e-util.h" #include "e-util/e-dialog-widgets.h" #include "e-util/e-util-private.h" #include "alarm-dialog.h" @@ -46,8 +45,7 @@ typedef struct { - /* Glade XML data */ - GladeXML *xml; + GtkBuilder *builder; /* The client */ ECal *ecal; @@ -70,7 +68,7 @@ typedef struct { static gboolean get_widgets (Dialog *dialog) { -#define GW(name) glade_xml_get_widget (dialog->xml, name) +#define GW(name) e_builder_get_widget (dialog->builder, name) dialog->toplevel = GW ("alarm-list-dialog"); if (!dialog->toplevel) @@ -264,24 +262,15 @@ alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store) { Dialog dialog; gint response_id; - gchar *gladefile; dialog.ecal = ecal; dialog.list_store = list_store; - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "alarm-list-dialog.glade", - NULL); - dialog.xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - if (!dialog.xml) { - g_message (G_STRLOC ": Could not load the Glade XML file!"); - return FALSE; - } + dialog.builder = gtk_builder_new (); + e_load_ui_builder_definition (dialog.builder, "alarm-list-dialog.ui"); if (!get_widgets (&dialog)) { - g_object_unref(dialog.xml); + g_object_unref(dialog.builder); return FALSE; } @@ -303,7 +292,7 @@ alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store) gtk_widget_hide (dialog.toplevel); gtk_widget_destroy (dialog.toplevel); - g_object_unref (dialog.xml); + g_object_unref (dialog.builder); return response_id == GTK_RESPONSE_OK ? TRUE : FALSE; } @@ -312,25 +301,16 @@ GtkWidget * alarm_list_dialog_peek (ECal *ecal, EAlarmList *list_store) { Dialog *dialog; - gchar *gladefile; dialog = (Dialog *)g_new (Dialog, 1); dialog->ecal = ecal; dialog->list_store = list_store; - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "alarm-list-dialog.glade", - NULL); - dialog->xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - if (!dialog->xml) { - g_message (G_STRLOC ": Could not load the Glade XML file!"); - return NULL; - } + dialog->builder = gtk_builder_new (); + e_load_ui_builder_definition (dialog->builder, "alarm-list-dialog.ui"); if (!get_widgets (dialog)) { - g_object_unref(dialog->xml); + g_object_unref(dialog->builder); return NULL; } @@ -338,7 +318,7 @@ alarm_list_dialog_peek (ECal *ecal, EAlarmList *list_store) sensitize_buttons (dialog); - g_object_unref (dialog->xml); + g_object_unref (dialog->builder); /* Free the other stuff when the parent really gets destroyed. */ g_object_set_data_full (G_OBJECT (dialog->box), "toplevel", dialog->toplevel, (GDestroyNotify) gtk_widget_destroy); diff --git a/calendar/gui/dialogs/alarm-list-dialog.glade b/calendar/gui/dialogs/alarm-list-dialog.glade deleted file mode 100644 index 6a601e4c47..0000000000 --- a/calendar/gui/dialogs/alarm-list-dialog.glade +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - Alarms - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - True - 320 - 240 - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - False - - - - True - False - 0 - - - - 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 - 12 - - - - True - False - 6 - - - - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - False - True - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_START - 6 - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-add - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - A_dd - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - - - - True - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-edit - True - GTK_RELIEF_NORMAL - True - - - - - 0 - False - False - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - diff --git a/calendar/gui/dialogs/alarm-list-dialog.ui b/calendar/gui/dialogs/alarm-list-dialog.ui new file mode 100644 index 0000000000..095aa36604 --- /dev/null +++ b/calendar/gui/dialogs/alarm-list-dialog.ui @@ -0,0 +1,218 @@ + + + + + Alarms + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + True + 320 + 240 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + False + + + True + False + 0 + + + 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 + 12 + + + True + False + 6 + + + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + True + True + True + False + False + True + + + + + 0 + True + True + + + + + True + GTK_BUTTONBOX_START + 6 + + + True + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + gtk-add + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + A_dd + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + True + True + True + gtk-remove + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-edit + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + False + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + cancelbutton1 + okbutton1 + + + diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index e6023f94ed..fafa308ff9 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -31,10 +31,11 @@ #include "../calendar-config.h" #include "cal-prefs-dialog.h" #include -#include -#include -#include -#include +#include "e-util/e-util.h" +#include "e-util/e-binding.h" +#include "e-util/e-datetime-format.h" +#include "e-util/e-dialog-widgets.h" +#include "e-util/e-util-private.h" #include #include @@ -54,14 +55,12 @@ static const gint default_reminder_units_map[] = { static GtkVBoxClass *parent_class = NULL; -GtkWidget *cal_prefs_dialog_create_time_edit (void); - static void calendar_prefs_dialog_finalize (GObject *obj) { CalendarPrefsDialog *prefs = (CalendarPrefsDialog *) obj; - g_object_unref (prefs->gui); + g_object_unref (prefs->builder); if (prefs->gconf) { g_object_unref (prefs->gconf); @@ -92,7 +91,7 @@ eccp_widget_glade (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget { CalendarPrefsDialog *prefs = data; - return glade_xml_get_widget (prefs->gui, item->label); + return e_builder_get_widget (prefs->builder, item->label); } static void @@ -587,7 +586,6 @@ static void calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs, EShell *shell) { - GladeXML *gui; ECalConfig *ec; ECalConfigTargetPrefs *target; EShellSettings *shell_settings; @@ -597,19 +595,19 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs, GtkWidget *widget; GtkWidget *table; GSList *l; - gchar *gladefile; shell_settings = e_shell_get_shell_settings (shell); locale_supports_12_hour_format = calendar_config_locale_supports_12_hour_format (); - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "cal-prefs-dialog.glade", - NULL); - gui = glade_xml_new (gladefile, "toplevel-notebook", NULL); - g_free (gladefile); - prefs->gui = gui; + /* Make sure our custom widget classes are registered with + * GType before we load the GtkBuilder definition file. */ + E_TYPE_DATE_EDIT; + E_TYPE_TIMEZONE_ENTRY; + + prefs->builder = gtk_builder_new (); + e_load_ui_builder_definition (prefs->builder, "cal-prefs-dialog.ui"); prefs->gconf = gconf_client_get_default (); @@ -627,7 +625,7 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs, l = g_slist_prepend (l, &eccp_items[i]); e_config_add_items ((EConfig *) ec, l, NULL, NULL, eccp_free, prefs); - widget = glade_xml_get_widget (gui, "use-system-tz-check"); + widget = e_builder_get_widget (prefs->builder, "use-system-tz-check"); e_mutual_binding_new ( shell_settings, "cal-use-system-timezone", widget, "active"); @@ -635,7 +633,7 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs, shell_settings, "notify::cal-use-system-timezone", G_CALLBACK (update_system_tz_widgets), prefs); - widget = glade_xml_get_widget (gui, "timezone"); + widget = e_builder_get_widget (prefs->builder, "timezone"); e_mutual_binding_new ( shell_settings, "cal-timezone", widget, "timezone"); @@ -644,113 +642,113 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs, widget, "sensitive"); /* General tab */ - prefs->system_tz_label = glade_xml_get_widget (gui, "system-tz-label"); - prefs->day_second_zone = glade_xml_get_widget (gui, "day_second_zone"); + prefs->system_tz_label = e_builder_get_widget (prefs->builder, "system-tz-label"); + prefs->day_second_zone = e_builder_get_widget (prefs->builder, "day_second_zone"); - widget = glade_xml_get_widget (gui, "sun_button"); + widget = e_builder_get_widget (prefs->builder, "sun_button"); e_mutual_binding_new ( shell_settings, "cal-working-days-sunday", widget, "active"); - widget = glade_xml_get_widget (gui, "mon_button"); + widget = e_builder_get_widget (prefs->builder, "mon_button"); e_mutual_binding_new ( shell_settings, "cal-working-days-monday", widget, "active"); - widget = glade_xml_get_widget (gui, "tue_button"); + widget = e_builder_get_widget (prefs->builder, "tue_button"); e_mutual_binding_new ( shell_settings, "cal-working-days-tuesday", widget, "active"); - widget = glade_xml_get_widget (gui, "wed_button"); + widget = e_builder_get_widget (prefs->builder, "wed_button"); e_mutual_binding_new ( shell_settings, "cal-working-days-wednesday", widget, "active"); - widget = glade_xml_get_widget (gui, "thu_button"); + widget = e_builder_get_widget (prefs->builder, "thu_button"); e_mutual_binding_new ( shell_settings, "cal-working-days-thursday", widget, "active"); - widget = glade_xml_get_widget (gui, "fri_button"); + widget = e_builder_get_widget (prefs->builder, "fri_button"); e_mutual_binding_new ( shell_settings, "cal-working-days-friday", widget, "active"); - widget = glade_xml_get_widget (gui, "sat_button"); + widget = e_builder_get_widget (prefs->builder, "sat_button"); e_mutual_binding_new ( shell_settings, "cal-working-days-saturday", widget, "active"); - widget = glade_xml_get_widget (gui, "week_start_day"); + widget = e_builder_get_widget (prefs->builder, "week_start_day"); e_mutual_binding_new ( shell_settings, "cal-week-start-day", widget, "active"); - widget = glade_xml_get_widget (gui, "start_of_day"); + widget = e_builder_get_widget (prefs->builder, "start_of_day"); prefs->start_of_day = widget; /* XXX delete this */ if (locale_supports_12_hour_format) e_binding_new ( shell_settings, "cal-use-24-hour-format", widget, "use-24-hour-format"); - widget = glade_xml_get_widget (gui, "end_of_day"); + widget = e_builder_get_widget (prefs->builder, "end_of_day"); prefs->end_of_day = widget; /* XXX delete this */ if (locale_supports_12_hour_format) e_binding_new ( shell_settings, "cal-use-24-hour-format", widget, "use-24-hour-format"); - widget = glade_xml_get_widget (gui, "use_12_hour"); + widget = e_builder_get_widget (prefs->builder, "use_12_hour"); gtk_widget_set_sensitive (widget, locale_supports_12_hour_format); e_mutual_binding_new_with_negation ( shell_settings, "cal-use-24-hour-format", widget, "active"); - widget = glade_xml_get_widget (gui, "use_24_hour"); + widget = e_builder_get_widget (prefs->builder, "use_24_hour"); gtk_widget_set_sensitive (widget, locale_supports_12_hour_format); e_mutual_binding_new ( shell_settings, "cal-use-24-hour-format", widget, "active"); - widget = glade_xml_get_widget (gui, "confirm_delete"); + widget = e_builder_get_widget (prefs->builder, "confirm_delete"); e_mutual_binding_new ( shell_settings, "cal-confirm-delete", widget, "active"); - prefs->default_reminder = glade_xml_get_widget (gui, "default_reminder"); - prefs->default_reminder_interval = glade_xml_get_widget (gui, "default_reminder_interval"); - prefs->default_reminder_units = glade_xml_get_widget (gui, "default_reminder_units"); - prefs->ba_reminder = glade_xml_get_widget (gui, "ba_reminder"); - prefs->ba_reminder_interval = glade_xml_get_widget (gui, "ba_reminder_interval"); - prefs->ba_reminder_units = glade_xml_get_widget (gui, "ba_reminder_units"); + prefs->default_reminder = e_builder_get_widget (prefs->builder, "default_reminder"); + prefs->default_reminder_interval = e_builder_get_widget (prefs->builder, "default_reminder_interval"); + prefs->default_reminder_units = e_builder_get_widget (prefs->builder, "default_reminder_units"); + prefs->ba_reminder = e_builder_get_widget (prefs->builder, "ba_reminder"); + prefs->ba_reminder_interval = e_builder_get_widget (prefs->builder, "ba_reminder_interval"); + prefs->ba_reminder_units = e_builder_get_widget (prefs->builder, "ba_reminder_units"); /* Display tab */ - prefs->time_divisions = glade_xml_get_widget (gui, "time_divisions"); + prefs->time_divisions = e_builder_get_widget (prefs->builder, "time_divisions"); - widget = glade_xml_get_widget (gui, "show_end_times"); + widget = e_builder_get_widget (prefs->builder, "show_end_times"); e_mutual_binding_new ( shell_settings, "cal-show-event-end-times", widget, "active"); - widget = glade_xml_get_widget (gui, "compress_weekend"); + widget = e_builder_get_widget (prefs->builder, "compress_weekend"); e_mutual_binding_new ( shell_settings, "cal-compress-weekend", widget, "active"); - widget = glade_xml_get_widget (gui, "dnav_show_week_no"); + widget = e_builder_get_widget (prefs->builder, "dnav_show_week_no"); e_mutual_binding_new ( shell_settings, "cal-show-week-numbers", widget, "active"); - widget = glade_xml_get_widget (gui, "dview_show_week_no"); + widget = e_builder_get_widget (prefs->builder, "dview_show_week_no"); e_mutual_binding_new ( shell_settings, "cal-day-view-show-week-numbers", widget, "active"); - prefs->month_scroll_by_week = glade_xml_get_widget (gui, "month_scroll_by_week"); + prefs->month_scroll_by_week = e_builder_get_widget (prefs->builder, "month_scroll_by_week"); - widget = glade_xml_get_widget (gui, "tasks_due_today_color"); + widget = e_builder_get_widget (prefs->builder, "tasks_due_today_color"); e_mutual_binding_new_full ( shell_settings, "cal-tasks-color-due-today", widget, "color", @@ -758,7 +756,7 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs, e_binding_transform_color_to_string, (GDestroyNotify) NULL, NULL); - widget = glade_xml_get_widget (gui, "tasks_overdue_color"); + widget = e_builder_get_widget (prefs->builder, "tasks_overdue_color"); e_mutual_binding_new_full ( shell_settings, "cal-tasks-color-overdue", widget, "color", @@ -766,16 +764,16 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs, e_binding_transform_color_to_string, (GDestroyNotify) NULL, NULL); - prefs->tasks_hide_completed = glade_xml_get_widget (gui, "tasks_hide_completed"); - prefs->tasks_hide_completed_interval = glade_xml_get_widget (gui, "tasks_hide_completed_interval"); - prefs->tasks_hide_completed_units = glade_xml_get_widget (gui, "tasks_hide_completed_units"); + prefs->tasks_hide_completed = e_builder_get_widget (prefs->builder, "tasks_hide_completed"); + prefs->tasks_hide_completed_interval = e_builder_get_widget (prefs->builder, "tasks_hide_completed_interval"); + prefs->tasks_hide_completed_units = e_builder_get_widget (prefs->builder, "tasks_hide_completed_units"); /* Alarms tab */ - prefs->notify_with_tray = glade_xml_get_widget (gui, "notify_with_tray"); - prefs->scrolled_window = glade_xml_get_widget (gui, "calendar-source-scrolled-window"); + prefs->notify_with_tray = e_builder_get_widget (prefs->builder, "notify_with_tray"); + prefs->scrolled_window = e_builder_get_widget (prefs->builder, "calendar-source-scrolled-window"); /* Free/Busy tab */ - widget = glade_xml_get_widget (gui, "template_url"); + widget = e_builder_get_widget (prefs->builder, "template_url"); e_mutual_binding_new ( shell_settings, "cal-free-busy-template", widget, "text"); @@ -785,7 +783,7 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs, gtk_container_add (GTK_CONTAINER (prefs), toplevel); /* date/time format */ - table = glade_xml_get_widget (gui, "datetime_format_table"); + table = e_builder_get_widget (prefs->builder, "datetime_format_table"); e_datetime_format_add_setup_widget (table, 0, "calendar", "table", DTFormatKindDateTime, _("Time and date:")); e_datetime_format_add_setup_widget (table, 1, "calendar", "table", DTFormatKindDate, _("Date only:")); @@ -830,18 +828,3 @@ calendar_prefs_dialog_new (EShell *shell) return GTK_WIDGET (dialog); } - -/* called by libglade to create our custom EDateEdit widgets. */ -GtkWidget * -cal_prefs_dialog_create_time_edit (void) -{ - GtkWidget *dedit; - - dedit = e_date_edit_new (); - - gtk_widget_show (GTK_WIDGET (dedit)); - e_date_edit_set_time_popup_range (E_DATE_EDIT (dedit), 0, 24); - e_date_edit_set_show_date (E_DATE_EDIT (dedit), FALSE); - - return dedit; -} diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade deleted file mode 100644 index ee729bddc8..0000000000 --- a/calendar/gui/dialogs/cal-prefs-dialog.glade +++ /dev/null @@ -1,1352 +0,0 @@ - - - - - - True - window1 - - - True - True - - - True - 12 - 12 - - - True - 0 - <span weight="bold">Time</span> - True - - - False - False - 0 - - - - - True - 12 - - - True - - - False - False - 0 - - - - - True - 5 - 2 - 6 - 6 - - - True - 0 - Se_cond zone: - True - day_second_zone - - - 4 - 5 - GTK_FILL - - - - - - True - - - None - True - True - False - True - - - 0 - - - - - True - 6 - (Shown in a Day View) - - - False - False - 1 - - - - - 1 - 2 - 4 - 5 - GTK_FILL - GTK_FILL - - - - - True - 0 - Time format: - - - 3 - 4 - GTK_FILL - - - - - - True - 6 - - - _12 hour (AM/PM) - True - True - False - True - True - - - False - False - 0 - - - - - _24 hour - True - True - False - True - True - use_12_hour - - - False - False - 1 - - - - - 1 - 2 - 3 - 4 - GTK_FILL - GTK_FILL - - - - - True - make_timezone_entry - - - - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - 0 - Time _zone: - True - timezone - - - GTK_FILL - - - - - - True - - - Use s_ystem time zone - True - True - False - True - True - - - False - 0 - - - - - True - 5 - (system/tz) - - - False - False - 1 - - - - - 1 - 2 - GTK_FILL - - - - - - - - - - - 1 - - - - - False - 1 - - - - - True - 0 - <span weight="bold">Work Week</span> - True - - - False - False - 2 - - - - - True - 12 - - - True - - - False - False - 0 - - - - - True - 4 - 2 - 6 - 6 - - - True - 0 - Wee_k starts on: - True - week_start_day - - - GTK_FILL - - - - - - True - 0 - Work days: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - _Day begins: - True - start_of_day - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Day _ends: - True - end_of_day - - - 3 - 4 - GTK_FILL - - - - - - True - cal_prefs_dialog_create_time_edit - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - True - cal_prefs_dialog_create_time_edit - - - 1 - 2 - 3 - 4 - GTK_FILL - GTK_FILL - - - - - True - 6 - - - _Mon - True - True - False - True - True - - Monday - - - - False - False - 0 - - - - - _Tue - True - True - False - True - True - - Tuesday - - - - False - False - 1 - - - - - _Wed - True - True - False - True - True - - Wednesday - - - - False - False - 2 - - - - - T_hu - True - True - False - True - True - - Thursday - - - - False - False - 3 - - - - - _Fri - True - True - False - True - True - - Friday - - - - False - False - 4 - - - - - _Sat - True - True - False - True - True - - Saturday - - - - False - False - 5 - - - - - S_un - True - True - False - True - True - - Sunday - - - - False - False - 6 - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - Monday -Tuesday -Wednesday -Thursday -Friday -Saturday -Sunday - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - 1 - - - - - False - 3 - - - - - True - 0 - <span weight="bold">Alerts</span> - True - - - False - False - 4 - - - - - True - 12 - - - True - - - False - False - 0 - - - - - True - 6 - - - _Ask for confirmation when deleting items - True - True - False - True - True - - - False - False - 0 - - - - - True - 4 - - - Sh_ow a reminder - True - True - False - True - True - - - False - False - 0 - - - - - True - True - 0 0 9999 1 10 0 - 1 - - - 1 - - - - - True - Minutes -Hours -Days - - - 2 - - - - - True - before every appointment - - - False - False - 3 - - - - - 1 - - - - - True - 4 - - - Show a _reminder - True - True - False - True - True - - - False - False - 0 - - - - - True - True - 0 0 9999 1 10 0 - 1 - - - 1 - - - - - True - Minutes -Hours -Days - - - 2 - - - - - True - before every anniversary/birthday - - - False - False - 3 - - - - - 2 - - - - - 1 - - - - - False - 5 - - - - - - - True - General - - - False - tab - - - - - True - 12 - 12 - - - True - 0 - <span weight="bold">General</span> - True - - - False - False - 0 - - - - - True - 12 - - - True - - - False - False - 0 - - - - - True - 6 - - - True - 6 - - - True - _Time divisions: - True - time_divisions - - - False - False - 0 - - - - - True - 60 minutes -30 minutes -15 minutes -10 minutes -05 minutes - - - 1 - - - - - 0 - - - - - _Show appointment end times in week and month view - True - True - False - True - True - - - False - False - 1 - - - - - _Compress weekends in month view - True - True - False - True - True - - - False - False - 2 - - - - - Show week _numbers in date navigator - True - True - False - True - True - - - False - False - 3 - - - - - Show week n_umber in Day and Work Week View - True - True - False - True - True - - - False - False - 4 - - - - - Sc_roll Month View by a week - True - True - False - True - True - - - False - False - 5 - - - - - 1 - - - - - False - 1 - - - - - True - 0 - <span weight="bold">Task List</span> - True - - - False - False - 2 - - - - - True - 12 - - - True - - - False - False - 0 - - - - - True - 6 - - - True - 2 - 2 - 6 - 6 - - - True - 0 - T_asks due today: - True - tasks_due_today_color - - - GTK_FILL - - - - - - True - 0 - _Overdue tasks: - True - tasks_overdue_color - - - 1 - 2 - GTK_FILL - - - - - - True - True - False - Pick a color - - - 1 - 2 - - - - - - - True - True - False - Pick a color - - - 1 - 2 - 1 - 2 - - - - - - - 0 - - - - - True - 6 - - - _Hide completed tasks after - True - True - False - True - True - - - False - False - 0 - - - - - True - True - 1 0 9999 1 10 0 - 1 - - - 1 - - - - - True - Minutes -Hours -Days - - - 2 - - - - - 1 - - - - - 1 - - - - - False - 3 - - - - - - True - <span weight="bold">Date/Time Format</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - 1 - 3 - False - 0 - 0 - - - 0 - True - True - - - - - 0 - True - True - - - - - 1 - - - - - True - Display - - - 1 - False - tab - - - - - True - 12 - 6 - - - True - <span weight="bold">Alarms</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 10 - 0 - - - - True - True - Display alarms in _notification area only - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 0 - False - True - - - - - - True - Select the calendars for alarm notification - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - -- True -- True -- automatic -- automatic -- in - - - - - - - 0 - True - True - - - - - 2 - - - - - True - Alarms - - - 2 - False - tab - - - - - True - 12 - 12 - - - True - 0 - <span weight="bold">Default Free/Busy Server</span> - True - - - False - False - 0 - - - - - True - 12 - - - True - - - False - False - 0 - - - - - True - 6 - - - True - 6 - - - True - Template: - - - False - False - 0 - - - - - True - True - - - 1 - - - - - 0 - - - - - True - <i>%u and %d will be replaced by user and domain from the email address.</i> - True - True - - - False - False - 1 - - - - - 1 - - - - - False - 1 - - - - - 3 - - - - - True - Free/Busy - - - 3 - False - tab - - - - - - diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h index ceaa379474..14011d8403 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.h +++ b/calendar/gui/dialogs/cal-prefs-dialog.h @@ -25,7 +25,6 @@ #define CAL_PREFS_DIALOG_H #include -#include #include #include #include @@ -57,7 +56,7 @@ typedef struct _CalendarPrefsDialogClass CalendarPrefsDialogClass; struct _CalendarPrefsDialog { GtkVBox parent; - GladeXML *gui; + GtkBuilder *builder; GConfClient *gconf; diff --git a/calendar/gui/dialogs/cal-prefs-dialog.ui b/calendar/gui/dialogs/cal-prefs-dialog.ui new file mode 100644 index 0000000000..263221793d --- /dev/null +++ b/calendar/gui/dialogs/cal-prefs-dialog.ui @@ -0,0 +1,1493 @@ + + + + 9999 + 0 + 10 + 1 + 0 + 0 + + + 9999 + 0 + 10 + 1 + 0 + 0 + + + 9999 + 0 + 10 + 1 + 0 + 1 + + + + + + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + Sunday + + + + + + + + + + Minutes + + + Hours + + + Days + + + + + + + + + + Minutes + + + Hours + + + Days + + + + + + + + + + 60 minutes + + + 30 minutes + + + 15 minutes + + + 10 minutes + + + 05 minutes + + + + + + + + + + Minutes + + + Hours + + + Days + + + + + + + True + True + + + True + 12 + 12 + + + True + 0 + <span weight="bold">Time</span> + True + + + False + False + 0 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 5 + 2 + 6 + 6 + + + True + 0 + Se_cond zone: + True + day_second_zone + + + 4 + 5 + GTK_FILL + + + + + + True + + + None + True + True + False + True + + + 0 + + + + + True + 6 + (Shown in a Day View) + + + False + False + 1 + + + + + 1 + 2 + 4 + 5 + GTK_FILL + GTK_FILL + + + + + True + 0 + Time format: + + + 3 + 4 + GTK_FILL + + + + + + True + 6 + + + _12 hour (AM/PM) + True + True + False + True + True + + + False + False + 0 + + + + + _24 hour + True + True + False + True + True + use_12_hour + + + False + False + 1 + + + + + 1 + 2 + 3 + 4 + GTK_FILL + GTK_FILL + + + + + True + + + + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + 0 + Time _zone: + True + timezone + + + GTK_FILL + + + + + + True + + + Use s_ystem time zone + True + True + False + True + True + + + False + 0 + + + + + True + 5 + (system/tz) + + + False + False + 1 + + + + + 1 + 2 + GTK_FILL + + + + + + + + + + + 1 + + + + + False + 1 + + + + + True + 0 + <span weight="bold">Work Week</span> + True + + + False + False + 2 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 4 + 2 + 6 + 6 + + + True + 0 + Wee_k starts on: + True + week_start_day + + + GTK_FILL + + + + + + True + 0 + Work days: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + _Day begins: + True + start_of_day + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Day _ends: + True + end_of_day + + + 3 + 4 + GTK_FILL + + + + + + False + True + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + False + True + + + 1 + 2 + 3 + 4 + GTK_FILL + GTK_FILL + + + + + True + 6 + + + _Mon + True + True + False + True + True + + + + + + Monday + + + + + False + False + 0 + + + + + _Tue + True + True + False + True + True + + + + + + Tuesday + + + + + False + False + 1 + + + + + _Wed + True + True + False + True + True + + + + + + Wednesday + + + + + False + False + 2 + + + + + T_hu + True + True + False + True + True + + + + + + Thursday + + + + + False + False + 3 + + + + + _Fri + True + True + False + True + True + + + + + + Friday + + + + + False + False + 4 + + + + + _Sat + True + True + False + True + True + + + + + + Saturday + + + + + False + False + 5 + + + + + S_un + True + True + False + True + True + + + + + + Sunday + + + + + False + False + 6 + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + model1 + + + + 0 + + + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + 1 + + + + + False + 3 + + + + + True + 0 + <span weight="bold">Alerts</span> + True + + + False + False + 4 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 6 + + + _Ask for confirmation when deleting items + True + True + False + True + True + + + False + False + 0 + + + + + True + 4 + + + Sh_ow a reminder + True + True + False + True + True + + + False + False + 0 + + + + + True + True + adjustment1 + 1 + + + 1 + + + + + True + model2 + + + + 0 + + + + + 2 + + + + + True + before every appointment + + + False + False + 3 + + + + + 1 + + + + + True + 4 + + + Show a _reminder + True + True + False + True + True + + + False + False + 0 + + + + + True + True + adjustment2 + 1 + + + 1 + + + + + True + model3 + + + + 0 + + + + + 2 + + + + + True + before every anniversary/birthday + + + False + False + 3 + + + + + 2 + + + + + 1 + + + + + False + 5 + + + + + + + True + General + + + False + + + + + True + 12 + 12 + + + True + 0 + <span weight="bold">General</span> + True + + + False + False + 0 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 6 + + + True + 6 + + + True + _Time divisions: + True + time_divisions + + + False + False + 0 + + + + + True + model4 + + + + 0 + + + + + 1 + + + + + 0 + + + + + _Show appointment end times in week and month view + True + True + False + True + True + + + False + False + 1 + + + + + _Compress weekends in month view + True + True + False + True + True + + + False + False + 2 + + + + + Show week _numbers in date navigator + True + True + False + True + True + + + False + False + 3 + + + + + Show week n_umber in Day and Work Week View + True + True + False + True + True + + + False + False + 4 + + + + + Sc_roll Month View by a week + True + True + False + True + True + + + False + False + 5 + + + + + 1 + + + + + False + 1 + + + + + True + 0 + <span weight="bold">Task List</span> + True + + + False + False + 2 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 6 + + + True + 2 + 2 + 6 + 6 + + + True + 0 + T_asks due today: + True + tasks_due_today_color + + + GTK_FILL + + + + + + True + 0 + _Overdue tasks: + True + tasks_overdue_color + + + 1 + 2 + GTK_FILL + + + + + + True + True + False + Pick a color + + + 1 + 2 + + + + + + + True + True + False + Pick a color + + + 1 + 2 + 1 + 2 + + + + + + + 0 + + + + + True + 6 + + + _Hide completed tasks after + True + True + False + True + True + + + False + False + 0 + + + + + True + True + adjustment3 + 1 + + + 1 + + + + + True + model5 + + + + 0 + + + + + 2 + + + + + 1 + + + + + 1 + + + + + False + 3 + + + + + True + <span weight="bold">Date/Time Format</span> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 12 + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + 1 + 3 + False + 0 + 0 + + + 0 + True + True + + + + + 0 + True + True + + + + + + + True + Display + + + 1 + False + + + + + True + 12 + 6 + + + True + <span weight="bold">Alarms</span> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 10 + 0 + + + True + True + Display alarms in _notification area only + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + + 0 + False + True + + + + + True + Select the calendars for alarm notification + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + True + automatic + automatic + in + + + + + 0 + True + True + + + + + + + True + Alarms + + + 2 + False + + + + + True + 12 + 12 + + + True + 0 + <span weight="bold">Default Free/Busy Server</span> + True + + + False + False + 0 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 6 + + + True + 6 + + + True + Template: + + + False + False + 0 + + + + + True + True + + + 1 + + + + + 0 + + + + + True + <i>%u and %d will be replaced by user and domain from the email address.</i> + True + True + + + False + False + 1 + + + + + 1 + + + + + False + 1 + + + + + + + True + Free/Busy + + + 3 + False + + + + diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c index 07b776912d..271ac5a8cc 100644 --- a/calendar/gui/dialogs/comp-editor-util.c +++ b/calendar/gui/dialogs/comp-editor-util.c @@ -36,6 +36,7 @@ #include "widgets/misc/e-dateedit.h" #include "../calendar-config.h" #include "../itip-utils.h" +#include #include "comp-editor-util.h" @@ -239,15 +240,27 @@ comp_editor_new_date_edit (EShellSettings *shell_settings, e_date_edit_set_make_time_insensitive (dedit, FALSE); #endif + comp_editor_bind_date_edit_settings (GTK_WIDGET (dedit), shell_settings); + + return GTK_WIDGET (dedit); +} + +void +comp_editor_bind_date_edit_settings (GtkWidget *dateedit, EShellSettings *shell_settings) +{ + g_return_if_fail (dateedit != NULL); + g_return_if_fail (E_IS_DATE_EDIT (dateedit)); + + if (!shell_settings) + shell_settings = e_shell_get_shell_settings (e_shell_get_default ()); + e_binding_new ( shell_settings, "cal-show-week-numbers", - dedit, "show-week-numbers"); + dateedit, "show-week-numbers"); e_binding_new ( shell_settings, "cal-week-start-day", - dedit, "week-start-day"); - - return GTK_WIDGET (dedit); + dateedit, "week-start-day"); } /* Returns the current time, for EDateEdit widgets and ECalendar items in the diff --git a/calendar/gui/dialogs/comp-editor-util.h b/calendar/gui/dialogs/comp-editor-util.h index ec481fa457..78a8bab33f 100644 --- a/calendar/gui/dialogs/comp-editor-util.h +++ b/calendar/gui/dialogs/comp-editor-util.h @@ -40,6 +40,8 @@ GtkWidget * comp_editor_new_date_edit (EShellSettings *shell_settings, gboolean show_time, gboolean make_time_insensitive); +void comp_editor_bind_date_edit_settings (GtkWidget *dateedit, EShellSettings *shell_settings); + struct tm comp_editor_get_current_time (GtkObject *object, gpointer data); gchar *comp_editor_strip_categories (const gchar *categories); diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c index 29582dc2db..551229cc6d 100644 --- a/calendar/gui/dialogs/e-delegate-dialog.c +++ b/calendar/gui/dialogs/e-delegate-dialog.c @@ -28,9 +28,9 @@ #include #include -#include #include #include +#include "e-util/e-util.h" #include "e-util/e-util-private.h" #include "e-delegate-dialog.h" @@ -38,10 +38,9 @@ struct _EDelegateDialogPrivate { gchar *name; gchar *address; - /* Glade XML data */ - GladeXML *xml; + GtkBuilder *builder; - /* Widgets from the Glade file */ + /* Widgets from the UI file */ GtkWidget *app; GtkWidget *hbox; GtkWidget *addressbook; @@ -121,7 +120,6 @@ e_delegate_dialog_construct (EDelegateDialog *edd, const gchar *name, const gcha EDestination *dest; ENameSelectorModel *name_selector_model; ENameSelectorDialog *name_selector_dialog; - gchar *gladefile; g_return_val_if_fail (edd != NULL, NULL); g_return_val_if_fail (E_IS_DELEGATE_DIALOG (edd), NULL); @@ -130,16 +128,8 @@ e_delegate_dialog_construct (EDelegateDialog *edd, const gchar *name, const gcha /* Load the content widgets */ - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "e-delegate-dialog.glade", - NULL); - priv->xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - if (!priv->xml) { - g_message ("e_delegate_dialog_construct(): Could not load the Glade XML file!"); - goto error; - } + priv->builder = gtk_builder_new (); + e_load_ui_builder_definition (priv->builder, "e-delegate-dialog.ui"); if (!get_widgets (edd)) { g_message ("e_delegate_dialog_construct(): Could not find all widgets in the XML file!"); @@ -186,11 +176,9 @@ get_widgets (EDelegateDialog *edd) priv = edd->priv; -#define GW(name) glade_xml_get_widget (priv->xml, name) - - priv->app = GW ("delegate-dialog"); - priv->hbox = GW ("delegate-hbox"); - priv->addressbook = GW ("addressbook"); + priv->app = e_builder_get_widget (priv->builder, "delegate-dialog"); + priv->hbox = e_builder_get_widget (priv->builder, "delegate-hbox"); + priv->addressbook = e_builder_get_widget (priv->builder, "addressbook"); return (priv->app && priv->hbox diff --git a/calendar/gui/dialogs/e-delegate-dialog.glade b/calendar/gui/dialogs/e-delegate-dialog.glade deleted file mode 100644 index 3beae0b5a2..0000000000 --- a/calendar/gui/dialogs/e-delegate-dialog.glade +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - Enter Delegate - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - True - False - True - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - -6 - - - - - - True - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - False - 6 - - - - True - Delegate To: - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - True - Contacts... - True - GTK_RELIEF_NORMAL - - - 0 - False - False - GTK_PACK_END - - - - - 0 - False - False - - - - - - - diff --git a/calendar/gui/dialogs/e-delegate-dialog.ui b/calendar/gui/dialogs/e-delegate-dialog.ui new file mode 100644 index 0000000000..3330e04a45 --- /dev/null +++ b/calendar/gui/dialogs/e-delegate-dialog.ui @@ -0,0 +1,104 @@ + + + + + Enter Delegate + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + False + True + False + 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 + + + + + 0 + False + True + GTK_PACK_END + + + + + True + False + 6 + + + True + Delegate To: + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + True + Contacts... + True + GTK_RELIEF_NORMAL + + + 0 + False + False + GTK_PACK_END + + + + + 0 + False + False + + + + + + cancel-button + ok-button + + + diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index 5c01557758..23256adff0 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -30,7 +30,6 @@ #endif #include -#include #include #include diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 35a4719a77..4af9bec0d2 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -32,22 +32,23 @@ #include #include #include -#include #include #include #include #include "common/authentication.h" -#include "e-util/e-categories-config.h" -#include "e-util/e-dialog-widgets.h" #include "misc/e-dateedit.h" #include "misc/e-send-options.h" #include "misc/e-buffer-tagger.h" #include #include "../calendar-config.h" #include "../e-timezone-entry.h" -#include -#include -#include + +#include "e-util/e-util.h" +#include "e-util/e-categories-config.h" +#include "e-util/e-dialog-utils.h" +#include "e-util/e-dialog-widgets.h" +#include "e-util/e-dialog-widgets.h" +#include "e-util/e-util-private.h" #include "../e-meeting-attendee.h" #include "../e-meeting-store.h" @@ -93,10 +94,9 @@ static const gint alarm_map_without_user_time[] = { /* Private part of the EventPage structure */ struct _EventPagePrivate { - /* Glade XML data */ - GladeXML *xml; + GtkBuilder *builder; - /* Widgets from the Glade file */ + /* Widgets from the UI file */ GtkWidget *main; /* Generic informative messages placeholder */ @@ -229,9 +229,9 @@ event_page_dispose (GObject *object) priv->main = NULL; } - if (priv->xml != NULL) { - g_object_unref (priv->xml); - priv->xml = NULL; + if (priv->builder != NULL) { + g_object_unref (priv->builder); + priv->builder = NULL; } if (priv->alarm_list_store != NULL) { @@ -2114,7 +2114,7 @@ get_widgets (EventPage *epage) priv = epage->priv; -#define GW(name) glade_xml_get_widget (priv->xml, name) +#define GW(name) e_builder_get_widget (priv->builder, name) editor = comp_editor_page_get_editor (page); @@ -2157,6 +2157,7 @@ get_widgets (EventPage *epage) priv->organizer = GW ("organizer"); gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer)))); + gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (priv->organizer), 0); priv->summary = GW ("summary"); priv->summary_label = GW ("summary-label"); @@ -2194,6 +2195,7 @@ get_widgets (EventPage *epage) /* Glade's visibility flag doesn't seem to work for custom widgets */ priv->start_time = GW ("start-time"); + comp_editor_bind_date_edit_settings (priv->start_time, NULL); gtk_widget_show (priv->start_time); priv->time_hour = GW ("time-hour"); @@ -2202,6 +2204,7 @@ get_widgets (EventPage *epage) priv->end_time_combo = GW ("end-time-combobox"); priv->end_time = GW ("end-time"); + comp_editor_bind_date_edit_settings (priv->end_time, NULL); gtk_widget_show_all (priv->time_hour); gtk_widget_hide (priv->end_time); @@ -2211,6 +2214,8 @@ get_widgets (EventPage *epage) #undef GW + e_util_set_source_combo_box_list (priv->source_selector, "/apps/evolution/calendar/sources"); + completion = e_category_completion_new (); gtk_entry_set_completion (GTK_ENTRY (priv->categories), completion); g_object_unref (completion); @@ -3050,23 +3055,13 @@ event_page_construct (EventPage *epage, EMeetingStore *model) EventPagePrivate *priv; EIterator *it; EAccount *a; - gchar *gladefile; priv = epage->priv; g_object_ref (model); priv->model = model; - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "event-page.glade", - NULL); - priv->xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - if (!priv->xml) { - g_message ("event_page_construct(): " - "Could not load the Glade XML file!"); - return NULL; - } + priv->builder = gtk_builder_new (); + e_load_ui_builder_definition (priv->builder, "event-page.ui"); if (!get_widgets (epage)) { g_message ("event_page_construct(): " @@ -3134,61 +3129,6 @@ event_page_new (EMeetingStore *model, CompEditor *editor) return epage; } -GtkWidget *make_date_edit (void); - -GtkWidget * -make_date_edit (void) -{ - EShell *shell; - EShellSettings *shell_settings; - - shell = e_shell_get_default (); - shell_settings = e_shell_get_shell_settings (shell); - - return comp_editor_new_date_edit (shell_settings, TRUE, TRUE, TRUE); -} - -GtkWidget *make_timezone_entry (void); - -GtkWidget * -make_timezone_entry (void) -{ - GtkWidget *w; - - w = e_timezone_entry_new (); - gtk_widget_show (w); - return w; -} - -GtkWidget *event_page_create_source_combo_box (void); - -GtkWidget * -event_page_create_source_combo_box (void) -{ - GtkWidget *combo_box; - GConfClient *gconf_client; - ESourceList *source_list; - - gconf_client = gconf_client_get_default (); - source_list = e_source_list_new_for_gconf ( - gconf_client, "/apps/evolution/calendar/sources"); - - combo_box = e_source_combo_box_new (source_list); - g_object_unref (source_list); - g_object_unref (gconf_client); - - gtk_widget_show (combo_box); - return combo_box; -} - -GtkWidget *make_status_icons (void); - -GtkWidget * -make_status_icons (void) -{ - return gtk_hbox_new (FALSE, 2); -} - static void set_attendees (ECalComponent *comp, const GPtrArray *attendees) { diff --git a/calendar/gui/dialogs/event-page.glade b/calendar/gui/dialogs/event-page.glade deleted file mode 100644 index 19e2529ba5..0000000000 --- a/calendar/gui/dialogs/event-page.glade +++ /dev/null @@ -1,1181 +0,0 @@ - - - - - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 0 - - - - 2 - True - False - 0 - - - - - - - 0 - False - False - - - - - - False - 0 - - - - True - 0.5 - 0.5 - 0 - 0 - - - 6 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 3 - False - False - - - - - - True - False - 0 - - - - 6 - True - False - 0 - - - - - - - 0 - False - False - - - - - - True - 9 - 2 - False - 0 - 12 - - - - True - _Location: - True - False - GTK_JUSTIFY_CENTER - False - False - 7.45058015283e-09 - 0.5 - 0 - 0 - location - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 3 - 4 - fill - - - - - - - True - _Description: - True - False - GTK_JUSTIFY_CENTER - False - False - 7.45058015283e-09 - 0 - 0 - 0 - description - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 7 - 8 - fill - fill - - - - - - True - Or_ganizer: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - _Time: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - start-time - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 4 - 5 - fill - - - - - - - True - Time _zone: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 5 - 6 - fill - - - - - - - True - True - Ca_tegories... - True - GTK_RELIEF_NORMAL - True - - - 0 - 1 - 6 - 7 - fill - - - - - - - True - Su_mmary: - True - False - GTK_JUSTIFY_CENTER - False - False - 7.45058015283e-09 - 0.5 - 0 - 0 - summary - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - 3 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 2 - 3 - 3 - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 3 - 4 - 3 - - - - - - - True - False - 0 - - - - True - make_date_edit - 0 - 0 - Sun, 09 Oct 2005 05:53:12 GMT - - - 2 - False - False - - - - - - True - False - 0 - - - - True - for -until - False - True - - - 12 - False - False - - - - - - True - False - 0 - - - - True - False - 0 - - - - 52 - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 0 0 1 1 0 - - - 0 - False - False - - - - - - True - hours - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 6 - False - False - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 0 59 5 10 0 - - - 0 - True - True - - - - - - True - minutes - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 6 - False - False - - - - - 2 - False - False - - - - - - True - make_date_edit - 0 - 0 - Sun, 09 Oct 2005 06:12:10 GMT - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - make_status_icons - 0 - 0 - Thu, 24 Nov 2005 07:10:06 GMT - - - 4 - False - False - - - - - 0 - False - False - - - - - 1 - 2 - 4 - 5 - 3 - fill - fill - - - - - - True - make_timezone_entry - 0 - 0 - Mon, 10 Oct 2005 11:05:54 GMT - - - 1 - 2 - 5 - 6 - 3 - fill - fill - - - - - - True - True - True - True - 0 - - True - * - False - - Categories - - - - 1 - 2 - 6 - 7 - 3 - - - - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_WORD - True - 0 - 0 - 0 - 0 - 0 - 0 - - - Event Description - - - - - - 1 - 2 - 7 - 8 - 3 - expand|shrink|fill - expand|shrink|fill - - - - - - 150 - True - False - 6 - - - - - - - - True - GTK_BUTTONBOX_START - 2 - - - - True - True - True - gtk-add - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-edit - True - GTK_RELIEF_NORMAL - True - - - - - 0 - False - True - GTK_PACK_END - - - - - 1 - 2 - 1 - 2 - 3 - fill - fill - - - - - - True - True - 0 - - - - True - a -b - False - True - True - - - 0 - True - True - - - - - - True - False - 0 - - - - True - _Calendar: - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - source - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 6 - False - False - - - - - - True - event_page_create_source_combo_box - 0 - 0 - Wed, 17 Dec 2003 18:20:26 GMT - - - 0 - True - True - - - - - 0 - True - True - - - - - 1 - 2 - 0 - 1 - 3 - fill - fill - - - - - - True - False - 0 - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-jump-to - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Attendee_s... - 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 - - - - - - True - Attendees - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 0 - 1 - 1 - 2 - 3 - fill - fill - - - - - 0 - True - True - - - - - - 6 - True - False - 0 - - - - - - - 0 - False - False - - - - - 0 - True - True - - - - - - 2 - True - False - 0 - - - - - - - 0 - False - False - - - - - - - - 4 - Alarms - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - -7 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 4 - True - False - 0 - - - - True - False - 0 - - - - True - False - 0 - - - - True - _Alarm - True - False - GTK_JUSTIFY_LEFT - False - False - 0.509999990463 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - 15 minutes before appointment -1 hour before appointment -1 day before appointment - False - True - - - 4 - False - False - - - - - - - - - 8 - False - True - - - - - - True - False - 3 - - - - True - False - 0 - - - - True - Custom Alarm: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 0 - False - False - - - - - - - - - 0 - True - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - diff --git a/calendar/gui/dialogs/event-page.ui b/calendar/gui/dialogs/event-page.ui new file mode 100644 index 0000000000..9f5e08f946 --- /dev/null +++ b/calendar/gui/dialogs/event-page.ui @@ -0,0 +1,1164 @@ + + + + + 0 + 0 + 1 + 1 + 0 + 1 + + + 59 + 0 + 10 + 5 + 0 + 0 + + + + + + + + for + + + until + + + + + + + + + + + + + + + 15 minutes before appointment + + + 1 hour before appointment + + + 1 day before appointment + + + + + window1 + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + True + False + 0 + + + 2 + True + False + 0 + + + + + + 0 + False + False + + + + + False + 0 + + + True + 0.5 + 0.5 + 0 + 0 + + + 6 + False + False + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 3 + False + False + + + + + True + False + 0 + + + 6 + True + False + 0 + + + + + + 0 + False + False + + + + + True + 9 + 2 + False + 0 + 12 + + + True + _Location: + True + False + GTK_JUSTIFY_CENTER + False + False + 7.45058015283e-09 + 0.5 + 0 + 0 + location + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + True + _Description: + True + False + GTK_JUSTIFY_CENTER + False + False + 7.45058015283e-09 + 0 + 0 + 0 + description + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 7 + 8 + fill + fill + + + + + True + Or_ganizer: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + True + _Time: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + start-time + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 4 + 5 + fill + + + + + + True + Time _zone: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 5 + 6 + fill + + + + + + True + True + Ca_tegories... + True + GTK_RELIEF_NORMAL + True + + + 0 + 1 + 6 + 7 + fill + + + + + + True + Su_mmary: + True + False + GTK_JUSTIFY_CENTER + False + False + 7.45058015283e-09 + 0.5 + 0 + 0 + summary + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + 3 + fill + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 2 + 3 + 3 + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 3 + 4 + 3 + + + + + + True + False + 0 + + + True + True + True + False + + + 2 + False + False + + + + + True + False + 0 + + + True + False + True + model1 + + + + 0 + + + + + 12 + False + False + + + + + True + False + 0 + + + True + False + 0 + + + 52 + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + adjustment1 + + + 0 + False + False + + + + + True + hours + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 6 + False + False + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + adjustment2 + + + 0 + True + True + + + + + True + minutes + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 6 + False + False + + + + + 2 + False + False + + + + + True + True + True + False + + + 0 + True + True + + + + + 0 + True + True + + + + + True + False + 2 + + + 4 + False + False + + + + + 0 + False + False + + + + + 1 + 2 + 4 + 5 + 3 + fill + fill + + + + + True + + + 1 + 2 + 5 + 6 + 3 + fill + fill + + + + + True + True + True + True + 0 + + True + * + False + + + + + + Categories + + + + + 1 + 2 + 6 + 7 + 3 + + + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + True + True + True + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + Event Description + + + + + + + 1 + 2 + 7 + 8 + 3 + expand|shrink|fill + expand|shrink|fill + + + + + 150 + True + False + 6 + + + + + + True + GTK_BUTTONBOX_START + 2 + + + True + True + True + gtk-add + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-remove + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-edit + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + 1 + 2 + 1 + 2 + 3 + fill + fill + + + + + True + True + 0 + + + True + False + True + True + model2 + + + 0 + True + True + + + + + True + False + 0 + + + True + _Calendar: + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + source + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 6 + False + False + + + + + True + + + 0 + True + True + + + + + 0 + True + True + + + + + 1 + 2 + 0 + 1 + 3 + fill + fill + + + + + True + False + 0 + + + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + gtk-jump-to + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + Attendee_s... + 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 + + + + + True + Attendees + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 0 + 1 + 1 + 2 + 3 + fill + fill + + + + + 0 + True + True + + + + + 6 + True + False + 0 + + + + + + 0 + False + False + + + + + 0 + True + True + + + + + 2 + True + False + 0 + + + + + + 0 + False + False + + + + + + + 4 + Alarms + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + True + False + 0 + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-close + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + 4 + True + False + 0 + + + True + False + 0 + + + True + False + 0 + + + True + _Alarm + True + False + GTK_JUSTIFY_LEFT + False + False + 0.509999990463 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + True + model3 + + + + 0 + + + + + 4 + False + False + + + + + + + + 8 + False + True + + + + + True + False + 3 + + + True + False + 0 + + + True + Custom Alarm: + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 0 + False + False + + + + + + + + 0 + True + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + button1 + + + diff --git a/calendar/gui/dialogs/memo-editor.c b/calendar/gui/dialogs/memo-editor.c index bda54e55eb..8e988c00a5 100644 --- a/calendar/gui/dialogs/memo-editor.c +++ b/calendar/gui/dialogs/memo-editor.c @@ -29,7 +29,6 @@ #endif #include -#include #include #include diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index 6e51196a09..98b6545e18 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -42,11 +41,13 @@ #include #include "misc/e-buffer-tagger.h" -#include "common/authentication.h" -#include "e-util/e-dialog-widgets.h" -#include +#include "e-util/e-util.h" #include "e-util/e-categories-config.h" +#include "e-util/e-dialog-utils.h" +#include "e-util/e-dialog-widgets.h" #include "e-util/e-util-private.h" + +#include "common/authentication.h" #include "../calendar-config.h" #include "comp-editor.h" #include "comp-editor-util.h" @@ -59,10 +60,9 @@ /* Private part of the MemoPage structure */ struct _MemoPagePrivate { - /* Glade XML data */ - GladeXML *xml; + GtkBuilder *builder; - /* Widgets from the Glade file */ + /* Widgets from the UI file */ GtkWidget *main; GtkWidget *memo_content; @@ -161,9 +161,9 @@ memo_page_finalize (GObject *object) priv->main = NULL; } - if (priv->xml) { - g_object_unref (priv->xml); - priv->xml = NULL; + if (priv->builder) { + g_object_unref (priv->builder); + priv->builder = NULL; } g_free (priv->subscriber_info_text); @@ -770,7 +770,7 @@ get_widgets (MemoPage *mpage) priv = mpage->priv; -#define GW(name) glade_xml_get_widget (priv->xml, name) +#define GW(name) e_builder_get_widget (priv->builder, name) priv->main = GW ("memo-page"); if (!priv->main) { @@ -795,6 +795,7 @@ get_widgets (MemoPage *mpage) priv->org_label = GW ("org-label"); priv->org_combo = GW ("org-combo"); gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->org_combo)))); + gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (priv->org_combo), 0); priv->to_button = GW ("to-button"); priv->to_hbox = GW ("to-hbox"); @@ -811,9 +812,11 @@ get_widgets (MemoPage *mpage) priv->categories = GW ("categories"); priv->source_selector = GW ("source"); - #undef GW + e_util_set_source_combo_box_list (priv->source_selector, "/apps/evolution/memos/sources"); + comp_editor_bind_date_edit_settings (priv->start_date, NULL); + completion = e_category_completion_new (); gtk_entry_set_completion (GTK_ENTRY (priv->categories), completion); g_object_unref (completion); @@ -1116,23 +1119,13 @@ memo_page_construct (MemoPage *mpage) CompEditor *editor; CompEditorFlags flags; EIterator *it; - gchar *gladefile; EAccount *a; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (mpage)); flags = comp_editor_get_flags (editor); - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "memo-page.glade", - NULL); - priv->xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - if (!priv->xml) { - g_message ("memo_page_construct(): " - "Could not load the Glade XML file!"); - return NULL; - } + priv->builder = gtk_builder_new (); + e_load_ui_builder_definition (priv->builder, "memo-page.ui"); if (!get_widgets (mpage)) { g_message ("memo_page_construct(): " @@ -1219,44 +1212,3 @@ memo_page_new (CompEditor *editor) return mpage; } - -GtkWidget *memo_page_create_date_edit (void); - -GtkWidget * -memo_page_create_date_edit (void) -{ - EShell *shell; - EShellSettings *shell_settings; - GtkWidget *widget; - - shell = e_shell_get_default (); - shell_settings = e_shell_get_shell_settings (shell); - - widget = comp_editor_new_date_edit (shell_settings, TRUE, FALSE, TRUE); - e_date_edit_set_allow_no_date_set (E_DATE_EDIT (widget), TRUE); - gtk_widget_show (widget); - - return widget; -} - -GtkWidget *memo_page_create_source_combo_box (void); - -GtkWidget * -memo_page_create_source_combo_box (void) -{ - GtkWidget *widget; - GConfClient *client; - ESourceList *source_list; - - client = gconf_client_get_default (); - source_list = e_source_list_new_for_gconf ( - client, "/apps/evolution/memos/sources"); - - widget = e_source_combo_box_new (source_list); - gtk_widget_show (widget); - - g_object_unref (source_list); - g_object_unref (client); - - return widget; -} diff --git a/calendar/gui/dialogs/memo-page.glade b/calendar/gui/dialogs/memo-page.glade deleted file mode 100644 index 8728c9366e..0000000000 --- a/calendar/gui/dialogs/memo-page.glade +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 0 - - - - False - 0 - - - - True - 0.5 - 0.5 - 0 - 0 - - - 6 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 3 - False - False - - - - - - 3 - True - False - 0 - - - - True - 7 - 2 - False - 0 - 0 - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - 400 - 150 - True - True - True - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_WORD - True - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - 1 - 2 - 6 - 7 - 6 - 3 - expand|shrink|fill - expand|shrink|fill - - - - - - True - True - Ca_tegories... - True - GTK_RELIEF_NORMAL - True - - - 0 - 1 - 5 - 6 - 6 - 3 - fill - - - - - - - True - _Description: - memo_content - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0 - 0 - 0 - memo_content - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 6 - 7 - 6 - 3 - fill - fill - - - - - - True - False - 0 - - - - True - memo_page_create_source_combo_box - 0 - 0 - Tue, 13 Jan 2004 22:00:00 GMT - - - 0 - True - True - - - - - 1 - 2 - 2 - 3 - 6 - 3 - fill - fill - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 5 - 6 - 6 - 3 - - - - - - - True - _Group: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - source - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - 6 - 3 - fill - fill - - - - - - Or_ganizer: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - 6 - 3 - fill - - - - - - - True - T_o: - True - GTK_RELIEF_NORMAL - True - - - 0 - 1 - 1 - 2 - 6 - 3 - fill - - - - - - - True - Sta_rt date: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 4 - 5 - 6 - 3 - fill - shrink - - - - - - True - memo_page_create_date_edit - 0 - 0 - Mon, 17 Jul 2006 21:24:48 GMT - - - 1 - 2 - 4 - 5 - 6 - 3 - fill - fill - - - - - - True - True - True - True - 0 - - True - - False - - - 1 - 2 - 3 - 4 - 6 - 3 - - - - - - - True - Su_mmary: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - sum-entry - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 3 - 4 - 6 - 3 - fill - - - - - - - False - 0 - - - - - - - 1 - 2 - 1 - 2 - 6 - 3 - fill - fill - - - - - - True - a -b - False - True - True - - - 1 - 2 - 0 - 1 - fill - fill - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - diff --git a/calendar/gui/dialogs/memo-page.ui b/calendar/gui/dialogs/memo-page.ui new file mode 100644 index 0000000000..dc0d8df264 --- /dev/null +++ b/calendar/gui/dialogs/memo-page.ui @@ -0,0 +1,460 @@ + + + + + + + + + + window1 + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + True + False + 0 + + + False + 0 + + + True + 0.5 + 0.5 + 0 + 0 + + + 6 + False + False + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 3 + False + False + + + + + 3 + True + False + 0 + + + True + 7 + 2 + False + 0 + 0 + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + 400 + 150 + True + True + True + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + 1 + 2 + 6 + 7 + 6 + 3 + expand|shrink|fill + expand|shrink|fill + + + + + True + True + Ca_tegories... + True + GTK_RELIEF_NORMAL + True + + + 0 + 1 + 5 + 6 + 6 + 3 + fill + + + + + + True + _Description: + memo_content + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0 + 0 + 0 + memo_content + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 6 + 7 + 6 + 3 + fill + fill + + + + + True + False + 0 + + + True + + + 0 + True + True + + + + + 1 + 2 + 2 + 3 + 6 + 3 + fill + fill + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 5 + 6 + 6 + 3 + + + + + + True + _Group: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + source + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + 6 + 3 + fill + fill + + + + + Or_ganizer: + False + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + 6 + 3 + fill + + + + + + True + T_o: + True + GTK_RELIEF_NORMAL + True + + + 0 + 1 + 1 + 2 + 6 + 3 + fill + + + + + + True + Sta_rt date: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 4 + 5 + 6 + 3 + fill + shrink + + + + + True + True + False + True + + + 1 + 2 + 4 + 5 + 6 + 3 + fill + fill + + + + + True + True + True + True + 0 + + True + + False + + + 1 + 2 + 3 + 4 + 6 + 3 + + + + + + True + Su_mmary: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + sum-entry + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + 6 + 3 + fill + + + + + + False + 0 + + + + + + 1 + 2 + 1 + 2 + 6 + 3 + fill + fill + + + + + False + False + True + True + model1 + + + 1 + 2 + 0 + 1 + fill + fill + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index 8b341f5bc8..448ba7546f 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -32,11 +32,7 @@ #include #include -#include #include -#include -#include -#include #include #include #include @@ -47,6 +43,11 @@ #include "../e-date-time-list.h" #include "recurrence-page.h" +#include "e-util/e-util.h" +#include "e-util/e-binding.h" +#include "e-util/e-dialog-widgets.h" +#include "e-util/e-util-private.h" + #define RECURRENCE_PAGE_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), TYPE_RECURRENCE_PAGE, RecurrencePagePrivate)) @@ -136,10 +137,9 @@ struct _RecurrencePagePrivate { /* Component we use to expand the recurrence rules for the preview */ ECalComponent *comp; - /* Glade XML data */ - GladeXML *xml; + GtkBuilder *builder; - /* Widgets from the Glade file */ + /* Widgets from the UI file */ GtkWidget *main; GtkWidget *recurs; @@ -307,9 +307,9 @@ recurrence_page_dispose (GObject *object) priv->main = NULL; } - if (priv->xml != NULL) { - g_object_unref (priv->xml); - priv->xml = NULL; + if (priv->builder != NULL) { + g_object_unref (priv->builder); + priv->builder = NULL; } if (priv->comp != NULL) { @@ -1989,7 +1989,7 @@ get_widgets (RecurrencePage *rpage) priv = rpage->priv; -#define GW(name) glade_xml_get_widget (priv->xml, name) +#define GW(name) e_builder_get_widget (priv->builder, name) priv->main = GW ("recurrence-page"); if (!priv->main) @@ -2368,21 +2368,11 @@ recurrence_page_construct (RecurrencePage *rpage) { RecurrencePagePrivate *priv = rpage->priv; CompEditor *editor; - gchar *gladefile; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (rpage)); - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "recurrence-page.glade", - NULL); - priv->xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - if (!priv->xml) { - g_message ("recurrence_page_construct(): " - "Could not load the Glade XML file!"); - return NULL; - } + priv->builder = gtk_builder_new (); + e_load_ui_builder_definition (priv->builder, "recurrence-page.ui"); if (!get_widgets (rpage)) { g_message ("recurrence_page_construct(): " diff --git a/calendar/gui/dialogs/recurrence-page.glade b/calendar/gui/dialogs/recurrence-page.glade deleted file mode 100644 index 5cec3f8494..0000000000 --- a/calendar/gui/dialogs/recurrence-page.glade +++ /dev/null @@ -1,615 +0,0 @@ - - - - - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 12 - True - False - 6 - - - - True - <b>Recurrence</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 0 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 12 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 6 - - - - True - True - This appointment rec_urs - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - False - 6 - - - - True - False - 2 - - - - True - Every - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 1 1 10000 1 10 0 - - - 0 - False - False - - - - - - True - day(s) -week(s) -month(s) -year(s) - False - True - - - 0 - False - False - - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - 0 - False - False - - - - - - True - for -until -forever - False - True - - - 0 - False - False - - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - 0 - 0.5 - 1 - 1 - 0 - 0 - 0 - 0 - - - - - - - 0 - True - True - - - - - 0 - True - True - - - - - 0 - False - False - - - - - 0 - False - True - - - - - - True - <b>Exceptions</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 0 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 12 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 6 - - - - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - False - True - False - False - False - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_START - 6 - - - - True - True - True - gtk-add - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-preferences - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Edit - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - - - - True - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - True - - - - - 0 - False - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - <b>Preview</b> - False - True - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 0 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 12 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 0 - - - - True - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 0 - - - - - - - 0 - False - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - diff --git a/calendar/gui/dialogs/recurrence-page.ui b/calendar/gui/dialogs/recurrence-page.ui new file mode 100644 index 0000000000..f5f9f13524 --- /dev/null +++ b/calendar/gui/dialogs/recurrence-page.ui @@ -0,0 +1,622 @@ + + + + + 10000 + 1 + 10 + 1 + 0 + 1 + + + + + + + + day(s) + + + week(s) + + + month(s) + + + year(s) + + + + + + + + + + for + + + until + + + forever + + + + + window1 + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + 12 + True + False + 6 + + + True + <b>Recurrence</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 0 + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 12 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 6 + + + True + True + This appointment rec_urs + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + True + False + 6 + + + True + False + 2 + + + True + Every + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + adjustment1 + + + 0 + False + False + + + + + True + False + True + model1 + + + + 0 + + + + + 0 + False + False + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + 0 + False + False + + + + + True + False + True + model2 + + + + 0 + + + + + 0 + False + False + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + 0 + False + False + + + + + 0 + False + False + + + + + True + 0 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + + + 0 + True + True + + + + + 0 + True + True + + + + + 0 + False + False + + + + + 0 + False + True + + + + + True + <b>Exceptions</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 0 + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 12 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 6 + + + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + True + True + False + False + False + True + False + False + False + + + + + 0 + True + True + + + + + True + GTK_BUTTONBOX_START + 6 + + + True + True + True + gtk-add + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + gtk-preferences + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + _Edit + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + True + True + True + gtk-remove + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + True + <b>Preview</b> + False + True + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 0 + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 12 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 0 + + + True + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + + + + + + 0 + False + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c index a9a7afac1e..4c2b5cf9d0 100644 --- a/calendar/gui/dialogs/schedule-page.c +++ b/calendar/gui/dialogs/schedule-page.c @@ -31,7 +31,6 @@ #include #include -#include #include #include #include @@ -49,10 +48,9 @@ /* Private part of the SchedulePage structure */ struct _SchedulePagePrivate { - /* Glade XML data */ - GladeXML *xml; + GtkBuilder *builder; - /* Widgets from the Glade file */ + /* Widgets from the UI file */ GtkWidget *main; /* Model */ @@ -89,9 +87,9 @@ schedule_page_dispose (GObject *object) priv->main = NULL; } - if (priv->xml != NULL) { - g_object_unref (priv->xml); - priv->xml = NULL; + if (priv->builder != NULL) { + g_object_unref (priv->builder); + priv->builder = NULL; } if (priv->model != NULL) { @@ -316,7 +314,7 @@ get_widgets (SchedulePage *spage) priv = spage->priv; -#define GW(name) glade_xml_get_widget (priv->xml, name) +#define GW(name) e_builder_get_widget (priv->builder, name) priv->main = GW ("schedule-page"); if (!priv->main) @@ -389,23 +387,13 @@ schedule_page_construct (SchedulePage *spage, EMeetingStore *ems) EShellSettings *shell_settings; EShell *shell; CompEditor *editor; - gchar *gladefile; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (spage)); shell = comp_editor_get_shell (editor); shell_settings = e_shell_get_shell_settings (shell); - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "schedule-page.glade", - NULL); - priv->xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - if (!priv->xml) { - g_message ("schedule_page_construct(): " - "Could not load the Glade XML file!"); - return NULL; - } + priv->builder = gtk_builder_new (); + e_load_ui_builder_definition (priv->builder, "schedule-page.ui"); if (!get_widgets (spage)) { g_message ("schedule_page_construct(): " diff --git a/calendar/gui/dialogs/schedule-page.glade b/calendar/gui/dialogs/schedule-page.glade deleted file mode 100644 index 80f3767a2f..0000000000 --- a/calendar/gui/dialogs/schedule-page.glade +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - True - False - - - - 12 - True - False - 6 - - - - - diff --git a/calendar/gui/dialogs/schedule-page.ui b/calendar/gui/dialogs/schedule-page.ui new file mode 100644 index 0000000000..532f396a6b --- /dev/null +++ b/calendar/gui/dialogs/schedule-page.ui @@ -0,0 +1,20 @@ + + + + + window1 + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + False + True + False + + + 12 + True + False + 6 + + + + diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index 37a4b50627..96c2badf1a 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -31,25 +31,25 @@ #include #include -#include #include #include -#include "e-util/e-dialog-widgets.h" -#include "e-util/e-util-private.h" #include "../calendar-config.h" #include "../e-timezone-entry.h" #include "comp-editor-util.h" #include "task-details-page.h" +#include "e-util/e-util.h" +#include "e-util/e-dialog-widgets.h" +#include "e-util/e-util-private.h" + #define TASK_DETAILS_PAGE_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), TYPE_TASK_DETAILS_PAGE, TaskDetailsPagePrivate)) struct _TaskDetailsPagePrivate { - /* Glade XML data */ - GladeXML *xml; + GtkBuilder *builder; - /* Widgets from the Glade file */ + /* Widgets from the UI file */ GtkWidget *main; GtkWidget *status_combo; @@ -108,9 +108,9 @@ task_details_page_dispose (GObject *object) priv->main = NULL; } - if (priv->xml != NULL) { - g_object_unref (priv->xml); - priv->xml = NULL; + if (priv->builder != NULL) { + g_object_unref (priv->builder); + priv->builder = NULL; } /* Chain up to parent's dispose() method. */ @@ -451,7 +451,7 @@ get_widgets (TaskDetailsPage *tdpage) priv = tdpage->priv; -#define GW(name) glade_xml_get_widget (priv->xml, name) +#define GW(name) e_builder_get_widget (priv->builder, name) priv->main = GW ("task-details-page"); if (!priv->main) @@ -474,6 +474,7 @@ get_widgets (TaskDetailsPage *tdpage) priv->date_completed_label = GW ("date_completed_label"); priv->completed_date = GW ("completed-date"); + comp_editor_bind_date_edit_settings (priv->completed_date, NULL); gtk_widget_show (priv->completed_date); priv->url_label = GW ("url_label"); @@ -720,21 +721,11 @@ task_details_page_construct (TaskDetailsPage *tdpage) { TaskDetailsPagePrivate *priv = tdpage->priv; CompEditor *editor; - gchar *gladefile; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tdpage)); - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "task-details-page.glade", - NULL); - priv->xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - if (!priv->xml) { - g_message ("task_details_page_construct(): " - "Could not load the Glade XML file!"); - return NULL; - } + priv->builder = gtk_builder_new (); + e_load_ui_builder_definition (priv->builder, "task-details-page.ui"); if (!get_widgets (tdpage)) { g_message ("task_details_page_construct(): " @@ -772,22 +763,3 @@ task_details_page_new (CompEditor *editor) return tdpage; } - -GtkWidget *task_details_page_create_date_edit (void); - -GtkWidget * -task_details_page_create_date_edit (void) -{ - EShell *shell; - EShellSettings *shell_settings; - GtkWidget *dedit; - - shell = e_shell_get_default (); - shell_settings = e_shell_get_shell_settings (shell); - - dedit = comp_editor_new_date_edit (shell_settings, TRUE, TRUE, FALSE); - e_date_edit_set_allow_no_date_set (E_DATE_EDIT (dedit), TRUE); - - return dedit; -} - diff --git a/calendar/gui/dialogs/task-details-page.glade b/calendar/gui/dialogs/task-details-page.glade deleted file mode 100644 index 44fc3b2fbb..0000000000 --- a/calendar/gui/dialogs/task-details-page.glade +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 12 - True - False - 6 - - - - True - <span weight="bold">Status</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 0 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 12 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - 4 - 2 - False - 6 - 12 - - - - True - Stat_us: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - P_ercent complete: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - percent-complete - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - _Priority: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - _Date completed: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 3 - 4 - fill - - - - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 0 0 100 1 10 0 - - - 1 - 2 - 1 - 2 - fill - - - - - - - True - task_details_page_create_date_edit - 0 - 0 - Fri, 01 Jun 2001 18:58:51 GMT - - - - - - 1 - 2 - 3 - 4 - fill - - - - - - - True - High -Normal -Low -Undefined - False - True - - - 1 - 2 - 2 - 3 - fill - fill - - - - - - True - Not Started -In Progress -Completed -Canceled - False - True - - - 1 - 2 - 0 - 1 - fill - fill - - - - - 0 - True - True - - - - - 0 - False - False - - - - - - True - <span weight="bold">Miscellaneous</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 0 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 12 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - 6 - True - 1 - 2 - False - 6 - 6 - - - - True - _Web Page: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - e_url_entry_new - 0 - 0 - Fri, 08 Feb 2002 21:02:37 GMT - - - 1 - 2 - 0 - 1 - fill - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - diff --git a/calendar/gui/dialogs/task-details-page.ui b/calendar/gui/dialogs/task-details-page.ui new file mode 100644 index 0000000000..cd82f1dce0 --- /dev/null +++ b/calendar/gui/dialogs/task-details-page.ui @@ -0,0 +1,456 @@ + + + + + 100 + 0 + 10 + 1 + 0 + 0 + + + + + + + + High + + + Normal + + + Low + + + Undefined + + + + + + + + + + Not Started + + + In Progress + + + Completed + + + Canceled + + + + + window1 + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + 12 + True + False + 6 + + + True + <span weight="bold">Status</span> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 0 + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 12 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + 4 + 2 + False + 6 + 12 + + + True + Stat_us: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + True + P_ercent complete: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + percent-complete + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + True + _Priority: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + True + _Date completed: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + adjustment1 + + + 1 + 2 + 1 + 2 + fill + + + + + + True + True + True + True + + + + + + 1 + 2 + 3 + 4 + fill + + + + + + True + False + True + model1 + + + + 0 + + + + + 1 + 2 + 2 + 3 + fill + fill + + + + + True + False + True + model2 + + + + 0 + + + + + 1 + 2 + 0 + 1 + fill + fill + + + + + 0 + True + True + + + + + 0 + False + False + + + + + True + <span weight="bold">Miscellaneous</span> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + False + 0 + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 12 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 6 + True + 1 + 2 + False + 6 + 6 + + + True + _Web Page: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + True + + + 1 + 2 + 0 + 1 + fill + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 3de0f0bc08..a3d4baec46 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -30,7 +30,6 @@ #endif #include -#include #include #include "e-util/e-binding.h" diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 2b49192036..afc2368d2c 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -40,9 +39,6 @@ #include "misc/e-buffer-tagger.h" #include #include "common/authentication.h" -#include "e-util/e-dialog-widgets.h" -#include "e-util/e-categories-config.h" -#include "e-util/e-util-private.h" #include "../e-timezone-entry.h" #include "../calendar-config.h" #include "comp-editor.h" @@ -50,6 +46,11 @@ #include "e-send-options-utils.h" #include "task-page.h" +#include "e-util/e-util.h" +#include "e-util/e-dialog-widgets.h" +#include "e-util/e-categories-config.h" +#include "e-util/e-util-private.h" + #include "../e-meeting-attendee.h" #include "../e-meeting-store.h" #include "../e-meeting-list-view.h" @@ -60,10 +61,9 @@ /* Private part of the TaskPage structure */ struct _TaskPagePrivate { - /* Glade XML data */ - GladeXML *xml; + GtkBuilder *builder; - /* Widgets from the Glade file */ + /* Widgets from the UI file */ GtkWidget *main; EAccountList *accounts; @@ -160,9 +160,9 @@ task_page_dispose (GObject *object) priv->main = NULL; } - if (priv->xml != NULL) { - g_object_unref (priv->xml); - priv->xml = NULL; + if (priv->builder != NULL) { + g_object_unref (priv->builder); + priv->builder = NULL; } if (priv->sod != NULL) { @@ -1312,9 +1312,7 @@ get_widgets (TaskPage *tpage) priv = tpage->priv; -#define GW(name) glade_xml_get_widget (priv->xml, name) - - priv->main = GW ("task-page"); + priv->main = e_builder_get_widget (priv->builder, "task-page"); if (!priv->main) return FALSE; @@ -1328,37 +1326,40 @@ get_widgets (TaskPage *tpage) g_object_ref (priv->main); gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main); - priv->info_hbox = GW ("generic-info"); - priv->info_icon = GW ("generic-info-image"); - priv->info_string = GW ("generic-info-msgs"); + priv->info_hbox = e_builder_get_widget (priv->builder, "generic-info"); + priv->info_icon = e_builder_get_widget (priv->builder, "generic-info-image"); + priv->info_string = e_builder_get_widget (priv->builder, "generic-info-msgs"); - priv->summary = GW ("summary"); - priv->summary_label = GW ("summary-label"); + priv->summary = e_builder_get_widget (priv->builder, "summary"); + priv->summary_label = e_builder_get_widget (priv->builder, "summary-label"); /* Glade's visibility flag doesn't seem to work for custom widgets */ - priv->due_date = GW ("due-date"); + priv->due_date = e_builder_get_widget (priv->builder, "due-date"); + comp_editor_bind_date_edit_settings (priv->due_date, NULL); gtk_widget_show (priv->due_date); - priv->start_date = GW ("start-date"); + priv->start_date = e_builder_get_widget (priv->builder, "start-date"); + comp_editor_bind_date_edit_settings (priv->start_date, NULL); gtk_widget_show (priv->start_date); - priv->timezone = GW ("timezone"); - priv->timezone_label = GW ("timezone-label"); - priv->attendees_label = GW ("attendees-label"); - priv->description = GW ("description"); - priv->categories_btn = GW ("categories-button"); - priv->categories = GW ("categories"); + priv->timezone = e_builder_get_widget (priv->builder, "timezone"); + priv->timezone_label = e_builder_get_widget (priv->builder, "timezone-label"); + priv->attendees_label = e_builder_get_widget (priv->builder, "attendees-label"); + priv->description = e_builder_get_widget (priv->builder, "description"); + priv->categories_btn = e_builder_get_widget (priv->builder, "categories-button"); + priv->categories = e_builder_get_widget (priv->builder, "categories"); - priv->organizer = GW ("organizer"); + priv->organizer = e_builder_get_widget (priv->builder, "organizer"); gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer)))); + gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (priv->organizer), 0); - priv->invite = GW ("invite"); - priv->add = GW ("add-attendee"); - priv->edit = GW ("edit-attendee"); - priv->remove = GW ("remove-attendee"); - priv->list_box = GW ("list-box"); - priv->calendar_label = GW ("group-label"); - priv->attendee_box = GW ("attendee-box"); - priv->org_cal_label = GW ("org-task-label"); + priv->invite = e_builder_get_widget (priv->builder, "invite"); + priv->add = e_builder_get_widget (priv->builder, "add-attendee"); + priv->edit = e_builder_get_widget (priv->builder, "edit-attendee"); + priv->remove = e_builder_get_widget (priv->builder, "remove-attendee"); + priv->list_box = e_builder_get_widget (priv->builder, "list-box"); + priv->calendar_label = e_builder_get_widget (priv->builder, "group-label"); + priv->attendee_box = e_builder_get_widget (priv->builder, "attendee-box"); + priv->org_cal_label = e_builder_get_widget (priv->builder, "org-task-label"); priv->list_view = e_meeting_list_view_new (priv->model); @@ -1373,12 +1374,11 @@ get_widgets (TaskPage *tpage) gtk_container_add (GTK_CONTAINER (sw), GTK_WIDGET (priv->list_view)); gtk_box_pack_start (GTK_BOX (priv->list_box), sw, TRUE, TRUE, 0); - priv->source_selector = GW ("source"); + priv->source_selector = e_builder_get_widget (priv->builder, "source"); + e_util_set_source_combo_box_list (priv->source_selector, "/apps/evolution/tasks/sources"); gtk_label_set_mnemonic_widget (GTK_LABEL (priv->calendar_label), priv->source_selector); -#undef GW - completion = e_category_completion_new (); gtk_entry_set_completion (GTK_ENTRY (priv->categories), completion); g_object_unref (completion); @@ -1969,24 +1969,14 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client) TaskPagePrivate *priv; EIterator *it; EAccount *a; - gchar *gladefile; priv = tpage->priv; g_object_ref (model); priv->model = model; priv->client = client; - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "task-page.glade", - NULL); - priv->xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - if (!priv->xml) { - g_message ("task_page_construct(): " - "Could not load the Glade XML file!"); - return NULL; - } + priv->builder = gtk_builder_new (); + e_load_ui_builder_definition (priv->builder, "task-page.ui"); if (!get_widgets (tpage)) { g_message ("task_page_construct(): " @@ -2074,45 +2064,6 @@ task_page_get_cancel_comp (TaskPage *page) return e_cal_component_clone (priv->comp); } -GtkWidget *task_page_create_date_edit (void); - -GtkWidget * -task_page_create_date_edit (void) -{ - EShell *shell; - EShellSettings *shell_settings; - GtkWidget *dedit; - - shell = e_shell_get_default (); - shell_settings = e_shell_get_shell_settings (shell); - - dedit = comp_editor_new_date_edit (shell_settings, TRUE, TRUE, TRUE); - e_date_edit_set_allow_no_date_set (E_DATE_EDIT (dedit), TRUE); - - return dedit; -} - -GtkWidget *task_page_create_source_combo_box (void); - -GtkWidget * -task_page_create_source_combo_box (void) -{ - GtkWidget *combo_box; - GConfClient *gconf_client; - ESourceList *source_list; - - gconf_client = gconf_client_get_default (); - source_list = e_source_list_new_for_gconf ( - gconf_client, "/apps/evolution/tasks/sources"); - - combo_box = e_source_combo_box_new (source_list); - g_object_unref (source_list); - g_object_unref (gconf_client); - - gtk_widget_show (combo_box); - return combo_box; -} - /** * task_page_add_attendee * Add attendee to meeting store and name selector. diff --git a/calendar/gui/dialogs/task-page.glade b/calendar/gui/dialogs/task-page.glade deleted file mode 100644 index 72beb68f21..0000000000 --- a/calendar/gui/dialogs/task-page.glade +++ /dev/null @@ -1,739 +0,0 @@ - - - - - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 3 - True - False - 6 - - - - False - 0 - - - - True - 0.5 - 0.5 - 0 - 0 - - - 6 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 3 - False - False - - - - - - True - False - 0 - - - - True - False - 0 - - - - - - - 4 - False - True - - - - - - True - 8 - 2 - False - 0 - 12 - - - - True - Su_mmary: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - summary - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - Organi_zer: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - D_ue date: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - due-date - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 4 - 5 - fill - - - - - - - True - Sta_rt date: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - start-date - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 3 - 4 - fill - - - - - - - True - True - Categor_ies... - True - GTK_RELIEF_NORMAL - True - - - 0 - 1 - 6 - 7 - fill - - - - - - - True - Time zone: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 5 - 6 - fill - - - - - - - True - _Description: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0 - 0 - 0 - description - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 7 - 8 - fill - fill - - - - - - True - task_page_create_date_edit - 0 - 0 - Mon, 14 Jun 2004 18:16:13 GMT - - - - - - 1 - 2 - 3 - 4 - 3 - shrink|fill - shrink|fill - - - - - - True - task_page_create_date_edit - 0 - 0 - Mon, 14 Jun 2004 18:16:07 GMT - - - - - - 1 - 2 - 4 - 5 - 3 - fill - fill - - - - - - True - make_timezone_entry - 0 - 0 - Tue, 19 Jun 2001 04:43:54 GMT - - - 1 - 2 - 5 - 6 - 3 - fill - fill - - - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - 400 - 150 - True - True - True - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_WORD - True - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - 1 - 2 - 7 - 8 - 3 - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 2 - 3 - 3 - - - - - - - True - False - 6 - - - - - - - - True - GTK_BUTTONBOX_START - 0 - - - - True - True - True - gtk-add - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-edit - True - GTK_RELIEF_NORMAL - True - - - - - 0 - False - True - GTK_PACK_END - - - - - 1 - 2 - 1 - 2 - 3 - fill - fill - - - - - - True - False - 0 - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-jump-to - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Atte_ndees... - 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 - - - - - - - - - 0 - 1 - 1 - 2 - fill - fill - - - - - - True - True - 6 - - - - True - a -b - False - True - True - - - 0 - True - True - - - - - - True - False - 6 - - - - True - _Group: - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - 24 - True - task_page_create_source_combo_box - 0 - 0 - Thu, 18 Dec 2003 01:58:48 GMT - - - 0 - True - True - - - - - 0 - True - True - - - - - 1 - 2 - 0 - 1 - 3 - fill - fill - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 6 - 7 - 3 - - - - - - 0 - True - True - - - - - - True - False - 0 - - - - - - - 4 - False - True - - - - - 0 - True - True - - - - - - - diff --git a/calendar/gui/dialogs/task-page.ui b/calendar/gui/dialogs/task-page.ui new file mode 100644 index 0000000000..a491a962d0 --- /dev/null +++ b/calendar/gui/dialogs/task-page.ui @@ -0,0 +1,687 @@ + + + + + + + + + + window1 + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + 3 + True + False + 6 + + + False + 0 + + + True + 0.5 + 0.5 + 0 + 0 + + + 6 + False + False + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 3 + False + False + + + + + True + False + 0 + + + True + False + 0 + + + + + + 4 + False + True + + + + + True + 8 + 2 + False + 0 + 12 + + + True + Su_mmary: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + summary + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + True + Organi_zer: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + True + D_ue date: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + due-date + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 4 + 5 + fill + + + + + + True + Sta_rt date: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + start-date + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + True + True + Categor_ies... + True + GTK_RELIEF_NORMAL + True + + + 0 + 1 + 6 + 7 + fill + + + + + + True + Time zone: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 5 + 6 + fill + + + + + + True + _Description: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0 + 0 + 0 + description + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 7 + 8 + fill + fill + + + + + True + True + True + True + + + + + + 1 + 2 + 3 + 4 + 3 + shrink|fill + shrink|fill + + + + + True + True + True + True + + + + + + 1 + 2 + 4 + 5 + 3 + fill + fill + + + + + True + + + 1 + 2 + 5 + 6 + 3 + fill + fill + + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + 400 + 150 + True + True + True + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + 1 + 2 + 7 + 8 + 3 + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 2 + 3 + 3 + + + + + + True + False + 6 + + + + + + True + GTK_BUTTONBOX_START + 0 + + + True + True + True + gtk-add + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-remove + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-edit + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + 1 + 2 + 1 + 2 + 3 + fill + fill + + + + + True + False + 0 + + + True + True + GTK_RELIEF_NORMAL + True + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + True + False + 2 + + + True + gtk-jump-to + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True + Atte_ndees... + 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 + + + + + + + + 0 + 1 + 1 + 2 + fill + fill + + + + + True + True + 6 + + + True + False + True + True + model1 + + + 0 + True + True + + + + + True + False + 6 + + + True + _Group: + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 24 + True + + + 0 + True + True + + + + + 0 + True + True + + + + + 1 + 2 + 0 + 1 + 3 + fill + fill + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 6 + 7 + 3 + + + + + + 0 + True + True + + + + + True + False + 0 + + + + + + 4 + False + True + + + + + 0 + True + True + + + + + + diff --git a/calendar/gui/e-itip-control.glade b/calendar/gui/e-itip-control.glade deleted file mode 100644 index 78e191ea66..0000000000 --- a/calendar/gui/e-itip-control.glade +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - no - window1 - GTK_WINDOW_TOPLEVEL - no - no - yes - GTK_WIN_POS_CENTER_ON_PARENT - - - - 4 - Calendar Message - 0 - GTK_SHADOW_ETCHED_IN - yes - - - - GTK_POLICY_NEVER - GTK_POLICY_NEVER - yes - - - - GTK_SHADOW_NONE - yes - - - - no - 0 - yes - - - - 3 - no - 3 - 3 - 4 - 2 - yes - - - - yes - no - - 0 - yes - yes - - - 1 - 2 - 0 - 1 - 0 - 0 - expand|fill - - - - - - - yes - no - - 0 - yes - yes - - - 1 - 2 - 2 - 3 - 0 - 0 - expand|fill - - - - - - - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - yes - - - - yes - no - - GTK_WRAP_WORD - yes - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - 1 - 2 - 3 - 4 - 0 - 0 - fill - fill - - - - - - 0 - 0 - 1 - 1 - yes - - - - no - 0 - yes - - - - date-start - GTK_JUSTIFY_CENTER - no - 0.5 - 0 - 0 - 0 - yes - - - 0 - no - no - - - - - - --to-- - GTK_JUSTIFY_CENTER - no - 0.5 - 0 - 19 - 0 - yes - - - 0 - no - no - - - - - - date-end - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - - 1 - 2 - 1 - 2 - 0 - 0 - expand|fill - fill - - - - - - Organizer: - GTK_JUSTIFY_LEFT - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - 1 - 0 - 1 - 0 - 0 - fill - - - - - - - Date: - GTK_JUSTIFY_LEFT - no - 0 - 0 - 0 - 0 - yes - - - 0 - 1 - 1 - 2 - 0 - 0 - fill - - - - - - - Summary: - GTK_JUSTIFY_LEFT - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - 1 - 2 - 3 - 0 - 0 - fill - - - - - - - Description: - GTK_JUSTIFY_LEFT - no - 0 - 0 - 0 - 0 - yes - - - 0 - 1 - 3 - 4 - 0 - 0 - fill - fill - - - - - 6 - yes - yes - - - - - - Server Message: - GTK_JUSTIFY_LEFT - no - 7.45058e-09 - 0.5 - 3 - 0 - yes - - - 0 - no - no - - - - - - 3 - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - 365 - yes - - - - yes - no - - GTK_WRAP_WORD - yes - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - 0 - yes - no - - - - - - 3 - no - 0 - 30 - yes - - - - - - - 0 - no - no - - - - - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - - - - - no - Loading Calendar - GTK_WINDOW_DIALOG - no - no - yes - GTK_WIN_POS_CENTER - - - - 4 - - 0 - GTK_SHADOW_ETCHED_OUT - yes - - - - 7 - no - 1 - yes - - - - 6 - no - 9 - yes - - - - Loading calendar... - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - GTK_PROGRESS_CONTINUOUS - GTK_PROGRESS_LEFT_TO_RIGHT - no - no - %P %% - 0.5 - 0.5 - yes - 0 0 100 1 10 10 - - - 0 - no - no - - - - - 0 - no - no - - - - - - - - diff --git a/calendar/gui/e-itip-control.ui b/calendar/gui/e-itip-control.ui new file mode 100644 index 0000000000..b258301b46 --- /dev/null +++ b/calendar/gui/e-itip-control.ui @@ -0,0 +1,464 @@ + + + + + 100 + 0 + 10 + 1 + 10 + 0 + + + no + window1 + GTK_WINDOW_TOPLEVEL + no + no + yes + GTK_WIN_POS_CENTER_ON_PARENT + + + 4 + Calendar Message + 0 + GTK_SHADOW_ETCHED_IN + yes + + + GTK_POLICY_NEVER + GTK_POLICY_NEVER + yes + + + GTK_SHADOW_NONE + yes + + + no + 0 + yes + + + 3 + no + 3 + 3 + 4 + 2 + yes + + + yes + no + + 0 + yes + yes + + + 1 + 2 + 0 + 1 + 0 + 0 + expand|fill + + + + + + yes + no + + 0 + yes + yes + + + 1 + 2 + 2 + 3 + 0 + 0 + expand|fill + + + + + + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + yes + + + yes + no + GTK_WRAP_WORD + yes + + + + + GTK_UPDATE_CONTINUOUS + yes + + + + + GTK_UPDATE_CONTINUOUS + yes + + + + + 1 + 2 + 3 + 4 + 0 + 0 + fill + fill + + + + + 0 + 0 + 1 + 1 + yes + + + no + 0 + yes + + + date-start + GTK_JUSTIFY_CENTER + no + 0.5 + 0 + 0 + 0 + yes + + + 0 + no + no + + + + + --to-- + GTK_JUSTIFY_CENTER + no + 0.5 + 0 + 19 + 0 + yes + + + 0 + no + no + + + + + date-end + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + + + 1 + 2 + 1 + 2 + 0 + 0 + expand|fill + fill + + + + + Organizer: + GTK_JUSTIFY_LEFT + no + 0 + 0.5 + 0 + 0 + yes + + + 0 + 1 + 0 + 1 + 0 + 0 + fill + + + + + + Date: + GTK_JUSTIFY_LEFT + no + 0 + 0 + 0 + 0 + yes + + + 0 + 1 + 1 + 2 + 0 + 0 + fill + + + + + + Summary: + GTK_JUSTIFY_LEFT + no + 0 + 0.5 + 0 + 0 + yes + + + 0 + 1 + 2 + 3 + 0 + 0 + fill + + + + + + Description: + GTK_JUSTIFY_LEFT + no + 0 + 0 + 0 + 0 + yes + + + 0 + 1 + 3 + 4 + 0 + 0 + fill + fill + + + + + 6 + yes + yes + + + + + Server Message: + GTK_JUSTIFY_LEFT + no + 7.45058e-09 + 0.5 + 3 + 0 + yes + + + 0 + no + no + + + + + 3 + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + 365 + yes + + + yes + no + GTK_WRAP_WORD + yes + + + + + GTK_UPDATE_CONTINUOUS + yes + + + + + GTK_UPDATE_CONTINUOUS + yes + + + + + 0 + yes + no + + + + + 3 + no + 0 + 30 + yes + + + + + + 0 + no + no + + + + + + + + + GTK_UPDATE_CONTINUOUS + yes + + + + + GTK_UPDATE_CONTINUOUS + yes + + + + + + + + + no + Loading Calendar + GTK_WINDOW_DIALOG + no + no + yes + GTK_WIN_POS_CENTER + + + 4 + + 0 + GTK_SHADOW_ETCHED_OUT + yes + + + 7 + no + 1 + yes + + + 6 + no + 9 + yes + + + Loading calendar... + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + GTK_PROGRESS_CONTINUOUS + GTK_PROGRESS_LEFT_TO_RIGHT + no + no + %P %% + 0.5 + 0.5 + yes + adjustment1 + + + 0 + no + no + + + + + 0 + no + no + + + + + + + + diff --git a/calendar/gui/goto-dialog.glade b/calendar/gui/goto-dialog.glade deleted file mode 100644 index aeed7ae70d..0000000000 --- a/calendar/gui/goto-dialog.glade +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - Select Date - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - _Select Today - True - GTK_RELIEF_NORMAL - True - 0 - - - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - False - 4 - - - - True - True - 4 - - - - True - January -February -March -April -May -June -July -August -September -October -November -December - False - True - - - 0 - False - False - - - - - - True - True - 1 - 0 - True - GTK_UPDATE_IF_VALID - False - False - 1969 1969 2038 1 5 0 - - - 0 - True - True - - - - - 0 - True - True - - - - - - - - - 0 - True - True - - - - - - - diff --git a/calendar/gui/goto-dialog.ui b/calendar/gui/goto-dialog.ui new file mode 100644 index 0000000000..2e9fbf19d0 --- /dev/null +++ b/calendar/gui/goto-dialog.ui @@ -0,0 +1,180 @@ + + + + + 2038 + 1969 + 5 + 1 + 0 + 1969 + + + + + + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + + + Select Date + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + True + False + 8 + + + True + GTK_BUTTONBOX_END + + + True + True + True + _Select Today + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + True + False + 4 + + + True + True + 4 + + + True + False + True + model1 + + + + 0 + + + + + 0 + False + False + + + + + True + True + 1 + 0 + True + GTK_UPDATE_IF_VALID + False + False + adjustment1 + + + 0 + True + True + + + + + 0 + True + True + + + + + + + + 0 + True + True + + + + + + button4 + button5 + + + diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c index 6e68ec71ee..86f06f32dc 100644 --- a/calendar/gui/goto.c +++ b/calendar/gui/goto.c @@ -26,7 +26,6 @@ #include #include -#include #include "e-util/e-util-private.h" #include "calendar-config.h" #include "tag-calendar.h" @@ -34,7 +33,7 @@ typedef struct { - GladeXML *xml; + GtkBuilder *builder; GtkWidget *dialog; GtkWidget *month_combobox; @@ -172,7 +171,7 @@ goto_today (GoToDialog *dlg) static gboolean get_widgets (GoToDialog *dlg) { -#define GW(name) glade_xml_get_widget (dlg->xml, name) +#define GW(name) e_builder_get_widget (dlg->builder, name) dlg->dialog = GW ("goto-dialog"); @@ -204,14 +203,13 @@ goto_dialog_init_widgets (GoToDialog *dlg) /* Creates a "goto date" dialog and runs it */ void -goto_dialog (GnomeCalendar *gcal) +goto_dialog (GtkWindow *parent, GnomeCalendar *gcal) { ECalModel *model; time_t start_time; struct icaltimetype tt; icaltimezone *timezone; gint b; - gchar *gladefile; if (dlg) { return; @@ -220,16 +218,8 @@ goto_dialog (GnomeCalendar *gcal) dlg = g_new0 (GoToDialog, 1); /* Load the content widgets */ - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "goto-dialog.glade", - NULL); - dlg->xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - if (!dlg->xml) { - g_message ("goto_dialog(): Could not load the Glade XML file!"); - g_free (dlg); - return; - } + dlg->builder = gtk_builder_new (); + e_load_ui_builder_definition (dlg->builder, "goto-dialog.ui"); if (!get_widgets (dlg)) { g_message ("goto_dialog(): Could not find all widgets in the XML file!"); @@ -253,8 +243,7 @@ goto_dialog (GnomeCalendar *gcal) goto_dialog_init_widgets (dlg); - gtk_window_set_transient_for (GTK_WINDOW (dlg->dialog), - GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal)))); + gtk_window_set_transient_for (GTK_WINDOW (dlg->dialog), parent); /* set initial selection to current day */ @@ -275,7 +264,7 @@ goto_dialog (GnomeCalendar *gcal) if (b == 0) goto_today (dlg); - g_object_unref (dlg->xml); + g_object_unref (dlg->builder); g_free (dlg); dlg = NULL; } diff --git a/calendar/gui/goto.h b/calendar/gui/goto.h index 3b774d2e89..2b81757127 100644 --- a/calendar/gui/goto.h +++ b/calendar/gui/goto.h @@ -29,6 +29,6 @@ #include "gnome-cal.h" -void goto_dialog (GnomeCalendar *gcal); +void goto_dialog (GtkWindow *parent, GnomeCalendar *gcal); #endif -- cgit v1.2.3