Cherry-picking upstream version 0.9.0+20151023.

Fixed some copyright dates
Fixed lintian-overrides
ubuntu/cosmic
Alf Gaida 9 years ago
parent 5f51a4f43a
commit 54fa89661a

11
debian/changelog vendored

@ -1,10 +1,11 @@
lxqt-session (0.9.0+20150831-1) unstable; urgency=medium lxqt-session (0.9.0+20151023-1) unstable; urgency=medium
* Cherry-picking upstream version 0.9.0+20150831. * Cherry-picking upstream version 0.9.0+20151023.
* added upstream signing key and use it in watch file * Added upstream signing key and use it in watch file
* add some lintian-overrides * Added lintian-overrides for invalid category
* Fixed some copyright dates
-- Alf Gaida <agaida@siduction.org> Fri, 04 Sep 2015 00:14:58 +0200 -- Alf Gaida <agaida@siduction.org> Sat, 24 Oct 2015 13:00:16 +0200
lxqt-session (0.9.0+20150807-1) unstable; urgency=low lxqt-session (0.9.0+20150807-1) unstable; urgency=low

4
debian/copyright vendored

@ -4,7 +4,7 @@ Source: https://github.com/lxde/lxqt-session
Files: * Files: *
Copyright: Copyright (c) 2010-2012 Razor team Copyright: Copyright (c) 2010-2012 Razor team
Copyright (c) 2012-2014 LXQt team Copyright (c) 2012-2015 LXQt team
License: LGPL-2.1+ License: LGPL-2.1+
Files: lxqt-config-session/autostartedit.* Files: lxqt-config-session/autostartedit.*
@ -19,7 +19,7 @@ Files: lxqt-config-session/basicsettings.*
lxqt-config-session/environmentpage.* lxqt-config-session/environmentpage.*
lxqt-config-session/main.cpp lxqt-config-session/main.cpp
lxqt-config-session/sessionconfigwindow.* lxqt-config-session/sessionconfigwindow.*
Copyright: Copyright 2010-2012 LxQt team Copyright: Copyright 2010-2015 LxQt team
License: LGPL-2.1+ License: LGPL-2.1+
Files: lxqt-leave/leavedialog.* Files: lxqt-leave/leavedialog.*

@ -1,6 +1,2 @@
# category LXQt in not yet in freedesktop specs - no bug # category LXQt in not yet in freedesktop specs - no bug
lxqt-session: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-*.desktop lxqt-session: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-*.desktop
# will be obsoleted with the next snapshot
lxqt-session: desktop-entry-lacks-main-category usr/share/applications/lxqt-*.desktop

@ -41,14 +41,10 @@
<source>Global Autostart</source> <source>Global Autostart</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>LXQt Autostart</source>
<translation type="vanished">LXQt</translation>
</message>
<message> <message>
<location filename="../autostartmodel.cpp" line="179"/> <location filename="../autostartmodel.cpp" line="179"/>
<source>LXQt Autostart</source> <source>LXQt Autostart</source>
<translation type="unfinished"></translation> <translation>LXQt</translation>
</message> </message>
<message> <message>
<location filename="../autostartmodel.cpp" line="197"/> <location filename="../autostartmodel.cpp" line="197"/>
@ -96,6 +92,11 @@
</context> </context>
<context> <context>
<name>BasicSettings</name> <name>BasicSettings</name>
<message>
<location filename="../basicsettings.ui" line="23"/>
<source>Basic Settings</source>
<translation></translation>
</message>
<message> <message>
<location filename="../basicsettings.ui" line="30"/> <location filename="../basicsettings.ui" line="30"/>
<source>Window Manager</source> <source>Window Manager</source>
@ -109,32 +110,27 @@
<message> <message>
<location filename="../basicsettings.ui" line="59"/> <location filename="../basicsettings.ui" line="59"/>
<source>LXQt Modules</source> <source>LXQt Modules</source>
<translation type="unfinished"></translation> <translation>LXQt</translation>
</message>
<message>
<location filename="../basicsettings.ui" line="111"/>
<source>Leave Session</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../basicsettings.ui" line="117"/>
<source>Ask confirmation to leave session</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../basicsettings.ui" line="23"/>
<source>Basic Settings</source>
<translation></translation>
</message> </message>
<message> <message>
<location filename="../basicsettings.ui" line="65"/> <location filename="../basicsettings.ui" line="65"/>
<source>Start</source> <source>Start</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../basicsettings.ui" line="72"/> <location filename="../basicsettings.ui" line="72"/>
<source>Stop</source> <source>Stop</source>
<translation type="unfinished"></translation> <translation></translation>
</message>
<message>
<location filename="../basicsettings.ui" line="111"/>
<source>Leave Session</source>
<translation></translation>
</message>
<message>
<location filename="../basicsettings.ui" line="117"/>
<source>Ask for confirmation to leave session</source>
<translation></translation>
</message> </message>
<message> <message>
<location filename="../basicsettings.cpp" line="84"/> <location filename="../basicsettings.cpp" line="84"/>
@ -165,7 +161,7 @@
<message> <message>
<location filename="../defaultappspage.ui" line="32"/> <location filename="../defaultappspage.ui" line="32"/>
<source>Terminal Emulation:</source> <source>Terminal Emulation:</source>
<translation></translation> <translation>:</translation>
</message> </message>
<message> <message>
<location filename="../defaultappspage.ui" line="52"/> <location filename="../defaultappspage.ui" line="52"/>
@ -212,19 +208,15 @@
<message> <message>
<location filename="../modulemodel.cpp" line="85"/> <location filename="../modulemodel.cpp" line="85"/>
<source>Running</source> <source>Running</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
</context> </context>
<context> <context>
<name>SessionConfigWindow</name> <name>SessionConfigWindow</name>
<message>
<source>LXQt Session Configuration</source>
<translation type="vanished">LXQt</translation>
</message>
<message> <message>
<location filename="../sessionconfigwindow.cpp" line="43"/> <location filename="../sessionconfigwindow.cpp" line="43"/>
<source>LXQt Session Settings</source> <source>LXQt Session Settings</source>
<translation type="unfinished"></translation> <translation>LXQt</translation>
</message> </message>
<message> <message>
<location filename="../sessionconfigwindow.cpp" line="46"/> <location filename="../sessionconfigwindow.cpp" line="46"/>

@ -1,252 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="ja_JP">
<context>
<name>AutoStartEdit</name>
<message>
<location filename="../autostartedit.ui" line="14"/>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartedit.ui" line="20"/>
<source>Name:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartedit.ui" line="27"/>
<source>Search...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartedit.ui" line="47"/>
<source>Command:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartedit.ui" line="57"/>
<source>Wait for system tray</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartedit.cpp" line="59"/>
<source>Select Application</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AutoStartItemModel</name>
<message>
<location filename="../autostartmodel.cpp" line="177"/>
<source>Global Autostart</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartmodel.cpp" line="179"/>
<source>LXQt Autostart</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartmodel.cpp" line="197"/>
<source>Location: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartmodel.cpp" line="199"/>
<source>Overrides: %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AutoStartPage</name>
<message>
<location filename="../autostartpage.ui" line="17"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartpage.ui" line="24"/>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartpage.ui" line="31"/>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartpage.ui" line="44"/>
<source>Application Autostart</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartpage.cpp" line="82"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../autostartpage.cpp" line="82"/>
<source>File &apos;%1&apos; already exists!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>BasicSettings</name>
<message>
<location filename="../basicsettings.ui" line="30"/>
<source>Window Manager</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../basicsettings.ui" line="49"/>
<source>Search...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../basicsettings.ui" line="59"/>
<source>LXQt Modules</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../basicsettings.ui" line="65"/>
<source>Start</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../basicsettings.ui" line="72"/>
<source>Stop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../basicsettings.ui" line="111"/>
<source>Leave Session</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../basicsettings.ui" line="117"/>
<source>Ask confirmation to leave session</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../basicsettings.ui" line="23"/>
<source>Basic Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../basicsettings.cpp" line="84"/>
<source>Select a window manager</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DefaultApps</name>
<message>
<location filename="../defaultappspage.cpp" line="72"/>
<source>Select a terminal emulator</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../defaultappspage.cpp" line="77"/>
<source>Select a web browser</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DefaultAppsPage</name>
<message>
<location filename="../defaultappspage.ui" line="23"/>
<source>Default Applications</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../defaultappspage.ui" line="32"/>
<source>Terminal Emulation:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../defaultappspage.ui" line="52"/>
<location filename="../defaultappspage.ui" line="79"/>
<source>Search...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../defaultappspage.ui" line="59"/>
<source>Web Browser:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EnvironmentPage</name>
<message>
<location filename="../environmentpage.ui" line="30"/>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../environmentpage.ui" line="37"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../environmentpage.ui" line="63"/>
<source>Environment Variables (Advanced)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../environmentpage.ui" line="74"/>
<source>Variable Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../environmentpage.ui" line="79"/>
<source>Value</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ModuleModel</name>
<message>
<location filename="../modulemodel.cpp" line="85"/>
<source>Running</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SessionConfigWindow</name>
<message>
<location filename="../sessionconfigwindow.cpp" line="43"/>
<source>LXQt Session Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sessionconfigwindow.cpp" line="46"/>
<source>Basic Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sessionconfigwindow.cpp" line="52"/>
<source>Default Applications</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sessionconfigwindow.cpp" line="55"/>
<source>Autostart</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sessionconfigwindow.cpp" line="60"/>
<source>Environment (Advanced)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sessionconfigwindow.cpp" line="84"/>
<source>Session Restart Required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sessionconfigwindow.cpp" line="85"/>
<source>You need to restart desktop session (lxqt-session) to reload settings. Use logout from the main menu.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

@ -25,7 +25,7 @@
* *
* END_COMMON_COPYRIGHT_HEADER */ * END_COMMON_COPYRIGHT_HEADER */
#include <LXQt/Application> #include <LXQt/SingleApplication>
#include <LXQt/PowerManager> #include <LXQt/PowerManager>
#include <LXQt/ScreenSaver> #include <LXQt/ScreenSaver>
#include <LXQt/Translator> #include <LXQt/Translator>
@ -37,7 +37,7 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
LXQt::Application a(argc, argv); LXQt::SingleApplication a(argc, argv);
LXQt::Translator::translateApplication(); LXQt::Translator::translateApplication();
LXQt::PowerManager powermanager(&a); LXQt::PowerManager powermanager(&a);
@ -101,6 +101,7 @@ int main(int argc, char *argv[])
} }
LeaveDialog dialog; LeaveDialog dialog;
a.setActivationWindow(&dialog);
dialog.setGeometry(QStyle::alignedRect(Qt::LeftToRight, dialog.setGeometry(QStyle::alignedRect(Qt::LeftToRight,
Qt::AlignCenter, Qt::AlignCenter,
dialog.size(), dialog.size(),

@ -5,7 +5,7 @@ GenericName=Hibernate
Comment=hibernate the machine Comment=hibernate the machine
Exec=lxqt-leave --hibernate Exec=lxqt-leave --hibernate
Icon=system-suspend-hibernate Icon=system-suspend-hibernate
Categories=LXQt;X-Leave Categories=System;X-Leave
OnlyShowIn=LXQt OnlyShowIn=LXQt
#TRANSLATIONS_DIR=../translations #TRANSLATIONS_DIR=../translations

@ -5,7 +5,7 @@ GenericName=Leave
Comment=Leave dialog Comment=Leave dialog
Exec=lxqt-leave Exec=lxqt-leave
Icon=system-shutdown Icon=system-shutdown
Categories=LXQt;X-Leave Categories=System;X-Leave
OnlyShowIn=LXQt; OnlyShowIn=LXQt;
#TRANSLATIONS_DIR=../translations #TRANSLATIONS_DIR=../translations

@ -5,7 +5,7 @@ GenericName=Lock Screen
Comment=Lock the current session Comment=Lock the current session
Exec=lxqt-leave --lockscreen Exec=lxqt-leave --lockscreen
Icon=system-lock-screen Icon=system-lock-screen
Categories=LXQt;Screensaver Categories=System;Screensaver
OnlyShowIn=LXQt; OnlyShowIn=LXQt;
#TRANSLATIONS_DIR=../translations #TRANSLATIONS_DIR=../translations

@ -5,7 +5,7 @@ GenericName=Logout
Comment=Logout from the current session Comment=Logout from the current session
Exec=lxqt-leave --logout Exec=lxqt-leave --logout
Icon=system-log-out Icon=system-log-out
Categories=LXQt;X-Leave Categories=System;X-Leave
OnlyShowIn=LXQt; OnlyShowIn=LXQt;
#TRANSLATIONS_DIR=../translations #TRANSLATIONS_DIR=../translations

@ -5,7 +5,7 @@ GenericName=Reboot
Comment=reboot the machine Comment=reboot the machine
Exec=lxqt-leave --reboot Exec=lxqt-leave --reboot
Icon=system-reboot Icon=system-reboot
Categories=LXQt;X-Leave Categories=System;X-Leave
OnlyShowIn=LXQt; OnlyShowIn=LXQt;
#TRANSLATIONS_DIR=../translations #TRANSLATIONS_DIR=../translations

@ -5,7 +5,7 @@ GenericName=Shutdown
Comment=shutdown the machine Comment=shutdown the machine
Exec=lxqt-leave --shutdown Exec=lxqt-leave --shutdown
Icon=system-shutdown Icon=system-shutdown
Categories=LXQt;X-Leave Categories=System;X-Leave
OnlyShowIn=LXQt; OnlyShowIn=LXQt;
#TRANSLATIONS_DIR=../translations #TRANSLATIONS_DIR=../translations

@ -5,7 +5,7 @@ GenericName=Suspend
Comment=suspend the machine Comment=suspend the machine
Exec=lxqt-leave --suspend Exec=lxqt-leave --suspend
Icon=system-suspend Icon=system-suspend
Categories=LXQt;X-Leave Categories=System;X-Leave
OnlyShowIn=LXQt OnlyShowIn=LXQt
#TRANSLATIONS_DIR=../translations #TRANSLATIONS_DIR=../translations

@ -0,0 +1,2 @@
Name[ja]=ハイバネート
Comment[ja]=PCをハイバネートします

@ -0,0 +1,2 @@
Name[ja]=終了
Comment[ja]=終了ダイアログを表示します

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="ja">
<context>
<name>LeaveDialog</name>
<message>
<location filename="../leavedialog.ui" line="20"/>
<source>Leave</source>
<translation></translation>
</message>
<message>
<location filename="../leavedialog.ui" line="29"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;What do you want the computer to do?&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../leavedialog.ui" line="45"/>
<source>Logout</source>
<translation></translation>
</message>
<message>
<location filename="../leavedialog.ui" line="57"/>
<source>Reboot</source>
<translation></translation>
</message>
<message>
<location filename="../leavedialog.ui" line="69"/>
<source>Shutdown</source>
<translation></translation>
</message>
<message>
<location filename="../leavedialog.ui" line="81"/>
<source>Suspend</source>
<translation></translation>
</message>
<message>
<location filename="../leavedialog.ui" line="93"/>
<source>Lock screen</source>
<translation></translation>
</message>
<message>
<location filename="../leavedialog.ui" line="105"/>
<source>Hibernate</source>
<translation></translation>
</message>
<message>
<location filename="../leavedialog.ui" line="136"/>
<source>Cancel</source>
<translation></translation>
</message>
</context>
<context>
<name>main</name>
<message>
<location filename="../main.cpp" line="51"/>
<source>Logout.</source>
<translation>.</translation>
</message>
<message>
<location filename="../main.cpp" line="54"/>
<source>Lockscreen.</source>
<translation>.</translation>
</message>
<message>
<location filename="../main.cpp" line="57"/>
<source>Suspend.</source>
<translation>.</translation>
</message>
<message>
<location filename="../main.cpp" line="60"/>
<source>Hibernate.</source>
<translation>.</translation>
</message>
<message>
<location filename="../main.cpp" line="63"/>
<source>Shutdown.</source>
<translation>.</translation>
</message>
<message>
<location filename="../main.cpp" line="66"/>
<source>Reboot.</source>
<translation>.</translation>
</message>
</context>
</TS>

@ -0,0 +1,2 @@
Name[ja]=画面のロック
Comment[ja]=画面をロックします

@ -0,0 +1,2 @@
Name[ja]=ログアウト
Comment[ja]=セッションからログアウトします

@ -0,0 +1,2 @@
Name[ja]=再起動
Comment[ja]=PCを再起動します

@ -0,0 +1,2 @@
Name[ja]=シャットダウン
Comment[ja]=PCをシャットダウンします

@ -0,0 +1,2 @@
Name[ja]=サスペンド
Comment[ja]=PCをサスペンドします

@ -9,6 +9,7 @@ if(NOT DEFINED LIBUDEV_MONITOR OR LIBUDEV_MONITOR)
find_package(PkgConfig) find_package(PkgConfig)
pkg_check_modules(LIBUDEV REQUIRED libudev) pkg_check_modules(LIBUDEV REQUIRED libudev)
include_directories(${LIBUDEV_INCLUDE_DIRS})
add_definitions(-DWITH_LIBUDEV_MONITOR) add_definitions(-DWITH_LIBUDEV_MONITOR)
endif() endif()
@ -30,6 +31,8 @@ set(lxqt-session_SRCS
src/windowmanager.cpp src/windowmanager.cpp
src/sessionapplication.cpp src/sessionapplication.cpp
src/sessiondbusadaptor.h src/sessiondbusadaptor.h
src/numlock.cpp
src/numlock.h
) )
if(LIBUDEV_MONITOR) if(LIBUDEV_MONITOR)
list(APPEND lxqt-session_SRCS src/UdevNotifier.cpp) list(APPEND lxqt-session_SRCS src/UdevNotifier.cpp)
@ -63,13 +66,13 @@ target_link_libraries(lxqt-session
Qt5::Widgets Qt5::Widgets
Qt5::DBus Qt5::DBus
Qt5::X11Extras Qt5::X11Extras
${XCB_LIBRARIES} ${XCB_LDFLAGS}
${X11_LIBRARIES} X11
lxqt lxqt
KF5::WindowSystem KF5::WindowSystem
) )
if(LIBUDEV_MONITOR) if(LIBUDEV_MONITOR)
target_link_libraries(lxqt-session ${LIBUDEV_LIBRARIES}) target_link_libraries(lxqt-session ${LIBUDEV_LDFLAGS})
endif() endif()
INSTALL(TARGETS INSTALL(TARGETS

@ -0,0 +1,83 @@
/* BEGIN_COMMON_COPYRIGHT_HEADER
* (c)LGPL2+
*
* LxQt - a lightweight, Qt based, desktop toolset
* http://razor-qt.org, http://lxde.org/
*
* Copyright: 2010-2011 LxQt team
* Authors:
* Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
*
* This program or library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* END_COMMON_COPYRIGHT_HEADER */
// the following XKB code is taken from numlockx which is licensed under MIT.
// Copyright (C) 2000-2001 Lubos Lunak <l.lunak@kde.org>
// Copyright (C) 2001 Oswald Buddenhagen <ossi@kde.org>
#include <string.h>
#include <stdlib.h>
#include <QX11Info>
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
#include <X11/keysym.h>
/* the XKB stuff is based on code created by Oswald Buddenhagen <ossi@kde.org> */
static unsigned int xkb_mask_modifier(Display* dpy, XkbDescPtr xkb, const char *name )
{
int i;
if( !xkb || !xkb->names )
return 0;
for( i = 0; i < XkbNumVirtualMods; i++ ) {
char* modStr = XGetAtomName( xkb->dpy, xkb->names->vmods[i] );
if( modStr != NULL && strcmp(name, modStr) == 0 ) {
unsigned int mask;
XkbVirtualModsToReal( xkb, 1 << i, &mask );
return mask;
}
}
return 0;
}
static unsigned int xkb_numlock_mask(Display* dpy)
{
XkbDescPtr xkb;
if(( xkb = XkbGetKeyboard( dpy, XkbAllComponentsMask, XkbUseCoreKbd )) != NULL ) {
unsigned int mask = xkb_mask_modifier( dpy, xkb, "NumLock" );
XkbFreeKeyboard( xkb, 0, True );
return mask;
}
return 0;
}
static int xkb_set_on(Display* dpy)
{
unsigned int mask;
mask = xkb_numlock_mask(dpy);
if( mask == 0 )
return 0;
XkbLockModifiers ( dpy, XkbUseCoreKbd, mask, mask);
return 1;
}
void enableNumlock()
{
// this currently only works for X11
if(QX11Info::isPlatformX11())
xkb_set_on(QX11Info::display());
}

@ -0,0 +1,33 @@
/* BEGIN_COMMON_COPYRIGHT_HEADER
* (c)LGPL2+
*
* LxQt - a lightweight, Qt based, desktop toolset
* http://razor-qt.org, http://lxde.org/
*
* Copyright: 2010-2011 LxQt team
* Authors:
* Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
*
* This program or library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* END_COMMON_COPYRIGHT_HEADER */
#ifndef _NUMLOCK_H_
#define _NUMLOCK_H_
void enableNumlock();
#endif

@ -21,6 +21,7 @@
#include "sessiondbusadaptor.h" #include "sessiondbusadaptor.h"
#include "lxqtmodman.h" #include "lxqtmodman.h"
#include "UdevNotifier.h" #include "UdevNotifier.h"
#include "numlock.h"
#include <unistd.h> #include <unistd.h>
#include <LXQt/Settings> #include <LXQt/Settings>
#include <QProcess> #include <QProcess>
@ -168,10 +169,15 @@ void SessionApplication::loadKeyboardSettings(LXQt::Settings& settings)
XkbSetAutoRepeatRate(QX11Info::display(), XkbUseCoreKbd, delay, interval); XkbSetAutoRepeatRate(QX11Info::display(), XkbUseCoreKbd, delay, interval);
} }
// turn on/off keyboard beep
bool beep = settings.value("beep").toBool(); bool beep = settings.value("beep").toBool();
values.bell_percent = beep ? -1 : 0; values.bell_percent = beep ? -1 : 0;
XChangeKeyboardControl(QX11Info::display(), KBBellPercent, &values); XChangeKeyboardControl(QX11Info::display(), KBBellPercent, &values);
// turn on numlock as needed
if(settings.value("numlock").toBool())
enableNumlock();
// keyboard layout support using setxkbmap // keyboard layout support using setxkbmap
QString layout = settings.value("layout").toString(); QString layout = settings.value("layout").toString();
QString variant = settings.value("variant").toString(); QString variant = settings.value("variant").toString();

@ -14,12 +14,12 @@
<message> <message>
<location filename="../src/lxqtmodman.cpp" line="289"/> <location filename="../src/lxqtmodman.cpp" line="289"/>
<source>Crash Report</source> <source>Crash Report</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/lxqtmodman.cpp" line="290"/> <location filename="../src/lxqtmodman.cpp" line="290"/>
<source>&lt;b&gt;%1&lt;/b&gt; crashed too many times. Its autorestart has been disabled until next login.</source> <source>&lt;b&gt;%1&lt;/b&gt; crashed too many times. Its autorestart has been disabled until next login.</source>
<translation type="unfinished"></translation> <translation>&lt;b&gt;%1&lt;/b&gt;</translation>
</message> </message>
</context> </context>
<context> <context>
@ -49,20 +49,16 @@ Before starting to use the LXQt, you might want to select the Windows Manager:</
<source>Choose your favorite one.</source> <source>Choose your favorite one.</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../src/wmselectdialog.ui" line="14"/>
<source>Welcome to LXQt</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../src/wmselectdialog.ui" line="20"/> <location filename="../src/wmselectdialog.ui" line="20"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Welcome to LXQt&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Please select your default Window Manager.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Welcome to LXQt&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Please select your default Window Manager.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;LXQt&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/wmselectdialog.ui" line="71"/> <location filename="../src/wmselectdialog.ui" line="71"/>
<source>You will be able to change this at any time through Preferences -&gt; Session Settings -&gt; Basic Settings.</source> <source>You will be able to change this at any time through Preferences -&gt; Session Settings -&gt; Basic Settings.</source>
<translation type="unfinished"></translation> <translatorcomment></translatorcomment>
<translation>-&gt; -&gt;  </translation>
</message> </message>
</context> </context>
</TS> </TS>

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="ja_JP">
<context>
<name>LXQtModuleManager</name>
<message>
<location filename="../src/lxqtmodman.cpp" line="289"/>
<source>Crash Report</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/lxqtmodman.cpp" line="290"/>
<source>&lt;b&gt;%1&lt;/b&gt; crashed too many times. Its autorestart has been disabled until next login.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WmSelectDialog</name>
<message>
<location filename="../src/wmselectdialog.cpp" line="62"/>
<source>Other ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/wmselectdialog.cpp" line="63"/>
<source>Choose your favorite one.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/wmselectdialog.ui" line="14"/>
<source>Welcome to LXQt</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/wmselectdialog.ui" line="20"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Welcome to LXQt&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Please select your default Window Manager.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/wmselectdialog.ui" line="71"/>
<source>You will be able to change this at any time through Preferences -&gt; Session Settings -&gt; Basic Settings.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
Loading…
Cancel
Save