Changeset 19 for psi/trunk/src
- Timestamp:
- Sep 5, 2006, 1:31:01 AM (19 years ago)
- Location:
- psi/trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
psi/trunk/src/common.cpp
r2 r19 27 27 28 28 QString PROG_NAME = "Psi"; 29 #ifdef Q_WS_PM 30 QString PROG_VERSION = "0.10-os2-b1 (" __DATE__ ")"; // OS/2 versions are betas yet 31 #else 29 32 //QString PROG_VERSION = "0.11-dev" " (" __DATE__ ")"; //CVS Builds are dated 30 33 QString PROG_VERSION = "0.10"; 34 #endif 31 35 32 36 #ifdef HAVE_CONFIG … … 58 62 #ifdef Q_WS_WIN 59 63 #include<windows.h> 64 #endif 65 66 #ifdef Q_WS_PM 67 #include<sys/types.h> 68 #include<sys/stat.h> 60 69 #endif 61 70 … … 995 1004 useCustom = FALSE; 996 1005 #endif 1006 #ifdef Q_WS_PM 1007 /// @todo (dmik) use HINI_USER_PROFILE\WPURLDEFAULTSETTINGS\DefaultBrowserExe 1008 #endif 997 1009 #ifdef Q_WS_X11 998 1010 if(option.browser == 0 || option.browser == 2) … … 1040 1052 QMessageBox::critical(0, CAP(QObject::tr("URL error")), QObject::tr("Unable to open the URL. Ensure that you have a web browser installed.")); 1041 1053 } 1054 #endif 1055 #ifdef Q_WS_PM 1056 /// @todo (dmik) use HINI_USER_PROFILE\WPURLDEFAULTSETTINGS\DefaultBrowserExe 1042 1057 #endif 1043 1058 #ifdef Q_WS_X11 … … 1102 1117 static void getSysInfo() 1103 1118 { 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 1105 1121 time_t x; 1106 1122 time(&x); … … 1206 1222 } 1207 1223 } 1224 #elif defined(Q_WS_PM) 1225 os_str = "OS/2"; 1208 1226 #elif defined(Q_WS_MAC) 1209 1227 os_str = "Mac OS X"; … … 1328 1346 else 1329 1347 base = QDir::homeDirPath(); 1348 1349 // no trailing slash 1350 if(base.at(base.length()-1) == '/') 1351 base.truncate(base.length()-1); 1352 1353 QDir proghome(base + "/PsiData"); 1354 if(!proghome.exists()) { 1355 QDir home(base); 1356 home.mkdir("PsiData"); 1357 } 1358 1359 return proghome.path(); 1360 } 1361 #endif 1362 1363 #ifdef Q_WS_PM 1364 QString getResourcesDir() 1365 { 1366 #if QT_VERSION >= 0x030200 1367 return qApp->applicationDirPath(); 1368 #else 1369 # error Not implemented! 1370 #endif 1371 } 1372 1373 QString getHomeDir() 1374 { 1375 QString base = QDir::homeDirPath(); 1330 1376 1331 1377 // no trailing slash … … 1465 1511 return; 1466 1512 1467 #if defined(Q_WS_WIN) || defined(Q_WS_ MAC)1513 #if defined(Q_WS_WIN) || defined(Q_WS_PM) || defined(Q_WS_MAC) 1468 1514 QSound::play(str); 1469 1515 #else -
psi/trunk/src/mainwin.cpp
r2 r19 449 449 void MainWin::setUseDock(bool use) 450 450 { 451 #ifdef Q_WS_PM 452 /// @todo (dmik) disable the docklet until the xCenter plugin is implemented 453 // (this ifdef is necessary in order to share the same config between 454 // different platforms where the Use Docklet option may be set to true. 455 return; 456 #else 451 457 if(use == false || (d->tray && option.isWMDock != d->tray->isWMDock())) { 452 458 if(d->tray) { … … 478 484 479 485 d->tray->show(); 486 #endif 480 487 } 481 488 … … 688 695 void MainWin::actReadmeActivated () 689 696 { 690 #if def Q_WS_WIN697 #if defined(Q_WS_WIN) || defined(Q_OS_OS2) 691 698 ShowTextDlg *w = new ShowTextDlg(g.pathBase + "/readme.txt"); 692 699 #else … … 868 875 #endif 869 876 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(); 872 889 e->accept(); 873 890 return; 891 #endif 874 892 } 875 893 -
psi/trunk/src/options/opt_application.cpp
r2 r19 79 79 d->gb_docklet->hide(); 80 80 #endif 81 #ifdef Q_WS_PM 82 /// @todo (dmik) disable "always on top" until implemented in Qt/2 83 d->ck_alwaysOnTop->hide(); 84 /// @todo (dmik) disable the docklet until the xCenter plugin is implemented 85 d->ck_docklet->hide(); 86 d->gb_docklet->hide(); 87 #endif 81 88 #ifndef Q_WS_X11 82 89 d->ck_dockUseWM->hide(); … … 86 93 } 87 94 95 #ifdef Q_WS_X11 88 96 static int om_x11browse[] = { 0, 2, 1 }; 97 #endif 89 98 90 99 void OptionsTabApplication::applyOptions(Options *opt) … … 143 152 selectBrowser( opt->browser ); 144 153 #endif 154 #ifdef Q_WS_PM 155 d->cb_link->insertItem(tr("PM Default Browser/Mail")); 156 d->cb_link->insertItem(tr("Custom")); 157 d->cb_link->setCurrentItem( opt->browser ); 158 selectBrowser( opt->browser ); 159 #endif 145 160 #ifdef Q_WS_X11 146 161 d->cb_link->insertItem(tr("KDE Default Browser/Mail")); … … 179 194 180 195 #ifdef Q_WS_WIN 196 if(x == 0) 197 enableCustom = FALSE; 198 #endif 199 #ifdef Q_WS_PM 181 200 if(x == 0) 182 201 enableCustom = FALSE; -
psi/trunk/src/options/opt_general.cpp
r2 r19 317 317 selectBrowser( opt->browser ); 318 318 #endif 319 #ifdef Q_WS_PM 320 d->cb_link->insertItem(tr("PM Default Browser/Mail")); 321 d->cb_link->insertItem(tr("Custom")); 322 d->cb_link->setCurrentItem( opt->browser ); 323 selectBrowser( opt->browser ); 324 #endif 319 325 #ifdef Q_WS_X11 320 326 d->cb_link->insertItem(tr("KDE Default Browser/Mail")); … … 342 348 343 349 #ifdef Q_WS_WIN 350 if(x == 0) 351 enableCustom = FALSE; 352 #endif 353 #ifdef Q_WS_PM 344 354 if(x == 0) 345 355 enableCustom = FALSE; -
psi/trunk/src/options/opt_sound.cpp
r2 r19 102 102 d->lb_player->hide(); 103 103 d->le_player->hide(); 104 #elif defined(Q_WS_PM) 105 d->lb_player->hide(); 106 d->le_player->hide(); 104 107 #elif defined(Q_WS_MAC) 105 108 d->lb_player->hide(); … … 133 136 #if defined(Q_WS_WIN) 134 137 d->le_player->setText(tr("Windows Sound")); 138 #elif defined(Q_WS_PM) 139 d->le_player->setText(tr("OS/2 MMPM Sound")); 135 140 #elif defined(Q_WS_MAC) 136 141 d->le_player->setText(tr("Mac OS Sound")); -
psi/trunk/src/psi_profiles.cpp
r2 r19 310 310 void UserProfile::reset() 311 311 { 312 bool nix, win, mac ;313 nix = win = mac = FALSE;312 bool nix, win, mac, os2; 313 nix = win = mac = os2 = FALSE; 314 314 315 315 #ifdef Q_WS_X11 … … 321 321 #ifdef Q_WS_MAC 322 322 mac = TRUE; 323 #endif 324 #ifdef Q_WS_PM 325 os2 = TRUE; 323 326 #endif 324 327
Note:
See TracChangeset
for help on using the changeset viewer.