Commit 202afbf8 authored by Andrey Butirsky's avatar Andrey Butirsky
Browse files

impr: Keyboard Layout DBus API: drop excessive method arguments

It's enough to give info about current layout only or all the layouts
altogether, so no need to pass layout to asqure in an argument.

P-W part:
impr: Keyboard Layout plugin: drop excessive DBus API method arguments
parent 5e479d68
......@@ -184,7 +184,7 @@ void KeyboardDaemon::layoutChanged()
if( newLayout != currentLayout ) {
currentLayout = newLayout;
emit currentLayoutChanged(newLayout.toString());
emit layoutChanged(newLayout.toString());
}
}
......@@ -231,24 +231,24 @@ bool KeyboardDaemon::setLayout(const QString& layout)
return X11Helper::setLayout(LayoutUnit(layout));
}
QString KeyboardDaemon::getCurrentLayout()
QString KeyboardDaemon::getLayout() const
{
return currentLayout.toString();
}
QString KeyboardDaemon::getCurrentLayoutLongName() const
QString KeyboardDaemon::getLayoutDisplayName() const
{
return Flags::getLongText(currentLayout, rules);
return Flags::getShortText(currentLayout, keyboardConfig);
}
QStringList KeyboardDaemon::getLayoutsList()
QString KeyboardDaemon::getLayoutLongName() const
{
return X11Helper::getLayoutsListAsString( X11Helper::getLayoutsList() );
return Flags::getLongText(currentLayout, rules);
}
QString KeyboardDaemon::getLayoutDisplayName(const QString &layout)
QStringList KeyboardDaemon::getLayoutsList() const
{
return Flags::getShortText(LayoutUnit(layout), keyboardConfig);
return X11Helper::getLayoutsListAsString( X11Helper::getLayoutsList() );
}
#include "keyboard_daemon.moc"
......@@ -61,13 +61,13 @@ private Q_SLOTS:
public Q_SLOTS:
Q_SCRIPTABLE void switchToNextLayout();
Q_SCRIPTABLE bool setLayout(const QString& layout);
Q_SCRIPTABLE QString getCurrentLayout();
Q_SCRIPTABLE QString getCurrentLayoutLongName() const;
Q_SCRIPTABLE QStringList getLayoutsList();
Q_SCRIPTABLE QString getLayoutDisplayName(const QString &layout);
Q_SCRIPTABLE QString getLayout() const;
Q_SCRIPTABLE QString getLayoutDisplayName() const;
Q_SCRIPTABLE QString getLayoutLongName() const;
Q_SCRIPTABLE QStringList getLayoutsList() const;
Q_SIGNALS:
Q_SCRIPTABLE void currentLayoutChanged(QString layout);
Q_SCRIPTABLE void layoutChanged(QString layout);
Q_SCRIPTABLE void layoutListChanged();
public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment