datetime: Change combobox when map is clicked
https://bugzilla.redhat.com/show_bug.cgi?id=684072
This commit is contained in:
parent
7914025e1f
commit
0d2903f1c4
1 changed files with 27 additions and 12 deletions
|
@ -338,18 +338,6 @@ change_date (CcDateTimePanel *self)
|
|||
queue_set_datetime (self);
|
||||
}
|
||||
|
||||
static void
|
||||
location_changed_cb (CcTimezoneMap *map,
|
||||
TzLocation *location,
|
||||
CcDateTimePanel *self)
|
||||
{
|
||||
g_debug ("location changed");
|
||||
|
||||
self->priv->current_location = location;
|
||||
|
||||
queue_set_timezone (self);
|
||||
}
|
||||
|
||||
static void
|
||||
region_changed_cb (GtkComboBox *box,
|
||||
CcDateTimePanel *self)
|
||||
|
@ -454,6 +442,33 @@ update_timezone (CcDateTimePanel *self)
|
|||
g_strfreev (split);
|
||||
}
|
||||
|
||||
static void
|
||||
location_changed_cb (CcTimezoneMap *map,
|
||||
TzLocation *location,
|
||||
CcDateTimePanel *self)
|
||||
{
|
||||
CcDateTimePanelPrivate *priv = self->priv;
|
||||
GtkWidget *region_combo, *city_combo;
|
||||
|
||||
g_debug ("location changed to %s/%s", location->country, location->zone);
|
||||
|
||||
self->priv->current_location = location;
|
||||
|
||||
/* Update the combo boxes */
|
||||
region_combo = W("region_combobox");
|
||||
city_combo = W("city_combobox");
|
||||
|
||||
g_signal_handlers_block_by_func (region_combo, region_changed_cb, self);
|
||||
g_signal_handlers_block_by_func (city_combo, city_changed_cb, self);
|
||||
|
||||
update_timezone (self);
|
||||
|
||||
g_signal_handlers_unblock_by_func (region_combo, region_changed_cb, self);
|
||||
g_signal_handlers_unblock_by_func (city_combo, city_changed_cb, self);
|
||||
|
||||
queue_set_timezone (self);
|
||||
}
|
||||
|
||||
static void
|
||||
get_timezone_cb (CcDateTimePanel *self,
|
||||
const gchar *timezone,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue