Skip to content

Commit 720651a

Browse files
committed
hot fixes, see changelog
1 parent eeef056 commit 720651a

14 files changed

+769
-74
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Silaty
2+
======
3+
4+
### v1.1-beta
5+
6+
* LICENSE added.
7+
* screenshots added.
8+
* README updated.
9+
* attempt to clean code.
10+
* GTK warnings fixed.
11+
* wrong time suffix (AM/PM) when using 12h clock format fixed.
12+
* switching between sidebar tabs from indicator menu fixed.
13+
* about tab added/implemented into sidebar.
14+
* set default window width to 540px (to fit settings tab width).
15+
* fixed a crash when closing the main window.
16+
* load notification icon from its path instead of using an icon name.
17+
* use default layout size, instead of settings a fixed window size.
18+
19+
### v1.0
20+
21+
* first release
22+

LICENSE

Lines changed: 675 additions & 21 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Silaty
33

44
A neat prayer reminder app in GTK
55

6-
![screenshot](Silaty.png)
6+
![screenshot](screenshots/Silaty.png)
7+
![screenshot](screenshots/Silaty_qibla.png)
8+
![screenshot](screenshots/Silaty_calendar.png)
79

810
## Installation
911

@@ -24,4 +26,4 @@ sudo ./uninstall.sh
2426

2527
## License
2628

27-
Silaty is licensed under the [MIT license](LICENSE).
29+
Silaty is licensed under the [GPL license](LICENSE).

Silaty.png

-17.6 KB
Binary file not shown.

prayertime.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,23 +276,27 @@ def calculate(self):
276276
for time in PrayerTimes:
277277
if time == NotifTime:
278278
Notify.init("Silaty")
279-
notif = Notify.Notification().new('Get Ready','%s minutes left until the %s prayer.' % (str(int(self.options.notification_time)),NextPrayer), 'silaty')
279+
notif = Notify.Notification.new('Get Ready', '%s minutes left until the %s prayer.' % (str(int(self.options.notification_time)), NextPrayer))
280+
icon = GdkPixbuf.Pixbuf.new_from_file(os.path.dirname(os.path.realpath(__file__)) + "/icons/hicolor/128x128/apps/silaty.svg")
281+
notif.set_icon_from_pixbuf(icon)
280282
notif.set_app_name('Silaty')
281283
notif.show()
282-
if time == Time:
284+
elif time == Time:
283285
Notify.init("Silaty")
284-
notif=Notify.Notification.new('Prayer time for %s' % CurrentPrayer,"It's time for the %s prayer." %(CurrentPrayer), 'silaty')
286+
notif = Notify.Notification.new('Prayer time for %s' % CurrentPrayer,"It's time for the %s prayer." %(CurrentPrayer))
287+
icon = GdkPixbuf.Pixbuf.new_from_file(os.path.dirname(os.path.realpath(__file__)) + "/icons/hicolor/128x128/apps/silaty.svg")
288+
notif.set_icon_from_pixbuf(icon)
285289

286290
if self.options.audio_notifications == True:
287291
if CurrentPrayer == 'Fajr':
288-
uri = "file://"+ os.path.dirname(os.path.realpath(__file__))+"/audio/Fajr/"+self.options.fajr_adhan+".ogg"
292+
uri = "file://"+ os.path.dirname(os.path.realpath(__file__))+"/audio/Fajr/"+self.options.fajr_adhan+".ogg"
289293
self.fajrplayer = Gst.ElementFactory.make("playbin", "player")
290294
fakesink = Gst.ElementFactory.make("fakesink", "fakesink")
291295
self.fajrplayer.set_property('uri', uri)
292296
self.fajrplayer.set_property("video-sink", fakesink)
293297
self.fajrplayer.set_state(Gst.State.PLAYING)
294298
else:
295-
uri = "file://"+ os.path.dirname(os.path.realpath(__file__))+"/audio/Normal/"+self.options.normal_adhan+".ogg"
299+
uri = "file://"+ os.path.dirname(os.path.realpath(__file__))+"/audio/Normal/"+self.options.normal_adhan+".ogg"
296300
self.normalplayer = Gst.ElementFactory.make("playbin", "player")
297301
fakesink = Gst.ElementFactory.make("fakesink", "fakesink")
298302
self.normalplayer.set_property('uri', uri)
@@ -361,10 +365,10 @@ def fill_zeros(time):
361365
def to_hrtime(var):
362366
"""var: double -> human readable string of format "%I:%M:%S %p" """
363367
time = ''
364-
hours = int(var) #cast var (initially a double) as an int
368+
hours = int(var) # cast var (initially a double) as an int
365369

366-
# If Division by 12 = 0, it's morning, else afternoon
367-
if hours // 12 == 0:
370+
# If Division by 24 = 0, it's morning, else afternoon
371+
if hours // 24 == 0:
368372
zone = "AM"
369373
else:
370374
zone = "PM"

screenshots/Silaty.png

222 KB
Loading

screenshots/Silaty_calendar.png

92 KB
Loading

screenshots/Silaty_notification.png

22.1 KB
Loading

screenshots/Silaty_qibla.png

109 KB
Loading

screenshots/Silaty_settings.png

825 KB
Loading

0 commit comments

Comments
 (0)