gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet-gtk] branch master updated (521f9bb9 -> 899f2c73)


From: gnunet
Subject: [GNUnet-SVN] [gnunet-gtk] branch master updated (521f9bb9 -> 899f2c73)
Date: Fri, 15 Jun 2018 22:42:54 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository gnunet-gtk.

    from 521f9bb9 update pot files
     new 313fcd50 slightly nicer formatting
     new 899f2c73 fix namestore gtk segv on exit

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 contrib/gnunet_namestore_gtk_main_window.glade | 10 ++---
 src/namestore/gnunet-namestore-gtk.c           | 52 +++++++++++++++-----------
 2 files changed, 36 insertions(+), 26 deletions(-)

diff --git a/contrib/gnunet_namestore_gtk_main_window.glade 
b/contrib/gnunet_namestore_gtk_main_window.glade
index ac224f03..709f44b3 100644
--- a/contrib/gnunet_namestore_gtk_main_window.glade
+++ b/contrib/gnunet_namestore_gtk_main_window.glade
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.2 -->
+<!-- Generated with glade 3.22.1 -->
 <interface>
   <requires lib="gtk+" version="3.0"/>
   <object class="GtkMenu" id="gnunet_namestore_gtk_edit_popup_menu">
@@ -132,6 +132,9 @@
     <property name="icon_name">preferences-system</property>
     <property name="type_hint">normal</property>
     <signal name="destroy" handler="gnunet_namestore_gtk_quit_cb" 
swapped="no"/>
+    <child>
+      <placeholder/>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox" id="gnunet_namestore_gtk_dialog-vbox">
         <property name="visible">True</property>
@@ -440,7 +443,7 @@
                         <signal name="clicked" 
handler="gnunet_namestore_gtk_public_key_copy_button_clicked_cb" swapped="no"/>
                       </object>
                       <packing>
-                        <property name="expand">False</property>
+                        <property name="expand">True</property>
                         <property name="fill">False</property>
                         <property name="padding">5</property>
                         <property name="position">1</property>
@@ -671,8 +674,5 @@
       <action-widget 
response="-5">gnunet_namestore_gtk_save_as_button</action-widget>
       <action-widget 
response="-3">gnunet_namestore_gtk_save_button</action-widget>
     </action-widgets>
-    <child>
-      <placeholder/>
-    </child>
   </object>
 </interface>
diff --git a/src/namestore/gnunet-namestore-gtk.c 
b/src/namestore/gnunet-namestore-gtk.c
index e2150c1c..94dd8d97 100644
--- a/src/namestore/gnunet-namestore-gtk.c
+++ b/src/namestore/gnunet-namestore-gtk.c
@@ -476,7 +476,7 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg;
 /**
  * Ongoing identity operation.
  */
-struct GNUNET_IDENTITY_Operation *iop;
+static struct GNUNET_IDENTITY_Operation *iop;
 
 /**
  * Global return value (for success/failure of gnunet-setup).
@@ -495,7 +495,8 @@ get_object (const char *name)
 {
   if (NULL == ml)
     return NULL;
-  return GNUNET_GTK_main_loop_get_object (ml, name);
+  return GNUNET_GTK_main_loop_get_object (ml,
+                                         name);
 }
 
 
@@ -523,7 +524,8 @@ create_qrcode (unsigned int scale)
   unsigned int size;
   char *upper;
 
-  qri = QRinput_new2 (0, QR_ECLEVEL_M);
+  qri = QRinput_new2 (0,
+                     QR_ECLEVEL_M);
   if (NULL == qri)
   {
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING,
@@ -577,7 +579,8 @@ create_qrcode (unsigned int scale)
   size = qrc->width * scale;
   size += 8 - (size % 8);
   pb = gdk_pixbuf_new_from_file_at_size (fn,
-                                        size, size,
+                                        size,
+                                        size,
                                         NULL);
   GNUNET_free (fn);
   if (NULL == pb)
@@ -659,7 +662,8 @@ gnunet_namestore_gtk_qr_save_as_dialog_response_cb 
(GtkDialog *dialog,
   pb = create_qrcode (8);
   if (NULL == pb)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("Failed to initialize QR-code 
pixbuf"));
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+               _("Failed to initialize QR-code pixbuf"));
     return;
   }
   gdk_pixbuf_save (pb,
@@ -1841,8 +1845,11 @@ gnunet_namestore_gtk_popup_edit_button_activate_cb 
(GtkWidget *widget,
     GNUNET_break (0);
     return;
   }
-  GNUNET_CRYPTO_hash (n_name, strlen (n_name), &name_hash);
-  ri = GNUNET_CONTAINER_multihashmap_get (n2r, &name_hash);
+  GNUNET_CRYPTO_hash (n_name,
+                     strlen (n_name),
+                     &name_hash);
+  ri = GNUNET_CONTAINER_multihashmap_get (n2r,
+                                         &name_hash);
   if ( (NULL == ri) ||
        (off >= ri->rd_count) )
   {
@@ -2301,6 +2308,7 @@ gnunet_namestore_gtk_public_key_copy_button_clicked_cb 
(GtkButton *button,
 static void
 zone_sync_proc (void *cls)
 {
+  (void) cls;
   gtk_tree_view_set_model (tv,
                           tm);
 #if HAVE_QRENCODE_H
@@ -2328,6 +2336,7 @@ zone_sync_proc (void *cls)
 static void
 zone_iteration_error (void *cls)
 {
+  (void) cls;
   clear_zone_view ();
 #if HAVE_QRENCODE_H
   setup_qrcode ();
@@ -2339,9 +2348,6 @@ zone_iteration_error (void *cls)
   gtk_widget_show (GTK_WIDGET (get_object 
("gnunet_namestore_gtk_qr_saveas_button")));
   gtk_widget_show (GTK_WIDGET (get_object 
("gnunet_namestore_gtk_qr_vseparator")));
 #endif
-  gtk_widget_show (GTK_WIDGET (status_label));
-  gtk_widget_hide (GTK_WIDGET (get_object 
("gnunet_namestore_gtk_scrolledwindow")));
-  gtk_widget_hide (GTK_WIDGET (zone_combo_box));
 }
 
 
@@ -2408,6 +2414,7 @@ zone_iteration_proc (void *cls,
   GtkTreeIter sel_iter;
   GtkTreePath *sel_path;
 
+  (void) cls;
   GNUNET_NAMESTORE_zone_monitor_next (zmon,
                                       1);
   if ( (GNUNET_SYSERR == GNUNET_DNSPARSER_check_label (name)) &&
@@ -2429,7 +2436,8 @@ zone_iteration_proc (void *cls,
   if (gtk_tree_selection_get_selected (sel,
                                        NULL,
                                        &sel_iter))
-    sel_path = gtk_tree_model_get_path (tm, &sel_iter);
+    sel_path = gtk_tree_model_get_path (tm,
+                                       &sel_iter);
   else
     sel_path = NULL;
   ri = GNUNET_CONTAINER_multihashmap_get (n2r,
@@ -2640,6 +2648,7 @@ load_zone (const char *name,
 #if HAVE_QRENCODE_H
   setup_qrcode ();
 #endif
+  GNUNET_assert (NULL != n2r);
   zmon = GNUNET_NAMESTORE_zone_monitor_start (cfg,
                                               pkey,
                                               GNUNET_YES,
@@ -2741,11 +2750,6 @@ cleanup_task (void *cls)
   GNUNET_GTK_main_loop_quit (ml);
   gtk_widget_show (GTK_WIDGET (status_label));
   gtk_widget_hide (GTK_WIDGET (get_object 
("gnunet_namestore_gtk_scrolledwindow")));
-  if (NULL != zmon)
-  {
-    GNUNET_NAMESTORE_zone_monitor_stop (zmon);
-    zmon = NULL;
-  }
   while (NULL != (oc = oc_head))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -2770,11 +2774,6 @@ cleanup_task (void *cls)
     GNUNET_free (moc);
   }
   gtk_tree_store_clear (ts);
-  if (NULL != namestore)
-  {
-    GNUNET_NAMESTORE_disconnect (namestore);
-    namestore = NULL;
-  }
   if (NULL != pkey)
   {
     GNUNET_free (pkey);
@@ -2795,6 +2794,16 @@ cleanup_task (void *cls)
     GNUNET_IDENTITY_disconnect (identity);
     identity = NULL;
   }
+  if (NULL != zmon)
+  {
+    GNUNET_NAMESTORE_zone_monitor_stop (zmon);
+    zmon = NULL;
+  }
+  if (NULL != namestore)
+  {
+    GNUNET_NAMESTORE_disconnect (namestore);
+    namestore = NULL;
+  }
   if (NULL != n2r)
   {
     GNUNET_CONTAINER_multihashmap_iterate (n2r,
@@ -2803,6 +2812,7 @@ cleanup_task (void *cls)
     GNUNET_CONTAINER_multihashmap_destroy (n2r);
     n2r = NULL;
   }
+  GNUNET_assert (NULL == zmon);
   while (NULL != (tld = tld_head))
   {
     GNUNET_CONTAINER_DLL_remove (tld_head,

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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