Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=xfcetesting.git;a=commitdiff;h=54f1d03f85856f7d5c3be5e437c4b95e2b274562

commit 54f1d03f85856f7d5c3be5e437c4b95e2b274562
Author: Daniel <devil505@poseidon.(none)>
Date:   Wed Feb 23 11:41:06 2011 +0100

glib2-2.28.1-2-i686
* re-added 71_gio_launch_handler.patch

diff --git a/source/base/glib2/71_gio_launch_handler.patch 
b/source/base/glib2/71_gio_launch_handler.patch
new file mode 100644
index 0000000..607ae93
--- /dev/null
+++ b/source/base/glib2/71_gio_launch_handler.patch
@@ -0,0 +1,234 @@
+From 41a32799fa223937e5e980ffb8c268b183c416e2 Mon Sep 17 00:00:00 2001
+From: Mikkel Kamstrup Erlandsen <mikkel.kamst...@canonical.com>
+Date: Wed, 18 Aug 2010 12:02:10 +0200
+Subject: [PATCH] gio: New extension point "gio-desktop-app-info-launch-handler"
+
+Add an extension point that gets a callback each time a GAppInfo
+is launched. The callback receives the GAppInfo, the list of URIs,
+the launch context, and the pid.
+---
+ gio/gdesktopappinfo.c |  123 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ gio/gdesktopappinfo.h |   31 ++++++++++++
+ gio/gio.symbols       |    1 +
+ gio/giomodule.c       |    3 +
+ 4 files changed, 157 insertions(+), 1 deletions(-)
+
+Index: glib-2.27.90/gio/gdesktopappinfo.c
+===================================================================
+--- glib-2.27.90.orig/gio/gdesktopappinfo.c    2011-01-06 16:36:16.806667001 
+1100
++++ glib-2.27.90/gio/gdesktopappinfo.c 2011-01-06 16:57:33.176667000 +1100
+@@ -74,6 +74,12 @@
+ static void     mime_info_cache_reload                (const char       *dir);
+ static gboolean g_desktop_app_info_ensure_saved       (GDesktopAppInfo  *info,
+                                                      GError          **error);
++static void
++g_desktop_app_info_launch_handler_on_launched (GDesktopAppInfoLaunchHandler 
*launch_handler,
++                                               GDesktopAppInfo              
*app_info,
++                                               GList                        
*uris,
++                                               GAppLaunchContext            
*launch_ctx,
++                                               gint                          
pid);
+
+ /**
+  * GDesktopAppInfo:
+@@ -973,6 +979,49 @@
+   g_object_unref (msg);
+ }
+
++static void
++g_desktop_app_info_on_launched (GDesktopAppInfo   *app_info,
++                                GList             *uris,
++                                GAppLaunchContext *launch_ctx,
++                                gint               pid)
++{
++  static gsize lookup = 0;
++
++  if (g_once_init_enter (&lookup))
++    {
++      gsize setup_value = 1;
++      GDesktopAppInfoLaunchHandler *lookup_instance;
++      GIOExtensionPoint *ep;
++      GIOExtension *extension;
++      GList *l;
++
++      /* Ensure vfs in modules loaded */
++      _g_io_modules_ensure_loaded ();
++
++      ep = g_io_extension_point_lookup 
(G_DESKTOP_APP_INFO_LAUNCH_HANDLER_EXTENSION_POINT_NAME);
++
++      lookup_instance = NULL;
++      for (l = g_io_extension_point_get_extensions (ep); l != NULL; l = 
l->next)
++        {
++          extension = l->data;
++          lookup_instance = g_object_new (g_io_extension_get_type 
(extension), NULL);
++          if (lookup_instance != NULL)
++            break;
++            }
++
++      if (lookup_instance != NULL)
++        setup_value = (gsize)lookup_instance;
++
++      g_once_init_leave (&lookup, setup_value);
++    }
++
++  if (lookup == 1)
++    return;
++
++  g_desktop_app_info_launch_handler_on_launched 
(G_DESKTOP_APP_INFO_LAUNCH_HANDLER (lookup),
++                                                 app_info, uris, launch_ctx, 
pid);
++}
++
+ #define _SPAWN_FLAGS_DEFAULT (G_SPAWN_SEARCH_PATH)
+
+ static gboolean
+@@ -1064,6 +1113,10 @@
+
+         goto out;
+       }
++      else
++        {
++          g_desktop_app_info_on_launched (info, old_uris, launch_context, 
pid);
++        }
+
+       if (pid_callback != NULL)
+       pid_callback (info, pid, pid_callback_data);
+@@ -3086,6 +3139,72 @@
+   return desktop_entries;
+ }
+
++/* GDesktopAppInfoLaunchHandler interface: */
++
++static void g_desktop_app_info_launch_handler_base_init (gpointer g_class);
++static void g_desktop_app_info_launch_handler_class_init (gpointer g_class,
++                                                gpointer class_data);
++
++GType
++g_desktop_app_info_launch_handler_get_type (void)
++{
++  static volatile gsize g_define_type_id__volatile = 0;
++
++  if (g_once_init_enter (&g_define_type_id__volatile))
++    {
++      const GTypeInfo desktop_app_info_launch_handler_info =
++      {
++        sizeof (GDesktopAppInfoLaunchHandlerIface), /* class_size */
++              g_desktop_app_info_launch_handler_base_init,   /* base_init */
++              NULL,           /* base_finalize */
++              g_desktop_app_info_launch_handler_class_init,
++              NULL,           /* class_finalize */
++              NULL,           /* class_data */
++              0,
++              0,              /* n_preallocs */
++              NULL
++      };
++
++      GType g_define_type_id =
++                    g_type_register_static (G_TYPE_INTERFACE,
++                                            
I_("GDesktopAppInfoLaunchHandler"),
++                                                      
&desktop_app_info_launch_handler_info, 0);
++
++      g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_OBJECT);
++
++      g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
++    }
++
++  return g_define_type_id__volatile;
++}
++
++static void
++g_desktop_app_info_launch_handler_class_init (gpointer g_class,
++                                    gpointer class_data)
++{
++}
++
++static void
++g_desktop_app_info_launch_handler_base_init (gpointer g_class)
++{
++}
++
++static void
++g_desktop_app_info_launch_handler_on_launched (GDesktopAppInfoLaunchHandler 
*launch_handler,
++                                               GDesktopAppInfo              
*app_info,
++                                               GList                        
*uris,
++                                               GAppLaunchContext            
*launch_ctx,
++                                               gint                          
pid)
++{
++  GDesktopAppInfoLaunchHandlerIface *iface;
++
++  g_return_if_fail (G_IS_DESKTOP_APP_INFO_LAUNCH_HANDLER (launch_handler));
++
++  iface = G_DESKTOP_APP_INFO_LAUNCH_HANDLER_GET_IFACE (launch_handler);
++
++  (* iface->on_launched) (launch_handler, app_info, uris, launch_ctx, pid);
++}
++
+ /* GDesktopAppInfoLookup interface: */
+
+ typedef GDesktopAppInfoLookupIface GDesktopAppInfoLookupInterface;
+Index: glib-2.27.90/gio/gdesktopappinfo.h
+===================================================================
+--- glib-2.27.90.orig/gio/gdesktopappinfo.h    2011-01-06 16:36:16.786667001 
+1100
++++ glib-2.27.90/gio/gdesktopappinfo.h 2011-01-06 16:46:46.426667000 +1100
+@@ -119,6 +119,37 @@
+
+ #endif /* G_DISABLE_DEPRECATED */
+
++
++
++#define G_TYPE_DESKTOP_APP_INFO_LAUNCH_HANDLER           
(g_desktop_app_info_launch_handler_get_type ())
++#define G_DESKTOP_APP_INFO_LAUNCH_HANDLER(obj)           
(G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DESKTOP_APP_INFO_LAUNCH_HANDLER, 
GDesktopAppInfoLaunchHandler))
++#define G_IS_DESKTOP_APP_INFO_LAUNCH_HANDLER(obj)      
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DESKTOP_APP_INFO_LAUNCH_HANDLER))
++#define G_DESKTOP_APP_INFO_LAUNCH_HANDLER_GET_IFACE(obj) 
(G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DESKTOP_APP_INFO_LAUNCH_HANDLER, 
GDesktopAppInfoLaunchHandlerIface))
++
++/**
++ * G_DESKTOP_APP_INFO_LAUNCH_HANDLER_EXTENSION_POINT_NAME:
++ *
++ * Extension point for default handler to launching. See
++ * <link linkend="extending-gio">Extending GIO</link>.
++ */
++#define G_DESKTOP_APP_INFO_LAUNCH_HANDLER_EXTENSION_POINT_NAME 
"gio-desktop-app-info-launch-handler"
++
++typedef struct _GDesktopAppInfoLaunchHandler GDesktopAppInfoLaunchHandler;
++typedef struct _GDesktopAppInfoLaunchHandlerIface 
GDesktopAppInfoLaunchHandlerIface;
++
++struct _GDesktopAppInfoLaunchHandlerIface
++{
++  GTypeInterface g_iface;
++
++  void (* on_launched) (GDesktopAppInfoLaunchHandler *launch_handler,
++                        GDesktopAppInfo              *app_info,
++                        GList                        *uris,
++                        GAppLaunchContext            *launch_ctx,
++                        gint                          pid);
++};
++
++GType     g_desktop_app_info_launch_handler_get_type                   (void) 
G_GNUC_CONST;
++
+ G_END_DECLS
+
+ #endif /* __G_DESKTOP_APP_INFO_H__ */
+Index: glib-2.27.90/gio/gio.symbols
+===================================================================
+--- glib-2.27.90.orig/gio/gio.symbols  2011-01-06 16:36:16.786667001 +1100
++++ glib-2.27.90/gio/gio.symbols       2011-01-06 16:46:46.426667000 +1100
+@@ -133,6 +133,7 @@
+ g_desktop_app_info_get_filename
+ g_desktop_app_info_get_is_hidden
+ g_desktop_app_info_get_type G_GNUC_CONST
++g_desktop_app_info_launch_handler_on_launched
+ g_desktop_app_info_launch_uris_as_manager
+ g_desktop_app_info_lookup_get_type G_GNUC_CONST
+ g_desktop_app_info_lookup_get_default_for_uri_scheme
+Index: glib-2.27.90/gio/giomodule.c
+===================================================================
+--- glib-2.27.90.orig/gio/giomodule.c  2011-01-06 16:36:16.796667001 +1100
++++ glib-2.27.90/gio/giomodule.c       2011-01-06 16:46:46.426667000 +1100
+@@ -559,6 +559,9 @@
+       ep = g_io_extension_point_register (G_PROXY_EXTENSION_POINT_NAME);
+       g_io_extension_point_set_required_type (ep, G_TYPE_PROXY);
+
++      ep = g_io_extension_point_register 
(G_DESKTOP_APP_INFO_LAUNCH_HANDLER_EXTENSION_POINT_NAME);
++      g_io_extension_point_set_required_type (ep, 
G_TYPE_DESKTOP_APP_INFO_LAUNCH_HANDLER);
++
+       ep = g_io_extension_point_register (G_TLS_BACKEND_EXTENSION_POINT_NAME);
+       g_io_extension_point_set_required_type (ep, G_TYPE_TLS_BACKEND);
+     }
diff --git a/source/base/glib2/FrugalBuild b/source/base/glib2/FrugalBuild
index b586960..7e80007 100644
--- a/source/base/glib2/FrugalBuild
+++ b/source/base/glib2/FrugalBuild
@@ -5,7 +5,7 @@ USE_DOC=${USE_DOC:-"y"}

pkgname=glib2
pkgver=2.28.1
-pkgrel=1
+pkgrel=2
pkgdesc="Common C routines used by GTK+2 and other libraries"
url="http://www.gtk.org/";
depends=('glibc>=2.9-2')
@@ -19,10 +19,12 @@ _F_cd_path="glib-$pkgver"
## DON'T remove nor change the debug level or it breaks again ..
source=($source \
glib2.sh \
-       glib2.csh)
+       glib2.csh \
+       71_gio_launch_handler.patch)
sha1sums=('f65a89d0a15d0dab07959d01f88502531a4d7ea5' \
'bfe05590a6498259f1045a591fd886a8572f271a' \
-          '6db09da816d69aab7a5cbf3460ee082bef200891')
+          '6db09da816d69aab7a5cbf3460ee082bef200891' \
+          '794b92b0088043adcf67e8bf3c34b0bddc59eb13')
if Fuse $USE_DOC; then
makedepends=("${makedepends[@]}" 'gtk-doc>=1.11')
Fconfopts="$Fconfopts --enable-gtk-doc"
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to