Changeset 19 for psi


Ignore:
Timestamp:
Sep 5, 2006, 1:31:01 AM (19 years ago)
Author:
dmik
Message:

UI: Misc changes:

  • Added OS/2-related definitions.
  • On all platforms but Mac, the main (roster) window will be minimized (instead of closing) when Esc is pressed, but the doclet window is disabled.
Location:
psi/trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • psi/trunk/src/common.cpp

    r2 r19  
    2727
    2828QString PROG_NAME = "Psi";
     29
     30
     31
    2932//QString PROG_VERSION = "0.11-dev" " (" __DATE__ ")"; //CVS Builds are dated
    3033QString PROG_VERSION = "0.10";
     34
    3135
    3236#ifdef HAVE_CONFIG
     
    5862#ifdef Q_WS_WIN
    5963#include<windows.h>
     64
     65
     66
     67
     68
    6069#endif
    6170
     
    9951004                useCustom = FALSE;
    9961005#endif
     1006
     1007
     1008
    9971009#ifdef Q_WS_X11
    9981010        if(option.browser == 0 || option.browser == 2)
     
    10401052                        QMessageBox::critical(0, CAP(QObject::tr("URL error")), QObject::tr("Unable to open the URL. Ensure that you have a web browser installed."));
    10411053                }
     1054
     1055
     1056
    10421057#endif
    10431058#ifdef Q_WS_X11
     
    11021117static void getSysInfo()
    11031118{
    1104 #if defined(Q_WS_X11) || defined(Q_WS_MAC)
     1119#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_PM)
     1120        /// @todo (dmik) test it
    11051121        time_t x;
    11061122        time(&x);
     
    12061222                }
    12071223        }
     1224
     1225
    12081226#elif defined(Q_WS_MAC)
    12091227        os_str = "Mac OS X";
     
    13281346        else
    13291347                base = QDir::homeDirPath();
     1348
     1349
     1350
     1351
     1352
     1353
     1354
     1355
     1356
     1357
     1358
     1359
     1360
     1361
     1362
     1363
     1364
     1365
     1366
     1367
     1368
     1369
     1370
     1371
     1372
     1373
     1374
     1375
    13301376
    13311377        // no trailing slash
     
    14651511                return;
    14661512
    1467 #if defined(Q_WS_WIN) || defined(Q_WS_MAC)
     1513#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
    14681514        QSound::play(str);
    14691515#else
  • psi/trunk/src/mainwin.cpp

    r2 r19  
    449449void MainWin::setUseDock(bool use)
    450450{
     451
     452
     453
     454
     455
     456
    451457        if(use == false || (d->tray && option.isWMDock != d->tray->isWMDock())) {
    452458                if(d->tray) {
     
    478484
    479485        d->tray->show();
     486
    480487}
    481488
     
    688695void MainWin::actReadmeActivated ()
    689696{
    690 #ifdef Q_WS_WIN
     697#if
    691698        ShowTextDlg *w = new ShowTextDlg(g.pathBase + "/readme.txt");
    692699#else
     
    868875#endif
    869876
    870         if(allowed && closekey) {
    871                 close();
     877        if(closekey) {
     878#ifdef Q_WS_MAC
     879                if(allowed) {
     880                        close();
     881                        e->accept();
     882                        return;
     883                }
     884#else                   
     885                if(allowed)
     886                        close();
     887                else
     888                        showMinimized();
    872889                e->accept();
    873890                return;
     891
    874892        }
    875893
  • psi/trunk/src/options/opt_application.cpp

    r2 r19  
    7979        d->gb_docklet->hide();
    8080#endif
     81
     82
     83
     84
     85
     86
     87
    8188#ifndef Q_WS_X11
    8289        d->ck_dockUseWM->hide();
     
    8693}
    8794
     95
    8896static int om_x11browse[] = { 0, 2, 1 };
     97
    8998
    9099void OptionsTabApplication::applyOptions(Options *opt)
     
    143152        selectBrowser( opt->browser );
    144153#endif
     154
     155
     156
     157
     158
     159
    145160#ifdef Q_WS_X11
    146161        d->cb_link->insertItem(tr("KDE Default Browser/Mail"));
     
    179194
    180195#ifdef Q_WS_WIN
     196
     197
     198
     199
    181200        if(x == 0)
    182201                enableCustom = FALSE;
  • psi/trunk/src/options/opt_general.cpp

    r2 r19  
    317317        selectBrowser( opt->browser );
    318318#endif
     319
     320
     321
     322
     323
     324
    319325#ifdef Q_WS_X11
    320326        d->cb_link->insertItem(tr("KDE Default Browser/Mail"));
     
    342348
    343349#ifdef Q_WS_WIN
     350
     351
     352
     353
    344354        if(x == 0)
    345355                enableCustom = FALSE;
  • psi/trunk/src/options/opt_sound.cpp

    r2 r19  
    102102        d->lb_player->hide();
    103103        d->le_player->hide();
     104
     105
     106
    104107#elif defined(Q_WS_MAC)
    105108        d->lb_player->hide();
     
    133136#if defined(Q_WS_WIN)
    134137        d->le_player->setText(tr("Windows Sound"));
     138
     139
    135140#elif defined(Q_WS_MAC)
    136141        d->le_player->setText(tr("Mac OS Sound"));
  • psi/trunk/src/psi_profiles.cpp

    r2 r19  
    310310void UserProfile::reset()
    311311{
    312         bool nix, win, mac;
    313         nix = win = mac = FALSE;
     312        bool nix, win, mac;
     313        nix = win = mac = FALSE;
    314314
    315315#ifdef Q_WS_X11
     
    321321#ifdef Q_WS_MAC
    322322        mac = TRUE;
     323
     324
     325
    323326#endif
    324327
Note: See TracChangeset for help on using the changeset viewer.