gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r32105 - gnunet-gtk/src/conversation


From: gnunet
Subject: [GNUnet-SVN] r32105 - gnunet-gtk/src/conversation
Date: Thu, 30 Jan 2014 13:17:46 +0100

Author: grothoff
Date: 2014-01-30 13:17:46 +0100 (Thu, 30 Jan 2014)
New Revision: 32105

Modified:
   gnunet-gtk/src/conversation/gnunet-conversation-gtk.c
Log:
remove new lines, end up as non-printable characters in status bar

Modified: gnunet-gtk/src/conversation/gnunet-conversation-gtk.c
===================================================================
--- gnunet-gtk/src/conversation/gnunet-conversation-gtk.c       2014-01-30 
12:09:46 UTC (rev 32104)
+++ gnunet-gtk/src/conversation/gnunet-conversation-gtk.c       2014-01-30 
12:17:46 UTC (rev 32105)
@@ -21,7 +21,7 @@
 /**
  * @file src/conversation/gnunet-conversation-gtk.c
  * @brief Main function of gnunet-conversation-gtk
- * @author yids 
+ * @author yids
  * @author hark
  */
 #include "gnunet_gtk.h"
@@ -70,7 +70,7 @@
 void
 log_message (const char *message)
 {
-  //    
+  //
   // log
   //
   GtkTextBuffer *logbuff;
@@ -131,10 +131,10 @@
 }
 
 /*
- * adds a item to the call history 
- * 
+ * adds a item to the call history
+ *
  * @param type type of call: 0: accepted 1: rejected 2: outgoing call
- * @return void 
+ * @return void
  */
 
 void
@@ -143,16 +143,16 @@
   GtkTreeIter iter;
   time_t t;
   char *event;
-  
-  switch (type) 
+
+  switch (type)
   {
-   case CH_ACCEPTED: 
+   case CH_ACCEPTED:
        event = "Accepted";
        break;
-   case CH_REJECTED: 
+   case CH_REJECTED:
        event = "Rejected";
        break;
-   case CH_OUTGOING: 
+   case CH_OUTGOING:
        event = "Outgoing";
        break;
    case CH_HANGUP:
@@ -163,7 +163,7 @@
         break;
     default:
        event = "UNKNOWN";
-      break; 
+      break;
   }
   time (&t);
   gtk_list_store_append (history_liststore, &iter);
@@ -483,7 +483,7 @@
   call =
       GNUNET_CONVERSATION_call_start (cfg, caller_id, arg, speaker, mic,
                                       &call_event_handler, NULL);
-  UPDATE_STATUS (_("We are calling `%s', his phone should be ringing.\n"),
+  UPDATE_STATUS (_("We are calling `%s', his phone should be ringing."),
                      peer_name);
   history_add(2,peer_name);
 }
@@ -549,7 +549,7 @@
     phone_state = PS_ACCEPTED;
     GNUNET_CONVERSATION_caller_pick_up (cl->caller, &caller_event_handler, cl,
                                       speaker, mic);
-   
+
   history_add (0, peer_name);
 
 }
@@ -574,13 +574,13 @@
   {
   case PS_LOOKUP_EGO:
     UPDATE_STATUS (_
-                   ("We are currently trying to locate the private key for the 
ego `%s'.\n"),
+                   ("We are currently trying to locate the private key for the 
ego `%s'."),
                    ego_name);
 
     break;
   case PS_LISTEN:
     UPDATE_STATUS (_
-                   ("We are listening for incoming calls for ego `%s' on line 
%u.\n"),
+                   ("We are listening for incoming calls for ego `%s' on line 
%u."),
                    ego_name, line);
     break;
   case PS_ACCEPTED:
@@ -588,7 +588,7 @@
     break;
   case PS_ERROR:
     UPDATE_STATUS (_
-                   ("We had an internal error setting up our phone line. You 
can still make calls.\n"));
+                   ("We had an internal error setting up our phone line. You 
can still make calls."));
     break;
   }
   if (NULL != call)
@@ -597,15 +597,15 @@
     {
     case CS_RESOLVING:
       UPDATE_STATUS (_
-                     ("We are trying to find the network address to call 
`%s'.\n"),
+                     ("We are trying to find the network address to call 
`%s'."),
                      peer_name);
       break;
     case CS_RINGING:
-      UPDATE_STATUS (_("We are calling `%s', his phone should be ringing.\n"),
+      UPDATE_STATUS (_("We are calling `%s', his phone should be ringing."),
                      peer_name);
       break;
     case CS_CONNECTED:
-      UPDATE_STATUS (_("You are having a conversation with `%s'.\n"),
+      UPDATE_STATUS (_("You are having a conversation with `%s'."),
                      peer_name);
       break;
     case CS_SUSPENDED:
@@ -615,7 +615,7 @@
   }
   if ((NULL != cl_head) && ((cl_head != cl_active) || (cl_head != cl_tail)))
   {
-    
+
     for (cl = cl_head; NULL != cl; cl = cl->next)
     {
       if (cl == cl_active)
@@ -916,7 +916,7 @@
   //test_finished ();
 }
 
-/** 
+/**
  * Continuation called to notify client about result of the
  * operation.
  *
@@ -926,15 +926,15 @@
  *                #GNUNET_YES (or other positive value) on success
  * @param emsg NULL on success, otherwise an error message
  */
-static void 
+static void
 del_continuation (void *cls,
                   int32_t success,
                   const char *emsg)
-{                                         
-  del_qe = NULL;                          
-  if (GNUNET_NO == success)               
-  {                                       
-    fprintf (stderr,                      
+{
+  del_qe = NULL;
+  if (GNUNET_NO == success)
+  {
+    fprintf (stderr,
              _("Deleting record failed, record does not exist%s%s\n"),
              (NULL != emsg) ? ": " : "",
              (NULL != emsg) ? emsg : "");
@@ -1022,7 +1022,7 @@
 static void
 shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
- 
+
 //TODO: make this work
     //struct OperationContext *oc;
 
@@ -1112,7 +1112,7 @@
 {
   //GtkTreeIter iter;
   GtkWindow *main_window;
-  
+
   //line = 0;
 
   ml = cls;
@@ -1143,7 +1143,7 @@
       GTK_TREE_STORE (get_object 
("gnunet_conversation_gtk_history_treestore"));
   history_treemodel = GTK_TREE_MODEL (history_treestore);
 
-  //gtk_tree_view_set_activate_on_single_click(contacts_treeview, TRUE);  
+  //gtk_tree_view_set_activate_on_single_click(contacts_treeview, TRUE);
 
   GNUNET_assert (NULL != contacts_liststore);
 
@@ -1179,7 +1179,7 @@
   {
     ego_name = "phone-ego";
     LOG (_("No ego given, using default: %s "), ego_name);
-    
+
   }
 
   id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL);
@@ -1225,9 +1225,9 @@
 }
 
 /* gui stuff start */
-/* 
- * Accept call window 
- * TODO: rename this 
+/*
+ * Accept call window
+ * TODO: rename this
  *
  * @param message message in the dialogbox
  * @param caller_id
@@ -1240,9 +1240,9 @@
     GtkWidget *dialog;
     GtkWindow *main_window;
     main_window = GTK_WINDOW(get_object("GNUNET_GTK_conversation_window"));
-    // Create the widgets 
+    // Create the widgets
 
-    
+
     dialog = gtk_dialog_new_with_buttons ("Incoming call!",
                                          main_window,
                                          GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -1256,11 +1256,11 @@
                                          NULL);
     content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
 
-    
+
     notification = gtk_label_new ("Incoming call from:");
     caller_name = gtk_label_new (caller_id);
-     
-    // Add the labels, and show everything we've added to the dialog 
+
+    // Add the labels, and show everything we've added to the dialog
     gtk_container_add (GTK_CONTAINER (content_area), notification);
     gtk_container_add (GTK_CONTAINER (content_area), caller_name);
     gtk_widget_show_all (GTK_WIDGET(dialog));
@@ -1269,18 +1269,18 @@
        case GTK_RESPONSE_ACCEPT :
                 do_status("");
                gtk_widget_destroy(GTK_WIDGET(dialog));
-               do_accept("0");       
+               do_accept("0");
                break;
        case GTK_RESPONSE_REJECT :
                 do_reject("0");
-               do_status(""); 
+               do_status("");
                 gtk_widget_destroy(GTK_WIDGET(dialog));
                break;
        case GTK_RESPONSE_CANCEL :
                 do_status("");
                 gtk_widget_destroy(GTK_WIDGET(dialog));
                 break;
-        }       
+        }
 
 
 }
@@ -1303,7 +1303,7 @@
 
 //  strncpy(to_addr, gtk_entry_get_text (address_entry), MAX_TO_ADDR);
 //  to_addr[strlen(to_addr)+1] = '\0';
-//    FPRINTF (stderr, _("calling: %s \n"), to_addr ); 
+//    FPRINTF (stderr, _("calling: %s \n"), to_addr );
 
   do_call (to_addr);
   disable_button ("GNUNET_GTK_conversation_accept_button");
@@ -1356,7 +1356,7 @@
 void
 GNUNET_CONVERSATION_GTK_on_pause_clicked ()
 {
-//    GtkEntry *entry; 
+//    GtkEntry *entry;
 do_suspend("0");
   //FPRINTF (stderr, "pause clicked \n");
   //do_pause("");
@@ -1384,7 +1384,7 @@
 {
 
 
-//    do_accept("0"); 
+//    do_accept("0");
   do_status (" ");
   //quick_message('hee blaaat you have a call from blaat');
 }
@@ -1401,7 +1401,7 @@
   GtkTreeIter iter;
   struct GNUNET_GNSRECORD_Data rd;
   struct GNUNET_GNSRECORD_Data *rde;
-  static void *data; 
+  static void *data;
   static size_t data_size;
   struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
 
@@ -1428,11 +1428,11 @@
   else
     {
      add_qe =
-      GNUNET_NAMESTORE_records_store (ns, 
-                                     &zone_pkey, 
-                                     name, 
-                                     1, 
-                                     rde, 
+      GNUNET_NAMESTORE_records_store (ns,
+                                     &zone_pkey,
+                                     name,
+                                     1,
+                                     rde,
                                      &add_continuation,
                                       &add_qe);
       gtk_list_store_append (contacts_liststore, &iter);
@@ -1442,7 +1442,7 @@
 
 /*
  * executed when clicked on add contact
- * @param button 
+ * @param button
  * @param user_data
  */
 
@@ -1454,7 +1454,7 @@
 
   //unused:  *anotherArea, *labelName, *labelAddres *caller_name
 
-  GtkLabel *notification; 
+  GtkLabel *notification;
 //  GtkHBox *content_area;
   GtkContainer *content_area;
   GtkButton  *currentCheckButton;
@@ -1492,7 +1492,7 @@
   notification = GTK_LABEL(gtk_label_new ("Adding contact"));
 //    caller_name = gtk_label_new (caller_id);
 
-  // Add the labels, and show everything we've added to the dialog 
+  // Add the labels, and show everything we've added to the dialog
   gtk_container_add (GTK_CONTAINER (content_area), GTK_WIDGET(notification));
 //    gtk_container_add (GTK_CONTAINER (content_area), caller_name);
   gtk_widget_show_all (GTK_WIDGET(dialog));
@@ -1513,7 +1513,7 @@
   case GTK_RESPONSE_OK:
     //use_current_incoming_address();
     gtk_entry_set_text (GTK_ENTRY(addressEntry), callerName);
-    add_contact (gtk_entry_get_text (nameEntry), 
+    add_contact (gtk_entry_get_text (nameEntry),
                 callerName);
 //              
add_contact(gtk_entry_get_text(nameEntry),memmove(&callerName,&callerName+52,1));
     gtk_widget_destroy (GTK_WIDGET(dialog));
@@ -1532,11 +1532,11 @@
   GtkTreeSelection *selection;
   GtkTreeModel     *model;
   GtkTreeIter       iter;
-  GtkDialog       *confirm;  
+  GtkDialog       *confirm;
   GtkWindow       *main_window;
   GtkLabel *notification;
   GtkHBox *content_area;
-  
+
   selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(contacts_treeview));
   if (gtk_tree_selection_get_selected(selection, &model, &iter))
   {
@@ -1547,7 +1547,7 @@
         GTK_DIALOG(gtk_dialog_new_with_buttons ("Removing contact", 
main_window,
                                      GTK_DIALOG_DESTROY_WITH_PARENT,
                                      _("Yes"), GTK_RESPONSE_ACCEPT,
-                                     _("No"), GTK_RESPONSE_CANCEL, NULL)); 
+                                     _("No"), GTK_RESPONSE_CANCEL, NULL));
     content_area = GTK_CONTAINER(gtk_dialog_get_content_area (GTK_DIALOG 
(confirm)));
     notification = GTK_LABEL(gtk_label_new ("Do you really want to remove this 
contact?"));
     gtk_container_add (GTK_CONTAINER (content_area), GTK_WIDGET(notification));
@@ -1555,7 +1555,7 @@
     switch (gtk_dialog_run(confirm))
      {
      case GTK_RESPONSE_ACCEPT:
-         zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (caller_id);  
+         zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (caller_id);
          del_qe = GNUNET_NAMESTORE_records_store (ns,
                                                  &zone_pkey,
                                                  name,
@@ -1611,7 +1611,7 @@
   {
     GNUNET_asprintf (&callAddress, "%s\.gnu", name);
   }
-//   else { GNUNET_asprintf(&callAddress, "%s", peer_id);} 
+//   else { GNUNET_asprintf(&callAddress, "%s", peer_id);}
 
   g_print ("ego name %s\n", callAddress);
   GtkEntry *address_entry;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]