--- bamf-0.2.54.orig/src/bamf-application.c +++ bamf-0.2.54/src/bamf-application.c @@ -73,33 +73,13 @@ char * bamf_application_get_desktop_file (BamfApplication *application) { - BamfMatcher *matcher; BamfApplicationPrivate *priv; - GList *favs, *l; char *result = NULL; g_return_val_if_fail (BAMF_IS_APPLICATION (application), NULL); priv = application->priv; - matcher = bamf_matcher_get_default (); - favs = bamf_matcher_get_favorites (matcher); - - /* Could be faster */ - if (favs) - { - for (l = favs; l; l = l->next) - { - if (g_list_find_custom (priv->desktop_file_list, l->data, (GCompareFunc) g_strcmp0)) - { - result = g_strdup (l->data); - break; - } - } - } - - if (!result) - result = g_strdup (priv->desktop_file); - + result = g_strdup (priv->desktop_file); return result; } @@ -432,11 +412,39 @@ return FALSE; } +static char * +bamf_application_favorite_from_list (BamfApplication *self, GList *list) +{ + BamfMatcher *matcher; + GList *favs, *l; + char *result = NULL; + + g_return_val_if_fail (BAMF_IS_APPLICATION (self), NULL); + + matcher = bamf_matcher_get_default (); + favs = bamf_matcher_get_favorites (matcher); + + if (favs) + { + for (l = favs; l; l = l->next) + { + if (g_list_find_custom (list, l->data, (GCompareFunc) g_strcmp0)) + { + result = l->data; + break; + } + } + } + + return result; +} + static void bamf_application_set_desktop_file_from_list (BamfApplication *self, GList *list) { BamfApplicationPrivate *priv; GList *l; + char *desktop_file; g_return_if_fail (BAMF_IS_APPLICATION (self)); g_return_if_fail (list); @@ -446,8 +454,13 @@ for (l = list; l; l = l->next) priv->desktop_file_list = g_list_prepend (priv->desktop_file_list, g_strdup (l->data)); + desktop_file = bamf_application_favorite_from_list (self, priv->desktop_file_list); + /* items come in priority order */ - bamf_application_set_desktop_file (self, list->data); + if (!desktop_file) + desktop_file = list->data; + + bamf_application_set_desktop_file (self, desktop_file); } static void @@ -476,6 +489,22 @@ } static void +matcher_favorites_changed (BamfMatcher *matcher, BamfApplication *self) +{ + char *new_desktop_file = NULL; + + g_return_if_fail (BAMF_IS_APPLICATION (self)); + g_return_if_fail (BAMF_IS_MATCHER (matcher)); + + new_desktop_file = bamf_application_favorite_from_list (self, self->priv->desktop_file_list); + + if (new_desktop_file) + { + bamf_application_set_desktop_file (self, new_desktop_file); + } +} + +static void bamf_application_dispose (GObject *object) { BamfApplication *app; @@ -505,9 +534,10 @@ g_free (priv->app_type); priv->app_type = NULL; } + + g_signal_handlers_disconnect_by_func (G_OBJECT (bamf_matcher_get_default ()), matcher_favorites_changed, object); G_OBJECT_CLASS (bamf_application_parent_class)->dispose (object); - } static void @@ -519,6 +549,9 @@ priv->is_tab_container = FALSE; priv->app_type = g_strdup ("system"); priv->show_stubs = TRUE; + + g_signal_connect (G_OBJECT (bamf_matcher_get_default ()), "favorites-changed", + (GCallback) matcher_favorites_changed, self); } static void --- bamf-0.2.54.orig/src/bamf-legacy-window.c +++ bamf-0.2.54/src/bamf-legacy-window.c @@ -308,11 +308,22 @@ bamf_legacy_window_dispose (GObject *object) { BamfLegacyWindow *self; + GFile *file; self = BAMF_LEGACY_WINDOW (object); g_signal_handler_disconnect (wnck_screen_get_default (), self->priv->closed_id); + + if (self->priv->mini_icon_path) + { + file = g_file_new_for_path (self->priv->mini_icon_path); + g_file_delete (file, NULL, NULL); + g_object_unref (file); + + g_free (self->priv->mini_icon_path); + self->priv->mini_icon_path = NULL; + } if (self->priv->legacy_window) { --- bamf-0.2.54.orig/src/bamf-matcher.c +++ bamf-0.2.54/src/bamf-matcher.c @@ -38,6 +38,7 @@ VIEW_CLOSED, ACTIVE_APPLICATION_CHANGED, ACTIVE_WINDOW_CHANGED, + FAVORITES_CHANGED, LAST_SIGNAL, }; @@ -417,6 +418,9 @@ return; exec = g_strdup (g_app_info_get_commandline (desktop_file)); + + if (!exec) + return; g_object_unref (desktop_file); @@ -1597,6 +1601,8 @@ priv->favorites = g_list_prepend (priv->favorites, g_strdup (fav)); bamf_matcher_load_desktop_file (matcher, fav); } + + g_signal_emit (matcher, matcher_signals[FAVORITES_CHANGED], 0); return TRUE; } @@ -1761,6 +1767,14 @@ bamf_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); + + matcher_signals [FAVORITES_CHANGED] = + g_signal_new ("favorites-changed", + G_OBJECT_CLASS_TYPE (klass), + 0, + 0, NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); } BamfMatcher * --- bamf-0.2.54.orig/debian/libbamf0.symbols +++ bamf-0.2.54/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.54.orig/debian/bamfdaemon.triggers +++ bamf-0.2.54/debian/bamfdaemon.triggers @@ -0,0 +1,2 @@ +interest /usr/share/applications +interest gmenucache --- bamf-0.2.54.orig/debian/bamfdaemon.postinst +++ bamf-0.2.54/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 'if (/^Exec=(.+)$/) { $f = (split "/", $ARGV)[-1]; print "$f\t$1\n"; }' /usr/share/applications/*.desktop > $I.new || rm -f $I.new + [ -e $I.new ] && mv $I.new $I || true + fi +fi + +#DEBHELPER# --- bamf-0.2.54.orig/debian/watch +++ bamf-0.2.54/debian/watch @@ -0,0 +1,2 @@ +version=3 +https://launchpad.net/bamf/+download .*/bamf-([0-9.]+)\.tar\.gz --- bamf-0.2.54.orig/debian/rules +++ bamf-0.2.54/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.54.orig/debian/libbamf-dev.install +++ bamf-0.2.54/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.54.orig/debian/bamfdaemon.postrm +++ bamf-0.2.54/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.54.orig/debian/libbamf0.install +++ bamf-0.2.54/debian/libbamf0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/libbamf.so.* --- bamf-0.2.54.orig/debian/control +++ bamf-0.2.54/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.54.orig/debian/changelog +++ bamf-0.2.54/debian/changelog @@ -0,0 +1,162 @@ +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.54.orig/debian/gir1.0-bamf-0.2.install +++ bamf-0.2.54/debian/gir1.0-bamf-0.2.install @@ -0,0 +1 @@ +#debian/tmp/usr/lib/girepository-1.0/ --- bamf-0.2.54.orig/debian/bamfdaemon.install +++ bamf-0.2.54/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.54.orig/debian/copyright +++ bamf-0.2.54/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.54.orig/debian/libbamf-doc.install +++ bamf-0.2.54/debian/libbamf-doc.install @@ -0,0 +1 @@ +debian/tmp/usr/share/gtk-doc/ --- bamf-0.2.54.orig/debian/compat +++ bamf-0.2.54/debian/compat @@ -0,0 +1 @@ +5