summaryrefslogtreecommitdiff
path: root/src/eom-thumb-nav.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2015-06-14 17:58:12 +0200
committerraveit65 <[email protected]>2015-06-14 17:58:12 +0200
commit16ecee965b67eaf37e52c745f6369f49377e86b2 (patch)
tree24dc0816643b09854e98e4d31a6b723f35f460ac /src/eom-thumb-nav.c
parent4d314b612c11d125dbcbf4b982951ed91baaf09d (diff)
downloadeom-16ecee965b67eaf37e52c745f6369f49377e86b2.tar.bz2
eom-16ecee965b67eaf37e52c745f6369f49377e86b2.tar.xz
EogThumbView: Set icon view columns to the real number of images
GtkIconView's layout code was redone in gtk+-3.4.3 and 3.4.4 breaking EogThumbView which would scale the thumbnails so small that the thumbview would not be shown itself in single row mode. This should work with gtk+-3.4.2 and earlier as well. taken from: https://git.gnome.org/browse/eog/commit/?id=888b5ed
Diffstat (limited to 'src/eom-thumb-nav.c')
-rw-r--r--src/eom-thumb-nav.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/eom-thumb-nav.c b/src/eom-thumb-nav.c
index 702b4c5..24c2431 100644
--- a/src/eom-thumb-nav.c
+++ b/src/eom-thumb-nav.c
@@ -545,8 +545,13 @@ eom_thumb_nav_set_mode (EomThumbNav *nav, EomThumbNavMode mode)
switch (mode)
{
case EOM_THUMB_NAV_MODE_ONE_ROW:
+#if GTK_CHECK_VERSION (3, 4, 3)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE(priv->thumbview),
+ GTK_ORIENTATION_HORIZONTAL);
+#else
gtk_icon_view_set_columns (GTK_ICON_VIEW (priv->thumbview),
G_MAXINT);
+#endif
gtk_widget_set_size_request (priv->thumbview, -1, -1);
eom_thumb_view_set_item_height (EOM_THUMB_VIEW (priv->thumbview),
@@ -561,7 +566,12 @@ eom_thumb_nav_set_mode (EomThumbNav *nav, EomThumbNavMode mode)
break;
case EOM_THUMB_NAV_MODE_ONE_COLUMN:
+#if GTK_CHECK_VERSION (3, 4, 3)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE(priv->thumbview),
+ GTK_ORIENTATION_VERTICAL);
+#else
gtk_icon_view_set_columns (GTK_ICON_VIEW (priv->thumbview), 1);
+#endif
gtk_widget_set_size_request (priv->thumbview, -1, -1);
eom_thumb_view_set_item_height (EOM_THUMB_VIEW (priv->thumbview),
@@ -577,7 +587,12 @@ eom_thumb_nav_set_mode (EomThumbNav *nav, EomThumbNavMode mode)
break;
case EOM_THUMB_NAV_MODE_MULTIPLE_ROWS:
+#if GTK_CHECK_VERSION (3, 4, 3)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE(priv->thumbview),
+ GTK_ORIENTATION_VERTICAL);
+#else
gtk_icon_view_set_columns (GTK_ICON_VIEW (priv->thumbview), -1);
+#endif
gtk_widget_set_size_request (priv->thumbview, -1, 220);
eom_thumb_view_set_item_height (EOM_THUMB_VIEW (priv->thumbview),
@@ -593,7 +608,12 @@ eom_thumb_nav_set_mode (EomThumbNav *nav, EomThumbNavMode mode)
break;
case EOM_THUMB_NAV_MODE_MULTIPLE_COLUMNS:
+#if GTK_CHECK_VERSION (3, 4, 3)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE(priv->thumbview),
+ GTK_ORIENTATION_VERTICAL);
+#else
gtk_icon_view_set_columns (GTK_ICON_VIEW (priv->thumbview), -1);
+#endif
gtk_widget_set_size_request (priv->thumbview, 230, -1);
eom_thumb_view_set_item_height (EOM_THUMB_VIEW (priv->thumbview),