aboutsummaryrefslogtreecommitdiff
path: root/src/common/logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/logging.c')
-rw-r--r--src/common/logging.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/common/logging.c b/src/common/logging.c
index a749536d..aef6fa46 100644
--- a/src/common/logging.c
+++ b/src/common/logging.c
@@ -44,7 +44,9 @@ init ()
44 if (statusXML != NULL) 44 if (statusXML != NULL)
45 return; 45 return;
46 statusXML 46 statusXML
47 = glade_xml_new (GNUNET_GTK_get_glade_filename (), "statusWindow", PACKAGNUNET_GENAME); 47 =
48 glade_xml_new (GNUNET_GTK_get_glade_filename (), "statusWindow",
49 PACKAGNUNET_GENAME);
48 infoWindow = glade_xml_get_widget (statusXML, "statusWindow"); 50 infoWindow = glade_xml_get_widget (statusXML, "statusWindow");
49 infoWindowTextView 51 infoWindowTextView
50 = glade_xml_get_widget (statusXML, "messageWindowTextView"); 52 = glade_xml_get_widget (statusXML, "messageWindowTextView");
@@ -126,22 +128,23 @@ saveAddLogEntry (void *args)
126 static GtkWidget *s = NULL; 128 static GtkWidget *s = NULL;
127 static int once = 1; 129 static int once = 1;
128 static guint id; 130 static guint id;
129 char * val; 131 char *val;
130 132
131 init (); 133 init ();
132 if (once) 134 if (once)
133 { 135 {
134 once = 0; 136 once = 0;
135 s = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "statusbar"); 137 s =
138 glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "statusbar");
136 id = gtk_statusbar_get_context_id (GTK_STATUSBAR (s), "LOG"); 139 id = gtk_statusbar_get_context_id (GTK_STATUSBAR (s), "LOG");
137 } 140 }
138 else 141 else
139 gtk_statusbar_pop (GTK_STATUSBAR (s), id); 142 gtk_statusbar_pop (GTK_STATUSBAR (s), id);
140 val = GNUNET_strdup((const char*) args); 143 val = GNUNET_strdup ((const char *) args);
141 if (strstr(val, "\n") != NULL) 144 if (strstr (val, "\n") != NULL)
142 strstr(val, "\n")[0] = '\0'; 145 strstr (val, "\n")[0] = '\0';
143 gtk_statusbar_push (GTK_STATUSBAR (s), id, val); 146 gtk_statusbar_push (GTK_STATUSBAR (s), id, val);
144 GNUNET_free(val); 147 GNUNET_free (val);
145 return NULL; 148 return NULL;
146} 149}
147 150
@@ -183,7 +186,8 @@ GNUNET_GTK_create_gtk_logger (GNUNET_GEKIND mask)
183 struct GNUNET_GEContext *myLog; 186 struct GNUNET_GEContext *myLog;
184 187
185 myLog = GNUNET_GEcreate_context_callback (mask, 188 myLog = GNUNET_GEcreate_context_callback (mask,
186 &ge_gtk_log_handler, NULL, NULL, NULL); 189 &ge_gtk_log_handler, NULL, NULL,
190 NULL);
187 return myLog; 191 return myLog;
188} 192}
189 193