Changeset 0de91104


Ignore:
Timestamp:
06/26/14 10:56:40 (12 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, enter/10, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
75b0622
Parents:
33307fd (diff), b319b8cf (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:
9 edited

Legend:

Unmodified
Added
Removed
  • lumina/ROADMAP

    r8e5fefa rb319b8cf  
    1212   -- Retroactive app detection/embedding 
    1313   -- Move the LX11/event usage out of the sesssion and into the plugin class directly. 
    14  - Add a few more context menu options (single app launcher, open file manager) 
     14 - (DONE) Add a few more context menu options (single app launcher, open file manager) 
    1515  
    1616Lumina-config 
     
    1919  
    2020Lumina-fm (Insight?) 
    21  - Basic file manager functionality (browse, view, remove, copy, rename, move, and open files) 
    22  - ZFS file/dir restoration ability 
    23  - Image slideshow ability 
     21 - (DONE) Basic file manager functionality (browse, view, remove, copy, rename, move, and open files) 
     22 - (DONE) ZFS file/dir restoration ability 
     23 - (DONE) Image slideshow ability 
    2424 - Multimedia player ability (optional for 1.0 - might wait for some of the new Phonon stuff in Qt5) 
    2525 - Network protocol support (samba, ftp, others?) 
    2626   -- This is optional usage (only shown as available if the utilities are installed) 
    27  - External drive detection/accessability (just usage? only check for mounted devices then) 
     27 - (DONE) External drive detection/accessability (just usage? only check for mounted devices then) 
    2828 - Perhaps write a custom backend class for FM functionality instead of using the QFileSystemModel? 
    2929 
  • lumina/libLumina/LuminaXDG.cpp

    rc47b1152 r32d3dd2  
    8080} 
    8181 
    82 bool LXDG::checkValidity(XDGDesktop dFile){ 
     82bool LXDG::checkValidity(XDGDesktop dFile, bool showAll){ 
    8383  bool ok=true; 
    8484  bool DEBUG = false; 
     
    106106      if(DEBUG){ qDebug() << " - Unknown file type"; }  
    107107  } 
    108   if(!dFile.showInList.isEmpty() && !dFile.showInList.contains("Lumina")){ ok=false; } 
    109   else if(!dFile.notShowInList.isEmpty() && dFile.notShowInList.contains("Lumina")){ ok=false; } 
     108  if(!showAll){ 
     109    if(!dFile.showInList.isEmpty() && !dFile.showInList.contains("Lumina")){ ok=false; } 
     110    else if(!dFile.notShowInList.isEmpty() && dFile.notShowInList.contains("Lumina")){ ok=false; } 
     111  } 
    110112  return ok; 
    111113} 
     
    138140} 
    139141 
    140 QList<XDGDesktop> LXDG::systemDesktopFiles(bool showHidden){ 
     142QList<XDGDesktop> LXDG::systemDesktopFiles(bool showAll, bool showHidden){ 
    141143  //Returns a list of all the unique *.desktop files that were found 
    142144  QStringList appDirs = LXDG::systemApplicationDirs(); 
     
    150152        ok=false; 
    151153        XDGDesktop dFile = LXDG::loadDesktopFile(dir.absoluteFilePath(apps[a]),ok); 
    152         if( LXDG::checkValidity(dFile) ){ 
     154        if( LXDG::checkValidity(dFile, showAll) ){ 
    153155          if( !found.contains(dFile.name) && (!dFile.isHidden || showHidden) ){ 
    154156            out << dFile; 
  • lumina/libLumina/LuminaXDG.h

    r214f3d5 r164b720  
    5555        //Read a *.desktop file 
    5656        static XDGDesktop loadDesktopFile(QString filePath, bool& ok); 
    57         //Check a *.desktop file for validity 
    58         static bool checkValidity(XDGDesktop dFile); 
     57        //Check a *.desktop file for validity (showAll skips the DE-exclusivity checks) 
     58        static bool checkValidity(XDGDesktop dFile, bool showAll = true);  
    5959        //Check for a valid executable 
    6060        static bool checkExec(QString exec); 
     
    6262        static QStringList systemApplicationDirs(); 
    6363        //Get a list of all the *.desktop files available on the system 
    64         static QList<XDGDesktop> systemDesktopFiles(bool showHidden = false); 
     64        static QList<XDGDesktop> systemDesktopFiles(bool showAll = true, bool showHidden = false); 
    6565        //Sort a list of Desktop files into the proper categories 
    6666        static QHash< QString, QList<XDGDesktop> > sortDesktopCats(QList<XDGDesktop> apps); 
  • lumina/lumina-config/LPlugins.cpp

    rb6c1838 r164b720  
    118118    info.icon = "utilities-terminal"; 
    119119  MENU.insert(info.ID, info); 
     120  //File Manager 
     121  info = LPI(); //clear it 
     122    info.name = QObject::tr("File Manager"); 
     123    info.description = QObject::tr("Browse the system with the default file manager."); 
     124    info.ID = "filemanager"; 
     125    info.icon = "system-file-manager"; 
     126  MENU.insert(info.ID, info); 
    120127  //Applications 
    121128  info = LPI(); //clear it 
     
    139146    info.icon = "configure"; 
    140147  MENU.insert(info.ID, info); 
    141  
     148  //Settings 
     149  info = LPI(); //clear it 
     150    info.name = QObject::tr("Custom App"); 
     151    info.description = QObject::tr("Start a custom application"); 
     152    info.ID = "app"; 
     153    info.icon = "application-x-desktop"; 
     154  MENU.insert(info.ID, info); 
    142155} 
  • lumina/lumina-config/mainUI.cpp

    rdd4f3c1 r164b720  
    2929    ui->spin_screen->setMaximum(desktop->screenCount()); 
    3030  } 
    31  
     31  sysApps = LXDG::sortDesktopNames( LXDG::systemDesktopFiles() ); 
    3232  //Setup the buttons signal/slot connections 
    3333  connect(ui->spin_screen, SIGNAL(valueChanged(int)), this, SLOT(loadCurrentSettings()) ); 
     
    345345  //Menu Items 
    346346  QStringList items = settings->value("menu/itemlist", QStringList() ).toStringList(); 
    347   if(items.isEmpty()){ items << "terminal" << "applications" << "line" << "settings"; } 
     347  if(items.isEmpty()){ items << "terminal" << "filemanager" << "applications" << "line" << "settings"; } 
    348348  //qDebug() << "Menu Items:" << items; 
    349349  ui->list_menu_items->clear(); 
    350350  for(int i=0; i<items.length(); i++){ 
    351351    LPI info = PINFO->menuPluginInfo(items[i]); 
     352    if(items[i].startsWith("app::::")){ 
     353      bool ok = false; 
     354      XDGDesktop desk = LXDG::loadDesktopFile(items[i].section("::::",1,1), ok); 
     355      if(!ok){ continue; } //invalid application file (no longer installed?) 
     356      QListWidgetItem *item = new QListWidgetItem(); 
     357        item->setWhatsThis( items[i] ); 
     358        item->setIcon( LXDG::findIcon(desk.icon) ); 
     359        item->setText( desk.name ); 
     360        item->setToolTip( desk.comment ); 
     361      ui->list_menu_items->addItem(item); 
     362      continue; //now go to the next item 
     363    } 
    352364    if(info.ID.isEmpty()){ continue; } //invalid plugin 
    353365    //qDebug() << "Add Menu Item:" << info.ID; 
     
    385397 
    386398void MainUI::addMenuItem(QAction* act){ 
    387   QListWidgetItem *item = new QListWidgetItem(); 
    388     item->setWhatsThis( act->whatsThis() ); 
    389     item->setIcon( act->icon() ); 
    390     item->setText( act->text() ); 
    391     item->setToolTip( act->toolTip() ); 
    392   ui->list_menu_items->addItem(item); 
     399  if(act->whatsThis()=="app"){ 
     400    //Need to prompt for the exact application to add to the menu 
     401    // Note: whatsThis() format: "app::::< *.desktop file path >" 
     402    QStringList apps; 
     403    for(int i=0; i<sysApps.length(); i++){ 
     404      if(sysApps[i].comment.isEmpty()){ apps << sysApps[i].name; } 
     405      else{ apps << sysApps[i].name + " ("+sysApps[i].comment+")"; } 
     406    } 
     407    QString app = QInputDialog::getItem(this, tr("Select Application"), tr("App Name:"), apps, false); 
     408    int index = apps.indexOf(app); 
     409    if(app.isEmpty() || index < 0){ return; } //nothing selected 
     410    //Now add this item to the  list 
     411    QListWidgetItem *item = new QListWidgetItem(); 
     412      item->setWhatsThis( act->whatsThis()+"::::"+sysApps[index].filePath ); 
     413      item->setIcon( LXDG::findIcon(sysApps[index].icon) ); 
     414      item->setText( sysApps[index].name ); 
     415      item->setToolTip( sysApps[index].comment ); 
     416    ui->list_menu_items->addItem(item); 
     417  }else{ 
     418    QListWidgetItem *item = new QListWidgetItem(); 
     419      item->setWhatsThis( act->whatsThis() ); 
     420      item->setIcon( act->icon() ); 
     421      item->setText( act->text() ); 
     422      item->setToolTip( act->toolTip() ); 
     423    ui->list_menu_items->addItem(item); 
     424  } 
    393425} 
    394426 
  • lumina/lumina-config/mainUI.h

    rdd4f3c1 r164b720  
    1616#include <QColorDialog> 
    1717#include <QColor> 
     18#include <QInputDialog> 
    1819 
    1920// libLumina includes 
     
    4344        QMenu *ppmenu, *mpmenu; 
    4445        QString panelcolor; 
     46        QList<XDGDesktop> sysApps; 
    4547 
    4648        //General purpose functions (not connected to buttons) 
  • lumina/lumina-desktop/LDesktop.cpp

    r29587c6 r164b720  
    1818  } 
    1919  deskMenu = new QMenu(0); 
     20    connect(deskMenu, SIGNAL(triggered(QAction*)), this, SLOT(SystemApplication(QAction*)) ); 
    2021  appmenu = new AppMenu(0); 
    2122  workspacelabel = new QLabel(0); 
     
    6263} 
    6364 
     65void LDesktop::SystemFileManager(){ 
     66  QProcess::startDetached("lumina-fm");  
     67} 
     68 
     69void LDesktop::SystemApplication(QAction* act){ 
     70  if(!act->whatsThis().isEmpty()){ 
     71    QProcess::startDetached("lumina-open \""+act->whatsThis()+"\""); 
     72  } 
     73} 
     74 
    6475// ===================== 
    6576//     PRIVATE SLOTS  
     
    8596  deskMenu->addSeparator(); 
    8697  //Now load the user's menu setup and fill the menu 
    87   QStringList items = settings->value("menu/itemlist", QStringList()<< "terminal" << "applications" << "line" << "settings" ).toStringList(); 
     98  QStringList items = settings->value("menu/itemlist", QStringList()<< "terminal" << "filemanager" <<"applications" << "line" << "settings" ).toStringList(); 
    8899  for(int i=0; i<items.length(); i++){ 
    89100    if(items[i]=="terminal"){ deskMenu->addAction(LXDG::findIcon("utilities-terminal",""), tr("Terminal"), this, SLOT(SystemTerminal()) ); } 
     101    else if(items[i]=="filemanager"){ deskMenu->addAction( LXDG::findIcon("system-file-manager",""), tr("Browse System"), this, SLOT(SystemFileManager()) ); } 
    90102    else if(items[i]=="applications"){ deskMenu->addMenu( LSession::applicationMenu() ); } 
    91103    else if(items[i]=="line"){ deskMenu->addSeparator(); } 
    92104    else if(items[i]=="settings"){ deskMenu->addMenu( LSession::settingsMenu() ); } 
     105    else if(items[i].startsWith("app::::") && items[i].endsWith(".desktop")){ 
     106      //Custom *.desktop application 
     107      QString file = items[i].section("::::",1,1).simplified(); 
     108      bool ok = false; 
     109      XDGDesktop xdgf = LXDG::loadDesktopFile(file, ok); 
     110      if(ok){ 
     111        deskMenu->addAction( LXDG::findIcon(xdgf.icon,""), xdgf.name)->setWhatsThis(file); 
     112        }else{ 
     113          qDebug() << "Could not load application file:" << file; 
     114        } 
     115    } 
    93116  } 
    94117  //Now add the system quit options 
  • lumina/lumina-desktop/LDesktop.h

    r29587c6 r164b720  
    3838        void SystemLogout(){ LSession::systemWindow(); } 
    3939        void SystemTerminal(); 
     40        void SystemFileManager(); 
     41        void SystemApplication(QAction*); 
    4042         
    4143private: 
  • src-sh/pc-installdialog/pc-installdialog.sh

    r7ed07e2 r33307fd  
    385385  fi 
    386386  SYSBOOTMANAGER="$ANS" 
     387 
     388  # If we are not using grub, nothing left to ask 
     389  if [ "$SYSBOOTMANAGER" != "GRUB" ]; then return; fi 
     390 
     391  # If we are using GRUB, ask if we want to do GELI encryption 
     392  dialog --title "$TITLE" --yesno 'Enable full-disk encryption with GELI?' 8 30 
     393  if [ $? -ne 0 ] ; then return ; fi 
     394  get_dlg_ans "--inputbox 'Enter encryption password' 8 40" 
     395  if [ -z "$ANS" ] ; then exit_err "No password specified!"; fi 
     396  GELIPASS="$ANS" 
     397  get_dlg_ans "--inputbox 'Enter password (again)' 8 40" 
     398  if [ -z "$ANS" ] ; then exit_err "No password specified!"; fi 
     399  if [ "$GELIPASS" != "$ANS" ]; then 
     400     echo "ERROR: Password mismatch!" 
     401     USINGGELI="NO" 
     402     return 
     403  fi 
     404 
     405  USINGGELI="YES" 
    387406} 
    388407 
     
    635654   echo "# UFS.eli, UFS+S.eli, UFS+SUJ, UFS+J.eli, ZFS.eli, SWAP.eli" >> ${CFGFILE} 
    636655 
     656   # What file-system are we using now? 
     657   FSTAG="ZFS" 
     658   if [ "$USINGGELI" = "YES" ] ; then FSTAG="ZFS.eli"; fi 
     659 
    637660   # Doing a single disk zpool, or a mirror/raidz[1-3]? 
    638661   if [ "$ZPOOL_TYPE" = "single" ] ; then 
    639      echo "disk0-part=ZFS 0 ${ZFSLAYOUT}" >> ${CFGFILE} 
     662     echo "disk0-part=$FSTAG 0 ${ZFSLAYOUT}" >> ${CFGFILE} 
    640663   else 
    641      echo "disk0-part=ZFS 0 ${ZFSLAYOUT} (${ZPOOL_TYPE}: `echo $ZPOOL_DISKS | sed 's| |,|g'`)" >> ${CFGFILE} 
     664     echo "disk0-part=$FSTAG 0 ${ZFSLAYOUT} (${ZPOOL_TYPE}: `echo $ZPOOL_DISKS | sed 's| |,|g'`)" >> ${CFGFILE} 
    642665   fi 
    643666 
    644    echo "disk0-part=SWAP 2000 none" >> ${CFGFILE} 
     667   # If using GELI encryption, add it to config file 
     668   if [ "$USINGGELI" = "YES" ] ; then 
     669     echo "encpass=$GELIPASS" >> ${CFGFILE} 
     670   fi 
     671 
     672   echo "disk0-part=SWAP.eli 2000 none" >> ${CFGFILE} 
    645673   echo "commitDiskLabel" >> ${CFGFILE} 
    646674   echo "" >> ${CFGFILE} 
Note: See TracChangeset for help on using the changeset viewer.