[gthumb] Show keywords in fullscreen view, re-organize preference dialog
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Show keywords in fullscreen view, re-organize preference dialog
- Date: Tue, 5 May 2009 08:06:29 -0400 (EDT)
commit bc913519d5c5610286b10c13662b6120d6c1ceb4
Author: Jef Driesen <jefdriesen hotmail com>
Date: Tue May 5 08:04:40 2009 -0400
Show keywords in fullscreen view, re-organize preference dialog
Bug 581183.
---
data/glade/gthumb_preferences.glade | 12 ++++++------
src/gth-fullscreen.c | 22 +++++++++++++++++++---
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/data/glade/gthumb_preferences.glade b/data/glade/gthumb_preferences.glade
index 69c16e6..8fb875c 100644
--- a/data/glade/gthumb_preferences.glade
+++ b/data/glade/gthumb_preferences.glade
@@ -906,10 +906,10 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkCheckButton" id="toggle_show_filenames">
+ <widget class="GtkCheckButton" id="toggle_show_thumbs">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">_Filenames</property>
+ <property name="label" translatable="yes">_Thumbnails</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@@ -944,10 +944,10 @@
</child>
<child>
- <widget class="GtkCheckButton" id="toggle_show_thumbs">
+ <widget class="GtkCheckButton" id="toggle_show_categories">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">_Thumbnails</property>
+ <property name="label" translatable="yes">C_ategories</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@@ -963,10 +963,10 @@
</child>
<child>
- <widget class="GtkCheckButton" id="toggle_show_categories">
+ <widget class="GtkCheckButton" id="toggle_show_filenames">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">C_ategories</property>
+ <property name="label" translatable="yes">_Filenames</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
diff --git a/src/gth-fullscreen.c b/src/gth-fullscreen.c
index fbfa977..731f934 100644
--- a/src/gth-fullscreen.c
+++ b/src/gth-fullscreen.c
@@ -900,7 +900,7 @@ show_comment_on_image (GthFullscreen *fullscreen)
GthFullscreenPrivateData *priv = fullscreen->priv;
ImageViewer *viewer = (ImageViewer*) priv->viewer;
CommentData *cdata = NULL;
- char *comment, *e_comment, *file_info;
+ char *comment, *e_comment, *keywords, *e_keywords, *file_info;
char *marked_text, *parsed_text;
PangoLayout *layout;
PangoAttrList *attr_list = NULL;
@@ -928,21 +928,37 @@ show_comment_on_image (GthFullscreen *fullscreen)
priv->comment_visible = TRUE;
comment = NULL;
+ keywords = NULL;
if (cdata != NULL) {
comment = comments_get_comment_as_string (cdata, "\n", " - ");
+ keywords = comments_get_categories_as_string (cdata, ", ");
comment_data_free (cdata);
}
file_info = get_file_info (fullscreen);
- if (comment == NULL)
+ if (comment == NULL && keywords == NULL) {
marked_text = g_strdup (file_info);
- else {
+ } else if (comment == NULL) {
+ e_keywords = g_markup_escape_text (keywords, -1);
+ marked_text = g_strdup_printf ("%s\n\n%s",
+ e_keywords,
+ file_info);
+ g_free (e_keywords);
+ } else if (keywords == NULL) {
e_comment = g_markup_escape_text (comment, -1);
marked_text = g_strdup_printf ("<b>%s</b>\n\n%s",
e_comment,
file_info);
g_free (e_comment);
+ } else {
+ e_comment = g_markup_escape_text (comment, -1);
+ e_keywords = g_markup_escape_text (keywords, -1);
+ marked_text = g_strdup_printf ("<b>%s</b>\n\n%s\n\n%s",
+ e_comment, e_keywords,
+ file_info);
+ g_free (e_comment);
+ g_free (e_keywords);
}
g_free (file_info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]