Changeset c82371ac


Ignore:
Timestamp:
07/08/14 15:44:11 (12 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
05161ee
Parents:
59fa950 (diff), 6f69bd9 (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
9 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/xtrafiles/local/share/pcbsd/xstartup/pc-mixer.sh

    r27e9218 rf73597e  
    33if [ "`id -u`" = "0" ] ; then return ; fi 
    44 
    5 #Disable this from autostart for now until after further testing 
    6 return 
     5#Startup the mixer tray 
     6(sleep 30 ; pc-mixer ) & 
    77 
    8 #Startup the mixer tray 
    9 (sleep 20 ; pc-mixer ) & 
    10  
  • src-qt4/xtrafiles/local/share/pcbsd/xstartup/pc-mounttray.sh

    raccfd54 rf73597e  
    33if [ "`id -u`" = "0" ] ; then return ; fi 
    44 
    5 (sleep 20 ; pc-mounttray ) & 
     5(sleep 30 ; pc-mounttray ) & 
    66 
  • lumina/lumina-desktop/LDesktop.cpp

    r64bfe71 r59fa950  
    1313  desktop = new QDesktopWidget(); 
    1414  defaultdesktop = (deskNum== desktop->primaryScreen()); 
     15  desktoplocked = true; 
    1516  xoffset = 0; 
    1617  for(int i=0; i<desktopnumber; i++){ 
     
    4142        bgWindow->setGeometry(xoffset,0,desktop->screenGeometry().width(), desktop->screenGeometry().height()); 
    4243        connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu()) ); 
     44  bgDesktop = new QMdiArea(bgWindow); 
     45        //Make sure the desktop area is transparent to show the background 
     46        bgDesktop->setBackground( QBrush(Qt::NoBrush) ); 
    4347   
    4448  //Start the update processes 
     
    7175    QProcess::startDetached("lumina-open \""+act->whatsThis()+"\""); 
    7276  } 
     77} 
     78 
     79void LDesktop::CreateDesktopPluginContainer(LDPlugin *plug){ 
     80  LDPluginContainer *win = new LDPluginContainer(plug, desktoplocked); 
     81  if(desktoplocked){ bgDesktop->addSubWindow(win, Qt::FramelessWindowHint); } 
     82  else{ bgDesktop->addSubWindow(win, Qt::CustomizeWindowHint); } 
     83  win->loadInitialPosition(); 
     84  win->show(); 
    7385} 
    7486 
     
    117129  //Now add the system quit options 
    118130  deskMenu->addSeparator(); 
     131  if(!desktoplocked){ deskMenu->addAction(LXDG::findIcon("document-encrypt",""),tr("Lock Desktop"), this, SLOT(ToggleDesktopLock()) ); } 
     132  else{ deskMenu->addAction(LXDG::findIcon("document-decrypt",""),tr("Unlock Desktop"), this, SLOT(ToggleDesktopLock()) ); } 
    119133  deskMenu->addAction(LXDG::findIcon("system-log-out",""), tr("Log Out"), this, SLOT(SystemLogout()) ); 
    120134} 
     
    124138  QStringList plugins = settings->value(DPREFIX+"pluginlist", QStringList()).toStringList(); 
    125139  if(defaultdesktop && plugins.isEmpty()){ 
    126     //plugins << "sample"; 
     140    plugins << "sample"; 
    127141  } 
    128142  for(int i=0; i<plugins.length(); i++){ 
     
    141155      if(plug != 0){  
    142156        qDebug() << " -- Show Plugin"; 
    143         PLUGINS << plug; 
    144         plug->showPlugin(); 
     157        PLUGINS << plug; 
     158        CreateDesktopPluginContainer(plug); 
    145159      } 
    146160    } 
    147     //Update the plugin geometry 
    148     /*if(plug!=0){ 
    149       QString geom = settings->value(DPREFIX+plugins[i]+"/geometry", "").toString(); 
    150       if(geom.isEmpty()){ 
    151         if(plugins.length()==1 && plugins[i]=="desktopview"){  
    152           geom = "0,0,"+QString::number(desktop->availableGeometry().width())+","+QString::number(desktop->availableGeometry().height()); 
    153         }else{ 
    154           geom = QString::number(i*200)+",0,200,"+QString::number(desktop->availableGeometry().height()); 
    155         } 
    156       } 
    157       plug->setGeometry(geom.section(",",0,0).toInt(),geom.section(",",1,1).toInt(), geom.section(",",2,2).toInt(), geom.section(",",3,3).toInt() ); 
    158       plug->show(); //make sure it is visible 
    159     }*/ 
    160   } 
    161    
     161  
     162  } 
     163} 
     164 
     165void LDesktop::ToggleDesktopLock(){ 
     166  desktoplocked = !desktoplocked; //flip to other value 
     167  //Remove all the current containers 
     168  QList<QMdiSubWindow*> wins = bgDesktop->subWindowList(); 
     169  for(int i=0; i<wins.length(); i++){ 
     170    bgDesktop->removeSubWindow(wins[i]->widget()); //unhook plugin from container 
     171    bgDesktop->removeSubWindow(wins[i]); //remove container from screen 
     172    delete wins[i]; //delete old container 
     173  } 
     174  //Now recreate all the containers on the screen 
     175  for(int i=0; i<PLUGINS.length(); i++){ 
     176    CreateDesktopPluginContainer(PLUGINS[i]); 
     177  } 
     178  UpdateMenu(false);  
    162179} 
    163180 
     
    181198        qDebug() << " -- Update panel "<< i; 
    182199        //panel already exists - just update it 
    183         QTimer::singleShot(1, PANELS[i], SLOT(UpdatePanel()) );       
     200        QTimer::singleShot(0, PANELS[i], SLOT(UpdatePanel()) ); 
    184201      } 
    185202    } 
     
    190207    } 
    191208  } 
    192    
    193    
    194 } 
    195  
     209  //Give it a 1/2 second before ensuring that the visible desktop area is correct 
     210  QTimer::singleShot(500, this, SLOT(UpdateDesktopPluginArea()) ); 
     211} 
     212 
     213void LDesktop::UpdateDesktopPluginArea(){ 
     214  QRegion visReg( bgWindow->geometry() ); //visible region (not hidden behind a panel) 
     215  for(int i=0; i<PANELS.length(); i++){ 
     216    visReg = visReg.subtracted( QRegion(PANELS[i]->geometry()) ); 
     217  } 
     218  //Now make sure the desktop plugin area is only the visible area 
     219  bgDesktop->setGeometry( visReg.boundingRect() ); 
     220  bgDesktop->setBackground( QBrush(Qt::NoBrush) ); 
     221  bgDesktop->update(); 
     222} 
     223  
    196224void LDesktop::UpdateBackground(){ 
    197225  //Get the current Background 
     
    215243  //Save this file as the current background 
    216244  CBG = bgFile; 
    217   qDebug() << " - Set Background to:" << CBG << index << bgL; 
     245  //qDebug() << " - Set Background to:" << CBG << index << bgL; 
    218246  if( (bgFile.toLower()=="default")){ bgFile = "/usr/local/share/Lumina-DE/desktop-background.jpg"; } 
    219247  //Now set this file as the current background 
  • lumina/lumina-desktop/LDesktop.h

    r164b720 r130bc0e  
    1919#include <QLabel> 
    2020#include <QWidgetAction> 
     21#include <QMdiArea> 
     22#include <QMdiSubWindow> 
    2123 
    2224 
     
    2729#include "LSession.h" 
    2830#include "desktop-plugins/LDPlugin.h" 
     31#include "desktop-plugins/LDPluginContainer.h" 
    2932#include "desktop-plugins/NewDP.h" 
    3033 
     
    4851        int desktopnumber; 
    4952        int xoffset; 
    50         bool defaultdesktop; 
     53        bool defaultdesktop, desktoplocked; 
    5154        QList<LPanel*> PANELS; 
    52         QWidget *bgWindow; 
     55        QMdiArea *bgDesktop; //desktop widget area 
     56        QWidget *bgWindow; //full screen background 
    5357        QMenu *deskMenu; 
    5458        AppMenu *appmenu; 
     
    5963        QString CBG; //current background 
    6064         
     65        void CreateDesktopPluginContainer(LDPlugin*); 
     66 
    6167private slots: 
    6268        void SettingsChanged(); 
     
    6874         
    6975        void UpdateDesktop(); 
     76        void ToggleDesktopLock(); 
    7077         
    7178        void UpdatePanels(); 
     79         
     80        void UpdateDesktopPluginArea(); 
    7281 
    7382        void UpdateBackground(); 
  • lumina/lumina-desktop/LSession.cpp

    r5b447eb r130bc0e  
    6363void LSession::launchStartupApps(){ 
    6464  QString startfile = QDir::homePath()+"/.lumina/startapps"; 
     65  if(!QFile::exists(startfile)){ startfile = "/usr/local/share/Lumina-DE/startapps"; } 
    6566  if(!QFile::exists(startfile)){ return; } 
    6667  qDebug() << "Launching startup applications"; 
  • lumina/lumina-desktop/desktop-plugins/LDPlugin.h

    r64bfe71 r130bc0e  
    1313 
    1414#include <QObject> 
    15 #include <QGroupBox> 
     15#include <QMdiSubWindow> 
    1616#include <QString> 
    1717#include <QRect> 
     
    2222#include <QResizeEvent> 
    2323 
    24 class LDPlugin : public QGroupBox{ 
     24class LDPlugin : public QWidget{ 
    2525        Q_OBJECT 
    2626         
     
    2828        QString plugintype; 
    2929        QRect validRect; 
    30         bool isMoving; 
    3130         
    3231public: 
    3332        QSettings *settings; 
    3433 
    35         LDPlugin(QWidget *parent = 0, QRect rect = QRect(), QString ptype="unknown") : QGroupBox(parent){ 
     34        LDPlugin(QWidget *parent = 0, QRect rect = QRect(), QString ptype="unknown") : QWidget(parent){ 
    3635          plugintype=ptype; 
    3736          validRect = rect; 
    3837          settings = new QSettings("desktop-plugins",ptype); 
    39                 this->setMouseTracking(true); 
    40           setMovable(true); 
    4138        } 
    4239         
    4340        ~LDPlugin(){ 
    44           //delete mvtimer; 
    4541          delete settings; 
    4642        } 
     
    5349          validRect = rect; 
    5450          QTimer::singleShot(0, this, SLOT(validateGeometry()) ); 
    55         } 
    56          
    57         void setMovable(bool movable){ 
    58           isMoving = movable; 
    59           this->setFlat(movable); 
    60           if(movable){  
    61             this->setTitle(plugintype); 
    62             this->setStyleSheet( "LDPlugin{ background-color: transparent; }" ); 
    63           }else{  
    64             this->setTitle("");  
    65             this->setStyleSheet( "LDPlugin{ background-color: rgb(255,255,255); }" ); 
    66           } 
    6751        } 
    6852         
     
    8064          } 
    8165        } 
    82  
    83         void showPlugin(){ 
    84           validateGeometry(false); 
    85           this->setGeometry( settings->value("location/x",0).toInt(), settings->value("location/y",0).toInt(), settings->value("location/width",this->sizeHint().width()).toInt(), settings->value("location/height",this->sizeHint().height()).toInt() ); 
    86           this->show(); 
    87         } 
    8866         
    8967        virtual void LocaleChange(){ 
     
    9573            //This is where all the visuals are set if using Theme-dependant icons. 
    9674        } 
    97  
     75/* 
    9876protected: 
    9977        virtual void MoveEvent(QMoveEvent *event){ 
     
    10987          settings->setValue("location/height", event->size().height()); 
    11088        } 
    111          
    112         virtual void MousePressEvent(QMouseEvent *event){ 
    113           qDebug() << "Mouse Down"; 
    114                 event->ignore(); 
    115         } 
    116          
    117         virtual void MouseReleaseEvent(QMouseEvent *event){ 
    118           qDebug() << "Mouse Up"; 
    119                 event->ignore(); 
    120         } 
    121          
    122         virtual void MouseMoveEvent(QMouseEvent *event){ 
    123           if(isMoving && event->buttons()!=Qt::NoButton){ 
    124             qDebug() << "Moving Plugin:"; 
    125             this->move( event->globalX() - event->pos().x(), event->globalY() - event->pos().y()); 
    126             event->accept(); 
    127           }else if(isMoving){ 
    128             qDebug() << "Move: No Buttons Pressed"; 
    129           } 
    130         } 
     89*/       
    13190}; 
    13291 
  • lumina/lumina-desktop/desktop-plugins/SamplePlugin.h

    r64bfe71 r130bc0e  
    2323          this->layout()->addWidget(button); 
    2424                connect(button, SIGNAL(clicked()), this, SLOT(showMessage()) ); 
    25           this->move(100,100); 
    2625        } 
    2726         
  • lumina/lumina-desktop/lumina-desktop.pro

    r64bfe71 r130bc0e  
    4242        panel-plugins/LTBWidget.h \ 
    4343        desktop-plugins/LDPlugin.h \ 
     44        desktop-plugins/LDPluginContainer.h \ 
    4445        desktop-plugins/NewDP.h \ 
    4546        panel-plugins/userbutton/LUserButton.h \ 
  • lumina/lumina-desktop/main.cpp

    rf71b232 r130bc0e  
    7474    WMProcess WM; 
    7575    WM.startWM(); 
    76     QObject::connect(&WM, SIGNAL(WMShutdown()), &a, SLOT(exit()) ); 
     76    //QObject::connect(&WM, SIGNAL(WMShutdown()), &a, SLOT(exit()) ); 
    7777    //Load the initial translations 
    7878    QTranslator translator; 
Note: See TracChangeset for help on using the changeset viewer.