[gthumb] added gth_file_list_get_mode renamed GthFileListType
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] added gth_file_list_get_mode renamed GthFileListType
- Date: Fri, 7 Dec 2012 20:09:40 +0000 (UTC)
commit f30c6d6c3cdf5a26061f8abd048fe6e55add59d0
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri Dec 7 20:44:03 2012 +0100
added gth_file_list_get_mode renamed GthFileListType
extensions/catalogs/gth-organize-task.c | 2 +-
extensions/facebook/dlg-export-to-facebook.c | 2 +-
extensions/find_duplicates/gth-find-duplicates.c | 2 +-
extensions/flicker_utils/dlg-export-to-flickr.c | 2 +-
extensions/flicker_utils/dlg-import-from-flickr.c | 2 +-
extensions/photo_importer/dlg-photo-importer.c | 2 +-
extensions/photobucket/dlg-export-to-photobucket.c | 2 +-
extensions/picasaweb/dlg-export-to-picasaweb.c | 2 +-
extensions/picasaweb/dlg-import-from-picasaweb.c | 2 +-
gthumb/gth-browser.c | 14 +++++-----
gthumb/gth-file-list.c | 29 ++++++++++++-------
gthumb/gth-file-list.h | 21 +++++++-------
12 files changed, 45 insertions(+), 37 deletions(-)
---
diff --git a/extensions/catalogs/gth-organize-task.c b/extensions/catalogs/gth-organize-task.c
index 126ce78..b593a16 100644
--- a/extensions/catalogs/gth-organize-task.c
+++ b/extensions/catalogs/gth-organize-task.c
@@ -801,7 +801,7 @@ gth_organize_task_init (GthOrganizeTask *self)
_gtk_widget_get_icon_theme (GET_WIDGET ("organization_treeview")));
g_object_unref (icon);
- self->priv->file_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_TYPE_NORMAL, FALSE);
+ self->priv->file_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_MODE_NORMAL, FALSE);
gth_file_list_set_caption (GTH_FILE_LIST (self->priv->file_list), "standard::display-name");
gtk_widget_show (self->priv->file_list);
gtk_box_pack_start (GTK_BOX (GET_WIDGET ("preview_box")), self->priv->file_list, TRUE, TRUE, 0);
diff --git a/extensions/facebook/dlg-export-to-facebook.c b/extensions/facebook/dlg-export-to-facebook.c
index bbc6e51..6fd71b9 100644
--- a/extensions/facebook/dlg-export-to-facebook.c
+++ b/extensions/facebook/dlg-export-to-facebook.c
@@ -576,7 +576,7 @@ dlg_export_to_facebook (GthBrowser *browser,
/* Set the widget data */
- data->list_view = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_TYPE_NO_SELECTION, FALSE);
+ data->list_view = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_MODE_NO_SELECTION, FALSE);
gth_file_list_set_thumb_size (GTH_FILE_LIST (data->list_view), 112);
gth_file_list_enable_thumbs (GTH_FILE_LIST (data->list_view), TRUE);
gth_file_list_set_ignore_hidden (GTH_FILE_LIST (data->list_view), TRUE);
diff --git a/extensions/find_duplicates/gth-find-duplicates.c b/extensions/find_duplicates/gth-find-duplicates.c
index 5942c01..f073dba 100644
--- a/extensions/find_duplicates/gth-find-duplicates.c
+++ b/extensions/find_duplicates/gth-find-duplicates.c
@@ -1292,7 +1292,7 @@ gth_find_duplicates_exec (GthBrowser *browser,
}
self->priv->builder = _gtk_builder_new_from_file ("find-duplicates-dialog.ui", "find_duplicates");
- self->priv->duplicates_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_TYPE_NORMAL, FALSE);
+ self->priv->duplicates_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_MODE_NORMAL, FALSE);
gtk_tree_model_filter_set_visible_column (GTK_TREE_MODEL_FILTER (GET_WIDGET ("files_treemodelfilter")), FILE_LIST_COLUMN_VISIBLE);
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (GET_WIDGET ("files_liststore")), FILE_LIST_COLUMN_FILENAME, GTK_SORT_ASCENDING);
gth_file_selection_set_selection_mode (GTH_FILE_SELECTION (gth_file_list_get_view (GTH_FILE_LIST (self->priv->duplicates_list))), GTK_SELECTION_MULTIPLE);
diff --git a/extensions/flicker_utils/dlg-export-to-flickr.c b/extensions/flicker_utils/dlg-export-to-flickr.c
index 9847dcf..a15c5c8 100644
--- a/extensions/flicker_utils/dlg-export-to-flickr.c
+++ b/extensions/flicker_utils/dlg-export-to-flickr.c
@@ -606,7 +606,7 @@ dlg_export_to_flickr (FlickrServer *server,
/* Set the widget data */
- data->list_view = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_TYPE_NO_SELECTION, FALSE);
+ data->list_view = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_MODE_NO_SELECTION, FALSE);
gth_file_list_set_thumb_size (GTH_FILE_LIST (data->list_view), 112);
gth_file_list_enable_thumbs (GTH_FILE_LIST (data->list_view), TRUE);
gth_file_list_set_ignore_hidden (GTH_FILE_LIST (data->list_view), TRUE);
diff --git a/extensions/flicker_utils/dlg-import-from-flickr.c b/extensions/flicker_utils/dlg-import-from-flickr.c
index c5da97a..7615fc1 100644
--- a/extensions/flicker_utils/dlg-import-from-flickr.c
+++ b/extensions/flicker_utils/dlg-import-from-flickr.c
@@ -550,7 +550,7 @@ dlg_import_from_flickr (FlickrServer *server,
/* Set the widget data */
- data->file_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_TYPE_NORMAL, FALSE);
+ data->file_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_MODE_NORMAL, FALSE);
thumb_loader = gth_file_list_get_thumb_loader (GTH_FILE_LIST (data->file_list));
gth_thumb_loader_set_use_cache (thumb_loader, FALSE);
gth_thumb_loader_set_loader_func (thumb_loader, flickr_thumbnail_loader);
diff --git a/extensions/photo_importer/dlg-photo-importer.c b/extensions/photo_importer/dlg-photo-importer.c
index 2d1b6e0..c0b523d 100644
--- a/extensions/photo_importer/dlg-photo-importer.c
+++ b/extensions/photo_importer/dlg-photo-importer.c
@@ -625,7 +625,7 @@ dlg_photo_importer (GthBrowser *browser,
gtk_box_pack_start (GTK_BOX (GET_WIDGET ("source_box")), data->folder_chooser, TRUE, TRUE, 0);
}
- data->file_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_TYPE_NORMAL, FALSE);
+ data->file_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_MODE_NORMAL, FALSE);
sort_type = gth_main_get_sort_type ("file::mtime");
gth_file_list_set_sort_func (GTH_FILE_LIST (data->file_list), sort_type->cmp_func, FALSE);
gth_file_list_enable_thumbs (GTH_FILE_LIST (data->file_list), TRUE);
diff --git a/extensions/photobucket/dlg-export-to-photobucket.c b/extensions/photobucket/dlg-export-to-photobucket.c
index 78a5590..1411186 100644
--- a/extensions/photobucket/dlg-export-to-photobucket.c
+++ b/extensions/photobucket/dlg-export-to-photobucket.c
@@ -628,7 +628,7 @@ dlg_export_to_photobucket (GthBrowser *browser,
/* Set the widget data */
- data->list_view = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_TYPE_NO_SELECTION, FALSE);
+ data->list_view = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_MODE_NO_SELECTION, FALSE);
gth_file_list_set_thumb_size (GTH_FILE_LIST (data->list_view), 112);
gth_file_list_enable_thumbs (GTH_FILE_LIST (data->list_view), TRUE);
gth_file_list_set_ignore_hidden (GTH_FILE_LIST (data->list_view), TRUE);
diff --git a/extensions/picasaweb/dlg-export-to-picasaweb.c b/extensions/picasaweb/dlg-export-to-picasaweb.c
index aad8de7..f6bf142 100644
--- a/extensions/picasaweb/dlg-export-to-picasaweb.c
+++ b/extensions/picasaweb/dlg-export-to-picasaweb.c
@@ -1054,7 +1054,7 @@ dlg_export_to_picasaweb (GthBrowser *browser,
/* Set the widget data */
- data->list_view = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_TYPE_NO_SELECTION, FALSE);
+ data->list_view = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_MODE_NO_SELECTION, FALSE);
gth_file_list_set_thumb_size (GTH_FILE_LIST (data->list_view), 112);
gth_file_list_enable_thumbs (GTH_FILE_LIST (data->list_view), TRUE);
gth_file_list_set_ignore_hidden (GTH_FILE_LIST (data->list_view), TRUE);
diff --git a/extensions/picasaweb/dlg-import-from-picasaweb.c b/extensions/picasaweb/dlg-import-from-picasaweb.c
index 6de7f03..8989b9a 100644
--- a/extensions/picasaweb/dlg-import-from-picasaweb.c
+++ b/extensions/picasaweb/dlg-import-from-picasaweb.c
@@ -1021,7 +1021,7 @@ dlg_import_from_picasaweb (GthBrowser *browser)
/* Set the widget data */
- data->file_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_TYPE_NORMAL, FALSE);
+ data->file_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_MODE_NORMAL, FALSE);
thumb_loader = gth_file_list_get_thumb_loader (GTH_FILE_LIST (data->file_list));
gth_thumb_loader_set_use_cache (thumb_loader, FALSE);
gth_thumb_loader_set_loader_func (thumb_loader, picasa_web_thumbnail_loader);
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 1dbcae3..2edcd43 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -3949,9 +3949,9 @@ pref_ui_viewer_thumbnails_orient_changed (GSettings *settings,
browser->priv->viewer_thumbnails_pane = viewer_thumbnails_pane;
if (viewer_thumbnails_orientation == GTK_ORIENTATION_HORIZONTAL)
- gth_file_list_set_type (GTH_FILE_LIST (browser->priv->thumbnail_list), GTH_FILE_LIST_TYPE_H_SIDEBAR);
+ gth_file_list_set_mode (GTH_FILE_LIST (browser->priv->thumbnail_list), GTH_FILE_LIST_MODE_H_SIDEBAR);
else
- gth_file_list_set_type (GTH_FILE_LIST (browser->priv->thumbnail_list), GTH_FILE_LIST_TYPE_V_SIDEBAR);
+ gth_file_list_set_mode (GTH_FILE_LIST (browser->priv->thumbnail_list), GTH_FILE_LIST_MODE_V_SIDEBAR);
gth_window_attach_content (GTH_WINDOW (browser), GTH_BROWSER_PAGE_VIEWER, browser->priv->viewer_thumbnails_pane);
@@ -4351,13 +4351,13 @@ gth_browser_init (GthBrowser *browser)
viewer_thumbnails_orientation = g_settings_get_enum (browser->priv->browser_settings, PREF_BROWSER_VIEWER_THUMBNAILS_ORIENT);
if (viewer_thumbnails_orientation == GTK_ORIENTATION_HORIZONTAL)
- browser->priv->viewer_thumbnails_pane = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
+ browser->priv->viewer_thumbnails_pane = gth_paned_new (GTK_ORIENTATION_VERTICAL);
else
- browser->priv->viewer_thumbnails_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
+ browser->priv->viewer_thumbnails_pane = gth_paned_new (GTK_ORIENTATION_HORIZONTAL);
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_paned_new (GTK_ORIENTATION_HORIZONTAL);
+ browser->priv->viewer_sidebar_pane = gth_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_widget_set_size_request (browser->priv->viewer_sidebar_pane, -1, MIN_VIEWER_SIZE);
gtk_widget_show (browser->priv->viewer_sidebar_pane);
if (viewer_thumbnails_orientation == GTK_ORIENTATION_HORIZONTAL)
@@ -4374,7 +4374,7 @@ gth_browser_init (GthBrowser *browser)
_gtk_paned_set_position2 (GTK_PANED (browser->priv->viewer_sidebar_pane), g_settings_get_int (browser->priv->browser_settings, PREF_BROWSER_BROWSER_SIDEBAR_WIDTH));
gtk_paned_pack2 (GTK_PANED (browser->priv->viewer_sidebar_pane), browser->priv->viewer_sidebar_alignment, FALSE, FALSE);
- browser->priv->thumbnail_list = gth_file_list_new (gth_grid_view_new (), (viewer_thumbnails_orientation == GTK_ORIENTATION_HORIZONTAL) ? GTH_FILE_LIST_TYPE_H_SIDEBAR : GTH_FILE_LIST_TYPE_V_SIDEBAR, TRUE);
+ browser->priv->thumbnail_list = gth_file_list_new (gth_grid_view_new (), (viewer_thumbnails_orientation == GTK_ORIENTATION_HORIZONTAL) ? GTH_FILE_LIST_MODE_H_SIDEBAR : GTH_FILE_LIST_MODE_V_SIDEBAR, TRUE);
gth_file_list_set_caption (GTH_FILE_LIST (browser->priv->thumbnail_list), "none");
gth_grid_view_set_cell_spacing (GTH_GRID_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);
@@ -4574,7 +4574,7 @@ gth_browser_init (GthBrowser *browser)
/* the file list */
- browser->priv->file_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_TYPE_NORMAL, TRUE);
+ browser->priv->file_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_MODE_NORMAL, TRUE);
sort_type = g_settings_get_string (browser->priv->browser_settings, PREF_BROWSER_SORT_TYPE);
gth_browser_set_sort_order (browser,
gth_main_get_sort_type (sort_type),
diff --git a/gthumb/gth-file-list.c b/gthumb/gth-file-list.c
index 61befde..a8889c2 100644
--- a/gthumb/gth-file-list.c
+++ b/gthumb/gth-file-list.c
@@ -125,7 +125,7 @@ typedef struct {
struct _GthFileListPrivateData
{
GSettings *settings;
- GthFileListType type;
+ GthFileListMode type;
GtkAdjustment *vadj;
GtkWidget *notebook;
GtkWidget *view;
@@ -322,7 +322,7 @@ gth_file_list_get_preferred_width (GtkWidget *widget,
*natural_width += border * 2;
vscrollbar = gtk_scrolled_window_get_vscrollbar (GTK_SCROLLED_WINDOW (file_list->priv->scrolled_window));
- if (gtk_widget_get_visible (vscrollbar) || (file_list->priv->type == GTH_FILE_LIST_TYPE_V_SIDEBAR)) {
+ if (gtk_widget_get_visible (vscrollbar) || (file_list->priv->type == GTH_FILE_LIST_MODE_V_SIDEBAR)) {
int vscrollbar_minimum_width;
int vscrollbar_natural_width;
int scrollbar_spacing;
@@ -566,11 +566,11 @@ _gth_file_list_update_orientation (GthFileList *file_list)
hscrollbar_policy = GTK_POLICY_AUTOMATIC;
vscrollbar_policy = GTK_POLICY_AUTOMATIC;
- if (file_list->priv->type == GTH_FILE_LIST_TYPE_V_SIDEBAR) {
+ if (file_list->priv->type == GTH_FILE_LIST_MODE_V_SIDEBAR) {
gtk_orientable_set_orientation (GTK_ORIENTABLE (file_list), GTK_ORIENTATION_VERTICAL);
vscrollbar_policy = GTK_POLICY_ALWAYS;
}
- else if (file_list->priv->type == GTH_FILE_LIST_TYPE_H_SIDEBAR)
+ else if (file_list->priv->type == GTH_FILE_LIST_MODE_H_SIDEBAR)
gtk_orientable_set_orientation (GTK_ORIENTABLE (file_list), GTK_ORIENTATION_HORIZONTAL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (file_list->priv->scrolled_window),
@@ -603,7 +603,7 @@ file_store_rows_reordered_cb (GtkTreeModel *tree_model,
static void
gth_file_list_construct (GthFileList *file_list,
GtkWidget *file_view,
- GthFileListType list_type,
+ GthFileListMode list_type,
gboolean enable_drag_drop)
{
GthFileStore *model;
@@ -672,7 +672,7 @@ gth_file_list_construct (GthFileList *file_list,
file_list);
}
- gth_file_list_set_type (file_list, list_type);
+ gth_file_list_set_mode (file_list, list_type);
/* pack the widgets together */
@@ -694,7 +694,7 @@ gth_file_list_construct (GthFileList *file_list,
GtkWidget *
gth_file_list_new (GtkWidget *file_view,
- GthFileListType list_type,
+ GthFileListMode list_type,
gboolean enable_drag_drop)
{
GtkWidget *widget;
@@ -707,16 +707,16 @@ gth_file_list_new (GtkWidget *file_view,
void
-gth_file_list_set_type (GthFileList *file_list,
- GthFileListType list_type)
+gth_file_list_set_mode (GthFileList *file_list,
+ GthFileListMode list_type)
{
g_return_if_fail (GTH_IS_FILE_LIST (file_list));
file_list->priv->type = list_type;
- if ((file_list->priv->type == GTH_FILE_LIST_TYPE_SELECTOR) || (file_list->priv->type == GTH_FILE_LIST_TYPE_NO_SELECTION))
+ if ((file_list->priv->type == GTH_FILE_LIST_MODE_SELECTOR) || (file_list->priv->type == GTH_FILE_LIST_MODE_NO_SELECTION))
gth_file_selection_set_selection_mode (GTH_FILE_SELECTION (file_list->priv->view), GTK_SELECTION_NONE);
- else if ((file_list->priv->type == GTH_FILE_LIST_TYPE_H_SIDEBAR) || (file_list->priv->type == GTH_FILE_LIST_TYPE_V_SIDEBAR))
+ else if ((file_list->priv->type == GTH_FILE_LIST_MODE_H_SIDEBAR) || (file_list->priv->type == GTH_FILE_LIST_MODE_V_SIDEBAR))
gth_file_selection_set_selection_mode (GTH_FILE_SELECTION (file_list->priv->view), GTK_SELECTION_SINGLE);
else
gth_file_selection_set_selection_mode (GTH_FILE_SELECTION (file_list->priv->view), GTK_SELECTION_MULTIPLE);
@@ -725,6 +725,13 @@ gth_file_list_set_type (GthFileList *file_list,
}
+GthFileListMode
+gth_file_list_get_mode (GthFileList *file_list)
+{
+ return file_list->priv->type;
+}
+
+
typedef struct {
GthFileList *file_list;
DataFunc done_func;
diff --git a/gthumb/gth-file-list.h b/gthumb/gth-file-list.h
index a1e2254..4519612 100644
--- a/gthumb/gth-file-list.h
+++ b/gthumb/gth-file-list.h
@@ -33,13 +33,13 @@
G_BEGIN_DECLS
typedef enum {
- GTH_FILE_LIST_TYPE_NORMAL,
- GTH_FILE_LIST_TYPE_BROWSER,
- GTH_FILE_LIST_TYPE_SELECTOR,
- GTH_FILE_LIST_TYPE_NO_SELECTION,
- GTH_FILE_LIST_TYPE_V_SIDEBAR,
- GTH_FILE_LIST_TYPE_H_SIDEBAR
-} GthFileListType;
+ GTH_FILE_LIST_MODE_NORMAL,
+ GTH_FILE_LIST_MODE_BROWSER,
+ GTH_FILE_LIST_MODE_SELECTOR,
+ GTH_FILE_LIST_MODE_NO_SELECTION,
+ GTH_FILE_LIST_MODE_V_SIDEBAR,
+ GTH_FILE_LIST_MODE_H_SIDEBAR
+} GthFileListMode;
#define GTH_TYPE_FILE_LIST (gth_file_list_get_type ())
#define GTH_FILE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTH_TYPE_FILE_LIST, GthFileList))
@@ -63,10 +63,11 @@ struct _GthFileListClass {
GType gth_file_list_get_type (void);
GtkWidget * gth_file_list_new (GtkWidget *file_view,
- GthFileListType list_type,
+ GthFileListMode list_type,
gboolean enable_drag_drop);
-void gth_file_list_set_type (GthFileList *file_list,
- GthFileListType list_type);
+void gth_file_list_set_mode (GthFileList *file_list,
+ GthFileListMode list_type);
+GthFileListMode gth_file_list_get_mode (GthFileList *file_list);
void gth_file_list_cancel (GthFileList *file_list,
DataFunc done_func,
gpointer user_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]