diff options
author | Heikki Lindholm <holin@iki.fi> | 2009-02-16 10:15:57 +0000 |
---|---|---|
committer | Heikki Lindholm <holin@iki.fi> | 2009-02-16 10:15:57 +0000 |
commit | 2d8789963527c64b40b627edf103fd820b0b19bc (patch) | |
tree | bbb7a2eef95419122e48ab90bf9e13acc6ba9ccb | |
parent | c417c9035b9014374b4708690fd4837e6fb47e65 (diff) | |
download | gnunet-gtk-2d8789963527c64b40b627edf103fd820b0b19bc.tar.gz gnunet-gtk-2d8789963527c64b40b627edf103fd820b0b19bc.zip |
(partially) fix mantis 1453
-rw-r--r-- | src/common/helper.c | 12 | ||||
-rw-r--r-- | src/core/eggtrayicon.c | 6 | ||||
-rw-r--r-- | src/core/main.c | 14 | ||||
-rw-r--r-- | src/plugins/chat/chat.c | 6 | ||||
-rw-r--r-- | src/plugins/peers/peers.c | 14 |
5 files changed, 28 insertions, 24 deletions
diff --git a/src/common/helper.c b/src/common/helper.c index a1edbea4..987155d6 100644 --- a/src/common/helper.c +++ b/src/common/helper.c | |||
@@ -354,13 +354,13 @@ GNUNET_GTK_initialize_common_library (const char *ccfnarg, | |||
354 | cron = GNUNET_cron_create (NULL); | 354 | cron = GNUNET_cron_create (NULL); |
355 | 355 | ||
356 | /* load the interface */ | 356 | /* load the interface */ |
357 | path = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 357 | path = GNUNET_get_installation_path (GNUNET_IPK_SELF_PREFIX); |
358 | filename = | 358 | filename = |
359 | GNUNET_malloc (strlen (path) + | 359 | GNUNET_malloc (strlen (path) + |
360 | strlen ("/../gnunet-gtk/gnunet-gtk.glade") + 2); | 360 | strlen ("share/gnunet-gtk/gnunet-gtk.glade") + 2); |
361 | strcpy (filename, path); | 361 | strcpy (filename, path); |
362 | GNUNET_free (path); | 362 | GNUNET_free (path); |
363 | strcat (filename, "/../gnunet-gtk/gnunet-gtk.glade"); | 363 | strcat (filename, "share/gnunet-gtk/gnunet-gtk.glade"); |
364 | #if MINGW | 364 | #if MINGW |
365 | gladeFile = GNUNET_malloc (_MAX_PATH + 1); | 365 | gladeFile = GNUNET_malloc (_MAX_PATH + 1); |
366 | plibc_conv_to_win_path (filename, gladeFile); | 366 | plibc_conv_to_win_path (filename, gladeFile); |
@@ -542,8 +542,8 @@ GNUNET_GTK_display_daemon_status (GNUNET_GTK_STATUS status, | |||
542 | 542 | ||
543 | trayIcon = GNUNET_GTK_get_trayIcon (); | 543 | trayIcon = GNUNET_GTK_get_trayIcon (); |
544 | 544 | ||
545 | instDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 545 | instDir = GNUNET_get_installation_path (GNUNET_IPK_SELF_PREFIX); |
546 | dataDir = g_strconcat (instDir, "/../gnunet-gtk/", NULL); | 546 | dataDir = g_strconcat (instDir, "share/gnunet-gtk/", NULL); |
547 | #if MINGW | 547 | #if MINGW |
548 | finalPath = GNUNET_malloc (_MAX_PATH + 1); | 548 | finalPath = GNUNET_malloc (_MAX_PATH + 1); |
549 | plibc_conv_to_win_path (dataDir, finalPath); | 549 | plibc_conv_to_win_path (dataDir, finalPath); |
@@ -560,7 +560,7 @@ GNUNET_GTK_display_daemon_status (GNUNET_GTK_STATUS status, | |||
560 | gtk_icon_source_set_filename (iconSource, iconPath); | 560 | gtk_icon_source_set_filename (iconSource, iconPath); |
561 | g_free (iconPath); | 561 | g_free (iconPath); |
562 | gtk_icon_set_add_source (iconSet, iconSource); | 562 | gtk_icon_set_add_source (iconSet, iconSource); |
563 | iconPath = g_build_filename (instDir, "..", "gnunet-gtk", | 563 | iconPath = g_build_filename (instDir, "share", "gnunet-gtk", |
564 | "gnunet-gtk-status-connected.png", NULL); | 564 | "gnunet-gtk-status-connected.png", NULL); |
565 | absPath = GNUNET_expand_file_name(NULL, iconPath); | 565 | absPath = GNUNET_expand_file_name(NULL, iconPath); |
566 | gtk_icon_source_set_filename (iconSource, absPath); | 566 | gtk_icon_source_set_filename (iconSource, absPath); |
diff --git a/src/core/eggtrayicon.c b/src/core/eggtrayicon.c index e8ecc01f..182953e5 100644 --- a/src/core/eggtrayicon.c +++ b/src/core/eggtrayicon.c | |||
@@ -705,10 +705,10 @@ initTrayIcon () | |||
705 | tray_quit = glade_xml_get_widget (trayContextMenuXML, "tray_quit"); | 705 | tray_quit = glade_xml_get_widget (trayContextMenuXML, "tray_quit"); |
706 | 706 | ||
707 | tray_icon = egg_tray_icon_new (_("GNU's peer-to-peer network")); | 707 | tray_icon = egg_tray_icon_new (_("GNU's peer-to-peer network")); |
708 | instDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 708 | instDir = GNUNET_get_installation_path (GNUNET_IPK_SELF_PREFIX); |
709 | iconPath = GNUNET_malloc (strlen (instDir) + 40); | 709 | iconPath = GNUNET_malloc (strlen (instDir) + strlen ("share/gnunet-gtk/gnunet-gtk-status-connected.svg") + 1); |
710 | strcpy (iconPath, instDir); | 710 | strcpy (iconPath, instDir); |
711 | strcat (iconPath, "/../gnunet-gtk/gnunet-gtk-status-connected.svg"); | 711 | strcat (iconPath, "share/gnunet-gtk/gnunet-gtk-status-connected.svg"); |
712 | GNUNET_free (instDir); | 712 | GNUNET_free (instDir); |
713 | pixbuf = gdk_pixbuf_new_from_file (iconPath, NULL); | 713 | pixbuf = gdk_pixbuf_new_from_file (iconPath, NULL); |
714 | GNUNET_free (iconPath); | 714 | GNUNET_free (iconPath); |
diff --git a/src/core/main.c b/src/core/main.c index 62059c09..a6bd976a 100644 --- a/src/core/main.c +++ b/src/core/main.c | |||
@@ -74,10 +74,10 @@ setIconSearchPath () | |||
74 | char *dataDir; | 74 | char *dataDir; |
75 | char *buf; | 75 | char *buf; |
76 | 76 | ||
77 | dataDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 77 | dataDir = GNUNET_get_installation_path (GNUNET_IPK_SELF_PREFIX); |
78 | buf = GNUNET_malloc (strlen (dataDir) + strlen ("../icons/") + 2); | 78 | buf = GNUNET_malloc (strlen (dataDir) + strlen ("share/icons/") + 1); |
79 | strcpy (buf, dataDir); | 79 | strcpy (buf, dataDir); |
80 | strcat (buf, "../icons/"); | 80 | strcat (buf, "share/icons/"); |
81 | gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), buf); | 81 | gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), buf); |
82 | GNUNET_free (buf); | 82 | GNUNET_free (buf); |
83 | GNUNET_free (dataDir); | 83 | GNUNET_free (dataDir); |
@@ -94,7 +94,7 @@ main (int argc, char *const *argv) | |||
94 | char *log; | 94 | char *log; |
95 | GNUNET_GE_KIND mask; | 95 | GNUNET_GE_KIND mask; |
96 | #if ENABLE_NLS | 96 | #if ENABLE_NLS |
97 | char *path; | 97 | char *path, *path_prefix; |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #ifdef WINDOWS | 100 | #ifdef WINDOWS |
@@ -118,9 +118,13 @@ main (int argc, char *const *argv) | |||
118 | 118 | ||
119 | #if ENABLE_NLS | 119 | #if ENABLE_NLS |
120 | setlocale (LC_ALL, ""); | 120 | setlocale (LC_ALL, ""); |
121 | path = GNUNET_get_installation_path (GNUNET_IPK_LOCALEDIR); | 121 | path_prefix = GNUNET_get_installation_path (GNUNET_IPK_SELF_PREFIX); |
122 | path = GNUNET_malloc (strlen (path_prefix) + strlen ("share/locale/") + 1); | ||
123 | strcpy(path, path_prefix); | ||
124 | strcat(path, "share/locale/"); | ||
122 | BINDTEXTDOMAIN ("gnunet-gtk", path); | 125 | BINDTEXTDOMAIN ("gnunet-gtk", path); |
123 | GNUNET_free (path); | 126 | GNUNET_free (path); |
127 | GNUNET_free (path_prefix); | ||
124 | textdomain ("gnunet-gtk"); | 128 | textdomain ("gnunet-gtk"); |
125 | bind_textdomain_codeset ("GNUnet", "UTF-8"); | 129 | bind_textdomain_codeset ("GNUnet", "UTF-8"); |
126 | bind_textdomain_codeset ("gnunet-gtk", "UTF-8"); | 130 | bind_textdomain_codeset ("gnunet-gtk", "UTF-8"); |
diff --git a/src/plugins/chat/chat.c b/src/plugins/chat/chat.c index 7452edac..de8d4fa9 100644 --- a/src/plugins/chat/chat.c +++ b/src/plugins/chat/chat.c | |||
@@ -267,13 +267,13 @@ member_list_callback (void *cls, | |||
267 | writearg.icon = NULL; | 267 | writearg.icon = NULL; |
268 | if (0 == memcmp (&writearg.pid, &client->mypid, sizeof (GNUNET_HashCode))) | 268 | if (0 == memcmp (&writearg.pid, &client->mypid, sizeof (GNUNET_HashCode))) |
269 | { | 269 | { |
270 | path = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 270 | path = GNUNET_get_installation_path (GNUNET_IPK_SELF_PREFIX); |
271 | filename = | 271 | filename = |
272 | GNUNET_malloc (strlen (path) + | 272 | GNUNET_malloc (strlen (path) + |
273 | strlen ("/../gnunet-gtk/self.png") + 2); | 273 | strlen ("share/gnunet-gtk/self.png") + 1); |
274 | strcpy (filename, path); | 274 | strcpy (filename, path); |
275 | GNUNET_free (path); | 275 | GNUNET_free (path); |
276 | strcat (filename, "/../gnunet-gtk/self.png"); | 276 | strcat (filename, "share/gnunet-gtk/self.png"); |
277 | writearg.icon = gdk_pixbuf_new_from_file (filename, NULL); | 277 | writearg.icon = gdk_pixbuf_new_from_file (filename, NULL); |
278 | GNUNET_free (filename); | 278 | GNUNET_free (filename); |
279 | } | 279 | } |
diff --git a/src/plugins/peers/peers.c b/src/plugins/peers/peers.c index 7eee5b12..42462c54 100644 --- a/src/plugins/peers/peers.c +++ b/src/plugins/peers/peers.c | |||
@@ -155,11 +155,11 @@ collector (void *data, | |||
155 | cc = GNUNET_strdup (cc); | 155 | cc = GNUNET_strdup (cc); |
156 | for (i = 0; i < strlen (cc); i++) | 156 | for (i = 0; i < strlen (cc); i++) |
157 | cc[i] = tolower (cc[i]); | 157 | cc[i] = tolower (cc[i]); |
158 | dir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 158 | dir = GNUNET_get_installation_path (GNUNET_IPK_SELF_PREFIX); |
159 | fn = GNUNET_malloc (strlen (dir) + 32); | 159 | fn = GNUNET_malloc (strlen (dir) + 32); |
160 | strcpy (fn, dir); | 160 | strcpy (fn, dir); |
161 | strcat (fn, | 161 | strcat (fn, |
162 | DIR_SEPARATOR_STR ".." | 162 | "share" |
163 | DIR_SEPARATOR_STR "gnunet-gtk" | 163 | DIR_SEPARATOR_STR "gnunet-gtk" |
164 | DIR_SEPARATOR_STR "flags" DIR_SEPARATOR_STR); | 164 | DIR_SEPARATOR_STR "flags" DIR_SEPARATOR_STR); |
165 | strcat (fn, cc); | 165 | strcat (fn, cc); |
@@ -361,29 +361,29 @@ init_peers (struct GNUNET_GE_Context *e, struct GNUNET_GC_Configuration *c) | |||
361 | gtk_tree_view_column_set_sort_column_id (column, 3); | 361 | gtk_tree_view_column_set_sort_column_id (column, 3); |
362 | 362 | ||
363 | 363 | ||
364 | dir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 364 | dir = GNUNET_get_installation_path (GNUNET_IPK_SELF_PREFIX); |
365 | fn = GNUNET_malloc (strlen (dir) + 32); | 365 | fn = GNUNET_malloc (strlen (dir) + 32); |
366 | strcpy (fn, dir); | 366 | strcpy (fn, dir); |
367 | strcat (fn, | 367 | strcat (fn, |
368 | DIR_SEPARATOR_STR ".." | 368 | "share" |
369 | DIR_SEPARATOR_STR "gnunet-gtk" DIR_SEPARATOR_STR "red.png"); | 369 | DIR_SEPARATOR_STR "gnunet-gtk" DIR_SEPARATOR_STR "red.png"); |
370 | red = gdk_pixbuf_new_from_file (fn, NULL); | 370 | red = gdk_pixbuf_new_from_file (fn, NULL); |
371 | 371 | ||
372 | strcpy (fn, dir); | 372 | strcpy (fn, dir); |
373 | strcat (fn, | 373 | strcat (fn, |
374 | DIR_SEPARATOR_STR ".." | 374 | "share" |
375 | DIR_SEPARATOR_STR "gnunet-gtk" DIR_SEPARATOR_STR "yellow.png"); | 375 | DIR_SEPARATOR_STR "gnunet-gtk" DIR_SEPARATOR_STR "yellow.png"); |
376 | yellow = gdk_pixbuf_new_from_file (fn, NULL); | 376 | yellow = gdk_pixbuf_new_from_file (fn, NULL); |
377 | 377 | ||
378 | strcpy (fn, dir); | 378 | strcpy (fn, dir); |
379 | strcat (fn, | 379 | strcat (fn, |
380 | DIR_SEPARATOR_STR ".." | 380 | "share" |
381 | DIR_SEPARATOR_STR "gnunet-gtk" DIR_SEPARATOR_STR "green.png"); | 381 | DIR_SEPARATOR_STR "gnunet-gtk" DIR_SEPARATOR_STR "green.png"); |
382 | green = gdk_pixbuf_new_from_file (fn, NULL); | 382 | green = gdk_pixbuf_new_from_file (fn, NULL); |
383 | 383 | ||
384 | strcpy (fn, dir); | 384 | strcpy (fn, dir); |
385 | strcat (fn, | 385 | strcat (fn, |
386 | DIR_SEPARATOR_STR ".." | 386 | "share" |
387 | DIR_SEPARATOR_STR "gnunet-gtk" DIR_SEPARATOR_STR "black.png"); | 387 | DIR_SEPARATOR_STR "gnunet-gtk" DIR_SEPARATOR_STR "black.png"); |
388 | black = gdk_pixbuf_new_from_file (fn, NULL); | 388 | black = gdk_pixbuf_new_from_file (fn, NULL); |
389 | GNUNET_free (fn); | 389 | GNUNET_free (fn); |