From 8141110f016ec79c115a883645e818f48963b4c2 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 2 Jun 2009 21:15:21 -0500 Subject: [PATCH] Minor updates being taken in from Dialcentral --- Makefile | 1 + src/doneit_glade.py | 27 ++++++++++++++++----------- support/builddeb.py | 20 +++++++++++++------- support/doneit.desktop | 2 +- support/pylint.rc | 2 +- 5 files changed, 32 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index f95ae6f..0428544 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,7 @@ build: $(OBJ) $(foreach file, $(OBJ), cp $(file) $(BUILD_PATH)/$(subst /,-,$(file)) ; ) cp support/$(PROJECT_NAME).desktop $(BUILD_PATH) cp support/builddeb.py $(BUILD_PATH) + cp support/fake_py2deb.py $(BUILD_PATH) lint: $(OBJ) $(foreach file, $(SOURCE), $(LINT) $(file) ; ) diff --git a/src/doneit_glade.py b/src/doneit_glade.py index 6cd28d1..79b0ad3 100755 --- a/src/doneit_glade.py +++ b/src/doneit_glade.py @@ -5,16 +5,16 @@ @todo See Tasque for UI ideas http://live.gnome.org/Tasque/Screenshots """ -from __future__ import with_statement +from __future__ import with_statement import sys import gc import os import threading -import warnings import ConfigParser import socket +import warnings import gobject import gtk @@ -104,7 +104,7 @@ class DoneIt(object): os.path.join(os.path.dirname(__file__), "../lib/doneit.glade"), ] - _user_data = os.path.expanduser("~/.%s/" % __app_name__) + _user_data = os.path.join(os.path.expanduser("~"), ".%s" % __app_name__) _user_settings = "%s/settings.ini" % _user_data def __init__(self): @@ -139,11 +139,16 @@ class DoneIt(object): self._isFullScreen = False if hildon is not None: self._app = hildon.Program() + oldWindow = self.__window self.__window = hildon.Window() - self._widgetTree.get_widget("mainLayout").reparent(self.__window) + oldWindow.get_child().reparent(self.__window) self._app.add_window(self.__window) - self._widgetTree.get_widget("usernameentry").set_property('hildon-input-mode', 7) - self._widgetTree.get_widget("passwordentry").set_property('hildon-input-mode', 7|(1 << 29)) + + try: + self._widgetTree.get_widget("usernameentry").set_property('hildon-input-mode', 7) + self._widgetTree.get_widget("passwordentry").set_property('hildon-input-mode', 7|(1 << 29)) + except TypeError, e: + warnings.warn(e.message) gtkMenu = self._widgetTree.get_widget("mainMenubar") menu = gtk.Menu() @@ -157,17 +162,17 @@ class DoneIt(object): else: pass # warnings.warn("No Hildon", UserWarning, 2) + if hildon is None: + self.__window.set_title("%s" % self.__pretty_app_name__) + callbackMapping = { "on_doneit_quit": self._on_close, "on_about": self._on_about_activate, } self._widgetTree.signal_autoconnect(callbackMapping) - if self.__window: - if hildon is None: - self.__window.set_title("%s" % self.__pretty_app_name__) - self.__window.connect("destroy", self._on_close) - self.__window.show_all() + self.__window.connect("destroy", self._on_close) + self.__window.show_all() backgroundSetup = threading.Thread(target=self._idle_setup) backgroundSetup.setDaemon(True) diff --git a/support/builddeb.py b/support/builddeb.py index 44463d9..14be7b6 100755 --- a/support/builddeb.py +++ b/support/builddeb.py @@ -1,6 +1,12 @@ #!/usr/bin/python2.5 -from py2deb import * +import os +import sys + +try: + import py2deb +except ImportError: + import fake_py2deb as py2deb __appname__ = "doneit" @@ -37,9 +43,9 @@ __changelog__ = '''\ ''' -__postinstall__ = '''#!/bin/sh +__postinstall__ = '''#!/bin/sh -e -gtk-update-icon-cache /usr/share/icons/hicolor +gtk-update-icon-cache -f /usr/share/icons/hicolor ''' @@ -69,17 +75,17 @@ if __name__ == "__main__": except: pass - p = Py2deb(__appname__) + p = py2deb.Py2deb(__appname__) p.description = __description__ p.author = __author__ p.mail = __email__ p.license = "lgpl" - p.depends = "python2.5, python2.5-gtk2" + p.depends = "python2.5, python2.5-gtk2, python2.5-xml" p.section = "user/communication" p.arch = "all" p.urgency = "low" - p.distribution = "chinook diablo" - p.repository = "extras-devel" + p.distribution = "chinook diablo fremantle" + p.repository = "extras" p.changelog = __changelog__ p.postinstall = __postinstall__ p.icon="26x26-doneit.png" diff --git a/support/doneit.desktop b/support/doneit.desktop index 20a9e9a..0bde01f 100644 --- a/support/doneit.desktop +++ b/support/doneit.desktop @@ -3,5 +3,5 @@ Encoding=UTF-8 Version=1.0 Type=Application Name=DoneIt -Exec=/usr/bin/doneit.py +Exec=/usr/bin/run-standalone.sh /usr/bin/doneit.py Icon=doneit diff --git a/support/pylint.rc b/support/pylint.rc index 37b9725..2a371a1 100644 --- a/support/pylint.rc +++ b/support/pylint.rc @@ -53,7 +53,7 @@ load-plugins= #enable-msg= # Disable the message(s) with the given id(s). -disable-msg=W0403,W0612,W0613,C0103,C0111,C0301,R0903,W0142,W0603,R0904 +disable-msg=W0403,W0612,W0613,C0103,C0111,C0301,R0903,W0142,W0603,R0904,R0921,R0201 [REPORTS] -- 1.7.9.5