Added calendard plus changed launcher options
This commit is contained in:
parent
c78839f440
commit
5e2dd7ca3d
Binary file not shown.
|
@ -255,14 +255,22 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="timeLabel">
|
||||
<property name="width_request">126</property>
|
||||
<object class="GtkEventBox" id="timeLabelEveBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
<attributes>
|
||||
<attribute name="scale" value="1.5"/>
|
||||
</attributes>
|
||||
<property name="above_child">True</property>
|
||||
<signal name="button-release-event" handler="toggleCalPopover" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkLabel" id="timeLabel">
|
||||
<property name="width_request">126</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
<attributes>
|
||||
<attribute name="scale" value="1.5"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -280,6 +288,22 @@
|
|||
</object>
|
||||
</child>
|
||||
</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">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
|
|
|
@ -19,9 +19,7 @@ class CrossClassSignals:
|
|||
# Displays Timer
|
||||
def displayclock(self):
|
||||
now = datetime.now()
|
||||
|
||||
# timeStr = now.strftime("%H:%M %m/%d/%y")
|
||||
timeStr = now.strftime("%I:%M %p %m/%d/%y")
|
||||
timeStr = now.strftime("%I:%M %p %m/%d/%Y")
|
||||
self.timeLabel.set_label(timeStr)
|
||||
return True
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ class DrawSignals:
|
|||
ah = area.get_allocated_height()
|
||||
self.aw = aw
|
||||
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.surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, aw, ah)
|
||||
self.brush = cairo.Context(self.surface)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Python imports
|
||||
import threading
|
||||
from datetime import datetime
|
||||
|
||||
# Gtk imports
|
||||
import gi
|
||||
|
@ -24,6 +25,23 @@ class TaskbarSignals:
|
|||
self.setPagerWidget()
|
||||
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):
|
||||
pager = wnck.Pager()
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -62,7 +62,7 @@ class FileHandler:
|
|||
else: # Create Folder
|
||||
os.mkdir(name)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print( repr(e) )
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
@ -86,7 +86,7 @@ class FileHandler:
|
|||
shutil.move(finalForm, toPath)
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print( repr(e) )
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
@ -106,7 +106,7 @@ class FileHandler:
|
|||
return 1
|
||||
except Exception as e:
|
||||
print("An error occured deleting the file:")
|
||||
print(e)
|
||||
print( repr(e) )
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
@ -129,7 +129,7 @@ class FileHandler:
|
|||
print("The folder/file does not exist")
|
||||
return 1
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print( repr(e) )
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
@ -144,7 +144,7 @@ class FileHandler:
|
|||
print("The folder/file does not exist")
|
||||
return 1
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print( repr(e) )
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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