Added calendard plus changed launcher options
This commit is contained in:
parent
c78839f440
commit
5e2dd7ca3d
Binary file not shown.
0
src/Pytop/PyTop.py
Executable file → Normal file
0
src/Pytop/PyTop.py
Executable file → Normal file
0
src/Pytop/PyTop.sh
Executable file → Normal file
0
src/Pytop/PyTop.sh
Executable file → Normal file
@ -254,6 +254,12 @@
|
|||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEventBox" id="timeLabelEveBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="above_child">True</property>
|
||||||
|
<signal name="button-release-event" handler="toggleCalPopover" swapped="no"/>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="timeLabel">
|
<object class="GtkLabel" id="timeLabel">
|
||||||
<property name="width_request">126</property>
|
<property name="width_request">126</property>
|
||||||
@ -264,6 +270,8 @@
|
|||||||
<attribute name="scale" value="1.5"/>
|
<attribute name="scale" value="1.5"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
@ -280,6 +288,22 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="GtkPopover" id="calendarPopup">
|
||||||
|
<property name="width_request">420</property>
|
||||||
|
<property name="height_request">225</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="relative_to">timeLabelEveBox</property>
|
||||||
|
<property name="modal">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCalendar" id="calendarWid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="year">2020</property>
|
||||||
|
<property name="month">3</property>
|
||||||
|
<property name="day">22</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
<object class="GtkImage" id="createImage">
|
<object class="GtkImage" id="createImage">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
@ -19,9 +19,7 @@ class CrossClassSignals:
|
|||||||
# Displays Timer
|
# Displays Timer
|
||||||
def displayclock(self):
|
def displayclock(self):
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
|
timeStr = now.strftime("%I:%M %p %m/%d/%Y")
|
||||||
# timeStr = now.strftime("%H:%M %m/%d/%y")
|
|
||||||
timeStr = now.strftime("%I:%M %p %m/%d/%y")
|
|
||||||
self.timeLabel.set_label(timeStr)
|
self.timeLabel.set_label(timeStr)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
2
src/Pytop/signal_classes/DrawSignals.py
Executable file → Normal file
2
src/Pytop/signal_classes/DrawSignals.py
Executable file → Normal file
@ -111,7 +111,7 @@ class DrawSignals:
|
|||||||
ah = area.get_allocated_height()
|
ah = area.get_allocated_height()
|
||||||
self.aw = aw
|
self.aw = aw
|
||||||
self.ah = ah
|
self.ah = ah
|
||||||
self.xStep = aw / 200 # For x-axis
|
self.xStep = aw / 200 # For x-axis 60 * 2 per 1 sec steps
|
||||||
self.yStep = ah / 100 # For y-axis %s
|
self.yStep = ah / 100 # For y-axis %s
|
||||||
self.surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, aw, ah)
|
self.surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, aw, ah)
|
||||||
self.brush = cairo.Context(self.surface)
|
self.brush = cairo.Context(self.surface)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Python imports
|
# Python imports
|
||||||
import threading
|
import threading
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
# Gtk imports
|
# Gtk imports
|
||||||
import gi
|
import gi
|
||||||
@ -24,6 +25,23 @@ class TaskbarSignals:
|
|||||||
self.setPagerWidget()
|
self.setPagerWidget()
|
||||||
self.setTasklistWidget()
|
self.setTasklistWidget()
|
||||||
|
|
||||||
|
def toggleCalPopover(self, widget, eve):
|
||||||
|
calendarPopup = self.builder.get_object('calendarPopup')
|
||||||
|
if (calendarPopup.get_visible() == False):
|
||||||
|
calendarWid = self.builder.get_object('calendarWid')
|
||||||
|
now = datetime.now()
|
||||||
|
timeStr = now.strftime("%m/%d/%Y")
|
||||||
|
parts = timeStr.split("/")
|
||||||
|
month = int(parts[0])
|
||||||
|
day = int(parts[1])
|
||||||
|
year = int(parts[2])
|
||||||
|
calendarWid.select_day(day)
|
||||||
|
calendarWid.select_month(month, year)
|
||||||
|
calendarPopup.popup()
|
||||||
|
else:
|
||||||
|
calendarPopup.popdown()
|
||||||
|
|
||||||
|
|
||||||
def setPagerWidget(self):
|
def setPagerWidget(self):
|
||||||
pager = wnck.Pager()
|
pager = wnck.Pager()
|
||||||
|
|
||||||
|
Binary file not shown.
BIN
src/Pytop/signal_classes/__pycache__/GridSignals.cpython-36.pyc
Normal file
BIN
src/Pytop/signal_classes/__pycache__/GridSignals.cpython-36.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/Pytop/signal_classes/__pycache__/__init__.cpython-36.pyc
Normal file
BIN
src/Pytop/signal_classes/__pycache__/__init__.cpython-36.pyc
Normal file
Binary file not shown.
@ -62,7 +62,7 @@ class FileHandler:
|
|||||||
else: # Create Folder
|
else: # Create Folder
|
||||||
os.mkdir(name)
|
os.mkdir(name)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print( repr(e) )
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -86,7 +86,7 @@ class FileHandler:
|
|||||||
shutil.move(finalForm, toPath)
|
shutil.move(finalForm, toPath)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print( repr(e) )
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -106,7 +106,7 @@ class FileHandler:
|
|||||||
return 1
|
return 1
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("An error occured deleting the file:")
|
print("An error occured deleting the file:")
|
||||||
print(e)
|
print( repr(e) )
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -129,7 +129,7 @@ class FileHandler:
|
|||||||
print("The folder/file does not exist")
|
print("The folder/file does not exist")
|
||||||
return 1
|
return 1
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print( repr(e) )
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -144,7 +144,7 @@ class FileHandler:
|
|||||||
print("The folder/file does not exist")
|
print("The folder/file does not exist")
|
||||||
return 1
|
return 1
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print( repr(e) )
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
BIN
src/Pytop/utils/__pycache__/Dragging.cpython-36.pyc
Normal file
BIN
src/Pytop/utils/__pycache__/Dragging.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/utils/__pycache__/FileHandler.cpython-36.pyc
Normal file
BIN
src/Pytop/utils/__pycache__/FileHandler.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/utils/__pycache__/Settings.cpython-36.pyc
Normal file
BIN
src/Pytop/utils/__pycache__/Settings.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/utils/__pycache__/__init__.cpython-36.pyc
Normal file
BIN
src/Pytop/utils/__pycache__/__init__.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/widgets/__pycache__/Grid.cpython-36.pyc
Normal file
BIN
src/Pytop/widgets/__pycache__/Grid.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/widgets/__pycache__/Icon.cpython-36.pyc
Normal file
BIN
src/Pytop/widgets/__pycache__/Icon.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/widgets/__pycache__/__init__.cpython-36.pyc
Normal file
BIN
src/Pytop/widgets/__pycache__/__init__.cpython-36.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user