mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-09 20:05:51 +00:00
Added todo (wish) list
This commit is contained in:
20
sources/contents/code/ptmnotify.py
Normal file
20
sources/contents/code/ptmnotify.py
Normal file
@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from gi.repository import Notify
|
||||
|
||||
|
||||
|
||||
class PTMNotify:
|
||||
def __init__(self, parent):
|
||||
"""class definition"""
|
||||
self.parent = parent
|
||||
|
||||
|
||||
def exampleNotify(self):
|
||||
Notify.init ("Hello world")
|
||||
Hello=Notify.Notification.new ("Hello world","This is an example notification.","dialog-information")
|
||||
Hello.show ()
|
||||
|
||||
def createNotification(self):
|
||||
"""function to create notification for label"""
|
||||
|
@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
from PyKDE4.plasma import Plasma
|
||||
import config
|
||||
|
||||
@ -26,22 +27,9 @@ class Reinit():
|
||||
self.parent.label_order = str(settings.get('label_order', '1345'))
|
||||
for label in self.parent.dict_orders.values():
|
||||
if ((label == 'cpu') or (label == 'mem') or (label == 'swap') or (label == 'net')):
|
||||
exec ('self.parent.' + label + 'Bool = int(settings.get("' + label + 'Bool", 1))')
|
||||
exec ('self.parent.' + label + 'Bool = int(settings.get("' + label + 'Bool", 2))')
|
||||
else:
|
||||
exec ('self.parent.' + label + 'Bool = int(settings.get("' + label + 'Bool", 0))')
|
||||
# small function for update if errors exist
|
||||
# summ = 0
|
||||
# for label in self.parent.dict_orders.values():
|
||||
# exec ('summ += self.parent.' + label + 'Bool')
|
||||
# if (len(self.parent.label_order) != summ):
|
||||
# for label in self.parent.dict_orders.values():
|
||||
# if ((label == 'cpu') or (label == 'mem') or (label == 'swap') or (label == 'net')):
|
||||
# exec ('self.parent.' + label + 'Bool = 1')
|
||||
# else:
|
||||
# exec ('self.parent.' + label + 'Bool = 0')
|
||||
# exec ('settings.set("' + label + 'Bool", self.parent.' + label + 'Bool)')
|
||||
# self.parent.label_order = '1345'
|
||||
# settings.set('label_order', self.parent.label_order)
|
||||
|
||||
for order in self.parent.label_order:
|
||||
if (order == "1"):
|
||||
|
@ -1,12 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
||||
class ToolTip:
|
||||
def __init__(self, parent):
|
||||
"""class definition"""
|
||||
self.parent = parent
|
||||
|
||||
|
||||
def createToolTip(self):
|
||||
"""function to create tool tip for label"""
|
Reference in New Issue
Block a user