diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-04-24 06:10:16 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-04-24 06:10:16 +0000 |
commit | f7449b7b2b4196938ce51038f35f68f4777ebaa6 (patch) | |
tree | 05cf2468bfca728e7cffc006724e1ddbc3ecf539 | |
parent | 9d83324ea2394706cc3b9571343f690e264e47a2 (diff) | |
download | gnunet-gtk-f7449b7b2b4196938ce51038f35f68f4777ebaa6.tar.gz gnunet-gtk-f7449b7b2b4196938ce51038f35f68f4777ebaa6.zip |
formatting
-rw-r--r-- | src/common/helper.c | 5 | ||||
-rw-r--r-- | src/core/eggtrayicon.c | 7 | ||||
-rw-r--r-- | src/plugins/chat/chat.c | 26 | ||||
-rw-r--r-- | src/plugins/chat/chat.h | 2 | ||||
-rw-r--r-- | src/plugins/fs/meta.c | 4 | ||||
-rw-r--r-- | src/plugins/stats/functions.c | 19 |
6 files changed, 31 insertions, 32 deletions
diff --git a/src/common/helper.c b/src/common/helper.c index e35d0bc3..28518fae 100644 --- a/src/common/helper.c +++ b/src/common/helper.c | |||
@@ -186,7 +186,8 @@ GNUNET_GTK_get_main_glade_XML () | |||
186 | /** | 186 | /** |
187 | * Simple accessor method. | 187 | * Simple accessor method. |
188 | */ | 188 | */ |
189 | GtkIconFactory *GNUNET_GTK_get_iconFactory () | 189 | GtkIconFactory * |
190 | GNUNET_GTK_get_iconFactory () | ||
190 | { | 191 | { |
191 | return iconFactory; | 192 | return iconFactory; |
192 | } | 193 | } |
@@ -367,7 +368,7 @@ GNUNET_GTK_initialize_common_library (struct GNUNET_GE_Context *e, | |||
367 | GNUNET_GE_FATAL | GNUNET_GE_USER | | 368 | GNUNET_GE_FATAL | GNUNET_GE_USER | |
368 | GNUNET_GE_IMMEDIATE, "glade_xml_new", | 369 | GNUNET_GE_IMMEDIATE, "glade_xml_new", |
369 | gladeFile); | 370 | gladeFile); |
370 | iconFactory = gtk_icon_factory_new(); | 371 | iconFactory = gtk_icon_factory_new (); |
371 | gtk_icon_factory_add_default (iconFactory); | 372 | gtk_icon_factory_add_default (iconFactory); |
372 | #if GTK_CHECK_VERSION (2,10,0) | 373 | #if GTK_CHECK_VERSION (2,10,0) |
373 | trayIcon = gtk_status_icon_new (); | 374 | trayIcon = gtk_status_icon_new (); |
diff --git a/src/core/eggtrayicon.c b/src/core/eggtrayicon.c index 052e1d1d..93e69063 100644 --- a/src/core/eggtrayicon.c +++ b/src/core/eggtrayicon.c | |||
@@ -688,7 +688,7 @@ initTrayIcon () | |||
688 | g_build_filename (instDir, "..", "gnunet-gtk", | 688 | g_build_filename (instDir, "..", "gnunet-gtk", |
689 | "gnunet-gtk-status-connected.svg", NULL); | 689 | "gnunet-gtk-status-connected.svg", NULL); |
690 | gtk_icon_source_set_filename (iconSource, iconPath); | 690 | gtk_icon_source_set_filename (iconSource, iconPath); |
691 | g_free (iconPath); | 691 | g_free (iconPath); |
692 | gtk_icon_set_add_source (iconSet, iconSource); | 692 | gtk_icon_set_add_source (iconSet, iconSource); |
693 | iconPath = | 693 | iconPath = |
694 | g_build_filename (instDir, "..", "gnunet-gtk", | 694 | g_build_filename (instDir, "..", "gnunet-gtk", |
@@ -698,9 +698,8 @@ initTrayIcon () | |||
698 | gtk_icon_source_set_size_wildcarded (iconSource, FALSE); | 698 | gtk_icon_source_set_size_wildcarded (iconSource, FALSE); |
699 | gtk_icon_set_add_source (iconSet, iconSource); | 699 | gtk_icon_set_add_source (iconSet, iconSource); |
700 | 700 | ||
701 | gtk_icon_factory_add (GNUNET_GTK_get_iconFactory(), | 701 | gtk_icon_factory_add (GNUNET_GTK_get_iconFactory (), |
702 | "gnunet-gtk-status-connected", | 702 | "gnunet-gtk-status-connected", iconSet); |
703 | iconSet); | ||
704 | gtk_icon_set_unref (iconSet); | 703 | gtk_icon_set_unref (iconSet); |
705 | gtk_icon_source_free (iconSource); | 704 | gtk_icon_source_free (iconSource); |
706 | GNUNET_free (instDir); | 705 | GNUNET_free (instDir); |
diff --git a/src/plugins/chat/chat.c b/src/plugins/chat/chat.c index 2fe5f84e..33245eaf 100644 --- a/src/plugins/chat/chat.c +++ b/src/plugins/chat/chat.c | |||
@@ -190,8 +190,7 @@ receive_callback (void *cls, | |||
190 | 190 | ||
191 | static int | 191 | static int |
192 | member_list_callback (void *cls, const char *senderNick, | 192 | member_list_callback (void *cls, const char *senderNick, |
193 | int is_joining, | 193 | int is_joining, GNUNET_CronTime timestamp) |
194 | GNUNET_CronTime timestamp) | ||
195 | { | 194 | { |
196 | struct GNUNET_CHAT_gui_chat_client *client = cls; | 195 | struct GNUNET_CHAT_gui_chat_client *client = cls; |
197 | GtkWidget *chatnicklist; | 196 | GtkWidget *chatnicklist; |
@@ -207,7 +206,7 @@ member_list_callback (void *cls, const char *senderNick, | |||
207 | /* chatnicklist is the GtkTextView object */ | 206 | /* chatnicklist is the GtkTextView object */ |
208 | writearg.nick = senderNick; | 207 | writearg.nick = senderNick; |
209 | writearg.nickList = chatnicklist; | 208 | writearg.nickList = chatnicklist; |
210 | 209 | ||
211 | g_print ("received nick %s calling safe write call\n", writearg.nick); | 210 | g_print ("received nick %s calling safe write call\n", writearg.nick); |
212 | if (is_joining) | 211 | if (is_joining) |
213 | GNUNET_GTK_save_call (&write_nick_save_call, &writearg); | 212 | GNUNET_GTK_save_call (&write_nick_save_call, &writearg); |
@@ -227,9 +226,9 @@ init_chat (struct GNUNET_GE_Context *ectx, | |||
227 | chat_cfg = cfg; | 226 | chat_cfg = cfg; |
228 | room_member_list = NULL; | 227 | room_member_list = NULL; |
229 | 228 | ||
230 | 229 | ||
231 | /*priv_key = GNUNET_RSA_create_key (); | 230 | /*priv_key = GNUNET_RSA_create_key (); |
232 | GNUNET_RSA_get_public_key (priv_key, &pub_key);*/ | 231 | GNUNET_RSA_get_public_key (priv_key, &pub_key); */ |
233 | 232 | ||
234 | sock = GNUNET_client_connection_create (chat_ectx, chat_cfg); | 233 | sock = GNUNET_client_connection_create (chat_ectx, chat_cfg); |
235 | lock = GNUNET_mutex_create (GNUNET_NO); | 234 | lock = GNUNET_mutex_create (GNUNET_NO); |
@@ -294,16 +293,19 @@ create_chat_room_tab (char *room_name, char *nick) | |||
294 | client = GNUNET_malloc (sizeof (struct GNUNET_CHAT_gui_chat_client)); | 293 | client = GNUNET_malloc (sizeof (struct GNUNET_CHAT_gui_chat_client)); |
295 | client->room_name = GNUNET_malloc (strlen (room_name)); | 294 | client->room_name = GNUNET_malloc (strlen (room_name)); |
296 | strcpy (client->room_name, room_name); | 295 | strcpy (client->room_name, room_name); |
297 | 296 | ||
298 | client->priv_key = NULL; | 297 | client->priv_key = NULL; |
299 | client->priv_key = GNUNET_CHAT_initPrivateKey (chat_ectx,chat_cfg,room_name,&client->pub_key); | 298 | client->priv_key = |
299 | GNUNET_CHAT_initPrivateKey (chat_ectx, chat_cfg, room_name, | ||
300 | &client->pub_key); | ||
300 | 301 | ||
301 | /* We do a silly strdup later on member_info... either check for NULL or only pass "" for member_info!! */ | 302 | /* We do a silly strdup later on member_info... either check for NULL or only pass "" for member_info!! */ |
302 | chatRoom = | 303 | chatRoom = |
303 | GNUNET_CHAT_join_room (chat_ectx, chat_cfg, nick, room_name, &client->pub_key, | 304 | GNUNET_CHAT_join_room (chat_ectx, chat_cfg, nick, room_name, |
304 | client->priv_key, "", &receive_callback, client, | 305 | &client->pub_key, client->priv_key, "", |
305 | &member_list_callback, client); | 306 | &receive_callback, client, &member_list_callback, |
306 | 307 | client); | |
308 | |||
307 | client->room = chatRoom; | 309 | client->room = chatRoom; |
308 | client->chatFrame = newChatWindow; | 310 | client->chatFrame = newChatWindow; |
309 | client->number = | 311 | client->number = |
diff --git a/src/plugins/chat/chat.h b/src/plugins/chat/chat.h index fd395176..1994f0c7 100644 --- a/src/plugins/chat/chat.h +++ b/src/plugins/chat/chat.h | |||
@@ -46,7 +46,7 @@ struct GNUNET_CHAT_gui_chat_client | |||
46 | struct GNUNET_CHAT_gui_chat_client *next; | 46 | struct GNUNET_CHAT_gui_chat_client *next; |
47 | struct GNUNET_CHAT_gui_chat_client *prev; | 47 | struct GNUNET_CHAT_gui_chat_client *prev; |
48 | GNUNET_RSA_PublicKey pub_key; | 48 | GNUNET_RSA_PublicKey pub_key; |
49 | const struct GNUNET_RSA_PrivateKey *priv_key; | 49 | const struct GNUNET_RSA_PrivateKey *priv_key; |
50 | int number; | 50 | int number; |
51 | GtkWidget *chatFrame; | 51 | GtkWidget *chatFrame; |
52 | struct GNUNET_CHAT_Room *room; | 52 | struct GNUNET_CHAT_Room *room; |
diff --git a/src/plugins/fs/meta.c b/src/plugins/fs/meta.c index feb4a886..c4c198ed 100644 --- a/src/plugins/fs/meta.c +++ b/src/plugins/fs/meta.c | |||
@@ -398,7 +398,9 @@ getKeywordURIFromList (GladeXML * xml, const char *name) | |||
398 | } | 398 | } |
399 | while (gtk_tree_model_iter_next (keymodel, &iter)); | 399 | while (gtk_tree_model_iter_next (keymodel, &iter)); |
400 | } | 400 | } |
401 | keywordURI = GNUNET_ECRS_keyword_command_line_to_uri (NULL, kpos, (const char**) keywords); | 401 | keywordURI = |
402 | GNUNET_ECRS_keyword_command_line_to_uri (NULL, kpos, | ||
403 | (const char **) keywords); | ||
402 | while (kpos > 0) | 404 | while (kpos > 0) |
403 | GNUNET_free (keywords[--kpos]); | 405 | GNUNET_free (keywords[--kpos]); |
404 | GNUNET_array_grow (keywords, ksize, 0); | 406 | GNUNET_array_grow (keywords, ksize, 0); |
diff --git a/src/plugins/stats/functions.c b/src/plugins/stats/functions.c index a7d2134c..93bb8299 100644 --- a/src/plugins/stats/functions.c +++ b/src/plugins/stats/functions.c | |||
@@ -538,9 +538,8 @@ updateDaemonStatus (void *delta) | |||
538 | gtk_icon_source_set_size_wildcarded (iconSource, FALSE); | 538 | gtk_icon_source_set_size_wildcarded (iconSource, FALSE); |
539 | gtk_icon_set_add_source (iconSet, iconSource); | 539 | gtk_icon_set_add_source (iconSet, iconSource); |
540 | 540 | ||
541 | gtk_icon_factory_add (GNUNET_GTK_get_iconFactory(), | 541 | gtk_icon_factory_add (GNUNET_GTK_get_iconFactory (), |
542 | "gnunet-gtk-status-nodaemon", | 542 | "gnunet-gtk-status-nodaemon", iconSet); |
543 | iconSet); | ||
544 | gtk_icon_set_unref (iconSet); | 543 | gtk_icon_set_unref (iconSet); |
545 | 544 | ||
546 | iconSet = gtk_icon_set_new (); | 545 | iconSet = gtk_icon_set_new (); |
@@ -557,9 +556,8 @@ updateDaemonStatus (void *delta) | |||
557 | gtk_icon_source_set_size_wildcarded (iconSource, FALSE); | 556 | gtk_icon_source_set_size_wildcarded (iconSource, FALSE); |
558 | gtk_icon_set_add_source (iconSet, iconSource); | 557 | gtk_icon_set_add_source (iconSet, iconSource); |
559 | 558 | ||
560 | gtk_icon_factory_add (GNUNET_GTK_get_iconFactory(), | 559 | gtk_icon_factory_add (GNUNET_GTK_get_iconFactory (), |
561 | "gnunet-gtk-status-disconnected", | 560 | "gnunet-gtk-status-disconnected", iconSet); |
562 | iconSet); | ||
563 | gtk_icon_set_unref (iconSet); | 561 | gtk_icon_set_unref (iconSet); |
564 | 562 | ||
565 | 563 | ||
@@ -584,8 +582,7 @@ updateDaemonStatus (void *delta) | |||
584 | gtk_image_set_from_stock (GTK_IMAGE (statusConnexionsPic), | 582 | gtk_image_set_from_stock (GTK_IMAGE (statusConnexionsPic), |
585 | GTK_STOCK_DIALOG_ERROR, 1); | 583 | GTK_STOCK_DIALOG_ERROR, 1); |
586 | #if GTK_CHECK_VERSION (2,10,0) | 584 | #if GTK_CHECK_VERSION (2,10,0) |
587 | gtk_status_icon_set_tooltip (trayIcon, | 585 | gtk_status_icon_set_tooltip (trayIcon, _("Unknown status")); |
588 | _("Unknown status")); | ||
589 | gtk_status_icon_set_from_stock (trayIcon, | 586 | gtk_status_icon_set_from_stock (trayIcon, |
590 | "gnunet-gtk-status-nodaemon"); | 587 | "gnunet-gtk-status-nodaemon"); |
591 | #endif | 588 | #endif |
@@ -637,8 +634,7 @@ updateDaemonStatus (void *delta) | |||
637 | gtk_image_set_from_stock (GTK_IMAGE (statusConnexionsPic), | 634 | gtk_image_set_from_stock (GTK_IMAGE (statusConnexionsPic), |
638 | GTK_STOCK_DISCONNECT, 1); | 635 | GTK_STOCK_DISCONNECT, 1); |
639 | #if GTK_CHECK_VERSION (2,10,0) | 636 | #if GTK_CHECK_VERSION (2,10,0) |
640 | gtk_status_icon_set_tooltip (trayIcon, | 637 | gtk_status_icon_set_tooltip (trayIcon, _("GNUnet - Disconnected")); |
641 | _("GNUnet - Disconnected")); | ||
642 | gtk_status_icon_set_from_stock (trayIcon, | 638 | gtk_status_icon_set_from_stock (trayIcon, |
643 | "gnunet-gtk-status-disconnected"); | 639 | "gnunet-gtk-status-disconnected"); |
644 | #endif | 640 | #endif |
@@ -654,8 +650,7 @@ updateDaemonStatus (void *delta) | |||
654 | #if GTK_CHECK_VERSION (2,10,0) | 650 | #if GTK_CHECK_VERSION (2,10,0) |
655 | gtk_status_icon_set_tooltip (trayIcon, | 651 | gtk_status_icon_set_tooltip (trayIcon, |
656 | _("GNUnet - Daemon not running")); | 652 | _("GNUnet - Daemon not running")); |
657 | gtk_status_icon_set_from_stock (trayIcon, | 653 | gtk_status_icon_set_from_stock (trayIcon, "gnunet-gtk-status-nodaemon"); |
658 | "gnunet-gtk-status-nodaemon"); | ||
659 | #endif | 654 | #endif |
660 | last_status = -2; | 655 | last_status = -2; |
661 | } | 656 | } |