[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r25198 - in gnunet-gtk: contrib src/setup
From: |
gnunet |
Subject: |
[GNUnet-SVN] r25198 - in gnunet-gtk: contrib src/setup |
Date: |
Mon, 3 Dec 2012 17:41:22 +0100 |
Author: grothoff
Date: 2012-12-03 17:41:22 +0100 (Mon, 03 Dec 2012)
New Revision: 25198
Modified:
gnunet-gtk/contrib/gnunet_setup_gns_edit_a.glade
gnunet-gtk/src/setup/gnunet-setup-gns-edit.c
Log:
-more work on A edit dialog
Modified: gnunet-gtk/contrib/gnunet_setup_gns_edit_a.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_setup_gns_edit_a.glade 2012-12-03 16:08:26 UTC
(rev 25197)
+++ gnunet-gtk/contrib/gnunet_setup_gns_edit_a.glade 2012-12-03 16:41:22 UTC
(rev 25198)
@@ -17,6 +17,23 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
+ <object class="GtkListStore" id="edit_dialog_expiration_relative_liststore">
+ <columns>
+ <!-- column-name relativetime -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">7 days</col>
+ </row>
+ <row>
+ <col id="0">1 day</col>
+ </row>
+ <row>
+ <col id="0">1 h</col>
+ </row>
+ </data>
+ </object>
<object class="GtkDialog" id="edit_a_dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -117,6 +134,7 @@
<property
name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property
name="secondary_icon_sensitive">True</property>
+ <signal name="changed"
handler="GNS_edit_dialog_name_entry_changed_cb" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@@ -145,10 +163,16 @@
<property name="model">zone_liststore</property>
<property name="active">0</property>
<property name="entry_text_column">0</property>
+ <child>
+ <object class="GtkCellRendererText"
id="edit_dialog_zone_combobox_cellrenderertext"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
@@ -325,6 +349,7 @@
<property name="tooltip_text"
translatable="yes">Records with a relative expiration time (such as 1 week) are
always valid for at least that time period into the future. In other words, the
auto-renew their own expiration to the given time period into the future. When
you convert a public record with a relative expiration time to one with an
absolute expiration time, the earliest possible expiration will be the
respective relative time in the future. Use relative expiration times for
entries for which you do not know a specific date when they will
expire.</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
+ <signal name="toggled"
handler="GNS_edit_dialog_expiration_relative_radiobutton_toggled_cb"
swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -343,6 +368,7 @@
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property
name="group">edit_dialog_expiration_relative_radiobutton</property>
+ <signal name="toggled"
handler="GNS_edit_dialog_expiration_absolute_radiobutton_toggled_cb"
swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -506,6 +532,8 @@
<property
name="model">edit_dialog_expiration_relative_liststore</property>
<property name="has_entry">True</property>
<property name="entry_text_column">0</property>
+ <signal name="changed"
handler="GNS_edit_dialog_expiration_relative_combobox_changed_cb" swapped="no"/>
+ <signal name="editing-done"
handler="GNS_edit_dialog_expiration_relative_combobox_editing_done_cb"
swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@@ -540,23 +568,6 @@
<action-widget response="-5">edit_dialog_save_button</action-widget>
</action-widgets>
</object>
- <object class="GtkListStore" id="edit_dialog_expiration_relative_liststore">
- <columns>
- <!-- column-name relativetime -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0">7 days</col>
- </row>
- <row>
- <col id="0">1 day</col>
- </row>
- <row>
- <col id="0">1 h</col>
- </row>
- </data>
- </object>
<object class="GtkListStore" id="zone_liststore">
<columns>
<!-- column-name zonename -->
Modified: gnunet-gtk/src/setup/gnunet-setup-gns-edit.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-gns-edit.c 2012-12-03 16:08:26 UTC
(rev 25197)
+++ gnunet-gtk/src/setup/gnunet-setup-gns-edit.c 2012-12-03 16:41:22 UTC
(rev 25198)
@@ -77,6 +77,122 @@
/**
+ * The user has edited the A record value. Enable/disable 'save'
+ * button depending on the validity of the value.
+ *
+ * @param entry editing widget
+ * @param preedit new value
+ * @param user_data the 'struct EditDialogContext' of the dialog
+ */
+void
+GNS_edit_dialog_name_entry_changed_cb (GtkEditable *entry,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+ const gchar *preedit;
+ struct in_addr v4;
+
+ preedit = gtk_editable_get_chars (entry, 0, -1);
+#if 0
+ /* FIXME: need a way to check if _rest_ of the dialog is
+ also consistent (like the _value_!) */
+ if (1)
+ edit_dialog_enable_save (edc);
+ else
+ edit_dialog_disable_save (edc);
+#endif
+ GNUNET_break (0);
+}
+
+
+/**
+ * The user has changed the relative expiration time.
+ *
+ * @param widget the combo box
+ * @param user_data the 'struct EditDialogContext' of the dialog
+ */
+void
+GNS_edit_dialog_expiration_relative_combobox_changed_cb (GtkComboBox *widget,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+
+ /* not sure if we need to do anything here */
+ // FIXME
+ GNUNET_break (0);
+}
+
+
+/**
+ * The user finished adding an expiration value from hand. Add
+ * it to the model and select it -- if it is a valid value.
+ *
+ * @param cell_editable the changed cell
+ * @param user_data the 'struct EditDialogContext' of the dialog
+ */
+void
+GNS_edit_dialog_expiration_relative_combobox_editing_done_cb (GtkCellEditable
*cell_editable,
+ gpointer
user_data)
+{
+ struct EditDialogContext *edc = user_data;
+
+ // FIXME
+ GNUNET_break (0);
+}
+
+
+/**
+ * The 'relative' expiration time radiobutton was toggled (on or off).
+ *
+ * @param button the button
+ * @param user_data the 'struct EditDialogContext' of the dialog
+ */
+void
+GNS_edit_dialog_expiration_relative_radiobutton_toggled_cb (GtkToggleButton
*button,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+
+ // FIXME
+ GNUNET_break (0);
+}
+
+
+/**
+ * The 'forever' expiration time radiobutton was toggled (on or off).
+ *
+ * @param button the button
+ * @param user_data the 'struct EditDialogContext' of the dialog
+ */
+void
+GNS_edit_dialog_expiration_forever_radiobutton_toggled_cb (GtkToggleButton
*button,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+
+ // FIXME
+ GNUNET_break (0);
+}
+
+
+/**
+ * The 'absolute' expiration time radiobutton was toggled (on or off).
+ *
+ * @param button the button
+ * @param user_data the 'struct EditDialogContext' of the dialog
+ */
+void
+GNS_edit_dialog_expiration_absolute_radiobutton_toggled_cb (GtkToggleButton
*button,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+
+ // FIXME
+ GNUNET_break (0);
+}
+
+
+/**
* Initialize widgets of the edit dialog that are the same regardless of
* the type of the record.
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r25198 - in gnunet-gtk: contrib src/setup,
gnunet <=