[frogr] Renamed 'remove-extensions' to 'remove-file-extensions'



commit 80f47ae6e560e794264aeafbd4c67720f7e53d08
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Fri Apr 22 07:34:02 2011 +0200

    Renamed 'remove-extensions' to 'remove-file-extensions'

 src/frogr-config.c          |   18 +++++++++---------
 src/frogr-config.h          |    4 ++--
 src/frogr-picture-loader.c  |    6 +++---
 src/frogr-settings-dialog.c |   31 +++++++++++++++----------------
 4 files changed, 29 insertions(+), 30 deletions(-)
---
diff --git a/src/frogr-config.c b/src/frogr-config.c
index f2133a5..5c4b7ac 100644
--- a/src/frogr-config.c
+++ b/src/frogr-config.c
@@ -59,7 +59,7 @@ struct _FrogrConfigPrivate
   FspContentType content_type;
 
   gboolean tags_autocompletion;
-  gboolean remove_extensions;
+  gboolean remove_file_extensions;
 
   gboolean use_proxy;
   gchar *proxy_host;
@@ -216,12 +216,12 @@ _load_settings (FrogrConfig *self, const gchar *config_dir)
               xmlFree (content);
             }
 
-          if (!xmlStrcmp (node->name, (const xmlChar*) "remove-extensions"))
+          if (!xmlStrcmp (node->name, (const xmlChar*) "remove-file-extensions"))
             {
               xmlChar *content = NULL;
 
               content = xmlNodeGetContent (node);
-              priv->remove_extensions = !xmlStrcmp (content, (const xmlChar*) "1");
+              priv->remove_file_extensions = !xmlStrcmp (content, (const xmlChar*) "1");
 
               xmlFree (content);
             }
@@ -547,7 +547,7 @@ _save_settings (FrogrConfig *self)
 
   /* Other stuff */
   _xml_add_string_child (root, "tags-autocompletion", priv->tags_autocompletion ? "1" : "0");
-  _xml_add_string_child (root, "remove-extensions", priv->remove_extensions ? "1" : "0");
+  _xml_add_string_child (root, "remove-file-extensions", priv->remove_file_extensions ? "1" : "0");
 
   /* Use proxy */
   node = xmlNewNode (NULL, (const xmlChar*) "http-proxy");
@@ -772,7 +772,7 @@ frogr_config_init (FrogrConfig *self)
   priv->safety_level = FSP_SAFETY_LEVEL_SAFE;
   priv->content_type = FSP_CONTENT_TYPE_PHOTO;
   priv->tags_autocompletion = TRUE;
-  priv->remove_extensions = TRUE;
+  priv->remove_file_extensions = TRUE;
   priv->use_proxy = FALSE;
   priv->proxy_host = NULL;
   priv->proxy_port = NULL;
@@ -1054,21 +1054,21 @@ frogr_config_get_tags_autocompletion (FrogrConfig *self)
 }
 
 void
-frogr_config_set_remove_extensions (FrogrConfig *self, gboolean value)
+frogr_config_set_remove_file_extensions (FrogrConfig *self, gboolean value)
 {
   g_return_if_fail (FROGR_IS_CONFIG (self));
 
   FrogrConfigPrivate * priv = FROGR_CONFIG_GET_PRIVATE (self);
-  priv->remove_extensions = value;
+  priv->remove_file_extensions = value;
 }
 
 gboolean
-frogr_config_get_remove_extensions (FrogrConfig *self)
+frogr_config_get_remove_file_extensions (FrogrConfig *self)
 {
   g_return_val_if_fail (FROGR_IS_CONFIG (self), FALSE);
 
   FrogrConfigPrivate *priv = FROGR_CONFIG_GET_PRIVATE (self);
-  return priv->remove_extensions;
+  return priv->remove_file_extensions;
 }
 
 void
diff --git a/src/frogr-config.h b/src/frogr-config.h
index 9675e9c..1b6ea96 100644
--- a/src/frogr-config.h
+++ b/src/frogr-config.h
@@ -106,9 +106,9 @@ void frogr_config_set_tags_autocompletion (FrogrConfig *self, gboolean value);
 
 gboolean frogr_config_get_tags_autocompletion (FrogrConfig *self);
 
-void frogr_config_set_remove_extensions (FrogrConfig *self, gboolean value);
+void frogr_config_set_remove_file_extensions (FrogrConfig *self, gboolean value);
 
-gboolean frogr_config_get_remove_extensions (FrogrConfig *self);
+gboolean frogr_config_get_remove_file_extensions (FrogrConfig *self);
 
 void frogr_config_set_use_proxy (FrogrConfig *self, gboolean value);
 
diff --git a/src/frogr-picture-loader.c b/src/frogr-picture-loader.c
index 5d5e5ef..6b3be9d 100644
--- a/src/frogr-picture-loader.c
+++ b/src/frogr-picture-loader.c
@@ -54,7 +54,7 @@ struct _FrogrPictureLoaderPrivate
   guint index;
   guint n_pictures;
 
-  gboolean remove_extensions;
+  gboolean remove_file_extensions;
   gboolean public_visibility;
   gboolean family_visibility;
   gboolean friend_visibility;
@@ -259,7 +259,7 @@ _load_next_picture_cb (GObject *object,
           if (file_info)
             g_object_unref (file_info);
 
-          if (priv->remove_extensions)
+          if (priv->remove_file_extensions)
             {
               gchar *extension_dot;
 
@@ -397,7 +397,7 @@ frogr_picture_loader_init (FrogrPictureLoader *self)
   priv->mainview = g_object_ref (frogr_controller_get_main_view (priv->controller));
 
   /* Initialize values from frogr configuration */
-  priv->remove_extensions = frogr_config_get_remove_extensions (config);
+  priv->remove_file_extensions = frogr_config_get_remove_file_extensions (config);
   priv->public_visibility = frogr_config_get_default_public (config);
   priv->family_visibility = frogr_config_get_default_family (config);
   priv->friend_visibility = frogr_config_get_default_friend (config);
diff --git a/src/frogr-settings-dialog.c b/src/frogr-settings-dialog.c
index f895cd2..821e451 100644
--- a/src/frogr-settings-dialog.c
+++ b/src/frogr-settings-dialog.c
@@ -54,7 +54,7 @@ typedef struct _FrogrSettingsDialogPrivate {
   GtkWidget *moderate_rb;
   GtkWidget *restricted_rb;
   GtkWidget *tags_autocompletion_cb;
-  GtkWidget *remove_extensions_cb;
+  GtkWidget *remove_file_extensions_cb;
 
   GtkWidget *use_proxy_cb;
   GtkWidget *proxy_host_label;
@@ -71,7 +71,7 @@ typedef struct _FrogrSettingsDialogPrivate {
   gboolean friend_visibility;
   gboolean show_in_search;
   gboolean tags_autocompletion;
-  gboolean remove_extensions;
+  gboolean remove_file_extensions;
   FspSafetyLevel safety_level;
   FspContentType content_type;
 
@@ -294,13 +294,13 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
                     G_CALLBACK (_on_button_toggled),
                     self);
 
-  cbutton = gtk_check_button_new_with_mnemonic (_("Remo_ve file extensions before upload"));
+  cbutton = gtk_check_button_new_with_mnemonic (_("Remo_ve file extensions from names before upload"));
   gtk_box_pack_start (GTK_BOX (box1), cbutton, FALSE, FALSE, 0);
-  priv->remove_extensions_cb = cbutton;
+  priv->remove_file_extensions_cb = cbutton;
 
   gtk_box_pack_start (GTK_BOX (vbox), box1, FALSE, FALSE, 0);
 
-  g_signal_connect (G_OBJECT (priv->remove_extensions_cb), "toggled",
+  g_signal_connect (G_OBJECT (priv->remove_file_extensions_cb), "toggled",
                     G_CALLBACK (_on_button_toggled),
                     self);
 
@@ -425,8 +425,7 @@ _fill_dialog_with_data (FrogrSettingsDialog *self)
   FrogrSettingsDialogPrivate *priv =
     FROGR_SETTINGS_DIALOG_GET_PRIVATE (self);
 
-  /* Get data form configuration */
-
+  /* Get data from configuration */
   priv->public_visibility = frogr_config_get_default_public (priv->config);
   priv->family_visibility = frogr_config_get_default_family (priv->config);
   priv->friend_visibility = frogr_config_get_default_friend (priv->config);
@@ -434,7 +433,7 @@ _fill_dialog_with_data (FrogrSettingsDialog *self)
   priv->content_type = frogr_config_get_default_content_type (priv->config);
   priv->safety_level = frogr_config_get_default_safety_level (priv->config);
   priv->tags_autocompletion = frogr_config_get_tags_autocompletion (priv->config);
-  priv->remove_extensions = frogr_config_get_remove_extensions (priv->config);
+  priv->remove_file_extensions = frogr_config_get_remove_file_extensions (priv->config);
   priv->use_proxy = frogr_config_get_use_proxy (priv->config);
 
   g_free (priv->proxy_host);
@@ -487,8 +486,8 @@ _fill_dialog_with_data (FrogrSettingsDialog *self)
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->tags_autocompletion_cb),
                                 priv->tags_autocompletion);
 
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->remove_extensions_cb),
-                                priv->remove_extensions);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->remove_file_extensions_cb),
+                                priv->remove_file_extensions);
 
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->use_proxy_cb),
                                 priv->use_proxy);
@@ -524,7 +523,7 @@ _save_data (FrogrSettingsDialog *self)
   frogr_config_set_default_safety_level (priv->config, priv->safety_level);
 
   frogr_config_set_tags_autocompletion (priv->config, priv->tags_autocompletion);
-  frogr_config_set_remove_extensions (priv->config, priv->remove_extensions);
+  frogr_config_set_remove_file_extensions (priv->config, priv->remove_file_extensions);
 
   frogr_config_set_use_proxy (priv->config, priv->use_proxy);
 
@@ -656,10 +655,10 @@ _on_button_toggled (GtkToggleButton *button, gpointer data)
       DEBUG ("Enable tags autocompletion set to %s", active ? "TRUE" : "FALSE");
     }
 
-  if (GTK_WIDGET (button) == priv->remove_extensions_cb)
+  if (GTK_WIDGET (button) == priv->remove_file_extensions_cb)
     {
-      priv->remove_extensions = active;
-      DEBUG ("Enable tags autocompletion set to %s", active ? "TRUE" : "FALSE");
+      priv->remove_file_extensions = active;
+      DEBUG ("Remo_ve file extensions before upload set to %s", active ? "TRUE" : "FALSE");
     }
 
   if (GTK_WIDGET (button) == priv->use_proxy_cb)
@@ -785,7 +784,7 @@ frogr_settings_dialog_init (FrogrSettingsDialog *self)
   priv->moderate_rb = NULL;
   priv->restricted_rb = NULL;
   priv->tags_autocompletion_cb = NULL;
-  priv->remove_extensions_cb = NULL;
+  priv->remove_file_extensions_cb = NULL;
   priv->use_proxy_cb = NULL;
   priv->proxy_host_label = NULL;
   priv->proxy_host_entry = NULL;
@@ -802,7 +801,7 @@ frogr_settings_dialog_init (FrogrSettingsDialog *self)
   priv->safety_level = FSP_SAFETY_LEVEL_NONE;
   priv->content_type = FSP_CONTENT_TYPE_NONE;
   priv->tags_autocompletion = FALSE;
-  priv->remove_extensions = FALSE;
+  priv->remove_file_extensions = FALSE;
   priv->use_proxy = FALSE;
   priv->proxy_host = NULL;
   priv->proxy_port = NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]