Skip to content

Commit

Permalink
Add a new compile-time option: NO_XINPUT
Browse files Browse the repository at this point in the history
This can be used to disable the usage of the xcb/xinput.h class, since some OS's seem to not have it for some reason. Note that this option will make the input device management page in lumina-config unavailable on that operating system.
Example: qmake CONFIG+=NO_XINPUT
  • Loading branch information
beanpole135 committed Jan 6, 2017
1 parent 9569c05 commit bca42f6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
7 changes: 6 additions & 1 deletion src-qt5/core-utils/lumina-config/lumina-config.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ include(../../core/libLumina/LDesktopUtils.pri) #includes LUtils
include(../../core/libLumina/LuminaXDG.pri)
include(../../core/libLumina/LuminaSingleApplication.pri)
include(../../core/libLumina/LuminaThemes.pri)
include(../../core/libLumina/LInputDevice.pri)

NO_XINPUT{
DEFINES+=NO_XINPUT
}else{
include(../../core/libLumina/LInputDevice.pri)
}

SOURCES += main.cpp \
mainWindow.cpp \
Expand Down
9 changes: 9 additions & 0 deletions src-qt5/core-utils/lumina-config/pages/getPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ static QList<PAGEINFO> KnownPages(){
list << PageInfo("interface-menu", QObject::tr("Menu"), QObject::tr("Menu Plugins"), "format-list-unordered",QObject::tr("Change what options are shown on the desktop context menu"), "interface", QStringList(), QStringList() << "desktop" << "menu" << "plugins" << "shortcuts");
list << PageInfo("session-locale", QObject::tr("Localization"), QObject::tr("Locale Settings"), "preferences-desktop-locale",QObject::tr("Change the default locale settings for this user"), "user", QStringList(), QStringList() << "user"<<"locale"<<"language"<<"translations");
list << PageInfo("session-options", QObject::tr("General Options"), QObject::tr("User Settings"), "configure",QObject::tr("Change basic user settings such as time/date formats"), "user", QStringList(), QStringList() << "user"<<"settings"<<"time"<<"date"<<"icon"<<"reset"<<"numlock"<<"clock");
#ifndef NO_XINPUT
if(LUtils::isValidBinary("xinput")){
list << PageInfo("input-devices", QObject::tr("Input Device Settings"), QObject::tr("Input Device Settings"), "preferences-desktop-peripherals",QObject::tr("Adjust keyboard and mouse devices"), "user", QStringList(), QStringList() << "user"<<"speed"<<"accel"<<"mouse" << "keyboard");
}
#endif
// list << PageInfo("mouse-settings", QObject::tr("TrueOS Mouse Settings"), QObject::tr("TrueOS Mouse Settings"), "preferences-desktop-mouse",QObject::tr("Adjust mouse devices"), "user", QStringList(), QStringList() << "user"<<"speed"<<"accel"<<"mouse");
// list << PageInfo("bluetooth-settings", QObject::tr("TrueOS Bluetooth Settings"), QObject::tr("TrueOS Bluetooth Settings"), "preferences-desktop-bluetooth",QObject::tr("Setup Bluetooth devices"), "user", QStringList(), QStringList() << "user"<<"bluetooth"<<"audio");

Expand Down Expand Up @@ -71,7 +73,11 @@ static QList<PAGEINFO> KnownPages(){
#include "page_session_locale.h"
#include "page_session_options.h"
#include "page_compton.h"

#ifndef NO_XINPUT
#include "page_mouse.h"
#endif

// #include "page_mouse_trueos.h"
// #include "page_bluetooth_trueos.h"

Expand All @@ -90,7 +96,10 @@ static PageWidget* GetNewPage(QString id, QWidget *parent){
else if(id=="session-locale"){ page = new page_session_locale(parent); }
else if(id=="session-options"){ page = new page_session_options(parent); }
else if(id=="compton"){ page = new page_compton(parent); }
#ifndef NO_XINPUT
else if(id=="input-devices"){ page = new page_mouse(parent); }
#endif

// else if(id=="mouse-settings"){ page = new page_mouse_trueos(parent); }
// else if(id=="bluetooth-settings"){ page = new page_bluetooth_trueos(parent); }
//Return the main control_panel page as the fallback/default
Expand Down
14 changes: 8 additions & 6 deletions src-qt5/core-utils/lumina-config/pages/pages.pri
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ HEADERS += $${PWD}/getPage.h \
$${PWD}/page_interface_panels.h \
$${PWD}/page_session_locale.h \
$${PWD}/page_session_options.h \
$${PWD}/page_compton.h \
$${PWD}/page_mouse.h
$${PWD}/page_compton.h
# $${PWD}/page_bluetooth_trueos.h
# $${PWD}/page_mouse_trueos.h

Expand All @@ -31,8 +30,7 @@ SOURCES += $${PWD}/page_main.cpp \
$${PWD}/page_interface_panels.cpp \
$${PWD}/page_session_locale.cpp \
$${PWD}/page_session_options.cpp \
$${PWD}/page_compton.cpp \
$${PWD}/page_mouse.cpp
$${PWD}/page_compton.cpp
# $${PWD}/page_bluetooth_trueos.cpp
# $${PWD}/page_mouse_trueos.cpp

Expand All @@ -50,8 +48,12 @@ FORMS += $${PWD}/page_main.ui \
$${PWD}/page_interface_panels.ui \
$${PWD}/page_session_locale.ui \
$${PWD}/page_session_options.ui \
$${PWD}/page_compton.ui \
$${PWD}/page_mouse.ui
$${PWD}/page_compton.ui
# $${PWD}/page_bluetooth_trueos.ui
# $${PWD}/page_mouse_trueos.ui

!NO_XINPUT{
HEADERS += $${PWD}/page_mouse.h
SOURCES += $${PWD}/page_mouse.cpp
FORMS += $${PWD}/page_mouse.ui
}

0 comments on commit bca42f6

Please sign in to comment.