--- bamf-0.2.58.orig/debian/libbamf0.symbols +++ bamf-0.2.58/debian/libbamf0.symbols @@ -0,0 +1,74 @@ +libbamf.so.0 libbamf0 #MINVER# + bamf_application_get_application_type@Base 0.2.20 + bamf_application_get_desktop_file@Base 0.2.20 + bamf_application_get_show_menu_stubs@Base 0.2.48 + bamf_application_get_type@Base 0.2.20 + bamf_application_get_windows@Base 0.2.20 + bamf_application_get_xids@Base 0.2.20 + bamf_application_new@Base 0.2.20 + bamf_control_get_default@Base 0.2.20 + bamf_control_get_type@Base 0.2.20 + bamf_control_insert_desktop_file@Base 0.2.20 + bamf_control_register_application_for_pid@Base 0.2.20 + bamf_control_register_tab_provider@Base 0.2.20 + bamf_control_set_approver_behavior@Base 0.2.44 + bamf_factory_get_default@Base 0.2.20 + bamf_factory_get_type@Base 0.2.20 + bamf_factory_view_for_path@Base 0.2.20 + bamf_indicator_get_dbus_menu_path@Base 0.2.36 + bamf_indicator_get_remote_address@Base 0.2.36 + bamf_indicator_get_remote_path@Base 0.2.36 + bamf_indicator_get_type@Base 0.2.36 + bamf_indicator_new@Base 0.2.36 + bamf_marshal_VOID__OBJECT_OBJECT@Base 0.2.24 + bamf_marshal_VOID__STRING_STRING@Base 0.2.20 + bamf_marshal_VOID__STRING_STRING_STRING@Base 0.2.20 + bamf_matcher_application_is_running@Base 0.2.20 + bamf_matcher_get_active_application@Base 0.2.20 + bamf_matcher_get_active_window@Base 0.2.20 + bamf_matcher_get_application_for_window@Base 0.2.48 + bamf_matcher_get_application_for_xid@Base 0.2.20 + bamf_matcher_get_applications@Base 0.2.20 + bamf_matcher_get_default@Base 0.2.20 + bamf_matcher_get_running_applications@Base 0.2.20 + bamf_matcher_get_tabs@Base 0.2.20 + bamf_matcher_get_type@Base 0.2.20 + bamf_matcher_get_windows@Base 0.2.46 + bamf_matcher_get_xids_for_application@Base 0.2.20 + bamf_matcher_register_favorites@Base 0.2.46 + bamf_tab_get_id@Base 0.2.28 + bamf_tab_get_preview@Base 0.2.28 + bamf_tab_get_type@Base 0.2.28 + bamf_tab_get_uri@Base 0.2.28 + bamf_tab_new@Base 0.2.28 + bamf_tab_set_preview@Base 0.2.28 + bamf_tab_set_uri@Base 0.2.28 + bamf_tab_show@Base 0.2.28 + bamf_tab_source_get_tab_ids@Base 0.2.20 + bamf_tab_source_get_tab_preview@Base 0.2.20 + bamf_tab_source_get_tab_uri@Base 0.2.20 + bamf_tab_source_get_tab_xid@Base 0.2.20 + bamf_tab_source_get_type@Base 0.2.20 + bamf_tab_source_show_tab@Base 0.2.20 + bamf_view_get_children@Base 0.2.20 + bamf_view_get_icon@Base 0.2.20 + bamf_view_get_name@Base 0.2.20 + bamf_view_get_type@Base 0.2.20 + bamf_view_get_view_type@Base 0.2.20 + bamf_view_is_active@Base 0.2.20 + bamf_view_is_closed@Base 0.2.54 + bamf_view_is_running@Base 0.2.20 + bamf_view_is_urgent@Base 0.2.20 + bamf_view_user_visible@Base 0.2.20 + bamf_window_get_transient@Base 0.2.28 + bamf_window_get_type@Base 0.2.20 + bamf_window_get_window_type@Base 0.2.46 + bamf_window_get_xid@Base 0.2.20 + bamf_window_last_active@Base 0.2.30 + bamf_window_new@Base 0.2.20 + dbus_glib_bamf_tab_source_object_info@Base 0.2.20 + dbus_glib_marshal_bamf_tab_source_BOOLEAN__STRING_POINTER@Base 0.2.20 + dbus_glib_marshal_bamf_tab_source_BOXED__STRING@Base 0.2.20 + dbus_glib_marshal_bamf_tab_source_BOXED__VOID@Base 0.2.20 + dbus_glib_marshal_bamf_tab_source_STRING__STRING@Base 0.2.20 + dbus_glib_marshal_bamf_tab_source_UINT__STRING@Base 0.2.20 --- bamf-0.2.58.orig/debian/compat +++ bamf-0.2.58/debian/compat @@ -0,0 +1 @@ +5 --- bamf-0.2.58.orig/debian/gir1.0-bamf-0.2.install +++ bamf-0.2.58/debian/gir1.0-bamf-0.2.install @@ -0,0 +1 @@ +#debian/tmp/usr/lib/girepository-1.0/ --- bamf-0.2.58.orig/debian/bamfdaemon.install +++ bamf-0.2.58/debian/bamfdaemon.install @@ -0,0 +1,3 @@ +debian/tmp/usr/lib/bamf +debian/tmp/usr/lib/gio/modules/libgiobamf.so +debian/tmp/usr/share/dbus-1/services/ --- bamf-0.2.58.orig/debian/bamfdaemon.triggers +++ bamf-0.2.58/debian/bamfdaemon.triggers @@ -0,0 +1,2 @@ +interest /usr/share/applications +interest gmenucache --- bamf-0.2.58.orig/debian/libbamf-doc.install +++ bamf-0.2.58/debian/libbamf-doc.install @@ -0,0 +1 @@ +debian/tmp/usr/share/gtk-doc/ --- bamf-0.2.58.orig/debian/bamfdaemon.postrm +++ bamf-0.2.58/debian/bamfdaemon.postrm @@ -0,0 +1,8 @@ +#! /bin/sh +set -e + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + rm -f /usr/share/applications/bamf.index +fi + +#DEBHELPER# --- bamf-0.2.58.orig/debian/watch +++ bamf-0.2.58/debian/watch @@ -0,0 +1,2 @@ +version=3 +https://launchpad.net/bamf/+download .*/bamf-([0-9.]+)\.tar\.gz --- bamf-0.2.58.orig/debian/copyright +++ bamf-0.2.58/debian/copyright @@ -0,0 +1,50 @@ +This package was debianized by Didier Roche on +Tue, 25 May 2010 10:31:02 -0000. + +It was downloaded from + +Upstream Author: + + Jason Smith + +Copyright: + + Copyright (C) 2009-2010 Canonical Ltd. + +License: + + When not otherwise specified, the following license applies: + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License Version 3.0 as published by the Free Software Foundation. + + 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. + +On Debian systems, the complete text of the GNU Lesser General Public License +can be found in `/usr/share/common-licenses/LGPL-3' + + + * src/*,test/*: + + This program is free software: you can redistribute it and/or modify it + under the terms of the the GNU General Public License version 3, as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranties of + MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR + PURPOSE. See the applicable version of the GNU Lesser General Public + License for more details. + +On Debian systems, the complete text of the GNU General Public License +can be found in `/usr/share/common-licenses/GPL-3' + +The Debian packaging is: + + Copyright (C) 2010 Canonical Ltd. + +and is licensed under the GPL version 3, see `/usr/share/common-licenses/GPL-3'. --- bamf-0.2.58.orig/debian/rules +++ bamf-0.2.58/debian/rules @@ -0,0 +1,21 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/class/gnome.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/utils.mk + +LDFLAGS += -Wl,-z,defs -Wl,--as-needed + +DEB_CONFIGURE_EXTRA_FLAGS += --enable-introspection=no --enable-gtk-doc +DEB_DBG_PACKAGE_bamfdaemon = bamf-dbg +DEB_DBG_PACKAGE_libbamf0 = bamf-dbg +DEB_MAKE_CHECK_TARGET := check + +common-binary-post-install-arch:: + find debian/tmp/usr/lib -name \*.la -exec rm {} \; + find debian/tmp/usr/lib -name \*.a -exec rm {} \; + +common-binary-fixup-arch:: + dh_girepository -pgir1.0-bamf-0.2 + +common-binary-predeb-arch:: list-missing --- bamf-0.2.58.orig/debian/control +++ bamf-0.2.58/debian/control @@ -0,0 +1,100 @@ +Source: bamf +Section: libs +Priority: optional +Maintainer: Ubuntu Core Developers +Build-Depends: debhelper (>= 5.0), + cdbs (>= 0.4.41~), + libglib2.0-dev (>= 2.23.0-1ubuntu3~), + libwnck-dev, + libgtop2-dev, + libgtk2.0-dev (>= 2.12.0), + libdbus-glib-1-dev, + gtk-doc-tools, + gobject-introspection (>= 0.6.5-3), + libgirepository1.0-dev, + gir1.0-atk-1.0, + gir1.0-glib-2.0, + gir1.0-gtk-2.0 (>= 2.19.5), + gir1.0-pango-1.0, + gir1.0-wnck-1.0, + valac-0.10, +Standards-Version: 3.9.1 +Homepage: https://launchpad.net/bamf + +Package: bamfdaemon +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, +Description: Window matching library - daemon + bamf matches application windows to desktop files + . + This package contains the daemon used by the library and a gio + module that facilitates the matching of applications started + through GDesktopAppInfo + +Package: libbamf0 +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + bamfdaemon (= ${binary:Version}), +Description: Window matching library - shared library + bamf matches application windows to desktop files + . + This package contains shared libraries to be used by applications. + +Package: libbamf-dev +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libbamf0 (= ${binary:Version}), + libwnck-dev, + libglib2.0-dev (>= 2.23.0-1ubuntu3~), +Suggests: libbamf-doc +Description: Window matching library - development files + bamf matches application windows to desktop files + . + This package contains files that are needed to build applications. + +Package: libbamf-doc +Section: doc +Architecture: all +Depends: ${misc:Depends} +Suggests: devhelp +Description: Window matching library - documentation + bamf matches application windows to desktop files + . + This package contains the daemon used by the library and a gio + module that facilitates the matching of applications started + through GDesktopAppInfo + . + This package contains the documentation + +Package: bamf-dbg +Section: debug +Architecture: any +Priority: extra +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libbamf0 (= ${binary:Version}), +Description: Window matching library - debugging symbols + bamf matches application windows to desktop files + . + This package contains the daemon used by the library and a gio + module that facilitates the matching of applications started + through GDesktopAppInfo + . + This package contains debugging symbols for the daemon and library. + +#Package: gir1.0-bamf-0.2 +#Section: libs +#Architecture: any +#Depends: ${gir:Depends}, +# ${shlibs:Depends}, +# ${misc:Depends} +#Description: GObject introspection data for the Bamf 0 library +# This package contains introspection data for the Bamf library. +# . +# It can be used by packages using the GIRepository format to generate +# dynamic bindings. + --- bamf-0.2.58.orig/debian/bamfdaemon.postinst +++ bamf-0.2.58/debian/bamfdaemon.postinst @@ -0,0 +1,15 @@ +#! /bin/sh +set -e + +if [ "$1" = "configure" ] || [ "$1" = "triggered" ]; then + if [ -d /usr/share/applications ]; then + # rebuild index + I=/usr/share/applications/bamf.index + echo "Rebuilding $I..." + rm -f $I + perl -ne '/^(.*?)=(.*)/; $$d{$ARGV}{$1} = $2; END { for $f (keys %$d) { printf "%s\t%s%s\n", $f =~ m{.*/([^/]+)$}, $$d{$f}{'Exec'},$$d{$f}{'StartupWMClass'} ? "\tBAMF_WM_CLASS::$$d{$f}{'StartupWMClass'}" : "" } }' /usr/share/applications/*.desktop > $I.new || rm -f $I.new + [ -e $I.new ] && mv $I.new $I || true + fi +fi + +#DEBHELPER# --- bamf-0.2.58.orig/debian/changelog +++ bamf-0.2.58/debian/changelog @@ -0,0 +1,185 @@ +bamf (0.2.58-0ubuntu2.asac1) maverick; urgency=low + + * add startup-wm-class support by asac (thx to fta for the + postinst perl magic) + + -- Alexander Sack Thu, 09 Dec 2010 01:04:33 +0100 + +bamf (0.2.58-0ubuntu2) maverick; urgency=low + + * Fix tons of accuracy matching issues using the gio module + (LP: #645849, #630066) + + -- Didier Roche Thu, 30 Sep 2010 17:14:27 +0200 + +bamf (0.2.58-0ubuntu1) maverick; urgency=low + + * New upstream release: + - Fix Nautilus' "File Operation" dialog gets stuck and prevents opening new + Nautilus windows (LP: #647979) + - Fix bamfdaemon crashed with SIGSEGV in g_str_hash() (LP: #638705) + + -- Didier Roche Mon, 27 Sep 2010 22:28:40 +0200 + +bamf (0.2.54-0ubuntu1) maverick; urgency=low + + * New upstream release. + * cherry pick some patches from upstream too for more fixes in special + launchers (LP: #622146) + * debian/libbamf0.symbols: + - update to latest version + + -- Didier Roche Wed, 22 Sep 2010 19:21:45 +0200 + +bamf (0.2.52-0ubuntu1) maverick; urgency=low + + * New upstream release: + - Take previous distro inline patch with next release (LP: #641229) + + -- Didier Roche Fri, 17 Sep 2010 13:52:17 +0200 + +bamf (0.2.50-0ubuntu1) maverick; urgency=low + + * New upstream release. + - Caching fixes + - Ensure we ship proper strings to open office windows + + -- Ken VanDine Wed, 15 Sep 2010 17:23:41 -0400 + +bamf (0.2.48-0ubuntu1) maverick; urgency=low + + * New upstream release: + - Dropbox 0.8.90 build shows in the launcher (LP: #610226) + * update debian/libbamf0.symbols + + -- Didier Roche Tue, 14 Sep 2010 19:13:51 +0200 + +bamf (0.2.46-0ubuntu1) maverick; urgency=low + + * New upstream release. + - Handle non system launchers (LP: #622146) + * Add new symbols to debian/libbamf0.symbols + + -- Didier Roche Thu, 09 Sep 2010 19:15:45 +0200 + +bamf (0.2.44-0ubuntu1) maverick; urgency=low + + * New upstream release: + - Fix potential NULL deref when XDG_DATA_DIRS is not set + (lp: #602519) + * debian/control: + - updated for the new vala versioning + * debian/libbamf0.symbols: + - new version update + + -- Sebastien Bacher Thu, 19 Aug 2010 19:16:15 +0200 + +bamf (0.2.42-0ubuntu2) maverick; urgency=low + + * Update by Mikkel Kamstrup Erlandsen to match gio changes (lp: #616737) + + -- Sebastien Bacher Wed, 18 Aug 2010 22:31:44 +0200 + +bamf (0.2.42-0ubuntu1) maverick; urgency=low + + * New upstream release. + * debian/rules: + - enjoying and running testsuite during build (LP: #586340) + * debian/control: + - bumping Standards-Version to latest + - remove gir-repository-dev from build-dep + + -- Didier Roche Fri, 13 Aug 2010 12:44:39 +0200 + +bamf (0.2.40-0ubuntu1) maverick; urgency=low + + * New upstream release. + + -- Didier Roche Mon, 02 Aug 2010 15:54:41 +0200 + +bamf (0.2.38-0ubuntu1) maverick; urgency=low + + * New upstream release. + + -- Didier Roche Thu, 22 Jul 2010 19:07:31 +0200 + +bamf (0.2.36-0ubuntu1) maverick; urgency=low + + * New upstream release. + * debian/libbamf0.symbols: + - update to latest + + -- Didier Roche Fri, 16 Jul 2010 14:44:16 +0200 + +bamf (0.2.34-0ubuntu1) maverick; urgency=low + + * New upstream release. + - Hangs when nautilus device detected dialog are displayed (LP: #601017) + - Netbeans does not show in Unity when open (LP: #598083) + - The launcher doesn't list some running softwares (LP: #601082) + + -- Didier Roche Mon, 12 Jul 2010 15:49:36 +0200 + +bamf (0.2.32-0ubuntu1) maverick; urgency=low + + * New upstream release. + - fix bad matchin on OOo (LP: #595583) + - fix crash in bamf_matcher_possible_applications_for_window (LP: #597986) + - fix exaile icon not showing in launcher (LP: #593470) + + -- Didier Roche Thu, 24 Jun 2010 16:21:22 +0200 + +bamf (0.2.30-0ubuntu1) maverick; urgency=low + + * New upstream release: + - fix KDE applications not showing up in the Unity Launcher + (LP: #592502) + * debian/libbamf0.symbols: + - adding new symbols + + -- Didier Roche Thu, 17 Jun 2010 18:07:38 +0200 + +bamf (0.2.28-0ubuntu1) maverick; urgency=low + + * New upstream release. + + -- Didier Roche Thu, 10 Jun 2010 17:16:17 +0200 + +bamf (0.2.26-0ubuntu2) maverick; urgency=low + + * debian/libbamf-dev.install: + - don't try to install a vapi file right now + + -- Didier Roche Mon, 07 Jun 2010 17:36:38 +0200 + +bamf (0.2.26-0ubuntu1) maverick; urgency=low + + * debian/control, debian/libbamf-doc.install: + - add libbamf-doc package + * debian/libbamf0.symbols: + - updated + * debian/control, debian/rules: + - build the doc by default + * debian/libbamf-dev.install: + - install vapi files + * debian/rules: + - fix rm *{,l}a files + * debian/watch: + - use https + * New upstream release. + + -- Didier Roche Mon, 07 Jun 2010 10:45:49 +0200 + +bamf (0.2.24-0ubuntu1) maverick; urgency=low + + * New upstream release. + + -- Didier Roche Thu, 27 May 2010 18:35:29 +0200 + +bamf (0.2.22-0ubuntu1) maverick; urgency=low + + * Initial Packaging (LP: #583880) + * temporary disabling gir building due to bug: + https://bugzilla.gnome.org/show_bug.cgi?id=619703 + + -- Didier Roche Tue, 25 May 2010 10:32:24 +0200 --- bamf-0.2.58.orig/debian/libbamf0.install +++ bamf-0.2.58/debian/libbamf0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/libbamf.so.* --- bamf-0.2.58.orig/debian/libbamf-dev.install +++ bamf-0.2.58/debian/libbamf-dev.install @@ -0,0 +1,5 @@ +debian/tmp/usr/include/libbamf/libbamf/ +debian/tmp/usr/lib/pkgconfig/libbamf.pc +debian/tmp/usr/lib/libbamf.so +#debian/tmp/usr/share/vala/vapi/ +#debian/tmp/usr/share/gir-1.0/ --- bamf-0.2.58.orig/src/bamf-matcher.c +++ bamf-0.2.58/src/bamf-matcher.c @@ -408,24 +408,35 @@ GHashTable *desktop_file_table, GHashTable *desktop_id_table) { - GAppInfo *desktop_file; + GKeyFile *desktop_file; char *exec; char *path; GString *desktop_id; /* is ok... really */ + gchar *desktop_id_char; g_return_if_fail (BAMF_IS_MATCHER (self)); - desktop_file = G_APP_INFO (g_desktop_app_info_new_from_filename (file)); - - if (!G_IS_APP_INFO (desktop_file)) + desktop_file = g_key_file_new (); + if (!desktop_file) + return; + if (!g_key_file_load_from_file (desktop_file, file, G_KEY_FILE_NONE, NULL)) { + g_key_file_free (desktop_file); return; + } - exec = g_strdup (g_app_info_get_commandline (desktop_file)); + exec = g_key_file_get_value (desktop_file, "Desktop Entry", "Exec", NULL); if (!exec) return; - g_object_unref (desktop_file); + desktop_id_char = g_key_file_get_value (desktop_file, "Desktop Entry", "StartupWMClass", NULL); + if (desktop_id_char) { + desktop_id = g_string_new (g_ascii_strdown (desktop_id_char, -1)); + g_free (desktop_id_char); + } else { + desktop_id = NULL; + } + g_key_file_free (desktop_file); if (exec_string_should_be_processed (self, exec)) { @@ -440,11 +451,13 @@ exec = tmp; } - path = g_path_get_basename (file); - desktop_id = g_string_new (path); - g_free (path); - - desktop_id = g_string_truncate (desktop_id, desktop_id->len - 8); /* remove last 8 characters for .desktop */ + /* if StartupWMClass didnt exist, go for .desktop path as heuristic */ + if (!desktop_id) { + path = g_path_get_basename (file); + desktop_id = g_string_new (path); + desktop_id = g_string_truncate (desktop_id, desktop_id->len - 8); /* remove last 8 characters for .desktop */ + g_free (path); + } insert_data_into_tables (self, file, exec, desktop_id->str, desktop_file_table, desktop_id_table); @@ -530,6 +543,7 @@ char *exec; GString *desktop_id; GString *filename; + char *bamf_wm_class; gchar **parts = g_strsplit (line, "\t", 3); @@ -545,9 +559,21 @@ filename = g_string_new (name); g_free ((gpointer) name); - desktop_id = g_string_new (parts[0]); - g_string_truncate (desktop_id, desktop_id->len - 8); - + /* + * if we have a third column in index file it means we have a StatupWMClass which + * is a better desktop_id/window_class than the desktop filename stripped by .desktop. + * e.g. firefox-4.0.desktop dailies have window class "Minefield" + * since Exec can be a multi whitespace token we expect a BAMF_WM_CLASS:: to indicate + * a StartupWMClass info + */ + bamf_wm_class = parts[2] ? strstr(parts[2], "BAMF_WM_CLASS::") : NULL; + if (!bamf_wm_class) { + desktop_id = g_string_new (parts[0]); + g_string_truncate (desktop_id, desktop_id->len - 8); + } else { + desktop_id = g_string_new (g_ascii_strdown(bamf_wm_class + 15 /* strlen ("BAMF_WM_CLASS::") */, -1)); + } + insert_data_into_tables (self, filename->str, exec, desktop_id->str, desktop_file_table, desktop_id_table); g_string_free (desktop_id, TRUE); --- bamf-0.2.58.orig/module/gapplaunchhandlerdbus.c +++ bamf-0.2.58/module/gapplaunchhandlerdbus.c @@ -128,7 +128,7 @@ proxy = dbus_g_proxy_new_for_name (connection, "org.ayatana.bamf", - "/org/ayatana/bamf", + "/org/ayatana/bamf/control", "org.ayatana.bamf.control"); g_return_if_fail (proxy);