[gthumb: 5/20] added a thumbnail pane in viewer mode
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 5/20] added a thumbnail pane in viewer mode
- Date: Tue, 30 Mar 2010 19:32:33 +0000 (UTC)
commit 44c2b178224337b081f1492c733282a01a171ed5
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Mar 28 14:32:53 2010 +0200
added a thumbnail pane in viewer mode
[bug #533132]
data/gthumb.schemas.in | 13 ++
gthumb/gth-browser-actions-callbacks.c | 8 +
gthumb/gth-browser-actions-callbacks.h | 1 +
gthumb/gth-browser-actions-entries.h | 5 +
gthumb/gth-browser-ui.h | 3 +
gthumb/gth-browser.c | 251 +++++++++++++++++++++++++-------
gthumb/gth-browser.h | 1 +
gthumb/gth-preferences.h | 1 +
8 files changed, 227 insertions(+), 56 deletions(-)
---
diff --git a/data/gthumb.schemas.in b/data/gthumb.schemas.in
index 4338f54..2d57a14 100644
--- a/data/gthumb.schemas.in
+++ b/data/gthumb.schemas.in
@@ -467,6 +467,19 @@
</schema>
<schema>
+ <key>/schemas/apps/gthumb/ui/thumbnail_list_visible</key>
+ <applyto>/apps/gthumb/ui/thumbnail_list_visible</applyto>
+ <owner>gthumb</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short></short>
+ <long>
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/gthumb/ui/sidebar_width</key>
<applyto>/apps/gthumb/ui/sidebar_width</applyto>
<owner>gthumb</owner>
diff --git a/gthumb/gth-browser-actions-callbacks.c b/gthumb/gth-browser-actions-callbacks.c
index c0f0aef..b18c889 100644
--- a/gthumb/gth-browser-actions-callbacks.c
+++ b/gthumb/gth-browser-actions-callbacks.c
@@ -240,6 +240,14 @@ gth_browser_activate_action_view_sidebar (GtkAction *action,
void
+gth_browser_activate_action_view_thumbnail_list (GtkAction *action,
+ GthBrowser *browser)
+{
+ eel_gconf_set_boolean (PREF_UI_THUMBNAIL_LIST_VISIBLE, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
+}
+
+
+void
gth_browser_activate_action_view_stop (GtkAction *action,
GthBrowser *browser)
{
diff --git a/gthumb/gth-browser-actions-callbacks.h b/gthumb/gth-browser-actions-callbacks.h
index ec99f09..303c464 100644
--- a/gthumb/gth-browser-actions-callbacks.h
+++ b/gthumb/gth-browser-actions-callbacks.h
@@ -59,6 +59,7 @@ DEFINE_ACTION(gth_browser_activate_action_view_toolbar)
DEFINE_ACTION(gth_browser_activate_action_view_show_hidden_files)
DEFINE_ACTION(gth_browser_activate_action_view_statusbar)
DEFINE_ACTION(gth_browser_activate_action_view_sidebar)
+DEFINE_ACTION(gth_browser_activate_action_view_thumbnail_list)
DEFINE_ACTION(gth_browser_activate_action_view_stop)
DEFINE_ACTION(gth_browser_activate_action_view_reload)
DEFINE_ACTION(gth_browser_activate_action_view_next)
diff --git a/gthumb/gth-browser-actions-entries.h b/gthumb/gth-browser-actions-entries.h
index 9f8a334..717e946 100644
--- a/gthumb/gth-browser-actions-entries.h
+++ b/gthumb/gth-browser-actions-entries.h
@@ -196,6 +196,11 @@ static GtkToggleActionEntry gth_browser_action_toggle_entries[] = {
N_("View or hide the sidebar of this window"),
G_CALLBACK (gth_browser_activate_action_view_sidebar),
TRUE },
+ { "View_Thumbnail_List", NULL,
+ N_("_Thumbnails"), "F8",
+ N_("View or hide the thumbnails in viewer mode"),
+ G_CALLBACK (gth_browser_activate_action_view_thumbnail_list),
+ TRUE },
{ "View_Thumbnails", NULL,
N_("_Thumbnails"), "<control>T",
N_("View thumbnails"),
diff --git a/gthumb/gth-browser-ui.h b/gthumb/gth-browser-ui.h
index 35e20b5..24b3b70 100644
--- a/gthumb/gth-browser-ui.h
+++ b/gthumb/gth-browser-ui.h
@@ -233,6 +233,9 @@ static const char *viewer_ui_info =
"<ui>"
" <menubar name='MenuBar'>"
" <menu name='View' action='ViewMenu'>"
+" <placeholder name='View_Bars'>"
+" <menuitem action='View_Thumbnail_List'/>"
+" </placeholder>"
" <placeholder name='Folder_Actions'>"
" <menuitem action='View_BrowserMode'/>"
" </placeholder>"
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 542d270..b9ecfb4 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -63,7 +63,7 @@
#define GO_FORWARD_HISTORY_POPUP "/GoForwardHistoryPopup"
#define GO_PARENT_POPUP "/GoParentPopup"
#define MAX_HISTORY_LENGTH 15
-#define GCONF_NOTIFICATIONS 11
+#define GCONF_NOTIFICATIONS 12
#define DEF_SIDEBAR_WIDTH 255
#define DEF_VIEWER_SIDEBAR_WIDTH 295
#define DEF_PROPERTIES_HEIGHT 128
@@ -100,8 +100,11 @@ struct _GthBrowserPrivateData {
GtkWidget *list_extra_widget;
GtkWidget *file_properties;
+ GtkWidget *thumbnail_list;
+
GList *viewer_pages;
- GtkWidget *viewer_pane;
+ GtkWidget *viewer_thumbnails_pane;
+ GtkWidget *viewer_sidebar_pane;
GtkWidget *viewer_sidebar;
GtkWidget *viewer_container;
GtkWidget *viewer_toolbar;
@@ -520,6 +523,7 @@ gth_browser_update_sensitivity (GthBrowser *browser)
_gth_browser_set_action_sensitive (browser, "View_Stop", browser->priv->fullscreen || (browser->priv->activity_ref > 0));
_gth_browser_set_action_sensitive (browser, "View_Prev", current_file_pos > 0);
_gth_browser_set_action_sensitive (browser, "View_Next", (current_file_pos != -1) && (current_file_pos < n_files - 1));
+ _gth_browser_set_action_sensitive (browser, "View_Thumbnail_List", gth_window_get_current_page (GTH_WINDOW (browser)) == GTH_BROWSER_PAGE_VIEWER);
gth_sidebar_update_sensitivity (GTH_SIDEBAR (browser->priv->viewer_sidebar));
if (browser->priv->viewer_page != NULL)
@@ -1157,6 +1161,9 @@ _gth_browser_set_sort_order (GthBrowser *browser,
gth_file_list_set_sort_func (GTH_FILE_LIST (browser->priv->file_list),
sort_type->cmp_func,
inverse);
+ gth_file_list_set_sort_func (GTH_FILE_LIST (browser->priv->thumbnail_list), /* FIXME */
+ sort_type->cmp_func,
+ inverse);
gth_browser_update_title (browser);
if (! browser->priv->constructed)
@@ -1380,6 +1387,8 @@ load_data_continue (LoadData *load_data,
filter = _gth_browser_get_file_filter (browser);
gth_file_list_set_filter (GTH_FILE_LIST (browser->priv->file_list), filter);
gth_file_list_set_files (GTH_FILE_LIST (browser->priv->file_list), files);
+ gth_file_list_set_filter (GTH_FILE_LIST (browser->priv->thumbnail_list), filter); /* FIXME */
+ gth_file_list_set_files (GTH_FILE_LIST (browser->priv->thumbnail_list), files); /* FIXME */
g_object_unref (filter);
break;
default:
@@ -1840,7 +1849,7 @@ _gth_browser_close_final_step (gpointer user_data)
if (pos > 0)
eel_gconf_set_integer (PREF_UI_BROWSER_SIDEBAR_WIDTH, pos);
- pos = _gtk_paned_get_position2 (GTK_PANED (browser->priv->viewer_pane));
+ pos = _gtk_paned_get_position2 (GTK_PANED (browser->priv->viewer_sidebar_pane));
if (pos > 0)
eel_gconf_set_integer (PREF_UI_VIEWER_SIDEBAR_WIDTH, pos);
@@ -2029,6 +2038,7 @@ _gth_browser_real_set_current_page (GthWindow *window,
gth_hook_invoke ("gth-browser-set-current-page", browser);
gth_browser_update_title (browser);
+ gth_browser_update_sensitivity (browser);
}
@@ -2353,6 +2363,7 @@ filterbar_changed_cb (GthFilterbar *filterbar,
filter = _gth_browser_get_file_filter (browser);
gth_file_list_set_filter (GTH_FILE_LIST (browser->priv->file_list), filter);
+ gth_file_list_set_filter (GTH_FILE_LIST (browser->priv->thumbnail_list), filter); /* FIXME */
g_object_unref (filter);
_gth_browser_update_statusbar_list_info (browser);
@@ -2403,13 +2414,17 @@ file_attributes_ready_cb (GthFileSource *file_source,
if (monitor_data->update_file_list) {
gth_file_list_add_files (GTH_FILE_LIST (browser->priv->file_list), files);
gth_file_list_update_files (GTH_FILE_LIST (browser->priv->file_list), files);
+ gth_file_list_add_files (GTH_FILE_LIST (browser->priv->thumbnail_list), files);
+ gth_file_list_update_files (GTH_FILE_LIST (browser->priv->thumbnail_list), files);
}
}
else if (monitor_data->event == GTH_MONITOR_EVENT_CHANGED) {
if (monitor_data->update_folder_tree)
gth_folder_tree_update_children (GTH_FOLDER_TREE (browser->priv->folder_tree), monitor_data->parent, visible_folders);
- if (monitor_data->update_file_list)
+ if (monitor_data->update_file_list) {
gth_file_list_update_files (GTH_FILE_LIST (browser->priv->file_list), files);
+ gth_file_list_update_files (GTH_FILE_LIST (browser->priv->thumbnail_list), files);
+ }
}
if (browser->priv->current_file != NULL) {
@@ -2567,6 +2582,7 @@ folder_changed_cb (GthMonitor *monitor,
if (current_file_deleted)
g_signal_handlers_block_by_data (gth_browser_get_file_list_view (browser), browser);
gth_file_list_delete_files (GTH_FILE_LIST (browser->priv->file_list), list);
+ gth_file_list_delete_files (GTH_FILE_LIST (browser->priv->thumbnail_list), list);
if (current_file_deleted)
g_signal_handlers_unblock_by_data (gth_browser_get_file_list_view (browser), browser);
}
@@ -2628,6 +2644,7 @@ renamed_file_attributes_ready_cb (GthFileSource *file_source,
gth_folder_tree_update_child (GTH_FOLDER_TREE (browser->priv->folder_tree), rename_data->file, file_data);
gth_file_list_rename_file (GTH_FILE_LIST (browser->priv->file_list), rename_data->file, file_data);
+ gth_file_list_rename_file (GTH_FILE_LIST (browser->priv->thumbnail_list), rename_data->file, file_data);
if (g_file_equal (rename_data->file, browser->priv->location->file)) {
GthFileData *new_location;
@@ -2771,6 +2788,7 @@ pref_general_filter_changed (GConfClient *client,
filter = _gth_browser_get_file_filter (browser);
gth_file_list_set_filter (GTH_FILE_LIST (browser->priv->file_list), filter);
+ gth_file_list_set_filter (GTH_FILE_LIST (browser->priv->thumbnail_list), filter);
g_object_unref (filter);
}
@@ -2861,6 +2879,33 @@ gth_file_view_selection_changed_cb (GtkIconView *iconview,
static void
+gth_thumbnail_view_selection_changed_cb (GtkIconView *iconview,
+ gpointer user_data)
+{
+ GthBrowser *browser = user_data;
+ int n_selected;
+
+ if (gth_window_get_current_page (GTH_WINDOW (browser)) != GTH_BROWSER_PAGE_VIEWER)
+ return;
+
+ n_selected = gth_file_selection_get_n_selected (GTH_FILE_SELECTION (gth_browser_get_thumbnail_list_view (browser)));
+ if (n_selected == 1) {
+ GList *items;
+ GList *file_list;
+ GthFileData *selected_file_data;
+
+ items = gth_file_selection_get_selected (GTH_FILE_SELECTION (gth_browser_get_thumbnail_list_view (browser)));
+ file_list = gth_file_list_get_files (GTH_FILE_LIST (gth_browser_get_file_list (browser)), items);
+ selected_file_data = (GthFileData *) file_list->data;
+ gth_browser_load_file (browser, selected_file_data, FALSE);
+
+ _g_object_list_unref (file_list);
+ _gtk_tree_path_list_free (items);
+ }
+}
+
+
+static void
gth_file_view_item_activated_cb (GtkIconView *iconview,
GtkTreePath *path,
gpointer user_data)
@@ -3116,6 +3161,109 @@ pref_ui_sidebar_visible_changed (GConfClient *client,
static void
+_gth_browser_make_file_visible (GthBrowser *browser,
+ GthFileData *file_data)
+{
+ int file_pos;
+ GtkWidget *view;
+ GthVisibility visibility;
+
+ if (file_data == NULL)
+ return;
+
+ file_pos = gth_file_store_get_pos (GTH_FILE_STORE (gth_browser_get_file_store (browser)), file_data->file);
+ if (file_pos < 0)
+ return;
+
+ view = gth_browser_get_file_list_view (browser);
+ g_signal_handlers_block_by_func (view, gth_file_view_selection_changed_cb, browser);
+ gth_file_selection_unselect_all (GTH_FILE_SELECTION (view));
+ gth_file_selection_select (GTH_FILE_SELECTION (view), file_pos);
+ gth_file_view_set_cursor (GTH_FILE_VIEW (view), file_pos);
+ gth_hook_invoke ("gth-browser-selection-changed", browser);
+ g_signal_handlers_unblock_by_func (view, gth_file_view_selection_changed_cb, browser);
+ visibility = gth_file_view_get_visibility (GTH_FILE_VIEW (view), file_pos);
+ if (visibility != GTH_VISIBILITY_FULL) {
+ double align;
+
+ switch (visibility) {
+ case GTH_VISIBILITY_NONE:
+ case GTH_VISIBILITY_FULL:
+ case GTH_VISIBILITY_PARTIAL:
+ align = 0.5;
+ break;
+
+ case GTH_VISIBILITY_PARTIAL_TOP:
+ align = 0.0;
+ break;
+
+ case GTH_VISIBILITY_PARTIAL_BOTTOM:
+ align = 1.0;
+ break;
+ }
+ gth_file_view_scroll_to (GTH_FILE_VIEW (view), file_pos, align);
+ }
+
+ /* FIXME */
+
+ view = gth_browser_get_thumbnail_list_view (browser);
+ g_signal_handlers_block_by_func (view, gth_thumbnail_view_selection_changed_cb, browser);
+ gth_file_selection_unselect_all (GTH_FILE_SELECTION (view));
+ gth_file_selection_select (GTH_FILE_SELECTION (view), file_pos);
+ gth_file_view_set_cursor (GTH_FILE_VIEW (view), file_pos);
+ g_signal_handlers_unblock_by_func (view, gth_thumbnail_view_selection_changed_cb, browser);
+ visibility = gth_file_view_get_visibility (GTH_FILE_VIEW (view), file_pos);
+ if (visibility != GTH_VISIBILITY_FULL) {
+ double align;
+
+ switch (visibility) {
+ case GTH_VISIBILITY_NONE:
+ case GTH_VISIBILITY_FULL:
+ case GTH_VISIBILITY_PARTIAL:
+ align = 0.5;
+ break;
+
+ case GTH_VISIBILITY_PARTIAL_TOP:
+ align = 0.0;
+ break;
+
+ case GTH_VISIBILITY_PARTIAL_BOTTOM:
+ align = 1.0;
+ break;
+ }
+ gth_file_view_scroll_to (GTH_FILE_VIEW (view), file_pos, align);
+ }
+}
+
+
+static void
+_gth_browser_set_thumbnail_list_visibility (GthBrowser *browser,
+ gboolean visible)
+{
+ g_return_if_fail (browser != NULL);
+
+ _gth_browser_set_action_active (browser, "View_Thumbnail_List", visible);
+ if (visible) {
+ gtk_widget_show (browser->priv->thumbnail_list);
+ _gth_browser_make_file_visible (browser, browser->priv->current_file);
+ }
+ else
+ gtk_widget_hide (browser->priv->thumbnail_list);
+}
+
+
+static void
+pref_ui_thumbnail_list_visible_changed (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
+{
+ GthBrowser *browser = user_data;
+ _gth_browser_set_thumbnail_list_visibility (browser, gconf_value_get_bool (gconf_entry_get_value (entry)));
+}
+
+
+static void
pref_show_hidden_files_changed (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
@@ -3297,16 +3445,32 @@ _gth_browser_construct (GthBrowser *browser)
/* content */
- browser->priv->viewer_pane = gtk_hpaned_new ();
- gtk_widget_show (browser->priv->viewer_pane);
- gth_window_attach_content (GTH_WINDOW (browser), GTH_BROWSER_PAGE_VIEWER, browser->priv->viewer_pane);
+ browser->priv->viewer_thumbnails_pane = gtk_vpaned_new ();
+ gtk_widget_show (browser->priv->viewer_thumbnails_pane);
+ gth_window_attach_content (GTH_WINDOW (browser), GTH_BROWSER_PAGE_VIEWER, browser->priv->viewer_thumbnails_pane);
+
+ browser->priv->viewer_sidebar_pane = gtk_hpaned_new ();
+ gtk_widget_show (browser->priv->viewer_sidebar_pane);
+ gtk_paned_pack1 (GTK_PANED (browser->priv->viewer_thumbnails_pane), browser->priv->viewer_sidebar_pane, TRUE, TRUE);
browser->priv->viewer_container = gtk_alignment_new (0.0, 0.0, 1.0, 1.0);
gtk_widget_show (browser->priv->viewer_container);
- gtk_paned_pack1 (GTK_PANED (browser->priv->viewer_pane), browser->priv->viewer_container, TRUE, TRUE);
+ gtk_paned_pack1 (GTK_PANED (browser->priv->viewer_sidebar_pane), browser->priv->viewer_container, TRUE, TRUE);
browser->priv->viewer_sidebar = gth_sidebar_new ("file-tools");
- gtk_paned_pack2 (GTK_PANED (browser->priv->viewer_pane), browser->priv->viewer_sidebar, FALSE, TRUE);
+ gtk_paned_pack2 (GTK_PANED (browser->priv->viewer_sidebar_pane), browser->priv->viewer_sidebar, FALSE, TRUE);
+
+ {
+ /* FIXME */
+
+ browser->priv->thumbnail_list = gth_file_list_new (GTH_FILE_LIST_TYPE_THUMBNAIL);
+ gth_file_list_set_caption (GTH_FILE_LIST (browser->priv->thumbnail_list), "none");
+ gth_file_view_set_spacing (GTH_FILE_VIEW (gth_file_list_get_view (GTH_FILE_LIST (browser->priv->thumbnail_list))), 0);
+ gth_file_list_set_thumb_size (GTH_FILE_LIST (browser->priv->thumbnail_list), 95);
+ gtk_paned_pack2 (GTK_PANED (browser->priv->viewer_thumbnails_pane), browser->priv->thumbnail_list, FALSE, FALSE);
+
+ _gth_browser_set_thumbnail_list_visibility (browser, eel_gconf_get_boolean (PREF_UI_THUMBNAIL_LIST_VISIBLE, TRUE));
+ }
/* -- browser page -- */
@@ -3460,6 +3624,7 @@ _gth_browser_construct (GthBrowser *browser)
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, DEFAULT_THUMBNAIL_CAPTION);
gth_file_list_set_caption (GTH_FILE_LIST (browser->priv->file_list), caption);
+
g_free (caption);
gtk_widget_show (browser->priv->file_list);
@@ -3482,6 +3647,13 @@ _gth_browser_construct (GthBrowser *browser)
G_CALLBACK (gth_file_list_key_press_cb),
browser);
+ /* FIXME */
+
+ g_signal_connect (G_OBJECT (gth_file_list_get_view (GTH_FILE_LIST (browser->priv->thumbnail_list))),
+ "selection_changed",
+ G_CALLBACK (gth_thumbnail_view_selection_changed_cb),
+ browser);
+
browser->priv->file_list_popup = gtk_ui_manager_get_widget (browser->priv->ui, "/FileListPopup");
/* the filter bar */
@@ -3542,7 +3714,7 @@ _gth_browser_construct (GthBrowser *browser)
browser->priv->file_popup = gtk_ui_manager_get_widget (browser->priv->ui, "/FilePopup");
- _gtk_paned_set_position2 (GTK_PANED (browser->priv->viewer_pane), eel_gconf_get_integer (PREF_UI_VIEWER_SIDEBAR_WIDTH, DEF_VIEWER_SIDEBAR_WIDTH));
+ _gtk_paned_set_position2 (GTK_PANED (browser->priv->viewer_sidebar_pane), eel_gconf_get_integer (PREF_UI_VIEWER_SIDEBAR_WIDTH, DEF_VIEWER_SIDEBAR_WIDTH));
_gtk_paned_set_position2 (GTK_PANED (browser->priv->browser_sidebar), eel_gconf_get_integer (PREF_UI_PROPERTIES_HEIGHT, DEF_PROPERTIES_HEIGHT));
_gth_browser_set_sidebar_visibility (browser, eel_gconf_get_boolean (PREF_UI_SIDEBAR_VISIBLE, TRUE));
@@ -3591,6 +3763,10 @@ _gth_browser_construct (GthBrowser *browser)
pref_ui_sidebar_visible_changed,
browser);
browser->priv->cnxn_id[i++] = eel_gconf_notification_add (
+ PREF_UI_THUMBNAIL_LIST_VISIBLE,
+ pref_ui_thumbnail_list_visible_changed,
+ browser);
+ browser->priv->cnxn_id[i++] = eel_gconf_notification_add (
PREF_SHOW_HIDDEN_FILES,
pref_show_hidden_files_changed,
browser);
@@ -3820,6 +3996,13 @@ gth_browser_get_file_list_view (GthBrowser *browser)
}
+GtkWidget *
+gth_browser_get_thumbnail_list_view (GthBrowser *browser)
+{
+ return gth_file_list_get_view (GTH_FILE_LIST (browser->priv->thumbnail_list));
+}
+
+
GthFileSource *
gth_browser_get_location_source (GthBrowser *browser)
{
@@ -4413,50 +4596,6 @@ gth_viewer_page_file_loaded_cb (GthViewerPage *viewer_page,
static void
-_gth_browser_make_file_visible (GthBrowser *browser,
- GthFileData *file_data)
-{
- int file_pos;
- GtkWidget *view;
- GthVisibility visibility;
-
- file_pos = gth_file_store_get_pos (GTH_FILE_STORE (gth_browser_get_file_store (browser)), file_data->file);
- if (file_pos < 0)
- return;
-
- view = gth_browser_get_file_list_view (browser);
- g_signal_handlers_block_by_func (gth_browser_get_file_list_view (browser), gth_file_view_selection_changed_cb, browser);
- gth_file_selection_unselect_all (GTH_FILE_SELECTION (view));
- gth_file_selection_select (GTH_FILE_SELECTION (view), file_pos);
- gth_file_view_set_cursor (GTH_FILE_VIEW (view), file_pos);
- gth_hook_invoke ("gth-browser-selection-changed", browser);
- g_signal_handlers_unblock_by_func (gth_browser_get_file_list_view (browser), gth_file_view_selection_changed_cb, browser);
-
- visibility = gth_file_view_get_visibility (GTH_FILE_VIEW (view), file_pos);
- if (visibility != GTH_VISIBILITY_FULL) {
- double align;
-
- switch (visibility) {
- case GTH_VISIBILITY_NONE:
- case GTH_VISIBILITY_FULL:
- case GTH_VISIBILITY_PARTIAL:
- align = 0.5;
- break;
-
- case GTH_VISIBILITY_PARTIAL_TOP:
- align = 0.0;
- break;
-
- case GTH_VISIBILITY_PARTIAL_BOTTOM:
- align = 1.0;
- break;
- }
- gth_file_view_scroll_to (GTH_FILE_VIEW (view), file_pos, align);
- }
-}
-
-
-static void
file_metadata_ready_cb (GList *files,
GError *error,
gpointer user_data)
@@ -4649,7 +4788,7 @@ gth_browser_show_viewer_properties (GthBrowser *browser,
_gth_browser_set_action_active (browser, "Viewer_Properties", show);
if (show) {
- _gtk_paned_set_position2 (GTK_PANED (browser->priv->viewer_pane), DEF_VIEWER_SIDEBAR_WIDTH);
+ _gtk_paned_set_position2 (GTK_PANED (browser->priv->viewer_sidebar_pane), DEF_VIEWER_SIDEBAR_WIDTH);
_gth_browser_set_action_active (browser, "Viewer_Tools", FALSE);
gtk_widget_show (browser->priv->viewer_sidebar);
gth_sidebar_show_properties (GTH_SIDEBAR (browser->priv->viewer_sidebar));
@@ -4666,7 +4805,7 @@ gth_browser_show_viewer_tools (GthBrowser *browser,
_gth_browser_set_action_active (browser, "Viewer_Tools", show);
if (show) {
- _gtk_paned_set_position2 (GTK_PANED (browser->priv->viewer_pane), DEF_VIEWER_SIDEBAR_WIDTH);
+ _gtk_paned_set_position2 (GTK_PANED (browser->priv->viewer_sidebar_pane), DEF_VIEWER_SIDEBAR_WIDTH);
_gth_browser_set_action_active (browser, "Viewer_Properties", FALSE);
gtk_widget_show (browser->priv->viewer_sidebar);
gth_sidebar_show_tools (GTH_SIDEBAR (browser->priv->viewer_sidebar));
diff --git a/gthumb/gth-browser.h b/gthumb/gth-browser.h
index fafb6bc..0ad78fe 100644
--- a/gthumb/gth-browser.h
+++ b/gthumb/gth-browser.h
@@ -105,6 +105,7 @@ GtkWidget * gth_browser_get_browser_toolbar (GthBrowser *browser);
GtkWidget * gth_browser_get_statusbar (GthBrowser *browser);
GtkWidget * gth_browser_get_file_list (GthBrowser *browser);
GtkWidget * gth_browser_get_file_list_view (GthBrowser *browser);
+GtkWidget * gth_browser_get_thumbnail_list_view(GthBrowser *browser);
GthFileSource * gth_browser_get_location_source (GthBrowser *browser);
GthFileStore * gth_browser_get_file_store (GthBrowser *browser);
GtkWidget * gth_browser_get_folder_tree (GthBrowser *browser);
diff --git a/gthumb/gth-preferences.h b/gthumb/gth-preferences.h
index d602f65..a4e001b 100644
--- a/gthumb/gth-preferences.h
+++ b/gthumb/gth-preferences.h
@@ -68,6 +68,7 @@ G_BEGIN_DECLS
#define PREF_UI_STATUSBAR_VISIBLE "/apps/gthumb/ui/statusbar_visible"
#define PREF_UI_FILTERBAR_VISIBLE "/apps/gthumb/ui/filterbar_visible"
#define PREF_UI_SIDEBAR_VISIBLE "/apps/gthumb/ui/sidebar_visible"
+#define PREF_UI_THUMBNAIL_LIST_VISIBLE "/apps/gthumb/ui/thumbnail_list_visible"
#define PREF_UI_BROWSER_SIDEBAR_WIDTH "/apps/gthumb/ui/browser_sidebar_width"
#define PREF_UI_VIEWER_SIDEBAR_WIDTH "/apps/gthumb/ui/viewer_sidebar_width"
#define PREF_UI_PROPERTIES_HEIGHT "/apps/gthumb/ui/properties_height"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]