[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29938 - in gnunet-gtk: contrib src/peerinfo src/setup
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29938 - in gnunet-gtk: contrib src/peerinfo src/setup |
Date: |
Mon, 7 Oct 2013 20:26:59 +0200 |
Author: grothoff
Date: 2013-10-07 20:26:58 +0200 (Mon, 07 Oct 2013)
New Revision: 29938
Modified:
gnunet-gtk/contrib/gnunet_peerinfo_gtk_main_window.glade
gnunet-gtk/contrib/gnunet_setup_main_window.glade
gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c
gnunet-gtk/src/setup/gnunet-setup-options.c
gnunet-gtk/src/setup/gnunet-setup.c
Log:
launch gnunet-peerinfo-gtk to edit friends list
Modified: gnunet-gtk/contrib/gnunet_peerinfo_gtk_main_window.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_peerinfo_gtk_main_window.glade 2013-10-07
18:16:19 UTC (rev 29937)
+++ gnunet-gtk/contrib/gnunet_peerinfo_gtk_main_window.glade 2013-10-07
18:26:58 UTC (rev 29938)
@@ -22,6 +22,8 @@
<column type="GdkPixbuf"/>
<!-- column-name connected_status -->
<column type="gboolean"/>
+ <!-- column-name is_friend -->
+ <column type="gboolean"/>
</columns>
</object>
<object class="GtkWindow" id="GNUNET_PEERINFO_GTK_main_window">
Modified: gnunet-gtk/contrib/gnunet_setup_main_window.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_setup_main_window.glade 2013-10-07 18:16:19 UTC
(rev 29937)
+++ gnunet-gtk/contrib/gnunet_setup_main_window.glade 2013-10-07 18:26:58 UTC
(rev 29938)
@@ -301,10 +301,15 @@
</packing>
</child>
<child>
- <object class="GtkLabel"
id="GNUNET_setup_friends_file_label">
+ <object class="GtkButton"
id="GNUNET_setup_launch_edit_friends_button">
+ <property name="label"
translatable="yes">Ed_it List of Friends</property>
+ <property
name="use_action_appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"
translatable="yes">Friends file:</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">True</property>
+ <property name="image">edit_image</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked"
handler="GNUNET_setup_launch_edit_friends_button_clicked_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -313,17 +318,6 @@
</packing>
</child>
<child>
- <object class="GtkFileChooserButton"
id="GNUNET_setup_friends_filechooserbutton">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
<object class="GtkVSeparator" id="vseparator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -332,7 +326,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
- <property name="position">4</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -344,7 +338,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
@@ -363,7 +357,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">6</property>
+ <property name="position">5</property>
</packing>
</child>
</object>
@@ -4538,4 +4532,9 @@
<property name="page_increment">10</property>
<property name="page_size">10</property>
</object>
+ <object class="GtkImage" id="edit_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-edit</property>
+ </object>
</interface>
Modified: gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c
===================================================================
--- gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c 2013-10-07 18:16:19 UTC
(rev 29937)
+++ gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c 2013-10-07 18:26:58 UTC
(rev 29938)
@@ -78,7 +78,12 @@
/**
* A gboolean
*/
- PEERINFO_MC_CONNECTED_STATUS = 8
+ PEERINFO_MC_CONNECTED_STATUS = 8,
+
+ /**
+ * A gboolean
+ */
+ PEERINFO_MC_IS_FRIEND = 9
};
@@ -184,8 +189,8 @@
* @return #GNUNET_OK (continue to iterate)
*/
static int
-free_paths (void *cls,
- const struct GNUNET_PeerIdentity *key,
+free_paths (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
struct PeerInfo *info = value;
Modified: gnunet-gtk/src/setup/gnunet-setup-options.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-options.c 2013-10-07 18:16:19 UTC (rev
29937)
+++ gnunet-gtk/src/setup/gnunet-setup-options.c 2013-10-07 18:26:58 UTC (rev
29938)
@@ -977,18 +977,6 @@
hide_min_connected_friends},
{
- "GNUNET_setup_friends_filechooserbutton",
- "selection-changed",
- "topology",
- "FRIENDS",
- gettext_noop ("Friends file containing the list of friendly peers"),
- "https://gnunet.org/configuration-f2f",
- &load_filename,
- &save_filename, NULL,
- NULL, NULL,
- NULL},
-
- {
"GNUNET_setup_minimum_friends_spinbutton",
"value-changed",
"topology",
Modified: gnunet-gtk/src/setup/gnunet-setup.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup.c 2013-10-07 18:16:19 UTC (rev 29937)
+++ gnunet-gtk/src/setup/gnunet-setup.c 2013-10-07 18:26:58 UTC (rev 29938)
@@ -429,7 +429,7 @@
* If the test failed, start the resolver process.
*
* @param cls closure, NULL
- * @param result GNUNET_YES if the service is running
+ * @param result #GNUNET_YES if the service is running
*/
static void
start_resolver (void *cls,
@@ -477,7 +477,7 @@
* If the test failed, start the namestore process.
*
* @param cls closure, NULL
- * @param result GNUNET_YES if the service is running
+ * @param result #GNUNET_YES if the service is running
*/
static void
start_namestore (void *cls,
@@ -528,6 +528,33 @@
/**
+ * User clicked on the button to edit the list of friends.
+ * Launch gnunet-peerinfo-gtk.
+ */
+void
+GNUNET_setup_launch_edit_friends_button_clicked_cb (GtkButton *button,
+ gpointer *user_data)
+{
+ struct GNUNET_OS_Process *proc;
+
+ proc = GNUNET_OS_start_process (GNUNET_NO,
+ GNUNET_OS_INHERIT_STD_ALL,
+ NULL, NULL,
+ "gnunet-peerinfo-gtk",
+ "-c", cfgName,
+ NULL);
+ if (NULL == proc)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Failed to launch gnunet-peerinfo-gtk\n"));
+ return;
+ }
+ /* simply yield control, let it run */
+ GNUNET_free (proc);
+}
+
+
+/**
* Called once the autoconfiguration is done. Triggers shutdown.
*
* @param cls unused
@@ -546,7 +573,8 @@
* @param tc scheduler context
*/
static void
-run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+run (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GtkWidget *main_window;
#ifndef MINGW
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29938 - in gnunet-gtk: contrib src/peerinfo src/setup,
gnunet <=