summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2020-01-16 18:31:28 +0800
committerWu Xiaotian <[email protected]>2020-04-29 14:21:27 +0800
commit9a57a262f0597e0b3676795f6de5696b3e59def7 (patch)
tree3b328169c7aacf419a6d51ced72e3bf5212024bb /applets
parent303fe34730f8c28dda072745b92b3177c6fd11d5 (diff)
downloadmate-panel-9a57a262f0597e0b3676795f6de5696b3e59def7.tar.bz2
mate-panel-9a57a262f0597e0b3676795f6de5696b3e59def7.tar.xz
update
Diffstat (limited to 'applets')
-rw-r--r--applets/clock/clock-location-tile.c8
-rw-r--r--applets/clock/clock.c22
2 files changed, 27 insertions, 3 deletions
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c
index 58355da2..5e3e0985 100644
--- a/applets/clock/clock-location-tile.c
+++ b/applets/clock/clock-location-tile.c
@@ -571,17 +571,25 @@ clock_location_tile_refresh (ClockLocationTile *this, gboolean force_refresh)
}
}
+ debug_print("IIII");
+ /* FIXME */
if (clock_needs_face_refresh (this)) {
+ debug_print("IIII");
clock_face_refresh (CLOCK_FACE (priv->clock_face));
}
if (!force_refresh && !clock_needs_label_refresh (this)) {
+ debug_print("IIII");
return;
}
+ debug_print("IIII");
clock_location_localtime (priv->location, &now);
+ debug_print("IIII");
tzname = clock_location_get_tzname (priv->location);
+ debug_print("IIII");
if (tzname == NULL) {
+ debug_print("IIII");
tzname = clock_location_get_tzid (priv->location);
}
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 56411832..6e828e48 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -1156,6 +1156,7 @@ cities_section_sync (ClockData *cd)
node = g_list_sort (node, sort_locations_by_time);
node = g_list_reverse (node);
while (l != NULL) {
+ debug_print("SSS");
GList *next = l->next;
found = FALSE;
loc = clock_location_tile_get_location (l->data);
@@ -1166,12 +1167,16 @@ cities_section_sync (ClockData *cd)
}
}
if (found) {
+ debug_print("SSS");
/* Remove existing elements from the new list */
- node = g_list_delete_link (node, n);
+ node = g_list_remove (node, n);
} else {
+ debug_print("SSS");
/* Remove non-existing elements from the old list */
gtk_container_remove (GTK_CONTAINER (cd->cities_section), l->data);
- cd->location_tiles = g_list_delete_link (cd->location_tiles, l);
+ debug_print("SSS");
+ cd->location_tiles = g_list_remove (cd->location_tiles, l);
+ debug_print("SSS");
}
l = next;
}
@@ -1179,7 +1184,9 @@ cities_section_sync (ClockData *cd)
/* Append the remaining elements to the new list */
for (m = node; m != NULL; m = m->next) {
loc = m->data;
+ debug_print("SSS");
city = clock_location_tile_new (loc, CLOCK_FACE_SMALL);
+ debug_print("SSS");
g_signal_connect (city, "tile-pressed",
G_CALLBACK (location_tile_pressed_cb), cd);
g_signal_connect (city, "need-clock-format",
@@ -1191,9 +1198,13 @@ cities_section_sync (ClockData *cd)
gtk_widget_show_all(GTK_WIDGET (city));
cd->location_tiles = g_list_append(cd->location_tiles, city);
+ debug_print("SSS");
clock_location_tile_refresh (city, TRUE);
+ debug_print("SSS");
}
+ debug_print("SSS");
g_list_free (node);
+ debug_print("SSS");
}
static void
@@ -2199,11 +2210,14 @@ locations_reset (ClockData *cd)
gtk_widget_show (cd->weather_obox);
}
+ debug_print("SSS");
for (l = cd->locations; l; l = l->next) {
+ debug_print("SSS");
loc = l->data;
idp = g_object_get_data (G_OBJECT (loc), "weather-updated-id");
id = GPOINTER_TO_UINT (idp);
if (id == 0) {
+ debug_print("SSS");
id = g_signal_connect (loc, "weather-updated",
G_CALLBACK (location_weather_updated_cb), cd);
g_object_set_data (G_OBJECT (loc), "weather-updated-id", GUINT_TO_POINTER (id));
@@ -2215,8 +2229,10 @@ locations_reset (ClockData *cd)
if (cd->map_widget)
clock_map_refresh (CLOCK_MAP (cd->map_widget));
- if (cd->clock_vbox)
+ if (cd->clock_vbox) {
+ debug_print("SSS");
cities_section_sync (cd);
+ }
}
static void