[gnome-clocks] Move gnome_clocks.py to gnome-clocks
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] Move gnome_clocks.py to gnome-clocks
- Date: Thu, 16 Aug 2012 12:19:19 +0000 (UTC)
commit 950d8cb2cb6a09eabc122279c741470e309f9659
Author: Paolo Borelli <pborelli gnome org>
Date: Tue Aug 14 22:17:14 2012 +0200
Move gnome_clocks.py to gnome-clocks
Using the dash and omitting the .py suffix is more customary for a
system-wide command. Also move out of the gnomeclocks subdir since this
is the "main" that uses that python module (this makes our life easier
to install things)
https://bugzilla.gnome.org/show_bug.cgi?id=681883
gnomeclocks/gnome_clocks.py => gnome-clocks | 10 +++++-----
gnomeclocks/widgets.py | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gnomeclocks/gnome_clocks.py b/gnome-clocks
similarity index 98%
rename from gnomeclocks/gnome_clocks.py
rename to gnome-clocks
index 887a374..9f4f7f5 100755
--- a/gnomeclocks/gnome_clocks.py
+++ b/gnome-clocks
@@ -1,5 +1,6 @@
#! /usr/bin/env python
# -.- coding: utf-8 -.-
+
"""
Copyright (c) 2011-2012 Collabora, Ltd.
@@ -21,7 +22,7 @@
"""
from gi.repository import Gtk, Gio, GObject, Gdk
-from clocks import World, Alarm, Timer, Stopwatch
+from gnomeclocks.clocks import World, Alarm, Timer, Stopwatch
import sys
@@ -32,9 +33,9 @@ class Window (Gtk.ApplicationWindow):
self.set_wmclass("Clocks", "Clocks")
css_provider = Gtk.CssProvider()
- css_provider.load_from_path("../data/gtk-style.css")
+ css_provider.load_from_path("data/gtk-style.css")
#self.set_hide_titlebar_when_maximized (True)
- self.set_icon_from_file ('../data/preferences-system-time.png')
+ self.set_icon_from_file ('data/preferences-system-time.png')
context = Gtk.StyleContext()
context.add_provider_for_screen (Gdk.Screen.get_default (),
css_provider,
@@ -301,8 +302,7 @@ class Clocks(Gtk.Application):
quit_action.connect("activate", self.quit_cb)
self.add_action(quit_action)
-if __name__=="__main__":
+if __name__ == "__main__":
app = Clocks ()
exit_status = app.run(sys.argv)
sys.exit(exit_status)
-
diff --git a/gnomeclocks/__init__.py b/gnomeclocks/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/gnomeclocks/widgets.py b/gnomeclocks/widgets.py
index a8d8add..39d5893 100644
--- a/gnomeclocks/widgets.py
+++ b/gnomeclocks/widgets.py
@@ -138,9 +138,9 @@ class DigitalClock ():
def get_image(self):
local_time = self.get_local_time ()
if local_time.tm_hour > 7 and local_time.tm_hour < 19:
- return "../data/cities/day.png"
+ return "data/cities/day.png"
else:
- return "../data/cities/night.png"
+ return "data/cities/night.png"
def get_is_day(self):
local_time = self.get_local_time ()
@@ -321,9 +321,9 @@ class AlarmWidget():
t = time_given
isDay = self.get_is_day(t)
if isDay == True:
- img = "../data/cities/day.png"
+ img = "data/cities/day.png"
else:
- img = "../data/cities/night.png"
+ img = "data/cities/night.png"
self.drawing.render(t, img, isDay)
def get_system_clock_format(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]