[mate-file-manager] fix desktop file handle

Wolfgang Ulbrich raveit65 at fedoraproject.org
Mon Aug 13 19:24:11 UTC 2012


commit 52a660bf5b3f0bd510005a378aafa70274f0390f
Author: raveit65 <chat-to-me at raveit.de>
Date:   Mon Aug 13 21:24:07 2012 +0200

    fix desktop file handle
    
    - fix obsolete caja from external repo

 .gitignore                          |    1 +
 caja-config.patch                   |   21 ++
 caja-filetype-symlink-fix.patch     |   13 +
 caja-gvfs-desktop-key-2.patch       |   88 ++++++
 caja-rtl-fix.patch                  |   83 ++++++
 caja_remove_mate-bg-crossfade.patch |  502 +++++++++++++++++++++++++++++++++++
 mate-file-manager.spec              |  253 ++++++++++++++++++
 sources                             |    1 +
 8 files changed, 962 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..c1ceb63 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/mate-file-manager-1.4.0.tar.xz
diff --git a/caja-config.patch b/caja-config.patch
new file mode 100644
index 0000000..3258792
--- /dev/null
+++ b/caja-config.patch
@@ -0,0 +1,21 @@
+diff -up caja-2.27.4/libcaja-private/apps_caja_preferences.schemas.in.config caja-2.27.4/libcaja-private/apps_caja_preferences.schemas.in
+--- caja-2.27.4/libcaja-private/apps_caja_preferences.schemas.in.config	2009-08-12 21:07:44.331994084 -0400
++++ caja-2.27.4/libcaja-private/apps_caja_preferences.schemas.in	2009-08-12 21:26:31.258991695 -0400
+@@ -169,7 +169,7 @@
+       <owner>caja</owner>
+       <type>list</type>
+       <list_type>string</list_type>
+-      <default>[x-content/software]</default>
++      <default>[]</default>
+       <locale name="C">
+          <short>List of x-content/* types where the preferred application will be launched</short>
+          <long>
+@@ -187,7 +187,7 @@
+       <owner>caja</owner>
+       <type>list</type>
+       <list_type>string</list_type>
+-      <default>[]</default>
++      <default>[x-content/software]</default>
+       <locale name="C">
+          <short>List of x-content/* types set to "Do Nothing"</short>
+          <long>
diff --git a/caja-filetype-symlink-fix.patch b/caja-filetype-symlink-fix.patch
new file mode 100644
index 0000000..a9bc656
--- /dev/null
+++ b/caja-filetype-symlink-fix.patch
@@ -0,0 +1,13 @@
+Index: libcaja-private/caja-file.c
+===================================================================
+--- libcaja-private/caja-file.c	(revision 14183)
++++ libcaja-private/caja-file.c	(working copy)
+@@ -1613,7 +1619,7 @@
+		}
+	}
+
+-	is_symlink = g_file_info_get_is_symlink (info);
++	is_symlink = g_file_info_get_is_symlink (info) || (g_file_info_get_file_type (info) == G_FILE_TYPE_SYMBOLIC_LINK);
+	if (file->details->is_symlink != is_symlink) {
+		changed = TRUE;
+	}
diff --git a/caja-gvfs-desktop-key-2.patch b/caja-gvfs-desktop-key-2.patch
new file mode 100644
index 0000000..caee633
--- /dev/null
+++ b/caja-gvfs-desktop-key-2.patch
@@ -0,0 +1,88 @@
+diff -upr caja-1.2.2-orig/data/caja-autorun-software.desktop.in.in caja-1.2.2/data/caja-autorun-software.desktop.in.in
+--- caja-1.2.2-orig/data/caja-autorun-software.desktop.in.in	2012-05-09 18:15:51.000000000 +0200
++++ caja-1.2.2/data/caja-autorun-software.desktop.in.in	2012-06-16 16:56:00.190767210 +0200
+@@ -2,6 +2,7 @@
+ _Name=Autorun Prompt
+ TryExec=caja-autorun-software
+ Exec=caja-autorun-software %u
++X-Mate-Vfs-System=gio
+ Icon=application-x-executable
+ NoDisplay=true
+ Terminal=false
+diff -upr caja-1.2.2-orig/data/caja-browser.desktop.in.in caja-1.2.2/data/caja-browser.desktop.in.in
+--- caja-1.2.2-orig/data/caja-browser.desktop.in.in	2012-05-09 18:15:51.000000000 +0200
++++ caja-1.2.2/data/caja-browser.desktop.in.in	2012-06-16 16:56:37.892154304 +0200
+@@ -3,6 +3,7 @@ _Name=File Browser
+ _Comment=Browse the file system with the file manager
+ TryExec=caja
+ Exec=caja --no-desktop --browser %U
++X-Mate-Vfs-System=gio
+ Icon=system-file-manager
+ Terminal=false
+ StartupNotify=true
+diff -upr caja-1.2.2-orig/data/caja-computer.desktop.in.in caja-1.2.2/data/caja-computer.desktop.in.in
+--- caja-1.2.2-orig/data/caja-computer.desktop.in.in	2012-05-09 18:15:51.000000000 +0200
++++ caja-1.2.2/data/caja-computer.desktop.in.in	2012-06-16 16:58:07.072079271 +0200
+@@ -3,6 +3,7 @@ _Name=Computer
+ _Comment=Browse all local and remote disks and folders accessible from this computer
+ TryExec=caja
+ Exec=caja --no-desktop computer:
++X-Mate-Vfs-System=gio
+ Icon=computer
+ Terminal=false
+ StartupNotify=true
+diff -upr caja-1.2.2-orig/data/caja.desktop.in.in caja-1.2.2/data/caja.desktop.in.in
+--- caja-1.2.2-orig/data/caja.desktop.in.in	2012-05-09 18:15:51.000000000 +0200
++++ caja-1.2.2/data/caja.desktop.in.in	2012-06-16 16:59:10.203741474 +0200
+@@ -1,6 +1,7 @@
+ [Desktop Entry]
+ _Name=File Manager
+ Exec=caja
++X-Mate-Vfs-System=gio
+ Icon=system-file-manager
+ Terminal=false
+ Type=Application
+diff -upr caja-1.2.2-orig/data/caja-file-management-properties.desktop.in.in caja-1.2.2/data/caja-file-management-properties.desktop.in.in
+--- caja-1.2.2-orig/data/caja-file-management-properties.desktop.in.in	2012-05-09 18:15:51.000000000 +0200
++++ caja-1.2.2/data/caja-file-management-properties.desktop.in.in	2012-06-16 16:59:48.574146790 +0200
+@@ -2,6 +2,7 @@
+ _Name=File Management
+ _Comment=Change the behaviour and appearance of file manager windows
+ Exec=caja-file-management-properties
++X-Mate-Vfs-System=gio
+ Icon=system-file-manager
+ Terminal=false
+ Type=Application
+diff -upr caja-1.2.2-orig/data/caja-folder-handler.desktop.in.in caja-1.2.2/data/caja-folder-handler.desktop.in.in
+--- caja-1.2.2-orig/data/caja-folder-handler.desktop.in.in	2012-05-09 18:15:51.000000000 +0200
++++ caja-1.2.2/data/caja-folder-handler.desktop.in.in	2012-06-16 17:00:26.916553872 +0200
+@@ -2,6 +2,7 @@
+ _Name=Open Folder
+ TryExec=caja
+ Exec=caja --no-desktop %U
++X-Mate-Vfs-System=gio
+ NoDisplay=true
+ Terminal=false
+ Icon=folder-open
+diff -upr caja-1.2.2-orig/data/caja-home.desktop.in.in caja-1.2.2/data/caja-home.desktop.in.in
+--- caja-1.2.2-orig/data/caja-home.desktop.in.in	2012-05-09 18:15:51.000000000 +0200
++++ caja-1.2.2/data/caja-home.desktop.in.in	2012-06-16 17:00:51.412814953 +0200
+@@ -3,6 +3,7 @@ _Name=Home Folder
+ _Comment=Open your personal folder
+ TryExec=caja
+ Exec=caja --no-desktop
++X-Mate-Vfs-System=gio
+ Icon=user-home
+ Terminal=false
+ StartupNotify=true
+diff -upr caja-1.2.2-orig/src/mate-network-scheme.desktop.in caja-1.2.2/src/mate-network-scheme.desktop.in
+--- caja-1.2.2-orig/src/mate-network-scheme.desktop.in	2012-05-09 18:15:51.000000000 +0200
++++ caja-1.2.2/src/mate-network-scheme.desktop.in	2012-06-16 17:02:06.121616002 +0200
+@@ -3,6 +3,7 @@ _Name=Network
+ _Comment=Browse bookmarked and local network locations
+ TryExec=caja
+ Exec=caja --no-desktop network:
++X-Mate-Vfs-System=gio
+ Terminal=false
+ StartupNotify=true
+ Type=Application
diff --git a/caja-rtl-fix.patch b/caja-rtl-fix.patch
new file mode 100644
index 0000000..e96784c
--- /dev/null
+++ b/caja-rtl-fix.patch
@@ -0,0 +1,83 @@
+--- caja-1.1.2/libcaja-private/caja-icon-container.c	2012-01-17 11:53:22.000000000 +0100
++++ caja-1.1.2/libcaja-private/caja-icon-container.c.rtl-fix	2012-02-12 01:51:30.644226768 +0100
+@@ -10444,40 +10444,6 @@ caja_icon_container_accessible_get_type
+     return type;
+ }
+ 
+-#if ! defined (CAJA_OMIT_SELF_CHECK)
+-
+-static char *
+-check_compute_stretch (int icon_x, int icon_y, int icon_size,
+-                       int start_pointer_x, int start_pointer_y,
+-                       int end_pointer_x, int end_pointer_y)
+-{
+-    StretchState start, current;
+-
+-    start.icon_x = icon_x;
+-    start.icon_y = icon_y;
+-    start.icon_size = icon_size;
+-    start.pointer_x = start_pointer_x;
+-    start.pointer_y = start_pointer_y;
+-    current.pointer_x = end_pointer_x;
+-    current.pointer_y = end_pointer_y;
+-
+-    compute_stretch (&start, &current);
+-
+-    return g_strdup_printf ("%d,%d:%d",
+-                            current.icon_x,
+-                            current.icon_y,
+-                            current.icon_size);
+-}
+-
+-void
+-caja_self_check_icon_container (void)
+-{
+-    EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 0, 0, 0, 0), "0,0:16");
+-    EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 16, 16, 17, 17), "0,0:17");
+-    EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 16, 16, 17, 16), "0,0:16");
+-    EEL_CHECK_STRING_RESULT (check_compute_stretch (100, 100, 64, 105, 105, 40, 40), "35,35:129");
+-}
+-
+ gboolean
+ caja_icon_container_is_layout_rtl (CajaIconContainer *container)
+ {
+@@ -10610,4 +10576,39 @@ caja_icon_container_set_store_layout_tim
+ }
+ 
+ 
++#if ! defined (CAJA_OMIT_SELF_CHECK)
++
++static char *
++check_compute_stretch (int icon_x, int icon_y, int icon_size,
++		       int start_pointer_x, int start_pointer_y,
++		       int end_pointer_x, int end_pointer_y)
++{
++	StretchState start, current;
++
++	start.icon_x = icon_x;
++	start.icon_y = icon_y;
++	start.icon_size = icon_size;
++	start.pointer_x = start_pointer_x;
++	start.pointer_y = start_pointer_y;
++	current.pointer_x = end_pointer_x;
++	current.pointer_y = end_pointer_y;
++
++	compute_stretch (&start, &current);
++
++	return g_strdup_printf ("%d,%d:%d",
++				current.icon_x,
++				current.icon_y,
++				current.icon_size);
++}
++
++void
++caja_self_check_icon_container (void)
++{
++	EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 0, 0, 0, 0), "0,0:16");
++	EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 16, 16, 17, 17), "0,0:17");
++	EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 16, 16, 17, 16), "0,0:16");
++	EEL_CHECK_STRING_RESULT (check_compute_stretch (100, 100, 64, 105, 105, 40, 40), "35,35:129");
++}
++
++
+ #endif /* ! CAJA_OMIT_SELF_CHECK */
diff --git a/caja_remove_mate-bg-crossfade.patch b/caja_remove_mate-bg-crossfade.patch
new file mode 100644
index 0000000..0bd0e3d
--- /dev/null
+++ b/caja_remove_mate-bg-crossfade.patch
@@ -0,0 +1,502 @@
+diff -upr caja-1.2.2-orig/eel/eel-background.c caja-1.2.2/eel/eel-background.c
+--- caja-1.2.2-orig/eel/eel-background.c	2012-05-09 18:15:51.000000000 +0200
++++ caja-1.2.2/eel/eel-background.c	2012-05-27 18:14:42.000000000 +0200
+@@ -37,7 +37,6 @@
+ #include <gtk/gtk.h>
+ #include <eel/eel-canvas.h>
+ #include <eel/eel-canvas-util.h>
+-#include <gdk/gdkx.h>
+ #include <gio/gio.h>
+ #include <math.h>
+ #include <stdio.h>
+@@ -54,9 +53,6 @@ static GdkPixmap *eel_background_get_pix
+ 
+ static void set_image_properties (EelBackground *background);
+ 
+-static void init_fade (EelBackground *background, GtkWidget *widget);
+-static void free_fade (EelBackground *background);
+-
+ EEL_CLASS_BOILERPLATE (EelBackground, eel_background, GTK_TYPE_OBJECT)
+ 
+ enum
+@@ -79,12 +75,9 @@ struct EelBackgroundDetails
+     char *color;
+ 
+     MateBG *bg;
+-    GtkWidget *widget;
+ 
+     /* Realized data: */
+     GdkPixmap *background_pixmap;
+-    gboolean background_pixmap_is_unset_root_pixmap;
+-    MateBGCrossfade *fade;
+     int background_entire_width;
+     int background_entire_height;
+     GdkColor default_color;
+@@ -99,7 +92,6 @@ struct EelBackgroundDetails
+     gulong screen_monitors_handler;
+     /* Can we use common pixmap for root window and desktop window */
+     gboolean use_common_pixmap;
+-    guint change_idle_id;
+ 
+     /* activity status */
+     gboolean is_active;
+@@ -151,15 +143,6 @@ eel_background_class_init (gpointer klas
+ static void
+ on_bg_changed (MateBG *bg, EelBackground *background)
+ {
+-    init_fade (background, background->details->widget);
+-    g_signal_emit (G_OBJECT (background),
+-                   signals[APPEARANCE_CHANGED], 0);
+-}
+-
+-static void
+-on_bg_transitioned (MateBG *bg, EelBackground *background)
+-{
+-    free_fade (background);
+     g_signal_emit (G_OBJECT (background),
+                    signals[APPEARANCE_CHANGED], 0);
+ }
+@@ -180,8 +163,6 @@ eel_background_init (gpointer object, gp
+ 
+     g_signal_connect (background->details->bg, "changed",
+                       G_CALLBACK (on_bg_changed), background);
+-    g_signal_connect (background->details->bg, "transitioned",
+-                      G_CALLBACK (on_bg_transitioned), background);
+ 
+ }
+ 
+@@ -201,41 +182,6 @@ eel_background_remove_current_image (Eel
+ }
+ 
+ static void
+-free_fade (EelBackground *background)
+-{
+-    if (background->details->fade != NULL)
+-    {
+-        g_object_unref (background->details->fade);
+-        background->details->fade = NULL;
+-    }
+-}
+-
+-static void
+-free_background_pixmap (EelBackground *background)
+-{
+-    GdkDisplay *display;
+-    GdkPixmap *pixmap;
+-
+-    pixmap = background->details->background_pixmap;
+-    if (pixmap != NULL)
+-    {
+-        /* If we created a root pixmap and didn't set it as background
+-           it will live forever, so we need to kill it manually.
+-           If set as root background it will be killed next time the
+-           background is changed. */
+-        if (background->details->background_pixmap_is_unset_root_pixmap)
+-        {
+-            display = gdk_drawable_get_display (GDK_DRAWABLE (pixmap));
+-            XKillClient (GDK_DISPLAY_XDISPLAY (display),
+-                         GDK_PIXMAP_XID (pixmap));
+-        }
+-        g_object_unref (pixmap);
+-        background->details->background_pixmap = NULL;
+-    }
+-}
+-
+-
+-static void
+ eel_background_finalize (GObject *object)
+ {
+     EelBackground *background;
+@@ -245,9 +191,11 @@ eel_background_finalize (GObject *object
+     g_free (background->details->color);
+     eel_background_remove_current_image (background);
+ 
+-    free_background_pixmap (background);
+-
+-    free_fade (background);
++    if (background->details->background_pixmap != NULL)
++    {
++		g_object_unref (background->details->background_pixmap);
++		background->details->background_pixmap = NULL;
++    }
+ 
+     g_free (background->details);
+ 
+@@ -325,7 +273,11 @@ eel_background_new (void)
+ static void
+ eel_background_unrealize (EelBackground *background)
+ {
+-    free_background_pixmap (background);
++    if (background->details->background_pixmap != NULL)
++    {
++		g_object_unref (background->details->background_pixmap);
++		background->details->background_pixmap = NULL;
++    }
+ 
+     background->details->background_entire_width = 0;
+     background->details->background_entire_height = 0;
+@@ -400,7 +352,11 @@ eel_background_ensure_realized (EelBackg
+         return FALSE;
+     }
+ 
+-    free_background_pixmap (background);
++    if (background->details->background_pixmap != NULL)
++    {
++		g_object_unref (background->details->background_pixmap);
++		background->details->background_pixmap = NULL;
++    }
+ 
+     changed = FALSE;
+ 
+@@ -410,12 +366,7 @@ eel_background_ensure_realized (EelBackg
+             window,
+             entire_width, entire_height,
+             background->details->is_desktop);
+-    background->details->background_pixmap_is_unset_root_pixmap = background->details->is_desktop;
+ 
+-    /* We got the pixmap and everything, so we don't care about a change
+-       that is pending (unless things actually change after this time) */
+-    g_object_set_data (G_OBJECT (background->details->bg),
+-                       "ignore-pending-change", GINT_TO_POINTER (TRUE));
+     changed = TRUE;
+ 
+ 
+@@ -726,71 +677,11 @@ eel_background_reset (EelBackground *bac
+ }
+ 
+ static void
+-set_root_pixmap (EelBackground *background,
+-                 GdkWindow     *window)
+-{
+-    GdkPixmap *pixmap, *root_pixmap;
+-    GdkScreen *screen;
+-    GdkColor color;
+-
+-    pixmap = eel_background_get_pixmap_and_color (background,
+-             window,
+-             &color);
+-    screen = gdk_drawable_get_screen (window);
+-
+-    if (background->details->use_common_pixmap)
+-    {
+-        background->details->background_pixmap_is_unset_root_pixmap = FALSE;
+-        root_pixmap = g_object_ref (pixmap);
+-    }
+-    else
+-    {
+-        root_pixmap = mate_bg_create_pixmap (background->details->bg, window,
+-                                             gdk_screen_get_width (screen), gdk_screen_get_height (screen), TRUE);
+-    }
+-
+-    mate_bg_set_pixmap_as_root (screen, pixmap);
+-
+-    g_object_unref (pixmap);
+-    g_object_unref (root_pixmap);
+-}
+-
+-static gboolean
+-fade_to_pixmap (EelBackground *background,
+-                GdkWindow     *window,
+-                GdkPixmap     *pixmap)
+-{
+-    if (background->details->fade == NULL)
+-    {
+-        return FALSE;
+-    }
+-
+-    if (!mate_bg_crossfade_set_end_pixmap (background->details->fade,
+-                                           pixmap))
+-    {
+-        return FALSE;
+-    }
+-
+-    if (!mate_bg_crossfade_is_started (background->details->fade))
+-    {
+-        mate_bg_crossfade_start (background->details->fade, window);
+-        if (background->details->is_desktop)
+-        {
+-            g_signal_connect_swapped (background->details->fade,
+-                                      "finished",
+-                                      G_CALLBACK (set_root_pixmap), background);
+-        }
+-    }
+-
+-    return mate_bg_crossfade_is_started (background->details->fade);
+-}
+-
+-
+-static void
+ eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
+ {
+     GtkStyle *style;
+     GdkPixmap *pixmap;
++    GdkPixmap *root_pixmap;
+     GdkColor color;
+ 
+     int window_width;
+@@ -798,7 +689,6 @@ eel_background_set_up_widget (EelBackgro
+ 
+     GdkWindow *window;
+     GdkWindow *widget_window;
+-    gboolean in_fade;
+ 
+     if (!gtk_widget_get_realized (widget))
+     {
+@@ -824,32 +714,36 @@ eel_background_set_up_widget (EelBackgro
+     {
+         window = widget_window;
+     }
+-
+-    if (background->details->fade != NULL)
+-    {
+-        in_fade = fade_to_pixmap (background, window, pixmap);
+-    }
+-    else
+-    {
+-        in_fade = FALSE;
+-    }
+-
+-    if (!in_fade)
+     {
+         if (background->details->is_desktop)
+-        {
+-            gdk_window_set_back_pixmap (window, pixmap, FALSE);
+-        }
+-        else
+-        {
+-            gdk_window_set_background (window, &color);
+-            gdk_window_set_back_pixmap (window, pixmap, FALSE);
++	{
++		gdk_window_set_back_pixmap (window, pixmap, FALSE);
++	}
++	else
++	{
++		gdk_window_set_back_pixmap (window, NULL, FALSE);
++		gdk_window_set_background (window, &color);
+         }
+-    }
+ 
+-    if (background->details->is_desktop && !in_fade)
+-    {
+-        set_root_pixmap (background, window);
++
++	if (background->details->is_desktop)
++	{
++
++		root_pixmap = NULL;
++
++		if (background->details->use_common_pixmap)
++		{
++			root_pixmap = g_object_ref (pixmap);
++		}
++		else
++		{
++			root_pixmap = mate_bg_create_pixmap (background->details->bg, window,
++							window_width, window_height, TRUE);
++		}
++
++		mate_bg_set_pixmap_as_root (gdk_drawable_get_screen (window), root_pixmap);
++		g_object_unref (root_pixmap);
++	}
+     }
+ 
+     if (pixmap)
+@@ -858,95 +752,13 @@ eel_background_set_up_widget (EelBackgro
+     }
+ }
+ 
+-static gboolean
+-on_background_changed (EelBackground *background)
+-{
+-    if (background->details->change_idle_id == 0)
+-    {
+-        return FALSE;
+-    }
+-
+-    background->details->change_idle_id = 0;
+-
+-    eel_background_unrealize (background);
+-    eel_background_set_up_widget (background, background->details->widget);
+-
+-    gtk_widget_queue_draw (background->details->widget);
+-
+-    return FALSE;
+-}
+-
+ static void
+-init_fade (EelBackground *background, GtkWidget *widget)
++eel_widget_background_changed (GtkWidget *widget, EelBackground *background)
+ {
+-    if (widget == NULL || !gtk_widget_get_realized (widget))
+-        return;
+-
+-    if (!background->details->is_desktop)
+-    {
+-        return;
+-    }
+-
+-    if (background->details->fade == NULL)
+-    {
+-        GdkWindow *window;
+-        int old_width, old_height, width, height;
+-
+-        /* If this was the result of a screen size change,
+-         * we don't want to crossfade
+-         */
+-        window = gtk_widget_get_window (widget);
+-
+-#if GTK_CHECK_VERSION(3, 0, 0)
+-        old_width = gdk_window_get_width(GDK_WINDOW(window));
+-        old_height = gdk_window_get_height(GDK_WINDOW(window));
+-#else
+-        gdk_drawable_get_size(window, &old_width, &old_height);
+-#endif
+-
+-        drawable_get_adjusted_size (background, window,
+-                                    &width, &height);
+-        if (old_width == width && old_height == height)
+-        {
+-            background->details->fade = mate_bg_crossfade_new (width, height);
+-            g_signal_connect_swapped (background->details->fade,
+-                                      "finished",
+-                                      G_CALLBACK (free_fade),
+-                                      background);
+-        }
+-    }
+-
+-    if (background->details->fade != NULL && !mate_bg_crossfade_is_started (background->details->fade))
+-    {
+-        GdkPixmap *start_pixmap;
+-
+-        if (background->details->background_pixmap == NULL)
+-        {
+-            start_pixmap = mate_bg_get_pixmap_from_root (gtk_widget_get_screen (widget));
+-        }
+-        else
+-        {
+-            start_pixmap = g_object_ref (background->details->background_pixmap);
+-        }
+-        mate_bg_crossfade_set_start_pixmap (background->details->fade,
+-                                            start_pixmap);
+-        g_object_unref (start_pixmap);
+-    }
+-}
+-
+-static void
+-eel_widget_queue_background_change (GtkWidget *widget)
+-{
+-    EelBackground *background;
+-
+-    background = eel_get_widget_background (widget);
+-
+-    if (background->details->change_idle_id > 0)
+-    {
+-        return;
+-    }
++    eel_background_unrealize (background);
++    eel_background_set_up_widget (background, widget);
+ 
+-    background->details->change_idle_id = g_idle_add ((GSourceFunc) on_background_changed, background);
++    gtk_widget_queue_draw (widget);
+ }
+ 
+ /* Callback used when the style of a widget changes.  We have to regenerate its
+@@ -961,7 +773,7 @@ widget_style_set_cb (GtkWidget *widget,
+ 
+     if (previous_style != NULL)
+     {
+-        eel_widget_queue_background_change (widget);
++        eel_widget_background_changed (widget, background);
+     }
+ }
+ 
+@@ -1018,7 +830,6 @@ widget_realized_setup (GtkWidget *widget
+             background->details->use_common_pixmap = FALSE;
+         }
+ 
+-        init_fade (background, widget);
+     }
+ }
+ 
+@@ -1074,18 +885,6 @@ eel_background_is_desktop (EelBackground
+     return background->details->is_desktop;
+ }
+ 
+-static void
+-on_widget_destroyed (GtkWidget *widget, EelBackground *background)
+-{
+-    if (background->details->change_idle_id != 0)
+-    {
+-        g_source_remove (background->details->change_idle_id);
+-        background->details->change_idle_id = 0;
+-    }
+-
+-    background->details->widget = NULL;
+-}
+-
+ /* Gets the background attached to a widget.
+ 
+    If the widget doesn't already have a EelBackground object,
+@@ -1121,13 +920,11 @@ eel_get_widget_background (GtkWidget *wi
+     g_object_ref_sink (background);
+     g_object_set_data_full (G_OBJECT (widget), "eel_background",
+                             background, g_object_unref);
+-    background->details->widget = widget;
+-    g_signal_connect_object (widget, "destroy", G_CALLBACK (on_widget_destroyed), background, 0);
+ 
+     /* Arrange to get the signal whenever the background changes. */
+     g_signal_connect_object (background, "appearance_changed",
+-                             G_CALLBACK (eel_widget_queue_background_change), widget, G_CONNECT_SWAPPED);
+-    eel_widget_queue_background_change (widget);
++                             G_CALLBACK (eel_widget_background_changed), widget, G_CONNECT_SWAPPED);
++    eel_widget_background_changed (widget, background);
+ 
+     g_signal_connect_object (widget, "style_set",
+                              G_CALLBACK (widget_style_set_cb),
+diff -upr caja-1.2.2-orig/src/caja-window-slot.c caja-1.2.2/src/caja-window-slot.c
+--- caja-1.2.2-orig/src/caja-window-slot.c	2012-05-09 18:15:51.000000000 +0200
++++ caja-1.2.2/src/caja-window-slot.c	2012-05-27 16:51:07.000000000 +0200
+@@ -634,22 +634,6 @@ caja_window_slot_dispose (GObject *objec
+ 
+     slot = CAJA_WINDOW_SLOT (object);
+ 
+-    if (slot->content_view)
+-    {
+-        widget = caja_view_get_widget (slot->content_view);
+-        gtk_widget_destroy (widget);
+-        g_object_unref (slot->content_view);
+-        slot->content_view = NULL;
+-    }
+-
+-    if (slot->new_content_view)
+-    {
+-        widget = caja_view_get_widget (slot->new_content_view);
+-        gtk_widget_destroy (widget);
+-        g_object_unref (slot->new_content_view);
+-        slot->new_content_view = NULL;
+-    }
+-
+     caja_window_slot_set_viewed_file (slot, NULL);
+     /* TODO? why do we unref here? the file is NULL.
+      * It was already here before the slot move, though */
+@@ -682,6 +666,20 @@ caja_window_slot_dispose (GObject *objec
+         slot->find_mount_cancellable = NULL;
+     }
+ 
++    if (slot->content_view) {
++    widget = caja_view_get_widget (slot->content_view);
++    gtk_widget_destroy (widget);
++    g_object_unref (slot->content_view);
++    slot->content_view = NULL;
++    }
++
++    if (slot->new_content_view) {
++    widget = caja_view_get_widget (slot->new_content_view);
++    gtk_widget_destroy (widget);
++    g_object_unref (slot->new_content_view);
++    slot->new_content_view = NULL;
++    }
++
+     slot->pane = NULL;
+ 
+     g_free (slot->title);
diff --git a/mate-file-manager.spec b/mate-file-manager.spec
new file mode 100644
index 0000000..4645734
--- /dev/null
+++ b/mate-file-manager.spec
@@ -0,0 +1,253 @@
+%global desktop_file_utils_version 0.7
+%global mate_desktop_version 1.1.0
+%global redhat_menus_version 0.25
+%global startup_notification_version 0.5
+%global libexif_version 0.5.12
+%global mateconf_version 1.1.0
+%global exempi_version 1.99.2
+%global unique_version 1.0.4
+%global mate_icon_theme_version 1.1.0
+%global gobject_introspection_version 0.6.4
+
+Name:			mate-file-manager
+Summary:		File manager for MATE
+Version:		1.4.0
+Release:		5%{?dist}
+License:		GPLv2+ and LGPLv2+
+Group:			User Interface/Desktops
+Source:			http://pub.mate-desktop.org/releases/1.4/%{name}-%{version}.tar.xz
+URL:			http://mate-desktop.org
+Requires:		gamin
+Requires:		filesystem >= 2.1.1-1
+Requires:		redhat-menus >= %{redhat_menus_version}
+Requires:		gvfs >= 1.4.0
+Requires:		mate-icon-theme >= %{mate_icon_theme_version}
+Requires:		libexif >= %{libexif_version}
+
+BuildRequires:	mate-desktop-devel >= %{mate_desktop_version}
+BuildRequires:	libSM-devel
+BuildRequires:	desktop-file-utils >= %{desktop_file_utils_version}
+BuildRequires:	startup-notification-devel >= %{startup_notification_version}
+BuildRequires:	libexif-devel >= %{libexif_version}
+BuildRequires:	exempi-devel >= %{exempi_version}
+BuildRequires:	libselinux-devel
+BuildRequires:	gobject-introspection-devel >= %{gobject_introspection_version}
+BuildRequires:	unique-devel >= %{unique_version}
+BuildRequires:	mate-conf-devel >= %{mateconf_version}
+BuildRequires:	mate-common
+BuildRequires:	cairo-gobject-devel
+
+Requires(pre):		mate-conf >= %{mateconf_version}
+Requires(preun):	mate-conf >= %{mateconf_version}
+Requires(post):		mate-conf >= %{mateconf_version}
+Requires:			mate-desktop >= %{mate_desktop_version}
+
+
+# the main binary links against libcaja-extension.so
+# don't depend on soname, rather on exact version
+Requires:		%{name}-extensions%{?_isa} = %{version}-%{release}
+
+# for updating caja from external repo
+Provides: caja%{?_isa} = %{version}-%{release}
+Provides: caja = %{version}-%{release}
+Obsoletes: caja < %{version}-%{release}
+
+
+# Some changes to default config
+Patch0:		caja-config.patch
+
+Patch1:		caja-rtl-fix.patch
+
+Patch2:		caja-gvfs-desktop-key-2.patch
+
+# http://bugzilla.gnome.org/show_bug.cgi?id=519743
+Patch3:		caja-filetype-symlink-fix.patch
+
+# https://github.com/mate-desktop/mate-desktop/issues/16
+Patch4:		caja_remove_mate-bg-crossfade.patch
+
+
+%description
+Caja (mate-file-manager) is the file manager and graphical shell
+for the MATE desktop,
+that makes it easy to manage your files and the rest of your system.
+It allows to browse directories on local and remote file systems, preview
+files and launch applications associated with them.
+It is also responsible for handling the icons on the MATE desktop.
+
+%package extensions
+Summary:	Mate-file-manager extensions library
+License:	LGPLv2+
+Group:		Development/Libraries
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+# for updating caja from external repo
+Provides: caja-extensions%{?_isa} = %{version}-%{release}
+Provides: caja-extensions = %{version}-%{release}
+Obsoletes: caja-extensions < %{version}-%{release}
+
+%description extensions
+This package provides the libraries used by caja extensions.
+
+%package devel
+Summary:	Support for developing mate-file-manager extensions
+License:	LGPLv2+
+Group:		Development/Libraries
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+Requires:	pkgconfig
+# for updating caja from external repo
+Provides: caja-devel%{?_isa} = %{version}-%{release}
+Provides: caja-devel = %{version}-%{release}
+Obsoletes: caja-devel < %{version}-%{release}
+
+%description devel
+This package provides libraries and header files needed
+for developing caja extensions.
+
+%prep
+%setup -q
+sed -i -e 's,OnlyShowIn=MATE,OnlyShowIn=X-MATE,g' src/mate-network-scheme.desktop.in data/caja*desktop*
+sed -i -e 's,Categories=MATE,Categories=X-MATE,g' src/mate-network-scheme.desktop.in data/caja*desktop*
+
+NOCONFIGURE=1 ./autogen.sh
+
+%patch0 -p1 -b .config
+%patch1 -p1 -b .caja-rtl-fix
+%patch2 -p1 -b .gvfs-desktop-key
+%patch3 -p0 -b .symlink
+%patch4 -p1 -b .caja_remove_mate-bg-crossfade
+
+%build
+
+%configure \
+	--disable-static \
+	--enable-unique \
+	--enable-introspection \
+	--enable-gtk-doc \
+	--disable-update-mimedb
+
+
+# drop unneeded direct library deps with --as-needed
+# libtool doesn't make this easy, so we do it the hard way
+sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
+
+export tagname=CC
+LANG=en_US make %{?_smp_mflags}
+
+# strip unneeded translations from .mo files
+cd po
+grep -v ".*[.]desktop[.]in.*\|.*[.]server[.]in$" POTFILES.in > POTFILES.keep
+mv POTFILES.keep POTFILES.in
+intltool-update --pot
+for p in *.po; do
+  msgmerge $p caja.pot > $p.out
+  msgfmt -o `basename $p .po`.gmo $p.out
+done
+
+# refresh the files in ./po after touching POTFILES.in
+make
+
+%install
+export MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
+export tagname=CC
+make install DESTDIR=$RPM_BUILD_ROOT LIBTOOL=/usr/bin/libtool INSTALL="install -p"
+unset MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
+
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'
+
+rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache
+rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/.icon-theme.cache
+
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/caja/extensions-2.0
+
+desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/caja-file-management-properties.desktop
+desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/caja-computer.desktop
+desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/caja-browser.desktop
+desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/caja-home.desktop
+desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/mate-network-scheme.desktop
+
+%find_lang caja
+
+
+%pre
+%mateconf_schema_prepare apps_caja_preferences
+
+%post
+/sbin/ldconfig
+%mateconf_schema_upgrade apps_caja_preferences
+/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
+/bin/touch --no-create %{_datadir}/icons/mate >&/dev/null || :
+
+%preun
+%mateconf_schema_remove apps_caja_preferences
+
+%postun
+/sbin/ldconfig
+
+if [ $1 -eq 0 ]; then
+  /bin/touch --no-create %{_datadir}/icons/mate >&/dev/null || :
+  %{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
+fi
+
+/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
+
+%post extensions -p /sbin/ldconfig
+
+%postun extensions -p /sbin/ldconfig
+
+
+%files  -f caja.lang
+%doc AUTHORS COPYING COPYING-DOCS COPYING.LIB NEWS README
+%{_datadir}/caja
+%{_datadir}/pixmaps/caja
+%{_datadir}/applications/caja-*.desktop
+%{_datadir}/applications/caja.desktop
+%{_datadir}/applications/mate-network-scheme.desktop
+%{_bindir}/*
+%config(noreplace) %{_sysconfdir}/mateconf/schemas/*
+%{_datadir}/icons/hicolor/*/apps/caja.png
+%{_datadir}/icons/hicolor/scalable/apps/caja.svg
+%{_mandir}/man1/caja-connect-server.1.*
+%{_mandir}/man1/caja-file-management-properties.1.*
+%{_mandir}/man1/caja.1.*
+%{_libexecdir}/caja-convert-metadata
+%{_datadir}/mime/packages/caja.xml
+
+%files extensions
+%{_libdir}/libcaja-extension.so.*
+%{_libdir}/girepository-1.0/*.typelib
+%{_libdir}/caja/extensions-2.0
+
+%files devel
+%{_includedir}/caja
+%{_libdir}/pkgconfig/*
+%{_libdir}/*.so
+%{_datadir}/gir-1.0/*.gir
+%doc %{_datadir}/gtk-doc/html/libcaja-extension/
+
+
+%changelog
+* Mon Aug 13 2012 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.4.0-5
+- fix desktop file handle
+- fix obsolete caja from external repo
+
+* Sun Aug 12 2012 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.4.0-4
+- correct %%build section
+- correct rpm scriplets
+- correct %%prep section
+- change .*z to .* in %%file section
+- correct obsoletes
+- some other fixes
+
+* Sun Aug 12 2012 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.4.0-3
+- obsoleting caja from external repo
+- remove unecessary build requires
+
+* Tue Aug 07 2012 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.4.0-2
+- initial package for fedora
+
+* Sun Dec 25 2011 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.1.0-1
+- mate-file-manager.spec based on nautilus-2.32.0-1.fc14 spec
diff --git a/sources b/sources
index e69de29..7a0a9bd 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+82403e57f167dd474ada357b2c75758a  mate-file-manager-1.4.0.tar.xz


More information about the scm-commits mailing list