Index: transmission-1.34-2maemo4/gtk/tr-core.c
===================================================================
--- transmission-1.34-2maemo4.orig/gtk/tr-core.c	2009-01-31 09:21:18.000000000 +0000
+++ transmission-1.34-2maemo4/gtk/tr-core.c	2009-01-31 09:21:46.000000000 +0000
@@ -45,8 +45,6 @@
 #include "tr-torrent.h"
 #include "util.h"
 
-static void maybeInhibitHibernation( TrCore * core );
-
 static gboolean our_instance_adds_remote_torrents = FALSE;
 
 struct TrCorePrivate
@@ -500,10 +498,6 @@
         const uint16_t val = pref_int_get( key );
         tr_sessionSetPeerLimit( tr_core_handle( core ), val );
     }
-    else if( !strcmp( key, PREF_KEY_ALLOW_HIBERNATION ) )
-    {
-        maybeInhibitHibernation( core );
-    }
 #ifdef HAVE_GIO
     else if( !strcmp( key, PREF_KEY_DIR_WATCH ) ||
              !strcmp( key, PREF_KEY_DIR_WATCH_ENABLED ) )
@@ -594,7 +588,6 @@
     prefsChanged( core, PREF_KEY_SORT_REVERSED, NULL );
     prefsChanged( core, PREF_KEY_DIR_WATCH_ENABLED, NULL );
     prefsChanged( core, PREF_KEY_MAX_PEERS_GLOBAL, NULL );
-    prefsChanged( core, PREF_KEY_ALLOW_HIBERNATION, NULL );
     g_signal_connect( core, "prefs-changed", G_CALLBACK(prefsChanged), NULL );
 
     return core;
@@ -917,9 +910,6 @@
 
     /* resume sorting */
     gtk_tree_sortable_set_sort_column_id( sortable, column, order );
-
-    /* maybe inhibit hibernation */
-    maybeInhibitHibernation( self );
 }
 
 void
@@ -929,136 +919,6 @@
 }
 
 /**
-***  Hibernate
-**/
-
-#ifdef HAVE_DBUS_GLIB
-
-static DBusGProxy*
-get_hibernation_inhibit_proxy( void )
-{
-    GError * error = NULL;
-    DBusGConnection * conn;
-
-    conn = dbus_g_bus_get( DBUS_BUS_SESSION, &error );
-    if( error )
-    {
-        g_warning ("DBUS cannot connect : %s", error->message);
-        g_error_free (error);
-        return NULL;
-    }
-
-    return dbus_g_proxy_new_for_name (conn,
-               "org.freedesktop.PowerManagement",
-               "/org/freedesktop/PowerManagement/Inhibit",
-               "org.freedesktop.PowerManagement.Inhibit" );
-}
-
-static gboolean
-gtr_inhibit_hibernation( guint * cookie )
-{
-    gboolean success = FALSE;
-    DBusGProxy * proxy = get_hibernation_inhibit_proxy( );
-    if( proxy )
-    {
-        GError * error = NULL;
-        const char * application = _( "Transmission Bittorrent Client" );
-        const char * reason = _( "BitTorrent Activity" );
-        success = dbus_g_proxy_call( proxy, "Inhibit", &error,
-                                     G_TYPE_STRING, application,
-                                     G_TYPE_STRING, reason,
-                                     G_TYPE_INVALID,
-                                     G_TYPE_UINT, cookie,
-                                     G_TYPE_INVALID );
-        if( success )
-            tr_inf( _( "Disallowing desktop hibernation" ) );
-        else {
-            tr_err( _( "Couldn't disable desktop hibernation: %s" ), error->message );
-            g_error_free( error );
-        }
-
-        g_object_unref( G_OBJECT( proxy ) );
-    }
-
-    return success != 0;
-}
-
-static void
-gtr_uninhibit_hibernation( guint inhibit_cookie )
-{
-    DBusGProxy * proxy = get_hibernation_inhibit_proxy( );
-    if( proxy )
-    {
-        GError * error = NULL;
-        gboolean success = dbus_g_proxy_call( proxy, "UnInhibit", &error,
-                                              G_TYPE_UINT, inhibit_cookie,
-                                              G_TYPE_INVALID,
-                                              G_TYPE_INVALID );
-        if( success )
-            tr_inf( _( "Allowing desktop hibernation" ) );
-        else {
-            g_warning( "Couldn't uninhibit the system from suspending: %s.", error->message );
-            g_error_free( error );
-        }
-
-        g_object_unref( G_OBJECT( proxy ) );
-    }
-}
-
-#endif
-
-static void
-tr_core_set_hibernation_allowed( TrCore * core, gboolean allowed )
-{
-#ifdef HAVE_DBUS_GLIB
-    g_return_if_fail( core );
-    g_return_if_fail( core->priv );
-
-    core->priv->inhibit_allowed = allowed != 0;
-
-    if( allowed && core->priv->have_inhibit_cookie )
-    {
-        gtr_uninhibit_hibernation( core->priv->inhibit_cookie );
-        core->priv->have_inhibit_cookie = FALSE;
-    }
-
-    if( !allowed &&
-        !core->priv->have_inhibit_cookie &&
-        !core->priv->dbus_error )
-    {
-        if( gtr_inhibit_hibernation( &core->priv->inhibit_cookie ) )
-            core->priv->have_inhibit_cookie = TRUE;
-        else
-            core->priv->dbus_error = TRUE;
-    }
-#endif
-}
-
-static void
-maybeInhibitHibernation( TrCore * core )
-{
-    gboolean allowHibernation;
-    tr_handle * session = tr_core_handle( core );
-    tr_torrent * tor = NULL;
-
-    /* allow hibernation unless we have active torrents */
-    allowHibernation = TRUE;
-    while(( tor = tr_torrentNext( session, tor ))) {
-        if( tr_torrentGetStatus( tor ) != TR_STATUS_STOPPED ) {
-            allowHibernation = FALSE;
-            break;
-        }
-    }
-
-    /* even if we do have active torrents,
-     * maybe allow hibernation anyway... */
-    if( !allowHibernation )
-        allowHibernation = pref_flag_get( PREF_KEY_ALLOW_HIBERNATION );
-
-    tr_core_set_hibernation_allowed( core, allowHibernation );
-}
-
-/**
 ***  Prefs
 **/
 
Index: transmission-1.34-2maemo4/gtk/tr-prefs.c
===================================================================
--- transmission-1.34-2maemo4.orig/gtk/tr-prefs.c	2009-01-31 09:21:18.000000000 +0000
+++ transmission-1.34-2maemo4/gtk/tr-prefs.c	2009-01-31 09:21:28.000000000 +0000
@@ -52,7 +52,6 @@
 #endif
 
     pref_int_set_default    ( PREF_KEY_PEER_SOCKET_TOS, TR_DEFAULT_PEER_SOCKET_TOS );
-    pref_flag_set_default   ( PREF_KEY_ALLOW_HIBERNATION, FALSE );
     pref_flag_set_default   ( PREF_KEY_BLOCKLIST_ENABLED, TR_DEFAULT_BLOCKLIST_ENABLED );
 
     pref_string_set_default ( PREF_KEY_OPEN_DIALOG_FOLDER, g_get_home_dir( ) );
Index: transmission-1.34/gtk/tr-prefs.h
===================================================================
--- transmission-1.34.orig/gtk/tr-prefs.h	2008-09-17 02:37:35.000000000 +0100
+++ transmission-1.34/gtk/tr-prefs.h	2008-11-28 11:41:12.000000000 +0000
@@ -27,7 +27,6 @@
 #define PREF_KEY_OPTIONS_PROMPT         "show-options-window"
 #define PREF_KEY_DOWNLOAD_DIR           "download-dir"
 #define PREF_KEY_OPEN_DIALOG_FOLDER     "open-dialog-dir"
-#define PREF_KEY_ALLOW_HIBERNATION      "allow-hibernation-even-when-torrents-are-active"
 #define PREF_KEY_DIR_WATCH              "watch-dir"
 #define PREF_KEY_DIR_WATCH_ENABLED      "watch-dir-enabled"
 #define PREF_KEY_SHOW_TRAY_ICON         "show-tray-icon"
