aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-01 21:56:25 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-03-01 21:56:25 -0600
commit53b0569f05784e3d22af00be9b11a6c2f1a8f9aa (patch)
tree3599933aa99294adcf1f65388028e18634fd17c6 /src
parent817baff6346d7910bd2d006457b81717ef1e0137 (diff)
downloadayatana-indicator-datetime-53b0569f05784e3d22af00be9b11a6c2f1a8f9aa.tar.gz
ayatana-indicator-datetime-53b0569f05784e3d22af00be9b11a6c2f1a8f9aa.tar.bz2
ayatana-indicator-datetime-53b0569f05784e3d22af00be9b11a6c2f1a8f9aa.zip
rename dconflocations as location_menu_items
Diffstat (limited to 'src')
-rw-r--r--src/datetime-service.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 87d537e..b1b5b7f 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -85,7 +85,7 @@ static DbusmenuMenuitem * current_location = NULL;
//static DbusmenuMenuitem * ecal_location = NULL;
static DbusmenuMenuitem * add_appointment = NULL;
static GList * appointments = NULL;
-static GList * dconflocations = NULL;
+static GList * location_menu_items = NULL;
static GList * comp_instances = NULL;
static gboolean updating_appointments = FALSE;
static time_t start_time_appointments = (time_t) 0;
@@ -585,14 +585,11 @@ update_location_menu_items(void) {
g_debug("Found %u locations from %s", len, SETTINGS_LOCATIONS_S);
/* Remove all of the previous locations */
- if (dconflocations != NULL) {
- while (dconflocations != NULL) {
- DbusmenuMenuitem * item = DBUSMENU_MENUITEM(dconflocations->data);
- // Remove all the existing menu items which are in dconflocations.
- dconflocations = g_list_remove(dconflocations, item);
- dbusmenu_menuitem_child_delete(root, DBUSMENU_MENUITEM(item));
- g_object_unref(G_OBJECT(item));
- }
+ while (location_menu_items != NULL) {
+ DbusmenuMenuitem * item = DBUSMENU_MENUITEM(location_menu_items->data);
+ location_menu_items = g_list_remove(location_menu_items, item);
+ dbusmenu_menuitem_child_delete(root, DBUSMENU_MENUITEM(item));
+ g_object_unref(G_OBJECT(item));
}
const gboolean show = g_settings_get_boolean (conf, SETTINGS_SHOW_LOCATIONS_S);
@@ -616,7 +613,7 @@ update_location_menu_items(void) {
dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
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);
+ location_menu_items = g_list_append(location_menu_items, item);
}
}
g_strfreev (locations);