summaryrefslogtreecommitdiff
path: root/meta/packages/gtk+
diff options
context:
space:
mode:
authorTomas Frydrych <tf@openedhand.com>2007-02-08 11:48:46 +0000
committerTomas Frydrych <tf@openedhand.com>2007-02-08 11:48:46 +0000
commit716fdb209552960679c93cc110e804484f0de943 (patch)
tree344d681e77340d51a5a421fbbbc4aaef2acb564b /meta/packages/gtk+
parentc179a53fec6fd41d554570739d57f9bbaa55078c (diff)
downloadopenembedded-core-716fdb209552960679c93cc110e804484f0de943.tar.gz
openembedded-core-716fdb209552960679c93cc110e804484f0de943.tar.bz2
openembedded-core-716fdb209552960679c93cc110e804484f0de943.zip
update volumes patch to work with utf8 filesystem
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1264 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gtk+')
-rw-r--r--meta/packages/gtk+/gtk+-2.6.8/filesystem-volumes.patch54
-rw-r--r--meta/packages/gtk+/gtk+_2.6.8.bb2
2 files changed, 41 insertions, 15 deletions
diff --git a/meta/packages/gtk+/gtk+-2.6.8/filesystem-volumes.patch b/meta/packages/gtk+/gtk+-2.6.8/filesystem-volumes.patch
index f0d25390b5..4386d83ee9 100644
--- a/meta/packages/gtk+/gtk+-2.6.8/filesystem-volumes.patch
+++ b/meta/packages/gtk+/gtk+-2.6.8/filesystem-volumes.patch
@@ -1,5 +1,5 @@
---- gtk+-2.6.8/gtk/gtkfilesystemunix.c.orig 2007-02-08 10:05:19.000000000 +0000
-+++ gtk+-2.6.8/gtk/gtkfilesystemunix.c 2007-02-08 10:05:19.000000000 +0000
+--- gtk+-2.6.8/gtk/gtkfilesystemunix.c.orig 2007-02-08 12:01:19.000000000 +0000
++++ gtk+-2.6.8/gtk/gtkfilesystemunix.c 2007-02-08 12:01:19.000000000 +0000
@@ -33,6 +33,7 @@
#include <errno.h>
#include <string.h>
@@ -59,7 +59,27 @@
}
static GtkFileSystemVolume *
-@@ -590,7 +633,7 @@
+@@ -375,10 +418,15 @@
+
+ len = strlen (filename);
+
+- if (len > 1 && filename[len - 1] == '/')
+- return g_strndup (filename, len - 1);
+- else
+- return g_memdup (filename, len + 1);
++ if (len > 1)
++ {
++ gchar *c = g_utf8_prev_char (filename + len);
++
++ if (c && *c == '/')
++ return g_strndup (filename, len - 1);
++ }
++
++ return g_memdup (filename, len + 1);
+ }
+
+ static GtkFileFolder *
+@@ -590,7 +638,7 @@
gtk_file_system_unix_volume_get_base_path (GtkFileSystem *file_system,
GtkFileSystemVolume *volume)
{
@@ -68,14 +88,15 @@
}
static gboolean
-@@ -616,7 +659,29 @@
+@@ -616,7 +664,32 @@
gtk_file_system_unix_volume_get_display_name (GtkFileSystem *file_system,
GtkFileSystemVolume *volume)
{
- return g_strdup (_("Filesystem")); /* Same as Nautilus */
+ gchar * slash;
+ gchar * path;
-+
++ gchar * c;
++
+ g_return_val_if_fail (file_system && volume, NULL);
+
+ path = gtk_file_system_path_to_filename (file_system, (GtkFilePath*) volume);
@@ -87,10 +108,12 @@
+
+ /* Now the media volumes */
+ /* strip trailing / if any */
-+ if (path[strlen(path)-1] == '/')
-+ path[strlen(path)-1] = 0;
++ c = g_utf8_prev_char (path + strlen(path));
++
++ if (*c == '/')
++ *c = 0;
+
-+ slash = strrchr (path, '/');
++ slash = g_utf8_strrchr (path, -1, '/');
+
+ if (!slash)
+ return g_strdup (path);
@@ -99,12 +122,13 @@
}
static IconType
-@@ -787,11 +852,51 @@
+@@ -787,11 +860,54 @@
GError **error)
{
GdkPixbuf *pixbuf;
+ gchar * slash;
+ gchar * path;
++ gchar * c;
+ const gchar * id = NULL;
+
+ g_return_val_if_fail (file_system && volume, NULL);
@@ -122,11 +146,13 @@
+ {
+ /* Now the media volumes */
+ /* strip trailing / if any */
-+ if (path[strlen(path)-1] == '/')
-+ path[strlen(path)-1] = 0;
-+
-+ slash = strrchr (path, '/');
++ c = g_utf8_prev_char (path + strlen(path));
++
++ if (*c == '/')
++ *c = 0;
+
++ slash = g_utf8_strrchr (path, -1, '/');
+
+ if (slash)
+ {
+ slash++;
@@ -143,7 +169,7 @@
+ id = "gnome-dev-removable";
+ }
+ }
-
++
+ if (id)
+ {
+ pixbuf = get_cached_icon (widget, id, pixel_size);
diff --git a/meta/packages/gtk+/gtk+_2.6.8.bb b/meta/packages/gtk+/gtk+_2.6.8.bb
index 7b407c0f3c..50990f14b9 100644
--- a/meta/packages/gtk+/gtk+_2.6.8.bb
+++ b/meta/packages/gtk+/gtk+_2.6.8.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.gtk.org"
SECTION = "libs"
PRIORITY = "optional"
DEPENDS = "glib-2.0 pango atk jpeg libpng libxext libxcursor gtk-doc libgcrypt"
-PR = "r2"
+PR = "r3"
SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.6/gtk+-${PV}.tar.bz2 \
file://no-demos.patch;patch=1 \