Update interface name

pull/9/head
reionwong 4 years ago
parent de53c455fd
commit 3003feed27

@ -32,7 +32,7 @@ set(RESOURCES
) )
qt5_add_dbus_adaptor(DBUS_SRCS qt5_add_dbus_adaptor(DBUS_SRCS
src/org.cutefish.Launcher.xml src/com.cutefish.Launcher.xml
src/launcher.h src/launcher.h
Launcher Launcher
launcheradaptor launcheradaptor

@ -32,7 +32,7 @@ ListView {
property var sourceModel: launcherModel property var sourceModel: launcherModel
property var modelCount: sourceModel.count property var modelCount: sourceModel.count
property int iconSize: 128 + FishUI.Units.largeSpacing * 2 property int iconSize: root.iconSize + FishUI.Units.largeSpacing * 2
property int cellWidth: iconSize + calcExtraSpacing(iconSize, control.width) property int cellWidth: iconSize + calcExtraSpacing(iconSize, control.width)
property int cellHeight: iconSize + calcExtraSpacing(iconSize, control.height) property int cellHeight: iconSize + calcExtraSpacing(iconSize, control.height)

@ -37,6 +37,7 @@ Item {
property real verticalSpacing: launcher.screenRect.height * 0.01 property real verticalSpacing: launcher.screenRect.height * 0.01
property real maxSpacing: horizontalSpacing > verticalSpacing ? horizontalSpacing : verticalSpacing property real maxSpacing: horizontalSpacing > verticalSpacing ? horizontalSpacing : verticalSpacing
property bool showed: launcher.showed property bool showed: launcher.showed
property int iconSize: root.height < 960 ? 96 : 128
onShowedChanged: { onShowedChanged: {
if (showed) if (showed)

@ -1,6 +1,6 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node> <node>
<interface name="org.cutefish.Launcher"> <interface name="com.cutefish.Launcher">
<method name="show"></method> <method name="show"></method>
<method name="hide"></method> <method name="hide"></method>
<method name="toggle"></method> <method name="toggle"></method>

@ -32,9 +32,9 @@
Launcher::Launcher(bool firstShow, QQuickView *w) Launcher::Launcher(bool firstShow, QQuickView *w)
: QQuickView(w) : QQuickView(w)
, m_dockInterface("org.cutefish.Dock", , m_dockInterface("com.cutefish.Dock",
"/Dock", "/Dock",
"org.cutefish.Dock", QDBusConnection::sessionBus()) "com.cutefish.Dock", QDBusConnection::sessionBus())
, m_hideTimer(new QTimer) , m_hideTimer(new QTimer)
, m_showed(false) , m_showed(false)
, m_leftMargin(0) , m_leftMargin(0)
@ -66,7 +66,7 @@ Launcher::Launcher(bool firstShow, QQuickView *w)
connect(&m_dockInterface, SIGNAL(primaryGeometryChanged()), this, SLOT(updateMargins())); connect(&m_dockInterface, SIGNAL(primaryGeometryChanged()), this, SLOT(updateMargins()));
connect(&m_dockInterface, SIGNAL(directionChanged()), this, SLOT(updateMargins())); connect(&m_dockInterface, SIGNAL(directionChanged()), this, SLOT(updateMargins()));
} else { } else {
QDBusServiceWatcher *watcher = new QDBusServiceWatcher("org.cutefish.Dock", QDBusServiceWatcher *watcher = new QDBusServiceWatcher("com.cutefish.Dock",
QDBusConnection::sessionBus(), QDBusConnection::sessionBus(),
QDBusServiceWatcher::WatchForUnregistration, QDBusServiceWatcher::WatchForUnregistration,
this); this);
@ -131,9 +131,9 @@ bool Launcher::dockAvailable()
bool Launcher::isPinedDock(const QString &desktop) bool Launcher::isPinedDock(const QString &desktop)
{ {
QDBusInterface iface("org.cutefish.Dock", QDBusInterface iface("com.cutefish.Dock",
"/Dock", "/Dock",
"org.cutefish.Dock", "com.cutefish.Dock",
QDBusConnection::sessionBus()); QDBusConnection::sessionBus());
if (!iface.isValid()) if (!iface.isValid())

@ -156,9 +156,9 @@ void LauncherModel::sendToDock(const QString &key)
int index = findById(key); int index = findById(key);
if (index != -1) { if (index != -1) {
QDBusMessage message = QDBusMessage::createMethodCall("org.cutefish.Dock", QDBusMessage message = QDBusMessage::createMethodCall("com.cutefish.Dock",
"/Dock", "/Dock",
"org.cutefish.Dock", "com.cutefish.Dock",
"add"); "add");
message.setArguments(QList<QVariant>() << key); message.setArguments(QList<QVariant>() << key);
QDBusConnection::sessionBus().asyncCall(message); QDBusConnection::sessionBus().asyncCall(message);
@ -170,9 +170,9 @@ void LauncherModel::removeFromDock(const QString &desktop)
int index = findById(desktop); int index = findById(desktop);
if (index != -1) { if (index != -1) {
QDBusMessage message = QDBusMessage::createMethodCall("org.cutefish.Dock", QDBusMessage message = QDBusMessage::createMethodCall("com.cutefish.Dock",
"/Dock", "/Dock",
"org.cutefish.Dock", "com.cutefish.Dock",
"remove"); "remove");
message.setArguments(QList<QVariant>() << desktop); message.setArguments(QList<QVariant>() << desktop);
QDBusConnection::sessionBus().asyncCall(message); QDBusConnection::sessionBus().asyncCall(message);

@ -34,9 +34,9 @@
#include <QTranslator> #include <QTranslator>
#include <QLocale> #include <QLocale>
#define DBUS_NAME "org.cutefish.Launcher" #define DBUS_NAME "com.cutefish.Launcher"
#define DBUS_PATH "/Launcher" #define DBUS_PATH "/Launcher"
#define DBUS_INTERFACE "org.cutefish.Launcher" #define DBUS_INTERFACE "com.cutefish.Launcher"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {

Loading…
Cancel
Save