SHA256
1
0
forked from pool/nemo

- add patch: nemo-2.0.1-g_list_copy_deep.patch, fix g_list_copy_deep

OBS-URL: https://build.opensuse.org/package/show/X11:Cinnamon:Factory/nemo?expand=0&rev=9
This commit is contained in:
Marguerite Su 2013-10-21 18:45:20 +00:00 committed by Git OBS Bridge
parent 6e31954f7c
commit c8d51818ea
3 changed files with 91 additions and 3 deletions

View File

@ -0,0 +1,82 @@
Index: nemo-2.0.1/src/nemo-window.c
===================================================================
--- nemo-2.0.1.orig/src/nemo-window.c
+++ nemo-2.0.1/src/nemo-window.c
@@ -2344,17 +2344,58 @@ nemo_window_set_ignore_meta_zoom_level (
window->details->ignore_meta_zoom_level = level;
}
+/* FIXME:
+ *
+ * Remove this and just use g_list_copy_deep
+ * when we no longer need to support GLib < 2.34
+ *
+ */
+
+static GList *
+list_copy_deep (GList *list, GCopyFunc func, gpointer user_data)
+{
+ GList *new_list = NULL;
+
+ if (list)
+ {
+ GList *last;
+
+ new_list = g_slice_new (GList);
+ if (func)
+ new_list->data = func (list->data, user_data);
+ else
+ new_list->data = list->data;
+ new_list->prev = NULL;
+ last = new_list;
+ list = list->next;
+ while (list)
+ {
+ last->next = g_slice_new (GList);
+ last->next->prev = last;
+ last = last->next;
+ if (func)
+ last->data = func (list->data, user_data);
+ else
+ last->data = list->data;
+ list = list->next;
+ }
+ last->next = NULL;
+ }
+
+ return new_list;
+}
+
GList *
nemo_window_get_ignore_meta_visible_columns (NemoWindow *window)
{
- return g_list_copy_deep (window->details->ignore_meta_visible_columns, (GCopyFunc) g_strdup, NULL);
+ return list_copy_deep (window->details->ignore_meta_visible_columns, (GCopyFunc) g_strdup, NULL);
}
void
nemo_window_set_ignore_meta_visible_columns (NemoWindow *window, GList *list)
{
GList *old = window->details->ignore_meta_visible_columns;
- window->details->ignore_meta_visible_columns = list != NULL ? g_list_copy_deep (list, (GCopyFunc) g_strdup, NULL) :
+ window->details->ignore_meta_visible_columns = list != NULL ? list_copy_deep (list, (GCopyFunc) g_strdup, NULL) :
NULL;
if (old != NULL)
g_list_free_full (old, g_free);
@@ -2363,14 +2404,14 @@ nemo_window_set_ignore_meta_visible_colu
GList *
nemo_window_get_ignore_meta_column_order (NemoWindow *window)
{
- return g_list_copy_deep (window->details->ignore_meta_column_order, (GCopyFunc) g_strdup, NULL);
+ return list_copy_deep (window->details->ignore_meta_column_order, (GCopyFunc) g_strdup, NULL);
}
void
nemo_window_set_ignore_meta_column_order (NemoWindow *window, GList *list)
{
GList *old = window->details->ignore_meta_column_order;
- window->details->ignore_meta_column_order = list != NULL ? g_list_copy_deep (list, (GCopyFunc) g_strdup, NULL) :
+ window->details->ignore_meta_column_order = list != NULL ? list_copy_deep (list, (GCopyFunc) g_strdup, NULL) :
NULL;
if (old != NULL)
g_list_free_full (old, g_free);

View File

@ -4,6 +4,7 @@ Mon Oct 21 17:44:21 UTC 2013 - i@marguerite.su
- update version 2.0.1 - update version 2.0.1
* see https://github.com/linuxmint/nemo/commits/master * see https://github.com/linuxmint/nemo/commits/master
- remove lang_package, now cinnamon has a package called translation - remove lang_package, now cinnamon has a package called translation
- add patch: nemo-2.0.1-g_list_copy_deep.patch, fix g_list_copy_deep
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Nov 19 13:22:52 UTC 2012 - nmo.marques@gmail.com Mon Nov 19 13:22:52 UTC 2012 - nmo.marques@gmail.com

View File

@ -25,6 +25,8 @@ Summary: File browser for Cinnamon
Url: http://github.com/linuxmint/nemo Url: http://github.com/linuxmint/nemo
Group: System/GUI/Other Group: System/GUI/Other
Source: %{name}-%{version}.tar.gz Source: %{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE fix upstream g_list_copy_deep on 12.2
Patch: nemo-2.0.1-g_list_copy_deep.patch
BuildRequires: gnome-common BuildRequires: gnome-common
BuildRequires: gtk-doc BuildRequires: gtk-doc
BuildRequires: hicolor-icon-theme BuildRequires: hicolor-icon-theme
@ -64,7 +66,7 @@ Nemo is the file manager for the Cinnamon desktop environment.
Summary: Development files for %{name} Summary: Development files for %{name}
Group: Development/Libraries/Other Group: Development/Libraries/Other
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: typelib-1_0-Nemo-1_0 = %{version} Requires: typelib-1_0-Nemo-3_0 = %{version}
%description devel %description devel
Nemo is the file manager for the Cinnamon desktop environment. Nemo is the file manager for the Cinnamon desktop environment.
@ -80,17 +82,20 @@ Nemo is the file manager for the Cinnamon desktop environment.
This package provides Nemo's shared libraries. This package provides Nemo's shared libraries.
%package -n typelib-1_0-Nemo-1_0 %package -n typelib-1_0-Nemo-3_0
Summary: File Browser for Cinnamon - Introspection bindings Summary: File Browser for Cinnamon - Introspection bindings
Group: System/Libraries Group: System/Libraries
%description -n typelib-1_0-Nemo-1_0 %description -n typelib-1_0-Nemo-3_0
Nemo is the file manager for the Cinnamon desktop environment. Nemo is the file manager for the Cinnamon desktop environment.
This package provides the GObject Introspection bindings for Nemo. This package provides the GObject Introspection bindings for Nemo.
%prep %prep
%setup -q %setup -q
%if 0%{?suse_version} = 1220
patch -p1
%endif
%build %build
NOCONFIGURE=1 ./autogen.sh NOCONFIGURE=1 ./autogen.sh