Merge lp:~mterry/indicator-datetime/non-modal-locations into lp:indicator-datetime/0.3

Proposed by Michael Terry
Status: Merged
Merged at revision: 88
Proposed branch: lp:~mterry/indicator-datetime/non-modal-locations
Merge into: lp:indicator-datetime/0.3
Prerequisite: lp:~mterry/indicator-datetime/crash-fix-and-more
Diff against target: 86 lines (+20/-7)
4 files modified
data/datetime-dialog.ui (+0/-1)
src/datetime-prefs-locations.c (+1/-3)
src/datetime-prefs-locations.h (+1/-1)
src/datetime-prefs.c (+18/-2)
To merge this branch: bzr merge lp:~mterry/indicator-datetime/non-modal-locations
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+55357@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/datetime-dialog.ui'
--- data/datetime-dialog.ui 2011-03-29 15:19:47 +0000
+++ data/datetime-dialog.ui 2011-03-29 15:19:47 +0000
@@ -10,7 +10,6 @@
10 <object class="GtkWindow" id="locationsDialog">10 <object class="GtkWindow" id="locationsDialog">
11 <property name="can_focus">False</property>11 <property name="can_focus">False</property>
12 <property name="title" translatable="yes">Locations</property>12 <property name="title" translatable="yes">Locations</property>
13 <property name="modal">True</property>
14 <property name="default_width">300</property>13 <property name="default_width">300</property>
15 <property name="default_height">200</property>14 <property name="default_height">200</property>
16 <property name="destroy_with_parent">True</property>15 <property name="destroy_with_parent">True</property>
1716
=== modified file 'src/datetime-prefs-locations.c'
--- src/datetime-prefs-locations.c 2011-03-29 15:19:47 +0000
+++ src/datetime-prefs-locations.c 2011-03-29 15:19:47 +0000
@@ -309,7 +309,7 @@
309}309}
310310
311GtkWidget *311GtkWidget *
312datetime_setup_locations_dialog (GtkWindow * parent, CcTimezoneMap * map)312datetime_setup_locations_dialog (CcTimezoneMap * map)
313{313{
314 GError * error = NULL;314 GError * error = NULL;
315 GtkBuilder * builder = gtk_builder_new ();315 GtkBuilder * builder = gtk_builder_new ();
@@ -375,8 +375,6 @@
375 g_object_set_data (G_OBJECT (dlg), "time-id", GINT_TO_POINTER(time_id));375 g_object_set_data (G_OBJECT (dlg), "time-id", GINT_TO_POINTER(time_id));
376 update_times (dlg);376 update_times (dlg);
377377
378 gtk_window_set_transient_for (GTK_WINDOW (dlg), parent);
379
380#undef WIG378#undef WIG
381379
382 g_object_unref (conf);380 g_object_unref (conf);
383381
=== modified file 'src/datetime-prefs-locations.h'
--- src/datetime-prefs-locations.h 2011-02-23 18:28:53 +0000
+++ src/datetime-prefs-locations.h 2011-03-29 15:19:47 +0000
@@ -28,7 +28,7 @@
2828
29G_BEGIN_DECLS29G_BEGIN_DECLS
3030
31GtkWidget * datetime_setup_locations_dialog (GtkWindow * parent, CcTimezoneMap * map);31GtkWidget * datetime_setup_locations_dialog (CcTimezoneMap * map);
3232
33G_END_DECLS33G_END_DECLS
3434
3535
=== modified file 'src/datetime-prefs.c'
--- src/datetime-prefs.c 2011-03-11 04:02:32 +0000
+++ src/datetime-prefs.c 2011-03-29 15:19:47 +0000
@@ -53,6 +53,7 @@
53guint save_time_id = 0;53guint save_time_id = 0;
54gboolean user_edited_time = FALSE;54gboolean user_edited_time = FALSE;
55gboolean changing_time = FALSE;55gboolean changing_time = FALSE;
56GtkWidget * loc_dlg = NULL;
5657
57/* Turns the boolean property into a string gsettings */58/* Turns the boolean property into a string gsettings */
58static GVariant *59static GVariant *
@@ -495,10 +496,25 @@
495}496}
496497
497static void498static void
499hide_locations ()
500{
501 if (loc_dlg != NULL)
502 gtk_widget_destroy (loc_dlg);
503}
504
505static void
498show_locations (GtkWidget * button, GtkWidget * dlg)506show_locations (GtkWidget * button, GtkWidget * dlg)
499{507{
500 GtkWidget * locationsDlg = datetime_setup_locations_dialog (GTK_WINDOW (dlg), tzmap);508 if (loc_dlg == NULL) {
501 gtk_widget_show_all (locationsDlg);509 loc_dlg = datetime_setup_locations_dialog (tzmap);
510 gtk_window_set_transient_for (GTK_WINDOW (loc_dlg), GTK_WINDOW (dlg));
511 g_signal_connect (loc_dlg, "destroy", G_CALLBACK (gtk_widget_destroyed), &loc_dlg);
512 g_signal_connect (dlg, "focus-in-event", G_CALLBACK (hide_locations), NULL);
513 gtk_widget_show_all (loc_dlg);
514 }
515 else {
516 gtk_window_present_with_time (GTK_WINDOW (loc_dlg), gtk_get_current_event_time ());
517 }
502}518}
503519
504static gboolean520static gboolean

Subscribers

People subscribed via source and target branches