summaryrefslogtreecommitdiffstats
path: root/gnome-map/timezonemapmodule.c
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-27 14:45:29 +0000
committerMatt Wilson <msw@redhat.com>1999-08-27 14:45:29 +0000
commite76282c0904b1b4961e7b9445661c137ceecddb5 (patch)
tree6de6c7e06001d7945fb056619c2abd22fa17dee7 /gnome-map/timezonemapmodule.c
parent5781ea98d8339526b7b286d2421b1fb18361d9f9 (diff)
downloadanaconda-e76282c0904b1b4961e7b9445661c137ceecddb5.tar.gz
anaconda-e76282c0904b1b4961e7b9445661c137ceecddb5.tar.xz
anaconda-e76282c0904b1b4961e7b9445661c137ceecddb5.zip
path for picture
Diffstat (limited to 'gnome-map/timezonemapmodule.c')
-rw-r--r--gnome-map/timezonemapmodule.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gnome-map/timezonemapmodule.c b/gnome-map/timezonemapmodule.c
index 33027c177..2cb96a306 100644
--- a/gnome-map/timezonemapmodule.c
+++ b/gnome-map/timezonemapmodule.c
@@ -643,16 +643,16 @@ create_location_list (MapData *mapdata)
return scrolledwin;
}
-MapData * new_mapdata (void)
+MapData * new_mapdata (char * path)
{
MapData * mapdata;
mapdata = g_new0 (MapData, 1);
/* make a new map view */
- WorldMap = gnome_map_new ("map480.png", 390, 180, FALSE);
+ WorldMap = gnome_map_new (path, 390, 180, FALSE);
if (!WorldMap) {
g_warning ("Could not create map view.");
- exit (1);
+ return NULL;
}
WorldMap->data = mapdata;
mapdata->map = WorldMap;
@@ -666,7 +666,7 @@ MapData * new_mapdata (void)
mapdata->Locations = loadTZDB ();
if (!mapdata->Locations) {
g_warning (_("Cannot load timezone data"));
- exit (1);
+ return NULL;
}
mapdata->citylist = create_location_list (mapdata);
@@ -802,12 +802,15 @@ static PyMethodDef timezoneMethods[] = {
static tzObject * doNewTZ (PyObject * s, PyObject * args) {
tzObject *o;
+ char * path;
+ if (!PyArg_ParseTuple(args, "s", &path))
+
o = (tzObject *) PyObject_NEW(tzObject, &tzType);
- o->mapdata = new_mapdata ();
+ o->mapdata = new_mapdata (path);
- if (!WorldMap) {
+ if (!WorldMap || !o->mapdata) {
PyErr_SetString(PyExc_TypeError, "Could not create map view.");
return NULL;
}