[frogr] Changed names and strings for toggleable options
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Changed names and strings for toggleable options
- Date: Tue, 26 Apr 2011 21:35:13 +0000 (UTC)
commit 769fa24e48bf936b1dd806fbb92dde5ebe934cb1
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Tue Apr 26 14:24:24 2011 -0700
Changed names and strings for toggleable options
src/frogr-config.c | 18 +++++++-------
src/frogr-config.h | 4 +-
src/frogr-main-view.c | 12 ++++----
src/frogr-picture-loader.c | 6 ++--
src/frogr-settings-dialog.c | 56 +++++++++++++++++++++---------------------
5 files changed, 48 insertions(+), 48 deletions(-)
---
diff --git a/src/frogr-config.c b/src/frogr-config.c
index 01dd661..0b9eef1 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_file_extensions;
+ gboolean keep_file_extensions;
SortingCriteria mainview_sorting_criteria;
gboolean mainview_sorting_reversed;
gboolean mainview_enable_tooltips;
@@ -231,12 +231,12 @@ _load_settings (FrogrConfig *self, const gchar *config_dir)
xmlFree (content);
}
- if (!xmlStrcmp (node->name, (const xmlChar*) "remove-file-extensions"))
+ if (!xmlStrcmp (node->name, (const xmlChar*) "keep-file-extensions"))
{
xmlChar *content = NULL;
content = xmlNodeGetContent (node);
- priv->remove_file_extensions = !xmlStrcmp (content, (const xmlChar*) "1");
+ priv->keep_file_extensions = !xmlStrcmp (content, (const xmlChar*) "1");
xmlFree (content);
}
@@ -615,7 +615,7 @@ _save_settings (FrogrConfig *self)
/* Other stuff */
_xml_add_bool_child (root, "tags-autocompletion", priv->tags_autocompletion);
- _xml_add_bool_child (root, "remove-file-extensions", priv->remove_file_extensions);
+ _xml_add_bool_child (root, "keep-file-extensions", priv->keep_file_extensions);
_xml_add_bool_child (root, "mainview-enable-tooltips", priv->mainview_enable_tooltips);
node = xmlNewNode (NULL, (const xmlChar*) "mainview-sorting-pictures");
@@ -874,7 +874,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_file_extensions = TRUE;
+ priv->keep_file_extensions = TRUE;
priv->mainview_sorting_criteria = SORT_AS_LOADED;
priv->mainview_sorting_reversed = FALSE;
priv->mainview_enable_tooltips = TRUE;
@@ -1159,21 +1159,21 @@ frogr_config_get_tags_autocompletion (FrogrConfig *self)
}
void
-frogr_config_set_remove_file_extensions (FrogrConfig *self, gboolean value)
+frogr_config_set_keep_file_extensions (FrogrConfig *self, gboolean value)
{
g_return_if_fail (FROGR_IS_CONFIG (self));
FrogrConfigPrivate * priv = FROGR_CONFIG_GET_PRIVATE (self);
- priv->remove_file_extensions = value;
+ priv->keep_file_extensions = value;
}
gboolean
-frogr_config_get_remove_file_extensions (FrogrConfig *self)
+frogr_config_get_keep_file_extensions (FrogrConfig *self)
{
g_return_val_if_fail (FROGR_IS_CONFIG (self), FALSE);
FrogrConfigPrivate *priv = FROGR_CONFIG_GET_PRIVATE (self);
- return priv->remove_file_extensions;
+ return priv->keep_file_extensions;
}
void
diff --git a/src/frogr-config.h b/src/frogr-config.h
index 9825ae0..ef79a2b 100644
--- a/src/frogr-config.h
+++ b/src/frogr-config.h
@@ -112,9 +112,9 @@ void frogr_config_set_tags_autocompletion (FrogrConfig *self, gboolean value);
gboolean frogr_config_get_tags_autocompletion (FrogrConfig *self);
-void frogr_config_set_remove_file_extensions (FrogrConfig *self, gboolean value);
+void frogr_config_set_keep_file_extensions (FrogrConfig *self, gboolean value);
-gboolean frogr_config_get_remove_file_extensions (FrogrConfig *self);
+gboolean frogr_config_get_keep_file_extensions (FrogrConfig *self);
void frogr_config_set_mainview_enable_tooltips (FrogrConfig *self, gboolean value);
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index a79dc69..c15f12b 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -345,7 +345,7 @@ _populate_menu_bar (FrogrMainView *self)
_("By _Title"), &(priv->sort_by_title_menu_item));
_add_radio_menu_item (self, GTK_MENU_SHELL (submenu), &sorting_group,
- _("By _Date of Capture"), &(priv->sort_by_date_menu_item));
+ _("By _Date Taken"), &(priv->sort_by_date_menu_item));
if (priv->sorting_criteria == SORT_BY_TITLE)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (priv->sort_by_title_menu_item), TRUE);
@@ -364,11 +364,11 @@ _populate_menu_bar (FrogrMainView *self)
gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new ());
- _add_check_menu_item (self, GTK_MENU_SHELL (menu), _("Enable _Tooltips"),
+ _add_check_menu_item (self, GTK_MENU_SHELL (menu), _("Disable _Tooltips"),
&(priv->enable_tooltips_menu_item));
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (priv->enable_tooltips_menu_item),
- priv->tooltips_enabled);
+ !priv->tooltips_enabled);
/* Help menu */
@@ -852,8 +852,8 @@ _on_check_menu_item_toggled (GtkCheckMenuItem *item, gpointer self)
checked = gtk_check_menu_item_get_active (item);
if (GTK_WIDGET (item) == priv->enable_tooltips_menu_item)
{
- frogr_config_set_mainview_enable_tooltips (priv->config, checked);
- priv->tooltips_enabled = checked;
+ frogr_config_set_mainview_enable_tooltips (priv->config, !checked);
+ priv->tooltips_enabled = !checked;
}
else if (GTK_WIDGET (item) == priv->sort_reversed_menu_item)
{
@@ -940,7 +940,7 @@ _on_icon_view_query_tooltip (GtkWidget *icon_view,
filesize_str = _get_datasize_string (frogr_picture_get_filesize (picture));
datetime = frogr_picture_get_datetime (picture);
if (datetime)
- datetime_str = g_strdup_printf ("\n<i>%s: %s</i>", _("Captured"), datetime);
+ datetime_str = g_strdup_printf ("\n<i>%s: %s</i>", _("Taken"), datetime);
tooltip_str = g_strdup_printf ("<b>%s</b>\n<i>%s: %s</i>%s",
frogr_picture_get_title (picture),
diff --git a/src/frogr-picture-loader.c b/src/frogr-picture-loader.c
index 061cf1d..26fdb9d 100644
--- a/src/frogr-picture-loader.c
+++ b/src/frogr-picture-loader.c
@@ -60,7 +60,7 @@ struct _FrogrPictureLoaderPrivate
guint index;
guint n_pictures;
- gboolean remove_file_extensions;
+ gboolean keep_file_extensions;
gboolean public_visibility;
gboolean family_visibility;
gboolean friend_visibility;
@@ -303,7 +303,7 @@ _load_next_picture_cb (GObject *object,
file_name = g_file_get_basename (file);
}
- if (priv->remove_file_extensions)
+ if (!priv->keep_file_extensions)
{
gchar *extension_dot = NULL;
@@ -471,7 +471,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_file_extensions = frogr_config_get_remove_file_extensions (config);
+ priv->keep_file_extensions = frogr_config_get_keep_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 7057ffc..2c563aa 100644
--- a/src/frogr-settings-dialog.c
+++ b/src/frogr-settings-dialog.c
@@ -53,8 +53,8 @@ typedef struct _FrogrSettingsDialogPrivate {
GtkWidget *safe_rb;
GtkWidget *moderate_rb;
GtkWidget *restricted_rb;
- GtkWidget *tags_autocompletion_cb;
- GtkWidget *remove_file_extensions_cb;
+ GtkWidget *disable_tags_autocompletion_cb;
+ GtkWidget *keep_file_extensions_cb;
GtkWidget *use_proxy_cb;
GtkWidget *proxy_host_label;
@@ -70,8 +70,8 @@ typedef struct _FrogrSettingsDialogPrivate {
gboolean family_visibility;
gboolean friend_visibility;
gboolean show_in_search;
- gboolean tags_autocompletion;
- gboolean remove_file_extensions;
+ gboolean disable_tags_autocompletion;
+ gboolean keep_file_extensions;
FspSafetyLevel safety_level;
FspContentType content_type;
@@ -286,19 +286,19 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
box1 = gtk_vbox_new (FALSE, 6);
- cbutton = gtk_check_button_new_with_mnemonic (_("Ena_ble Tags Auto-Completion"));
+ cbutton = gtk_check_button_new_with_mnemonic (_("Disa_ble Tags Auto-Completion"));
gtk_box_pack_start (GTK_BOX (box1), cbutton, FALSE, FALSE, 0);
- priv->tags_autocompletion_cb = cbutton;
+ priv->disable_tags_autocompletion_cb = cbutton;
- g_signal_connect (G_OBJECT (priv->tags_autocompletion_cb), "toggled",
+ g_signal_connect (G_OBJECT (priv->disable_tags_autocompletion_cb), "toggled",
G_CALLBACK (_on_button_toggled),
self);
- cbutton = gtk_check_button_new_with_mnemonic (_("Remo_ve File Extensions from Picture Titles"));
+ cbutton = gtk_check_button_new_with_mnemonic (_("_Keep File Extensions in Titles when Loading Pictures"));
gtk_box_pack_start (GTK_BOX (box1), cbutton, FALSE, FALSE, 0);
- priv->remove_file_extensions_cb = cbutton;
+ priv->keep_file_extensions_cb = cbutton;
- g_signal_connect (G_OBJECT (priv->remove_file_extensions_cb), "toggled",
+ g_signal_connect (G_OBJECT (priv->keep_file_extensions_cb), "toggled",
G_CALLBACK (_on_button_toggled),
self);
@@ -432,8 +432,8 @@ _fill_dialog_with_data (FrogrSettingsDialog *self)
priv->show_in_search = frogr_config_get_default_show_in_search (priv->config);
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_file_extensions = frogr_config_get_remove_file_extensions (priv->config);
+ priv->disable_tags_autocompletion = !frogr_config_get_tags_autocompletion (priv->config);
+ priv->keep_file_extensions = frogr_config_get_keep_file_extensions (priv->config);
priv->use_proxy = frogr_config_get_use_proxy (priv->config);
g_free (priv->proxy_host);
@@ -483,11 +483,11 @@ _fill_dialog_with_data (FrogrSettingsDialog *self)
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->safe_rb), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->tags_autocompletion_cb),
- priv->tags_autocompletion);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->disable_tags_autocompletion_cb),
+ priv->disable_tags_autocompletion);
- 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->keep_file_extensions_cb),
+ priv->keep_file_extensions);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->use_proxy_cb),
priv->use_proxy);
@@ -522,8 +522,8 @@ _save_data (FrogrSettingsDialog *self)
frogr_config_set_default_content_type (priv->config, priv->content_type);
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_file_extensions (priv->config, priv->remove_file_extensions);
+ frogr_config_set_tags_autocompletion (priv->config, !priv->disable_tags_autocompletion);
+ frogr_config_set_keep_file_extensions (priv->config, priv->keep_file_extensions);
frogr_config_set_use_proxy (priv->config, priv->use_proxy);
@@ -649,16 +649,16 @@ _on_button_toggled (GtkToggleButton *button, gpointer data)
DEBUG ("Content type set to %d", priv->safety_level);
}
- if (GTK_WIDGET (button) == priv->tags_autocompletion_cb)
+ if (GTK_WIDGET (button) == priv->disable_tags_autocompletion_cb)
{
- priv->tags_autocompletion = active;
- DEBUG ("Enable tags autocompletion set to %s", active ? "TRUE" : "FALSE");
+ priv->disable_tags_autocompletion = active;
+ DEBUG ("Disable tags autocompletion set to %s", active ? "TRUE" : "FALSE");
}
- if (GTK_WIDGET (button) == priv->remove_file_extensions_cb)
+ if (GTK_WIDGET (button) == priv->keep_file_extensions_cb)
{
- priv->remove_file_extensions = active;
- DEBUG ("Remove file extensions before upload set to %s", active ? "TRUE" : "FALSE");
+ priv->keep_file_extensions = active;
+ DEBUG ("Keep file extensions in title set to %s", active ? "TRUE" : "FALSE");
}
if (GTK_WIDGET (button) == priv->use_proxy_cb)
@@ -783,8 +783,8 @@ frogr_settings_dialog_init (FrogrSettingsDialog *self)
priv->safe_rb = NULL;
priv->moderate_rb = NULL;
priv->restricted_rb = NULL;
- priv->tags_autocompletion_cb = NULL;
- priv->remove_file_extensions_cb = NULL;
+ priv->disable_tags_autocompletion_cb = NULL;
+ priv->keep_file_extensions_cb = NULL;
priv->use_proxy_cb = NULL;
priv->proxy_host_label = NULL;
priv->proxy_host_entry = NULL;
@@ -800,8 +800,8 @@ frogr_settings_dialog_init (FrogrSettingsDialog *self)
priv->show_in_search = FALSE;
priv->safety_level = FSP_SAFETY_LEVEL_NONE;
priv->content_type = FSP_CONTENT_TYPE_NONE;
- priv->tags_autocompletion = FALSE;
- priv->remove_file_extensions = FALSE;
+ priv->disable_tags_autocompletion = FALSE;
+ priv->keep_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]