diff options
author | Michael Terry <mike@mterry.name> | 2011-02-15 15:06:33 -0500 |
---|---|---|
committer | Michael Terry <mike@mterry.name> | 2011-02-15 15:06:33 -0500 |
commit | 02f8926f9c00954625a57e8d5d650e2523b98154 (patch) | |
tree | 280a1cb3e61789d9fcd21ce8e1d7769639a551e9 /src | |
parent | f704c6178715e68128e324490660aea5014eb2f7 (diff) | |
download | ayatana-indicator-datetime-02f8926f9c00954625a57e8d5d650e2523b98154.tar.gz ayatana-indicator-datetime-02f8926f9c00954625a57e8d5d650e2523b98154.tar.bz2 ayatana-indicator-datetime-02f8926f9c00954625a57e8d5d650e2523b98154.zip |
add preference zones in order, after current timezone
Diffstat (limited to 'src')
-rw-r--r-- | src/datetime-service.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c index 3c84551..2db6421 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -364,7 +364,7 @@ update_timezone_menu_items(gpointer user_data) { } guint len = g_strv_length(locations); DbusmenuMenuitem *item; - gint i; + gint i, offset; /* Remove all of the previous locations */ if (dconflocations != NULL) { @@ -390,6 +390,7 @@ update_timezone_menu_items(gpointer user_data) { return FALSE; } + offset = dbusmenu_menuitem_get_position (current_location, root)+1; for (i = 0; i < len; i++) { // Iterate over configured places and add any which aren't already listed if (g_strcmp0(locations[i], current_timezone) != 0 && @@ -402,8 +403,7 @@ update_timezone_menu_items(gpointer user_data) { dbusmenu_menuitem_property_set_bool (item, TIMEZONE_MENUITEM_PROP_RADIO, FALSE); dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE); dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); - dbusmenu_menuitem_child_add_position (root, item, - dbusmenu_menuitem_get_position (locations_separator, root)+3); + dbusmenu_menuitem_child_add_position (root, item, offset++); //g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(quick_set_tz), NULL); dconflocations = g_list_append(dconflocations, item); } |