gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis-gtk] branch master updated (c00f45f -> 9ca91ba)


From: gnunet
Subject: [taler-anastasis-gtk] branch master updated (c00f45f -> 9ca91ba)
Date: Sat, 12 Sep 2020 23:24:51 +0200

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

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

    from c00f45f  ex
     new 16a5b02  fix memory access error
     new 9ca91ba  added helper

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:
 configure.ac                                       |  3 +-
 contrib/anastasis_gtk_main_window.glade            | 25 +++--------
 src/Makefile.am                                    |  2 +-
 src/anastasis/Makefile.am                          |  1 +
 src/anastasis/anastasis-gtk.c                      |  6 ++-
 src/anastasis/anastasis-gtk_backup.c               | 51 +++++++++++++++++++---
 src/include/Makefile.am                            |  8 ++++
 .../anastasis-gtk_helper.h}                        | 36 +++++++++------
 8 files changed, 89 insertions(+), 43 deletions(-)
 create mode 100644 src/include/Makefile.am
 copy src/{anastasis/anastasis-gtk_about.c => include/anastasis-gtk_helper.h} 
(62%)

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..c1bc601 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">
@@ -27,17 +27,6 @@
       <!-- column-name continent_name -->
       <column type="gchararray"/>
     </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">Europa</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Asien</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Afrika</col>
-      </row>
-    </data>
   </object>
   <object class="GtkImage" id="restore_image">
     <property name="visible">True</property>
@@ -53,9 +42,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 +125,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 +187,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 +293,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 +434,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/Makefile.am b/src/anastasis/Makefile.am
index cb697c5..3d50473 100644
--- a/src/anastasis/Makefile.am
+++ b/src/anastasis/Makefile.am
@@ -19,6 +19,7 @@ anastasis_gtk_SOURCES = \
 anastasis_gtk_LDADD = \
   @GTK_LIBS@ \
   @GLADE_LIBS@ @GNUNET_LIBS@ \
+  -lanastasisredux \
   -lgnunetgtk \
   -lgnunetutil \
   $(INTLLIBS)
diff --git a/src/anastasis/anastasis-gtk.c b/src/anastasis/anastasis-gtk.c
index e431c99..0071f00 100644
--- a/src/anastasis/anastasis-gtk.c
+++ b/src/anastasis/anastasis-gtk.c
@@ -22,20 +22,22 @@
  * @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.
  */
-static struct GNUNET_CONFIGURATION_Handle *cfg;
+struct GNUNET_CONFIGURATION_Handle *cfg;
 
 /**
  * Get an object from the main window.
diff --git a/src/anastasis/anastasis-gtk_backup.c 
b/src/anastasis/anastasis-gtk_backup.c
index bfa62bd..6dde733 100644
--- a/src/anastasis/anastasis-gtk_backup.c
+++ b/src/anastasis/anastasis-gtk_backup.c
@@ -19,17 +19,20 @@
 */
 
 /**
- * @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"
+#include <anastasis/anastasis_redux.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 +41,44 @@ 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")));
+
+     json_t *init_state = ANASTASIS_backup_start (cfg);
+
+     gtk_tree
+}
+
+
+/**
+ * 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_about.c 
b/src/include/anastasis-gtk_helper.h
similarity index 62%
copy from src/anastasis/anastasis-gtk_about.c
copy to src/include/anastasis-gtk_helper.h
index 454ead5..1363a4c 100644
--- a/src/anastasis/anastasis-gtk_about.c
+++ b/src/include/anastasis-gtk_helper.h
@@ -1,6 +1,6 @@
 /*
-     This file is part of Anastasis-gtk
-     Copyright (C) 2005-2013 Anastasis SARL
+     This file is part of anastasis-gtk.
+     Copyright (C) 2020 Anastasis SARL
 
      Anastasis is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -17,25 +17,33 @@
      Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
      Boston, MA 02110-1301, USA.
 */
+
 /**
- * @file src/anastasis/anastasis-gtk_about.c
+ * @file src/include/anastasis-gtk_helper.h
+ * @brief Definition of helpers.
  * @author Christian Grothoff
- *
- * This file contains the about dialog.
+ * @author Dennis Neufeld
  */
-#include <gnunet/platform.h>
+
 #include <gnunet-gtk/gnunet_gtk.h>
 
+/**
+ * Handle to our main loop.
+ */
+extern struct GNUNET_GTK_MainLoop *ml;
 
 /**
- * This displays an about window
+ * Our configuration.
  */
-void
-anastasis_gtk_about_imagemenuitem_activate_cb (GtkWidget *dummy,
-                                               gpointer data)
-{
-  GNUNET_GTK_display_about ("anastasis_gtk_about_window.glade");
-}
+extern struct GNUNET_CONFIGURATION_Handle *cfg;
 
 
-/* end of anastasis-gtk_about.c */
+/**
+ * Get an object from the main window.
+ *
+ * @param name name of the object
+ * @return NULL on error
+ */
+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]