--- gnome-user-share-2.26.0.orig/debian/copyright +++ gnome-user-share-2.26.0/debian/copyright @@ -0,0 +1,42 @@ +This package was debianized by Jeff Waugh on +Fri, 26 Nov 2004 22:40:10 +1100. + +It was downloaded from http://ftp.gnome.org/pub/GNOME/sources/gnome-user-share/ + +Upstream Authors: + Alexander Larsson + Bastien Nocera + +Copyright: +Copyright (C) 2004 Red Hat, Inc. + +License: + + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This package 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 + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +For md5.[ch]: + This code implements the MD5 message-digest algorithm. + The algorithm is due to Ron Rivest. This code was + written by Colin Plumb in 1993, no copyright is claimed. + This code is in the public domain; do with it what you wish. + + Equivalent code is available from RSA Data Security, Inc. + This code has been tested against that, and is equivalent, + except that you don't need to include two pages of legalese + with every copy. + --- gnome-user-share-2.26.0.orig/debian/compat +++ gnome-user-share-2.26.0/debian/compat @@ -0,0 +1 @@ +5 --- gnome-user-share-2.26.0.orig/debian/control +++ gnome-user-share-2.26.0/debian/control @@ -0,0 +1,16 @@ +Source: gnome-user-share +Section: gnome +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Sebastian Dröge +Uploaders: Debian GNOME Maintainers , Sebastian Dröge +Build-Depends: cdbs, debhelper (>= 5), gnome-pkg-tools, libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libglib2.0-dev (>= 2.15.2), libx11-dev, libxt-dev, libgtk2.0-dev (>= 2.4.0), libgconf2-dev, libavahi-client-dev (>= 0.6), libavahi-glib-dev (>= 0.6), libdbus-1-dev (>= 1.1.1), libdbus-glib-1-dev, libxml-parser-perl, libnotify-dev, gnome-doc-utils (>= 0.3.2), rarian-compat +Standards-Version: 3.7.3 + +Package: gnome-user-share +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, apache2 (>= 2.2), apache2 (<< 2.3), libapache2-mod-dnssd (>=0.6), avahi-daemon, obex-data-server (>= 0.3), bluez-gnome|gnome-bluetooth (>= 2.27.0) +Description: User level public file sharing via WebDAV or ObexFTP + gnome-user-share is a small package that allows easy user-level file sharing + via WebDAV or ObexFTP. The shared files are announced on the network + by Avahi. --- gnome-user-share-2.26.0.orig/debian/rules +++ gnome-user-share-2.26.0/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/class/gnome.mk +include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk +-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk + +LDFLAGS+=-Wl,-z,defs -Wl,-O1 -Wl,--as-needed +DEB_CONFIGURE_SCRIPT_ENV += HTTPD="/usr/sbin/apache2" +DEB_CONFIGURE_EXTRA_FLAGS += --with-httpd=apache2 --with-modules-path=/usr/lib/apache2/modules/ + +install/gnome-user-share:: + rm -f debian/gnome-user-share/usr/share/gnome-user-share/dav_user_2.0.conf + --- gnome-user-share-2.26.0.orig/debian/preinst +++ gnome-user-share-2.26.0/debian/preinst @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +rm_conffile() { + PKGNAME="hal" + CONFFILE="$1" + + if [ -e "$CONFFILE" ]; then + md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" + old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" + if [ "$md5sum" != "$old_md5sum" ]; then + echo "Obsolete conffile $CONFFILE has been modified by you." + echo "Saving as $CONFFILE.dpkg-bak ..." + mv -f "$CONFFILE" "$CONFFILE".dpkg-bak + else + echo "Removing obsolete conffile $CONFFILE ..." + rm -f "$CONFFILE" + fi + fi +} + +case "$1" in + install|upgrade) + if dpkg --compare-versions "$2" le "0.31-3"; then + rm_conffile "/etc/xdg/autostart/gnome-user-share-session.desktop" + fi +esac + +#DEBHELPER# + +exit 0 --- gnome-user-share-2.26.0.orig/debian/control.in +++ gnome-user-share-2.26.0/debian/control.in @@ -0,0 +1,16 @@ +Source: gnome-user-share +Section: gnome +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Sebastian Dröge +Uploaders: @GNOME_TEAM@ +Build-Depends: cdbs, debhelper (>= 5), gnome-pkg-tools, libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libglib2.0-dev (>= 2.15.2), libx11-dev, libxt-dev, libgtk2.0-dev (>= 2.4.0), libgconf2-dev, libavahi-client-dev (>= 0.6), libavahi-glib-dev (>= 0.6), libdbus-1-dev (>= 1.1.1), libdbus-glib-1-dev, libxml-parser-perl, libnotify-dev, gnome-doc-utils (>= 0.3.2), rarian-compat +Standards-Version: 3.7.3 + +Package: gnome-user-share +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, apache2 (>= 2.2), apache2 (<< 2.3), libapache2-mod-dnssd (>=0.6), avahi-daemon, obex-data-server (>= 0.3), bluez-gnome|gnome-bluetooth (>= 2.27.0) +Description: User level public file sharing via WebDAV or ObexFTP + gnome-user-share is a small package that allows easy user-level file sharing + via WebDAV or ObexFTP. The shared files are announced on the network + by Avahi. --- gnome-user-share-2.26.0.orig/debian/changelog +++ gnome-user-share-2.26.0/debian/changelog @@ -0,0 +1,278 @@ +gnome-user-share (2.26.0-0ubuntu1) karmic; urgency=low + + * New upstream release (LP: #372386): + - translations update + * debian/control.in: + - depends on bluez-gnome OR gnome-bluetooth => 2.27.0 + + -- Baptiste Mille-Mathias Sun, 12 Apr 2009 09:37:28 +0200 + +gnome-user-share (2.25.92-0ubuntu2) jaunty; urgency=low + + * debian/patches/01_notification.patch + - Display an alert box instead of a notification for files + recieved, thanks Cody Russell! (LP: #337352) + + -- Ken VanDine Tue, 07 Apr 2009 08:26:04 -0400 + +gnome-user-share (2.25.92-0ubuntu1) jaunty; urgency=low + + * New upstream release (LP: #337270) + - Update Swedish help manual, add Greek manual, + - Fix httpd configuration file + - Use mod_dnssd 0.6 to export the user TXT record, necessary to work + with the latest gvfs + - Check for httpd version and binary location at run-time, rather than + compile-time + - Documentation updates + - Use Apache's mod_dnssd module instead of doing the work ourselves + - Refuse to run as root, so as to avoid sensitive files being shared + - Add end-user documentation, and UI changes to match + - Make it possible for build daemons to build without Apache installed + - Port to BlueZ 4.x API + - UI fixes in the preferences dialogue + - Fix web file sharing on some distributions + * debian/patches/02_bluez4-update.patch: + - removed, merged upstream + * debian/rules: + - Don't remove dav_user_2.2.conf in clean, it is needed for the build + and is not a generated file + * debian/control.in: + - Added a dependency on libapache2-mod-dnssd (>=0.6) + * Specify httpd binary instead of version + + [ Daniel Holbach ] + * debian/control.in: added gnome-doc-utils (>= 0.3.2), rarian-compat to + Build-Depends. + + -- Ken VanDine Tue, 03 Mar 2009 10:58:43 -0500 + +gnome-user-share (0.40-0ubuntu1) intrepid; urgency=low + + * New Upstream Release (LP: #280715): + - ConsoleKit support (only activate file sharing when session is active) + - Add Notification to reveal and open files received over Bluetooth + - Make the httpd configuration file support multiple Apache MPMs + - move the configuration to Freedesktop compliant location + * debian/control.in: + - Add libnotify-dev to Build-Depends + * debian/patches/01_apache-config.patch: dropped, applied upstream + + -- Baptiste Mille-Mathias Thu, 09 Oct 2008 13:41:45 +0200 + +gnome-user-share (0.31-3ubuntu1) intrepid; urgency=low + + * debian/patches/02_bluez4-update.patch: stolen from fedora to support bluez + 4.x (LP: #274950) + + -- Baptiste Mille-Mathias Sat, 27 Sep 2008 18:35:22 +0200 + +gnome-user-share (0.31-3) unstable; urgency=medium + + * debian/preinst: + + Remove obsolete conffile. + * debian/01_apache-config.patch: + + Fix apache config even more. + + -- Sebastian Dröge Fri, 18 Apr 2008 12:42:37 +0200 + +gnome-user-share (0.31-2) unstable; urgency=low + + * debian/patches/01_apache-config.patch, + debian/rules: + + Fix the apache config and don't ship a config for apache 2.0, we only + support 2.2. + + -- Sebastian Dröge Thu, 10 Apr 2008 08:43:56 +0200 + +gnome-user-share (0.31-1) unstable; urgency=low + + * New upstream release. + + -- Sebastian Dröge Mon, 07 Apr 2008 12:23:18 +0200 + +gnome-user-share (0.30-1) unstable; urgency=low + + * New upstream release: + + debian/control.in: + - Depend on obex-data-server and bluez-gnome for ObexFTP file sharing. + - Update description. + + debian/copyright: + - Add Bastien as second upstream author. + + debian/control.in: + - Remove glade from build dependencies. + + debian/patches/01_debianise-dav-user-conf.diff, + debian/rules: + - Use the new configure parameter now instead of patching. + + debian/patches/02_README.diff: + - Dropped, this is fixed upstream now. + + -- Sebastian Dröge Tue, 18 Mar 2008 02:17:30 +0100 + +gnome-user-share (0.21-1) unstable; urgency=low + + * New upstream release: + + debian/gnome-user-share-session.*, + debian/rules: + - Don't build our own starter, upstream provides one now. + + debian/control.in: + - Update build dependencies. + - Update Standards-Version to 3.7.3, no additional changes needed. + + -- Sebastian Dröge Fri, 14 Mar 2008 14:35:18 +0100 + +gnome-user-share (0.11-3) unstable; urgency=low + + * debian/control: + + Update to Standards-Version 3.7.3, no additional changes needed. + * debian/rules: + + Use LDFLAGS for linking the gnome-user-share-session helper too. + + -- Sebastian Dröge Sun, 06 Jan 2008 19:52:14 +0100 + +gnome-user-share (0.11-2) unstable; urgency=low + + * Upload to unstable + + -- Sebastian Dröge Mon, 16 Apr 2007 01:43:08 +0200 + +gnome-user-share (0.11-1) experimental; urgency=low + + * New upstream release + * debian/rules, + debian/control: + + Use gnome-pkg-tools to add the Gnome team to Uploaders + + Add get-orig-source target + * debian/patches/01_debianise-dav-user-conf.diff: + + Updated for new upstream version + + -- Sebastian Dröge Tue, 6 Mar 2007 18:36:22 +0100 + +gnome-user-share (0.10-4) unstable; urgency=medium + + * Urgency medium because of RC bugfix. This should go to etch. + * debian/patches/01_debianise-dav-user-conf.diff: + + Also load the mime module to allow usage of the TypesConfig directive + (Closes: #411171) + + -- Sebastian Dröge Sun, 18 Feb 2007 11:10:21 +0100 + +gnome-user-share (0.10-3) unstable; urgency=low + + * debian/control: + + Only build-depend on libselinux-dev on Linux platforms (Closes: #402135) + + Updated to use my debian.org mail address + + -- Sebastian Dröge Mon, 8 Jan 2007 08:27:54 +0100 + +gnome-user-share (0.10-2) unstable; urgency=low + + * Acknowledge NMU (Closes: #391259) + * debian/control, + debian/rules: + + Add versioned apache2 dependency back but require apache 2.2 + * debian/control: + + Update Standards-Version to 3.7.2 + + -- Sebastian Dröge Tue, 17 Oct 2006 17:59:26 +0200 + +gnome-user-share (0.10-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Don't use a versioned dependency on apache2 (Closes: #391259). + + -- Luk Claes Sun, 15 Oct 2006 18:16:58 +0200 + +gnome-user-share (0.10-1) unstable; urgency=low + + * New upstream release + * debian/patches/01_debianise-dav-user-conf.diff: + + Update for the new filenames and patch the apache 2.0 and 2.2 configs + * Depend on apache2 (>= 2.0) and (<< 2.1). We need to rebuild when apache + 2.2 gets into Debian to get the correct config file link for apache + created. + + -- Sebastian Dröge Wed, 19 Apr 2006 15:10:13 +0200 + +gnome-user-share (0.9-4) unstable; urgency=low + + * Add a autostart .desktop file and a small loader that loads + gnome-user-share when it was enabled in the capplet. This way + gnome-user-share is started again with the session when it was enabled + before. + + -- Sebastian Dröge Sun, 2 Apr 2006 13:55:20 +0200 + +gnome-user-share (0.9-3) unstable; urgency=low + + * Added debian/watch + * Added README to the package and patch it to include informations about + avahi and improve the language a bit (02_README.diff) (Closes: #353180) + * Updated to debhelper compat version 5 + + -- Sebastian Dröge Thu, 23 Feb 2006 19:51:20 +0100 + +gnome-user-share (0.9-2) unstable; urgency=low + + * Upload to unstable + * Add libxt-dev to Build-Depends to fix the failed configure check for X + * Use --as-needed to get rid of unneeded dependencies + + -- Sebastian Dröge Tue, 17 Jan 2006 23:00:03 +0100 + +gnome-user-share (0.9-1) experimental; urgency=low + + * New upstream release + * Adjusted Build-Depends for avahi 0.6 + * Upload to Debian (Closes: #283088) + + -- Sebastian Dröge Wed, 21 Dec 2005 19:18:04 +0100 + +gnome-user-share (0.8-1) unstable; urgency=low + + * New upstream release + + -- Sebastian Dröge Tue, 15 Nov 2005 23:23:48 +0100 + +gnome-user-share (0.7-0ubuntu2) dapper; urgency=low + + * Add new FSF address to the copyright file + + -- Sebastian Dröge Thu, 10 Nov 2005 07:08:06 +0100 + +gnome-user-share (0.7-0ubuntu1) dapper; urgency=low + + * New upstream release + * Use avahi instead of howl and added Build-Depends for it + * Made Build-Depends stricter + + -- Sebastian Dröge Wed, 9 Nov 2005 12:02:33 +0100 + +gnome-user-share (0.4-1) hoary; urgency=low + + * New upstream release + + -- Jeff Waugh Sat, 4 Dec 2004 00:05:19 +1100 + +gnome-user-share (0.3-3) hoary; urgency=low + + * debian/control: + - Build-Depend on libxt-dev, because autoconf looks for Xt to determine + if X is installed. + * debian/patches/01_debianise-dav-user-conf.diff: + - Only define Max/MinSpareServers and MaxClients when using prefork. + + -- Jeff Waugh Sat, 27 Nov 2004 01:48:26 +1100 + +gnome-user-share (0.3-2) hoary; urgency=low + + * Build-Depend on libx11-dev, libice-dev, libsm-dev + + -- Jeff Waugh Sat, 27 Nov 2004 00:06:14 +1100 + +gnome-user-share (0.3-1) hoary; urgency=low + + * Initial Release + + -- Jeff Waugh Tue, 01 Jun 2004 16:14:59 +1000 + --- gnome-user-share-2.26.0.orig/debian/watch +++ gnome-user-share-2.26.0/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://ftp.gnome.org/pub/gnome/sources/gnome-user-share/([\d\.]+)/gnome-user-share-([\d\.]+)\.tar\.gz debian uupdate --- gnome-user-share-2.26.0.orig/debian/patches/01_notification.patch +++ gnome-user-share-2.26.0/debian/patches/01_notification.patch @@ -0,0 +1,284 @@ +# Ubuntu: https://bugs.edge.launchpad.net/ubuntu/+source/gnome-user-share/+bug/337352 +# Upstream: http://bugzilla.gnome.org/show_bug.cgi?id=578226 +# Description: Display an alert box instead of a notification for files +# recieved +=== modified file 'src/obexpush.c' +--- old/src/obexpush.c 2009-03-25 23:56:27 +0000 ++++ new/src/obexpush.c 2009-03-31 14:19:49 +0000 +@@ -67,52 +67,79 @@ + } + + static void ++launch_file_viewer (const gchar *file_uri) ++{ ++ GdkAppLaunchContext *ctx = NULL; ++ GTimeVal val; ++ ++ g_get_current_time (&val); ++ ++#if GTK_CHECK_VERSION(2,14,0) ++ ctx = gdk_app_launch_context_new (); ++ gdk_app_launch_context_set_screen (ctx, gdk_screen_get_default ()); ++ gdk_app_launch_context_set_timestamp (ctx, val.tv_sec); ++#endif ++ ++ if (!g_app_info_launch_default_for_uri (file_uri, ++ G_APP_LAUNCH_CONTEXT (ctx), ++ NULL)) { ++ g_warning ("Failed to launch the file viewer\n"); ++ } ++ ++ if (ctx) ++ g_object_unref (ctx); ++} ++ ++static void ++open_download_folder (const gchar *file_uri) ++{ ++ GdkAppLaunchContext *ctx = NULL; ++ GTimeVal val; ++ GFile *file; ++ GFile *parent; ++ gchar *parent_uri; ++ ++ g_get_current_time (&val); ++ ++#if GTK_CHECK_VERSION(2,14,0) ++ ctx = gdk_app_launch_context_new (); ++ gdk_app_launch_context_set_screen (ctx, gdk_screen_get_default ()); ++ gdk_app_launch_context_set_timestamp (ctx, val.tv_sec); ++#endif ++ ++ file = g_file_new_for_uri (file_uri); ++ parent = g_file_get_parent (file); ++ parent_uri = g_file_get_uri (parent); ++ ++ g_object_unref (file); ++ g_object_unref (parent); ++ ++ if (!g_app_info_launch_default_for_uri (parent_uri, ++ G_APP_LAUNCH_CONTEXT (ctx), ++ NULL)) { ++ g_warning ("Failed to launch the file manager\n"); ++ } ++ ++ g_free (parent_uri); ++ if (ctx) ++ g_object_unref (ctx); ++} ++ ++static void + notification_launch_action_on_file_cb (NotifyNotification *notification, + const char *action, + const char *file_uri) + { +- GdkScreen *screen; +- GAppLaunchContext *ctx; +- GTimeVal val; +- + g_assert (action != NULL); + +- g_get_current_time (&val); +- +-#if GTK_CHECK_VERSION(2,14,0) +- ctx = G_APP_LAUNCH_CONTEXT (gdk_app_launch_context_new ()); +- screen = gdk_screen_get_default (); +- gdk_app_launch_context_set_screen (GDK_APP_LAUNCH_CONTEXT (ctx), screen); +- gdk_app_launch_context_set_timestamp (GDK_APP_LAUNCH_CONTEXT (ctx), val.tv_sec); +-#else +- ctx = NULL; +- screen = NULL; +-#endif +- + /* We launch the file viewer for the file */ + if (g_str_equal (action, "display") != FALSE) { +- if (g_app_info_launch_default_for_uri (file_uri, ctx, NULL) == FALSE) { +- g_warning ("Failed to launch the file viewer\n"); +- } ++ launch_file_viewer (file_uri); + } + + /* we open the Downloads folder */ + if (g_str_equal (action, "reveal") != FALSE) { +- GFile *file; +- GFile *parent; +- gchar *parent_uri; +- +- file = g_file_new_for_uri (file_uri); +- parent = g_file_get_parent (file); +- parent_uri = g_file_get_uri (parent); +- g_object_unref (file); +- g_object_unref (parent); +- +- if (!g_app_info_launch_default_for_uri (parent_uri, ctx, NULL)) { +- g_warning ("Failed to launch the file manager\n"); +- } +- +- g_free (parent_uri); ++ open_download_folder (file_uri); + } + + notify_notification_close (notification, NULL); +@@ -120,11 +147,39 @@ + * will call the close callback */ + } + ++static gboolean ++supports_actions () ++{ ++ static gboolean supports_actions = FALSE; ++ static gboolean have_checked = FALSE; ++ ++ if (!have_checked) { ++ GList *caps = NULL; ++ GList *c; ++ ++ have_checked = TRUE; ++ ++ caps = notify_get_server_caps (); ++ if (caps != NULL) { ++ for (c = caps; c != NULL; c = c->next) { ++ if (strcmp ((char*)c->data, "actions") == 0) { ++ supports_actions = TRUE; ++ break; ++ } ++ } ++ ++ g_list_foreach (caps, (GFunc) g_free, NULL); ++ g_list_free (caps); ++ } ++ } ++ ++ return supports_actions; ++} ++ + static void + show_notification (const char *filename) + { +- char *file_uri, *notification_text, *display, *mime_type; +- NotifyNotification *notification; ++ char *file_uri, *display, *mime_type; + GAppInfo *app; + + file_uri = g_filename_to_uri (filename, NULL, NULL); +@@ -134,37 +189,91 @@ + } + + display = g_filename_display_basename (filename); +- /* Translators: %s is the name of the filename received */ +- notification_text = g_strdup_printf(_("You received \"%s\" via Bluetooth"), display); +- g_free (display); +- notification = notify_notification_new_with_status_icon (_("You received a file"), +- notification_text, +- "dialog-information", +- GTK_STATUS_ICON (statusicon)); +- +- notify_notification_set_timeout (notification, NOTIFY_EXPIRES_DEFAULT); +- + mime_type = g_content_type_guess (filename, NULL, 0, NULL); + app = g_app_info_get_default_for_type (mime_type, FALSE); +- if (app != NULL) { +- /* FIXME duplicate the uri, otherwise libnotify crashes */ +- char *uri; ++ ++ if (supports_actions ()) { ++ NotifyNotification *notification; ++ gchar *notification_text; ++ ++ /* Translators: %s is the name of the filename received */ ++ notification_text = g_strdup_printf(_("You received “%s” via Bluetooth"), display); ++ notification = notify_notification_new_with_status_icon (_("You received a file"), ++ notification_text, ++ "dialog-information", ++ GTK_STATUS_ICON (statusicon)); ++ ++ notify_notification_set_timeout (notification, NOTIFY_EXPIRES_DEFAULT); ++ ++ if (app != NULL) { ++ /* FIXME duplicate the uri, otherwise libnotify crashes */ ++ char *uri; ++ uri = g_strdup (file_uri); ++ notify_notification_add_action (notification, "display", _("Open File"), ++ (NotifyActionCallback) notification_launch_action_on_file_cb, ++ (gpointer) uri, (GFreeFunc) g_free); ++ } ++ notify_notification_add_action (notification, "reveal", _("Reveal File"), ++ (NotifyActionCallback) notification_launch_action_on_file_cb, ++ (gpointer) file_uri, (GFreeFunc) g_free); ++ ++ g_signal_connect (G_OBJECT (notification), "closed", G_CALLBACK (on_close_notification), notification); ++ ++ if (!notify_notification_show (notification, NULL)) { ++ g_warning ("failed to send notification\n"); ++ } ++ g_free (notification_text); ++ } else { ++ GtkWidget *dialog; ++ GtkWidget *image; ++ gint response; ++ gchar *basename; ++ ++ basename = g_path_get_basename (filename); ++ ++ dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_OTHER, GTK_BUTTONS_NONE, ++ _("You have received the file “%s” over Bluetooth."), basename, ++ NULL); ++ gtk_window_set_focus_on_map (GTK_WINDOW (dialog), FALSE); ++ gtk_window_set_icon_name (GTK_WINDOW (dialog), "gnome-obex-server"); ++ if (app != NULL) { ++ image = gtk_image_new_from_gicon (g_app_info_get_icon (app), GTK_ICON_SIZE_DIALOG); ++ gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image); ++ } ++ gtk_window_set_title (GTK_WINDOW (dialog), _("File Received")); ++ gtk_dialog_add_buttons (GTK_DIALOG (dialog), ++ _("Open"), GTK_RESPONSE_YES, ++ _("Reveal"), GTK_RESPONSE_APPLY, ++ _("OK"), GTK_RESPONSE_OK, ++ NULL); ++ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); ++ ++ gtk_widget_show_all (dialog); ++ response = gtk_dialog_run (GTK_DIALOG (dialog)); ++ switch (response) { ++ case GTK_RESPONSE_YES: ++ /* "Open" */ ++ launch_file_viewer (file_uri); ++ break; ++ ++ case GTK_RESPONSE_APPLY: ++ /* "Reveal" */ ++ open_download_folder (file_uri); ++ break; ++ ++ case GTK_RESPONSE_OK: ++ /* "OK" dismisses the alert box without further action. */ ++ break; ++ } ++ ++ gtk_widget_hide (dialog); ++ hide_statusicon (); ++ g_free (basename); ++ } ++ ++ g_free (display); ++ if (app != NULL) + g_object_unref (app); +- uri = g_strdup (file_uri); +- notify_notification_add_action (notification, "display", _("Open File"), +- (NotifyActionCallback) notification_launch_action_on_file_cb, +- (gpointer) uri, (GFreeFunc) g_free); +- } +- notify_notification_add_action (notification, "reveal", _("Reveal File"), +- (NotifyActionCallback) notification_launch_action_on_file_cb, +- (gpointer) file_uri, (GFreeFunc) g_free); +- +- g_signal_connect (G_OBJECT (notification), "closed", G_CALLBACK (on_close_notification), notification); +- +- if (!notify_notification_show (notification, NULL)) { +- g_warning ("failed to send notification\n"); +- } +- g_free (notification_text); + } + + static void +