~matttbe/ubuntu/precise/gnome-panel/975299

« back to all changes in this revision

Viewing changes to applets/clock/clock-map.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-02-08 00:17:11 UTC
  • mfrom: (1.13.15)
  • Revision ID: package-import@ubuntu.com-20120208001711-npwmthl0c6iy3s9a
Tags: 1:3.3.5-0ubuntu1
* New upstream release.
* debian/control.in:
  - Bump minimum glib to 2.31.14
* debian/patches/13_disable_missing_help.patch:
  Updated patch from bugzilla
* debian/patches/14_revert-timedate-change.patch:
  - Revert switch to systemd timedate protocol until ubuntu-system-
    services supports it

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
};
29
29
 
30
30
static char *marker_files[MARKER_NB] = {
31
 
        ICONDIR "/clock-map-location-marker.png",
32
 
        ICONDIR "/clock-map-location-hilight.png",
33
 
        ICONDIR "/clock-map-location-current.png"
 
31
        "clock-map-location-marker.png",
 
32
        "clock-map-location-hilight.png",
 
33
        "clock-map-location-current.png"
34
34
};
35
35
 
36
36
static guint signals[LAST_SIGNAL];
136
136
        g_assert (sizeof (marker_files)/sizeof (char *) == MARKER_NB);
137
137
 
138
138
        for (i = 0; i < MARKER_NB; i++) {
139
 
                priv->location_marker_pixbuf[i] = gdk_pixbuf_new_from_file
140
 
                                                  (marker_files[i], NULL);
 
139
                char *resource;
 
140
                GInputStream *stream;
 
141
 
 
142
                resource = g_strconcat (CLOCK_RESOURCE_PATH "icons/", marker_files[i], NULL);
 
143
                stream = g_resources_open_stream (resource, 0, NULL);
 
144
                g_free (resource);
 
145
 
 
146
                if (stream != NULL) {
 
147
                        priv->location_marker_pixbuf[i] = gdk_pixbuf_new_from_stream (stream, NULL, NULL);
 
148
                        g_object_unref (stream);
 
149
                }
141
150
        }
142
151
}
143
152
 
209
218
        }
210
219
 
211
220
        if (!priv->stock_map_pixbuf) {
212
 
                GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file_at_scale
213
 
                        (ICONDIR "/clock-map.png",
214
 
                         priv->width, priv->height, FALSE, NULL);
 
221
                GInputStream *stream = g_resources_open_stream (CLOCK_RESOURCE_PATH "icons/clock-map.png",
 
222
                                                                0, NULL);
 
223
                if (stream != NULL) {
 
224
                        GdkPixbuf *pixbuf = gdk_pixbuf_new_from_stream_at_scale (stream,
 
225
                                                                                 priv->width, priv->height,
 
226
                                                                                 FALSE,
 
227
                                                                                 NULL, NULL);
 
228
                        g_object_unref (stream);
215
229
 
216
 
                priv->stock_map_pixbuf = pixbuf;
 
230
                        priv->stock_map_pixbuf = pixbuf;
 
231
                }
217
232
        }
218
233
 
219
234
        clock_map_place_locations (this);