From e1d8cf5a4a0e32390f4bb3ad22f3c3eb1c2c14c7 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 21 Apr 2009 01:00:17 +0000 Subject: [PATCH] (trunk gtk, qt) sync some keyboard mnemonics and the about dialogs --- gtk/details.c | 3 +- qt/about.cc | 63 +++-- qt/about.h | 12 +- qt/about.ui | 576 --------------------------------------------- qt/mainwin.cc | 1 + qt/prefs-dialog.cc | 2 +- qt/qtr.pro | 2 +- 7 files changed, 47 insertions(+), 612 deletions(-) delete mode 100644 qt/about.ui diff --git a/gtk/details.c b/gtk/details.c index 290f016d1..e181ab3c8 100644 --- a/gtk/details.c +++ b/gtk/details.c @@ -488,7 +488,6 @@ peer_page_new( TrTorrent * gtor ) g_signal_connect( v, "query-tooltip", G_CALLBACK( onPeerViewQueryTooltip ), NULL ); #endif - gtk_widget_set_size_request( v, 550, 0 ); g_object_unref( G_OBJECT( m ) ); g_signal_connect( v, "button-release-event", G_CALLBACK( on_tree_view_button_released ), NULL ); @@ -1052,7 +1051,7 @@ options_page_new( struct ResponseData * data ) row = 0; t = hig_workarea_create( ); - hig_workarea_add_section_title( t, &row, _( "Speed Limits" ) ); + hig_workarea_add_section_title( t, &row, _( "Speed" ) ); b = tr_torrentUsesSessionLimits( tor ); tb = hig_workarea_add_wide_checkbutton( t, &row, _( "Honor global _limits" ), b ); diff --git a/qt/about.cc b/qt/about.cc index 739879549..1abebf077 100644 --- a/qt/about.cc +++ b/qt/about.cc @@ -10,37 +10,58 @@ * $Id:$ */ -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include "about.h" -namespace -{ - QMovie * movie; -} - AboutDialog :: AboutDialog( QWidget * parent ): QDialog( parent, Qt::Dialog ) { - ui.setupUi( this ); + QLabel * l; + QVBoxLayout * v = new QVBoxLayout( this ); + setWindowTitle( tr( "About Transmission" ) ); - ui.label->setText( "Transmission " LONG_VERSION_STRING ); - connect( ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(hide())); - movie = new QMovie( ":/icons/dance.gif" ); - connect( movie, SIGNAL(frameChanged(int)), this, SLOT(onFrameChanged())); - movie->start( ); -} + l = new QLabel; + l->setPixmap( QPixmap( ":/icons/transmission-48.png" ) ); + l->setAlignment( Qt::AlignCenter ); + v->addWidget( l ); -AboutDialog :: ~AboutDialog( ) -{ -} + QFont f( font( ) ); + f.setWeight( QFont::Bold ); + f.setPointSize( int( f.pointSize( ) * 1.2 ) ); + l = new QLabel( "Transmission " LONG_VERSION_STRING "" ); + l->setAlignment( Qt::AlignCenter ); + l->setFont( f ); + l->setMargin( 8 ); + v->addWidget( l ); -void -AboutDialog :: onFrameChanged( ) -{ - ui.aboutLogo->setPixmap( movie->currentPixmap( ) ); + l = new QLabel( tr( "A fast and easy BitTorrent client" ) ); + l->setStyleSheet( "text-align: center" ); + l->setAlignment( Qt::AlignCenter ); + v->addWidget( l ); + + l = new QLabel( tr( "Copyright 2005-2009, the Transmission project" ) ); + l->setAlignment( Qt::AlignCenter ); + v->addWidget( l ); + + l = new QLabel( "http://www.transmissionbt.com/" ); + l->setOpenExternalLinks( true ); + l->setAlignment( Qt::AlignCenter ); + v->addWidget( l ); + + v->addSpacing( 10 ); + + QDialogButtonBox * box = new QDialogButtonBox; + box->addButton( QDialogButtonBox::Close ); + box->setCenterButtons( true ); + v->addWidget( box ); + connect( box, SIGNAL(rejected()), this, SLOT(hide()) ); } diff --git a/qt/about.h b/qt/about.h index bdec209fc..c653c69a7 100644 --- a/qt/about.h +++ b/qt/about.h @@ -13,25 +13,15 @@ #ifndef ABOUT_DIALOG_H #define ABOUT_DIALOG_H -class QAbstractButton; -class QIcon; #include -#include "ui_about.h" - class AboutDialog: public QDialog { Q_OBJECT - private: - Ui_AboutDialog ui; - - private slots: - void onFrameChanged( ); - public: AboutDialog( QWidget * parent = 0 ); - ~AboutDialog( ); + ~AboutDialog( ) { } }; diff --git a/qt/about.ui b/qt/about.ui deleted file mode 100644 index 087f17d41..000000000 --- a/qt/about.ui +++ /dev/null @@ -1,576 +0,0 @@ - - - AboutDialog - - - - 0 - 0 - 327 - 245 - - - - - 0 - 0 - - - - About Transmission - - - - - - - - - :/icons/transmission-48.png - - - Qt::AlignCenter - - - - - - - - 16 - 75 - true - - - - Transmission 1.60 - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 300 - 3 - - - - - - - - A fast and easy BitTorrent client - - - Qt::AlignCenter - - - - - - - Copyright 2005-2009 by the Transmission Project - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 4 - - - - - - - - - - - - - 0 - 85 - 255 - - - - - - - 0 - 85 - 255 - - - - - - - 127 - 170 - 255 - - - - - - - 63 - 127 - 255 - - - - - - - 0 - 42 - 127 - - - - - - - 0 - 56 - 170 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 85 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 170 - 255 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 85 - 255 - - - - - - - 0 - 85 - 255 - - - - - - - 127 - 170 - 255 - - - - - - - 63 - 127 - 255 - - - - - - - 0 - 42 - 127 - - - - - - - 0 - 56 - 170 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 85 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 170 - 255 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 42 - 127 - - - - - - - 0 - 85 - 255 - - - - - - - 127 - 170 - 255 - - - - - - - 63 - 127 - 255 - - - - - - - 0 - 42 - 127 - - - - - - - 0 - 56 - 170 - - - - - - - 0 - 42 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 42 - 127 - - - - - - - 0 - 85 - 255 - - - - - - - 0 - 85 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 85 - 255 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - true - - - - PointingHandCursor - - - <a href="http://www.transmissionbt.com">http://www.transmissionbt.com/</a> - - - Qt::AlignCenter - - - true - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Close - - - true - - - - - - - - - - diff --git a/qt/mainwin.cc b/qt/mainwin.cc index 8d906f190..a3497be35 100644 --- a/qt/mainwin.cc +++ b/qt/mainwin.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/prefs-dialog.cc b/qt/prefs-dialog.cc index 4ae97b570..255da3e38 100644 --- a/qt/prefs-dialog.cc +++ b/qt/prefs-dialog.cc @@ -470,7 +470,7 @@ PrefsDialog :: createPeersTab( ) hig->addSectionDivider( ); hig->addSectionTitle( tr( "Privacy" ) ); - hig->addRow( tr( "Encryption &mode:" ), box ); + hig->addRow( tr( "&Encryption mode:" ), box ); hig->addWideControl( checkBoxNew( tr( "Use peer e&xchange" ), Prefs::PEX_ENABLED ) ); hig->finish( ); diff --git a/qt/qtr.pro b/qt/qtr.pro index 1c6a78e29..4024b630d 100644 --- a/qt/qtr.pro +++ b/qt/qtr.pro @@ -20,7 +20,7 @@ LIBS += $${TRANSMISSION_TOP}/third-party/libevent/.libs/libevent.a TRANSLATIONS += transmission_en.ts -FORMS += mainwin.ui about.ui +FORMS += mainwin.ui RESOURCES += application.qrc SOURCES += about.cc app.cc details.cc file-tree.cc filters.cc hig.cc \ mainwin.cc make-dialog.cc options.cc prefs.cc prefs-dialog.cc \ -- 2.40.0