diff --git a/debian/changelog b/debian/changelog index a56b86c..ed412b8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. - * added upstream signing key and use it in watch file - * add some lintian-overrides + * Cherry-picking upstream version 0.9.0+20151023. + * Added upstream signing key and use it in watch file + * Added lintian-overrides for invalid category + * Fixed some copyright dates - -- Alf Gaida Fri, 04 Sep 2015 00:14:58 +0200 + -- Alf Gaida Sat, 24 Oct 2015 13:00:16 +0200 lxqt-session (0.9.0+20150807-1) unstable; urgency=low diff --git a/debian/copyright b/debian/copyright index e0685c0..a1a26d0 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,7 +4,7 @@ Source: https://github.com/lxde/lxqt-session Files: * Copyright: Copyright (c) 2010-2012 Razor team - Copyright (c) 2012-2014 LXQt team + Copyright (c) 2012-2015 LXQt team License: LGPL-2.1+ Files: lxqt-config-session/autostartedit.* @@ -19,7 +19,7 @@ Files: lxqt-config-session/basicsettings.* lxqt-config-session/environmentpage.* lxqt-config-session/main.cpp lxqt-config-session/sessionconfigwindow.* -Copyright: Copyright 2010-2012 LxQt team +Copyright: Copyright 2010-2015 LxQt team License: LGPL-2.1+ Files: lxqt-leave/leavedialog.* diff --git a/debian/lintian-overrides b/debian/lintian-overrides index d2b7277..fb4937b 100644 --- a/debian/lintian-overrides +++ b/debian/lintian-overrides @@ -1,6 +1,2 @@ # category LXQt in not yet in freedesktop specs - no bug 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 - diff --git a/lxqt-config-session/translations/lxqt-config-session_ja.ts b/lxqt-config-session/translations/lxqt-config-session_ja.ts index 492b6bb..679c05d 100644 --- a/lxqt-config-session/translations/lxqt-config-session_ja.ts +++ b/lxqt-config-session/translations/lxqt-config-session_ja.ts @@ -41,14 +41,10 @@ Global Autostart 全体的な自動起動 - - LXQt Autostart - LXQt自動起動 - LXQt Autostart - + LXQt自動起動 @@ -96,6 +92,11 @@ BasicSettings + + + Basic Settings + 基本的な設定 + Window Manager @@ -109,32 +110,27 @@ LXQt Modules - - - - - Leave Session - - - - - Ask confirmation to leave session - - - - - Basic Settings - 基本的な設定 + LXQtモジュール Start - + 開始 Stop - + 終了 + + + + Leave Session + セッションの終了 + + + + Ask for confirmation to leave session + セッション終了時に確認する @@ -165,7 +161,7 @@ Terminal Emulation: - ターミネルのエミュレーション + ターミナルエミュレーション: @@ -212,19 +208,15 @@ Running - + 実行中 SessionConfigWindow - - LXQt Session Configuration - LXQtセッションの設定 - LXQt Session Settings - + LXQtセッションの設定 diff --git a/lxqt-config-session/translations/lxqt-config-session_ja_JP.ts b/lxqt-config-session/translations/lxqt-config-session_ja_JP.ts deleted file mode 100644 index e6d3a95..0000000 --- a/lxqt-config-session/translations/lxqt-config-session_ja_JP.ts +++ /dev/null @@ -1,252 +0,0 @@ - - - - - AutoStartEdit - - - Edit - - - - - Name: - - - - - Search... - - - - - Command: - - - - - Wait for system tray - - - - - Select Application - - - - - AutoStartItemModel - - - Global Autostart - - - - - LXQt Autostart - - - - - Location: %1 - - - - - Overrides: %1 - - - - - AutoStartPage - - - Delete - - - - - Add - - - - - Edit - - - - - Application Autostart - - - - - Error - - - - - File '%1' already exists! - - - - - BasicSettings - - - Window Manager - - - - - Search... - - - - - LXQt Modules - - - - - Start - - - - - Stop - - - - - Leave Session - - - - - Ask confirmation to leave session - - - - - Basic Settings - - - - - Select a window manager - - - - - DefaultApps - - - Select a terminal emulator - - - - - Select a web browser - - - - - DefaultAppsPage - - - Default Applications - - - - - Terminal Emulation: - - - - - - Search... - - - - - Web Browser: - - - - - EnvironmentPage - - - Add - - - - - Delete - - - - - Environment Variables (Advanced) - - - - - Variable Name - - - - - Value - - - - - ModuleModel - - - Running - - - - - SessionConfigWindow - - - LXQt Session Settings - - - - - Basic Settings - - - - - Default Applications - - - - - Autostart - - - - - Environment (Advanced) - - - - - Session Restart Required - - - - - You need to restart desktop session (lxqt-session) to reload settings. Use logout from the main menu. - - - - diff --git a/lxqt-leave/main.cpp b/lxqt-leave/main.cpp index 0e2f2ed..972cf42 100644 --- a/lxqt-leave/main.cpp +++ b/lxqt-leave/main.cpp @@ -25,7 +25,7 @@ * * END_COMMON_COPYRIGHT_HEADER */ -#include +#include #include #include #include @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) { - LXQt::Application a(argc, argv); + LXQt::SingleApplication a(argc, argv); LXQt::Translator::translateApplication(); LXQt::PowerManager powermanager(&a); @@ -101,6 +101,7 @@ int main(int argc, char *argv[]) } LeaveDialog dialog; + a.setActivationWindow(&dialog); dialog.setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, dialog.size(), diff --git a/lxqt-leave/resources/lxqt-hibernate.desktop.in b/lxqt-leave/resources/lxqt-hibernate.desktop.in index 140db64..19ed383 100644 --- a/lxqt-leave/resources/lxqt-hibernate.desktop.in +++ b/lxqt-leave/resources/lxqt-hibernate.desktop.in @@ -5,7 +5,7 @@ GenericName=Hibernate Comment=hibernate the machine Exec=lxqt-leave --hibernate Icon=system-suspend-hibernate -Categories=LXQt;X-Leave +Categories=System;X-Leave OnlyShowIn=LXQt #TRANSLATIONS_DIR=../translations diff --git a/lxqt-leave/resources/lxqt-leave.desktop.in b/lxqt-leave/resources/lxqt-leave.desktop.in index 97ff2ed..9608a3d 100644 --- a/lxqt-leave/resources/lxqt-leave.desktop.in +++ b/lxqt-leave/resources/lxqt-leave.desktop.in @@ -5,7 +5,7 @@ GenericName=Leave Comment=Leave dialog Exec=lxqt-leave Icon=system-shutdown -Categories=LXQt;X-Leave +Categories=System;X-Leave OnlyShowIn=LXQt; #TRANSLATIONS_DIR=../translations diff --git a/lxqt-leave/resources/lxqt-lockscreen.desktop.in b/lxqt-leave/resources/lxqt-lockscreen.desktop.in index b94f67f..6866095 100644 --- a/lxqt-leave/resources/lxqt-lockscreen.desktop.in +++ b/lxqt-leave/resources/lxqt-lockscreen.desktop.in @@ -5,7 +5,7 @@ GenericName=Lock Screen Comment=Lock the current session Exec=lxqt-leave --lockscreen Icon=system-lock-screen -Categories=LXQt;Screensaver +Categories=System;Screensaver OnlyShowIn=LXQt; #TRANSLATIONS_DIR=../translations diff --git a/lxqt-leave/resources/lxqt-logout.desktop.in b/lxqt-leave/resources/lxqt-logout.desktop.in index fda3a95..763f33a 100644 --- a/lxqt-leave/resources/lxqt-logout.desktop.in +++ b/lxqt-leave/resources/lxqt-logout.desktop.in @@ -5,7 +5,7 @@ GenericName=Logout Comment=Logout from the current session Exec=lxqt-leave --logout Icon=system-log-out -Categories=LXQt;X-Leave +Categories=System;X-Leave OnlyShowIn=LXQt; #TRANSLATIONS_DIR=../translations diff --git a/lxqt-leave/resources/lxqt-reboot.desktop.in b/lxqt-leave/resources/lxqt-reboot.desktop.in index 5b0e160..f5adde6 100644 --- a/lxqt-leave/resources/lxqt-reboot.desktop.in +++ b/lxqt-leave/resources/lxqt-reboot.desktop.in @@ -5,7 +5,7 @@ GenericName=Reboot Comment=reboot the machine Exec=lxqt-leave --reboot Icon=system-reboot -Categories=LXQt;X-Leave +Categories=System;X-Leave OnlyShowIn=LXQt; #TRANSLATIONS_DIR=../translations diff --git a/lxqt-leave/resources/lxqt-shutdown.desktop.in b/lxqt-leave/resources/lxqt-shutdown.desktop.in index 57eb60b..bd04c33 100644 --- a/lxqt-leave/resources/lxqt-shutdown.desktop.in +++ b/lxqt-leave/resources/lxqt-shutdown.desktop.in @@ -5,7 +5,7 @@ GenericName=Shutdown Comment=shutdown the machine Exec=lxqt-leave --shutdown Icon=system-shutdown -Categories=LXQt;X-Leave +Categories=System;X-Leave OnlyShowIn=LXQt; #TRANSLATIONS_DIR=../translations diff --git a/lxqt-leave/resources/lxqt-suspend.desktop.in b/lxqt-leave/resources/lxqt-suspend.desktop.in index ac0d2f3..401595d 100644 --- a/lxqt-leave/resources/lxqt-suspend.desktop.in +++ b/lxqt-leave/resources/lxqt-suspend.desktop.in @@ -5,7 +5,7 @@ GenericName=Suspend Comment=suspend the machine Exec=lxqt-leave --suspend Icon=system-suspend -Categories=LXQt;X-Leave +Categories=System;X-Leave OnlyShowIn=LXQt #TRANSLATIONS_DIR=../translations diff --git a/lxqt-leave/translations/lxqt-hibernate_ja.desktop b/lxqt-leave/translations/lxqt-hibernate_ja.desktop new file mode 100644 index 0000000..80ea706 --- /dev/null +++ b/lxqt-leave/translations/lxqt-hibernate_ja.desktop @@ -0,0 +1,2 @@ +Name[ja]=ハイバネート +Comment[ja]=PCをハイバネートします diff --git a/lxqt-leave/translations/lxqt-leave_ja.desktop b/lxqt-leave/translations/lxqt-leave_ja.desktop new file mode 100644 index 0000000..3c1eb46 --- /dev/null +++ b/lxqt-leave/translations/lxqt-leave_ja.desktop @@ -0,0 +1,2 @@ +Name[ja]=終了 +Comment[ja]=終了ダイアログを表示します diff --git a/lxqt-leave/translations/lxqt-leave_ja.ts b/lxqt-leave/translations/lxqt-leave_ja.ts new file mode 100644 index 0000000..5003971 --- /dev/null +++ b/lxqt-leave/translations/lxqt-leave_ja.ts @@ -0,0 +1,85 @@ + + + + + LeaveDialog + + + Leave + 終了 + + + + <html><head/><body><p><span style=" font-size:12pt;">What do you want the computer to do?</span></p></body></html> + <html><head/><body><p><span style=" font-size:12pt;">どの操作を選択しますか?</span></p></body></html> + + + + Logout + ログアウト + + + + Reboot + 再起動 + + + + Shutdown + シャットダウン + + + + Suspend + サスペンド + + + + Lock screen + 画面のロック + + + + Hibernate + ハイバネート + + + + Cancel + キャンセル + + + + main + + + Logout. + ログアウト. + + + + Lockscreen. + 画面のロック. + + + + Suspend. + サスペンド. + + + + Hibernate. + ハイバネート. + + + + Shutdown. + シャットダウン. + + + + Reboot. + 再起動. + + + diff --git a/lxqt-leave/translations/lxqt-lockscreen_ja.desktop b/lxqt-leave/translations/lxqt-lockscreen_ja.desktop new file mode 100644 index 0000000..36f0fba --- /dev/null +++ b/lxqt-leave/translations/lxqt-lockscreen_ja.desktop @@ -0,0 +1,2 @@ +Name[ja]=画面のロック +Comment[ja]=画面をロックします diff --git a/lxqt-leave/translations/lxqt-logout_ja.desktop b/lxqt-leave/translations/lxqt-logout_ja.desktop new file mode 100644 index 0000000..067ae6a --- /dev/null +++ b/lxqt-leave/translations/lxqt-logout_ja.desktop @@ -0,0 +1,2 @@ +Name[ja]=ログアウト +Comment[ja]=セッションからログアウトします diff --git a/lxqt-leave/translations/lxqt-reboot_ja.desktop b/lxqt-leave/translations/lxqt-reboot_ja.desktop new file mode 100644 index 0000000..4b4cbc2 --- /dev/null +++ b/lxqt-leave/translations/lxqt-reboot_ja.desktop @@ -0,0 +1,2 @@ +Name[ja]=再起動 +Comment[ja]=PCを再起動します diff --git a/lxqt-leave/translations/lxqt-shutdown_ja.desktop b/lxqt-leave/translations/lxqt-shutdown_ja.desktop new file mode 100644 index 0000000..60cfb7f --- /dev/null +++ b/lxqt-leave/translations/lxqt-shutdown_ja.desktop @@ -0,0 +1,2 @@ +Name[ja]=シャットダウン +Comment[ja]=PCをシャットダウンします diff --git a/lxqt-leave/translations/lxqt-suspend_ja.desktop b/lxqt-leave/translations/lxqt-suspend_ja.desktop new file mode 100644 index 0000000..b4426b8 --- /dev/null +++ b/lxqt-leave/translations/lxqt-suspend_ja.desktop @@ -0,0 +1,2 @@ +Name[ja]=サスペンド +Comment[ja]=PCをサスペンドします diff --git a/lxqt-session/CMakeLists.txt b/lxqt-session/CMakeLists.txt index b50ed2b..93743b6 100644 --- a/lxqt-session/CMakeLists.txt +++ b/lxqt-session/CMakeLists.txt @@ -9,6 +9,7 @@ if(NOT DEFINED LIBUDEV_MONITOR OR LIBUDEV_MONITOR) find_package(PkgConfig) pkg_check_modules(LIBUDEV REQUIRED libudev) + include_directories(${LIBUDEV_INCLUDE_DIRS}) add_definitions(-DWITH_LIBUDEV_MONITOR) endif() @@ -30,6 +31,8 @@ set(lxqt-session_SRCS src/windowmanager.cpp src/sessionapplication.cpp src/sessiondbusadaptor.h + src/numlock.cpp + src/numlock.h ) if(LIBUDEV_MONITOR) list(APPEND lxqt-session_SRCS src/UdevNotifier.cpp) @@ -63,13 +66,13 @@ target_link_libraries(lxqt-session Qt5::Widgets Qt5::DBus Qt5::X11Extras - ${XCB_LIBRARIES} - ${X11_LIBRARIES} + ${XCB_LDFLAGS} + X11 lxqt KF5::WindowSystem ) if(LIBUDEV_MONITOR) - target_link_libraries(lxqt-session ${LIBUDEV_LIBRARIES}) + target_link_libraries(lxqt-session ${LIBUDEV_LDFLAGS}) endif() INSTALL(TARGETS diff --git a/lxqt-session/src/numlock.cpp b/lxqt-session/src/numlock.cpp new file mode 100644 index 0000000..5430f7f --- /dev/null +++ b/lxqt-session/src/numlock.cpp @@ -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) + * + * 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 +// Copyright (C) 2001 Oswald Buddenhagen + +#include +#include +#include +#include +#include +#include + +/* the XKB stuff is based on code created by Oswald Buddenhagen */ + +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()); +} diff --git a/lxqt-session/src/numlock.h b/lxqt-session/src/numlock.h new file mode 100644 index 0000000..b9b347d --- /dev/null +++ b/lxqt-session/src/numlock.h @@ -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) + * + * 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 diff --git a/lxqt-session/src/sessionapplication.cpp b/lxqt-session/src/sessionapplication.cpp index 06bd3ed..1db7366 100644 --- a/lxqt-session/src/sessionapplication.cpp +++ b/lxqt-session/src/sessionapplication.cpp @@ -21,6 +21,7 @@ #include "sessiondbusadaptor.h" #include "lxqtmodman.h" #include "UdevNotifier.h" +#include "numlock.h" #include #include #include @@ -168,10 +169,15 @@ void SessionApplication::loadKeyboardSettings(LXQt::Settings& settings) XkbSetAutoRepeatRate(QX11Info::display(), XkbUseCoreKbd, delay, interval); } + // turn on/off keyboard beep bool beep = settings.value("beep").toBool(); values.bell_percent = beep ? -1 : 0; XChangeKeyboardControl(QX11Info::display(), KBBellPercent, &values); + // turn on numlock as needed + if(settings.value("numlock").toBool()) + enableNumlock(); + // keyboard layout support using setxkbmap QString layout = settings.value("layout").toString(); QString variant = settings.value("variant").toString(); diff --git a/lxqt-session/translations/lxqt-session_ja.ts b/lxqt-session/translations/lxqt-session_ja.ts index 994da5f..bf1b323 100644 --- a/lxqt-session/translations/lxqt-session_ja.ts +++ b/lxqt-session/translations/lxqt-session_ja.ts @@ -14,12 +14,12 @@ Crash Report - + クラッシュリポート <b>%1</b> crashed too many times. Its autorestart has been disabled until next login. - + <b>%1</b>はクラッシュしすぎました。次回ログイン時に自動起動は無効化されます。 @@ -49,20 +49,16 @@ Before starting to use the LXQt, you might want to select the Windows Manager:Choose your favorite one. お好みのものを選んでください。 - - - Welcome to LXQt - - <html><head/><body><p><span style=" font-weight:600;">Welcome to LXQt</span></p><p>Please select your default Window Manager.</p></body></html> - + <html><head/><body><p><span style=" font-weight:600;">LXQtへようこそ</span></p><p>既定のウィンドウマネージャを選択してください。</p></body></html> You will be able to change this at any time through Preferences -> Session Settings -> Basic Settings. - + 動作を確認後、翻訳を要修正 + 設定-> セッションの設定-> 基本の設定 からいつでも変更することができるようになります。 diff --git a/lxqt-session/translations/lxqt-session_ja_JP.ts b/lxqt-session/translations/lxqt-session_ja_JP.ts deleted file mode 100644 index 4fb0d3c..0000000 --- a/lxqt-session/translations/lxqt-session_ja_JP.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - LXQtModuleManager - - - Crash Report - - - - - <b>%1</b> crashed too many times. Its autorestart has been disabled until next login. - - - - - WmSelectDialog - - - Other ... - - - - - Choose your favorite one. - - - - - Welcome to LXQt - - - - - <html><head/><body><p><span style=" font-weight:600;">Welcome to LXQt</span></p><p>Please select your default Window Manager.</p></body></html> - - - - - You will be able to change this at any time through Preferences -> Session Settings -> Basic Settings. - - - -