Changeset 4018e43


Ignore:
Timestamp:
Jul 10, 2013 8:46:46 AM (9 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
b1457e5
Parents:
f7f168f
git-author:
Ken Moore <ken@…> (07/10/13 08:42:50)
git-committer:
Ken Moore <ken@…> (07/10/13 08:46:46)
Message:

Update the PCDM splash screen, and finish adjusting the toolbar size.
Allow PCDM to detect when the system is shutting down, and show the splash screen until the shutdown procedure closes the program (30 sec max wait).

Location:
src-qt4/PCDM
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/PCDM/images/.directory

    r1620346 r4018e43  
    11[Dolphin] 
    2 Timestamp=2013,2,12,14,28,59 
     2PreviewsShown=true 
     3Timestamp=2013,7,10,10,57,40 
    34Version=3 
    4 ViewMode=2 
  • src-qt4/PCDM/src/main.cpp

    rabea4e8 r4018e43  
    118118    w.show(); 
    119119    a.exec(); 
    120  
    121120  }  // end of PCDM GUI running 
    122    
     121  int retcode = 0; 
    123122  //Wait for the desktop session to finish before exiting 
    124123  desktop.waitForSessionClosed(); 
     124  splash.show(); //show the splash screen again 
     125  splash.showMessage(QObject::tr("System Shutting Down")); 
     126  //check for shutdown process 
     127  if(QFile::exists("/var/run/nologin")){ 
     128    //Pause for a few seconds to prevent starting a new session during a shutdown 
     129    QTime wTime = QTime::currentTime().addSecs(30); 
     130    while( QTime::currentTime() < wTime ){  
     131      //Keep processing events during the wait (for splashscreen) 
     132      QCoreApplication::processEvents(QEventLoop::AllEvents, 100);  
     133    } 
     134    //set the return code for a shutdown 
     135    retcode = -1; //make sure it does not start a new session 
     136  } 
    125137   
    126138  //Clean up Code 
     
    132144   
    133145   
    134   return 0; 
     146  return retcode; 
    135147} 
    136148 
     
    138150{ 
    139151 bool neverquit = TRUE; 
    140  bool runonce = FALSE; 
     152 bool runonce = TRUE; //looping is currently not working yet - needs to restart X each time? 
    141153 if(argc==2){ if( QString(argv[1]) == "--once"){ runonce = TRUE; } } 
    142154   
     
    146158  int retCode = runSingleSession(argc,argv); 
    147159  if(retCode != 0){ neverquit=FALSE; } 
     160  if( (retCode < 0) && QFile::exists("/var/run/nologin") ){  
     161    //Shutdown Process got hung up somewhere: force it now 
     162    //system("shutdown -p now"); 
     163  } 
    148164 } 
    149165 return 0; 
  • src-qt4/PCDM/src/pcdm-gui.cpp

    ra5bc020 r4018e43  
    149149      sdeSwitcher = new QComboBox(this);  
    150150      sdeSwitcher->setFocusPolicy( Qt::NoFocus ); 
     151      sdeSwitcher->setIconSize(currentTheme->itemIconSize("toolbar")); 
    151152      toolbar->addWidget(sdeSwitcher); 
    152153      //Add an additional spacer 
     
    345346    Backend::log("PCDM: Shutting down computer"); 
    346347    system("shutdown -p now"); 
     348    close(); 
    347349  } 
    348350} 
     
    360362    Backend::log("PCDM: Restarting computer"); 
    361363    system("shutdown -r now"); 
     364    close(); 
    362365  } 
    363366} 
  • src-qt4/PCDM/themes/default/default.theme

    ra3c7851 r4018e43  
    4545# TOOLBAR SETTINGS 
    4646TOOLBAR_LOCATION=bottom         # [bottom | top | left | right] 
    47 TOOLBAR_IMAGE_SIZE=32x32     # Set the default size for all images in the toolbar 
     47TOOLBAR_IMAGE_SIZE=28x28     # Set the default size for all images in the toolbar 
    4848TOOLBAR_STYLE=textbesideicon            # [icononly | textonly | textbesideicon | textundericon] 
    4949 
Note: See TracChangeset for help on using the changeset viewer.