~ubuntu-branches/ubuntu/maverick/transmission/maverick-updates

« back to all changes in this revision

Viewing changes to qt/mainwin.cc

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson, Krzysztof Klimonda, Chris Coulson
  • Date: 2009-09-09 09:06:11 UTC
  • mfrom: (1.1.27 upstream)
  • Revision ID: james.westby@ubuntu.com-20090909090611-09ai2hyo66h1dhv8
Tags: 1.74-0ubuntu1
[ Krzysztof Klimonda ]
* Merge from debian unstable, remaining changes:
  - debian/control:
    + Added replaces & provides clutch (now included as part of transmission).
    + add liblaunchpad-integration to Build-Depends
  - debian/rules:
    + Create a PO template during package build.
  - debian/patches/01_lpi.patch:
    + Integrate Transmission with Launchpad
  - debian/patches/20_add_X-Ubuntu-Gettext-Domain.diff:
    + Add X-Ubuntu-Gettext-Domain to .desktop file.
* debian/control:
  - add lsb-release to Build-Depends
* This includes the QT client in transmission-qt.

[ Chris Coulson ]
* Update to new upstream version 1.74 (LP: #418367):
  - Better data recovery in the case of an OS or Transmission crash
  - If a data file is moved, stop the torrent instead of redownloading 
    it (LP: #419304).
  - Fix bug that didn't list some peers in the resume file and in PEX
  - More helpful torrent error messages
  - DHT now honors the bind-address-ipv4 configuration option
  - Fix Debian build error with miniupnpc
  - Fix Cygwin build error with strtold
  - Update to a newer snapshot of miniupnpc
  - Fix crash that occurred when adding torrents on some desktops
  - Synchronize the statusbar's and torrent list's speeds
  - Fix the Properties dialog's "Origin" field for multiple torrents
* debian/rules, debian/control:
  - Don't run autoreconf at build time and don't build-dep on libtool.
* debian/control:
  - transmission-common replaces transmission-gtk (<< 1.74) rather than
    (<= 1.73-1).
* Refreshed patches:
  - 01_lpi.patch.
  - dont_build_libevent.patch.
  - qt_client_use_system_libevent.patch.
* Dropped patches not needed anymore:
  - updateminiupnpcstrings_double_escape_slash.patch
* Added 99_autoreconf.patch for autotools update.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * This exemption does not extend to derived works not owned by
8
8
 * the Transmission project.
9
9
 *
10
 
 * $Id: mainwin.cc 8769 2009-07-01 23:40:07Z charles $
 
10
 * $Id: mainwin.cc 8890 2009-08-11 18:57:49Z charles $
11
11
 */
12
12
 
13
13
#include <cassert>
227
227
    myTrayIcon.setIcon( QApplication::windowIcon( ) );
228
228
 
229
229
    connect( &myPrefs, SIGNAL(changed(int)), this, SLOT(refreshPref(int)) );
230
 
    connect( ui.action_ShowMainWindow, SIGNAL(toggled(bool)), this, SLOT(toggleWindows()));
 
230
    connect( ui.action_ShowMainWindow, SIGNAL(toggled(bool)), this, SLOT(toggleWindows(bool)));
231
231
    connect( &myTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
232
232
             this, SLOT(trayActivated(QSystemTrayIcon::ActivationReason)));
233
233
 
883
883
**/
884
884
 
885
885
void
886
 
TrMainWindow :: toggleWindows( )
 
886
TrMainWindow :: toggleWindows( bool doShow )
887
887
{
888
 
    setVisible( !isVisible( ) );
 
888
    if( !doShow )
 
889
    {
 
890
        hide( );
 
891
    }
 
892
    else
 
893
    {
 
894
        if ( !isVisible( ) ) show( );
 
895
        if ( isMinimized( ) ) showNormal( );
 
896
        activateWindow( );
 
897
        raise( );
 
898
    }
889
899
}
890
900
 
891
901
void
892
902
TrMainWindow :: trayActivated( QSystemTrayIcon::ActivationReason reason )
893
903
{
894
904
    if( reason == QSystemTrayIcon::Trigger )
895
 
        ui.action_ShowMainWindow->toggle( );
 
905
    {
 
906
        if( isMinimized ( ) )
 
907
            toggleWindows( true );
 
908
        else
 
909
            ui.action_ShowMainWindow->toggle( );
 
910
    }
896
911
}
897
912
 
898
913