Changeset dae2bf54


Ignore:
Timestamp:
07/08/13 12:39:11 (14 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
4f9718b
Parents:
5e1ad95 (diff), 336650c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/PCDM/src/main.cpp

    r68de35a rabea4e8  
    106106    splash.finish(&w); //close the splash when the GUI starts up 
    107107    //Set the proper size on the Application 
    108       w.setWindowFlags(w.windowFlags() ^Qt::WindowSoftkeysVisibleHint); 
    109       w.setWindowState(Qt::WindowFullScreen); 
     108      w.setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint); 
     109      w.setWindowState(Qt::WindowMaximized); //Qt::WindowFullScreen); 
    110110 
    111111    //Setup the signals/slots to startup the desktop session 
  • src-qt4/PCDM/src/pcdm-gui.cpp

    r2d615ae rabea4e8  
    1515#include "fancySwitcher.h" 
    1616 
    17 bool DEBUG_MODE=FALSE; 
     17bool DEBUG_MODE=TRUE; 
     18QString VIRTUALKBDBIN="/usr/local/bin/xvkbd -compact"; 
    1819 
    1920PCDMgui::PCDMgui() : QMainWindow() 
     
    6061  QString tmpIcon; //used for checking image files before loading them 
    6162  //Set the background image 
     63  if(DEBUG_MODE){ qDebug() << "Setting Background Image"; } 
    6264  if( currentTheme->itemIsEnabled("background") ){ 
    6365    tmpIcon = currentTheme->itemIcon("background"); 
     
    7274  this->setStyleSheet( style.simplified() ); 
    7375 
     76  //Check for whether the desktop switcher is on the toolbar or not 
     77  simpleDESwitcher = (currentTheme->itemValue("desktop") == "simple"); 
     78   
    7479  //get the default translation directory 
     80  if(DEBUG_MODE){ qDebug() << "Load Translations"; } 
    7581  translationDir = QApplication::applicationDirPath() + "/i18n/"; 
    7682  //Fill the translator 
     
    7985  toolbar = new QToolBar(); 
    8086  //Add the Toolbar to the window 
     87  if(DEBUG_MODE){ qDebug() << "Create Toolbar"; } 
    8188    //use the theme location    
    8289    QString tarea = currentTheme->itemValue("toolbar"); 
     
    105112  //Populate the Toolbar with items (starts at leftmost/topmost) 
    106113    //----Virtual Keyboard 
    107     tmpIcon = currentTheme->itemIcon("vkeyboard"); 
    108     if(!QFile::exists(tmpIcon) || tmpIcon.isEmpty() ){ tmpIcon=":/images/input-keyboard.png"; } 
    109     virtkeyboardButton = new QAction( QIcon(tmpIcon),tr("Virtual Keyboard"),this ); 
    110     toolbar->addAction(virtkeyboardButton); 
    111     connect( virtkeyboardButton, SIGNAL(triggered()), this, SLOT(slotPushVirtKeyboard()) ); 
     114    if(currentTheme->itemIsEnabled("vkeyboard") ){ 
     115      if(DEBUG_MODE){ qDebug() << " - Create Virtual Keyboard Button"; } 
     116      tmpIcon = currentTheme->itemIcon("vkeyboard"); 
     117      if(!QFile::exists(tmpIcon) || tmpIcon.isEmpty() ){ tmpIcon=":/images/input-keyboard.png"; } 
     118      virtkeyboardButton = new QAction( QIcon(tmpIcon),tr("Virtual Keyboard"),this ); 
     119      toolbar->addAction(virtkeyboardButton); 
     120      connect( virtkeyboardButton, SIGNAL(triggered()), this, SLOT(slotPushVirtKeyboard()) ); 
     121    }else{ 
     122      virtkeyboardButton = new QAction(this); 
     123    } 
    112124 
    113125    //----Locale Switcher 
     126    if(DEBUG_MODE){ qDebug() << " - Create Locale Button"; } 
    114127    tmpIcon = currentTheme->itemIcon("locale"); 
    115128    if(!QFile::exists(tmpIcon) || tmpIcon.isEmpty() ){ tmpIcon=":/images/language.png"; } 
     
    119132     
    120133    //----Keyboard Layout Switcher 
     134    if(DEBUG_MODE){ qDebug() << " - Create Keyboard Layout Button"; } 
    121135    tmpIcon = currentTheme->itemIcon("keyboard"); 
    122136    if(!QFile::exists(tmpIcon) || tmpIcon.isEmpty() ){ tmpIcon=":/images/keyboard.png"; } 
     
    130144    toolbar->addWidget(spacer); 
    131145     
     146    if(simpleDESwitcher){ 
     147      if(DEBUG_MODE){ qDebug() << " - Create Simple DE Switcher"; } 
     148      //Create the simple DE Switcher 
     149      sdeSwitcher = new QComboBox(this);  
     150      toolbar->addWidget(sdeSwitcher); 
     151      //Add an additional spacer 
     152      QWidget* spacer2 = new QWidget(); 
     153      spacer2->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); 
     154      toolbar->addWidget(spacer2); 
     155       
     156    } 
     157     
    132158    //----System Shutdown/Restart 
     159    if(DEBUG_MODE){ qDebug() << " - Create System Button"; } 
    133160    tmpIcon = currentTheme->itemIcon("system"); 
    134161    if(!QFile::exists(tmpIcon) || tmpIcon.isEmpty() ){ tmpIcon=":/images/system.png"; } 
     
    143170  //Create the grid layout 
    144171  QGridLayout* grid = new QGridLayout; 
     172  if(DEBUG_MODE){ qDebug() << "Fill Desktop Area"; } 
    145173  //Populate the grid with items 
    146174    //----Header Image 
    147175    QLabel* header = new QLabel;  
    148176    if( currentTheme->itemIsEnabled("header") ){ 
     177      if(DEBUG_MODE){ qDebug() << " - Create Header"; } 
    149178      tmpIcon = currentTheme->itemIcon("header"); 
    150179      if(!QFile::exists(tmpIcon) || tmpIcon.isEmpty() ){ tmpIcon=":/images/banner.png"; } 
     
    158187     
    159188    //Username/Password/Login widget 
     189    if(DEBUG_MODE){ qDebug() << " - Create Login Widget"; } 
    160190    loginW = new LoginWidget; 
    161191    loginW->setUsernames(Backend::getSystemUsers()); //add in the detected users 
     
    187217     
    188218    //----Desktop Environment Switcher 
    189     //Create the switcher 
    190     deSwitcher = new FancySwitcher(this, !currentTheme->itemIsVertical("desktop") ); 
    191     QSize deSize = currentTheme->itemIconSize("desktop"); 
    192     deSwitcher->setIconSize(deSize.height()); 
    193     tmpIcon = currentTheme->itemIcon("nextde"); 
    194     if( !tmpIcon.isEmpty() && QFile::exists(tmpIcon) ){ deSwitcher->changeButtonIcon("forward", tmpIcon); } 
    195     tmpIcon = currentTheme->itemIcon("previousde"); 
    196     if( !tmpIcon.isEmpty() && QFile::exists(tmpIcon) ){ deSwitcher->changeButtonIcon("back", tmpIcon); } 
    197     //Figure out if we need to smooth out the animation 
    198     deSwitcher->setNumberAnimationFrames("4");  
    199     //NOTE: A transparent widget background slows the full animation to a crawl with a stretched background image 
    200  
    201     grid->addWidget( deSwitcher, currentTheme->itemLocation("desktop","row"), \ 
     219    if(!simpleDESwitcher){ 
     220      if(DEBUG_MODE){ qDebug() << " - Create DE Switcher"; } 
     221      //Create the switcher 
     222      deSwitcher = new FancySwitcher(this, !currentTheme->itemIsVertical("desktop") ); 
     223      QSize deSize = currentTheme->itemIconSize("desktop"); 
     224      deSwitcher->setIconSize(deSize.height()); 
     225      tmpIcon = currentTheme->itemIcon("nextde"); 
     226      if( !tmpIcon.isEmpty() && QFile::exists(tmpIcon) ){ deSwitcher->changeButtonIcon("forward", tmpIcon); } 
     227      tmpIcon = currentTheme->itemIcon("previousde"); 
     228      if( !tmpIcon.isEmpty() && QFile::exists(tmpIcon) ){ deSwitcher->changeButtonIcon("back", tmpIcon); } 
     229      //Figure out if we need to smooth out the animation 
     230      deSwitcher->setNumberAnimationFrames("4");  
     231      //NOTE: A transparent widget background slows the full animation to a crawl with a stretched background image 
     232 
     233      grid->addWidget( deSwitcher, currentTheme->itemLocation("desktop","row"), \ 
    202234                      currentTheme->itemLocation("desktop","col"), \ 
    203235                      currentTheme->itemLocation("desktop","rowspan"), \ 
    204236                      currentTheme->itemLocation("desktop","colspan"), Qt::AlignCenter); 
    205  
     237    } 
    206238    //----WINDOW SPACERS 
    207239    QStringList spacers = currentTheme->getSpacers(); 
     
    224256     
    225257  //Now translate the UI and set all the text 
     258  if(DEBUG_MODE){ qDebug() << " - Fill GUI with data"; } 
    226259  retranslateUi(); 
     260  if(DEBUG_MODE){ qDebug() << "Done with initialization"; } 
    227261 
    228262} 
     
    231265  //Get user inputs 
    232266  QString username = Backend::getUsernameFromDisplayname(displayname); 
    233   QString binary = Backend::getDesktopBinary(deSwitcher->currentItem()); 
     267  QString binary; 
     268  if(simpleDESwitcher){ 
     269    binary = Backend::getDesktopBinary(sdeSwitcher->currentText()); 
     270  }else{ 
     271    binary = Backend::getDesktopBinary(deSwitcher->currentItem()); 
     272  } 
    234273  QString homedir = Backend::getUserHomeDir(username); 
    235274  //Disable user input while confirming login 
    236275  loginW->setEnabled(FALSE); 
    237   deSwitcher->setEnabled(FALSE); 
     276  if(!simpleDESwitcher){ deSwitcher->setEnabled(FALSE); } 
    238277  toolbar->setEnabled(FALSE); 
    239278  //Try to login 
     
    244283 
    245284void PCDMgui::slotLoginSuccess(){ 
    246   saveLastLogin( loginW->currentUsername(), deSwitcher->currentItem() ); 
     285  QString de; 
     286  if(simpleDESwitcher){ de = sdeSwitcher->currentText(); } 
     287  else{ de = deSwitcher->currentItem(); } 
     288  saveLastLogin( loginW->currentUsername(), de ); 
    247289  slotClosePCDM(); //now start to close down the PCDM GUI 
    248290} 
     
    261303  //Re-Enable user input 
    262304  loginW->setEnabled(TRUE); 
    263   deSwitcher->setEnabled(TRUE); 
     305  if(!simpleDESwitcher){ deSwitcher->setEnabled(TRUE); } 
    264306  toolbar->setEnabled(TRUE); 
    265307} 
     
    277319void PCDMgui::slotUserSelected(QString newuser){ 
    278320  if(newuser.isEmpty()){ 
    279     deSwitcher->setVisible(FALSE); 
    280   }else{ 
    281     deSwitcher->setVisible(TRUE); 
     321    if(simpleDESwitcher){ sdeSwitcher->setVisible(FALSE); } 
     322    else{ deSwitcher->setVisible(FALSE); } 
     323  }else{ 
     324    if(simpleDESwitcher){ sdeSwitcher->setVisible(TRUE); } 
     325    else{ deSwitcher->setVisible(TRUE); } 
    282326    //Try to load the user's last DE 
    283327    loadLastDE(newuser); 
     
    393437// Start xvkbd 
    394438void PCDMgui::slotPushVirtKeyboard(){ 
    395    system("killall -9 xvkbd; xvkbd -compact &"); 
     439   QString cmd = "killall -9 "+VIRTUALKBDBIN.section(" ",0,0).section("/",-1)+"; "+VIRTUALKBDBIN+" &"; 
     440   qDebug() << "Starting Virtual Keyboard:"; 
     441   qDebug() << " - CMD: "+cmd; 
     442   system( cmd.toUtf8() ); 
    396443   loginW->resetFocus("password"); 
    397444} 
     
    400447  //All the text-setting for the main interface needs to be done here 
    401448  //virtual keyboard button 
    402   virtkeyboardButton->setToolTip(tr("Virtual Keyboard")); 
    403   virtkeyboardButton->setText(tr("Virtual Keyboard")); 
     449  //if(currentTheme->itemIsEnabled("vkeyboard")){ 
     450    virtkeyboardButton->setToolTip(tr("Virtual Keyboard")); 
     451    virtkeyboardButton->setText(tr("Virtual Keyboard")); 
     452  //} 
    404453  //locale switcher button 
    405454  localeButton->setToolTip(tr("Change locale")); 
     
    425474  loginW->retranslateUi(); 
    426475  //The desktop switcher 
    427   deSwitcher->removeAllItems(); 
    428   QStringList deList = Backend::getAvailableDesktops(); 
    429   for(int i=0; i<deList.length(); i++){ 
    430     QString deIcon = Backend::getDesktopIcon(deList[i]); 
    431     if( deIcon.isEmpty() ){ deIcon = currentTheme->itemIcon("desktop"); } //set the default icon if none given 
    432     if( !QFile::exists(deIcon) ){ deIcon = ":/images/desktop.png"; } 
    433     deSwitcher->addItem( deList[i], deIcon, Backend::getDesktopComment(deList[i]) ); 
    434   } 
     476  if(simpleDESwitcher){ sdeSwitcher->clear(); } 
     477  else{ deSwitcher->removeAllItems(); } 
     478   
     479    //Get the new desktop list (translated) 
     480    QStringList deList = Backend::getAvailableDesktops(); 
     481    for(int i=0; i<deList.length(); i++){ 
     482      QString deIcon = Backend::getDesktopIcon(deList[i]); 
     483      if( deIcon.isEmpty() ){ deIcon = currentTheme->itemIcon("desktop"); } //set the default icon if none given 
     484      if( !QFile::exists(deIcon) ){ deIcon = ":/images/desktop.png"; } 
     485      //Now add the item back to the widget 
     486      if(simpleDESwitcher){ sdeSwitcher->addItem(QIcon(deIcon), deList[i]); } 
     487      else{ deSwitcher->addItem( deList[i], deIcon, Backend::getDesktopComment(deList[i]) ); } 
     488    } 
    435489    //Set the switcher to the last used desktop environment 
    436     if( !lastDE.isEmpty() ){ deSwitcher->setCurrentItem(lastDE); } 
     490    if( !lastDE.isEmpty() ){  
     491      if(simpleDESwitcher){  
     492        int index = deList.indexOf(lastDE); 
     493        if(index != -1){ sdeSwitcher->setCurrentIndex(index); } 
     494        else{ sdeSwitcher->setCurrentIndex(0); } 
     495      }else{  
     496        deSwitcher->setCurrentItem(lastDE);  
     497      } 
     498    } 
    437499 
    438500} 
  • src-qt4/PCDM/src/pcdm-gui.h

    r1620346 rd9b0b9e8  
    6666    QToolButton *systemButton; 
    6767    QMenu* systemMenu; 
    68     FancySwitcher* deSwitcher; 
    69  
     68    FancySwitcher* deSwitcher; // full switcher 
     69    QComboBox* sdeSwitcher; //simple switcher 
     70    bool simpleDESwitcher; 
     71     
    7072    QProcess* vkbd; 
    7173    ThemeStruct* currentTheme; 
  • src-qt4/PCDM/src/themeStruct.cpp

    r1620346 rd9b0b9e8  
    9999            else{ items[index].y1 = y.section("-",0,0).toInt(); items[index].y2 = y.section("-",1,1).toInt(); } 
    100100        }else if(itemCat == "ORIENTATION"){ 
    101             items[index].isVertical = (val.toLower() == "vertical");     
     101            items[index].isVertical = (val.toLower() == "vertical");  
     102            if(val.toLower()=="simple"){ items[index].value = "simple"; } 
    102103        }else if(itemCat == "DISABLE"){ 
    103104            items[index].enabled = (val.toLower() != "true"); 
  • src-qt4/PCDM/themes/default/default.theme

    rdc1f572 rabea4e8  
    3030 
    3131DESKTOP_IMAGE=default-desktop.png       # Default Image for the DE selection if none found 
     32  DESKTOP_ORIENTATION=simple                    # [horizontal | vertical | simple] 
     33  #Additional DESKTOP settings if not set to "simple" 
    3234  DESKTOP_IMAGE_SIZE=48x48                      # Size for the image (in pixels) 
    33   DESKTOP_ORIENTATION=horizontal                # [horizontal | vertical] 
    3435  NEXTDE_IMAGE=nextDE.png                       # Next DE selection (right/down) 
    3536  PREVIOUSDE_IMAGE=previousDE.png               # Previous DE selection (left/up) 
     
    4041KEYBOARD_IMAGE=keyboardlayout.png       # Image for keyboard layout selection 
    4142VKEYBOARD_IMAGE=virtualkeyboard.png             # Image for the virtual keyboard item 
     43  VKEYBOARD_DISABLE=TRUE 
    4244 
    4345# TOOLBAR SETTINGS 
  • src-sh/pc-extractoverlay/desktop-overlay/boot/grub/themes/pcbsd/theme.txt

    r7a8333b re2fa25c  
    4949        left = 10% 
    5050        width = 80% 
    51         top = 20% 
    52         height = 50%     
     51        top = 15% 
     52        height = 45%     
    5353        item_font = "DejaVu Sans Regular 12" 
    5454        item_color = "#000" 
     
    7272        id = "__timeout__" 
    7373        left = 15% 
    74         top = 80% 
     74        top = 65% 
    7575        height = 20 
    76         width = 70% 
     76        width = 50% 
    7777        font = "DejaVu Sans Regular 12" 
    7878        text_color = "#000" 
  • src-sh/pc-extractoverlay/ports-overlay/usr/local/etc/default/grub

    r5adc162 r47f2308  
    11GRUB_THEME=/boot/grub/themes/pcbsd/theme.txt 
    22GRUB_FONT=/boot/grub/pcbsdfont.pf2 
     3GRUB_HIDDEN_TIMEOUT=2 
     4GRUB_HIDDEN_TIMEOUT_QUIET=true 
  • src-sh/pc-extractoverlay/server-overlay/boot/grub/themes/pcbsd/theme.txt

    r7a8333b re2fa25c  
    4949        left = 10% 
    5050        width = 80% 
    51         top = 20% 
    52         height = 50%     
     51        top = 15% 
     52        height = 45%     
    5353        item_font = "DejaVu Sans Regular 12" 
    5454        item_color = "#000" 
     
    7272        id = "__timeout__" 
    7373        left = 15% 
    74         top = 80% 
     74        top = 65% 
    7575        height = 20 
    76         width = 70% 
     76        width = 50% 
    7777        font = "DejaVu Sans Regular 12" 
    7878        text_color = "#000" 
  • build-files/ports-overlay/misc/pcbsd-base/Makefile

    r796a591 r5e1ad95  
    126126                vi-aspell>=0:${PORTSDIR}/vietnamese/aspell \ 
    127127                mosh:${PORTSDIR}/net/mosh \ 
     128                virtualbox-ose>=0:${PORTSDIR}/emulators/virtualbox-ose \ 
     129                virtualbox-ose-kmod>=0:${PORTSDIR}/emulators/virtualbox-ose-kmod \ 
     130                virtualbox-ose-additions>=0:${PORTSDIR}/emulators/virtualbox-ose-additions \ 
    128131                grub-mkconfig:${PORTSDIR}/sysutils/grub2 
    129132 
Note: See TracChangeset for help on using the changeset viewer.