diff -rupN lxqt-panel-0.9.0/CMakeLists.txt lxqt-panel-0.9.0-new/CMakeLists.txt --- lxqt-panel-0.9.0/CMakeLists.txt 2015-02-08 04:31:27.000000000 -0500 +++ lxqt-panel-0.9.0-new/CMakeLists.txt 2015-03-17 14:30:26.000000000 -0400 @@ -81,7 +81,7 @@ if(CLOCK_PLUGIN) add_subdirectory(plugin-clock) endif() -setByDefault(COLORPICKER_PLUGIN Yes) +setByDefault(COLORPICKER_PLUGIN No) if(COLORPICKER_PLUGIN) set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Color Picker") add_subdirectory(plugin-colorpicker) @@ -101,7 +101,7 @@ if(CPULOAD_PLUGIN) endif() endif() -setByDefault(DOM_PLUGIN Yes) +setByDefault(DOM_PLUGIN No) if(DOM_PLUGIN) set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "DOM") add_subdirectory(plugin-dom) @@ -113,7 +113,7 @@ if(DESKTOPSWITCH_PLUGIN) add_subdirectory(plugin-desktopswitch) endif() -setByDefault(KBINDICATOR_PLUGIN Yes) +setByDefault(KBINDICATOR_PLUGIN No) if(KBINDICATOR_PLUGIN) set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Keyboard Indicator") add_subdirectory(plugin-kbindicator) @@ -125,7 +125,7 @@ if(MAINMENU_PLUGIN) add_subdirectory(plugin-mainmenu) endif() -setByDefault(MOUNT_PLUGIN Yes) +setByDefault(MOUNT_PLUGIN No) if(MOUNT_PLUGIN) set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Mount") @@ -141,13 +141,13 @@ if(QUICKLAUNCH_PLUGIN) add_subdirectory(plugin-quicklaunch) endif() -setByDefault(SCREENSAVER_PLUGIN Yes) +setByDefault(SCREENSAVER_PLUGIN No) if(SCREENSAVER_PLUGIN) set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Screensaver") add_subdirectory(plugin-screensaver) endif() -setByDefault(SENSORS_PLUGIN Yes) +setByDefault(SENSORS_PLUGIN No) if(SENSORS_PLUGIN) find_library(SENSORS_LIB sensors) @@ -181,7 +181,7 @@ if(NETWORKMONITOR_PLUGIN) endif() endif() -setByDefault(SYSSTAT_PLUGIN Yes) +setByDefault(SYSSTAT_PLUGIN No) if(SYSSTAT_PLUGIN) set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "System Stats") add_subdirectory(plugin-sysstat) @@ -200,7 +200,7 @@ if(TRAY_PLUGIN) endif() setByDefault(VOLUME_PLUGIN Yes) -setByDefault(VOLUME_USE_PULSEAUDIO Yes) +setByDefault(VOLUME_USE_PULSEAUDIO No) setByDefault(VOLUME_USE_ALSA Yes) if(VOLUME_PLUGIN) if (VOLUME_USE_PULSEAUDIO) diff -rupN lxqt-panel-0.9.0/plugin-clock/lxqtclockconfiguration.cpp lxqt-panel-0.9.0-new/plugin-clock/lxqtclockconfiguration.cpp --- lxqt-panel-0.9.0/plugin-clock/lxqtclockconfiguration.cpp 2015-02-08 04:31:27.000000000 -0500 +++ lxqt-panel-0.9.0-new/plugin-clock/lxqtclockconfiguration.cpp 2015-03-17 14:30:26.000000000 -0400 @@ -30,6 +30,7 @@ #include "lxqtclockconfiguration.h" #include "ui_lxqtclockconfiguration.h" +#include LxQtClockConfiguration::LxQtClockConfiguration(QSettings &settings, QWidget *parent) : @@ -58,6 +59,8 @@ LxQtClockConfiguration::LxQtClockConfigu connect(ui->showDateBeforeTimeRB, SIGNAL(clicked()), SLOT(saveSettings())); connect(ui->showDateAfterTimeRB, SIGNAL(clicked()), SLOT(saveSettings())); connect(ui->showDateBelowTimeRB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->setDate, SIGNAL(clicked()), this, SLOT(setDateTime())); + connect(ui->setDate, SIGNAL(clicked()), this, SLOT(close())); connect(ui->autorotateCB, SIGNAL(clicked()), SLOT(saveSettings())); } @@ -67,6 +70,13 @@ LxQtClockConfiguration::~LxQtClockConfig delete ui; } +void LxQtClockConfiguration::setDateTime() +{ + system("set-time-for-puppy &"); + +} + + static int currentYear = QDate::currentDate().year(); void LxQtClockConfiguration::addDateFormat(const QString &format) diff -rupN lxqt-panel-0.9.0/plugin-clock/lxqtclockconfiguration.h lxqt-panel-0.9.0-new/plugin-clock/lxqtclockconfiguration.h --- lxqt-panel-0.9.0/plugin-clock/lxqtclockconfiguration.h 2015-02-08 04:31:27.000000000 -0500 +++ lxqt-panel-0.9.0-new/plugin-clock/lxqtclockconfiguration.h 2015-03-17 14:30:26.000000000 -0400 @@ -71,6 +71,7 @@ private slots: void saveSettings(); void dialogButtonsAction(QAbstractButton *btn); void dateFormatActivated(int); + void setDateTime(); private: int mOldIndex; diff -rupN lxqt-panel-0.9.0/plugin-clock/lxqtclockconfiguration.ui lxqt-panel-0.9.0-new/plugin-clock/lxqtclockconfiguration.ui --- lxqt-panel-0.9.0/plugin-clock/lxqtclockconfiguration.ui 2015-02-08 04:31:27.000000000 -0500 +++ lxqt-panel-0.9.0-new/plugin-clock/lxqtclockconfiguration.ui 2015-03-17 14:30:26.000000000 -0400 @@ -6,8 +6,8 @@ 0 0 - 330 - 433 + 416 + 469 @@ -123,6 +123,13 @@ + + + + Set date and time + + + diff -rupN lxqt-panel-0.9.0/plugin-mainmenu/lxqtmainmenu.cpp lxqt-panel-0.9.0-new/plugin-mainmenu/lxqtmainmenu.cpp --- lxqt-panel-0.9.0/plugin-mainmenu/lxqtmainmenu.cpp 2015-02-08 04:31:27.000000000 -0500 +++ lxqt-panel-0.9.0-new/plugin-mainmenu/lxqtmainmenu.cpp 2015-03-17 14:30:26.000000000 -0400 @@ -47,6 +47,13 @@ #include #include #include +//Fatdog +#include +#include +#include +#include +#include + #ifdef HAVE_MENU_CACHE #include "xdgcachedmenu.h" @@ -101,6 +108,12 @@ LxQtMainMenu::~LxQtMainMenu() #endif } +void LxQtMainMenu::bottomMenuSlot(QString command1) //Fatdog +{ + QByteArray ba = command1.toLocal8Bit(); + const char *c_str = ba.data(); + system (c_str); +} /************************************************ @@ -259,13 +272,42 @@ void LxQtMainMenu::buildMenu() menu->addSeparator(); - Q_FOREACH(QAction* action, menu->actions()) - { - if (action->menu()) - action->menu()->installEventFilter(this); - } + // Q_FOREACH(QAction* action, menu->actions()) + // { + // if (action->menu()) + // action->menu()->installEventFilter(this); + // } + // + // menu->installEventFilter(this); + + //Fatdog + QSignalMapper *mapper = new QSignalMapper( this ); + QFile file( "/etc/xdg/lxqt/bottom-menu.conf" ); + if( !file.open( QIODevice::ReadOnly | QIODevice::Text ) ) + qFatal( "Could not open the file" ); + + QTextStream stream( &file ); + + while( !stream.atEnd() ) + { + QString text = stream.readLine(); + if (text.contains("#")) + continue; + if (text.contains("|")) { + QStringList list1 = text.split("|"); + if (list1.size() != 3) continue; + QString text1 = ( list1[0].trimmed() ); + QString command1 = ( list1[1].trimmed() ); + QString icon1 = ( list1[2].trimmed() ); + action1 = new QAction( QIcon(icon1), text1, this ); + mapper->setMapping( action1, command1 ); + connect( action1, SIGNAL(triggered()), mapper, SLOT(map()) ); + menu->addAction(action1); + } + } + connect( mapper, SIGNAL(mapped(QString)), this, SLOT(bottomMenuSlot(QString)) ); + file.close(); - menu->installEventFilter(this); QMenu *oldMenu = mMenu; mMenu = menu; diff -rupN lxqt-panel-0.9.0/plugin-mainmenu/lxqtmainmenu.h lxqt-panel-0.9.0-new/plugin-mainmenu/lxqtmainmenu.h --- lxqt-panel-0.9.0/plugin-mainmenu/lxqtmainmenu.h 2015-02-08 04:31:27.000000000 -0500 +++ lxqt-panel-0.9.0-new/plugin-mainmenu/lxqtmainmenu.h 2015-03-17 14:30:26.000000000 -0400 @@ -42,6 +42,7 @@ #include #include #include +#include #include "menustyle.h" @@ -84,6 +85,7 @@ private: GlobalKeyShortcut::Action *mShortcut; MenuStyle mTopMenuStyle; MenuStyle mMenuStyle; + QAction *action1; #ifdef HAVE_MENU_CACHE MenuCache* mMenuCache; @@ -101,6 +103,7 @@ protected slots: virtual void settingsChanged(); void buildMenu(); + void bottomMenuSlot(QString); private slots: void showMenu(); diff -rupN lxqt-panel-0.9.0/plugin-volume/lxqtvolume.cpp lxqt-panel-0.9.0-new/plugin-volume/lxqtvolume.cpp --- lxqt-panel-0.9.0/plugin-volume/lxqtvolume.cpp 2015-02-08 04:31:27.000000000 -0500 +++ lxqt-panel-0.9.0-new/plugin-volume/lxqtvolume.cpp 2015-03-17 14:30:49.000000000 -0400 @@ -45,9 +45,9 @@ #include #include -#define DEFAULT_UP_SHORTCUT "XF86AudioRaiseVolume" -#define DEFAULT_DOWN_SHORTCUT "XF86AudioLowerVolume" -#define DEFAULT_MUTE_SHORTCUT "XF86AudioMute" +#define DEFAULT_UP_SHORTCUT "" +#define DEFAULT_DOWN_SHORTCUT "" +#define DEFAULT_MUTE_SHORTCUT "" LxQtVolume::LxQtVolume(const ILxQtPanelPluginStartupInfo &startupInfo): QObject(), @@ -60,63 +60,6 @@ LxQtVolume::LxQtVolume(const ILxQtPanelP m_notification = new LxQt::Notification("", this); - // global key shortcuts - QString shortcutNotRegistered; - - m_keyVolumeUp = GlobalKeyShortcut::Client::instance()->addAction(QString(), QString("/panel/%1/up").arg(settings()->group()), tr("Increase sound volume"), this); - if (m_keyVolumeUp) - { - connect(m_keyVolumeUp, SIGNAL(activated()), this, SLOT(handleShortcutVolumeUp())); - - if (m_keyVolumeUp->shortcut().isEmpty()) - { - m_keyVolumeUp->changeShortcut(DEFAULT_UP_SHORTCUT); - if (m_keyVolumeUp->shortcut().isEmpty()) - { - shortcutNotRegistered = " '" DEFAULT_UP_SHORTCUT "'"; - } - } - } - - m_keyVolumeDown = GlobalKeyShortcut::Client::instance()->addAction(QString(), QString("/panel/%1/down").arg(settings()->group()), tr("Decrease sound volume"), this); - if (m_keyVolumeDown) - { - connect(m_keyVolumeDown, SIGNAL(activated()), this, SLOT(handleShortcutVolumeDown())); - - if (m_keyVolumeDown->shortcut().isEmpty()) - { - m_keyVolumeDown->changeShortcut(DEFAULT_DOWN_SHORTCUT); - if (m_keyVolumeDown->shortcut().isEmpty()) - { - shortcutNotRegistered += " '" DEFAULT_DOWN_SHORTCUT "'"; - } - } - } - - m_keyMuteToggle = GlobalKeyShortcut::Client::instance()->addAction(QString(), QString("/panel/%1/mute").arg(settings()->group()), tr("Mute/unmute sound volume"), this); - if (m_keyMuteToggle) - { - connect(m_keyMuteToggle, SIGNAL(activated()), this, SLOT(handleShortcutVolumeMute())); - - if (m_keyMuteToggle->shortcut().isEmpty()) - { - m_keyMuteToggle->changeShortcut(DEFAULT_MUTE_SHORTCUT); - if (m_keyMuteToggle->shortcut().isEmpty()) - { - shortcutNotRegistered += " '" DEFAULT_MUTE_SHORTCUT "'"; - } - } - } - - if(!shortcutNotRegistered.isEmpty()) - { - m_notification->setSummary(tr("Volume Control: The following shortcuts can not be registered: %1").arg(shortcutNotRegistered)); - m_notification->update(); - } - - m_notification->setTimeout(1000); - m_notification->setUrgencyHint(LxQt::Notification::UrgencyLow); - settingsChanged(); }