diff options
author | Stefano Karapetsas <[email protected]> | 2013-07-25 12:50:07 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-07-25 12:50:07 +0200 |
commit | 9414c75602ba6f099d39275b9c09db656f27a59e (patch) | |
tree | 7ec6438367425aa75bc9b9839c5c6cebf72c3113 | |
parent | 73325c232756ace088ae3f8d64455af2c35a5381 (diff) | |
download | caja-9414c75602ba6f099d39275b9c09db656f27a59e.tar.bz2 caja-9414c75602ba6f099d39275b9c09db656f27a59e.tar.xz |
Fixes for GTK3 support
-rw-r--r-- | libcaja-private/caja-tree-view-drag-dest.c | 4 | ||||
-rw-r--r-- | src/caja-desktop-window.c | 4 | ||||
-rw-r--r-- | src/caja-pathbar.c | 4 | ||||
-rw-r--r-- | src/file-manager/fm-list-view.c | 7 |
4 files changed, 17 insertions, 2 deletions
diff --git a/libcaja-private/caja-tree-view-drag-dest.c b/libcaja-private/caja-tree-view-drag-dest.c index e1cb7bad..294d78a4 100644 --- a/libcaja-private/caja-tree-view-drag-dest.c +++ b/libcaja-private/caja-tree-view-drag-dest.c @@ -1045,7 +1045,11 @@ set_direct_save_uri (CajaTreeViewDragDest *dest, g_object_unref (child); /* Change the property */ +#if GTK_CHECK_VERSION (3, 0, 0) + gdk_property_change (gdk_drag_context_get_source_window (context), +#else gdk_property_change (GDK_DRAWABLE (gdk_drag_context_get_source_window (context)), +#endif gdk_atom_intern (CAJA_ICON_DND_XDNDDIRECTSAVE_TYPE, FALSE), gdk_atom_intern ("text/plain", FALSE), 8, GDK_PROP_MODE_REPLACE, (const guchar *) uri, diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c index aabc0468..4ef0b976 100644 --- a/src/caja-desktop-window.c +++ b/src/caja-desktop-window.c @@ -207,7 +207,11 @@ set_desktop_window_id (CajaDesktopWindow *window, root_window = gdk_screen_get_root_window ( gtk_window_get_screen (GTK_WINDOW (window))); +#if GTK_CHECK_VERSION (3, 0, 0) + window_xid = GDK_WINDOW_XID (gdkwindow); +#else window_xid = GDK_WINDOW_XWINDOW (gdkwindow); +#endif gdk_property_change (root_window, gdk_atom_intern ("CAJA_DESKTOP_WINDOW_ID", FALSE), diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c index 9de3ea03..e2d07edc 100644 --- a/src/caja-pathbar.c +++ b/src/caja-pathbar.c @@ -856,7 +856,7 @@ caja_path_bar_size_allocate (GtkWidget *widget, if (need_sliders && direction == GTK_TEXT_DIR_RTL) { #if GTK_CHECK_VERSION(3,0,0) - if (child_allocation.x - path_bar->spacing - path_bar->slider_width < widget_allocation.x) { + if (child_allocation.x - path_bar->spacing - path_bar->slider_width < widget_allocation.x) #else if (child_allocation.x - path_bar->spacing - path_bar->slider_width < widget_allocation.x + border_width) #endif @@ -869,7 +869,7 @@ caja_path_bar_size_allocate (GtkWidget *widget, if (need_sliders && direction == GTK_TEXT_DIR_LTR) { #if GTK_CHECK_VERSION(3,0,0) - if (child_allocation.x + child_allocation.width + path_bar->spacing + path_bar->slider_width > widget_allocation.x + allocation_width) { + if (child_allocation.x + child_allocation.width + path_bar->spacing + path_bar->slider_width > widget_allocation.x + allocation_width) #else if (child_allocation.x + child_allocation.width + path_bar->spacing + path_bar->slider_width > widget_allocation.x + border_width + allocation_width) #endif diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c index 72e3f55c..c92e0c12 100644 --- a/src/file-manager/fm-list-view.c +++ b/src/file-manager/fm-list-view.c @@ -1739,7 +1739,14 @@ create_and_set_up_tree_view (FMListView *view) view->details->file_name_column = gtk_tree_view_column_new (); gtk_tree_view_column_set_expand (view->details->file_name_column, TRUE); +#if GTK_CHECK_VERSION (3, 0, 0) + GtkStyleContext *context; + context = gtk_widget_get_style_context (GTK_WIDGET(view)); + font_size = PANGO_PIXELS (pango_font_description_get_size ( + gtk_style_context_get_font (context, GTK_STATE_FLAG_NORMAL))); +#else font_size = PANGO_PIXELS (pango_font_description_get_size (GTK_WIDGET(view)->style->font_desc)); +#endif gtk_tree_view_column_set_min_width (view->details->file_name_column, 20*font_size); g_object_ref_sink (view->details->file_name_column); view->details->file_name_column_num = column_num; |