]> granicus.if.org Git - transmission/commitdiff
(trunk gtk) #4372 "make notification and system sounds configurable" -- fixed.
authorJordan Lee <jordan@transmissionbt.com>
Sat, 23 Jul 2011 17:23:12 +0000 (17:23 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sat, 23 Jul 2011 17:23:12 +0000 (17:23 +0000)
configure.ac
gtk/Makefile.am
gtk/conf.c
gtk/main.c
gtk/notify.c
gtk/notify.h
gtk/tr-prefs.c
gtk/tr-prefs.h
transmission-gtk.spec.in

index a91b4abd16f5475be873f0bd79721b1f8b23ff95..a6a7725feab0c362fd5fa9efc3cea31cc73e8df4 100644 (file)
@@ -60,18 +60,12 @@ AC_SUBST(GTK_MINIMUM)
 ##   OPTIONAL for the GTK+ client
 ##
 ##
-# play the XDG "download done" sound...
-CANBERRA_MINIMUM=0.10
-AC_SUBST(CANBERRA_MINIMUM)
 # inhibit hibernation when a torrent is active...
 DBUS_GLIB_MINIMUM=0.70
 AC_SUBST(DBUS_GLIB_MINIMUM)
 # implement "watch" directories to use new .torrent files...
 GIO_MINIMUM=2.15.5
 AC_SUBST(GIO_MINIMUM)
-# pop up a "download done" notice...
-LIBNOTIFY_MINIMUM=0.4.3
-AC_SUBST(LIBNOTIFY_MINIMUM)
 # create the tray icon with AppIndicator
 LIBAPPINDICATOR_MINIMUM=0.0.11
   AC_SUBST(LIBAPPINDICATOR_MINIMUM)
@@ -260,9 +254,7 @@ AC_ARG_ENABLE([gtk],
 build_gtk=no
 use_gio=no
 use_libappindicator=no
-use_libnotify=no
 use_dbus_glib=no
-use_canberra=no
 if test "x$want_gtk" = "xyes" ; then
     if test "x$have_gtk" = "xyes"; then
       build_gtk=yes
@@ -282,24 +274,6 @@ if test "x$build_gtk" = "xyes"; then
         AC_DEFINE([HAVE_GIO], 1)
     fi
 
-    PKG_CHECK_MODULES([LIBNOTIFY],
-                      [libnotify >= $LIBNOTIFY_MINIMUM],
-                      [have_libnotify=yes],
-                      [have_libnotify=no])
-    AC_ARG_ENABLE([libnotify], 
-                  AS_HELP_STRING([--enable-libnotify],[enable notifications]),, 
-                  [enable_libnotify=yes]) 
-    use_libnotify=no
-    if test "x$have_libnotify" = "xyes"; then
-        if test "x$enable_libnotify" = "xyes" ; then
-            use_libnotify=yes
-            AC_DEFINE([HAVE_LIBNOTIFY], 1) 
-        else
-            LIBNOTIFY_CFLAGS=
-            LIBNOTIFY_LIBS=
-        fi
-    fi
-
     PKG_CHECK_MODULES([LIBAPPINDICATOR],
                       [appindicator-0.1 >= $LIBAPPINDICATOR_MINIMUM],
                       [have_libappindicator=yes],
@@ -319,23 +293,6 @@ if test "x$build_gtk" = "xyes"; then
         fi
     fi
 
-    PKG_CHECK_MODULES([LIBCANBERRA],
-                      [libcanberra-gtk >= $CANBERRA_MINIMUM],
-                      [have_libcanberra=yes],
-                      [have_libcanberra=no])
-    AC_ARG_ENABLE([libcanberra], 
-                  AS_HELP_STRING([--enable-libcanberra],[enable sounds]),, 
-                  [enable_libcanberra=yes]) 
-    if test "x$have_libcanberra" = "xyes"; then
-        if test "x$enable_libcanberra" = "xyes" ; then
-            use_canberra=yes
-            AC_DEFINE([HAVE_LIBCANBERRA], 1) 
-        else
-            LIBCANBERRA_CFLAGS=
-            LIBCANBERRA_LIBS=
-        fi
-    fi
-
     PKG_CHECK_MODULES([DBUS_GLIB],
                       [dbus-glib-1 >= $DBUS_GLIB_MINIMUM],
                       [use_dbus_glib=yes],
@@ -516,8 +473,6 @@ Configuration:
 
       * dbus support:                                 ${use_dbus_glib}
       * gio for watchdir and mime-type support:       ${use_gio}
-      * libnotify for 'download completed' popups:    ${use_libnotify}
-      * libcanberra for 'download completed' sounds:  ${use_canberra}
       * libappindicator for an Ubuntu-style tray:     ${use_libappindicator}
 
    Build Daemon:                                      ${build_daemon}
index 2d17272594999b1bc5b0b9e9a125ca4c91a9bfd5..e4577d261224ade4b5437764a62895696c0d3474 100644 (file)
@@ -15,11 +15,9 @@ AM_CPPFLAGS = \
 AM_CFLAGS = \
     @LIBAPPINDICATOR_CFLAGS@ \
     @LIBEVENT_CFLAGS@ \
-    @LIBCANBERRA_CFLAGS@ \
     @GTK_CFLAGS@ \
     @LIBCURL_CFLAGS@ \
     @GIO_CFLAGS@ \
-    @LIBNOTIFY_CFLAGS@ \
     @DBUS_GLIB_CFLAGS@ \
     @OPENSSL_CFLAGS@ \
     @ZLIB_CFLAGS@ \
@@ -94,13 +92,11 @@ transmission_gtk_LDADD = \
     $(top_builddir)/libtransmission/libtransmission.a \
     $(top_builddir)/third-party/miniupnp/libminiupnp.a \
     $(top_builddir)/third-party/libnatpmp/libnatpmp.a \
-    @LIBCANBERRA_LIBS@ \
     @DHT_LIBS@ \
     @LIBUTP_LIBS@ \
     @GTK_LIBS@ \
     @GIO_LIBS@ \
     @LIBAPPINDICATOR_LIBS@ \
-    @LIBNOTIFY_LIBS@ \
     @LIBEVENT_LIBS@ \
     @DBUS_GLIB_LIBS@ \
     @LIBCURL_LIBS@ \
index 19091eb4321c2a9720b475283787d5f25f74d8ce..b050e82259b3da39b4640454059c940f85d6670e 100644 (file)
@@ -157,7 +157,7 @@ tr_prefs_init_defaults( tr_benc * d )
     if( !str ) str = g_get_user_special_dir( G_USER_DIRECTORY_DOWNLOAD );
     if( !str ) str = g_get_user_special_dir( G_USER_DIRECTORY_DESKTOP );
     if( !str ) str = tr_getDefaultDownloadDir( );
-    tr_bencDictAddStr( d, PREF_KEY_DIR_WATCH, str );
+    tr_bencDictAddStr ( d, PREF_KEY_DIR_WATCH, str );
     tr_bencDictAddBool( d, PREF_KEY_DIR_WATCH_ENABLED, FALSE );
 #endif
 
@@ -165,18 +165,23 @@ tr_prefs_init_defaults( tr_benc * d )
     tr_bencDictAddBool( d, PREF_KEY_INHIBIT_HIBERNATION, FALSE );
     tr_bencDictAddBool( d, PREF_KEY_BLOCKLIST_UPDATES_ENABLED, TRUE );
 
-    tr_bencDictAddStr( d, PREF_KEY_OPEN_DIALOG_FOLDER, g_get_home_dir( ) );
+    tr_bencDictAddStr ( d, PREF_KEY_OPEN_DIALOG_FOLDER, g_get_home_dir( ) );
 
     tr_bencDictAddBool( d, PREF_KEY_TOOLBAR, TRUE );
     tr_bencDictAddBool( d, PREF_KEY_FILTERBAR, TRUE );
     tr_bencDictAddBool( d, PREF_KEY_STATUSBAR, TRUE );
     tr_bencDictAddBool( d, PREF_KEY_SHOW_TRAY_ICON, FALSE );
-    tr_bencDictAddBool( d, PREF_KEY_PLAY_DOWNLOAD_COMPLETE_SOUND, TRUE );
-    tr_bencDictAddBool( d, PREF_KEY_SHOW_DESKTOP_NOTIFICATION, TRUE );
     tr_bencDictAddBool( d, PREF_KEY_SHOW_MORE_TRACKER_INFO, FALSE );
     tr_bencDictAddBool( d, PREF_KEY_SHOW_MORE_PEER_INFO, FALSE );
     tr_bencDictAddBool( d, PREF_KEY_SHOW_BACKUP_TRACKERS, FALSE );
-    tr_bencDictAddStr( d, PREF_KEY_STATUSBAR_STATS, "total-ratio" );
+    tr_bencDictAddStr ( d, PREF_KEY_STATUSBAR_STATS, "total-ratio" );
+
+    tr_bencDictAddStr ( d, PREF_KEY_TORRENT_ADDED_NOTIFICATION_COMMAND, "notify-send -c transfer -i transmission '%s' '%s'" );
+    tr_bencDictAddBool( d, PREF_KEY_TORRENT_ADDED_NOTIFICATION_ENABLED, true );
+    tr_bencDictAddStr ( d, PREF_KEY_TORRENT_COMPLETE_NOTIFICATION_COMMAND, "notify-send -c transfer.complete -i transmission '%s' '%s'" );
+    tr_bencDictAddBool( d, PREF_KEY_TORRENT_COMPLETE_NOTIFICATION_ENABLED, true );
+    tr_bencDictAddStr ( d, PREF_KEY_TORRENT_COMPLETE_SOUND_COMMAND, "canberra-gtk-play -i complete-download -d 'transmission torrent downloaded'" );
+    tr_bencDictAddBool( d, PREF_KEY_TORRENT_COMPLETE_SOUND_ENABLED, true );
 
     tr_bencDictAddBool( d, PREF_KEY_OPTIONS_PROMPT, TRUE );
 
index 379d9516a7516dd1fb232513588799e844b3243f..08fbf04bf491c3a09b30bcae3d282a8f0ff5ffa4 100644 (file)
@@ -50,7 +50,6 @@
 #include "hig.h"
 #include "makemeta-ui.h"
 #include "msgwin.h"
-#include "notify.h"
 #include "open-dialog.h"
 #include "relocate.h"
 #include "stats.h"
@@ -665,7 +664,6 @@ main( int argc, char ** argv )
     if( configDir == NULL )
         configDir = (char*) tr_getDefaultConfigDir( MY_CONFIG_NAME );
 
-    gtr_notify_init( );
     didinit = cf_init( configDir, NULL ); /* must come before actions_init */
 
     setupsighandlers( ); /* set up handlers for fatal signals */
index 755d5349f508001d7135d7a4586ba5f8ccb3e53a..66d29ebf65ea4f61fd9196f0b37a792831f9649e 100644 (file)
  * $Id$
  */
 
-#include <string.h> /* strcmp() */
-
-#ifdef HAVE_LIBCANBERRA
- #include <canberra-gtk.h>
-#endif
-
-#ifdef HAVE_GIO
- #include <gio/gio.h>
-#endif
-
 #include <glib/gi18n.h>
-#include "actions.h" /* NOTIFICATION_ICON */
 #include "conf.h"
 #include "notify.h"
 #include "tr-prefs.h"
 #include "util.h"
 
-#ifndef HAVE_LIBNOTIFY
-
-void gtr_notify_init( void ) { }
-void gtr_notify_torrent_completed( TrCore * core UNUSED, int torrent_id UNUSED ) { }
-void gtr_notify_torrent_added( const char * name UNUSED ) { }
-
-#else
- #include <libnotify/notify.h>
-
-void
-gtr_notify_init( void )
-{
-    notify_init( "Transmission" );
-}
-
-struct notify_callback_data
-{
-    TrCore * core;
-    int torrent_id;
-};
-
-static void
-notify_callback_data_free( gpointer gdata )
-{
-    struct notify_callback_data * data = gdata;
-    g_object_unref( G_OBJECT( data->core ) );
-    g_free( data );
-}
-
-static struct notify_callback_data *
-notify_callback_data_new( TrCore * core, int torrent_id )
-{
-    struct notify_callback_data * data = g_new( struct notify_callback_data, 1 );
-    data->core = core;
-    data->torrent_id = torrent_id;
-    g_object_ref( G_OBJECT( data->core ) );
-    return data;
-}
-
-static void
-notifyCallback( NotifyNotification  * n UNUSED,
-                const char          * action,
-                gpointer              gdata )
-{
-    struct notify_callback_data * data = gdata;
-    tr_torrent * tor = gtr_core_find_torrent( data->core, data->torrent_id );
-
-    if( tor != NULL )
-    {
-        if( !strcmp( action, "folder" ) )
-        {
-            gtr_core_open_folder( data->core, data->torrent_id );
-        }
-        else if( !strcmp( action, "file" ) )
-        {
-            const tr_info * inf = tr_torrentInfo( tor );
-            const char * dir = tr_torrentGetDownloadDir( tor );
-            char * path = g_build_filename( dir, inf->files[0].name, NULL );
-            gtr_open_file( path );
-            g_free( path );
-        }
-    }
-}
-
-static gboolean
-can_support_actions( void )
-{
-    static gboolean supported;
-    static gboolean have_checked = FALSE;
-
-    if( !have_checked )
-    {
-        GList * c;
-        GList * caps = notify_get_server_caps( );
-
-        have_checked = TRUE;
-
-        for( c=caps; c && !supported; c=c->next )
-            supported = !strcmp( "actions", (char*)c->data );
-
-        g_list_foreach( caps, (GFunc)g_free, NULL );
-        g_list_free( caps );
-    }
-
-    return supported;
-}
-
-static void
-addIcon( NotifyNotification * notify )
-{
-    int size = 32;
-    GtkIconTheme * theme;
-    GdkPixbuf * icon;
-
-    gtk_icon_size_lookup( GTK_ICON_SIZE_DIALOG, &size, &size );
-    theme = gtk_icon_theme_get_default( );
-    icon = gtk_icon_theme_load_icon( theme, NOTIFICATION_ICON, size, 0, NULL );
-
-    if( icon != NULL )
-    {
-        notify_notification_set_icon_from_pixbuf( notify, icon );
-        g_object_unref( icon );
-    }
-}
-
-static NotifyNotification *
-tr_notify_notification_new( const char * summary,
-                            const char * body,
-                            const char * icon )
-{
-    NotifyNotification * n = notify_notification_new( summary, body, icon
-/* the fourth argument was removed in libnotify 0.7.0 */
-#if !defined(NOTIFY_VERSION_MINOR) || (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR < 7)
-                                                     , NULL
-#endif
-                                                            );
-    return n;
-}
-
 void
 gtr_notify_torrent_completed( TrCore * core, int torrent_id )
 {
-#ifdef HAVE_LIBCANBERRA
-    if( gtr_pref_flag_get( PREF_KEY_PLAY_DOWNLOAD_COMPLETE_SOUND ) )
+    if( gtr_pref_flag_get( PREF_KEY_TORRENT_COMPLETE_SOUND_ENABLED ) )
     {
-        /* play the sound, using sounds from the naming spec */
-        ca_context_play( ca_gtk_context_get (), 0,
-                         CA_PROP_EVENT_ID, "complete-download",
-                         CA_PROP_APPLICATION_NAME, g_get_application_name,
-                         CA_PROP_EVENT_DESCRIPTION, _("Download complete"),
-                         NULL);
+        const char * cmd = gtr_pref_string_get( PREF_KEY_TORRENT_COMPLETE_SOUND_COMMAND );
+        g_spawn_command_line_async( cmd, NULL );
     }
-#endif
 
-    if( gtr_pref_flag_get( PREF_KEY_SHOW_DESKTOP_NOTIFICATION ) )
+    if( gtr_pref_flag_get( PREF_KEY_TORRENT_COMPLETE_NOTIFICATION_ENABLED ) )
     {
-        NotifyNotification * n;
-        tr_torrent * tor = gtr_core_find_torrent( core, torrent_id );
-
-        n = tr_notify_notification_new( _( "Torrent Complete" ), tr_torrentName( tor ), NULL );
-        addIcon( n );
-
-        if( can_support_actions( ) )
-        {
-            const tr_info * inf = tr_torrentInfo( tor );
-            if( inf->fileCount == 1 )
-                notify_notification_add_action(
-                    n, "file", _( "Open File" ),
-                    NOTIFY_ACTION_CALLBACK( notifyCallback ),
-                    notify_callback_data_new( core, torrent_id ),
-                    notify_callback_data_free );
-
-            notify_notification_add_action(
-                n, "folder", _( "Open Folder" ),
-                NOTIFY_ACTION_CALLBACK( notifyCallback ),
-                notify_callback_data_new( core, torrent_id ),
-                notify_callback_data_free );
-        }
-
-        notify_notification_show( n, NULL );
+        const tr_torrent * tor = gtr_core_find_torrent( core, torrent_id );
+        const char * fmt = gtr_pref_string_get( PREF_KEY_TORRENT_COMPLETE_NOTIFICATION_COMMAND );
+        char * cmd = g_strdup_printf( fmt, _( "Torrent Complete" ), ( tor ? tr_torrentName( tor ) : "" ) );
+        g_spawn_command_line_async( cmd, NULL );
+        g_free( cmd );
     }
 }
 
 void
 gtr_notify_torrent_added( const char * name )
 {
-    if( gtr_pref_flag_get( PREF_KEY_SHOW_DESKTOP_NOTIFICATION ) )
+    if( gtr_pref_flag_get( PREF_KEY_TORRENT_ADDED_NOTIFICATION_ENABLED ) )
     {
-        NotifyNotification * n = tr_notify_notification_new( _( "Torrent Added" ), name, NULL );
-        addIcon( n );
-        notify_notification_set_timeout( n, NOTIFY_EXPIRES_DEFAULT );
-        notify_notification_show( n, NULL );
+        const char * fmt = gtr_pref_string_get( PREF_KEY_TORRENT_ADDED_NOTIFICATION_COMMAND );
+        char * cmd = g_strdup_printf( fmt, _( "Torrent Added" ), name );
+        g_spawn_command_line_async( cmd, NULL );
+        g_free( cmd );
     }
 }
-
-#endif
index c462a7b8270cf7384164fb234678998f446d3690..a3ff9795c27d3ed3e5c08079f23676bb07a80beb 100644 (file)
@@ -15,8 +15,6 @@
 
 #include "tr-core.h"
 
-void gtr_notify_init( void );
-
 void gtr_notify_torrent_added     ( const char * name );
 
 void gtr_notify_torrent_completed ( TrCore * core, int torrent_id );
index 530db3f88a4498c0c6ffa21e491f180524bdf71b..d6bb8f5acd3fdd53c31ebb5ffb78ef38227cbc6a 100644 (file)
@@ -343,15 +343,15 @@ torrentPage( GObject * core )
 static GtkWidget*
 desktopPage( GObject * core )
 {
-    int          row = 0;
+    int row = 0;
+    GtkWidget * t;
+    GtkWidget * w;
     const char * s;
-    GtkWidget *  t;
-    GtkWidget *  w;
 
     t = hig_workarea_create( );
     hig_workarea_add_section_title( t, &row, _( "Desktop" ) );
 
-    s = _( "Inhibit _hibernation when torrents are active" );
+    s = _( "_Inhibit hibernation when torrents are active" );
     w = new_check_button( s, PREF_KEY_INHIBIT_HIBERNATION, core );
     hig_workarea_add_wide_control( t, &row, w );
 
@@ -359,15 +359,20 @@ desktopPage( GObject * core )
     w = new_check_button( s, PREF_KEY_SHOW_TRAY_ICON, core );
     hig_workarea_add_wide_control( t, &row, w );
 
-    s = _( "Show _popup notifications" );
-    w = new_check_button( s, PREF_KEY_SHOW_DESKTOP_NOTIFICATION, core );
+    hig_workarea_add_section_divider( t, &row );
+    hig_workarea_add_section_title ( t, &row, _( "Notification" ) );
+
+    s = _( "Show a notification when torrents are a_dded" );
+    w = new_check_button( s, PREF_KEY_TORRENT_ADDED_NOTIFICATION_ENABLED, core );
     hig_workarea_add_wide_control( t, &row, w );
 
-#ifdef HAVE_LIBCANBERRA
-    s = _( "Play _sound when downloads are complete" );
-    w = new_check_button( s, PREF_KEY_PLAY_DOWNLOAD_COMPLETE_SOUND, core );
+    s = _( "Show a notification when torrents _finish" );
+    w = new_check_button( s, PREF_KEY_TORRENT_COMPLETE_NOTIFICATION_ENABLED, core );
+    hig_workarea_add_wide_control( t, &row, w );
+
+    s = _( "Play a _sound when torrents finish" );
+    w = new_check_button( s, PREF_KEY_TORRENT_COMPLETE_SOUND_ENABLED, core );
     hig_workarea_add_wide_control( t, &row, w );
-#endif
 
     hig_workarea_finish( t, &row );
     return t;
index 408dc21224c03040afb2292f3124f91c9445ea10..fa0c085fd707d65ff83d82c63ccac5da930a2692 100644 (file)
@@ -20,31 +20,35 @@ GtkWidget * gtr_prefs_dialog_new( GtkWindow * parent, GObject * core );
 /* if you add a key here,  you /must/ add its
  * default in tr_prefs_init_defaults( void ) */
 
-#define PREF_KEY_USER_HAS_GIVEN_INFORMED_CONSENT   "user-has-given-informed-consent"
-#define PREF_KEY_OPTIONS_PROMPT                    "show-options-window"
-#define PREF_KEY_OPEN_DIALOG_FOLDER                "open-dialog-dir"
-#define PREF_KEY_INHIBIT_HIBERNATION               "inhibit-desktop-hibernation"
-#define PREF_KEY_DIR_WATCH                         "watch-dir"
-#define PREF_KEY_DIR_WATCH_ENABLED                 "watch-dir-enabled"
-#define PREF_KEY_SHOW_TRAY_ICON                    "show-notification-area-icon"
-#define PREF_KEY_SHOW_DESKTOP_NOTIFICATION         "show-desktop-notification"
-#define PREF_KEY_PLAY_DOWNLOAD_COMPLETE_SOUND      "play-download-complete-sound"
-#define PREF_KEY_SHOW_MORE_TRACKER_INFO            "show-tracker-scrapes"
-#define PREF_KEY_SHOW_MORE_PEER_INFO               "show-extra-peer-details"
-#define PREF_KEY_SHOW_BACKUP_TRACKERS              "show-backup-trackers"
-#define PREF_KEY_SORT_MODE                         "sort-mode"
-#define PREF_KEY_SORT_REVERSED                     "sort-reversed"
-#define PREF_KEY_COMPACT_VIEW                      "compact-view"
-#define PREF_KEY_FILTERBAR                         "show-filterbar"
-#define PREF_KEY_STATUSBAR                         "show-statusbar"
-#define PREF_KEY_STATUSBAR_STATS                   "statusbar-stats"
-#define PREF_KEY_TOOLBAR                           "show-toolbar"
-#define PREF_KEY_BLOCKLIST_UPDATES_ENABLED         "blocklist-updates-enabled"
-#define PREF_KEY_MAIN_WINDOW_HEIGHT                "main-window-height"
-#define PREF_KEY_MAIN_WINDOW_WIDTH                 "main-window-width"
-#define PREF_KEY_MAIN_WINDOW_X                     "main-window-x"
-#define PREF_KEY_MAIN_WINDOW_Y                     "main-window-y"
-#define PREF_KEY_MAIN_WINDOW_IS_MAXIMIZED          "main-window-is-maximized"
+#define PREF_KEY_BLOCKLIST_UPDATES_ENABLED               "blocklist-updates-enabled"
+#define PREF_KEY_COMPACT_VIEW                            "compact-view"
+#define PREF_KEY_DIR_WATCH_ENABLED                       "watch-dir-enabled"
+#define PREF_KEY_DIR_WATCH                               "watch-dir"
+#define PREF_KEY_FILTERBAR                               "show-filterbar"
+#define PREF_KEY_INHIBIT_HIBERNATION                     "inhibit-desktop-hibernation"
+#define PREF_KEY_MAIN_WINDOW_HEIGHT                      "main-window-height"
+#define PREF_KEY_MAIN_WINDOW_IS_MAXIMIZED                "main-window-is-maximized"
+#define PREF_KEY_MAIN_WINDOW_WIDTH                       "main-window-width"
+#define PREF_KEY_MAIN_WINDOW_X                           "main-window-x"
+#define PREF_KEY_MAIN_WINDOW_Y                           "main-window-y"
+#define PREF_KEY_OPEN_DIALOG_FOLDER                      "open-dialog-dir"
+#define PREF_KEY_OPTIONS_PROMPT                          "show-options-window"
+#define PREF_KEY_SHOW_BACKUP_TRACKERS                    "show-backup-trackers"
+#define PREF_KEY_SHOW_MORE_PEER_INFO                     "show-extra-peer-details"
+#define PREF_KEY_SHOW_MORE_TRACKER_INFO                  "show-tracker-scrapes"
+#define PREF_KEY_SHOW_TRAY_ICON                          "show-notification-area-icon"
+#define PREF_KEY_SORT_MODE                               "sort-mode"
+#define PREF_KEY_SORT_REVERSED                           "sort-reversed"
+#define PREF_KEY_STATUSBAR                               "show-statusbar"
+#define PREF_KEY_STATUSBAR_STATS                         "statusbar-stats"
+#define PREF_KEY_TOOLBAR                                 "show-toolbar"
+#define PREF_KEY_TORRENT_ADDED_NOTIFICATION_COMMAND      "torrent-added-notification-command"
+#define PREF_KEY_TORRENT_ADDED_NOTIFICATION_ENABLED      "torrent-added-notification-enabled"
+#define PREF_KEY_TORRENT_COMPLETE_NOTIFICATION_COMMAND   "torrent-complete-notification-command"
+#define PREF_KEY_TORRENT_COMPLETE_NOTIFICATION_ENABLED   "torrent-complete-notification-enabled"
+#define PREF_KEY_TORRENT_COMPLETE_SOUND_COMMAND          "torrent-complete-sound-command"
+#define PREF_KEY_TORRENT_COMPLETE_SOUND_ENABLED          "torrent-complete-sound-enabled"
+#define PREF_KEY_USER_HAS_GIVEN_INFORMED_CONSENT         "user-has-given-informed-consent"
 
 enum
 {
index a9d44574e1128fa07cc707ba53f90b70c0e6c365..a3cddd34fcc1279b1f080dadbadeb7e8859893ee 100644 (file)
@@ -28,11 +28,7 @@ Requires: glib2 >= @GLIB_MINIMUM@
 Requires: gtk2 >= @GTK_MINIMUM@
 # OPTIONAL for the gtk+ client... see configure.ac for details
 BuildRequires: dbus-glib-devel >= @DBUS_GLIB_MINIMUM@
-BuildRequires: libcanberra-devel >= @CANBERRA_MINIMUM@
-BuildRequires: libnotify-devel >= @LIBNOTIFY_MINIMUM@
 Requires: dbus-glib >= @DBUS_GLIB_MINIMUM@
-Requires: libcanberra >= @CANBERRA_MINIMUM@
-Requires: libnotify >= @LIBNOTIFY_MINIMUM@
 
 Provides: %{name}