diff options
-rw-r--r-- | src/datetime-prefs.c | 9 | ||||
-rw-r--r-- | src/datetime-service.c | 2 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/datetime-prefs.c b/src/datetime-prefs.c index fbb8ea1..0e2e99c 100644 --- a/src/datetime-prefs.c +++ b/src/datetime-prefs.c @@ -577,21 +577,14 @@ setup_time_spinners (IndicatorDatetimePanel * self, GtkWidget * time, GtkWidget } static void -hide_locations (IndicatorDatetimePanel * self) -{ - if (self->priv->loc_dlg != NULL) - gtk_widget_destroy (self->priv->loc_dlg); -} - -static void show_locations (IndicatorDatetimePanel * self) { if (self->priv->loc_dlg == NULL) { self->priv->loc_dlg = datetime_setup_locations_dialog (self->priv->tzmap); GtkWidget * dlg = gtk_widget_get_toplevel (GTK_WIDGET (self)); + gtk_window_set_type_hint (GTK_WINDOW(self->priv->loc_dlg), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_transient_for (GTK_WINDOW (self->priv->loc_dlg), GTK_WINDOW (dlg)); g_signal_connect (self->priv->loc_dlg, "destroy", G_CALLBACK (gtk_widget_destroyed), &self->priv->loc_dlg); - g_signal_connect_swapped (dlg, "focus-in-event", G_CALLBACK (hide_locations), self); gtk_widget_show_all (self->priv->loc_dlg); } else { diff --git a/src/datetime-service.c b/src/datetime-service.c index 57f6f52..8ecef1c 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -124,7 +124,7 @@ time_location_free (struct TimeLocation * loc) g_free (loc); } static struct TimeLocation* -time_location_new (const char * zone, const char * name, const time_t now) +time_location_new (const char * zone, const char * name, time_t now) { struct TimeLocation * loc = g_new (struct TimeLocation, 1); GTimeZone * tz = g_time_zone_new (zone); |