gthumb r2357 - in trunk: . data data/glade libgthumb src
- From: mjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gthumb r2357 - in trunk: . data data/glade libgthumb src
- Date: Fri, 25 Jul 2008 17:21:24 +0000 (UTC)
Author: mjc
Date: Fri Jul 25 17:21:23 2008
New Revision: 2357
URL: http://svn.gnome.org/viewvc/gthumb?rev=2357&view=rev
Log:
2008-07-25 Michael J. Chudobiak <mjc svn gnome org>
* data/gthumb.schemas.in: The default web album theme did not
exist any longer (Clean). Set it to an existing theme (Wiki).
* data/glade/gthumb_web_exporter.glade:
* libgthumb/gtk-utils.c: (_gtk_button_set_filename_label),
(_gtk_button_get_filename_label):
* libgthumb/gtk-utils.h:
* src/dlg-web-exporter.c: (export), (get_default_theme),
(dlg_web_exporter), (theme_dialog__ok_clicked), (load_themes):
Made the UI for selecting a web album theme more obvious.
Patch by Christophe Bisiere, bug #501570.
Also, fall back to the default theme when the theme stored in
gconf does not actually exist.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/data/glade/gthumb_web_exporter.glade
trunk/data/gthumb.schemas.in
trunk/libgthumb/gtk-utils.c
trunk/libgthumb/gtk-utils.h
trunk/src/dlg-web-exporter.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Jul 25 17:21:23 2008
@@ -33,6 +33,7 @@
* Bug #402942 - Add status message during photo import (orientation
adjust step)
* Added preference to ignore audio and video files. Bug #467468.
+ * Made UI for selecting a web album theme more obvious. Bug #501570.
Bugfixes:
Modified: trunk/data/glade/gthumb_web_exporter.glade
==============================================================================
--- trunk/data/glade/gthumb_web_exporter.glade (original)
+++ trunk/data/glade/gthumb_web_exporter.glade Fri Jul 25 17:21:23 2008
@@ -526,25 +526,6 @@
<property name="spacing">5</property>
<child>
- <widget class="GtkEntry" id="wa_theme_combo_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
<widget class="GtkButton" id="wa_select_theme_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -555,10 +536,35 @@
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkLabel" id="label124">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><small><i><b>Note:</b> click to customize.</i></small></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="left_attach">2</property>
@@ -569,7 +575,7 @@
<property name="y_options">fill</property>
</packing>
</child>
-
+
<child>
<widget class="GtkCheckButton" id="wa_copy_images_checkbutton">
<property name="visible">True</property>
Modified: trunk/data/gthumb.schemas.in
==============================================================================
--- trunk/data/gthumb.schemas.in (original)
+++ trunk/data/gthumb.schemas.in Fri Jul 25 17:21:23 2008
@@ -1786,7 +1786,7 @@
<applyto>/apps/gthumb/dialogs/web_album/theme</applyto>
<owner>gthumb</owner>
<type>string</type>
- <default>Clean</default>
+ <default>Wiki</default>
<locale name="C">
<short></short>
<long>
Modified: trunk/libgthumb/gtk-utils.c
==============================================================================
--- trunk/libgthumb/gtk-utils.c (original)
+++ trunk/libgthumb/gtk-utils.c Fri Jul 25 17:21:23 2008
@@ -791,6 +791,36 @@
}
+void
+_gtk_button_set_filename_label (GtkButton *button,
+ const char *text)
+{
+ char *utf8_text;
+
+ if (text == NULL)
+ text = "";
+ utf8_text = get_utf8_display_name_from_uri (text);
+ gtk_button_set_label (button, utf8_text);
+ g_free (utf8_text);
+}
+
+
+char *
+_gtk_button_get_filename_label (GtkButton *button)
+{
+ const char *utf8_text;
+ char *text;
+
+ utf8_text = gtk_button_get_label (button);
+ if (utf8_text == NULL)
+ return NULL;
+
+ text = gnome_vfs_escape_string (utf8_text);
+
+ return text;
+}
+
+
gboolean
exec_command (const char *application,
GList *file_list)
Modified: trunk/libgthumb/gtk-utils.h
==============================================================================
--- trunk/libgthumb/gtk-utils.h (original)
+++ trunk/libgthumb/gtk-utils.h Fri Jul 25 17:21:23 2008
@@ -100,6 +100,11 @@
char * _gtk_label_get_filename_text (GtkLabel *label);
+void _gtk_button_set_filename_label (GtkButton *button,
+ const char *text);
+
+char * _gtk_button_get_filename_label (GtkButton *button);
+
gboolean exec_command (const char *application,
GList *file_list);
Modified: trunk/src/dlg-web-exporter.c
==============================================================================
--- trunk/src/dlg-web-exporter.c (original)
+++ trunk/src/dlg-web-exporter.c Fri Jul 25 17:21:23 2008
@@ -95,7 +95,6 @@
GtkWidget *wa_header_entry;
GtkWidget *wa_footer_entry;
- GtkWidget *wa_theme_combo_entry;
GtkWidget *wa_theme_combo;
GtkWidget *wa_select_theme_button;
@@ -171,7 +170,7 @@
footer = gtk_entry_get_text (GTK_ENTRY (data->wa_footer_entry));
eel_gconf_set_string (PREF_WEB_ALBUM_FOOTER, footer);
- theme = _gtk_entry_get_filename_text (GTK_ENTRY (data->wa_theme_combo_entry));
+ theme = _gtk_button_get_filename_label (GTK_BUTTON (data->wa_select_theme_button));
eel_gconf_set_string (PREF_WEB_ALBUM_THEME, theme);
if (strcmp (theme, "") == 0) {
@@ -350,27 +349,39 @@
get_default_theme (void)
{
char *current_theme;
- char *theme_dir;
+ char *local_theme_dir;
+ char *system_theme_dir;
gboolean found = FALSE;
current_theme = eel_gconf_get_string (PREF_WEB_ALBUM_THEME, DEFAULT_ALBUM_THEME);
- theme_dir = g_build_path (G_DIR_SEPARATOR_S,
- g_get_home_dir (),
- ".gnome2",
- "gthumb/albumthemes",
- NULL);
- found = theme_present (current_theme, theme_dir);
+ local_theme_dir = g_build_path (G_DIR_SEPARATOR_S,
+ g_get_home_dir (),
+ ".gnome2",
+ "gthumb/albumthemes",
+ NULL);
+ found = theme_present (current_theme, local_theme_dir);
+
if (!found) {
- g_free (theme_dir);
- theme_dir = g_build_path (G_DIR_SEPARATOR_S,
- GTHUMB_DATADIR,
- "gthumb/albumthemes",
- NULL);
- found = theme_present (current_theme, theme_dir);
+ system_theme_dir = g_build_path (G_DIR_SEPARATOR_S,
+ GTHUMB_DATADIR,
+ "gthumb/albumthemes",
+ NULL);
+ found = theme_present (current_theme, system_theme_dir);
}
- g_free (theme_dir);
+ if (!found) {
+ g_free (current_theme);
+ current_theme = g_strdup (DEFAULT_ALBUM_THEME);
+ found = theme_present (current_theme, local_theme_dir);
+ }
+
+ if (!found) {
+ found = theme_present (current_theme, system_theme_dir);
+ }
+
+ g_free (local_theme_dir);
+ g_free (system_theme_dir);
if (! found) {
g_free (current_theme);
@@ -439,7 +450,6 @@
data->wa_header_entry = glade_xml_get_widget (data->gui, "wa_header_entry");
data->wa_footer_entry = glade_xml_get_widget (data->gui, "wa_footer_entry");
- data->wa_theme_combo_entry = glade_xml_get_widget (data->gui, "wa_theme_combo_entry");
data->wa_select_theme_button = glade_xml_get_widget (data->gui, "wa_select_theme_button");
/**/
@@ -508,8 +518,8 @@
gtk_entry_set_text (GTK_ENTRY (data->wa_footer_entry), svalue);
g_free (svalue);
- svalue =get_default_theme();
- _gtk_entry_set_filename_text (GTK_ENTRY (data->wa_theme_combo_entry), svalue);
+ svalue = get_default_theme();
+ _gtk_button_set_filename_label (GTK_BUTTON (data->wa_select_theme_button), svalue);
g_free (svalue);
catalog_web_exporter_set_index_caption (data->exporter, eel_gconf_get_integer (PREF_WEB_ALBUM_INDEX_CAPTION, 0));
@@ -650,7 +660,7 @@
&iter,
THEME_NAME_COLUMN, &utf8_name,
-1);
- gtk_entry_set_text (GTK_ENTRY (tdata->data->wa_theme_combo_entry), utf8_name);
+ gtk_button_set_label (GTK_BUTTON (tdata->data->wa_select_theme_button), utf8_name);
g_free (utf8_name);
}
@@ -731,7 +741,7 @@
model = GTK_TREE_MODEL (tdata->list_store);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tdata->wat_theme_treeview));
- theme_name = gtk_entry_get_text (GTK_ENTRY (tdata->data->wa_theme_combo_entry));
+ theme_name = gtk_button_get_label (GTK_BUTTON (tdata->data->wa_select_theme_button));
if (! gtk_tree_model_get_iter_first (model, &iter))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]