diff --git a/.gitignore b/.gitignore index e640e3c..63c3b81 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /caja-1.15.0.tar.xz /caja-1.15.1.tar.xz /caja-1.15.2.tar.xz +/caja-1.15.3.tar.xz diff --git a/caja.spec b/caja.spec index 25e87dc..67e0c80 100644 --- a/caja.spec +++ b/caja.spec @@ -14,9 +14,9 @@ Name: caja Summary: File manager for MATE -Version: %{branch}.2 +Version: %{branch}.3 %if 0%{?rel_build} -Release: 2%{?dist} +Release: 1%{?dist} %else Release: 0.3%{?git_rel}%{?dist} %endif @@ -32,17 +32,6 @@ URL: http://mate-desktop.org Patch0: caja_add-xfce-to-desktop-file.patch Patch1: caja_0033-do-not-show-property-browser-in-menu.patch -Patch2: caja_0001-GTK-3.21-stop-properties-window-going-full-height.patch -Patch3: caja_0002-caja-desktop-window-Gtk3.21fix.patch -Patch4: caja_0003-fm-desktop-icon-view.c-remove-unneeded-include.patch -Patch5: caja_0004-fm-directory-view.c-GTK-3.21fix.patch -Patch6: caja_0005-fm-icon-view.c-GTK-3.21-fix.patch -Patch7: caja_0006-fm-list-view.c-GTK-3.21-fix.patch -Patch8: caja_0007-caja-icon-container.c-GTK-3.21-fixes.patch -Patch9: caja_0008-remove-caja-directory-background.c.patch -Patch10: caja_0009-remove-caja-directory-background.h.patch -Patch11: caja_0010-Fix-makefile.patch -Patch12: caja_0011-Keep-caja-desktop-transparent.patch BuildRequires: dbus-glib-devel BuildRequires: desktop-file-utils @@ -118,22 +107,11 @@ for developing caja extensions. %prep %setup -q%{!?rel_build:n %{name}-%{commit}} +# disable startup notification +sed -i s/StartupNotify=true/StartupNotify=false/g data/caja.desktop.in.in + %patch0 -p1 -b .add-xfce-to-desktop-file %patch1 -p1 -b .0033 -%patch2 -p1 -b .0001 -%patch3 -p1 -b .0002 -%patch4 -p1 -b .0003 -%patch5 -p1 -b .0004 -%patch6 -p1 -b .0005 -%patch7 -p1 -b .0006 -%patch8 -p1 -b .0007 -%patch9 -p1 -b .0008 -%patch10 -p1 -b .0009 -%patch11 -p1 -b .0010 -%patch12 -p1 -b .0011 - -# force regeneration of make files -NOCONFIGURE=1 ./autogen.sh %if 0%{?rel_build} #NOCONFIGURE=1 ./autogen.sh @@ -251,6 +229,9 @@ fi %changelog +* Sun Jul 24 2016 Wolfgang Ulbrich - 1.15.3-1 +- update to 1.15.3 release + * Sun Jul 24 2016 Wolfgang Ulbrich - 1.15.2-2 - fix desktop redraw issues with gtk+-3.21.4 diff --git a/caja_0001-GTK-3.21-stop-properties-window-going-full-height.patch b/caja_0001-GTK-3.21-stop-properties-window-going-full-height.patch deleted file mode 100644 index 58ed46e..0000000 --- a/caja_0001-GTK-3.21-stop-properties-window-going-full-height.patch +++ /dev/null @@ -1,31 +0,0 @@ -From fb2849550b6916b6d0399a163a756ec3b911d704 Mon Sep 17 00:00:00 2001 -From: lukefromdc -Date: Thu, 14 Jul 2016 16:55:06 -0400 -Subject: [PATCH] GTK 3.21: stop properties window going full height - -Stop the properties window from ballooning to full screen height when built and run with GTK 3.21/22. In GTK 3.21 the "emblems" tab's scrolled window will expand to the entire height of the screen attempting to accomodate all icons unless this is explicitly limited using the new command gtk_scrolled_window_set_max_content_height(). - -Unfortunately that command is GTK 3.21 and later only, so this forces GTK 3.21 builds to be run only with Gtk 3.21 and later. Thus this is put behind a GTK 3.21 selector and packages built from it must depend on GTK 3.21 and later. Fortunately no distro is going to ship any file manager built with newer GTK 3 than they ship. A GTK 3.21 build of this will actually open in 3.20 but hit the undefined symbol and crash if you select "properties" on any item, exactly as I would expect it to so. ---- - src/file-manager/fm-properties-window.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c -index fb1b917..db5e173 100644 ---- a/src/file-manager/fm-properties-window.c -+++ b/src/file-manager/fm-properties-window.c -@@ -4009,7 +4009,10 @@ create_emblems_page (FMPropertiesWindow *window) - scroller = eel_scrolled_wrap_table_new (TRUE, GTK_SHADOW_NONE, &emblems_table); - - gtk_container_set_border_width (GTK_CONTAINER (emblems_table), 12); -- -+/*stop GTK 3.22 builds from ballooning the properties dialog to full screen height */ -+#if GTK_CHECK_VERSION(3,21,0) -+ gtk_scrolled_window_set_max_content_height(scroller, 300); -+#endif - gtk_widget_show (scroller); - - gtk_notebook_append_page (window->details->notebook, --- -2.7.4 - diff --git a/caja_0002-caja-desktop-window-Gtk3.21fix.patch b/caja_0002-caja-desktop-window-Gtk3.21fix.patch deleted file mode 100644 index 7b7a6a0..0000000 --- a/caja_0002-caja-desktop-window-Gtk3.21fix.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 2561c5e93466f3408df35962ed8e62491768f55f Mon Sep 17 00:00:00 2001 -From: lukefromdc -Date: Fri, 22 Jul 2016 23:22:35 -0400 -Subject: [PATCH 02/11] caja-desktop-window:Gtk3.21fix - ---- - src/caja-desktop-window.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c -index 743ee24..ab5cf56 100644 ---- a/src/caja-desktop-window.c -+++ b/src/caja-desktop-window.c -@@ -167,6 +167,12 @@ map (GtkWidget *widget) - /* Chain up to realize our children */ - GTK_WIDGET_CLASS (caja_desktop_window_parent_class)->map (widget); - gdk_window_lower (gtk_widget_get_window (widget)); -+ -+ GdkWindow *window; -+ GdkRGBA transparent = { 0, 0, 0, 0 }; -+ -+ window = gtk_widget_get_window (widget); -+ gdk_window_set_background_rgba (window, &transparent); - } - - static void -@@ -236,6 +242,7 @@ realize (GtkWidget *widget) - { - CajaDesktopWindow *window; - CajaDesktopWindowDetails *details; -+ GdkVisual *visual; - - window = CAJA_DESKTOP_WINDOW (widget); - details = window->details; -@@ -244,6 +251,11 @@ realize (GtkWidget *widget) - gtk_widget_set_events (widget, gtk_widget_get_events (widget) - | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK); - -+ visual = gdk_screen_get_rgba_visual (gtk_widget_get_screen (widget)); -+ if (visual) { -+ gtk_widget_set_visual (widget, visual); -+ } -+ - /* Do the work of realizing. */ - GTK_WIDGET_CLASS (caja_desktop_window_parent_class)->realize (widget); - --- -2.7.4 - diff --git a/caja_0003-fm-desktop-icon-view.c-remove-unneeded-include.patch b/caja_0003-fm-desktop-icon-view.c-remove-unneeded-include.patch deleted file mode 100644 index 109d5a3..0000000 --- a/caja_0003-fm-desktop-icon-view.c-remove-unneeded-include.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b71fcd46fa4f36fe5170f5f039c69594bc5f67dd Mon Sep 17 00:00:00 2001 -From: lukefromdc -Date: Fri, 22 Jul 2016 23:24:13 -0400 -Subject: [PATCH 03/11] fm-desktop-icon-view.c: remove unneeded include - -Turns out this file is not even used in GTK3 builds anyway ---- - src/file-manager/fm-desktop-icon-view.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c -index 0a67ab8..5043e0f 100644 ---- a/src/file-manager/fm-desktop-icon-view.c -+++ b/src/file-manager/fm-desktop-icon-view.c -@@ -38,7 +38,6 @@ - #include - #include - #include --#include - #include - #include - #include --- -2.7.4 - diff --git a/caja_0004-fm-directory-view.c-GTK-3.21fix.patch b/caja_0004-fm-directory-view.c-GTK-3.21fix.patch deleted file mode 100644 index 74b70d3..0000000 --- a/caja_0004-fm-directory-view.c-GTK-3.21fix.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 2a6462554d5f32507119b4cc39d0a3622e9c3615 Mon Sep 17 00:00:00 2001 -From: lukefromdc -Date: Fri, 22 Jul 2016 23:26:16 -0400 -Subject: [PATCH 04/11] fm-directory-view.c: GTK 3.21fix - -remove backgrounds that cannot be used with transparent desktop or bad pixmap errors cause crashes ---- - src/file-manager/fm-directory-view.c | 32 -------------------------------- - 1 file changed, 32 deletions(-) - -diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c -index e5180da..c448ba1 100644 ---- a/src/file-manager/fm-directory-view.c -+++ b/src/file-manager/fm-directory-view.c -@@ -61,7 +61,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -421,7 +420,6 @@ EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (fm_directory_view, can_zoom_in) - EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (fm_directory_view, can_zoom_out) - EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (fm_directory_view, clear) - EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (fm_directory_view, file_changed) --EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (fm_directory_view, get_background_widget) - EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (fm_directory_view, get_selection) - EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (fm_directory_view, get_selection_for_file_transfer) - EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (fm_directory_view, get_item_count) -@@ -3688,31 +3686,6 @@ fm_directory_view_can_zoom_out (FMDirectoryView *view) - can_zoom_out, (view)); - } - --GtkWidget * --fm_directory_view_get_background_widget (FMDirectoryView *view) --{ -- g_return_val_if_fail (FM_IS_DIRECTORY_VIEW (view), NULL); -- -- return EEL_CALL_METHOD_WITH_RETURN_VALUE -- (FM_DIRECTORY_VIEW_CLASS, view, -- get_background_widget, (view)); --} -- --EelBackground * --fm_directory_view_get_background (FMDirectoryView *view) --{ -- return eel_get_widget_background (fm_directory_view_get_background_widget (view)); --} -- --static void --real_set_is_active (FMDirectoryView *view, -- gboolean is_active) --{ -- EelBackground *bg; -- -- bg = fm_directory_view_get_background (view); -- eel_background_set_active (bg, is_active); --} - - static void - fm_directory_view_set_is_active (FMDirectoryView *view, -@@ -7749,9 +7722,6 @@ real_merge_menus (FMDirectoryView *view) - - ui = caja_ui_string_get ("caja-directory-view-ui.xml"); - view->details->dir_merge_id = gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, NULL); -- g_signal_connect_object (fm_directory_view_get_background (view), "settings_changed", -- G_CALLBACK (schedule_update_menus), G_OBJECT (view), -- G_CONNECT_SWAPPED); - - view->details->scripts_invalid = TRUE; - view->details->templates_invalid = TRUE; -@@ -11111,7 +11081,6 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass) - klass->merge_menus = real_merge_menus; - klass->unmerge_menus = real_unmerge_menus; - klass->update_menus = real_update_menus; -- klass->set_is_active = real_set_is_active; - - /* Function pointers that subclasses must override */ - EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, fm_directory_view, add_file); -@@ -11120,7 +11089,6 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass) - EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, fm_directory_view, can_zoom_out); - EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, fm_directory_view, clear); - EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, fm_directory_view, file_changed); -- EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, fm_directory_view, get_background_widget); - EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, fm_directory_view, get_selection); - EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, fm_directory_view, get_selection_for_file_transfer); - EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, fm_directory_view, get_item_count); --- -2.7.4 - diff --git a/caja_0005-fm-icon-view.c-GTK-3.21-fix.patch b/caja_0005-fm-icon-view.c-GTK-3.21-fix.patch deleted file mode 100644 index c85d72b..0000000 --- a/caja_0005-fm-icon-view.c-GTK-3.21-fix.patch +++ /dev/null @@ -1,87 +0,0 @@ -From a50346abc1dfc0e8968f3e342f2e6ef81291663d Mon Sep 17 00:00:00 2001 -From: lukefromdc -Date: Fri, 22 Jul 2016 23:27:26 -0400 -Subject: [PATCH 05/11] fm-icon-view.c: GTK 3.21 fix - -remove backgrounds that cannot be used with transparent desktop or bad pixmap errors cause crashes ---- - src/file-manager/fm-icon-view.c | 35 ----------------------------------- - 1 file changed, 35 deletions(-) - -diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c -index 9b9b378..9e5c1ea 100644 ---- a/src/file-manager/fm-icon-view.c -+++ b/src/file-manager/fm-icon-view.c -@@ -30,7 +30,6 @@ - #include "fm-desktop-icon-view.h" - #include "fm-error-reporting.h" - #include --#include - #include - #include - #include -@@ -43,7 +42,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -1278,30 +1276,6 @@ fm_icon_view_begin_loading (FMDirectoryView *view) - /* kill any sound preview process that is ongoing */ - preview_audio (icon_view, NULL, FALSE); - -- /* FIXME bugzilla.gnome.org 45060: Should use methods instead -- * of hardcoding desktop knowledge in here. -- */ -- if (FM_IS_DESKTOP_ICON_VIEW (view)) -- { -- caja_connect_desktop_background_to_settings (CAJA_ICON_CONTAINER (icon_container)); -- } -- else -- { -- GdkDragAction default_action; -- -- if (caja_window_info_get_window_type (fm_directory_view_get_caja_window (view)) == CAJA_WINDOW_NAVIGATION) -- { -- default_action = CAJA_DND_ACTION_SET_AS_GLOBAL_BACKGROUND; -- } -- else -- { -- default_action = CAJA_DND_ACTION_SET_AS_FOLDER_BACKGROUND; -- } -- -- caja_connect_background_to_file_metadata (icon_container, file, default_action); -- } -- -- - /* Set up the zoom level from the metadata. */ - if (fm_directory_view_supports_zooming (FM_DIRECTORY_VIEW (icon_view))) - { -@@ -1507,14 +1481,6 @@ fm_icon_view_can_zoom_out (FMDirectoryView *view) - > CAJA_ZOOM_LEVEL_SMALLEST; - } - --static GtkWidget * --fm_icon_view_get_background_widget (FMDirectoryView *view) --{ -- g_return_val_if_fail (FM_IS_ICON_VIEW (view), NULL); -- -- return GTK_WIDGET (get_icon_container (FM_ICON_VIEW (view))); --} -- - static gboolean - fm_icon_view_is_empty (FMDirectoryView *view) - { -@@ -3168,7 +3134,6 @@ fm_icon_view_class_init (FMIconViewClass *klass) - fm_directory_view_class->clear = fm_icon_view_clear; - fm_directory_view_class->end_loading = fm_icon_view_end_loading; - fm_directory_view_class->file_changed = fm_icon_view_file_changed; -- fm_directory_view_class->get_background_widget = fm_icon_view_get_background_widget; - fm_directory_view_class->get_selected_icon_locations = fm_icon_view_get_selected_icon_locations; - fm_directory_view_class->get_selection = fm_icon_view_get_selection; - fm_directory_view_class->get_selection_for_file_transfer = fm_icon_view_get_selection; --- -2.7.4 - diff --git a/caja_0006-fm-list-view.c-GTK-3.21-fix.patch b/caja_0006-fm-list-view.c-GTK-3.21-fix.patch deleted file mode 100644 index f98552c..0000000 --- a/caja_0006-fm-list-view.c-GTK-3.21-fix.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 4918ccd124109be6d22ab24a6bee7c4468e04725 Mon Sep 17 00:00:00 2001 -From: lukefromdc -Date: Fri, 22 Jul 2016 23:30:57 -0400 -Subject: [PATCH 06/11] fm-list-view.c: GTK 3.21 fix - -remove backgrounds that cannot be used with transparent desktop or bad pixmap errors cause crashes. Gtk now draws the treeview backgrounds anyway, and this would be the only file using the removed caja-directory-background.c/h files if not changed ---- - src/file-manager/fm-list-view.c | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c -index f39c197..68b3632 100644 ---- a/src/file-manager/fm-list-view.c -+++ b/src/file-manager/fm-list-view.c -@@ -47,7 +47,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -2125,12 +2124,6 @@ fm_list_view_file_changed (FMDirectoryView *view, CajaFile *file, CajaDirectory - } - } - --static GtkWidget * --fm_list_view_get_background_widget (FMDirectoryView *view) --{ -- return GTK_WIDGET (view); --} -- - static void - fm_list_view_get_selection_foreach_func (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) - { -@@ -3331,7 +3324,6 @@ fm_list_view_class_init (FMListViewClass *class) - fm_directory_view_class->click_policy_changed = fm_list_view_click_policy_changed; - fm_directory_view_class->clear = fm_list_view_clear; - fm_directory_view_class->file_changed = fm_list_view_file_changed; -- fm_directory_view_class->get_background_widget = fm_list_view_get_background_widget; - fm_directory_view_class->get_selection = fm_list_view_get_selection; - fm_directory_view_class->get_selection_for_file_transfer = fm_list_view_get_selection_for_file_transfer; - fm_directory_view_class->get_item_count = fm_list_view_get_item_count; --- -2.7.4 - diff --git a/caja_0007-caja-icon-container.c-GTK-3.21-fixes.patch b/caja_0007-caja-icon-container.c-GTK-3.21-fixes.patch deleted file mode 100644 index 2745789..0000000 --- a/caja_0007-caja-icon-container.c-GTK-3.21-fixes.patch +++ /dev/null @@ -1,64 +0,0 @@ -From b70bebbcab5fd643be49a28ab2db3efa96a5fd2f Mon Sep 17 00:00:00 2001 -From: lukefromdc -Date: Fri, 22 Jul 2016 23:33:33 -0400 -Subject: [PATCH 07/11] caja-icon-container.c: GTK 3.21 fixes - -Apply -https://github.com/GNOME/nautilus/commit/6d6bf1e7c6049b4bd300ae1d90833a8b5fcf30c4 -and remove the widget background code that would otherwise lead to bad pixmap errors ---- - libcaja-private/caja-icon-container.c | 24 ------------------------ - 1 file changed, 24 deletions(-) - -diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c -index 2574794..09b4143 100644 ---- a/libcaja-private/caja-icon-container.c -+++ b/libcaja-private/caja-icon-container.c -@@ -4667,17 +4667,6 @@ realize (GtkWidget *widget) - - container = CAJA_ICON_CONTAINER (widget); - -- /* Ensure that the desktop window is native so the background -- set on it is drawn by X. */ -- if (container->details->is_desktop) -- { --#if GTK_CHECK_VERSION (3, 0, 0) -- gdk_x11_window_get_xid (gtk_layout_get_bin_window (GTK_LAYOUT (widget))); --#else -- gdk_x11_drawable_get_xid (gtk_layout_get_bin_window (GTK_LAYOUT (widget))); --#endif -- } -- - /* Set up DnD. */ - caja_icon_dnd_init (container); - -@@ -6243,18 +6232,6 @@ popup_menu (GtkWidget *widget) - return TRUE; - } - --static void --draw_canvas_background (EelCanvas *canvas, --#if GTK_CHECK_VERSION(3,0,0) -- cairo_t *cr) --#else -- int x, int y, int width, int height) --#endif --{ -- /* Don't chain up to the parent to avoid clearing and redrawing */ --} -- -- - #if !GTK_CHECK_VERSION(3,0,0) - static gboolean - expose_event (GtkWidget *widget, -@@ -6737,7 +6714,6 @@ caja_icon_container_class_init (CajaIconContainerClass *class) - widget_class->grab_notify = grab_notify_cb; - - canvas_class = EEL_CANVAS_CLASS (class); -- canvas_class->draw_background = draw_canvas_background; - - class->start_interactive_search = caja_icon_container_start_interactive_search; - --- -2.7.4 - diff --git a/caja_0008-remove-caja-directory-background.c.patch b/caja_0008-remove-caja-directory-background.c.patch deleted file mode 100644 index aa4cc02..0000000 --- a/caja_0008-remove-caja-directory-background.c.patch +++ /dev/null @@ -1,426 +0,0 @@ -From 4a9cf4de2c7e7dfcc080acef918470c1f20b4f04 Mon Sep 17 00:00:00 2001 -From: lukefromdc -Date: Fri, 22 Jul 2016 23:34:36 -0400 -Subject: [PATCH 08/11] remove caja-directory-background.c - -Can't use it on a transparent desktop ---- - libcaja-private/caja-directory-background.c | 406 ---------------------------- - 1 file changed, 406 deletions(-) - delete mode 100644 libcaja-private/caja-directory-background.c - -diff --git a/libcaja-private/caja-directory-background.c b/libcaja-private/caja-directory-background.c -deleted file mode 100644 -index 4ad9be0..0000000 ---- a/libcaja-private/caja-directory-background.c -+++ /dev/null -@@ -1,406 +0,0 @@ --/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ -- --/* -- caja-directory-background.c: Helper for the background of a widget -- that is viewing a particular location. -- -- Copyright (C) 2000 Eazel, Inc. -- Copyright (C) 2012 Jasmine Hassan -- -- This program is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation; either version 2 of the -- License, or (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public -- License along with this program; if not, write to the -- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -- Boston, MA 02110-1301, USA. -- -- Authors: Darin Adler -- Jasmine Hassan --*/ -- --#include --#include "caja-directory-background.h" -- --#include --#include --#include --#include "caja-dnd.h" --#include "caja-global-preferences.h" --#include "caja-metadata.h" --#include "caja-file-attributes.h" --#include --#include -- --static void caja_background_changed_cb (EelBackground *background, -- GdkDragAction action, -- CajaFile *file); -- --static void --caja_background_get_default_settings (char **color, -- char **image) --{ -- gboolean background_set; -- -- background_set = g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_BACKGROUND_SET); -- -- if (background_set && color) -- *color = g_settings_get_string (caja_preferences, CAJA_PREFERENCES_BACKGROUND_COLOR); -- -- if (background_set && image) -- *image = g_settings_get_string (caja_preferences, CAJA_PREFERENCES_BACKGROUND_URI); --} -- --static void --caja_background_load_from_file_metadata (CajaFile *file, -- EelBackground *background) --{ -- char *color, *image; -- -- g_assert (EEL_IS_BACKGROUND (background)); -- g_assert (CAJA_IS_FILE (file)); -- g_assert (g_object_get_data (G_OBJECT (background), "eel_background_file") == file); -- -- color = caja_file_get_metadata (file, CAJA_METADATA_KEY_LOCATION_BACKGROUND_COLOR, NULL); -- image = caja_file_get_metadata (file, CAJA_METADATA_KEY_LOCATION_BACKGROUND_IMAGE, NULL); -- -- /* if there's none, read the default from the theme */ -- if (color == NULL && image == NULL) -- caja_background_get_default_settings (&color, &image); -- -- /* Block the other handler while we are responding to changes -- * in the metadata so it doesn't try to change the metadata. -- */ -- g_signal_handlers_block_by_func (background, G_CALLBACK (caja_background_changed_cb), file); -- -- eel_background_set_color (background, color); -- /* non-tiled only available for desktop, at least for now */ -- eel_bg_set_placement (background, MATE_BG_PLACEMENT_TILED); -- eel_background_set_image_uri (background, image); -- -- /* Unblock the handler. */ -- g_signal_handlers_unblock_by_func (background, G_CALLBACK (caja_background_changed_cb), file); -- -- g_free (color); -- g_free (image); --} -- --/* handle the file changed signal */ --static void --caja_background_settings_notify_cb (CajaFile *file, -- EelBackground *background) --{ -- caja_background_load_from_file_metadata (file, background); --} -- --/* handle the theme changing */ --static void --caja_background_theme_notify_cb (GSettings *settings, -- const gchar *key, -- gpointer user_data) --{ -- CajaFile *file; -- EelBackground *background = EEL_BACKGROUND (user_data); -- -- file = g_object_get_data (G_OBJECT (background), "eel_background_file"); -- -- if (file) -- caja_background_settings_notify_cb (file, background); --} -- --/* handle the background changed signal */ --static void --caja_background_changed_cb (EelBackground *background, -- GdkDragAction action, -- CajaFile *file) --{ -- g_assert (EEL_IS_BACKGROUND (background)); -- g_assert (CAJA_IS_FILE (file)); -- g_assert (g_object_get_data (G_OBJECT (background), "eel_background_file") == file); -- -- char *color = eel_background_get_color (background); -- char *image = eel_background_get_image_uri (background); -- -- /* Block the other handler while we are writing metadata so it doesn't -- * try to change the background. -- */ -- g_signal_handlers_block_by_func (file, G_CALLBACK (caja_background_settings_notify_cb), -- background); -- -- if (action != (GdkDragAction) CAJA_DND_ACTION_SET_AS_FOLDER_BACKGROUND && -- action != (GdkDragAction) CAJA_DND_ACTION_SET_AS_GLOBAL_BACKGROUND) -- { -- action = (GdkDragAction) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (background), -- "default_drag_action")); -- } -- -- if (action == (GdkDragAction) CAJA_DND_ACTION_SET_AS_GLOBAL_BACKGROUND) -- { -- caja_file_set_metadata (file, CAJA_METADATA_KEY_LOCATION_BACKGROUND_COLOR, NULL, NULL); -- caja_file_set_metadata (file, CAJA_METADATA_KEY_LOCATION_BACKGROUND_IMAGE, NULL, NULL); -- -- g_signal_handlers_block_by_func (caja_preferences, -- G_CALLBACK (caja_background_theme_notify_cb), -- background); -- -- g_settings_set_string (caja_preferences, -- CAJA_PREFERENCES_BACKGROUND_COLOR, color ? color : ""); -- g_settings_set_string (caja_preferences, -- CAJA_PREFERENCES_BACKGROUND_URI, image ? image : ""); -- -- g_settings_set_boolean (caja_preferences, CAJA_PREFERENCES_BACKGROUND_SET, TRUE); -- -- g_signal_handlers_unblock_by_func (caja_preferences, -- G_CALLBACK (caja_background_theme_notify_cb), -- background); -- } else { -- caja_file_set_metadata (file, CAJA_METADATA_KEY_LOCATION_BACKGROUND_COLOR, NULL, color); -- caja_file_set_metadata (file, CAJA_METADATA_KEY_LOCATION_BACKGROUND_IMAGE, NULL, image); -- } -- -- /* Unblock the handler. */ -- g_signal_handlers_unblock_by_func (file, G_CALLBACK (caja_background_settings_notify_cb), -- background); -- -- g_free (color); -- g_free (image); --} -- --/* handle the background reset signal by setting values from the current theme */ --static void --caja_background_reset_cb (EelBackground *background, -- CajaFile *file) --{ -- char *color, *image; -- -- /* Block the other handler while we are writing metadata so it doesn't -- * try to change the background. -- */ -- g_signal_handlers_block_by_func (file, G_CALLBACK (caja_background_settings_notify_cb), -- background); -- -- color = caja_file_get_metadata (file, CAJA_METADATA_KEY_LOCATION_BACKGROUND_COLOR, NULL); -- image = caja_file_get_metadata (file, CAJA_METADATA_KEY_LOCATION_BACKGROUND_IMAGE, NULL); -- if (!color && !image) -- { -- g_signal_handlers_block_by_func (caja_preferences, -- G_CALLBACK (caja_background_theme_notify_cb), -- background); -- g_settings_set_boolean (caja_preferences, CAJA_PREFERENCES_BACKGROUND_SET, FALSE); -- g_signal_handlers_unblock_by_func (caja_preferences, -- G_CALLBACK (caja_background_theme_notify_cb), -- background); -- } -- else -- { -- /* reset the metadata */ -- caja_file_set_metadata (file, CAJA_METADATA_KEY_LOCATION_BACKGROUND_COLOR, NULL, NULL); -- caja_file_set_metadata (file, CAJA_METADATA_KEY_LOCATION_BACKGROUND_IMAGE, NULL, NULL); -- } -- g_free (color); -- g_free (image); -- -- /* Unblock the handler. */ -- g_signal_handlers_unblock_by_func (file, G_CALLBACK (caja_background_settings_notify_cb), -- background); -- -- caja_background_settings_notify_cb (file, background); --} -- --/* handle the background destroyed signal */ --static void --caja_background_weak_notify (gpointer data, -- GObject *background) --{ -- CajaFile *file = CAJA_FILE (data); -- -- g_signal_handlers_disconnect_by_func (file, G_CALLBACK (caja_background_settings_notify_cb), -- background); -- caja_file_monitor_remove (file, background); -- g_signal_handlers_disconnect_by_func (caja_preferences, caja_background_theme_notify_cb, -- background); --} -- --/* key routine that hooks up a background and location */ --void --caja_connect_background_to_file_metadata (GtkWidget *widget, -- CajaFile *file, -- GdkDragAction default_drag_action) --{ -- EelBackground *background; -- gpointer old_file; -- -- /* Get at the background object we'll be connecting. */ -- background = eel_get_widget_background (widget); -- -- /* Check if it is already connected. */ -- old_file = g_object_get_data (G_OBJECT (background), "eel_background_file"); -- if (old_file == file) -- return; -- -- /* Disconnect old signal handlers. */ -- if (old_file != NULL) -- { -- g_assert (CAJA_IS_FILE (old_file)); -- -- g_signal_handlers_disconnect_by_func (background, -- G_CALLBACK (caja_background_changed_cb), old_file); -- g_signal_handlers_disconnect_by_func (background, -- G_CALLBACK (caja_background_reset_cb), old_file); -- -- g_object_weak_unref (G_OBJECT (background), caja_background_weak_notify, old_file); -- -- g_signal_handlers_disconnect_by_func (old_file, -- G_CALLBACK (caja_background_settings_notify_cb), -- background); -- -- caja_file_monitor_remove (old_file, background); -- -- g_signal_handlers_disconnect_by_func (caja_preferences, caja_background_theme_notify_cb, -- background); -- } -- -- /* Attach the new directory. */ -- caja_file_ref (file); -- g_object_set_data_full (G_OBJECT (background), "eel_background_file", -- file, (GDestroyNotify) caja_file_unref); -- -- g_object_set_data (G_OBJECT (background), "default_drag_action", -- GINT_TO_POINTER (default_drag_action)); -- -- /* Connect new signal handlers. */ -- if (file != NULL) -- { -- g_signal_connect_object (background, "settings_changed", -- G_CALLBACK (caja_background_changed_cb), file, 0); -- -- g_signal_connect_object (background, "reset", -- G_CALLBACK (caja_background_reset_cb), file, 0); -- -- g_signal_connect_object (file, "changed", -- G_CALLBACK (caja_background_settings_notify_cb), background, 0); -- -- g_object_weak_ref (G_OBJECT (background), caja_background_weak_notify, file); -- -- /* arrange to receive file metadata */ -- caja_file_monitor_add (file, background, CAJA_FILE_ATTRIBUTE_INFO); -- -- /* arrange for notification when the theme changes */ -- g_signal_connect (caja_preferences, "changed::" CAJA_PREFERENCES_BACKGROUND_SET, -- G_CALLBACK(caja_background_theme_notify_cb), background); -- g_signal_connect (caja_preferences, "changed::" CAJA_PREFERENCES_BACKGROUND_COLOR, -- G_CALLBACK(caja_background_theme_notify_cb), background); -- g_signal_connect (caja_preferences, "changed::" CAJA_PREFERENCES_BACKGROUND_URI, -- G_CALLBACK(caja_background_theme_notify_cb), background); -- } -- -- /* Update the background based on the file metadata. */ -- caja_background_load_from_file_metadata (file, background); --} -- --/** -- * DESKTOP BACKGROUND HANDLING -- */ -- --/* handle the desktop background "settings_changed" signal */ --static void --desktop_background_changed_cb (EelBackground *background, -- GdkDragAction action, -- gpointer user_data) --{ -- eel_bg_save_to_gsettings (background, -- mate_background_preferences); --} -- --/* delayed initializor of desktop background after GSettings changes */ --static gboolean --desktop_background_prefs_change_event_idle_cb (EelBackground *background) --{ -- eel_bg_load_from_gsettings (background, -- mate_background_preferences); -- -- eel_background_set_color (background, -- eel_bg_get_desktop_color (background)); -- -- g_object_unref (background); -- -- return FALSE; /* remove from the list of event sources */ --} -- --/* handle the desktop background "reset" signal: reset to schema's defaults */ --static void --desktop_background_reset_cb (EelBackground *background, -- gpointer user_data) --{ -- /* Reset to defaults, and save */ -- eel_bg_load_from_system_gsettings (background, -- mate_background_preferences, -- TRUE); -- /* Reload from saved settings */ -- g_idle_add ((GSourceFunc) desktop_background_prefs_change_event_idle_cb, -- g_object_ref (background)); --} -- --/* handle the desktop GSettings "change-event" (batch changes) signal */ --static gboolean --desktop_background_prefs_change_event_cb (GSettings *settings, -- gpointer keys, -- gint n_keys, -- gpointer user_data) --{ -- EelBackground *background = user_data; -- -- /* Defer signal processing to avoid making the dconf backend deadlock, and -- * hold a ref to avoid accessing fields of an object that was destroyed. -- */ -- g_idle_add ((GSourceFunc) desktop_background_prefs_change_event_idle_cb, -- g_object_ref (background)); -- -- return FALSE; /* let the event propagate further */ --} -- --static void --desktop_background_weak_notify (gpointer data, -- GObject *object) --{ -- g_signal_handlers_disconnect_by_func (mate_background_preferences, -- G_CALLBACK (desktop_background_prefs_change_event_cb), -- object); --} -- --void --caja_connect_desktop_background_to_settings (CajaIconContainer *icon_container) --{ -- EelBackground *background; -- -- background = eel_get_widget_background (GTK_WIDGET (icon_container)); -- -- eel_background_set_desktop (background, -- GTK_WIDGET (icon_container), TRUE); -- -- g_signal_connect_object (background, "settings_changed", -- G_CALLBACK (desktop_background_changed_cb), NULL, 0); -- -- g_signal_connect_object (background, "reset", -- G_CALLBACK (desktop_background_reset_cb), NULL, 0); -- -- eel_bg_load_from_gsettings (background, -- mate_background_preferences); -- -- /* Connect to "change-event" signal to receive *groups of changes* before -- * they are split out into multiple emissions of the "changed" signal. -- */ -- g_signal_connect (mate_background_preferences, "change-event", -- G_CALLBACK (desktop_background_prefs_change_event_cb), -- background); -- -- g_object_weak_ref (G_OBJECT (background), -- desktop_background_weak_notify, NULL); --} --- -2.7.4 - diff --git a/caja_0009-remove-caja-directory-background.h.patch b/caja_0009-remove-caja-directory-background.h.patch deleted file mode 100644 index 3e695a8..0000000 --- a/caja_0009-remove-caja-directory-background.h.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 5558893cd98e8eff8e0f10344478bd3c47e4d08a Mon Sep 17 00:00:00 2001 -From: lukefromdc -Date: Fri, 22 Jul 2016 23:35:24 -0400 -Subject: [PATCH 09/11] remove caja-directory-background.h - -Can't use it on with a transparent desktop ---- - libcaja-private/caja-directory-background.h | 37 ----------------------------- - 1 file changed, 37 deletions(-) - delete mode 100644 libcaja-private/caja-directory-background.h - -diff --git a/libcaja-private/caja-directory-background.h b/libcaja-private/caja-directory-background.h -deleted file mode 100644 -index c86e813..0000000 ---- a/libcaja-private/caja-directory-background.h -+++ /dev/null -@@ -1,37 +0,0 @@ --/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ -- --/* -- caja-directory-background.h: Helper for the background of a widget -- that is viewing a particular directory. -- -- Copyright (C) 2000 Eazel, Inc. -- Copyright (C) 2012 Jasmine Hassan -- -- This program is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation; either version 2 of the -- License, or (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public -- License along with this program; if not, write to the -- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -- Boston, MA 02110-1301, USA. -- -- Authors: Darin Adler -- Jasmine Hassan --*/ -- --#include --#include --#include -- --void caja_connect_background_to_file_metadata (GtkWidget *widget, -- CajaFile *file, -- GdkDragAction default_drag_action); -- --void caja_connect_desktop_background_to_settings (CajaIconContainer *icon_container); --- -2.7.4 - diff --git a/caja_0010-Fix-makefile.patch b/caja_0010-Fix-makefile.patch deleted file mode 100644 index a642f86..0000000 --- a/caja_0010-Fix-makefile.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b38665e5bc278d9c1cc45c7e5f9bcb35593f4217 Mon Sep 17 00:00:00 2001 -From: lukefromdc -Date: Fri, 22 Jul 2016 23:36:09 -0400 -Subject: [PATCH 10/11] Fix makefile - ---- - libcaja-private/Makefile.am | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/libcaja-private/Makefile.am b/libcaja-private/Makefile.am -index 2383240..9f84b73 100644 ---- a/libcaja-private/Makefile.am -+++ b/libcaja-private/Makefile.am -@@ -75,8 +75,6 @@ libcaja_private_la_SOURCES = \ - caja-desktop-metadata.c \ - caja-desktop-metadata.h \ - caja-directory-async.c \ -- caja-directory-background.c \ -- caja-directory-background.h \ - caja-directory-notify.h \ - caja-directory-private.h \ - caja-directory.c \ --- -2.7.4 - diff --git a/caja_0011-Keep-caja-desktop-transparent.patch b/caja_0011-Keep-caja-desktop-transparent.patch deleted file mode 100644 index 912352d..0000000 --- a/caja_0011-Keep-caja-desktop-transparent.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 01d1a0f8b3438421d03825e9ccc205b658497cf9 Mon Sep 17 00:00:00 2001 -From: lukefromdc -Date: Fri, 22 Jul 2016 23:37:43 -0400 -Subject: [PATCH 11/11] Keep caja-desktop transparent - -Prevent theme BG color from showing on the desktop with the Nemo/Nautilus based changes to desktop handling ---- - data/caja.css | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/data/caja.css b/data/caja.css -index b507e5e..fd886a9 100644 ---- a/data/caja.css -+++ b/data/caja.css -@@ -3,6 +3,11 @@ - border-radius: 3px; - } - -+.caja-desktop-window, -+.caja-desktop:not(:selected):not(:active):not(.rubberband){ -+ background-color: transparent; -+} -+ - /* desktop mode */ - .caja-desktop.caja-canvas-item { - color: #ffffff; --- -2.7.4 - diff --git a/sources b/sources index 25f398c..835bacd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3f6468bc66457a0146e5bfc08dea5343 caja-1.15.2.tar.xz +42c563badcdea419ba8a8bf0763c9dd7 caja-1.15.3.tar.xz