[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r13579 - in gnunet-setup: contrib src
From: |
gnunet |
Subject: |
[GNUnet-SVN] r13579 - in gnunet-setup: contrib src |
Date: |
Sat, 6 Nov 2010 00:17:24 +0100 |
Author: grothoff
Date: 2010-11-06 00:17:24 +0100 (Sat, 06 Nov 2010)
New Revision: 13579
Added:
gnunet-setup/src/gnunet-setup-datacache-plugins.c
gnunet-setup/src/gnunet-setup-datastore-plugins.c
Modified:
gnunet-setup/contrib/gnunet-setup.glade
gnunet-setup/src/Makefile.am
Log:
more fun for plugins
Modified: gnunet-setup/contrib/gnunet-setup.glade
===================================================================
--- gnunet-setup/contrib/gnunet-setup.glade 2010-11-05 23:12:06 UTC (rev
13578)
+++ gnunet-setup/contrib/gnunet-setup.glade 2010-11-05 23:17:24 UTC (rev
13579)
@@ -1052,6 +1052,7 @@
<property
name="use_action_appearance">False</property>
<property name="active">True</property>
<property
name="draw_indicator">True</property>
+ <signal name="realize"
handler="GNUNET_setup_fs_datastore_sqlite_radiobutton_realize_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -1069,6 +1070,7 @@
<property
name="yalign">0.50999999046325684</property>
<property
name="draw_indicator">True</property>
<property
name="group">GNUNET_setup_fs_datastore_sqlite_radiobutton</property>
+ <signal name="realize"
handler="GNUNET_setup_fs_datastore_mysql_radiobutton_realize_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -1085,6 +1087,7 @@
<property
name="use_action_appearance">False</property>
<property
name="draw_indicator">True</property>
<property
name="group">GNUNET_setup_fs_datastore_sqlite_radiobutton</property>
+ <signal name="realize"
handler="GNUNET_setup_fs_datastore_postgres_radiobutton_realize_cb"
swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -1464,6 +1467,7 @@
<property
name="use_action_appearance">False</property>
<property name="active">True</property>
<property
name="draw_indicator">True</property>
+ <signal name="realize"
handler="GNUNET_setup_fs_datacache_sqlite_radiobutton_realize_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -1481,6 +1485,7 @@
<property
name="yalign">0.50999999046325684</property>
<property
name="draw_indicator">True</property>
<property
name="group">GNUNET_setup_fs_datacache_sqlite_radiobutton</property>
+ <signal name="realize"
handler="GNUNET_setup_fs_datacache_mysql_radiobutton_realize_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -1497,6 +1502,7 @@
<property
name="use_action_appearance">False</property>
<property
name="draw_indicator">True</property>
<property
name="group">GNUNET_setup_fs_datacache_sqlite_radiobutton</property>
+ <signal name="realize"
handler="GNUNET_setup_fs_datacache_postgres_radiobutton_realize_cb"
swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
Modified: gnunet-setup/src/Makefile.am
===================================================================
--- gnunet-setup/src/Makefile.am 2010-11-05 23:12:06 UTC (rev 13578)
+++ gnunet-setup/src/Makefile.am 2010-11-05 23:17:24 UTC (rev 13579)
@@ -11,6 +11,8 @@
gnunet-setup.c gnunet-setup.h \
gnunet-setup-options.c gnunet-setup-options.h \
gnunet-setup-transport-plugins.c \
+ gnunet-setup-datastore-plugins.c \
+ gnunet-setup-datacache-plugins.c \
gnunet-setup-hostlist-editing.c \
os_installation.c
gnunet_setup_LDADD = \
Added: gnunet-setup/src/gnunet-setup-datacache-plugins.c
===================================================================
--- gnunet-setup/src/gnunet-setup-datacache-plugins.c
(rev 0)
+++ gnunet-setup/src/gnunet-setup-datacache-plugins.c 2010-11-05 23:17:24 UTC
(rev 13579)
@@ -0,0 +1,76 @@
+/*
+ This file is part of GNUnet.
+ (C) 2010 Christian Grothoff (and other contributing authors)
+
+ GNUnet is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 2, or (at your
+ option) any later version.
+
+ GNUnet is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNUnet; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file src/gnunet-setup-datacache-plugins.c
+ * @brief (de)sensitize transport plugin buttons based on plugin availability
+ * @author Christian Grothoff
+ */
+#include "gnunet-setup.h"
+
+
+static void
+test_plugin (GtkWidget *widget,
+ const char *name)
+{
+ if (GNUNET_YES ==
+ GNUNET_PLUGIN_test (name))
+ {
+ gtk_widget_set_sensitive (widget,
+ TRUE);
+ }
+ else
+ {
+ gtk_widget_set_sensitive (widget,
+ FALSE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget),
+ FALSE);
+ }
+}
+
+
+
+void
+GNUNET_setup_fs_datacache_sqlite_radiobutton_realize_cb (GtkWidget *widget,
+ gpointer user_data)
+{
+ test_plugin (widget, "libgnunet_plugin_datacache_sqlite");
+}
+
+
+void
+GNUNET_setup_fs_datacache_mysql_radiobutton_realize_cb (GtkWidget *widget,
+ gpointer user_data)
+{
+ test_plugin (widget, "libgnunet_plugin_datacache_mysql");
+}
+
+
+void
+GNUNET_setup_fs_datacache_postgres_radiobutton_realize_cb (GtkWidget *widget,
+ gpointer user_data)
+{
+ test_plugin (widget, "libgnunet_plugin_datacache_postgres");
+}
+
+
+
+/* end of gnunet-setup-transport-plugins.c */
+
Added: gnunet-setup/src/gnunet-setup-datastore-plugins.c
===================================================================
--- gnunet-setup/src/gnunet-setup-datastore-plugins.c
(rev 0)
+++ gnunet-setup/src/gnunet-setup-datastore-plugins.c 2010-11-05 23:17:24 UTC
(rev 13579)
@@ -0,0 +1,76 @@
+/*
+ This file is part of GNUnet.
+ (C) 2010 Christian Grothoff (and other contributing authors)
+
+ GNUnet is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 2, or (at your
+ option) any later version.
+
+ GNUnet is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNUnet; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file src/gnunet-setup-datastore-plugins.c
+ * @brief (de)sensitize datastore plugin buttons based on plugin availability
+ * @author Christian Grothoff
+ */
+#include "gnunet-setup.h"
+
+
+static void
+test_plugin (GtkWidget *widget,
+ const char *name)
+{
+ if (GNUNET_YES ==
+ GNUNET_PLUGIN_test (name))
+ {
+ gtk_widget_set_sensitive (widget,
+ TRUE);
+ }
+ else
+ {
+ gtk_widget_set_sensitive (widget,
+ FALSE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget),
+ FALSE);
+ }
+}
+
+
+
+void
+GNUNET_setup_fs_datastore_sqlite_radiobutton_realize_cb (GtkWidget *widget,
+ gpointer user_data)
+{
+ test_plugin (widget, "libgnunet_plugin_datastore_sqlite");
+}
+
+
+void
+GNUNET_setup_fs_datastore_mysql_radiobutton_realize_cb (GtkWidget *widget,
+ gpointer user_data)
+{
+ test_plugin (widget, "libgnunet_plugin_datastore_mysql");
+}
+
+
+void
+GNUNET_setup_fs_datastore_postgres_radiobutton_realize_cb (GtkWidget *widget,
+ gpointer user_data)
+{
+ test_plugin (widget, "libgnunet_plugin_datastore_postgres");
+}
+
+
+
+/* end of gnunet-setup-datastore-plugins.c */
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r13579 - in gnunet-setup: contrib src,
gnunet <=