gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis-gtk] 01/02: fix memory access error


From: gnunet
Subject: [taler-anastasis-gtk] 01/02: fix memory access error
Date: Sat, 12 Sep 2020 23:24:52 +0200

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

dennis-neufeld pushed a commit to branch master
in repository anastasis-gtk.

commit 16a5b0238dacc1936a1c5ac72e8b2850e69d61ba
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Sat Sep 12 12:57:22 2020 +0200

    fix memory access error
---
 configure.ac                                       |  3 +-
 contrib/anastasis_gtk_main_window.glade            | 14 +++----
 src/Makefile.am                                    |  2 +-
 src/anastasis/anastasis-gtk.c                      |  4 +-
 src/anastasis/anastasis-gtk_backup.c               | 46 +++++++++++++++++++---
 src/include/Makefile.am                            |  8 ++++
 .../anastasis-gtk_helper.h}                        | 31 +++++++--------
 7 files changed, 75 insertions(+), 33 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1b3978f..09f31c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,7 +116,7 @@ AM_CONDITIONAL(MINGW,   test "$build_target" = "mingw")
 
 
 AC_SUBST(ENABLE_ON_UNIX)
-AC_SUBST(ENABLE_ON_W32)
+AC_SUBST(ENABLE_ON_W32)libtool
 
 GN_LIB_LDFLAGS="-export-dynamic -no-undefined"
 AC_SUBST(GN_LIB_LDFLAGS)
@@ -402,6 +402,7 @@ doc/Makefile
 doc/doxygen/Makefile
 src/Makefile
 src/anastasis/Makefile
+src/include/Makefile
 pixmaps/Makefile
 po/Makefile.in
 po/Makefile
diff --git a/contrib/anastasis_gtk_main_window.glade 
b/contrib/anastasis_gtk_main_window.glade
index 412e387..26e4fc3 100644
--- a/contrib/anastasis_gtk_main_window.glade
+++ b/contrib/anastasis_gtk_main_window.glade
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.36.0 -->
 <interface>
   <requires lib="gtk+" version="3.0"/>
   <object class="GtkImage" id="backup_image">
@@ -53,9 +53,6 @@
     <property name="default_height">500</property>
     <property name="icon_name">contact-new</property>
     <signal name="delete-event" handler="anastasis_gtk_quit_cb" swapped="no"/>
-    <child type="titlebar">
-      <placeholder/>
-    </child>
     <child>
       <object class="GtkBox" id="anastasis_gtk_main_vbox">
         <property name="visible">True</property>
@@ -139,7 +136,7 @@
                         <property name="can_focus">False</property>
                         <property name="orientation">vertical</property>
                         <child>
-                          <object class="GtkFrame">
+                          <object class="GtkFrame" 
id="anastasis_gtk_start_frame">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="label_xalign">0</property>
@@ -201,8 +198,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkFrame" id="continent_frame">
-                            <property name="visible">True</property>
+                          <object class="GtkFrame" 
id="anastasis_gtk_continent_frame">
                             <property name="can_focus">False</property>
                             <property name="label_xalign">0</property>
                             <property name="shadow_type">none</property>
@@ -308,7 +304,6 @@
                     </child>
                     <child>
                       <object class="GtkBox" 
id="anastasis_gtk_illustration_vbox">
-                        <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="orientation">vertical</property>
                         <child>
@@ -450,5 +445,8 @@
         </child>
       </object>
     </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
   </object>
 </interface>
diff --git a/src/Makefile.am b/src/Makefile.am
index 25f4e29..d3dd731 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,2 +1,2 @@
 # This Makefile.am is in the public domain
-SUBDIRS = . anastasis
+SUBDIRS = . include anastasis
diff --git a/src/anastasis/anastasis-gtk.c b/src/anastasis/anastasis-gtk.c
index e431c99..2264cb8 100644
--- a/src/anastasis/anastasis-gtk.c
+++ b/src/anastasis/anastasis-gtk.c
@@ -22,15 +22,17 @@
  * @file src/anastasis/anastasis-gtk.c
  * @brief Main function of anastasis-gtk
  * @author Christian Grothoff
+ * @author Dennis Neufeld
  */
 #include <gnunet/platform.h>
 #include <gnunet/gnunet_util_lib.h>
 #include <gnunet-gtk/gnunet_gtk.h>
+#include "anastasis-gtk_helper.h"
 
 /**
  * Handle to our main loop.
  */
-static struct GNUNET_GTK_MainLoop *ml;
+struct GNUNET_GTK_MainLoop *ml;
 
 /**
  * Our configuration.
diff --git a/src/anastasis/anastasis-gtk_backup.c 
b/src/anastasis/anastasis-gtk_backup.c
index bfa62bd..6db3fb8 100644
--- a/src/anastasis/anastasis-gtk_backup.c
+++ b/src/anastasis/anastasis-gtk_backup.c
@@ -19,17 +19,19 @@
 */
 
 /**
- * @file src/anastasis/anastasis-gtk.c
+ * @file src/anastasis/anastasis-gtk_backup.c
  * @brief Main function of anastasis-gtk
  * @author Christian Grothoff
+ * @author Dennis Neufeld
  */
 #include <gnunet/platform.h>
 #include <gnunet/gnunet_util_lib.h>
 #include <gnunet-gtk/gnunet_gtk.h>
+#include "anastasis-gtk_helper.h"
 
 
 /**
- * Callback invoked if the application is supposed to exit.
+ * Callback invoked if the the "backup"-button is clicked.
  *
  * @param object
  * @param user_data unused
@@ -38,8 +40,40 @@ void
 anastasis_gtk_backup_button_clicked (GObject *object,
                                      gpointer user_data)
 {
-  gtk_widget_hide (GTK_WIDGET (GCG_get_main_window_object (
-                                 "anastasis_gtk_primary_action_hbox")));
-  gtk_widget_show (GTK_WIDGET (GCG_get_main_window_object (
-                                 "anastasis_gtk_main_control_vbox")));
+     gtk_widget_hide (GTK_WIDGET (GCG_get_main_window_object (
+                                   "anastasis_gtk_start_frame")));
+     gtk_widget_show (GTK_WIDGET (GCG_get_main_window_object (
+                                   "anastasis_gtk_main_control_vbox")));
+     gtk_widget_show (GTK_WIDGET (GCG_get_main_window_object (
+                                   "anastasis_gtk_continent_frame")));
 }
+
+
+/**
+ * Callback invoked if the the "back"-button is clicked.
+ *
+ * @param object
+ * @param user_data unused
+ */
+void
+anastasis_gtk_main_window_back_clicked (GObject *object,
+                                        gpointer user_data)
+{
+
+}
+
+
+/**
+ * Callback invoked if the the "forward"-button is clicked.
+ *
+ * @param object
+ * @param user_data unused
+ */
+void
+anastasis_gtk_main_window_forward_clicked (GObject *object,
+                                           gpointer user_data)
+{
+
+}
+
+
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
new file mode 100644
index 0000000..0ebb036
--- /dev/null
+++ b/src/include/Makefile.am
@@ -0,0 +1,8 @@
+# This Makefile.am is in the public domain
+EXTRA_DIST = \
+  platform.h
+
+anastasisgtkincludedir = $(includedir)/anastasis-gtk
+
+anastasisgtkinclude_HEADERS = \
+  anastasis-gtk_helper.h
\ No newline at end of file
diff --git a/src/anastasis/anastasis-gtk_backup.c 
b/src/include/anastasis-gtk_helper.h
similarity index 59%
copy from src/anastasis/anastasis-gtk_backup.c
copy to src/include/anastasis-gtk_helper.h
index bfa62bd..673c8a4 100644
--- a/src/anastasis/anastasis-gtk_backup.c
+++ b/src/include/anastasis-gtk_helper.h
@@ -19,27 +19,26 @@
 */
 
 /**
- * @file src/anastasis/anastasis-gtk.c
- * @brief Main function of anastasis-gtk
+ * @file src/include/anastasis-gtk_helper.h
+ * @brief Definition of helpers.
  * @author Christian Grothoff
+ * @author Dennis Neufeld
  */
-#include <gnunet/platform.h>
-#include <gnunet/gnunet_util_lib.h>
+
 #include <gnunet-gtk/gnunet_gtk.h>
 
+/**
+ * Handle to our main loop.
+ */
+extern struct GNUNET_GTK_MainLoop *ml;
+
 
 /**
- * Callback invoked if the application is supposed to exit.
+ * Get an object from the main window.
  *
- * @param object
- * @param user_data unused
+ * @param name name of the object
+ * @return NULL on error
  */
-void
-anastasis_gtk_backup_button_clicked (GObject *object,
-                                     gpointer user_data)
-{
-  gtk_widget_hide (GTK_WIDGET (GCG_get_main_window_object (
-                                 "anastasis_gtk_primary_action_hbox")));
-  gtk_widget_show (GTK_WIDGET (GCG_get_main_window_object (
-                                 "anastasis_gtk_main_control_vbox")));
-}
+GObject *
+GCG_get_main_window_object (const char *name);
+

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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