[gthumb/ext: 76/79] use a define to specify the default caption



commit 4c283e87fea548f15feb43e4f035115ff340d8b0
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Thu Jul 30 12:44:31 2009 +0200

    use a define to specify the default caption

 gthumb/dlg-preferences.c |    2 +-
 gthumb/gth-browser.c     |    6 +++---
 gthumb/gth-preferences.h |    1 +
 3 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gthumb/dlg-preferences.c b/gthumb/dlg-preferences.c
index c2f03d2..cbfb5c0 100644
--- a/gthumb/dlg-preferences.c
+++ b/gthumb/dlg-preferences.c
@@ -335,7 +335,7 @@ dlg_preferences (GthBrowser *browser)
 
 	/* caption list */
 
-	current_caption = eel_gconf_get_string (PREF_THUMBNAIL_CAPTION, "standard::display-name");
+	current_caption = eel_gconf_get_string (PREF_THUMBNAIL_CAPTION, DEFAULT_THUMBNAIL_CAPTION);
 	active_attributes_v = g_strsplit (current_caption, ",", -1);
 	attributes_v = gth_main_get_metadata_attributes ("*");
 	for (i = 0; attributes_v[i] != NULL; i++) {
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 12b10f8..77f7dd6 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -1278,7 +1278,7 @@ _gth_browser_get_list_attributes (GthBrowser *browser)
 
 	/* attributes required for the thumbnail caption */
 
-	thumbnail_caption = eel_gconf_get_string (PREF_THUMBNAIL_CAPTION, "standard::display-name");
+	thumbnail_caption = eel_gconf_get_string (PREF_THUMBNAIL_CAPTION, DEFAULT_THUMBNAIL_CAPTION);
 	if ((thumbnail_caption[0] != '\0') && (strcmp (thumbnail_caption, "none") != 0)) {
 		g_string_append (attributes, ",");
 		g_string_append (attributes, thumbnail_caption);
@@ -2870,7 +2870,7 @@ pref_thumbnail_caption_changed (GConfClient *client,
 	GthBrowser *browser = user_data;
 	char       *caption;
 
-	caption = eel_gconf_get_string (PREF_THUMBNAIL_CAPTION, "standard::display-name");
+	caption = eel_gconf_get_string (PREF_THUMBNAIL_CAPTION, DEFAULT_THUMBNAIL_CAPTION);
 	gth_file_list_set_caption (GTH_FILE_LIST (browser->priv->file_list), caption);
 
 	if (_gth_browser_reload_required (browser))
@@ -3117,7 +3117,7 @@ _gth_browser_construct (GthBrowser *browser)
 				    FALSE);
 	gth_browser_enable_thumbnails (browser, eel_gconf_get_boolean (PREF_SHOW_THUMBNAILS, TRUE));
 	gth_file_list_set_thumb_size (GTH_FILE_LIST (browser->priv->file_list), eel_gconf_get_integer (PREF_THUMBNAIL_SIZE, DEF_THUMBNAIL_SIZE));
-	caption = eel_gconf_get_string (PREF_THUMBNAIL_CAPTION, "standard::display-name");
+	caption = eel_gconf_get_string (PREF_THUMBNAIL_CAPTION, DEFAULT_THUMBNAIL_CAPTION);
 	gth_file_list_set_caption (GTH_FILE_LIST (browser->priv->file_list), caption);
 	g_free (caption);
 
diff --git a/gthumb/gth-preferences.h b/gthumb/gth-preferences.h
index 26c9dbc..631738b 100644
--- a/gthumb/gth-preferences.h
+++ b/gthumb/gth-preferences.h
@@ -93,6 +93,7 @@ G_BEGIN_DECLS
 
 
 #define DEFAULT_GENERAL_FILTER "file::type::is_media"
+#define DEFAULT_THUMBNAIL_CAPTION "standard::display-name,gth::file::display-size"
 #define DEFAULT_UI_WINDOW_WIDTH 690
 #define DEFAULT_UI_WINDOW_HEIGHT 460
 #define DEFAULT_FAST_FILE_TYPE TRUE



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