[gnome-panel] [clock] Port to GtkBuilder



commit de160c30d2a23da7baf071dc86269321733c181c
Author: Vincent Untz <vuntz gnome org>
Date:   Tue Aug 11 15:55:06 2009 +0200

    [clock] Port to GtkBuilder

 applets/clock/Makefile.am               |   13 +-
 applets/clock/clock.c                   |  152 ++++++-----
 applets/clock/{clock.glade => clock.ui} |  484 ++++++++++++++++++-------------
 configure.in                            |    2 +-
 po/POTFILES.in                          |    2 +-
 5 files changed, 373 insertions(+), 280 deletions(-)
---
diff --git a/applets/clock/Makefile.am b/applets/clock/Makefile.am
index 87be581..5af69d4 100644
--- a/applets/clock/Makefile.am
+++ b/applets/clock/Makefile.am
@@ -10,7 +10,7 @@ INCLUDES =							\
 	$(POLKIT_GNOME_CFLAGS)					\
 	$(LIBPANEL_APPLET_CFLAGS)				\
 	-DDATADIR=\""$(datadir)"\"				\
-	-DGLADEDIR=\""$(datadir)/gnome-panel/glade"\"		\
+	-DBUILDERDIR=\""$(uidir)"\"				\
 	-DICONDIR=\""$(datadir)/gnome-panel/pixmaps"\"		\
 	-DLIBDIR=\""$(libdir)"\"				\
 	-DSYSCONFDIR=\""$(sysconfdir)"\"			\
@@ -164,12 +164,11 @@ if HAVE_POLKIT
 libexec_PROGRAMS += gnome-clock-applet-mechanism
 endif
 
-gladedir = $(datadir)/gnome-panel/glade
-glade_DATA =		\
-	clock.glade
+uidir		= $(datadir)/gnome-panel/ui
+ui_DATA		= clock.ui
 
-uidir 	= $(datadir)/gnome-2.0/ui
-ui_DATA	= GNOME_ClockApplet.xml
+xmluidir 	= $(datadir)/gnome-2.0/ui
+xmlui_DATA	= GNOME_ClockApplet.xml
 
 serverdir       = $(libdir)/bonobo/servers
 server_in_files = GNOME_ClockApplet_Factory.server.in
@@ -233,8 +232,8 @@ endif
 EXTRA_DIST =						\
 	GNOME_ClockApplet_Factory.server.in.in		\
 	$(schemas_in_files)				\
+	$(xmlui_DATA)					\
 	$(ui_DATA)					\
-	$(glade_DATA)					\
 	clock-marshallers.list				\
 	$(dbus_services_in_files)			\
 	org.gnome.ClockApplet.Mechanism.conf		\
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 31ad70e..772512d 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -51,7 +51,6 @@
 #include <gdk/gdkx.h>
 #include <gconf/gconf-client.h>
 
-#include <glade/glade.h>
 #include <libgweather/gweather-prefs.h>
 #include <libgweather/gweather-xml.h>
 #include <libgweather/location-entry.h>
@@ -128,7 +127,7 @@ struct _ClockData {
         GtkWidget *clock_vbox;
 	GtkSizeGroup *clock_group;
 
-	GladeXML *glade_xml;
+	GtkBuilder *builder;
 
         /* Preferences dialog */
         GtkWidget *prefs_window;
@@ -259,6 +258,13 @@ clock_box_class_init (ClockBoxClass *klass)
 
 /* Clock */
 
+static inline GtkWidget *
+_clock_get_widget (ClockData  *cd,
+		   const char *name)
+{
+	return GTK_WIDGET (gtk_builder_get_object (cd->builder, name));
+}
+
 static void
 unfix_size (ClockData *cd)
 {
@@ -786,6 +792,11 @@ destroy_clock (GtkWidget * widget, ClockData *cd)
                 cd->cities_store = NULL;
         }
 
+	if (cd->builder) {
+		g_object_unref (cd->builder);
+		cd->builder = NULL;
+	}
+
 	g_free (cd);
 
 #ifdef HAVE_LIBECAL
@@ -1032,7 +1043,7 @@ create_cities_store (ClockData *cd)
 
 	 
 	if (cd->prefs_window) { 	 
-		GtkWidget *widget = glade_xml_get_widget (cd->glade_xml, "cities_list"); 	 
+		GtkWidget *widget = _clock_get_widget (cd, "cities_list"); 	 
 		gtk_tree_view_set_model (GTK_TREE_VIEW (widget), 	 
 		GTK_TREE_MODEL (cd->cities_store)); 	 
 	}
@@ -1654,7 +1665,7 @@ set_time_callback (ClockData *cd, GError *error)
 	else
 		update_set_time_button (cd);
 
-	window = glade_xml_get_widget (cd->glade_xml, "set-time-window");
+	window = _clock_get_widget (cd, "set-time-window");
 	gtk_widget_hide (window);
 }
 
@@ -1787,14 +1798,14 @@ ensure_time_settings_window_is_created (ClockData *cd)
 	if (cd->set_time_window)
 		return;
 
-	cd->set_time_window = glade_xml_get_widget (cd->glade_xml, "set-time-window");
+	cd->set_time_window = _clock_get_widget (cd, "set-time-window");
 	g_signal_connect (cd->set_time_window, "delete_event",
 			  G_CALLBACK (delete_time_settings), cd); 
 
-        cd->calendar = glade_xml_get_widget (cd->glade_xml, "calendar");
-        cd->hours_spin = glade_xml_get_widget (cd->glade_xml, "hours_spin");
-        cd->minutes_spin = glade_xml_get_widget (cd->glade_xml, "minutes_spin");
-        cd->seconds_spin = glade_xml_get_widget (cd->glade_xml, "seconds_spin");
+        cd->calendar = _clock_get_widget (cd, "calendar");
+        cd->hours_spin = _clock_get_widget (cd, "hours_spin");
+        cd->minutes_spin = _clock_get_widget (cd, "minutes_spin");
+        cd->seconds_spin = _clock_get_widget (cd, "seconds_spin");
 
         gtk_entry_set_width_chars (GTK_ENTRY (cd->hours_spin), 2);
         gtk_entry_set_width_chars (GTK_ENTRY (cd->minutes_spin), 2);
@@ -1809,13 +1820,13 @@ ensure_time_settings_window_is_created (ClockData *cd)
 	g_signal_connect (cd->minutes_spin, "output", G_CALLBACK (output_cb), cd);
 	g_signal_connect (cd->seconds_spin, "output", G_CALLBACK (output_cb), cd);
 
-	cd->set_time_button = glade_xml_get_widget (cd->glade_xml, "set-time-button");
+	cd->set_time_button = _clock_get_widget (cd, "set-time-button");
 	g_signal_connect (cd->set_time_button, "clicked", G_CALLBACK (set_time), cd);
 
-	cancel_button = glade_xml_get_widget (cd->glade_xml, "cancel-set-time-button");
+	cancel_button = _clock_get_widget (cd, "cancel-set-time-button");
 	g_signal_connect (cancel_button, "clicked", G_CALLBACK (cancel_time_settings), cd);
 
-	cd->current_time_label = glade_xml_get_widget (cd->glade_xml, "current_time_label");
+	cd->current_time_label = _clock_get_widget (cd, "current_time_label");
 }
 
 static void
@@ -1954,9 +1965,7 @@ update_weather_bool_value_and_toggle_from_gconf (ClockData *cd, GConfEntry *entr
 
         *value_loc = (value != 0);
 
-	widget = glade_xml_get_widget (cd->glade_xml, widget_name);
-        if (!widget)
-                g_error ("Could not find the '%s' widget in the Glade file", widget_name);
+	widget = _clock_get_widget (cd, widget_name);
 
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget),
 				      *value_loc);
@@ -2197,9 +2206,7 @@ update_temperature_combo (ClockData *cd)
 	GtkWidget *widget;
         int active_index;
 
-	widget = glade_xml_get_widget (cd->glade_xml, "temperature_combo");
-	if (!widget)
-		g_error ("Could not find the 'temperature_combo' widget in the Glade file");
+	widget = _clock_get_widget (cd, "temperature_combo");
 
         if (cd->use_temperature_default)
                 active_index = 0;
@@ -2328,9 +2335,7 @@ update_speed_combo (ClockData *cd)
 	GtkWidget *widget;
         int active_index;
 
-	widget = glade_xml_get_widget (cd->glade_xml, "wind_speed_combo");
-	if (!widget)
-		g_error ("Could not find the 'wind_speed_combo' widget in the Glade file");
+	widget = _clock_get_widget (cd, "wind_speed_combo");
 
 	if (cd->use_speed_default)
                 active_index = 0;
@@ -2574,6 +2579,7 @@ fill_clock_applet (PanelApplet *applet)
 	ClockData         *cd;
 	BonoboUIComponent *popup_component;
         char              *filename;
+	GError            *error;
 
 	panel_applet_add_preferences (applet, CLOCK_SCHEMA_DIR, NULL);
 	panel_applet_set_flags (applet, PANEL_APPLET_EXPAND_MINOR);
@@ -2587,10 +2593,16 @@ fill_clock_applet (PanelApplet *applet)
 	setup_gconf (cd);
         load_gconf_settings (cd);
 
-        filename = g_build_filename (GLADEDIR, "clock.glade", NULL);
-        cd->glade_xml = glade_xml_new (filename, NULL, NULL);
-        if (!cd->glade_xml)
-                g_error ("%s/clock.glade not found; this installation is incorrect.", GLADEDIR);
+	cd->builder = gtk_builder_new ();
+        filename = g_build_filename (BUILDERDIR, "clock.ui", NULL);
+
+	error = NULL;
+	gtk_builder_add_from_file (cd->builder, filename, &error);
+        if (error) {
+		g_warning ("Error loading \"%s\": %s",
+			   filename, error->message);
+		g_error_free (error);
+	}
 
         g_free (filename);
 
@@ -2894,14 +2906,14 @@ save_cities_store (ClockData *cd)
 static void
 run_prefs_edit_save (GtkButton *button, ClockData *cd)
 {
-        GtkWidget *edit_window = glade_xml_get_widget (cd->glade_xml, "edit-location-window");
+        GtkWidget *edit_window = _clock_get_widget (cd, "edit-location-window");
 
         ClockLocation *loc = g_object_get_data (G_OBJECT (edit_window), "clock-location");
 
-        GtkWidget *lat_entry = glade_xml_get_widget (cd->glade_xml, "edit-location-latitude-entry");
-        GtkWidget *lon_entry = glade_xml_get_widget (cd->glade_xml, "edit-location-longitude-entry");
-        GtkWidget *lat_combo = glade_xml_get_widget (cd->glade_xml, "edit-location-latitude-combo");
-        GtkWidget *lon_combo = glade_xml_get_widget (cd->glade_xml, "edit-location-longitude-combo");
+        GtkWidget *lat_entry = _clock_get_widget (cd, "edit-location-latitude-entry");
+        GtkWidget *lon_entry = _clock_get_widget (cd, "edit-location-longitude-entry");
+        GtkWidget *lat_combo = _clock_get_widget (cd, "edit-location-latitude-combo");
+        GtkWidget *lon_combo = _clock_get_widget (cd, "edit-location-longitude-combo");
 
         const gchar *timezone, *weather_code;
         gchar *name;
@@ -2983,10 +2995,10 @@ update_coords_helper (gfloat value, GtkWidget *entry, GtkWidget *combo)
 static void
 update_coords (ClockData *cd, gboolean valid, gfloat lat, gfloat lon)
 {
-        GtkWidget *lat_entry = glade_xml_get_widget (cd->glade_xml, "edit-location-latitude-entry");
-        GtkWidget *lon_entry = glade_xml_get_widget (cd->glade_xml, "edit-location-longitude-entry");
-        GtkWidget *lat_combo = glade_xml_get_widget (cd->glade_xml, "edit-location-latitude-combo");
-        GtkWidget *lon_combo = glade_xml_get_widget (cd->glade_xml, "edit-location-longitude-combo");
+        GtkWidget *lat_entry = _clock_get_widget (cd, "edit-location-latitude-entry");
+        GtkWidget *lon_entry = _clock_get_widget (cd, "edit-location-longitude-entry");
+        GtkWidget *lat_combo = _clock_get_widget (cd, "edit-location-latitude-combo");
+        GtkWidget *lon_combo = _clock_get_widget (cd, "edit-location-longitude-combo");
 
 	if (!valid) {
         	gtk_entry_set_text (GTK_ENTRY (lat_entry), "");
@@ -3041,10 +3053,10 @@ location_changed (GObject *object, GParamSpec *param, ClockData *cd)
 static void
 edit_clear (ClockData *cd)
 {
-        GtkWidget *lat_entry = glade_xml_get_widget (cd->glade_xml, "edit-location-latitude-entry");
-        GtkWidget *lon_entry = glade_xml_get_widget (cd->glade_xml, "edit-location-longitude-entry");
-        GtkWidget *lat_combo = glade_xml_get_widget (cd->glade_xml, "edit-location-latitude-combo");
-        GtkWidget *lon_combo = glade_xml_get_widget (cd->glade_xml, "edit-location-longitude-combo");
+        GtkWidget *lat_entry = _clock_get_widget (cd, "edit-location-latitude-entry");
+        GtkWidget *lon_entry = _clock_get_widget (cd, "edit-location-longitude-entry");
+        GtkWidget *lat_combo = _clock_get_widget (cd, "edit-location-latitude-combo");
+        GtkWidget *lon_combo = _clock_get_widget (cd, "edit-location-longitude-combo");
 
         /* clear out the old data */
         gweather_location_entry_set_location (cd->location_entry, NULL);
@@ -3060,7 +3072,7 @@ edit_clear (ClockData *cd)
 static void
 edit_hide (GtkWidget *unused, ClockData *cd)
 {
-        GtkWidget *edit_window = glade_xml_get_widget (cd->glade_xml, "edit-location-window");
+        GtkWidget *edit_window = _clock_get_widget (cd, "edit-location-window");
 
         gtk_widget_hide (edit_window);
         edit_clear (cd);
@@ -3091,7 +3103,7 @@ prefs_hide (GtkWidget *widget, ClockData *cd)
 
 	gtk_widget_hide (cd->prefs_window);
 
-	tree = glade_xml_get_widget (cd->glade_xml, "cities_list");
+	tree = _clock_get_widget (cd, "cities_list");
 
         gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (tree)));
 
@@ -3139,7 +3151,7 @@ run_prefs_locations_remove (GtkButton *button, ClockData *cd)
 static void
 run_prefs_locations_add (GtkButton *button, ClockData *cd)
 {
-        GtkWidget *edit_window = glade_xml_get_widget (cd->glade_xml, "edit-location-window");
+        GtkWidget *edit_window = _clock_get_widget (cd, "edit-location-window");
 
         fill_timezone_combo_from_location (cd, NULL);
 
@@ -3166,15 +3178,15 @@ edit_tree_row (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpoint
         gfloat lat, lon;
 
         /* fill the dialog with this location's data, show it */
-        GtkWidget *edit_window = glade_xml_get_widget (cd->glade_xml, "edit-location-window");
+        GtkWidget *edit_window = _clock_get_widget (cd, "edit-location-window");
 
-        GtkWidget *lat_entry = glade_xml_get_widget (cd->glade_xml, "edit-location-latitude-entry");
+        GtkWidget *lat_entry = _clock_get_widget (cd, "edit-location-latitude-entry");
 
-        GtkWidget *lon_entry = glade_xml_get_widget (cd->glade_xml, "edit-location-longitude-entry");
+        GtkWidget *lon_entry = _clock_get_widget (cd, "edit-location-longitude-entry");
 
-        GtkWidget *lat_combo = glade_xml_get_widget (cd->glade_xml, "edit-location-latitude-combo");
+        GtkWidget *lat_combo = _clock_get_widget (cd, "edit-location-latitude-combo");
 
-        GtkWidget *lon_combo = glade_xml_get_widget (cd->glade_xml, "edit-location-longitude-combo");
+        GtkWidget *lon_combo = _clock_get_widget (cd, "edit-location-longitude-combo");
 
         edit_clear (cd);
 
@@ -3317,8 +3329,8 @@ fill_prefs_window (ClockData *cd)
         int i;
 
 	/* Set the 12 hour / 24 hour widget */
-        radio_12hr = glade_xml_get_widget (cd->glade_xml, "12hr_radio");
-        radio_24hr = glade_xml_get_widget (cd->glade_xml, "24hr_radio");
+        radio_12hr = _clock_get_widget (cd, "12hr_radio");
+        radio_24hr = _clock_get_widget (cd, "24hr_radio");
 
         if (cd->format == CLOCK_FORMAT_12)
                 widget = radio_12hr;
@@ -3331,31 +3343,31 @@ fill_prefs_window (ClockData *cd)
 			  G_CALLBACK (set_12hr_format_radio_cb), cd);
 
 	/* Set the "Show Date" checkbox */
-	widget = glade_xml_get_widget (cd->glade_xml, "date_check");
+	widget = _clock_get_widget (cd, "date_check");
 	g_signal_connect (widget, "toggled",
                           G_CALLBACK (set_show_date_cb), cd);
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), cd->showdate);
 
 	/* Set the "Show Seconds" checkbox */
-	widget = glade_xml_get_widget (cd->glade_xml, "seconds_check");
+	widget = _clock_get_widget (cd, "seconds_check");
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), cd->showseconds);
 	g_signal_connect (widget, "toggled",
                           G_CALLBACK (set_show_seconds_cb), cd);
 
 	/* Set the "Show weather" checkbox */
-	widget = glade_xml_get_widget (cd->glade_xml, "weather_check");
+	widget = _clock_get_widget (cd, "weather_check");
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), cd->show_weather);
 	g_signal_connect (widget, "toggled",
                           G_CALLBACK (set_show_weather_cb), cd);
 
 	/* Set the "Show temperature" checkbox */
-	widget = glade_xml_get_widget (cd->glade_xml, "temperature_check");
+	widget = _clock_get_widget (cd, "temperature_check");
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), cd->show_temperature);
 	g_signal_connect (widget, "toggled",
                           G_CALLBACK (set_show_temperature_cb), cd);
 
 	/* Fill the Cities list */
-	widget = glade_xml_get_widget (cd->glade_xml, "cities_list");
+	widget = _clock_get_widget (cd, "cities_list");
 
 	renderer = gtk_cell_renderer_text_new ();
         col = gtk_tree_view_column_new_with_attributes (_("City Name"), renderer, "text", COL_CITY_NAME, NULL);
@@ -3372,7 +3384,7 @@ fill_prefs_window (ClockData *cd)
                                  GTK_TREE_MODEL (cd->cities_store));
 
         /* Temperature combo */
-	widget = glade_xml_get_widget (cd->glade_xml, "temperature_combo");
+	widget = _clock_get_widget (cd, "temperature_combo");
 	store = gtk_list_store_new (1, G_TYPE_STRING);
 	gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (store));
 	renderer = gtk_cell_renderer_text_new ();
@@ -3388,7 +3400,7 @@ fill_prefs_window (ClockData *cd)
                           G_CALLBACK (temperature_combo_changed), cd);
 
         /* Wind speed combo */
-	widget = glade_xml_get_widget (cd->glade_xml, "wind_speed_combo");
+	widget = _clock_get_widget (cd, "wind_speed_combo");
 	store = gtk_list_store_new (1, G_TYPE_STRING);
 	gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (store));
 	renderer = gtk_cell_renderer_text_new ();
@@ -3421,14 +3433,14 @@ ensure_prefs_window_is_created (ClockData *cd)
         if (cd->prefs_window)
                 return;
 
-        cd->prefs_window = glade_xml_get_widget (cd->glade_xml, "prefs-window");
+        cd->prefs_window = _clock_get_widget (cd, "prefs-window");
 
 	gtk_window_set_icon_name (GTK_WINDOW (cd->prefs_window), CLOCK_ICON);
 
-        prefs_close_button = glade_xml_get_widget (cd->glade_xml, "prefs-close-button");
-        prefs_help_button = glade_xml_get_widget (cd->glade_xml, "prefs-help-button");
-        clock_options = glade_xml_get_widget (cd->glade_xml, "clock-options");
-        cd->prefs_locations = GTK_TREE_VIEW (glade_xml_get_widget (cd->glade_xml, "cities_list"));
+        prefs_close_button = _clock_get_widget (cd, "prefs-close-button");
+        prefs_help_button = _clock_get_widget (cd, "prefs-help-button");
+        clock_options = _clock_get_widget (cd, "clock-options");
+        cd->prefs_locations = GTK_TREE_VIEW (_clock_get_widget (cd, "cities_list"));
 
 	if (!clock_locale_supports_am_pm ())
 		gtk_widget_hide (clock_options);
@@ -3446,22 +3458,22 @@ ensure_prefs_window_is_created (ClockData *cd)
         g_signal_connect (G_OBJECT (prefs_help_button), "clicked",
                           G_CALLBACK (prefs_help), cd);
 
-        cd->prefs_location_remove_button = glade_xml_get_widget (cd->glade_xml, "prefs-locations-remove-button");
+        cd->prefs_location_remove_button = _clock_get_widget (cd, "prefs-locations-remove-button");
 
         g_signal_connect (G_OBJECT (cd->prefs_location_remove_button), "clicked",
                           G_CALLBACK (run_prefs_locations_remove), cd);
 
-        cd->prefs_location_add_button = glade_xml_get_widget (cd->glade_xml, "prefs-locations-add-button");
+        cd->prefs_location_add_button = _clock_get_widget (cd, "prefs-locations-add-button");
 
         g_signal_connect (G_OBJECT (cd->prefs_location_add_button), "clicked",
                           G_CALLBACK (run_prefs_locations_add), cd);
 
-        cd->prefs_location_edit_button = glade_xml_get_widget (cd->glade_xml, "prefs-locations-edit-button");
+        cd->prefs_location_edit_button = _clock_get_widget (cd, "prefs-locations-edit-button");
 
         g_signal_connect (G_OBJECT (cd->prefs_location_edit_button), "clicked",
                           G_CALLBACK (run_prefs_locations_edit), cd);
 
-        edit_window = glade_xml_get_widget (cd->glade_xml, "edit-location-window");
+        edit_window = _clock_get_widget (cd, "edit-location-window");
 
         gtk_window_set_transient_for (GTK_WINDOW (edit_window),
                                       GTK_WINDOW (cd->prefs_window));
@@ -3469,20 +3481,20 @@ ensure_prefs_window_is_created (ClockData *cd)
         g_signal_connect (G_OBJECT (edit_window), "delete_event",
                           G_CALLBACK (edit_hide_event), cd);
 
-        edit_cancel_button = glade_xml_get_widget (cd->glade_xml, "edit-location-cancel-button");
+        edit_cancel_button = _clock_get_widget (cd, "edit-location-cancel-button");
 
-        edit_ok_button = glade_xml_get_widget (cd->glade_xml, "edit-location-ok-button");
+        edit_ok_button = _clock_get_widget (cd, "edit-location-ok-button");
 
         world = gweather_location_new_world (FALSE);
 
-        location_box = glade_xml_get_widget (cd->glade_xml, "edit-location-name-box");
+        location_box = _clock_get_widget (cd, "edit-location-name-box");
         cd->location_entry = GWEATHER_LOCATION_ENTRY (gweather_location_entry_new (world));
         gtk_widget_show (GTK_WIDGET (cd->location_entry));
         gtk_container_add (GTK_CONTAINER (location_box), GTK_WIDGET (cd->location_entry));
         g_signal_connect (G_OBJECT (cd->location_entry), "notify::location",
                           G_CALLBACK (location_changed), cd);
 
-        zone_box = glade_xml_get_widget (cd->glade_xml, "edit-location-timezone-box");
+        zone_box = _clock_get_widget (cd, "edit-location-timezone-box");
         cd->zone_combo = GWEATHER_TIMEZONE_MENU (gweather_timezone_menu_new (world));
         gtk_widget_show (GTK_WIDGET (cd->zone_combo));
         gtk_container_add (GTK_CONTAINER (zone_box), GTK_WIDGET (cd->zone_combo));
@@ -3497,7 +3509,7 @@ ensure_prefs_window_is_created (ClockData *cd)
 
         /* Set up the time setting section */
 
-        cd->time_settings_button = glade_xml_get_widget (cd->glade_xml, "time-settings-button");
+        cd->time_settings_button = _clock_get_widget (cd, "time-settings-button");
         g_signal_connect (cd->time_settings_button, "clicked",
                           G_CALLBACK (run_time_settings), cd);
 
@@ -3511,7 +3523,7 @@ display_properties_dialog (ClockData *cd, gboolean start_in_locations_page)
         ensure_prefs_window_is_created (cd);
 
         if (start_in_locations_page) {
-                GtkWidget *notebook = glade_xml_get_widget (cd->glade_xml, "notebook");
+                GtkWidget *notebook = _clock_get_widget (cd, "notebook");
                 gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 1);
         }
 
diff --git a/applets/clock/clock.glade b/applets/clock/clock.ui
similarity index 78%
rename from applets/clock/clock.glade
rename to applets/clock/clock.ui
index e6ceb77..7183a52 100644
--- a/applets/clock/clock.glade
+++ b/applets/clock/clock.ui
@@ -1,49 +1,51 @@
 <?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
+<interface>
+  <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="edit-location-window">
+  <object class="GtkDialog" id="edit-location-window">
     <property name="border_width">5</property>
     <property name="resizable">False</property>
     <property name="type_hint">dialog</property>
     <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox3">
+      <object class="GtkVBox" id="dialog-vbox3">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
         <child>
-          <widget class="GtkTable" id="table26">
+          <object class="GtkTable" id="table26">
             <property name="visible">True</property>
             <property name="n_columns">3</property>
             <property name="column_spacing">6</property>
             <property name="row_spacing">6</property>
             <child>
-              <widget class="GtkVBox" id="vbox34">
+              <object class="GtkVBox" id="vbox34">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
                 <property name="spacing">6</property>
                 <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow12">
+                  <object class="GtkScrolledWindow" id="scrolledwindow12">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="hscrollbar_policy">never</property>
                     <property name="vscrollbar_policy">never</property>
                     <child>
-                      <widget class="GtkViewport" id="viewport3">
+                      <object class="GtkViewport" id="viewport3">
                         <property name="visible">True</property>
                         <property name="shadow_type">none</property>
                         <child>
-                          <widget class="GtkImage" id="image30">
+                          <object class="GtkImage" id="image30">
                             <property name="stock">gtk-missing-image</property>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkTable" id="table27">
+                  <object class="GtkTable" id="table27">
                     <property name="visible">True</property>
                     <property name="border_width">5</property>
                     <property name="n_rows">5</property>
@@ -51,13 +53,13 @@
                     <property name="column_spacing">6</property>
                     <property name="row_spacing">6</property>
                     <child>
-                      <widget class="GtkLabel" id="label243">
+                      <object class="GtkLabel" id="label243">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes" comments="Languages that have a single word that translates as either &quot;state&quot; or &quot;province&quot; should use that instead of &quot;region&quot;.">&lt;small&gt;&lt;i&gt;Type a city, region, or country name and then select a match from the pop-up.&lt;/i&gt;&lt;/small&gt;</property>
                         <property name="use_markup">True</property>
                         <property name="wrap">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">4</property>
@@ -68,12 +70,13 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkVBox" id="edit-location-name-box">
+                      <object class="GtkVBox" id="edit-location-name-box">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <child>
                           <placeholder/>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">4</property>
@@ -82,12 +85,13 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkVBox" id="edit-location-timezone-box">
+                      <object class="GtkVBox" id="edit-location-timezone-box">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <child>
                           <placeholder/>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">4</property>
@@ -98,11 +102,11 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label242">
+                      <object class="GtkLabel" id="label242">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Timezone:</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="top_attach">2</property>
                         <property name="bottom_attach">3</property>
@@ -111,22 +115,22 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label241">
+                      <object class="GtkLabel" id="label241">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Location Name:</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="x_options">GTK_FILL</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkEntry" id="edit-location-latitude-entry">
+                      <object class="GtkEntry" id="edit-location-latitude-entry">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="invisible_char">&#x2022;</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
@@ -136,11 +140,16 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkComboBox" id="edit-location-latitude-combo">
+                      <object class="GtkComboBox" id="edit-location-latitude-combo">
                         <property name="visible">True</property>
-                        <property name="items" translatable="yes">North
-South</property>
-                      </widget>
+                        <property name="model">liststore2</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
                       <packing>
                         <property name="left_attach">2</property>
                         <property name="right_attach">3</property>
@@ -151,12 +160,12 @@ South</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label240">
+                      <object class="GtkLabel" id="label240">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">&lt;i&gt;(optional)&lt;/i&gt;</property>
                         <property name="use_markup">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">3</property>
                         <property name="right_attach">4</property>
@@ -167,12 +176,12 @@ South</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label239">
+                      <object class="GtkLabel" id="label239">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">&lt;i&gt;(optional)&lt;/i&gt;</property>
                         <property name="use_markup">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">3</property>
                         <property name="right_attach">4</property>
@@ -183,11 +192,16 @@ South</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkComboBox" id="edit-location-longitude-combo">
+                      <object class="GtkComboBox" id="edit-location-longitude-combo">
                         <property name="visible">True</property>
-                        <property name="items" translatable="yes">East
-West</property>
-                      </widget>
+                        <property name="model">liststore1</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
                       <packing>
                         <property name="left_attach">2</property>
                         <property name="right_attach">3</property>
@@ -198,11 +212,11 @@ West</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkEntry" id="edit-location-longitude-entry">
+                      <object class="GtkEntry" id="edit-location-longitude-entry">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="invisible_char">&#x2022;</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
@@ -212,11 +226,11 @@ West</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label238">
+                      <object class="GtkLabel" id="label238">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Longitude:</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="top_attach">4</property>
                         <property name="bottom_attach">5</property>
@@ -225,23 +239,24 @@ West</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkVBox" id="vbox35">
+                      <object class="GtkVBox" id="vbox35">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <property name="homogeneous">True</property>
                         <child>
-                          <widget class="GtkLabel" id="label237">
+                          <object class="GtkLabel" id="label237">
                             <property name="visible">True</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Latitude:</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="top_attach">3</property>
                         <property name="bottom_attach">4</property>
@@ -251,36 +266,34 @@ West</property>
                     <child>
                       <placeholder/>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="position">1</property>
                   </packing>
                 </child>
-              </widget>
+              </object>
               <packing>
                 <property name="right_attach">3</property>
                 <property name="y_options"></property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="position">1</property>
           </packing>
         </child>
         <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area3">
+          <object class="GtkHButtonBox" id="dialog-action_area3">
             <property name="visible">True</property>
-            <property name="layout_style">end</property>
             <child>
-              <widget class="GtkButton" id="edit-location-cancel-button">
+              <object class="GtkButton" id="edit-location-cancel-button">
                 <property name="label">gtk-cancel</property>
-                <property name="response_id">-6</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
@@ -288,41 +301,46 @@ West</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkButton" id="edit-location-ok-button">
+              <object class="GtkButton" id="edit-location-ok-button">
                 <property name="label">gtk-ok</property>
-                <property name="response_id">-5</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="expand">False</property>
             <property name="pack_type">end</property>
             <property name="position">0</property>
           </packing>
         </child>
-      </widget>
+      </object>
     </child>
-  </widget>
-  <widget class="GtkDialog" id="set-time-window">
+    <action-widgets>
+      <action-widget response="-6">edit-location-cancel-button</action-widget>
+      <action-widget response="-5">edit-location-ok-button</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkDialog" id="set-time-window">
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Time &amp; Date</property>
+    <property name="resizable">False</property>
     <property name="type_hint">dialog</property>
     <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox2">
+      <object class="GtkVBox" id="dialog-vbox2">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
         <child>
-          <widget class="GtkAlignment" id="alignment1">
+          <object class="GtkAlignment" id="alignment1">
             <property name="visible">True</property>
             <property name="yscale">0</property>
             <property name="top_padding">7</property>
@@ -330,42 +348,42 @@ West</property>
             <property name="left_padding">7</property>
             <property name="right_padding">7</property>
             <child>
-              <widget class="GtkHBox" id="time_settings_box">
+              <object class="GtkHBox" id="time_settings_box">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
                 <property name="spacing">12</property>
                 <child>
-                  <widget class="GtkCalendar" id="calendar">
+                  <object class="GtkCalendar" id="calendar">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="year">2009</property>
                     <property name="month">5</property>
                     <property name="day">3</property>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkTable" id="table1">
+                  <object class="GtkTable" id="table1">
                     <property name="visible">True</property>
                     <property name="n_rows">2</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">12</property>
                     <property name="row_spacing">6</property>
                     <child>
-                      <widget class="GtkHBox" id="hbox61">
+                      <object class="GtkHBox" id="hbox61">
                         <property name="visible">True</property>
                         <child>
-                          <widget class="GtkSpinButton" id="hours_spin">
+                          <object class="GtkSpinButton" id="hours_spin">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">&#x25CF;</property>
-                            <property name="adjustment">23 0 23 1 12 0</property>
+                            <property name="adjustment">adjustment3</property>
                             <property name="climb_rate">1</property>
                             <property name="numeric">True</property>
                             <property name="wrap">True</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
@@ -373,15 +391,15 @@ West</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkSpinButton" id="minutes_spin">
+                          <object class="GtkSpinButton" id="minutes_spin">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">&#x25CF;</property>
-                            <property name="adjustment">59 0 59 1 30 0</property>
+                            <property name="adjustment">adjustment2</property>
                             <property name="climb_rate">1</property>
                             <property name="numeric">True</property>
                             <property name="wrap">True</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
@@ -389,22 +407,22 @@ West</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkSpinButton" id="seconds_spin">
+                          <object class="GtkSpinButton" id="seconds_spin">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">&#x25CF;</property>
-                            <property name="adjustment">59 0 59 1 30 0</property>
+                            <property name="adjustment">adjustment1</property>
                             <property name="climb_rate">1</property>
                             <property name="numeric">True</property>
                             <property name="wrap">True</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
                             <property name="position">2</property>
                           </packing>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
@@ -414,11 +432,11 @@ West</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="current_time_label">
+                      <object class="GtkLabel" id="current_time_label">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label">23:59:59</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
@@ -426,11 +444,11 @@ West</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label236">
+                      <object class="GtkLabel" id="label236">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Time:</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="top_attach">1</property>
                         <property name="bottom_attach">2</property>
@@ -439,26 +457,26 @@ West</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label235">
+                      <object class="GtkLabel" id="label235">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Current Time:</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="x_options">GTK_FILL</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
-              </widget>
+              </object>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="expand">False</property>
             <property name="fill">False</property>
@@ -466,19 +484,18 @@ West</property>
           </packing>
         </child>
         <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area2">
+          <object class="GtkHButtonBox" id="dialog-action_area2">
             <property name="visible">True</property>
             <property name="homogeneous">True</property>
-            <property name="layout_style">end</property>
             <child>
-              <widget class="GtkButton" id="cancel-set-time-button">
+              <object class="GtkButton" id="cancel-set-time-button">
                 <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
@@ -486,60 +503,98 @@ West</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkButton" id="set-time-button">
+              <object class="GtkButton" id="set-time-button">
                 <property name="label" translatable="yes">Set System Time</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_underline">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="expand">False</property>
             <property name="pack_type">end</property>
             <property name="position">0</property>
           </packing>
         </child>
-      </widget>
+      </object>
     </child>
-  </widget>
-  <widget class="GtkDialog" id="prefs-window">
+    <action-widgets>
+      <action-widget response="0">cancel-set-time-button</action-widget>
+      <action-widget response="0">set-time-button</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkListStore" id="liststore1">
+    <columns>
+      <!-- column-name item text -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">East</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">West</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="liststore2">
+    <columns>
+      <!-- column-name item text -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">North</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">South</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkDialog" id="prefs-window">
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Clock Preferences</property>
+    <property name="resizable">False</property>
     <property name="window_position">center</property>
     <property name="type_hint">dialog</property>
     <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkVBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child>
-          <widget class="GtkNotebook" id="notebook">
+          <object class="GtkNotebook" id="notebook">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="border_width">5</property>
             <child>
-              <widget class="GtkVBox" id="vbox17">
+              <object class="GtkVBox" id="vbox17">
                 <property name="visible">True</property>
                 <property name="border_width">12</property>
+                <property name="orientation">vertical</property>
                 <property name="spacing">18</property>
                 <child>
-                  <widget class="GtkVBox" id="clock-options">
+                  <object class="GtkVBox" id="clock-options">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkLabel" id="label210">
+                      <object class="GtkLabel" id="label210">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Clock Options&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
+                        <property name="label" translatable="yes">Clock Options</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
@@ -547,22 +602,22 @@ West</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkAlignment" id="alignment32">
+                      <object class="GtkAlignment" id="alignment32">
                         <property name="visible">True</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <widget class="GtkHBox" id="hbox49">
+                          <object class="GtkHBox" id="hbox49">
                             <property name="visible">True</property>
                             <property name="spacing">13</property>
                             <child>
-                              <widget class="GtkRadioButton" id="12hr_radio">
+                              <object class="GtkRadioButton" id="12hr_radio">
                                 <property name="label" translatable="yes">_12 hour format</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
@@ -570,7 +625,7 @@ West</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkRadioButton" id="24hr_radio">
+                              <object class="GtkRadioButton" id="24hr_radio">
                                 <property name="label" translatable="yes">_24 hour format</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
@@ -578,37 +633,40 @@ West</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                                 <property name="group">12hr_radio</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkVBox" id="vbox29">
+                  <object class="GtkVBox" id="vbox29">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkLabel" id="label229">
+                      <object class="GtkLabel" id="label229">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Panel Display&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
+                        <property name="label" translatable="yes">Panel Display</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
@@ -616,22 +674,23 @@ West</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkAlignment" id="alignment33">
+                      <object class="GtkAlignment" id="alignment33">
                         <property name="visible">True</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <widget class="GtkVBox" id="vbox30">
+                          <object class="GtkVBox" id="vbox30">
                             <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
                             <property name="spacing">6</property>
                             <child>
-                              <widget class="GtkCheckButton" id="date_check">
+                              <object class="GtkCheckButton" id="date_check">
                                 <property name="label" translatable="yes">Show the _date</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
@@ -639,14 +698,14 @@ West</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkCheckButton" id="seconds_check">
+                              <object class="GtkCheckButton" id="seconds_check">
                                 <property name="label" translatable="yes">Show seco_nds</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
@@ -654,14 +713,14 @@ West</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkCheckButton" id="weather_check">
+                              <object class="GtkCheckButton" id="weather_check">
                                 <property name="label" translatable="yes">Show _weather</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
@@ -669,87 +728,88 @@ West</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkCheckButton" id="temperature_check">
+                              <object class="GtkCheckButton" id="temperature_check">
                                 <property name="label" translatable="yes">Show _temperature</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
                                 <property name="position">3</property>
                               </packing>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="position">1</property>
                   </packing>
                 </child>
-              </widget>
+              </object>
             </child>
-            <child>
-              <widget class="GtkLabel" id="label209">
+            <child type="tab">
+              <object class="GtkLabel" id="label209">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">General</property>
-              </widget>
+              </object>
               <packing>
                 <property name="tab_fill">False</property>
-                <property name="type">tab</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkVBox" id="vbox24">
+              <object class="GtkVBox" id="vbox24">
                 <property name="visible">True</property>
                 <property name="border_width">12</property>
+                <property name="orientation">vertical</property>
                 <property name="spacing">18</property>
                 <child>
-                  <widget class="GtkHBox" id="hbox54">
+                  <object class="GtkHBox" id="hbox54">
                     <property name="visible">True</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow10">
+                      <object class="GtkScrolledWindow" id="scrolledwindow10">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="hscrollbar_policy">never</property>
                         <property name="vscrollbar_policy">never</property>
                         <property name="shadow_type">in</property>
                         <child>
-                          <widget class="GtkTreeView" id="cities_list">
+                          <object class="GtkTreeView" id="cities_list">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="headers_visible">False</property>
                             <property name="hover_expand">True</property>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkVButtonBox" id="vbuttonbox2">
+                      <object class="GtkVButtonBox" id="vbuttonbox2">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <property name="layout_style">start</property>
                         <child>
-                          <widget class="GtkButton" id="prefs-locations-add-button">
+                          <object class="GtkButton" id="prefs-locations-add-button">
                             <property name="label">gtk-add</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="can_default">True</property>
                             <property name="receives_default">False</property>
                             <property name="use_stock">True</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
@@ -757,14 +817,14 @@ West</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkButton" id="prefs-locations-edit-button">
+                          <object class="GtkButton" id="prefs-locations-edit-button">
                             <property name="label">gtk-edit</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="can_default">True</property>
                             <property name="receives_default">False</property>
                             <property name="use_stock">True</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
@@ -772,64 +832,67 @@ West</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkButton" id="prefs-locations-remove-button">
+                          <object class="GtkButton" id="prefs-locations-remove-button">
                             <property name="label">gtk-remove</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="can_default">True</property>
                             <property name="receives_default">False</property>
                             <property name="use_stock">True</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
                             <property name="position">2</property>
                           </packing>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="position">0</property>
                   </packing>
                 </child>
-              </widget>
+              </object>
               <packing>
                 <property name="position">1</property>
               </packing>
             </child>
-            <child>
-              <widget class="GtkLabel" id="label220">
+            <child type="tab">
+              <object class="GtkLabel" id="label220">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">Locations</property>
-              </widget>
+              </object>
               <packing>
                 <property name="position">1</property>
                 <property name="tab_fill">False</property>
-                <property name="type">tab</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkVBox" id="vbox27">
+              <object class="GtkVBox" id="vbox27">
                 <property name="visible">True</property>
                 <property name="border_width">12</property>
+                <property name="orientation">vertical</property>
                 <property name="spacing">18</property>
                 <child>
-                  <widget class="GtkVBox" id="vbox28">
+                  <object class="GtkVBox" id="vbox28">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkLabel" id="label224">
+                      <object class="GtkLabel" id="label224">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Display&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
+                        <property name="label" translatable="yes">Display</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
@@ -837,18 +900,18 @@ West</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkAlignment" id="alignment34">
+                      <object class="GtkAlignment" id="alignment34">
                         <property name="visible">True</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <widget class="GtkTable" id="table25">
+                          <object class="GtkTable" id="table25">
                             <property name="visible">True</property>
                             <property name="n_rows">4</property>
                             <property name="n_columns">2</property>
                             <property name="column_spacing">12</property>
                             <property name="row_spacing">6</property>
                             <child>
-                              <widget class="GtkComboBox" id="visibility_combo"/>
+                              <object class="GtkComboBox" id="visibility_combo"/>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
@@ -859,12 +922,12 @@ West</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label232">
+                              <object class="GtkLabel" id="label232">
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">_Visibility unit:</property>
                                 <property name="use_underline">True</property>
                                 <property name="mnemonic_widget">visibility_combo</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">3</property>
                                 <property name="bottom_attach">4</property>
@@ -873,7 +936,7 @@ West</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkComboBox" id="pressure_combo"/>
+                              <object class="GtkComboBox" id="pressure_combo"/>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
@@ -884,12 +947,12 @@ West</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label231">
+                              <object class="GtkLabel" id="label231">
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">_Pressure unit:</property>
                                 <property name="use_underline">True</property>
                                 <property name="mnemonic_widget">pressure_combo</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">2</property>
                                 <property name="bottom_attach">3</property>
@@ -898,9 +961,9 @@ West</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkComboBox" id="wind_speed_combo">
+                              <object class="GtkComboBox" id="wind_speed_combo">
                                 <property name="visible">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
@@ -911,9 +974,9 @@ West</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkComboBox" id="temperature_combo">
+                              <object class="GtkComboBox" id="temperature_combo">
                                 <property name="visible">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
@@ -921,13 +984,13 @@ West</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label228">
+                              <object class="GtkLabel" id="label228">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">_Wind speed unit:</property>
                                 <property name="use_underline">True</property>
                                 <property name="mnemonic_widget">wind_speed_combo</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
@@ -936,65 +999,62 @@ West</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label227">
+                              <object class="GtkLabel" id="label227">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">_Temperature unit:</property>
                                 <property name="use_underline">True</property>
                                 <property name="mnemonic_widget">temperature_combo</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="x_options">GTK_FILL</property>
                                 <property name="y_options"></property>
                               </packing>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="position">0</property>
                   </packing>
                 </child>
-              </widget>
+              </object>
               <packing>
                 <property name="position">2</property>
               </packing>
             </child>
-            <child>
-              <widget class="GtkLabel" id="label223">
+            <child type="tab">
+              <object class="GtkLabel" id="label223">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">Weather</property>
-              </widget>
+              </object>
               <packing>
                 <property name="position">2</property>
                 <property name="tab_fill">False</property>
-                <property name="type">tab</property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="position">1</property>
           </packing>
         </child>
         <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
-            <property name="layout_style">end</property>
             <child>
-              <widget class="GtkButton" id="prefs-help-button">
+              <object class="GtkButton" id="prefs-help-button">
                 <property name="label">gtk-help</property>
-                <property name="response_id">-11</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
@@ -1002,14 +1062,14 @@ West</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkButton" id="time-settings-button">
+              <object class="GtkButton" id="time-settings-button">
                 <property name="label" translatable="yes">Time _Settings</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_underline">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
@@ -1017,30 +1077,52 @@ West</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkButton" id="prefs-close-button">
+              <object class="GtkButton" id="prefs-close-button">
                 <property name="label">gtk-close</property>
-                <property name="response_id">-7</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="has_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
                 <property name="position">2</property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="expand">False</property>
             <property name="pack_type">end</property>
             <property name="position">0</property>
           </packing>
         </child>
-      </widget>
+      </object>
     </child>
-  </widget>
-</glade-interface>
+    <action-widgets>
+      <action-widget response="-11">prefs-help-button</action-widget>
+      <action-widget response="0">time-settings-button</action-widget>
+      <action-widget response="-7">prefs-close-button</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="value">59</property>
+    <property name="upper">59</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">30</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="value">59</property>
+    <property name="upper">59</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">30</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="value">23</property>
+    <property name="upper">23</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">12</property>
+  </object>
+</interface>
diff --git a/configure.in b/configure.in
index 7baa47e..f972c0e 100644
--- a/configure.in
+++ b/configure.in
@@ -121,7 +121,7 @@ fi
 AM_CONDITIONAL(HAVE_LIBECAL, test -n "$LIBECAL_REQUIREMENT")
 AC_SUBST(CLOCK_EDS_ICONDIR)
 
-PKG_CHECK_MODULES(CLOCK, pango >= $PANGO_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED $LIBECAL_REQUIREMENT libglade-2.0 >= $LIBGLADE_REQUIRED librsvg-2.0 dbus-glib-1 gweather >= $GWEATHER_REQUIRED)
+PKG_CHECK_MODULES(CLOCK, pango >= $PANGO_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED $LIBECAL_REQUIREMENT librsvg-2.0 dbus-glib-1 gweather >= $GWEATHER_REQUIRED)
 AC_SUBST(CLOCK_CFLAGS)
 AC_SUBST(CLOCK_LIBS)
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b239ba1..3dc1c3b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,7 +6,7 @@ applets/clock/GNOME_ClockApplet_Factory.server.in.in
 applets/clock/calendar-client.c
 applets/clock/calendar-window.c
 applets/clock/clock.c
-applets/clock/clock.glade
+applets/clock/clock.ui
 applets/clock/clock.schemas.in
 applets/clock/clock-location.c
 applets/clock/clock-location-tile.c



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]