diff -Nru indicator-prayer-times-0.30~ubuntu14.04.1/configer.py indicator-prayer-times-0.31~ubuntu14.04.1/configer.py --- indicator-prayer-times-0.30~ubuntu14.04.1/configer.py 2013-11-10 19:43:21.000000000 +0000 +++ indicator-prayer-times-0.31~ubuntu14.04.1/configer.py 2013-11-16 03:00:57.000000000 +0000 @@ -10,10 +10,10 @@ super(Configer, self).__init__() self.handler = Handler() self.set_modal(True) - self.set_title('Settings') + self.set_title('Indicator prayer times preferences') self.set_resizable(False) - #self.set_default_size(400,300) self.set_position(Gtk.WindowPosition.CENTER_ALWAYS) + self.set_border_width(5) self.options = self.GetOptions() self.connect('destroy', self.destroy_window) @@ -21,94 +21,104 @@ print "DEBUG: initializing configuration dialog @%s" % (str(datetime.datetime.now())) mainbox = Gtk.Box() mainbox.set_orientation(Gtk.Orientation.VERTICAL) - notebook = Gtk.Notebook() + notebook = Gtk.Notebook(border_width=5) ##Tab 1 tab1label = Gtk.Label('City options') - table = Gtk.Table() + table = Gtk.Table(border_width=5) table.resize(4, 2) #City name defaultcity = self.options['city'] - citylabel = Gtk.Label('Choose Your City') + citylabel = Gtk.Label('Choose Your City:', xalign=0) self.cityentry = Gtk.Entry() self.cityentry.set_text('%s' % defaultcity) - self.fetchbtn = Gtk.Button("Get Coordinates") + self.fetchbtn = Gtk.Button("Fetch") self.fetchbtn.connect('clicked', self.on_click_fetch) - table.attach(citylabel, 0, 1, 0, 1, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) - table.attach(self.cityentry, 1, 2, 0, 1, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) - table.attach(self.fetchbtn, 2, 3, 0, 1, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) + table.attach(citylabel, 0, 1, 0, 1, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0 ,10) + table.attach(self.cityentry, 1, 2, 0, 1, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 10 ,10) + table.attach(self.fetchbtn, 2, 3, 0, 1, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0 ,10) #Latitude hbox1 = Gtk.Box() defaultlatitude = self.options['city_lat'] - latlabel = Gtk.Label('Latitude') + latlabel = Gtk.Label('Latitude:', xalign=0) latadj = Gtk.Adjustment(value=0, lower=-90, upper=90, step_incr=0.01, page_incr=1, page_size=1) self.latentry = Gtk.SpinButton(adjustment=latadj, digits=3) self.latentry.set_value(float(defaultlatitude)) - table.attach(latlabel, 0, 1, 1, 2, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) - table.attach(self.latentry, 1, 2, 1, 2, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) + table.attach(latlabel, 0, 1, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0 ,10) + table.attach(self.latentry, 1, 2, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 10 ,10) #Longitude hbox2 = Gtk.Box() defaultlong = self.options['city_lon'] - longlabel = Gtk.Label("Longitude") + longlabel = Gtk.Label("Longitude:", xalign=0) lngadj = Gtk.Adjustment(value=0, lower=-180, upper=180, step_incr=0.01, page_incr=1, page_size=1) self.longentry = Gtk.SpinButton(adjustment=lngadj, digits=3) self.longentry.set_value(float(defaultlong)) - table.attach(longlabel, 0, 1, 2, 3, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) - table.attach(self.longentry, 1, 2, 2, 3, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) + table.attach(longlabel, 0, 1, 2, 3, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0 ,10) + table.attach(self.longentry, 1, 2, 2, 3, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 10 ,10) tab1child = table #TimeZone hbox3 = Gtk.Box() defaulttz = self.options['city_tz'] tzadj = Gtk.Adjustment(value=0, lower=-12, upper=12, step_incr=1, page_incr=1, page_size=0) - tzlabel = Gtk.Label('Time Zone') + tzlabel = Gtk.Label('Time Zone:', xalign=0) self.tzentry = Gtk.SpinButton(adjustment=tzadj) self.tzentry.set_value(float(defaulttz)) - table.attach(tzlabel, 0, 1, 3, 4, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) - table.attach(self.tzentry, 1, 2, 3, 4, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) + table.attach(tzlabel, 0, 1, 3, 4, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0 ,10) + table.attach(self.tzentry, 1, 2, 3, 4, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 10 ,10) ##Tab2 tab2label = Gtk.Label('Other Options') - table = Gtk.Table() + table = Gtk.Table(border_width=5) #Cal Method hbox3 = Gtk.Box() defaultmethod = self.options['cal_method_name'] methods = self.handler.GetCalMethods() - calmethodlabel = Gtk.Label('Calculation Method:') - self.methodsmenu = Gtk.ComboBoxText() + calmethodlabel = Gtk.Label('Calculation Method:', xalign=0) + self.methodsmenu = Gtk.ComboBoxText(width_request=12) for method in methods: self.methodsmenu.append(method, method) self.methodsmenu.set_active(methods.index(defaultmethod)) - table.attach(calmethodlabel, 0, 1, 0, 1, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) - table.attach(self.methodsmenu, 1, 2, 0, 1, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) + table.attach(calmethodlabel, 0, 1, 0, 1, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0 ,10) + table.attach(self.methodsmenu, 1, 2, 0, 1, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 30 ,10) #Mazhab hbox4 = Gtk.Box() defaultmazhab = self.options['mazhab_name'] - mazhablabel = Gtk.Label('Mazhab:') + mazhablabel = Gtk.Label('Mazhab:', xalign=0) mazaheb = self.handler.GetMazaheb() self.mazahebmenu = Gtk.ComboBoxText() for mazhab in mazaheb: self.mazahebmenu.append(mazhab, mazhab) self.mazahebmenu.set_active(mazaheb.index(defaultmazhab)) - table.attach(mazhablabel, 0, 1, 1, 2, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) - table.attach(self.mazahebmenu, 1, 2, 1, 2, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) + table.attach(mazhablabel, 0, 1, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0 ,10) + table.attach(self.mazahebmenu, 1, 2, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 30 ,10) #Clock Format hbox5 = Gtk.Box() defaultcf = self.options['hourfmt'] clockformats = self.handler.GetClockFormats() - cflabel = Gtk.Label('Clock Format:') + cflabel = Gtk.Label('Clock Format:', xalign=0) self.cfmenu = Gtk.ComboBoxText() for cf in clockformats: self.cfmenu.append(cf, cf) self.cfmenu.set_active(clockformats.index(defaultcf)) - table.attach(cflabel, 0, 1, 2, 3, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) - table.attach(self.cfmenu, 1, 2, 2, 3, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) + table.attach(cflabel, 0, 1, 2, 3, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0 ,10) + table.attach(self.cfmenu, 1, 2, 2, 3, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 30 ,10) #Notification Time hbox6 = Gtk.Box() defaultvalue = self.options['notif'] - ntlabel = Gtk.Label('Time before notification:') + ntlabel = Gtk.Label('Time before notification:',xalign=0) notifadj = Gtk.Adjustment(value=0, lower=5, upper=60, step_incr=1, page_incr=1, page_size=0) self.ntvalue=Gtk.SpinButton(adjustment=notifadj) self.ntvalue.set_value(float(defaultvalue)) - table.attach(ntlabel, 0, 1, 3, 4, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) - table.attach(self.ntvalue, 1, 2, 3, 4, Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.EXPAND, 10 ,10) + table.attach(ntlabel, 0, 1, 3, 4, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0 ,10) + table.attach(self.ntvalue, 1, 2, 3, 4, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 30 ,10) + #Show with Icon + hbox7 = Gtk.Box() + showstat = self.options['iconlabel'] + silabel = Gtk.Label('Show Time left with Icon',xalign=0) + self.sivalue=Gtk.Switch() + if showstat==1: self.m=True + if showstat==0: self.m=False + self.sivalue.set_active(self.m) + table.attach(silabel, 0, 1, 4, 5, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0 ,10) + table.attach(self.sivalue, 1, 2, 4, 5, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 30 ,10) tab2child = table #Notebook notebook.append_page(tab1child, tab1label) @@ -148,6 +158,9 @@ self.options['city_lon'] = self.longentry.get_value() self.options['city_tz'] = self.tzentry.get_value() self.options['notif'] = str(self.ntvalue.get_value()) + if self.sivalue.get_active() == True: self.b=1 + if self.sivalue.get_active() == False: self.b=0 + self.options['iconlabel'] = self.b print self.options self.handler.SaveOptions(self.options) self.hide() @@ -180,7 +193,7 @@ self.okbutton.set_sensitive(False) else: self.okbutton.set_sensitive(True) - self.fetchbtn.set_label("Get Coordinates") + self.fetchbtn.set_label("Fetch") self.fetchbtn.set_sensitive(True) self.cityentry.set_text('%s' % data["results"][0]['formatted_address']) self.latentry.set_value(float(data["results"][0]['geometry']['location']['lat'])) diff -Nru indicator-prayer-times-0.30~ubuntu14.04.1/debian/bzr-builder.manifest indicator-prayer-times-0.31~ubuntu14.04.1/debian/bzr-builder.manifest --- indicator-prayer-times-0.30~ubuntu14.04.1/debian/bzr-builder.manifest 2013-11-10 19:43:22.000000000 +0000 +++ indicator-prayer-times-0.31~ubuntu14.04.1/debian/bzr-builder.manifest 2013-11-16 03:00:58.000000000 +0000 @@ -1,3 +1,3 @@ -# bzr-builder format 0.3 deb-version 0.30 -lp:indicator-prayer-times revid:m.alaa8@gmail.com-20131110185911-l2o7eyznph7uv7gs -nest packaging lp:~ipt-dev/indicator-prayer-times/packaging-branch debian revid:m-alaa8@ubuntu.com.-20130830153856-64t3vi95dxkrb8mo +# bzr-builder format 0.3 deb-version 0.31 +lp:indicator-prayer-times revid:m.alaa8@gmail.com-20131115093813-wkowgigfo26dw2h6 +nest packaging lp:~ipt-dev/indicator-prayer-times/packaging-branch debian revid:m.alaa8@gmail.com-20131115220450-wmbo9ot3x30rj36c diff -Nru indicator-prayer-times-0.30~ubuntu14.04.1/debian/changelog indicator-prayer-times-0.31~ubuntu14.04.1/debian/changelog --- indicator-prayer-times-0.30~ubuntu14.04.1/debian/changelog 2013-11-10 19:43:22.000000000 +0000 +++ indicator-prayer-times-0.31~ubuntu14.04.1/debian/changelog 2013-11-16 03:00:58.000000000 +0000 @@ -1,11 +1,6 @@ -indicator-prayer-times (0.30~ubuntu14.04.1) trusty; urgency=low +indicator-prayer-times (0.31~ubuntu14.04.1) trusty; urgency=low * Auto build. - -- indicator-prayer-times Developers Sun, 10 Nov 2013 19:43:22 +0000 + -- indicator-prayer-times Developers Sat, 16 Nov 2013 03:00:58 +0000 -indicator-prayer-times (0.2-1) unstable; urgency=low - - * Initial release (Closes: #nnnn) - - -- Mohamed Alaa Thu, 16 Feb 2012 17:10:29 +0300 diff -Nru indicator-prayer-times-0.30~ubuntu14.04.1/debian/control indicator-prayer-times-0.31~ubuntu14.04.1/debian/control --- indicator-prayer-times-0.30~ubuntu14.04.1/debian/control 2013-11-10 19:43:22.000000000 +0000 +++ indicator-prayer-times-0.31~ubuntu14.04.1/debian/control 2013-11-16 03:00:58.000000000 +0000 @@ -18,6 +18,6 @@ gir1.2-notify-0.7, ${misc:Depends}, ${python:Depends} -Description: indicator that displays islamic prayer times - indicator prayer times displays information about islamic prayer times, Qibla and displays notifications befor prayers. - It is implemented using the Indicator Applet API. +Description: Indicator that displays islamic prayer times. + Indicator Prayer Times is a lightweight and small application for ubuntu that indicates muslims when they should pray. + It runs in background as a Indicator applet in unity and a tray icon in other Desktops, It reminds users of daily prayer times, shows Qibla directions and Displays Hijri date and many other featuers. \ No newline at end of file diff -Nru indicator-prayer-times-0.30~ubuntu14.04.1/debian/copyright indicator-prayer-times-0.31~ubuntu14.04.1/debian/copyright --- indicator-prayer-times-0.30~ubuntu14.04.1/debian/copyright 2013-11-10 19:43:22.000000000 +0000 +++ indicator-prayer-times-0.31~ubuntu14.04.1/debian/copyright 2013-11-16 03:00:58.000000000 +0000 @@ -3,8 +3,8 @@ Source: http://launchpad.net/indicator-prayer-times Files: * -Copyright: 2011-2012 Mohamed Alaa - 2012 indicator-prayer-times Developers +Copyright: 2011-2013 Mohamed Alaa + 2012-2013 indicator-prayer-times Developers License: GPL-3.0+ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru indicator-prayer-times-0.30~ubuntu14.04.1/handler.py indicator-prayer-times-0.31~ubuntu14.04.1/handler.py --- indicator-prayer-times-0.30~ubuntu14.04.1/handler.py 2013-11-10 19:43:21.000000000 +0000 +++ indicator-prayer-times-0.31~ubuntu14.04.1/handler.py 2013-11-16 03:00:57.000000000 +0000 @@ -35,6 +35,7 @@ city_lon = float(cparse.get('DEFAULT','longitude')) city_tz = float(cparse.get('DEFAULT','timezone')) notif = float(cparse.get('DEFAULT','notif')) + iconlabel = float(cparse.get('DEFAULT','iconlabel')) if calcmthdname == 'UmmAlQuraUniv': calcmthd=Calendar.UmmAlQuraUniv if calcmthdname == 'EgyptianGeneralAuthorityOfSurvey': @@ -58,6 +59,7 @@ options['mazhab_name'] = mazhabname options['hourfmt'] = hourfmt options['notif'] = notif + options['iconlabel'] = iconlabel return options except ConfigParser.NoOptionError: print "DEBUG: No configration file using default settings" @@ -69,6 +71,7 @@ options['mazhab_name'] = 'Default' options['hourfmt'] = '24h' options['notif'] = '10' + options['iconlabel'] = '1' self.SaveOptions(options) return options except ValueError: @@ -82,6 +85,7 @@ options['mazhab_name'] = 'Default' options['hourfmt'] = '24h' options['notif'] = '10' + options['iconlabel'] = '1' self.SaveOptions(options) return options @@ -116,8 +120,9 @@ latitude = %s longitude = %s timezone = %s -notif = %s''' % (options['city'],options['cal_method_name'], options['mazhab_name'], options['hourfmt'], options['city_lat'], - options['city_lon'],options['city_tz'], options['notif']) +notif = %s +iconlabel = %s''' % (options['city'],options['cal_method_name'], options['mazhab_name'], options['hourfmt'], options['city_lat'], + options['city_lon'],options['city_tz'], options['notif'], options['iconlabel']) config.write(Text) config.close() diff -Nru indicator-prayer-times-0.30~ubuntu14.04.1/indicator-prayer-times indicator-prayer-times-0.31~ubuntu14.04.1/indicator-prayer-times --- indicator-prayer-times-0.30~ubuntu14.04.1/indicator-prayer-times 2013-11-10 19:43:21.000000000 +0000 +++ indicator-prayer-times-0.31~ubuntu14.04.1/indicator-prayer-times 2013-11-16 03:00:57.000000000 +0000 @@ -139,8 +139,11 @@ TimeToNextPrayer=NextPrayerDT-Time# Calculate Time to The Next Prayer if TimeToNextPrayer.total_seconds() > 0: self.NextPrayerItem.set_label("%s until %s" % (self.secs_to_hrtime(TimeToNextPrayer.seconds), NextPrayer)) + if self.GetSettings(8) == '1': + self.Indicator.set_label(("%s-%s" % (NextPrayer, (self.secs_to_nrtime(TimeToNextPrayer.seconds)))),"") if TimeToNextPrayer.total_seconds() < 0: self.NextPrayerItem.set_label("Previous Prayer was %s" % (PrevPrayer)) + for time in PrayerTimes: if time == NotifTime:# Notification Notify.init("Indicator Prayer Times") @@ -158,6 +161,10 @@ def secs_to_hrtime(self, secs): # Transform Seconds into Hours and Minutes return str(secs//3600)+" Hours and "+str(((secs//60)%60))+" Minutes" + + def secs_to_nrtime(self, secs): + # Transform Seconds into Hours and Minutes + return str(secs//3600)+":"+str(((secs//60)%60)) def Icon(self):# Get Icon print "DEBUG: getting Icons @%s" % (str(datetime.datetime.now())) @@ -274,6 +281,7 @@ city_lon = float(cparse.get('DEFAULT','longitude')) city_tz = float(cparse.get('DEFAULT','timezone')) notif = float(cparse.get('DEFAULT','notif')) + iconlabel= cparse.get('DEFAULT','iconlabel') if calcmthd == 'UmmAlQuraUniv': calcmthd=Calendar.UmmAlQuraUniv if calcmthd == 'EgyptianGeneralAuthorityOfSurvey': @@ -289,21 +297,21 @@ mazhab=Mazhab.Default if mazhab == 'Hanafi': mazhab=Mazhab.Hanafi - s=[city,city_lat,city_lon,city_tz,calcmthd,mazhab,hourfmt,notif] + s=[city,city_lat,city_lon,city_tz,calcmthd,mazhab,hourfmt,notif,iconlabel] return s[data] except ConfigParser.NoOptionError: print "DEBUG: no settings file found! using default settings @%s" % (str(datetime.datetime.now())) - self.SaveConfig('Makkah', 21.25, 39.49, 3, 'UmmAlQuraUniv', 'Default', '24h','10') - s=['Makkah', 21.25, 39.49, 3, 'UmmAlQuraUniv', 'Default', '24h','10'] + self.SaveConfig('Makkah', 21.25, 39.49, 3, 'UmmAlQuraUniv', 'Default', '24h','10',1) + s=['Makkah', 21.25, 39.49, 3, 'UmmAlQuraUniv', 'Default', '24h','10','1'] return s[data] except ValueError: os.system("rm ~/.indicator-prayer-times") print "DEBUG: Problem while reading settings file! using default settings @%s" % (str(datetime.datetime.now())) - self.SaveConfig('Makkah', 21.25, 39.49, 3, 'UmmAlQuraUniv', 'Default', '24h','10') - s=['Makkah', 21.25, 39.49, 3, 'UmmAlQuraUniv', 'Default', '24h','10'] + self.SaveConfig('Makkah', 21.25, 39.49, 3, 'UmmAlQuraUniv', 'Default', '24h','10','1') + s=['Makkah', 21.25, 39.49, 3, 'UmmAlQuraUniv', 'Default', '24h','10','1'] return s[data] - def SaveConfig(self,city_name,lat,lon,tz,calcmthd,mazhab,clockfmt):# Save Configuration File + def SaveConfig(self,city_name,lat,lon,tz,calcmthd,mazhab,clockfmt,notif,iconlabel):# Save Configuration File print "DEBUG: saving settings @%s" % (str(datetime.datetime.now())) config = open(os.path.expanduser('~/.indicator-prayer-times'), 'w') Text='''# Indicator-Prayer-Times Settings File @@ -334,7 +342,8 @@ latitude = %s longitude = %s timezone = %s -notif = %s''' % (city_name,calcmthd,mazhab,clockfmt,lat,lon,tz,notif) +notif = %s +iconlabel = %s''' % (city_name,calcmthd,mazhab,clockfmt,lat,lon,tz,notif,iconlabel) config.write(Text) config.close() @@ -380,7 +389,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see .''') - AboutDialog.set_version("0.30") + AboutDialog.set_version("0.31") AboutDialog.set_comments("A Prayer Times displayer for Indicator Applet.") AboutDialog.set_copyright("Copyright © 2011-2013 Mohamed Alaa\nCopyright © 2012-2013 Indicator-prayer-times Developers") AboutDialog.run() diff -Nru indicator-prayer-times-0.30~ubuntu14.04.1/setup.py indicator-prayer-times-0.31~ubuntu14.04.1/setup.py --- indicator-prayer-times-0.30~ubuntu14.04.1/setup.py 2013-11-10 19:43:21.000000000 +0000 +++ indicator-prayer-times-0.31~ubuntu14.04.1/setup.py 2013-11-16 03:00:57.000000000 +0000 @@ -1,7 +1,7 @@ from distutils.core import setup setup(name='indicator-prayer-times', - version='0.2', + version='0.31', description='A Prayer Times displayer for Indicator Applet.', author='indicator-prayer-times developers', py_modules=['prayertime','HijriCal','hijra','configer','handler'],