summaryrefslogtreecommitdiff
blob: 73cc912503ef89adef6fa5f48a696d4f5cb0b365 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
From e868c0c306c31ffb9b65ca8555fd27cdc53a083d Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 5 Oct 2010 14:12:00 +0100
Subject: [PATCH] Remove app lookup extension

Now done in GIO itself

https://bugzilla.gnome.org/show_bug.cgi?id=631398
---
 Makefile.am             |    1 -
 configure.ac            |    1 -
 gconf/Makefile.am       |   32 ---------
 gconf/gapplookupgconf.c |  178 -----------------------------------------------
 gconf/gapplookupgconf.h |   51 -------------
 gconf/gconf-module.c    |   55 ---------------
 6 files changed, 0 insertions(+), 318 deletions(-)
 delete mode 100644 gconf/Makefile.am
 delete mode 100644 gconf/gapplookupgconf.c
 delete mode 100644 gconf/gapplookupgconf.h
 delete mode 100644 gconf/gconf-module.c

diff --git a/Makefile.am b/Makefile.am
index 95d0654..23261da 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,6 @@ SUBDIRS = \
 	client \
 	daemon \
 	monitor \
-	gconf \
 	po   \
 	programs \
 	test \
diff --git a/configure.ac b/configure.ac
index a4e3387..94c870e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -704,7 +704,6 @@ monitor/hal/Makefile
 monitor/gdu/Makefile
 monitor/gphoto2/Makefile
 monitor/afc/Makefile
-gconf/Makefile
 programs/Makefile
 test/Makefile
 po/Makefile.in
diff --git a/gconf/Makefile.am b/gconf/Makefile.am
deleted file mode 100644
index 85d4d8d..0000000
--- a/gconf/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-
-NULL =
-
-module_flags = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload|query)'
-
-if USE_GCONF
-giomodules_LTLIBRARIES = libgiogconf.la
-endif
-
-libgiogconf_la_SOURCES =				\
-	gapplookupgconf.c gapplookupgconf.h		\
-	gconf-module.c					\
-	$(NULL)
-
-libgiogconf_la_CFLAGS =		\
-	-DG_LOG_DOMAIN=\"GVFS-GConf\"		\
-	-I$(top_srcdir)/common                  \
-	$(GLIB_CFLAGS)                          \
-	$(GCONF_CFLAGS)                         \
-	-DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"	\
-	-DGVFS_LOCALEDIR=\""$(localedir)"\"	\
-	-DG_DISABLE_DEPRECATED			\
-	$(NULL)
-
-libgiogconf_la_LDFLAGS = 	\
-	$(module_flags)         \
-	$(NULL)
-
-libgiogconf_la_LIBADD  =	     \
-	$(GLIB_LIBS)                 \
-	$(GCONF_LIBS)                \
-	$(NULL)
diff --git a/gconf/gapplookupgconf.c b/gconf/gapplookupgconf.c
deleted file mode 100644
index 2690265..0000000
--- a/gconf/gapplookupgconf.c
+++ /dev/null
@@ -1,178 +0,0 @@
-
-/* GIO - GLib Input, Output and Streaming Library
- * 
- * Copyright (C) 2006-2007 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Alexader Larsson <alexl@redhat.com>
- */
-
-#include <config.h>
-
-#include <string.h>
-
-#include <glib.h>
-#include <glib/gi18n-lib.h>
-#include <gio/gio.h>
-#include <gconf/gconf-client.h>
-
-#include "gapplookupgconf.h"
-
-
-struct _GAppLookupGConf {
-  GObject parent;
-
-};
-
-static void lookup_iface_init (GDesktopAppInfoLookupIface *iface);
-static void g_app_lookup_gconf_finalize (GObject *object);
-
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (GAppLookupGConf, g_app_lookup_gconf, G_TYPE_OBJECT, 0,
-                                G_IMPLEMENT_INTERFACE_DYNAMIC (G_TYPE_DESKTOP_APP_INFO_LOOKUP,
-							       lookup_iface_init))
-
-static void
-g_app_lookup_gconf_finalize (GObject *object)
-{
-  if (G_OBJECT_CLASS (g_app_lookup_gconf_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_app_lookup_gconf_parent_class)->finalize) (object);
-}
-
-static GObject *
-g_app_lookup_gconf_constructor (GType                  type,
-                                guint                  n_construct_properties,
-                                GObjectConstructParam *construct_properties)
-{
-  GObject *object;
-  GAppLookupGConfClass *klass;
-  GObjectClass *parent_class;  
-
-  object = NULL;
-
-  /* Invoke parent constructor. */
-  klass = G_APP_LOOKUP_GCONF_CLASS (g_type_class_peek (G_TYPE_APP_LOOKUP_GCONF));
-  parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
-  object = parent_class->constructor (type,
-                                      n_construct_properties,
-                                      construct_properties);
-
-  return object;
-}
-
-static void
-g_app_lookup_gconf_init (GAppLookupGConf *lookup)
-{
-}
-
-static void
-g_app_lookup_gconf_class_finalize (GAppLookupGConfClass *klass)
-{
-}
-
-
-static void
-g_app_lookup_gconf_class_init (GAppLookupGConfClass *klass)
-{
-  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
-  gobject_class->constructor = g_app_lookup_gconf_constructor;
-  gobject_class->finalize = g_app_lookup_gconf_finalize;
-}
-
-#define GCONF_PATH_PREFIX "/desktop/gnome/url-handlers/"
-
-static GAppInfo *
-get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup,
-                            const char  *uri_scheme)
-{
-  GAppInfo *appinfo;
-  GConfClient *client;
-  char *command_key, *enabled_key, *terminal_key, *command;
-  gboolean enabled, needs_terminal;
-  GAppInfoCreateFlags flags;
-
-  appinfo = NULL;
-  
-  client = gconf_client_get_default ();
-  
-  command_key = g_strconcat (GCONF_PATH_PREFIX,
-                             uri_scheme,
-                             "/command",
-                             NULL);
-  command = gconf_client_get_string (client,
-                                     command_key,
-                                     NULL);
-  g_free (command_key);
-  if (command)
-    {
-      enabled_key = g_strconcat (GCONF_PATH_PREFIX,
-                                 uri_scheme,
-                                 "/enabled",
-                                 NULL);
-      enabled = gconf_client_get_bool (client,
-                                       enabled_key,
-                                       NULL);
-      g_free (enabled_key);
-      
-      terminal_key = g_strconcat (GCONF_PATH_PREFIX,
-                                  uri_scheme,
-                                  "/needs_terminal",
-                                  NULL);
-      needs_terminal = gconf_client_get_bool (client,
-                                              terminal_key,
-                                              NULL);
-      g_free (terminal_key);
-
-      if (enabled)
-        {
-          if (g_str_has_suffix (command, "\"%s\"") ||
-              g_str_has_suffix (command, "\'%s\'"))
-            command[strlen (command) - 4] = 0;
-          else if (g_str_has_suffix (command, "%s"))
-            command[strlen (command) - 2] = 0;
-
-          flags = G_APP_INFO_CREATE_SUPPORTS_URIS;
-          if (needs_terminal)
-            flags |= G_APP_INFO_CREATE_NEEDS_TERMINAL;
-          appinfo = g_app_info_create_from_commandline (command,
-                                                        NULL,
-                                                        flags,
-                                                        NULL);
-        }
-    }
-  
-  g_object_unref (client);
-  g_free (command);
-  
-  return appinfo;
-}
-
-static void
-lookup_iface_init (GDesktopAppInfoLookupIface *iface)
-{
-  iface->get_default_for_uri_scheme = get_default_for_uri_scheme;
-}
-
-void 
-g_app_lookup_gconf_register (GIOModule *module)
-{
-  g_app_lookup_gconf_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME,
-				  G_TYPE_APP_LOOKUP_GCONF,
-				  "gconf",
-				  10);
-}
diff --git a/gconf/gapplookupgconf.h b/gconf/gapplookupgconf.h
deleted file mode 100644
index a268415..0000000
--- a/gconf/gapplookupgconf.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* GIO - GLib Input, Output and Streaming Library
- * 
- * Copyright (C) 2006-2007 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Alexander Larsson <alexl@redhat.com>
- */
-
-#ifndef __G_APP_LOOKUP_GCONF_H__
-#define __G_APP_LOOKUP_GCONF_H__
-
-#include <glib-object.h>
-#include <gio/gio.h>
-#include <gio/gdesktopappinfo.h>
-
-
-G_BEGIN_DECLS
-
-#define G_TYPE_APP_LOOKUP_GCONF        (g_app_lookup_gconf_get_type ())
-#define G_APP_LOOKUP_GCONF(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_APP_LOOKUP_GCONF, GAppLookupGConf))
-#define G_APP_LOOKUP_GCONF_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_APP_LOOKUP_GCONF, GAppLookupGConfClass))
-#define G_IS_APP_LOOKUP_GCONF(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_APP_LOOKUP_GCONF))
-#define G_IS_APP_LOOKUP_GCONF_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_APP_LOOKUP_GCONF))
-
-typedef struct _GAppLookupGConf GAppLookupGConf;
-typedef struct _GAppLookupGConfClass GAppLookupGConfClass;
-
-struct _GAppLookupGConfClass {
-  GObjectClass parent_class;
-};
-
-GType g_app_lookup_gconf_get_type (void) G_GNUC_CONST;
-void  g_app_lookup_gconf_register (GIOModule         *module);
-
-G_END_DECLS
-
-#endif /* __G_APP_LOOKUP_GCONF_H__ */
diff --git a/gconf/gconf-module.c b/gconf/gconf-module.c
deleted file mode 100644
index e5753a6..0000000
--- a/gconf/gconf-module.c
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* GIO - GLib Input, Output and Streaming Library
- * 
- * Copyright (C) 2006-2007 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: David Zeuthen <davidz@redhat.com>
- */
-
-#include <config.h>
-
-#include <glib.h>
-#include <glib/gi18n-lib.h>
-#include <gmodule.h>
-#include <gio/gio.h>
-
-#include "gapplookupgconf.h"
-
-void
-g_io_module_load (GIOModule *module)
-{
-  bindtextdomain (GETTEXT_PACKAGE, GVFS_LOCALEDIR);
-  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-
-  g_app_lookup_gconf_register (module);
-}
-
-void
-g_io_module_unload (GIOModule *module)
-{
-}
-
-char **
-g_io_module_query (void)
-{
-  char *eps[] = {
-    G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME,
-    NULL
-  };
-  return g_strdupv (eps);
-}
-- 
1.7.2.2