[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29166 - in gnunet-gtk: contrib src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29166 - in gnunet-gtk: contrib src/fs |
Date: |
Tue, 10 Sep 2013 16:41:59 +0200 |
Author: grothoff
Date: 2013-09-10 16:41:58 +0200 (Tue, 10 Sep 2013)
New Revision: 29166
Modified:
gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade
gnunet-gtk/contrib/gnunet_fs_gtk_search_tab.glade
gnunet-gtk/src/fs/gnunet-fs-gtk.c
gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c
Log:
-towards having a way to learn namespaces via gnunet-fs-gtk
Modified: gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade 2013-09-10 14:33:57 UTC
(rev 29165)
+++ gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade 2013-09-10 14:41:58 UTC
(rev 29166)
@@ -55,6 +55,7 @@
<object class="GtkImage"
id="GNUNET_FS_GTK_main_window_connection_indicator">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Your peer is
currently not connected.</property>
<property name="stock">gtk-no</property>
<signal name="button-press-event"
handler="GNUNET_FS_GTK_main_window_connection_indicator_button_press_event_cb"
swapped="no"/>
</object>
@@ -79,7 +80,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
@@ -291,7 +292,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -302,9 +303,42 @@
<property name="border_width">3</property>
<property name="spacing">4</property>
<child>
- <object class="GtkLabel" id="main_window_search_namespace_label">
+ <object class="GtkVBox" id="main_window_namespace_vbox">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Namespace:</property>
+ <child>
+ <object class="GtkLabel"
id="main_window_search_namespace_label">
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Namespace:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox"
id="main_window_search_namespace_combobox">
+ <property name="can_focus">False</property>
+ <property name="model">namespace_label_liststore</property>
+ <property name="button_sensitivity">off</property>
+ <property name="has_entry">True</property>
+ <property name="entry_text_column">0</property>
+ <signal name="changed"
handler="main_window_search_namespace_combobox_changed_cb" swapped="no"/>
+ <child>
+ <object class="GtkCellRendererText"
id="main_window_search_namespace_combobox_cellrenderertext"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">5</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -313,179 +347,221 @@
</packing>
</child>
<child>
- <object class="GtkComboBox"
id="main_window_search_namespace_combobox">
- <property name="can_focus">False</property>
- <property name="model">namespace_label_liststore</property>
- <property name="button_sensitivity">off</property>
- <property name="has_entry">True</property>
- <property name="entry_text_column">0</property>
- <child>
- <object class="GtkCellRendererText"
id="main_window_search_namespace_combobox_cellrenderertext"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
+ <object class="GtkButton" id="GNUNET_FS_GTK_save_button">
+ <property name="label">gtk-save</property>
+ <property name="use_action_appearance">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Remember the
specified namespace for later.</property>
+ <property name="relief">none</property>
+ <property name="use_stock">True</property>
+ <property name="image_position">top</property>
+ <signal name="clicked"
handler="GNUNET_FS_GTK_save_button_clicked_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="padding">5</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkAlignment"
id="main_window_search_button_alignment">
+ <object class="GtkVBox" id="main_window_keywords_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="yscale">0</property>
<child>
- <object class="GtkButton" id="main_window_search_button">
- <property name="label" translatable="yes">Find:</property>
- <property name="use_action_appearance">False</property>
+ <object class="GtkLabel" id="GNUNET_FS_GTK_keyword_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Keywords:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="main_window_search_entry">
+ <property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">find_stock_image</property>
- <signal name="clicked"
handler="main_window_search_button_clicked_cb" swapped="no"/>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property
name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <signal name="key-press-event"
handler="main_window_search_entry_key_press_event_cb" swapped="no"/>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="main_window_search_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- <signal name="key-press-event"
handler="main_window_search_entry_key_press_event_cb" swapped="no"/>
- </object>
- <packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="main_window_search_anonymity_label">
+ <object class="GtkAlignment"
id="main_window_search_button_alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Anonymity:</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkButton" id="main_window_search_button">
+ <property name="label" translatable="yes">Search</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">find_stock_image</property>
+ <property name="image_position">top</property>
+ <signal name="clicked"
handler="main_window_search_button_clicked_cb" swapped="no"/>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <object class="GtkAlignment"
id="main_window_search_anonymity_combobox_alignment">
+ <object class="GtkVBox" id="main_window_anonymity_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="yscale">0</property>
<child>
- <object class="GtkComboBox"
id="main_window_search_anonymity_combobox">
+ <object class="GtkLabel"
id="main_window_search_anonymity_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="model">anonymity_level_liststore</property>
- <property name="active">1</property>
+ <property name="label"
translatable="yes">Anonymity:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment"
id="main_window_search_anonymity_combobox_alignment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="yscale">0</property>
<child>
- <object class="GtkCellRendererText"
id="main_window_search_anonymity_combobox_renderer"/>
- <attributes>
- <attribute name="foreground">2</attribute>
- <attribute name="text">0</attribute>
- </attributes>
+ <object class="GtkComboBox"
id="main_window_search_anonymity_combobox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="model">anonymity_level_liststore</property>
+ <property name="active">1</property>
+ <child>
+ <object class="GtkCellRendererText"
id="main_window_search_anonymity_combobox_renderer"/>
+ <attributes>
+ <attribute name="foreground">2</attribute>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ <child>
+ <object class="GtkCellRendererText"
id="main_window_search_anonymity_combobox_renerer_level"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ </object>
</child>
- <child>
- <object class="GtkCellRendererText"
id="main_window_search_anonymity_combobox_renerer_level"/>
- <attributes>
- <attribute name="text">1</attribute>
- </attributes>
- </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="main_window_search_mime_label">
+ <object class="GtkVBox" id="main_window_mime_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Type:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">6</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment"
id="main_window_search_mime_combobox_alignment">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="yscale">0</property>
<child>
- <object class="GtkComboBox"
id="main_window_search_mime_combobox">
+ <object class="GtkLabel" id="main_window_search_mime_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property
name="model">main_window_search_mime_liststore</property>
- <property name="active">0</property>
+ <property name="label"
translatable="yes">Mime-type:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment"
id="main_window_search_mime_combobox_alignment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="yscale">0</property>
<child>
- <object class="GtkCellRendererText"
id="main_window_search_mime_renderer_description"/>
- <attributes>
- <attribute name="text">1</attribute>
- </attributes>
- </child>
- <child>
- <object class="GtkCellRendererText"
id="main_window_search_mime_renderer_type">
- <property name="visible">False</property>
+ <object class="GtkComboBox"
id="main_window_search_mime_combobox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="model">main_window_search_mime_liststore</property>
+ <property name="active">0</property>
+ <child>
+ <object class="GtkCellRendererText"
id="main_window_search_mime_renderer_description"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ <child>
+ <object class="GtkCellRendererText"
id="main_window_search_mime_renderer_type">
+ <property name="visible">False</property>
+ </object>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ <child>
+ <object class="GtkCellRendererText"
id="main_window_search_mime_renderer_extension"/>
+ <attributes>
+ <attribute name="text">2</attribute>
+ </attributes>
+ </child>
+ <child>
+ <object class="GtkCellRendererText"
id="main_window_search_mime_renderer_lossyness">
+ <property name="visible">False</property>
+ </object>
+ <attributes>
+ <attribute name="text">3</attribute>
+ </attributes>
+ </child>
+ <child>
+ <object class="GtkCellRendererText"
id="main_window_search_mime_renderer_freedom">
+ <property name="visible">False</property>
+ </object>
+ <attributes>
+ <attribute name="text">4</attribute>
+ </attributes>
+ </child>
</object>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
</child>
- <child>
- <object class="GtkCellRendererText"
id="main_window_search_mime_renderer_extension"/>
- <attributes>
- <attribute name="text">2</attribute>
- </attributes>
- </child>
- <child>
- <object class="GtkCellRendererText"
id="main_window_search_mime_renderer_lossyness">
- <property name="visible">False</property>
- </object>
- <attributes>
- <attribute name="text">3</attribute>
- </attributes>
- </child>
- <child>
- <object class="GtkCellRendererText"
id="main_window_search_mime_renderer_freedom">
- <property name="visible">False</property>
- </object>
- <attributes>
- <attribute name="text">4</attribute>
- </attributes>
- </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">7</property>
+ <property name="position">5</property>
</packing>
</child>
</object>
@@ -724,7 +800,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -817,7 +893,7 @@
</child>
</object>
<packing>
- <property name="resize">True</property>
+ <property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
@@ -831,27 +907,26 @@
</object>
</child>
</object>
- <object class="GtkSizeGroup" id="GNUNET_FS_GTK_download_frame_vsize_group">
- <property name="mode">vertical</property>
- <property name="ignore_hidden">True</property>
- <widgets>
- <widget name="GNUNET_GTK_search_frame_download_location_label"/>
- <widget name="GNUNET_GTK_search_frame_download_filename_label"/>
- <widget name="GNUNET_GTK_search_frame_download_anonymity_label"/>
- <widget name="GNUNET_GTK_search_frame_download_location_chooser"/>
- <widget name="GNUNET_GTK_search_frame_download_filename_entry"/>
- <widget name="GNUNET_GTK_search_frame_download_filename_change_button"/>
- <widget name="main_window_download_anonymity_combobox_alignment"/>
- <widget name="GNUNET_GTK_search_frame_download_recursive_checkbox"/>
- </widgets>
+ <object class="GtkListStore" id="GNUNET_GTK_select_pseudonym_liststore">
+ <columns>
+ <!-- column-name namespace_name -->
+ <column type="gchararray"/>
+ <!-- column-name namespace_handle -->
+ <column type="gpointer"/>
+ </columns>
</object>
- <object class="GtkSizeGroup"
id="GNUNET_GTK_download_frame_labels_size_group">
- <widgets>
- <widget name="GNUNET_GTK_search_frame_download_location_label"/>
- <widget name="GNUNET_GTK_search_frame_download_anonymity_label"/>
- <widget name="GNUNET_GTK_search_frame_download_filename_label"/>
- </widgets>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ <property name="page_size">10</property>
</object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ <property name="page_size">10</property>
+ </object>
<object class="GtkListStore" id="GNUNET_GTK_meta_data_list_store">
<columns>
<!-- column-name extractor_meta_type -->
@@ -878,26 +953,6 @@
<column type="guint64"/>
</columns>
</object>
- <object class="GtkListStore" id="GNUNET_GTK_select_pseudonym_liststore">
- <columns>
- <!-- column-name namespace_name -->
- <column type="gchararray"/>
- <!-- column-name namespace_handle -->
- <column type="gpointer"/>
- </columns>
- </object>
- <object class="GtkAdjustment" id="adjustment1">
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- <property name="page_size">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustment2">
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- <property name="page_size">10</property>
- </object>
<object class="GtkAdjustment" id="adjustment3">
<property name="upper">100</property>
<property name="step_increment">1</property>
@@ -960,14 +1015,6 @@
<property name="can_focus">False</property>
<property name="stock">gtk-go-down</property>
</object>
- <object class="GtkSizeGroup" id="enties_and_comboboxes_sizegroup">
- <property name="mode">vertical</property>
- <widgets>
- <widget name="main_window_search_entry"/>
- <widget name="main_window_search_anonymity_combobox"/>
- <widget name="main_window_search_mime_combobox"/>
- </widgets>
- </object>
<object class="GtkAdjustment" id="expiration_year_adjustment">
<property name="upper">9999</property>
<property name="step_increment">1</property>
@@ -988,6 +1035,30 @@
<property name="can_focus">False</property>
<property name="stock">gtk-index</property>
</object>
+ <object class="GtkSizeGroup" id="GNUNET_FS_GTK_download_frame_vsize_group">
+ <property name="mode">vertical</property>
+ <property name="ignore_hidden">True</property>
+ <widgets>
+ <widget name="GNUNET_GTK_search_frame_download_location_label"/>
+ <widget name="GNUNET_GTK_search_frame_download_filename_label"/>
+ <widget name="GNUNET_GTK_search_frame_download_anonymity_label"/>
+ <widget name="GNUNET_GTK_search_frame_download_location_chooser"/>
+ <widget name="GNUNET_GTK_search_frame_download_filename_entry"/>
+ <widget name="GNUNET_GTK_search_frame_download_filename_change_button"/>
+ <widget name="main_window_download_anonymity_combobox_alignment"/>
+ <widget name="GNUNET_GTK_search_frame_download_recursive_checkbox"/>
+ </widgets>
+ </object>
+ <object class="GtkSizeGroup"
id="GNUNET_GTK_download_frame_labels_size_group">
+ <widgets>
+ <widget name="GNUNET_GTK_search_frame_download_location_label"/>
+ <widget name="GNUNET_GTK_search_frame_download_anonymity_label"/>
+ <widget name="GNUNET_GTK_search_frame_download_filename_label"/>
+ </widgets>
+ </object>
+ <object class="GtkSizeGroup" id="enties_and_comboboxes_sizegroup">
+ <property name="mode">vertical</property>
+ </object>
<object class="GtkListStore" id="main_window_search_mime_liststore">
<columns>
<!-- column-name MIME -->
Modified: gnunet-gtk/contrib/gnunet_fs_gtk_search_tab.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_fs_gtk_search_tab.glade 2013-09-10 14:33:57 UTC
(rev 29165)
+++ gnunet-gtk/contrib/gnunet_fs_gtk_search_tab.glade 2013-09-10 14:41:58 UTC
(rev 29166)
@@ -57,7 +57,6 @@
<property name="deletable">False</property>
<child>
<object class="GtkScrolledWindow" id="_search_frame_scrolled_window">
- <property name="height_request">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
@@ -234,6 +233,7 @@
<property name="can_focus">False</property>
<property name="type">popup</property>
<property name="title" translatable="yes">You shouldn't see this
also</property>
+ <property name="resizable">False</property>
<property name="type_hint">dock</property>
<property name="skip_taskbar_hint">True</property>
<property name="skip_pager_hint">True</property>
@@ -253,7 +253,6 @@
<property name="yscale">0</property>
<child>
<object class="GtkLabel" id="_search_result_label_window_label">
- <property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">query</property>
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.c 2013-09-10 14:33:57 UTC (rev 29165)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.c 2013-09-10 14:41:58 UTC (rev 29166)
@@ -773,6 +773,7 @@
}
arm = GNUNET_ARM_connect (main_context.cfg, &arm_connection_state_change,
&main_context);
armon = GNUNET_ARM_monitor (main_context.cfg, service_status_change,
&main_context);
+ main_context.gns = GNUNET_GNS_connect (main_context.cfg);
main_context.identity = GNUNET_IDENTITY_connect (main_context.cfg, NULL,
NULL);
main_context.id_op = GNUNET_IDENTITY_get (main_context.identity,
"fs-sks",
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c 2013-09-10
14:33:57 UTC (rev 29165)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c 2013-09-10
14:41:58 UTC (rev 29166)
@@ -117,19 +117,19 @@
sl->gns = NULL;
for (i=0;i<rd_count;i++)
+ {
+ if (GNUNET_NAMESTORE_TYPE_PKEY != rd[i].record_type)
+ continue;
+ if (sizeof (struct GNUNET_CRYPTO_EccPublicKey) != rd[i].data_size)
{
- if (GNUNET_NAMESTORE_TYPE_PKEY != rd[i].record_type)
- continue;
- if (sizeof (struct GNUNET_CRYPTO_EccPublicKey) != rd[i].data_size)
- {
- GNUNET_break_op (0);
- continue;
- }
- uri = GNUNET_FS_uri_sks_create (rd[i].data, sl->keywords);
- search_for_uri (uri, sl->anonymity_level);
- abort_search_lookup (sl);
- return;
+ GNUNET_break_op (0);
+ continue;
}
+ uri = GNUNET_FS_uri_sks_create (rd[i].data, sl->keywords);
+ search_for_uri (uri, sl->anonymity_level);
+ abort_search_lookup (sl);
+ return;
+ }
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Failed to resolve namespace in time\n"));
abort_search_lookup (sl);
@@ -216,7 +216,8 @@
}
/* build KSK/SKS URI */
- if (NULL != nsid)
+ if ( (NULL != nsid) &&
+ (0 < strlen (nsid)) )
{
sl = GNUNET_new (struct SearchLookup);
sl->keywords = keywords;
@@ -295,4 +296,51 @@
return FALSE;
}
+
+/**
+ * User clicked on the 'save' button in the search line of the main window.
+ * Store the selected namespace in the "sks-fs" zone.
+ *
+ * @param button the "save" button
+ * @param user_data the main window context builder
+ */
+
+void
+GNUNET_FS_GTK_save_button_clicked_cb (GtkButton * button,
+ gpointer user_data)
+{
+ struct GNUNET_GTK_MainWindowContext *main_ctx = user_data;
+
+ GNUNET_break (0);
+ (void) main_ctx;
+}
+
+
+/**
+ * The user has somehow changed the selectionin the namespace combo box entry.
+ * Update the visibility of the "save" button.
+ *
+ * @param widget the combo box
+ * @param user_data the main window context builder (unused)
+ */
+void
+main_window_search_namespace_combobox_changed_cb (GtkComboBox *widget,
+ gpointer user_data)
+{
+ GtkButton *button;
+ const gchar *text;
+ struct GNUNET_CRYPTO_EccPublicKey pkey;
+ int ret;
+
+ text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))));
+ ret = GNUNET_NAMESTORE_zkey_to_pkey (text, &pkey);
+ button = GTK_BUTTON (GNUNET_FS_GTK_get_main_window_object
+ ("GNUNET_FS_GTK_save_button"));
+ gtk_widget_set_visible (GTK_WIDGET (button),
+ (GNUNET_OK == ret) ? TRUE : FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (button),
+ (GNUNET_OK == ret) ? TRUE : FALSE);
+}
+
+
/* end of gnunet-fs-gtk_main-window-search.c */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29166 - in gnunet-gtk: contrib src/fs,
gnunet <=