summaryrefslogtreecommitdiffstats
path: root/superkaramba/examples/popupMenu/popupMenu.py
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2022-11-11 17:41:30 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2022-11-13 12:09:49 +0900
commitda9cd0c056c8275033fca84a1c8d49a8edb0c8ee (patch)
tree2521f74c0b2868d82518e13053fb01cc179e9a23 /superkaramba/examples/popupMenu/popupMenu.py
parent5dab6232ef3b3715630cf88eb40c4c6021e65f07 (diff)
downloadtdeutils-da9cd0c056c8275033fca84a1c8d49a8edb0c8ee.tar.gz
tdeutils-da9cd0c056c8275033fca84a1c8d49a8edb0c8ee.zip
superkaramba: convert examples to python3.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'superkaramba/examples/popupMenu/popupMenu.py')
-rw-r--r--superkaramba/examples/popupMenu/popupMenu.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/superkaramba/examples/popupMenu/popupMenu.py b/superkaramba/examples/popupMenu/popupMenu.py
index 8df5aef..39010f7 100644
--- a/superkaramba/examples/popupMenu/popupMenu.py
+++ b/superkaramba/examples/popupMenu/popupMenu.py
@@ -20,21 +20,21 @@ def initWidget(widget):
global id5
menu1 = karamba.createMenu(widget)
- print "menu 1 created!"
+ print("menu 1 created!")
menu2 = karamba.createMenu(widget)
- print "menu 2 created!"
+ print("menu 2 created!")
id1 = karamba.addMenuItem(widget, menu1, "menu 1 first item", "kword")
- print "item 1 entered in menu 1"
+ print("item 1 entered in menu 1")
id2 = karamba.addMenuItem(widget, menu1, "menu 1 second item", "kate")
- print "item 2 entered in menu 1"
+ print("item 2 entered in menu 1")
id3 = karamba.addMenuItem(widget, menu2, "menu 2 first item", "kword")
- print "item 1 entered in menu 2"
+ print("item 1 entered in menu 2")
id4 = karamba.addMenuItem(widget, menu2, "menu 2 second item", "kate")
- print "item 2 entered in menu 2"
+ print("item 2 entered in menu 2")
id5 = karamba.addMenuItem(widget, menu2, "menu 2 third item", "/opt/kde/share/icons/kdeclassic/16x16/apps/kicker.png")
- print "item 3 entered in menu 2"
+ print("item 3 entered in menu 2")
@@ -95,23 +95,23 @@ def menuItemClicked(widget, menu, id):
if (menu == menu1):
if(id == id1):
- print "item 1 in menu 1 clicked."
+ print("item 1 in menu 1 clicked.")
elif(id == id2):
- print "item 2 in menu 1 clicked, removing item 2 in menu 2"
+ print("item 2 in menu 1 clicked, removing item 2 in menu 2")
karamba.removeMenuItem(widget, menu2, id4)
elif (menu == menu2):
if(id == id3):
- print "item 1 in menu 2 clicked."
+ print("item 1 in menu 2 clicked.")
elif(id == id4):
- print "item 2 in menu 2 clicked, deleting menu 1 (if menu1 still exists...)"
+ print("item 2 in menu 2 clicked, deleting menu 1 (if menu1 still exists...)")
karamba.deleteMenu(widget, menu1)
elif(id == id5):
- print "item 3 in menu 2 clicked, removing item 2 in menu 1 (if menu1 still exists...)"
+ print("item 3 in menu 2 clicked, removing item 2 in menu 1 (if menu1 still exists...)")
karamba.removeMenuItem(widget, menu1, id2)
# This will be printed when the widget loads.
-print "Loaded my python extension!"
+print("Loaded my python extension!")