aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-timezone-dialog/e-timezone-dialog.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-25 06:04:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-11-17 08:33:32 +0800
commit054c0881696a85f537e93b4950a28f505a3dc0f7 (patch)
treee63cfece426e2de5898c926eb6737cff229bb38b /widgets/e-timezone-dialog/e-timezone-dialog.c
parent6348266ee635db59a12d75497f980dd85d0fcf58 (diff)
downloadgsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar
gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar.gz
gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar.bz2
gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar.lz
gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar.xz
gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar.zst
gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.zip
BugĀ 589153 - Use GtkBuilder instead of libglade
Diffstat (limited to 'widgets/e-timezone-dialog/e-timezone-dialog.c')
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c40
1 files changed, 15 insertions, 25 deletions
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c
index 8f22695916..a7ea43d9e9 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.c
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -27,11 +27,11 @@
#include <time.h>
#include <string.h>
#include <glib/gi18n.h>
-#include <glade/glade.h>
#include <misc/e-map.h>
#include <libecal/e-cal-time-util.h>
#include <libecal/e-cal-system-timezone.h>
+#include "e-util/e-util.h"
#include "e-util/e-util-private.h"
#include "e-timezone-dialog.h"
@@ -58,8 +58,7 @@ struct _ETimezoneDialogPrivate {
the displayed name is ""). */
icaltimezone *zone;
- /* Glade XML data */
- GladeXML *xml;
+ GtkBuilder *builder;
EMapPoint *point_selected;
EMapPoint *point_hover;
@@ -69,7 +68,7 @@ struct _ETimezoneDialogPrivate {
/* The timeout used to flash the nearest point. */
guint timeout_id;
- /* Widgets from the Glade file */
+ /* Widgets from the UI file */
GtkWidget *app;
GtkWidget *table;
GtkWidget *map_window;
@@ -161,9 +160,9 @@ e_timezone_dialog_dispose (GObject *object)
priv->timeout_id = 0;
}
- if (priv->xml) {
- g_object_unref (priv->xml);
- priv->xml = NULL;
+ if (priv->builder) {
+ g_object_unref (priv->builder);
+ priv->builder = NULL;
}
(* G_OBJECT_CLASS (e_timezone_dialog_parent_class)->dispose) (object);
@@ -261,7 +260,6 @@ e_timezone_dialog_construct (ETimezoneDialog *etd)
{
ETimezoneDialogPrivate *priv;
GtkWidget *map;
- gchar *filename;
g_return_val_if_fail (etd != NULL, NULL);
g_return_val_if_fail (E_IS_TIMEZONE_DIALOG (etd), NULL);
@@ -270,16 +268,8 @@ e_timezone_dialog_construct (ETimezoneDialog *etd)
/* Load the content widgets */
- filename = g_build_filename (EVOLUTION_GLADEDIR,
- "e-timezone-dialog.glade",
- NULL);
- priv->xml = glade_xml_new (filename, NULL, NULL);
- g_free (filename);
-
- if (!priv->xml) {
- g_message ("e_timezone_dialog_construct(): Could not load the Glade XML file!");
- goto error;
- }
+ priv->builder = gtk_builder_new ();
+ e_load_ui_builder_definition (priv->builder, "e-timezone-dialog.ui");
if (!get_widgets (etd)) {
g_message ("e_timezone_dialog_construct(): Could not find all widgets in the XML file!");
@@ -364,16 +354,16 @@ static gboolean
get_widgets (ETimezoneDialog *etd)
{
ETimezoneDialogPrivate *priv;
+ GtkBuilder *builder;
priv = etd->priv;
+ builder = etd->priv->builder;
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->app = GW ("timezone-dialog");
- priv->map_window = GW ("map-window");
- priv->timezone_combo = GW ("timezone-combo");
- priv->table = GW ("timezone-table");
- priv->preview_label = GW ("preview-label");
+ priv->app = e_builder_get_widget (builder, "timezone-dialog");
+ priv->map_window = e_builder_get_widget (builder, "map-window");
+ priv->timezone_combo = e_builder_get_widget (builder, "timezone-combo");
+ priv->table = e_builder_get_widget (builder, "timezone-table");
+ priv->preview_label = e_builder_get_widget (builder, "preview-label");
return (priv->app
&& priv->map_window