Adding upstream version 0.11.0.

upstream/0.11.0
Alf Gaida 8 years ago
parent 7870faab49
commit b9f8405b32

3
.gitignore vendored

@ -0,0 +1,3 @@
build
nbproject
translations/lxqt-runner

@ -0,0 +1,216 @@
lxqt-runner-0.11.0 / 2016-09-24
===============================
* Add README.md
* Math: Enhance evaluation logic
* Math: Use libmuparser for math evaluation
* runner: Follow virtual desktop switching
* Properly hide the runner when it loses focus
* runner: Sort history items by relevance
* build: Use external translations (#41)
* ts-files removal (#40)
* Use QString() instead of ""
* Fix layout and focus to get history items right
* Bump year
* main: Add activation by running second instance
* Italian translation update
* dialog: Default icons
* dialog: Fill background
* upd: lxqt-runner_hu.ts
* Update lxqt-runner_it.ts
0.10.0 / 2015-10-31
===================
* Fix license file
* Update translations
* providers: don't show custom command/binary in case existing application (.desktop) is shown
* providers: internal functions as static & which moved to the beginning for using it below
* Updated german translation, made common for all regions.
* Removed country variant _IT
* Rename LxQt to LXQt everywhere
* Remove country variant from language code
* some license fixes
* Handles CMake policy CMP0063
* lxqt-runner: search case insensitive in items for each provider
* lxqt-runner: correct space(s) according to conding standard
* Use the LXQtCompilerSettings CMake module
* Removes no added value, noisy debug message
* Fixes Action button missing (menu) icon
* Adds Runtime install COMPONENT
* Coding style changes and cleanups
* Use GNUInstallDirs
* Removes unneeded include_directories() entries.
* Reworks WITHOUT_MENU_CACHE option. Renames to USE_MENU_CACHE
* Reworks RUNNER_MATH option
* Reworks Virtual Box options and associated stuff
* Use CMAKE_AUTOUIC, drop qt5_wrap_ui()
* Update the build system to use the Targets infrastructure
* Remove trailing whitespaces
* Fix naming and links
* Hide on shortcut trigger if it's active
* Avoid hiding the dialog on opening the menu
* Remove the provider for power actions
* fallback for executing scripts w/o #!
* rempove KF5/ prefix from include as done in lxde/liblxqt/pull/36
0.9.0 / 2015-01-29
==================
* Sets the command list to use alternating row colors
* Portuguese update
* - Unify naming for a unique lxqt. No more suffixes
* Drop XdgDesktopFileCache::getFile()
* Add tab-completion
* uniform coding style
* Hide on loosing focus
* Update lxqt-runner_pl_PL.ts
* Fixes lxde/lxqt#347. HtmlDelegate on runner's list.
* Makes the UPDATE_TRANSLATIONS option actually work.
* Cleans up CMakeLists.txt a little bit
* Uses the new liblxqt modules to handle translations
* Moves lxqt_runner_sr_BA.ts to the translations dir.
* Adds an UPDATE_TRANSLATIONS option
* Use the LXQtranslate module to handle translations
* Update Russian translation
* Fixes dialog type, alt+tab won't focus it
* Fix QDesktopWidget::availableGeometry() vs KWindowSystem::workArea() bug
* CMakeLists cleanups
* Fixes lxde/lxde-qt#311, FTBFS
* Port lxqt-runner to KWindowSystem. Purge Qt 4.
* Add Ctrl-p and Ctrl-n movement shortcuts.
* Trim input text. Fixes lxde/lxde-qt#139
0.8.0 / 2014-10-08
==================
* Adapt to the translation infrastructure
* Use QWindow::windowHandle()->winId() to replace QWidget::winId() due to a bug of Qt5.
* Initial Qt5 support.
* Use new LXQt header files.
* Assorted string polishing
* cmake option to build without menu-cache even if it is installed
* Update dialog.cpp
0.7.0 / 2014-05-07
==================
* Update COPYING
0.6.99 / 2014-05-01
===================
* Update man page
* Update AUTHORS
* LxQt Power Management -> Power Management
* Add CPack rules for creating tarball
* Update the app icons properly after the xdg menu is reloaded.
* Proper encoding of command arguments
* Removed CMAKE_SOURCE_DIR usage from CMakeLists.txt
* Fix renaming bugs, replacing lxqt-qt with lxde-qt
* Finish the crazy razor=>lxqt renaming tasks.
* Convert utf8 strings to utf16 properly while using libmenu-cache.
* Optionally support libmenu-cache so we can load installed appS from a cache quickly.
* Rename razor to lxqt in some strings.
* Make use of the latest liblxqt & liblxqt-globalkeys. * Rename to lxqt-runnder.
* Add COPYING and AUTHORS
* compile fix: do not include private qt header files
* razor-runner scripting
* X-RAZOR changed to Razor in desktop files
* Experimental submenu added to shortcut selector button
* Global shortcuts client library added and all support for it refactored and fixed.
* fix "shorcut" typo
* ignored duplicate entries in the HistoryProvider
* Some debug prints removed. Timeout for Systray to load increased to 1 minute. Module crash detection improved.
* preliminary manpages primary for razorqt and usefully in venenux
* Translations updated
* first part of fixes based on Coverity Scan (code static analysis)
* Delete bad en_GB translations
* Update translations
* runner: Always select the command first and don't match directories
* Translations updated
* Removed line num from TS files.
* Translations
* Updated .ts.src files
* Extra explaination on compile flags
* indent fixes
* Optional runtime VBoxHeadless support
* Fix for Issue #290 Fails to build on BSD
* Removed translate.sh from razor-runner
* New translation infrastructure
* Ts.src files updated.
* Language name zh_CN.GB2312 braked cmake process.
* Translations updated
* typo fixes
* Razor-runner: history provider didn't expand env variables.
* Fixed a history in the razor-runner.
* lock screen for runner too
* fixed #267 Add logout/lock screen actions to razor runner
* Move configure button to the left of close
* implemented #267 Add logout/lock screen actions to razor runner
* Don't display any VM on empty regex ; adding author header for previously added vbox provider
* GUI for change razor theme.
* fixed #63 Razor launcher should access history on arrow up/down
* Improvements in the razor-runner Added a customommand provider.
* Set window titles for use with WM's like fvwm
* Typos in code. Thanks Aaron Lewis. * In razor-runner , providers item: title() was typed as tile() * For RazorSettings class , settingsChanged() was typed as settigsChanged()
* Garbage in the code.
* Preloading menu in the razor-runner.
* Fix QRC_FILE definition
* Fix the header path
* Implemention of Virtualbox Runner
* Implemention of VirtualBox runner
* Transifex desktop: sr_BA.ts should be a local
* Transifex desktop: local translations
* Transifex desktop: Translations pulled
* Update Tradidtional Chinese Translations
* RazorApplication class implemented; all modules ported to this class
* Translations update
* Added support for the online translation service. www.transifex.net
* Serbian translation files
* Greek translation by iosifidis
* Razor-runner not activated in kwin.
* Razor-runner not activated in kwin.
* Added danish translations
* Russian translation
* fix #169: italian translation
* Relicense panel & runner
* Set icon theme before instantiating CommandItemModel
* Fix gmail.ru -> gmail.com
* Keep all parts of the theme in one place. Fix in the cmake.
* Keep all parts of the theme in one place
* SVK translation finalized
* Close Issue #120
* License audit
* Add Chinese(simplified) translation files.
* Add Slovak (sk) translation
* Czech translations (cs_CZ)
* huge refactoring of the libraries build organization
* Closes #64 Razor launcher should focus on alt+f2
* RazorRunner: IconThemeChanged handler for razor-runner.
* Fix: Wrong actualSize for icons from /usr/pixmaps.
* GPL->LGPL where I'm the author
* Translation for standard buttons in the razor-runner
* Reducing lib dependency in cmake files.
* Fix: Desktop Menu Specification category must be X-RAZOR.
* Polish translation. Closes #46
* potential fix (workaround) from #40: XdgMenu does not display environment related items
* homepage updated + auto replacement script
* Micro fix in razorqt-runner
* XDG-files are splitted into qtxdg library.
* History mode in razor-runner.
* Fixed #23: Sorting razor-runner command list.
* Translation
* Mathematics support in razor-runner.
* Razor-runner refactoring - Providers classes.
* Small sorted fix.
* Fixed selection color in listview.
* Polish translation
* fix for build (includes)
* Closes #22
* Closes #21
* Disabled tests the global shortcut registration result.
* "math mode" for razor-runner (expression ends with '=')
* check for global shortcut duplicity (open cfg if it's in conflict)
* Razor-runner program

@ -23,7 +23,6 @@ cmake_dependent_option(RUNNER_VBOX_HEADLESS
find_package(KF5WindowSystem REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Xml REQUIRED)
find_package(Qt5Script REQUIRED)
find_package(Qt5LinguistTools REQUIRED QUIET)
find_package(lxqt REQUIRED)
find_package(lxqt-globalkeys REQUIRED)
@ -32,17 +31,23 @@ message(STATUS "Building with Qt${Qt5Core_VERSION_STRING}")
include(LXQtCompilerSettings NO_POLICY_SCOPE)
set(QTX_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::Script)
set(QTX_LIBRARIES Qt5::Widgets Qt5::Xml)
if (USE_MENU_CACHE)
# optionally use libmenu-cache from lxde to generate the application menu
if (USE_MENU_CACHE OR RUNNER_MATH)
find_package(PkgConfig REQUIRED QUIET)
endif ()
if (USE_MENU_CACHE)
# optionally use libmenu-cache from lxde to generate the application menu
pkg_check_modules(MENU_CACHE REQUIRED QUIET
libmenu-cache>=0.3.3
)
endif()
if (RUNNER_MATH)
pkg_check_modules(MUPARSER REQUIRED QUIET muparser)
endif ()
set(lxqt-runner_H_FILES
dialog.h
commanditemmodel.h
@ -77,6 +82,7 @@ set(lxqt-runner_LIBRARIES
lxqt-globalkeys-ui
${MENU_CACHE_LIBRARIES}
${QTX_LIBRARIES}
${MUPARSER_LDFLAGS}
)
include(LXQtTranslate)
@ -116,8 +122,13 @@ add_executable(${PROJECT_NAME}
${lxqt-runner_QM_LOADER}
)
if (RUNNER_MATH)
lxqt_enable_target_exceptions("${PROJECT_NAME}" PRIVATE)
endif ()
target_include_directories(${PROJECT_NAME}
PRIVATE "$<$<BOOL:${MENU_CACHE_FOUND}>:${MENU_CACHE_INCLUDE_DIRS}>"
PRIVATE "$<$<BOOL:${MUPARSER_FOUND}>:${MUPARSER_INCLUDE_DIRS}>"
)
target_compile_definitions(${PROJECT_NAME}

@ -0,0 +1,34 @@
# lxqt-runner
## Overview
lxqt-runner provides a GUI that comes up on the desktop and allows for launching applications or shutting down the system.
![lxqt-runner](lxqt-runner.png)
Technically it consists of a single binary `lxqt-runner`. The binary is run in a daemon-like manner as so-called LXQt Module and brings up the GUI when a configured keyboard shortcut is hit.
## Installation
### Compiling source code
Runtime dependencies are muparser, KWindowSystem, menu-cache and [lxqt-globalkeys](https://github.com/lxde/lxqt-globalkeys).
Additional build dependencies are CMake and optionally Git to pull latest VCS checkouts. The localization files were outsourced to repository [lxqt-l10n](https://github.com/lxde/lxqt-l10n) so the corresponding dependencies are needed, too. Please refer to this repository's `README.md` for further information.
Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` has to be set to `/usr` on most operating systems.
To build run `make`, to install `make install` which accepts variable `DESTDIR` as usual.
### Binary packages
Official binary packages are provided by all major Linux distributions like Arch Linux, Debian (as of Debian stretch only), Fedora and openSUSE. Just use your package manager to search for string `lxqt-runner`.
## Configuration, Usage
Launching binary `lxqt-runner` as LXQt Module can be adjusted from section "Basic Settings" in configuration dialogue "LXQt Session Settings" (binary `lxqt-config-session`) of [lxqt-session](https://github.com/lxde/lxqt-session).
The keyboard shortcut to launch the GUI can be configured in "Global Actions Manager" (binary `lxqt-config-globalkeyshortcuts`) of [lxqt-globalkeys](https://github.com/lxde/lxqt-globalkeys).
The GUI comes with a configuration dialogue to customize settings like the position where it's displayed. It's accessible from a menu that's in turn opened by an icon left of the one to close the GUI, "arrow down" in screenshot above.
To launch an application corresponding strings need to be filed in the form, next a selection can be made from a list presenting matches. Items to shut down or restart the system and so on are provided by the menu featuring the configuration dialogue as well.

@ -64,6 +64,7 @@ Dialog::Dialog(QWidget *parent) :
mSettings(new LXQt::Settings("lxqt-runner", this)),
mGlobalShortcut(0),
mLockCascadeChanges(false),
mDesktopChanged(false),
mConfigureDialog(0)
{
ui->setupUi(this);
@ -117,6 +118,7 @@ Dialog::Dialog(QWidget *parent) :
connect(mGlobalShortcut, SIGNAL(activated()), this, SLOT(showHide()));
connect(mGlobalShortcut, SIGNAL(shortcutChanged(QString,QString)), this, SLOT(shortcutChanged(QString,QString)));
connect(KWindowSystem::self(), SIGNAL(activeWindowChanged(WId)), this, SLOT(onActiveWindowChanged(WId)));
connect(KWindowSystem::self(), &KWindowSystem::currentDesktopChanged, this, &Dialog::onCurrentDesktopChanged);
resize(mSettings->value("dialog/width", 400).toInt(), size().height());
@ -301,7 +303,7 @@ void Dialog::showHide()
{
realign();
show();
KWindowSystem::forceActiveWindow(windowHandle()->winId());
KWindowSystem::forceActiveWindow(winId());
ui->commandEd->setFocus();
}
}
@ -383,8 +385,35 @@ void Dialog::shortcutChanged(const QString &/*oldShortcut*/, const QString &newS
************************************************/
void Dialog::onActiveWindowChanged(WId id)
{
if (isVisible() && id != winId())
hide();
if (isVisible() && 0 != id && id != winId())
{
if (mDesktopChanged)
{
mDesktopChanged = false;
KWindowSystem::forceActiveWindow(winId());
} else
{
hide();
}
}
}
/************************************************
************************************************/
void Dialog::onCurrentDesktopChanged(int screen)
{
if (isVisible())
{
KWindowSystem::setOnDesktop(winId(), screen);
KWindowSystem::forceActiveWindow(winId());
//Note: workaround for changing desktop while runner is shown
// The KWindowSystem::forceActiveWindow may fail to correctly activate runner if there
// are any other windows on the new desktop (probably because of the sequence while WM
// changes the virtual desktop (change desktop and activate any of the windows on it))
mDesktopChanged = true;
}
}

@ -78,6 +78,7 @@ private:
LXQt::ScreenSaver *mScreenSaver;
bool mLockCascadeChanges;
bool mDesktopChanged; //!< \note flag for changing desktop & activation workaround
ConfigureDialog *mConfigureDialog;
@ -91,6 +92,7 @@ private slots:
void showConfigDialog();
void shortcutChanged(const QString &oldShortcut, const QString &newShortcut);
void onActiveWindowChanged(WId id);
void onCurrentDesktopChanged(int desktop);
};
#endif // DIALOG_H

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@ -789,20 +789,28 @@ bool VirtualBoxProvider::isOutDated() const
#ifdef MATH_ENABLED
#include <QtScript/QScriptEngine>
#include <QtScript/QScriptValue>
#include <muParser.h>
/************************************************
************************************************/
MathItem::MathItem():
CommandProviderItem()
CommandProviderItem(),
mParser{new mu::Parser}
{
mToolTip =QObject::tr("Mathematics");
mIcon = XdgIcon::fromTheme("accessories-calculator");
}
/************************************************
************************************************/
MathItem::~MathItem()
{
}
/************************************************
************************************************/
@ -819,17 +827,42 @@ bool MathItem::compare(const QRegExp &regExp) const
{
QString s = regExp.pattern().trimmed();
bool is_math = false;
if (s.startsWith('='))
{
is_math = true;
s.remove(0, 1);
}
if (s.endsWith("="))
{
is_math = true;
s.chop(1);
QScriptEngine myEngine;
QScriptValue res = myEngine.evaluate(s);
if (res.isNumber())
}
if (is_math)
{
if (s != mCachedInput)
{
MathItem *self=const_cast<MathItem*>(this);
self->mTitle = s + " = " + res.toString();
return true;
MathItem * self = const_cast<MathItem*>(this);
mCachedInput = s;
self->mTitle.clear();
//try to compute anything suitable
for (int attempts = 20; 0 < attempts && 0 < s.size(); s.chop(1), --attempts)
{
try
{
mParser->SetExpr(s.toStdString());
self->mTitle = s + "=" + QLocale::system().toString(mParser->Eval());
break;
} catch (const mu::Parser::exception_type & e)
{
//don't do anything, return false -> no result will be showed
}
}
}
return !mTitle.isEmpty();
}
return false;

@ -245,6 +245,11 @@ private:
#ifdef MATH_ENABLED
namespace mu
{
class Parser;
}
/************************************************
* Mathematics
************************************************/
@ -252,10 +257,14 @@ class MathItem: public CommandProviderItem
{
public:
MathItem();
~MathItem();
bool run() const;
bool compare(const QRegExp &regExp) const;
virtual unsigned int rank(const QString &pattern) const;
private:
QScopedPointer<mu::Parser> mParser;
mutable QString mCachedInput;
};
@ -266,6 +275,7 @@ public:
MathProvider();
//virtual ~MathProvider();
};
#endif
#ifdef VBOX_ENABLED
#include <QDateTime>

Loading…
Cancel
Save