gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r30433 - gnunet-gtk/src/namestore


From: gnunet
Subject: [GNUnet-SVN] r30433 - gnunet-gtk/src/namestore
Date: Sun, 27 Oct 2013 19:43:00 +0100

Author: grothoff
Date: 2013-10-27 19:43:00 +0100 (Sun, 27 Oct 2013)
New Revision: 30433

Modified:
   gnunet-gtk/src/namestore/plugin_gtk_namestore_template.c
Log:
-nicer plugin template

Modified: gnunet-gtk/src/namestore/plugin_gtk_namestore_template.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_template.c    2013-10-27 
18:41:23 UTC (rev 30432)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_template.c    2013-10-27 
18:43:00 UTC (rev 30433)
@@ -19,8 +19,8 @@
   */
 
 /**
- * @file namestore/plugin_gtk_namestore_a.c
- * @brief namestore plugin for editing A records
+ * @file namestore/plugin_gtk_namestore_template.c
+ * @brief namestore plugin for editing TEMPLATE records
  * @author Christian Grothoff
  */
 #include "gnunet_gtk.h"
@@ -28,6 +28,22 @@
 
 
 /**
+ * The user has edited FOO.  Enable/disable 'save'
+ * button depending on the validity of the value.
+ *
+ * @param entry editing widget
+ * @param user_data the plugin environment
+ */
+void
+FOO_changed_cb (GtkEditable *entry,
+                gpointer user_data)
+{
+  struct GNUNET_GTK_NAMESTORE_PluginEnvironment *env = user_data;
+
+  env->check_validity (env->cls);
+}
+
+/**
  * Function that will be called to initialize the builder's
  * widgets from the existing record (if there is one).
  * The `n_value` is the existing value of the record as a string.
@@ -37,7 +53,7 @@
  * @param builder the edit dialog's builder
  */
 static void
-a_load (void *cls,
+template_load (void *cls,
         gchar *n_value,
         GtkBuilder *builder)
 {
@@ -54,7 +70,7 @@
  * @return record value as a string, as specified in the dialog
  */
 static gchar *
-a_store (void *cls,
+template_store (void *cls,
          GtkBuilder *builder)
 {
   GNUNET_break (0);
@@ -74,7 +90,7 @@
  * @return #GNUNET_OK if there is a valid record value in the dialog
  */
 static int
-a_validate (void *cls,
+template_validate (void *cls,
             GtkBuilder *builder)
 {
   GNUNET_break (0);
@@ -89,15 +105,15 @@
  * @return NULL on error, otherwise the plugin context
  */
 void *
-libgnunet_plugin_gtk_namestore_a_init (void *cls)
+libgnunet_plugin_gtk_namestore_template_init (void *cls)
 {
   struct GNUNET_GTK_NAMESTORE_PluginEnvironment *env = cls;
   struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
 
   plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
   plugin->cls = env;
-  plugin->dialog_glade_filename = "gnunet_namestore_edit_a.glade";
-  plugin->dialog_widget_name = "edit_a_dialog";
+  plugin->dialog_glade_filename = "gnunet_namestore_edit_template.glade";
+  plugin->dialog_widget_name = "edit_template_dialog";
   plugin->load = &a_load;
   plugin->store = &a_store;
   plugin->validate = &a_validate;
@@ -112,7 +128,7 @@
  * @return always NULL
  */
 void *
-libgnunet_plugin_gtk_namestore_aaaa_done (void *cls)
+libgnunet_plugin_gtk_namestore_template_done (void *cls)
 {
   struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
 
@@ -120,4 +136,4 @@
   return NULL;
 }
 
-/* end of plugin_gtk_namestore_a.c */
+/* end of plugin_gtk_namestore_template.c */




reply via email to

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