aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-conversation-gtk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/gnunet-conversation-gtk.c')
-rw-r--r--src/conversation/gnunet-conversation-gtk.c78
1 files changed, 14 insertions, 64 deletions
diff --git a/src/conversation/gnunet-conversation-gtk.c b/src/conversation/gnunet-conversation-gtk.c
index 9c775d7b..8b2f7219 100644
--- a/src/conversation/gnunet-conversation-gtk.c
+++ b/src/conversation/gnunet-conversation-gtk.c
@@ -338,8 +338,6 @@ start_phone ()
338{ 338{
339 struct GNUNET_GNSRECORD_Data rd; 339 struct GNUNET_GNSRECORD_Data rd;
340 340
341 LOG ("start_phone\n");
342
343 if (NULL == caller_id) 341 if (NULL == caller_id)
344 { 342 {
345 LOG (_("Ego `%s' no longer available, phone is now down.\n"), ego_name); 343 LOG (_("Ego `%s' no longer available, phone is now down.\n"), ego_name);
@@ -472,7 +470,6 @@ do_call (const char *arg)
472static void 470static void
473do_accept (const char *args) 471do_accept (const char *args)
474{ 472{
475 FPRINTF (stderr, "do_accept run");
476 struct CallList *cl; 473 struct CallList *cl;
477 char buf[32]; 474 char buf[32];
478 475
@@ -718,7 +715,6 @@ do_resume (const char *args)
718static void 715static void
719do_reject (const char *args) 716do_reject (const char *args)
720{ 717{
721 FPRINTF (stderr, "doing reject");
722 struct CallList *cl; 718 struct CallList *cl;
723 char buf[32]; 719 char buf[32];
724 720
@@ -807,9 +803,6 @@ display_record (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
807 GNUNET_NAMESTORE_zone_iterator_next (list_it); 803 GNUNET_NAMESTORE_zone_iterator_next (list_it);
808 return; 804 return;
809 } 805 }
810 //FPRINTF (stdout,
811// "%s:\n",
812// rname);
813 for (i = 0; i < rd_len; i++) 806 for (i = 0; i < rd_len; i++)
814 { 807 {
815 808
@@ -1115,14 +1108,12 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1115 speaker = GNUNET_SPEAKER_create_from_hardware (cfg); 1108 speaker = GNUNET_SPEAKER_create_from_hardware (cfg);
1116 mic = GNUNET_MICROPHONE_create_from_hardware (cfg); 1109 mic = GNUNET_MICROPHONE_create_from_hardware (cfg);
1117 1110
1118// ego_name = "phone_ego"; 1111 if (ego_name == NULL)
1119 if (NULL == ego_name)
1120 { 1112 {
1121 ego_name = "phone-ego"; 1113 ego_name = "phone-ego";
1122 LOG ("%s", _("No ego given, using default \"phone-ego\" \n"));
1123 return;
1124 }
1125 1114
1115 LOG (_("No ego given, using default: %s "), ego_name);
1116 }
1126 1117
1127 id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL); 1118 id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL);
1128 1119
@@ -1149,12 +1140,15 @@ main (int argc, char *const *argv)
1149 {'e', "ego", "ego", 1140 {'e', "ego", "ego",
1150 gettext_noop ("select ego to use"), 1, 1141 gettext_noop ("select ego to use"), 1,
1151 &GNUNET_GETOPT_set_string, &ego_name}, 1142 &GNUNET_GETOPT_set_string, &ego_name},
1152
1153 {'t', "tray", NULL, 1143 {'t', "tray", NULL,
1154 gettext_noop ("start in tray mode"), 0, 1144 gettext_noop ("start in tray mode"), 0,
1155 &GNUNET_GETOPT_set_one, &tray_only}, 1145 &GNUNET_GETOPT_set_one, &tray_only},
1156 GNUNET_GETOPT_OPTION_END 1146 GNUNET_GETOPT_OPTION_END
1157 }; 1147 };
1148
1149
1150
1151
1158 if (GNUNET_OK != 1152 if (GNUNET_OK !=
1159 GNUNET_GTK_main_loop_start ("gnunet-conversation-gtk", 1153 GNUNET_GTK_main_loop_start ("gnunet-conversation-gtk",
1160 "GTK GUI for conversation", argc, argv, 1154 "GTK GUI for conversation", argc, argv,
@@ -1163,7 +1157,6 @@ main (int argc, char *const *argv)
1163 &run)) 1157 &run))
1164 return 1; 1158 return 1;
1165 return 0; 1159 return 0;
1166 FPRINTF (stderr, "line %i", line);
1167} 1160}
1168 1161
1169/* gui stuff start */ 1162/* gui stuff start */
@@ -1242,8 +1235,6 @@ GNUNET_CONVERSATION_GTK_on_call_clicked ()
1242 address_entry = GTK_ENTRY (get_object ("GNUNET_GTK_conversation_address")); 1235 address_entry = GTK_ENTRY (get_object ("GNUNET_GTK_conversation_address"));
1243 to_addr = gtk_entry_get_text (address_entry); 1236 to_addr = gtk_entry_get_text (address_entry);
1244 1237
1245// FPRINTF (stderr, _("calling: %s \n"), to_addr );
1246
1247 do_call (to_addr); 1238 do_call (to_addr);
1248 disable_button ("GNUNET_GTK_conversation_accept_button"); 1239 disable_button ("GNUNET_GTK_conversation_accept_button");
1249 do_status (""); 1240 do_status ("");
@@ -1260,7 +1251,6 @@ GNUNET_CONVERSATION_GTK_on_hangup_clicked ()
1260 enable_button ("GNUNET_GTK_conversation_call_button"); 1251 enable_button ("GNUNET_GTK_conversation_call_button");
1261 1252
1262 1253
1263 //FPRINTF (stderr, "hangup clicked \n");
1264 do_reject (""); 1254 do_reject ("");
1265 do_status (""); 1255 do_status ("");
1266} 1256}
@@ -1271,7 +1261,6 @@ GNUNET_CONVERSATION_GTK_on_hangup_clicked ()
1271void 1261void
1272GNUNET_CONVERSATION_GTK_on_accept_clicked () 1262GNUNET_CONVERSATION_GTK_on_accept_clicked ()
1273{ 1263{
1274 FPRINTF (stderr, "accept clicked \n");
1275 do_accept (0); 1264 do_accept (0);
1276 // hide_infobar (); 1265 // hide_infobar ();
1277} 1266}
@@ -1293,14 +1282,7 @@ GNUNET_CONVERSATION_GTK_on_reject_clicked ()
1293void 1282void
1294GNUNET_CONVERSATION_GTK_on_pause_clicked () 1283GNUNET_CONVERSATION_GTK_on_pause_clicked ()
1295{ 1284{
1296// GtkEntry *entry;
1297do_suspend("0"); 1285do_suspend("0");
1298 //FPRINTF (stderr, "pause clicked \n");
1299 //do_pause("");
1300 // entry = GTK_ENTRY((get_object ("GNUNET_GTK_conversation_address")));
1301 //FPRINTF (stderr, gtk_entry_get_text (entry));
1302// gtk_entry_set_text (entry, "testtextje");
1303// show_infobar ();
1304} 1286}
1305 1287
1306/** 1288/**
@@ -1309,7 +1291,6 @@ do_suspend("0");
1309void 1291void
1310GNUNET_CONVERSATION_GTK_on_resume_clicked () 1292GNUNET_CONVERSATION_GTK_on_resume_clicked ()
1311{ 1293{
1312 //FPRINTF (stderr, "reject clicked \n");
1313 do_resume (""); 1294 do_resume ("");
1314} 1295}
1315 1296
@@ -1319,39 +1300,11 @@ GNUNET_CONVERSATION_GTK_on_resume_clicked ()
1319void 1300void
1320GNUNET_CONVERSATION_GTK_on_status_clicked () 1301GNUNET_CONVERSATION_GTK_on_status_clicked ()
1321{ 1302{
1322
1323 FPRINTF (stderr, "status clicked \n");
1324
1325// do_accept("0");
1326 do_status (" "); 1303 do_status (" ");
1327 //quick_message('hee blaaat you have a call from blaat');
1328}
1329
1330/*
1331void
1332GNUNET_contact_test ()
1333{
1334FPRINTF (stderr, "gnunet contact test"
1335}
1336*/
1337
1338void
1339use_current_incoming_address ()
1340{
1341 FPRINTF (stderr, "use cur addr");
1342} 1304}
1343 1305
1344 1306
1345/* 1307/*
1346void
1347test_function (gint response_id)
1348{
1349 FPRINTF (stderr, "teest %u", response_id);
1350}
1351*/
1352
1353
1354/*
1355 * add a new contact 1308 * add a new contact
1356 * @param name 1309 * @param name
1357 * @param address 1310 * @param address
@@ -1390,7 +1343,6 @@ GNUNET_CONVERSATION_GTK_on_add_clicked (GtkButton * button,
1390{ 1343{
1391// gint response_id; 1344// gint response_id;
1392 1345
1393 FPRINTF (stderr, "add clicked \n");
1394 //unused: *anotherArea, *labelName, *labelAddres *caller_name 1346 //unused: *anotherArea, *labelName, *labelAddres *caller_name
1395 1347
1396 GtkLabel *notification; 1348 GtkLabel *notification;
@@ -1417,10 +1369,7 @@ GNUNET_CONVERSATION_GTK_on_add_clicked (GtkButton * button,
1417 _("Cancel"), GTK_RESPONSE_CANCEL, NULL); 1369 _("Cancel"), GTK_RESPONSE_CANCEL, NULL);
1418 gtk_dialog_add_action_widget (dialog, GTK_WIDGET(currentCheckButton), GTK_RESPONSE_OK); 1370 gtk_dialog_add_action_widget (dialog, GTK_WIDGET(currentCheckButton), GTK_RESPONSE_OK);
1419// FPRINTF (stderr, "response id : %u", response_id); 1371// FPRINTF (stderr, "response id : %u", response_id);
1420 g_signal_connect (GTK_BUTTON (currentCheckButton), "clicked", 1372
1421 G_CALLBACK (use_current_incoming_address), NULL);
1422
1423
1424 gtk_dialog_add_action_widget (dialog, GTK_WIDGET(nameEntry), 2); 1373 gtk_dialog_add_action_widget (dialog, GTK_WIDGET(nameEntry), 2);
1425 gtk_dialog_add_action_widget (dialog, GTK_WIDGET(addressEntry), 3); 1374 gtk_dialog_add_action_widget (dialog, GTK_WIDGET(addressEntry), 3);
1426 1375
@@ -1438,14 +1387,12 @@ GNUNET_CONVERSATION_GTK_on_add_clicked (GtkButton * button,
1438 switch (gtk_dialog_run (dialog)) 1387 switch (gtk_dialog_run (dialog))
1439 { 1388 {
1440 case GTK_RESPONSE_ACCEPT: 1389 case GTK_RESPONSE_ACCEPT:
1441 FPRINTF (stderr, "accept clicked");
1442 do_status (""); 1390 do_status ("");
1443 add_contact (gtk_entry_get_text (nameEntry), 1391 add_contact (gtk_entry_get_text (nameEntry),
1444 gtk_entry_get_text (addressEntry)); 1392 gtk_entry_get_text (addressEntry));
1445 gtk_widget_destroy (GTK_WIDGET(dialog)); 1393 gtk_widget_destroy (GTK_WIDGET(dialog));
1446 break; 1394 break;
1447 case GTK_RESPONSE_CANCEL: 1395 case GTK_RESPONSE_CANCEL:
1448 FPRINTF (stderr, "cancel clicked");
1449 do_status (""); 1396 do_status ("");
1450 gtk_widget_destroy (GTK_WIDGET(dialog)); 1397 gtk_widget_destroy (GTK_WIDGET(dialog));
1451 break; 1398 break;
@@ -1463,11 +1410,15 @@ GNUNET_CONVERSATION_GTK_on_add_clicked (GtkButton * button,
1463 1410
1464} 1411}
1465 1412
1413/**
1414 * clicked contact remove button
1415 */
1466void 1416void
1467GNUNET_CONVERSATION_GTK_on_remove_clicked (GtkButton * button, 1417GNUNET_CONVERSATION_GTK_on_remove_clicked (GtkButton * button,
1468 gpointer * user_data) 1418 gpointer * user_data)
1469{ 1419{
1470 FPRINTF (stderr, "remove clicked \n"); 1420 // FIXME: make this work
1421 FPRINTF (stderr, "TODO:remove clicked \n");
1471 1422
1472} 1423}
1473 1424
@@ -1483,7 +1434,6 @@ GNUNET_CONVERSATION_GTK_row_activated ()
1483 gchar *callAddress; 1434 gchar *callAddress;
1484 gchar *type; 1435 gchar *type;
1485 1436
1486 FPRINTF (stderr, "row activated \n");
1487 1437
1488 GtkTreeSelection *selection; 1438 GtkTreeSelection *selection;
1489 1439