Changeset 8262


Ignore:
Timestamp:
Apr 21, 2009, 1:00:17 AM (13 years ago)
Author:
charles
Message:

(trunk gtk, qt) sync some keyboard mnemonics and the about dialogs

Location:
trunk
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/details.c

    r8258 r8262  
    489489                      G_CALLBACK( onPeerViewQueryTooltip ), NULL );
    490490#endif
    491     gtk_widget_set_size_request( v, 550, 0 );
    492491    g_object_unref( G_OBJECT( m ) );
    493492    g_signal_connect( v, "button-release-event",
     
    10531052    row = 0;
    10541053    t = hig_workarea_create( );
    1055     hig_workarea_add_section_title( t, &row, _( "Speed Limits" ) );
     1054    hig_workarea_add_section_title( t, &row, _( "Speed" ) );
    10561055
    10571056        b = tr_torrentUsesSessionLimits( tor );
  • trunk/qt/about.cc

    r8188 r8262  
    1111 */
    1212
    13 #include <QAbstractButton>
    14 #include <QMovie>
     13#include <QDialogButtonBox>
     14#include <QFont>
     15#include <QLabel>
     16#include <QPixmap>
     17#include <QVBoxLayout>
     18#include <QWidget>
    1519
    1620#include <libtransmission/transmission.h>
     
    1923#include "about.h"
    2024
    21 namespace
    22 {
    23     QMovie * movie;
    24 }
    25 
    2625AboutDialog :: AboutDialog( QWidget * parent ):
    2726    QDialog( parent, Qt::Dialog )
    2827{
    29     ui.setupUi( this );
     28    QLabel * l;
     29    QVBoxLayout * v = new QVBoxLayout( this );
     30    setWindowTitle( tr( "About Transmission" ) );
    3031
    31     ui.label->setText( "Transmission " LONG_VERSION_STRING );
    32     connect( ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(hide()));
    33     movie = new QMovie( ":/icons/dance.gif" );
    34     connect( movie, SIGNAL(frameChanged(int)), this, SLOT(onFrameChanged()));
    35     movie->start( );
     32    l = new QLabel;
     33    l->setPixmap( QPixmap( ":/icons/transmission-48.png" ) );
     34    l->setAlignment( Qt::AlignCenter );
     35    v->addWidget( l );
     36
     37    QFont f( font( ) );
     38    f.setWeight( QFont::Bold );
     39    f.setPointSize( int( f.pointSize( ) * 1.2 ) );
     40    l = new QLabel( "<big>Transmission " LONG_VERSION_STRING "</big>" );
     41    l->setAlignment( Qt::AlignCenter );
     42    l->setFont( f );
     43    l->setMargin( 8 );
     44    v->addWidget( l );
     45
     46    l = new QLabel( tr( "A fast and easy BitTorrent client" ) );
     47    l->setStyleSheet( "text-align: center" );
     48    l->setAlignment( Qt::AlignCenter );
     49    v->addWidget( l );
     50
     51    l = new QLabel( tr( "Copyright 2005-2009, the Transmission project" ) );
     52    l->setAlignment( Qt::AlignCenter );
     53    v->addWidget( l );
     54
     55    l = new QLabel( "<a href=\"http://www.transmissionbt.com/\">http://www.transmissionbt.com/</a>" );
     56    l->setOpenExternalLinks( true );
     57    l->setAlignment( Qt::AlignCenter );
     58    v->addWidget( l );
     59
     60    v->addSpacing( 10 );
     61
     62    QDialogButtonBox * box = new QDialogButtonBox;
     63    box->addButton( QDialogButtonBox::Close );
     64    box->setCenterButtons( true );
     65    v->addWidget( box );
     66    connect( box, SIGNAL(rejected()), this, SLOT(hide()) );
    3667}
    37 
    38 AboutDialog :: ~AboutDialog( )
    39 {
    40 }
    41 
    42 void
    43 AboutDialog :: onFrameChanged( )
    44 {
    45     ui.aboutLogo->setPixmap( movie->currentPixmap( ) );
    46 }
  • trunk/qt/about.h

    r8188 r8262  
    1414#define ABOUT_DIALOG_H
    1515
    16 class QAbstractButton;
    17 class QIcon;
    1816#include <QDialog>
    19 
    20 #include "ui_about.h"
    2117
    2218class AboutDialog: public QDialog
     
    2420        Q_OBJECT
    2521
    26     private:
    27         Ui_AboutDialog ui;
    28 
    29     private slots:
    30         void onFrameChanged( );
    31 
    3222    public:
    3323        AboutDialog( QWidget * parent = 0 );
    34         ~AboutDialog( );
     24        ~AboutDialog( ) { }
    3525
    3626};
  • trunk/qt/mainwin.cc

    r8255 r8262  
    1717#include <QDesktopServices>
    1818#include <QFileDialog>
     19#include <QLabel>
    1920#include <QSize>
    2021#include <QStyle>
  • trunk/qt/prefs-dialog.cc

    r8255 r8262  
    471471    hig->addSectionDivider( );
    472472    hig->addSectionTitle( tr( "Privacy" ) );
    473     hig->addRow( tr( "Encryption &mode:" ), box );
     473    hig->addRow( tr( "&Encryption mode:" ), box );
    474474    hig->addWideControl( checkBoxNew( tr( "Use peer e&xchange" ), Prefs::PEX_ENABLED ) );
    475475
  • trunk/qt/qtr.pro

    r8237 r8262  
    2121TRANSLATIONS += transmission_en.ts
    2222
    23 FORMS += mainwin.ui about.ui
     23FORMS += mainwin.ui
    2424RESOURCES += application.qrc
    2525SOURCES += about.cc app.cc details.cc file-tree.cc filters.cc hig.cc \
Note: See TracChangeset for help on using the changeset viewer.