17927
|
1 |
diff -urB fsexam-0.8.1.orig/configure.in fsexam-0.8.1.hacked/configure.in
|
|
2 |
--- fsexam-0.8.1.orig/configure.in 2010-04-23 14:41:32.385944606 +0100
|
|
3 |
+++ fsexam-0.8.1.hacked/configure.in 2010-04-23 14:54:34.931729119 +0100
|
|
4 |
@@ -65,8 +65,7 @@
|
|
5 |
[gnome-desktop-2.0 >= 2.0 \
|
|
6 |
libgnomeui-2.0 >= 2.0 \
|
|
7 |
libglade-2.0 >= 2.0 \
|
|
8 |
- gnome-vfs-module-2.0 >= 2.0 \
|
|
9 |
- eel-2.0 >= 2.2.3])
|
|
10 |
+ gnome-vfs-module-2.0 >= 2.0])
|
|
11 |
|
|
12 |
PKG_CHECK_MODULES(DUMMY,
|
|
13 |
[glib-2.0 >= 2.8],
|
|
14 |
diff -urB fsexam-0.8.1.orig/src/fsexam-dnd.c fsexam-0.8.1.hacked/src/fsexam-dnd.c
|
|
15 |
--- fsexam-0.8.1.orig/src/fsexam-dnd.c 2009-02-10 07:31:50.000000000 +0000
|
|
16 |
+++ fsexam-0.8.1.hacked/src/fsexam-dnd.c 2010-04-23 14:53:51.385616947 +0100
|
|
17 |
@@ -34,8 +34,6 @@
|
|
18 |
#include <libgnome/libgnome.h>
|
|
19 |
#include <libgnomeui/libgnomeui.h>
|
|
20 |
#include <libgnomevfs/gnome-vfs.h>
|
|
21 |
-#include <eel/eel-vfs-extensions.h>
|
|
22 |
-#include <eel/eel-string.h>
|
|
23 |
#include <stdio.h>
|
|
24 |
|
|
25 |
#include "fsexam-header.h"
|
|
26 |
@@ -54,6 +52,41 @@
|
|
27 |
{"x-special/gnome-icon-list", 0, FSEXAM_ICON_DND_GNOME_ICON_LIST}
|
|
28 |
};
|
|
29 |
|
|
30 |
+static gboolean
|
|
31 |
+_uri_has_prefix (const char *haystack, const char *needle)
|
|
32 |
+{
|
|
33 |
+ const char *h, *n;
|
|
34 |
+ char hc, nc;
|
|
35 |
+
|
|
36 |
+ h = haystack == NULL ? "" : haystack;
|
|
37 |
+ n = needle == NULL ? "" : needle;
|
|
38 |
+ do {
|
|
39 |
+ if (*n == '\0') {
|
|
40 |
+ return TRUE;
|
|
41 |
+ }
|
|
42 |
+ if (*h == '\0') {
|
|
43 |
+ return FALSE;
|
|
44 |
+ }
|
|
45 |
+ hc = *h++;
|
|
46 |
+ nc = *n++;
|
|
47 |
+ hc = g_ascii_tolower (hc);
|
|
48 |
+ nc = g_ascii_tolower (nc);
|
|
49 |
+ } while (hc == nc);
|
|
50 |
+ return FALSE;
|
|
51 |
+}
|
|
52 |
+
|
|
53 |
+static gboolean
|
|
54 |
+_uri_is_desktop (gchar *uri)
|
|
55 |
+{
|
|
56 |
+ return _uri_has_prefix (uri, "x-nautilus-desktop:");
|
|
57 |
+}
|
|
58 |
+
|
|
59 |
+static gboolean
|
|
60 |
+_uri_is_trash (gchar *uri)
|
|
61 |
+{
|
|
62 |
+ return _uri_has_prefix (uri, "trash:");
|
|
63 |
+}
|
|
64 |
+
|
|
65 |
static void
|
|
66 |
drag_data_received_callback (GtkWidget *widget,
|
|
67 |
GdkDragContext *context,
|
|
68 |
@@ -93,8 +126,8 @@
|
|
69 |
if (local_path) {
|
|
70 |
fsexam_change_dir (local_path);
|
|
71 |
} else {
|
|
72 |
- if (eel_uri_is_desktop (canonical_uri)
|
|
73 |
- || eel_uri_is_trash (canonical_uri)) {
|
|
74 |
+ if (_uri_is_desktop (canonical_uri)
|
|
75 |
+ || _uri_is_trash (canonical_uri)) {
|
|
76 |
gchar *uri = NULL;
|
|
77 |
p = strstr(canonical_uri, ":");
|
|
78 |
if (p != NULL) {
|