[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r18820 - in gnunet-gtk: contrib src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r18820 - in gnunet-gtk: contrib src/fs |
Date: |
Sun, 25 Dec 2011 22:15:59 +0100 |
Author: grothoff
Date: 2011-12-25 22:15:59 +0100 (Sun, 25 Dec 2011)
New Revision: 18820
Modified:
gnunet-gtk/contrib/gnunet_fs_gtk_advertise_pseudonym_dialog.glade
gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade
gnunet-gtk/contrib/gnunet_fs_gtk_publish_edit_dialog.glade
gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
Log:
-remove code for keyword normalization, makes no sense in international
application, normalization methods are questionable to begin with
Modified: gnunet-gtk/contrib/gnunet_fs_gtk_advertise_pseudonym_dialog.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_fs_gtk_advertise_pseudonym_dialog.glade
2011-12-25 21:11:23 UTC (rev 18819)
+++ gnunet-gtk/contrib/gnunet_fs_gtk_advertise_pseudonym_dialog.glade
2011-12-25 21:15:59 UTC (rev 18820)
@@ -386,22 +386,6 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkButton"
id="GNUNET_GTK_advertise_pseudonym_keyword_list_normalize_button">
- <property name="label"
translatable="yes">_Normalize</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property
name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <signal name="clicked"
handler="GNUNET_GTK_advertise_pseudonym_keyword_list_normalize_button_clicked_cb"
swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
Modified: gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade 2011-12-25 21:11:23 UTC
(rev 18819)
+++ gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade 2011-12-25 21:15:59 UTC
(rev 18820)
@@ -369,23 +369,6 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton"
id="GNUNET_GTK_edit_publication_normalization_checkbox">
- <property name="label"
translatable="yes">Normalize all keywords a_utomatically after "OK" is
pressed</property>
- <property
name="use_action_appearance">False</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled"
handler="GNUNET_GTK_edit_publication_normalization_checkbox_toggled_cb"
swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">True</property>
Modified: gnunet-gtk/contrib/gnunet_fs_gtk_publish_edit_dialog.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_fs_gtk_publish_edit_dialog.glade 2011-12-25
21:11:23 UTC (rev 18819)
+++ gnunet-gtk/contrib/gnunet_fs_gtk_publish_edit_dialog.glade 2011-12-25
21:15:59 UTC (rev 18820)
@@ -394,22 +394,6 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkButton"
id="GNUNET_GTK_edit_file_information_keyword_list_normalize_button">
- <property name="label"
translatable="yes">_Normalize</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property
name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <signal name="clicked"
handler="GNUNET_GTK_edit_file_information_keyword_list_normalize_button_clicked_cb"
swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c 2011-12-25
21:11:23 UTC (rev 18819)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c 2011-12-25
21:15:59 UTC (rev 18820)
@@ -145,12 +145,6 @@
gtk_widget_set_sensitive (button,
gtk_tree_selection_get_selected (sel, NULL, NULL));
- button =
- GTK_WIDGET (gtk_builder_get_object
- (builder,
-
"GNUNET_GTK_edit_publication_keyword_list_normalize_button"));
- gtk_widget_set_sensitive (button,
- gtk_tree_selection_get_selected (sel, NULL, NULL));
}
@@ -485,67 +479,6 @@
void
-GNUNET_GTK_edit_publication_keyword_list_normalize_button_clicked_cb (
- GtkButton *button, gpointer user_data)
-{
- GtkTreeView *tv;
- GtkTreeSelection *sel;
- GtkTreeModel *tm;
- GtkTreeIter iter, inserted;
- gchar *value;
- struct GNUNET_FS_Uri *uri;
- struct GNUNET_FS_Uri *nuri;
- char *nvalue;
- char *emsg;
- GtkBuilder *builder;
- builder = GTK_BUILDER (user_data);
-
- tv = GTK_TREE_VIEW (gtk_builder_get_object
- (builder,
- "GNUNET_GTK_edit_publication_keyword_list_tree_view"));
- sel = gtk_tree_view_get_selection (tv);
- if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
- return;
- gtk_tree_model_get (tm, &iter, 0, &value, -1);
- emsg = NULL;
- uri = GNUNET_FS_uri_ksk_create (value, &emsg);
- if (uri == NULL)
- {
- GNUNET_break (0);
- GNUNET_free (emsg);
- g_free (value);
- return;
- }
- nuri = GNUNET_FS_uri_ksk_canonicalize (uri);
- nvalue = GNUNET_FS_uri_ksk_to_string_fancy (nuri);
-
- if (strcmp (value, nvalue) != 0)
- {
- gtk_list_store_insert_after (GTK_LIST_STORE (tm), &inserted, &iter);
- gtk_list_store_set (GTK_LIST_STORE (tm), &inserted, 0, nvalue, -1);
- }
- GNUNET_FS_uri_destroy (nuri);
- GNUNET_FS_uri_destroy (uri);
- GNUNET_free (nvalue);
- g_free (value);
-}
-
-
-void
-GNUNET_GTK_edit_publication_normalization_checkbox_toggled_cb (
- GtkToggleButton *button, gpointer user_data)
-{
- GtkBuilder *builder;
- GtkToggleButton *norm_button;
- builder = GTK_BUILDER (user_data);
- norm_button = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder,
- "GNUNET_GTK_edit_publication_keyword_list_normalize_button"));
- gtk_widget_set_sensitive (GTK_WIDGET (norm_button),
- !gtk_toggle_button_get_active (norm_button));
-}
-
-
-void
GNUNET_GTK_edit_publication_metadata_preview_file_chooser_button_file_set_cb (
GtkFileChooserButton *widget, gpointer user_data)
{
@@ -714,7 +647,6 @@
const char *mime;
GFile *f;
GFileInfo *finfo;
- gboolean auto_normalize = FALSE;
GObject *pubwindow;
struct EditPublicationState *state = NULL;
@@ -740,10 +672,6 @@
(gtk_builder_get_object
(builder,
"GNUNET_GTK_edit_publication_index_checkbutton")));
- auto_normalize = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
- (gtk_builder_get_object
- (builder,
-
"GNUNET_GTK_edit_publication_normalization_checkbox")));
sb = GTK_SPIN_BUTTON (gtk_builder_get_object
(builder,
"GNUNET_GTK_edit_publication_expiration_year_spin_button"));
@@ -778,24 +706,6 @@
if (NULL != *uri)
GNUNET_FS_uri_destroy (*uri);
*uri = mrg;
- if (auto_normalize)
- {
- char *emsg = NULL;
- struct GNUNET_FS_Uri *nuri;
-
- nuri = GNUNET_FS_uri_ksk_create (value, &emsg);
- if (nuri == NULL)
- GNUNET_free_non_null (emsg);
- else
- {
- nxt = GNUNET_FS_uri_ksk_canonicalize (nuri);
- mrg = GNUNET_FS_uri_ksk_merge (nxt, *uri);
- GNUNET_FS_uri_destroy (nxt);
- if (NULL != *uri)
- GNUNET_FS_uri_destroy (*uri);
- *uri = mrg;
- }
- }
g_free (value);
}
while (TRUE == gtk_tree_model_iter_next (tm, &iter));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r18820 - in gnunet-gtk: contrib src/fs,
gnunet <=