diff options
author | monsta <[email protected]> | 2016-11-23 18:15:54 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-11-23 18:15:54 +0300 |
commit | ae5f4711a21508a70d7123dbc0efb610af1289a2 (patch) | |
tree | 54d4a9de3b092aa772ed8799fcf30e11e19ff93f /shell/ev-sidebar-thumbnails.c | |
parent | 7884bbe50fe8b8c26e68b8077c18047861c2dd0c (diff) | |
download | atril-ae5f4711a21508a70d7123dbc0efb610af1289a2.tar.bz2 atril-ae5f4711a21508a70d7123dbc0efb610af1289a2.tar.xz |
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require caja >= 1.17.1
Diffstat (limited to 'shell/ev-sidebar-thumbnails.c')
-rw-r--r-- | shell/ev-sidebar-thumbnails.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c index 8f7f6517..0c420f57 100644 --- a/shell/ev-sidebar-thumbnails.c +++ b/shell/ev-sidebar-thumbnails.c @@ -685,14 +685,11 @@ static void ev_sidebar_init_icon_view (EvSidebarThumbnails *ev_sidebar_thumbnails) { EvSidebarThumbnailsPrivate *priv; -#if GTK_CHECK_VERSION (3, 0, 0) GtkCellRenderer *renderer; -#endif priv = ev_sidebar_thumbnails->priv; - priv->icon_view = gtk_icon_view_new_with_model (GTK_TREE_MODEL (priv->list_store)); -#if GTK_CHECK_VERSION (3, 0, 0) + renderer = g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF, "xalign", 0.5, "yalign", 1.0, @@ -712,10 +709,7 @@ ev_sidebar_init_icon_view (EvSidebarThumbnails *ev_sidebar_thumbnails) gtk_cell_layout_pack_end (GTK_CELL_LAYOUT (priv->icon_view), renderer, FALSE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (priv->icon_view), renderer, "markup", 0, NULL); -#else - gtk_icon_view_set_markup_column (GTK_ICON_VIEW (priv->icon_view), 0); - gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (priv->icon_view), 1); -#endif + g_signal_connect (priv->icon_view, "selection-changed", G_CALLBACK (ev_sidebar_icon_selection_changed), ev_sidebar_thumbnails); @@ -750,11 +744,7 @@ ev_sidebar_thumbnails_init (EvSidebarThumbnails *ev_sidebar_thumbnails) * it's just a workaround for bug #449462 (GTK2 only) */ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->swindow), -#if GTK_CHECK_VERSION (3, 0, 0) GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); -#else - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); -#endif gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (priv->swindow), GTK_SHADOW_IN); priv->vadjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (priv->swindow)); |