From 9cb2b747090990fc2301c6b64ef521892ab2644f Mon Sep 17 00:00:00 2001 From: necoro <> Date: Tue, 24 Apr 2007 20:23:54 +0000 Subject: add application icon and desktop file --- doc/AUTHORS | 2 ++ icons/portato-icon.png | Bin 0 -> 5265 bytes portato/constants.py | 3 +++ portato/gui/gtk/windows.py | 5 +++-- portato/gui/qt/windows.py | 5 +++-- portato_gtk.desktop | 7 +++++++ portato_qt.desktop | 7 +++++++ 7 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 icons/portato-icon.png create mode 100644 portato_gtk.desktop create mode 100644 portato_qt.desktop diff --git a/doc/AUTHORS b/doc/AUTHORS index 205e27c..eddf876 100644 --- a/doc/AUTHORS +++ b/doc/AUTHORS @@ -1,4 +1,6 @@ Main author: René 'Necoro' Neumann +Application icon: wolfden + Shipped with code from: - Daniel J. Popowich (TreeViewTooltips) diff --git a/icons/portato-icon.png b/icons/portato-icon.png new file mode 100644 index 0000000..59d7441 Binary files /dev/null and b/icons/portato-icon.png differ diff --git a/portato/constants.py b/portato/constants.py index 9b01eb8..126d5c8 100644 --- a/portato/constants.py +++ b/portato/constants.py @@ -17,5 +17,8 @@ DATA_DIR = "portato/gui/templates/" PLUGIN_DIR = "plugins/" VERSION = 9999 +ICON_DIR = "icons/" +APP_ICON = ICON_DIR+"/portato-icon.png" + FRONTENDS = ["gtk" ,"qt"] STD_FRONTEND = "gtk" diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py index 12b7a58..88d9a18 100644 --- a/portato/gui/gtk/windows.py +++ b/portato/gui/gtk/windows.py @@ -19,7 +19,7 @@ import gobject # our backend stuff from portato.helper import * -from portato.constants import CONFIG_LOCATION, VERSION, DATA_DIR +from portato.constants import CONFIG_LOCATION, VERSION, DATA_DIR, APP_ICON from portato.backend import flags, system from portato.backend.exceptions import * @@ -42,6 +42,7 @@ class Window: self.tree = gtk.glade.XML(GLADE_FILE, root = self.__class__.__name__) self.tree.signal_autoconnect(self) self.window = self.tree.get_widget(self.__class__.__name__) + self.window.set_icon_from_file(APP_ICON) @staticmethod def watch_cursor (func): @@ -115,7 +116,7 @@ A Portage-GUI This software is licensed under the terms of the GPLv2. Copyright (C) 2006-2007 René 'Necoro' Neumann <necoro@necoro.net> -Thanks to Fred for support and ideas :P +Icon created by wolfden """ % VERSION) view = self.tree.get_widget("pluginList") diff --git a/portato/gui/qt/windows.py b/portato/gui/qt/windows.py index edb1873..420b9e1 100644 --- a/portato/gui/qt/windows.py +++ b/portato/gui/qt/windows.py @@ -16,7 +16,7 @@ import sip # our backend stuff from portato.helper import * -from portato.constants import CONFIG_LOCATION, VERSION, DATA_DIR +from portato.constants import CONFIG_LOCATION, VERSION, DATA_DIR, APP_ICON from portato.backend import flags, system from portato.backend.exceptions import * @@ -60,6 +60,7 @@ class Window (object): def __init__(self, parent = None): self._qt_base.__init__(self, parent) self.setupUi(self) + self.setWindowIcon(Qt.QIcon(APP_ICON)) @staticmethod def watch_cursor (func): @@ -98,7 +99,7 @@ A Portage-GUI
This software is licensed under the terms of the GPLv2.
Copyright (C) 2006-2007 René 'Necoro' Neumann <necoro@necoro.net>

-Thanks to Fred for support and ideas :P""" % VERSION) +Icon created by wolfden""" % VERSION) self.pluginList.setHeaderLabels(["Plugin", "Author"]) diff --git a/portato_gtk.desktop b/portato_gtk.desktop new file mode 100644 index 0000000..3bbe12c --- /dev/null +++ b/portato_gtk.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Portato (Gtk) +Icon=portato-icon.png +Exec=portato gtk +StartupNotify=true +Type=Application +Categories=Application;System;PackageManager diff --git a/portato_qt.desktop b/portato_qt.desktop new file mode 100644 index 0000000..cf4d466 --- /dev/null +++ b/portato_qt.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Portato (Qt) +Icon=portato-icon.png +Exec=portato qt +StartupNotify=true +Type=Application +Categories=Application;System;PackageManager -- cgit v1.2.3