[kupfer] Use icon names from the Icon Naming Specification
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] Use icon names from the Icon Naming Specification
- Date: Mon, 31 May 2010 23:44:01 +0000 (UTC)
commit 343071801b96220617e9cc8d1e6be24ddac3a8cb
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Mon May 31 07:32:13 2010 +0200
Use icon names from the Icon Naming Specification
Using the icon naming specification, chances are higher that it looks
good across icon themes, including non-Gnome themes (even though many
themes still lack the high resolution icons that we need to look
good).
Starting with this change, "gtk-*" icon names are obsolete (when used
for KupferObject icons). This "reform" is not yet complete; notice how
some icons are still unresolved, notably "gtk-execute".
kupfer/obj/objects.py | 8 ++++----
kupfer/obj/special.py | 2 +-
kupfer/plugin/apt_tools.py | 6 +++---
kupfer/plugin/clipboard.py | 2 +-
kupfer/plugin/core/__init__.py | 4 ++--
kupfer/plugin/core/commands.py | 2 +-
kupfer/plugin/core/contents.py | 10 +++++-----
kupfer/plugin/favorites.py | 4 ++--
kupfer/plugin/gtg.py | 6 +++---
kupfer/plugin/locate.py | 8 ++++----
kupfer/plugin/notes.py | 7 ++-----
kupfer/plugin/show_text.py | 8 ++++----
kupfer/plugin/templates.py | 2 +-
kupfer/plugin/textfiles.py | 2 +-
kupfer/plugin/tracker.py | 4 ++--
kupfer/plugin/trash.py | 4 ++--
kupfer/plugin/websearch.py | 4 ++--
kupfer/plugin/wikipedia.py | 2 +-
kupfer/plugin/windows.py | 12 ++++++------
19 files changed, 47 insertions(+), 50 deletions(-)
---
diff --git a/kupfer/obj/objects.py b/kupfer/obj/objects.py
index 4682c8e..1c83c2f 100644
--- a/kupfer/obj/objects.py
+++ b/kupfer/obj/objects.py
@@ -116,7 +116,7 @@ class FileLeaf (Leaf, TextRepresentation):
if self.is_dir():
return "folder"
else:
- return "gtk-file"
+ return "text-x-generic"
class SourceLeaf (Leaf):
def __init__(self, obj, name=None):
@@ -295,7 +295,7 @@ class Launch (Action):
def get_icon_name(self):
if self.is_running:
- return "gtk-jump-to-ltr"
+ return "go-jump"
return Action.get_icon_name(self)
class LaunchAgain (Launch):
@@ -325,7 +325,7 @@ class CloseAll (Action):
def get_description(self):
return _("Attempt to close all application windows")
def get_icon_name(self):
- return "gtk-close"
+ return "window-close"
class UrlLeaf (Leaf, TextRepresentation):
def __init__(self, obj, name):
@@ -402,5 +402,5 @@ class TextLeaf (Leaf, TextRepresentation):
numlines) % {"num": numlines, "text": desc }
def get_icon_name(self):
- return "gtk-select-all"
+ return "edit-select-all"
diff --git a/kupfer/obj/special.py b/kupfer/obj/special.py
index 334b87e..94ea7d1 100644
--- a/kupfer/obj/special.py
+++ b/kupfer/obj/special.py
@@ -19,7 +19,7 @@ class PleaseConfigureLeaf(RunnableLeaf):
kupferui.show_plugin_info(self.object)
def get_icon_name(self):
- return 'gtk-preferences'
+ return "preferences-desktop"
def get_description(self):
return self.description % self.plugin_name
diff --git a/kupfer/plugin/apt_tools.py b/kupfer/plugin/apt_tools.py
index 473e46b..aefcabe 100644
--- a/kupfer/plugin/apt_tools.py
+++ b/kupfer/plugin/apt_tools.py
@@ -80,7 +80,7 @@ class ShowPackageInfo (Action):
return len(text.split(None, 1)) == 1
def get_gicon(self):
- return icons.ComposedIcon("dialog-information", "package")
+ return icons.ComposedIcon("dialog-information", "package-x-generic")
class InstallPackage (Action):
def __init__(self):
@@ -102,7 +102,7 @@ class InstallPackage (Action):
def get_description(self):
return _("Install package using the configured method")
def get_icon_name(self):
- return "gtk-save"
+ return "document-save"
class Package (Leaf):
def __init__(self, package, desc):
@@ -114,7 +114,7 @@ class Package (Leaf):
def get_description(self):
return self.desc
def get_icon_name(self):
- return "package"
+ return "package-x-generic"
class PackageSearchSource (Source):
def __init__(self, query):
diff --git a/kupfer/plugin/clipboard.py b/kupfer/plugin/clipboard.py
index 502450b..963e854 100644
--- a/kupfer/plugin/clipboard.py
+++ b/kupfer/plugin/clipboard.py
@@ -111,7 +111,7 @@ class ClipboardSource (Source):
return _("Recent clipboards")
def get_icon_name(self):
- return "gtk-paste"
+ return "edit-paste"
def provides(self):
yield TextLeaf
diff --git a/kupfer/plugin/core/__init__.py b/kupfer/plugin/core/__init__.py
index e953b06..c8f5df9 100644
--- a/kupfer/plugin/core/__init__.py
+++ b/kupfer/plugin/core/__init__.py
@@ -99,7 +99,7 @@ class CopyToClipboard (Action):
def get_description(self):
return _("Copy to clipboard")
def get_icon_name(self):
- return "gtk-copy"
+ return "edit-copy"
class RescanActionTask(task.ThreadTask):
@@ -137,7 +137,7 @@ class Rescan (Action):
return _("Force reindex of this source")
def get_icon_name(self):
- return "gtk-refresh"
+ return "view-refresh"
def item_types(self):
yield objects.AppLeaf
diff --git a/kupfer/plugin/core/commands.py b/kupfer/plugin/core/commands.py
index eb0c6cf..8ad477d 100644
--- a/kupfer/plugin/core/commands.py
+++ b/kupfer/plugin/core/commands.py
@@ -53,5 +53,5 @@ class NameSource (TextSource):
return self.sourcefile and self.sourcefile.get_gicon()
def get_icon_name(self):
- return "gtk-file"
+ return "text-x-generic"
diff --git a/kupfer/plugin/core/contents.py b/kupfer/plugin/core/contents.py
index 99d6f8d..5460d68 100644
--- a/kupfer/plugin/core/contents.py
+++ b/kupfer/plugin/core/contents.py
@@ -33,7 +33,7 @@ class DebugRestart (RunnableLeaf):
def get_description(self):
return u"Restart Kupfer quickly (for internal kupfer use)"
def get_icon_name(self):
- return gtk.STOCK_REFRESH
+ return "view-refresh"
class Quit (RunnableLeaf):
qf_id = "quit"
@@ -45,7 +45,7 @@ class Quit (RunnableLeaf):
def get_description(self):
return _("Quit Kupfer")
def get_icon_name(self):
- return gtk.STOCK_QUIT
+ return "application-exit"
class About (RunnableLeaf):
def __init__(self, name=None):
@@ -56,7 +56,7 @@ class About (RunnableLeaf):
def get_description(self):
return _("Show information about Kupfer authors and license")
def get_icon_name(self):
- return gtk.STOCK_ABOUT
+ return "help-about"
class Help (RunnableLeaf):
def __init__(self, name=None):
@@ -67,7 +67,7 @@ class Help (RunnableLeaf):
def get_description(self):
return _("Get help with Kupfer")
def get_icon_name(self):
- return "help-browser"
+ return "help-contents"
class Preferences (RunnableLeaf):
def __init__(self, name=None):
@@ -78,7 +78,7 @@ class Preferences (RunnableLeaf):
def get_description(self):
return _("Show preferences window for Kupfer")
def get_icon_name(self):
- return gtk.STOCK_PREFERENCES
+ return "preferences-desktop"
class KupferSource (AppLeafContentMixin, Source):
appleaf_content_id = "kupfer"
diff --git a/kupfer/plugin/favorites.py b/kupfer/plugin/favorites.py
index 3b2c696..c40502a 100644
--- a/kupfer/plugin/favorites.py
+++ b/kupfer/plugin/favorites.py
@@ -145,7 +145,7 @@ class AddFavorite (Action):
def get_description(self):
return _("Add item to favorites shelf")
def get_icon_name(self):
- return "gtk-add"
+ return "list-add"
class RemoveFavorite (Action):
rank_adjust = -15
@@ -160,4 +160,4 @@ class RemoveFavorite (Action):
def get_description(self):
return _("Remove item from favorites shelf")
def get_icon_name(self):
- return "gtk-remove"
+ return "list-remove"
diff --git a/kupfer/plugin/gtg.py b/kupfer/plugin/gtg.py
index ed16bce..fe7ad24 100644
--- a/kupfer/plugin/gtg.py
+++ b/kupfer/plugin/gtg.py
@@ -112,7 +112,7 @@ class OpenEditor (Action):
interface.open_task_editor(leaf.object)
def get_icon_name(self):
- return 'gtk-open'
+ return 'document-open'
def get_description(self):
return _("Open task in Getting Things GNOME!")
@@ -129,7 +129,7 @@ class Delete (Action):
interface.delete_task(leaf.object)
def get_icon_name(self):
- return 'gtk-delete'
+ return 'edit-delete'
def get_description(self):
return _("Permanently remove this task")
@@ -176,7 +176,7 @@ class CreateNewTask (Action):
yield TextLeaf
def get_icon_name(self):
- return 'gtk-new'
+ return 'document-new'
def get_description(self):
return _("Create new task in Getting Things GNOME")
diff --git a/kupfer/plugin/locate.py b/kupfer/plugin/locate.py
index d4d0763..6ac2369 100644
--- a/kupfer/plugin/locate.py
+++ b/kupfer/plugin/locate.py
@@ -38,9 +38,9 @@ class Locate (Action):
def get_description(self):
return _("Search filesystem using locate")
def get_gicon(self):
- return icons.ComposedIcon("gnome-terminal", "gtk-find")
+ return icons.ComposedIcon("gnome-terminal", self.get_icon_name())
def get_icon_name(self):
- return "gtk-find"
+ return "edit-find"
class LocateQuerySource (Source):
def __init__(self, query):
@@ -75,6 +75,6 @@ class LocateQuerySource (Source):
yield F
def get_gicon(self):
- return icons.ComposedIcon("gnome-terminal", "gtk-find")
+ return icons.ComposedIcon("gnome-terminal", self.get_icon_name())
def get_icon_name(self):
- return "gtk-find"
+ return "edit-find"
diff --git a/kupfer/plugin/notes.py b/kupfer/plugin/notes.py
index 1ea95f1..fc1567f 100644
--- a/kupfer/plugin/notes.py
+++ b/kupfer/plugin/notes.py
@@ -114,7 +114,7 @@ class AppendToNote (Action):
def get_description(self):
return _("Add text to existing note")
def get_icon_name(self):
- return "gtk-add"
+ return "list-add"
def _prepare_note_text(text):
title, body = textutils.extract_title_body(text)
@@ -140,7 +140,7 @@ class CreateNote (Action):
def get_description(self):
return _("Create a new note from this text")
def get_icon_name(self):
- return "gtk-new"
+ return "document-new"
class GetNoteSearchResults (Action):
def __init__(self):
@@ -159,9 +159,6 @@ class GetNoteSearchResults (Action):
def get_description(self):
return _("Show search results for this query")
- def get_icon_name(self):
- return "gtk-search"
-
class NoteSearchSource (Source):
def __init__(self, query):
self.query = query.lower()
diff --git a/kupfer/plugin/show_text.py b/kupfer/plugin/show_text.py
index 8e99ca0..1cc1576 100644
--- a/kupfer/plugin/show_text.py
+++ b/kupfer/plugin/show_text.py
@@ -27,7 +27,7 @@ class ShowText (Action):
def get_description(self):
return _("Display text in a window")
def get_icon_name(self):
- return "gtk-bold"
+ return "format-text-bold"
class LargeType (Action):
def __init__(self):
@@ -42,9 +42,9 @@ class LargeType (Action):
def get_description(self):
return _("Display text in a window")
def get_gicon(self):
- return icons.ComposedIcon("gtk-bold", "zoom-in")
+ return icons.ComposedIcon("format-text-bold", "zoom-in")
def get_icon_name(self):
- return "gtk-bold"
+ return "format-text-bold"
class ShowNotification (Action):
def __init__(self):
@@ -62,5 +62,5 @@ class ShowNotification (Action):
yield TextLeaf
def get_icon_name(self):
- return "gtk-bold"
+ return "format-text-bold"
diff --git a/kupfer/plugin/templates.py b/kupfer/plugin/templates.py
index b7ce0d6..79962a7 100644
--- a/kupfer/plugin/templates.py
+++ b/kupfer/plugin/templates.py
@@ -42,7 +42,7 @@ class EmptyFile (Leaf):
def get_actions(self):
yield CreateDocumentIn()
def get_icon_name(self):
- return "gtk-file"
+ return "text-x-generic"
class NewFolder (Leaf):
def __init__(self):
diff --git a/kupfer/plugin/textfiles.py b/kupfer/plugin/textfiles.py
index 98405b3..f2515c5 100644
--- a/kupfer/plugin/textfiles.py
+++ b/kupfer/plugin/textfiles.py
@@ -123,4 +123,4 @@ class GetTextContents (Action):
return is_content_type(item, "text/plain")
def get_icon_name(self):
- return "gtk-copy"
+ return "edit-copy"
diff --git a/kupfer/plugin/tracker.py b/kupfer/plugin/tracker.py
index b9b72f8..154da33 100644
--- a/kupfer/plugin/tracker.py
+++ b/kupfer/plugin/tracker.py
@@ -248,7 +248,7 @@ class TrackerAddTag (Action):
def get_description(self):
return _("Add tracker tag to file")
def get_icon_name(self):
- return "gtk-add"
+ return "list-add"
class TrackerRemoveTag (Action):
def __init__(self):
@@ -273,5 +273,5 @@ class TrackerRemoveTag (Action):
def get_description(self):
return _("Remove tracker tag from file")
def get_icon_name(self):
- return "gtk-remove"
+ return "list-remove"
diff --git a/kupfer/plugin/trash.py b/kupfer/plugin/trash.py
index 0fa27f9..9830891 100644
--- a/kupfer/plugin/trash.py
+++ b/kupfer/plugin/trash.py
@@ -37,7 +37,7 @@ class RestoreTrashedFile (Action):
def get_description(self):
return _("Move file back to original location")
def get_icon_name(self):
- return "gtk-undo-ltr"
+ return "edit-undo"
class TrashFile (Leaf):
"""A file in the trash. Represented object is a file info object"""
@@ -69,7 +69,7 @@ class TrashFile (Leaf):
def get_gicon(self):
return self.object.get_icon()
def get_icon_name(self):
- return "gtk-file"
+ return "text-x-generic"
class TrashContentSource (Source):
def __init__(self, trash_uri, name):
diff --git a/kupfer/plugin/websearch.py b/kupfer/plugin/websearch.py
index d4cf9be..139f109 100644
--- a/kupfer/plugin/websearch.py
+++ b/kupfer/plugin/websearch.py
@@ -61,7 +61,7 @@ class SearchWithEngine (Action):
def get_description(self):
return _("Search the web with OpenSearch search engines")
def get_icon_name(self):
- return "gtk-find"
+ return "edit-find"
class SearchFor (Action):
"""SearchEngine -> SearchFor -> TextLeaf
@@ -88,7 +88,7 @@ class SearchFor (Action):
def get_description(self):
return _("Search the web with OpenSearch search engines")
def get_icon_name(self):
- return "gtk-find"
+ return "edit-find"
class SearchEngine (Leaf):
def get_description(self):
diff --git a/kupfer/plugin/wikipedia.py b/kupfer/plugin/wikipedia.py
index 56d1831..8b09f85 100644
--- a/kupfer/plugin/wikipedia.py
+++ b/kupfer/plugin/wikipedia.py
@@ -43,5 +43,5 @@ class WikipediaSearch (Action):
lang_code = __kupfer_settings__["lang"]
return _("Search for this term in %s.wikipedia.org") % lang_code
def get_icon_name(self):
- return "gtk-find"
+ return "edit-find"
diff --git a/kupfer/plugin/windows.py b/kupfer/plugin/windows.py
index bdf85db..608789e 100644
--- a/kupfer/plugin/windows.py
+++ b/kupfer/plugin/windows.py
@@ -30,16 +30,16 @@ class WindowLeaf (Leaf):
yield ToggleAction(_("Minimize"), _("Unminimize"),
"minimize", "unminimize",
W.is_minimized(), T.is_minimized,
- time=True, icon="gtk-remove")
+ time=True, icon="list-remove")
yield ToggleAction(_("Maximize"), _("Unmaximize"),
"maximize", "unmaximize",
W.is_maximized(), T.is_maximized,
- icon="gtk-add")
+ icon="list-add")
yield ToggleAction(_("Maximize Vertically"), _("Unmaximize Vertically"),
"maximize_vertically", "unmaximize_vertically",
W.is_maximized_vertically(), T.is_maximized_vertically,
- icon="gtk-add")
- yield WindowAction(_("Close"), "close", time=True, icon="gtk-close")
+ icon="list-add")
+ yield WindowAction(_("Close"), "close", time=True, icon="window-close")
def is_valid(self):
return self.object and self.object.get_xid()
@@ -116,7 +116,7 @@ class WindowActivateWorkspace (Action):
def get_description(self):
return _("Jump to this window's workspace and focus")
def get_icon_name(self):
- return "gtk-jump-to-ltr"
+ return "go-jump"
class WindowMoveToWorkspace (Action):
def __init__(self):
@@ -252,7 +252,7 @@ class ActivateWorkspace (Action):
def get_description(self):
return _("Jump to this workspace")
def get_icon_name(self):
- return "gtk-jump-to-ltr"
+ return "go-jump"
class WorkspacesSource (Source, PicklingHelperMixin):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]