diff options
author | Christian Grothoff <christian@grothoff.org> | 2006-11-13 04:39:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2006-11-13 04:39:03 +0000 |
commit | 86002e8ba1ddd7ddcc60c2d3a06322be57b8a199 (patch) | |
tree | 2ce9ecdbb826e55f80c59967a5569106742c9279 | |
parent | 2a25933ffb8fa9a3049ed3b6090346bf8b135abb (diff) | |
download | gnunet-gtk-86002e8ba1ddd7ddcc60c2d3a06322be57b8a199.tar.gz gnunet-gtk-86002e8ba1ddd7ddcc60c2d3a06322be57b8a199.zip |
icon
-rw-r--r-- | src/core/eggtrayicon.c | 10 | ||||
-rw-r--r-- | src/core/main.c | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/core/eggtrayicon.c b/src/core/eggtrayicon.c index 4807f9c8..ef92f44f 100644 --- a/src/core/eggtrayicon.c +++ b/src/core/eggtrayicon.c | |||
@@ -634,13 +634,21 @@ void initTrayIcon() { | |||
634 | GtkWidget *eventbox, *trayContextMenu, *tray_quit; | 634 | GtkWidget *eventbox, *trayContextMenu, *tray_quit; |
635 | GdkPixbuf *pixbuf; | 635 | GdkPixbuf *pixbuf; |
636 | GladeXML *trayContextMenuXML; | 636 | GladeXML *trayContextMenuXML; |
637 | char * instDir; | ||
638 | char * iconPath; | ||
637 | 639 | ||
638 | trayContextMenuXML = glade_xml_new (getGladeFileName(), "trayContextMenu", PACKAGE_NAME); | 640 | trayContextMenuXML = glade_xml_new (getGladeFileName(), "trayContextMenu", PACKAGE_NAME); |
639 | trayContextMenu = glade_xml_get_widget (trayContextMenuXML, "trayContextMenu"); | 641 | trayContextMenu = glade_xml_get_widget (trayContextMenuXML, "trayContextMenu"); |
640 | tray_quit = glade_xml_get_widget (trayContextMenuXML, "tray_quit"); | 642 | tray_quit = glade_xml_get_widget (trayContextMenuXML, "tray_quit"); |
641 | 643 | ||
642 | tray_icon = egg_tray_icon_new (_("GNU's p2p network")); | 644 | tray_icon = egg_tray_icon_new (_("GNU's p2p network")); |
643 | pixbuf = gdk_pixbuf_new_from_file (PACKAGE_DATA_DIR"/gnunet-gtk-tray.png", NULL); | 645 | instDir = os_get_installation_path(IPK_DATADIR); |
646 | iconPath = MALLOC(strlen(instDir) + 40); | ||
647 | strcpy(iconPath, iconDir); | ||
648 | strcat(iconPath, "/gnunet-gtk-tray.png"); | ||
649 | FREE(instDir); | ||
650 | pixbuf = gdk_pixbuf_new_from_file (iconPath, NULL); | ||
651 | FREE(iconPath); | ||
644 | tray_icon_image = gtk_image_new_from_pixbuf (pixbuf); | 652 | tray_icon_image = gtk_image_new_from_pixbuf (pixbuf); |
645 | eventbox = gtk_event_box_new (); | 653 | eventbox = gtk_event_box_new (); |
646 | gtk_container_add (GTK_CONTAINER (eventbox), tray_icon_image); | 654 | gtk_container_add (GTK_CONTAINER (eventbox), tray_icon_image); |
diff --git a/src/core/main.c b/src/core/main.c index e327d311..501f7758 100644 --- a/src/core/main.c +++ b/src/core/main.c | |||
@@ -75,7 +75,7 @@ static void customLog(const char * msg) { | |||
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | int main(int argc, | 77 | int main(int argc, |
78 | char * argv[]) { | 78 | char * const * argv) { |
79 | GtkWidget * root; | 79 | GtkWidget * root; |
80 | int i; | 80 | int i; |
81 | struct GE_Context * ectx; | 81 | struct GE_Context * ectx; |
@@ -86,9 +86,9 @@ int main(int argc, | |||
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | g_thread_init(NULL); | 88 | g_thread_init(NULL); |
89 | gtk_init(&argc, &argv); | 89 | gtk_init(&argc, (char***) &argv); |
90 | i = GNUNET_init(argc, | 90 | i = GNUNET_init(argc, |
91 | (const char**) argv, | 91 | argv, |
92 | "gnunet-gtk", | 92 | "gnunet-gtk", |
93 | &cfgFilename, | 93 | &cfgFilename, |
94 | gnunetgtkOptions, | 94 | gnunetgtkOptions, |