aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-11-17 13:13:59 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-11-17 13:13:59 +0100
commit8089cd5052ff617c05ef981b24881d4b89b5436c (patch)
tree9511d64514ca43f233539279f699c5b099e010d8 /examples
parent7f41ec3ad465feae093eab4d4ae54b8454a63018 (diff)
parent0d2c880a580c1ea9bb796e1116d18560fea0e4d6 (diff)
downloadqmenumodel-8089cd5052ff617c05ef981b24881d4b89b5436c.tar.gz
qmenumodel-8089cd5052ff617c05ef981b24881d4b89b5436c.tar.bz2
qmenumodel-8089cd5052ff617c05ef981b24881d4b89b5436c.zip
Merge branch 'tari01-pr/rename-canonical-properties'
Attributes GH PR #7: https://github.com/AyatanaIndicators/qmenumodel/pull/7
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/exportactiongroup.py8
-rwxr-xr-xexamples/exportmenu.py8
-rw-r--r--examples/info-menumodel.cpp4
-rw-r--r--examples/render-menumodel.qml8
-rw-r--r--examples/unityqmlmenumodel.qml8
5 files changed, 18 insertions, 18 deletions
diff --git a/examples/exportactiongroup.py b/examples/exportactiongroup.py
index b1237a8..df05b0d 100755
--- a/examples/exportactiongroup.py
+++ b/examples/exportactiongroup.py
@@ -18,8 +18,8 @@
"""
This example script exports an action group on the session bus under the name
-com.canonical.testactiongroup and at the object path
-/com/canonical/testactiongroup.
+org.ayatana.testactiongroup and at the object path
+/org/ayatana/testactiongroup.
"""
import sys
@@ -28,8 +28,8 @@ from gi.repository import Gio
from gi.repository import GLib
-BUS_NAME = 'com.canonical.testactiongroup'
-BUS_OBJECT_PATH = '/com/canonical/testactiongroup'
+BUS_NAME = 'org.ayatana.testactiongroup'
+BUS_OBJECT_PATH = '/org/ayatana/testactiongroup'
def action_activated(action, data):
diff --git a/examples/exportmenu.py b/examples/exportmenu.py
index b7c37b1..ed996e2 100755
--- a/examples/exportmenu.py
+++ b/examples/exportmenu.py
@@ -18,7 +18,7 @@
"""
This example script exports a menu model on the session bus under the name
-com.canonical.testmenu and at the object path /com/canonical/testmenu.
+org.ayatana.testmenu and at the object path /org/ayatana/testmenu.
The menu model contains items that have attributes with custom values, as well
as sub-menus.
"""
@@ -29,8 +29,8 @@ from gi.repository import Gio
from gi.repository import GLib
-BUS_NAME = 'com.canonical.testmenu'
-BUS_OBJECT_PATH = '/com/canonical/testmenu'
+BUS_NAME = 'org.ayatana.testmenu'
+BUS_OBJECT_PATH = '/org/ayatana/testmenu'
def bus_acquired(bus, name):
menu = Gio.Menu()
@@ -42,7 +42,7 @@ def bus_acquired(bus, name):
bar = Gio.MenuItem.new('bar', 'bar')
bar.set_attribute_value('x-defaultvalue',
GLib.Variant.new_string('Hello World!'))
- bar.set_attribute_value('x-canonical-currentvalue',
+ bar.set_attribute_value('x-ayatana-currentvalue',
GLib.Variant.new_string('awesome'))
bar.set_attribute_value('x-velocity', GLib.Variant.new_uint64(83374))
menu.append_item(bar)
diff --git a/examples/info-menumodel.cpp b/examples/info-menumodel.cpp
index a0bdb0a..d4fd0a7 100644
--- a/examples/info-menumodel.cpp
+++ b/examples/info-menumodel.cpp
@@ -33,8 +33,8 @@
#include <QtCore/QObject>
-#define BUS_NAME "com.canonical.testmenu"
-#define BUS_OBJECT_PATH "/com/canonical/testmenu"
+#define BUS_NAME "org.ayatana.testmenu"
+#define BUS_OBJECT_PATH "/org/ayatana/testmenu"
class MenuModelMonitor : public QDBusMenuModel
diff --git a/examples/render-menumodel.qml b/examples/render-menumodel.qml
index 7d8e0a1..5458eeb 100644
--- a/examples/render-menumodel.qml
+++ b/examples/render-menumodel.qml
@@ -18,8 +18,8 @@
*/
// This example QML application renders a menu model exposed on the session bus
-// under the well-known name com.canonical.testmenu and at the object path
-// /com/canonical/testmenu.
+// under the well-known name org.ayatana.testmenu and at the object path
+// /org/ayatana/testmenu.
import QtQuick 2.0
import QMenuModel 0.1
@@ -32,8 +32,8 @@ Item {
QDBusMenuModel {
id: menuModel
busType: DBus.SessionBus
- busName: "com.canonical.testmenu"
- objectPath: "/com/canonical/testmenu"
+ busName: "org.ayatana.testmenu"
+ objectPath: "/org/ayatana/testmenu"
onStatusChanged: {
if (status == DBus.Connecting) {
view.reset()
diff --git a/examples/unityqmlmenumodel.qml b/examples/unityqmlmenumodel.qml
index c0e5adc..e7360e0 100644
--- a/examples/unityqmlmenumodel.qml
+++ b/examples/unityqmlmenumodel.qml
@@ -25,9 +25,9 @@ Item {
UnityMenuModel {
id: menu
- busName: "com.canonical.indicator.sound"
- actions: { "indicator": "/com/canonical/indicator/sound" }
- menuObjectPath: "/com/canonical/indicator/sound/desktop"
+ busName: "org.ayatana.indicator.sound"
+ actions: { "indicator": "/org/ayatana/indicator/sound" }
+ menuObjectPath: "/org/ayatana/indicator/sound/desktop"
}
ListView {
@@ -42,7 +42,7 @@ Item {
if (isSeparator) {
return separator;
}
- else if (type == "com.canonical.unity.slider") {
+ else if (type == "org.ayatana.indicator.slider") {
listview.model.loadExtendedAttributes(index, {'min-icon': 'icon',
'max-icon': 'icon'});
return slider;