Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 146086 Details for
Bug 222521
Review Request: IceWM - Lightweight Window Manager.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
add --with-icon and --theme options to icewm-xdg-menu
icewm-xdg-menu.patch (text/plain), 3.13 KB, created by
Patrice Dumas
on 2007-01-21 13:37:00 UTC
(
hide
)
Description:
add --with-icon and --theme options to icewm-xdg-menu
Filename:
MIME Type:
Creator:
Patrice Dumas
Created:
2007-01-21 13:37:00 UTC
Size:
3.13 KB
patch
obsolete
>--- icewm-xdg-menu-old 2007-01-21 12:59:31.000000000 +0100 >+++ icewm-xdg-menu 2007-01-21 13:48:55.000000000 +0100 >@@ -21,6 +21,7 @@ > import re > import xdg.Menu > import xdg.DesktopEntry >+import xdg.IconTheme > > version = "0.1" > >@@ -32,7 +33,9 @@ > --terminal command set terminal emulator command (default: xterm -e %%s) > --default-folder-icon icon icon for folders that not provide Icon option > --default-entry-icon icon icon for entries that not provide Icon option >+ --with-icons put icons for applications in the menu > --entire-menu print entire menu >+ --theme theme what icon theme you want to use > --help print this help and exit > --version print version and exit > """ % sys.argv[0] >@@ -48,17 +51,34 @@ > default_folder_icon = "folder" > default_entry_icon = "-" > entire_menu = 0 >+theme = "gnome" >+use_icons = 0 > > exec_clean1_re = re.compile(r'%[a-zA-Z]') > exec_clean2_re = re.compile(r'%%') > encoding = None > locale_str = None > >+def findIcon(icon, theme): >+ """Finds the path and filename for the given icon name >+ e.g. gaim --> /usr/share/pixmaps/gaim.png >+ e.g. fart.png --> /usr/share/pixmaps/fart.png >+ """ >+ retval=str(xdg.IconTheme.getIconPath(icon, 48, theme)) >+ if retval == "None": >+ retval="" >+ >+ return (retval + "").encode('utf8') >+ >+ > def process_menu(menu): > for entry in menu.getEntries(): > if isinstance(entry, xdg.Menu.Menu): > name = entry.getName() or entry.DesktopFileID >- icon = entry.getIcon() or default_folder_icon >+ if use_icons: >+ icon = findIcon(entry.getIcon(), theme) or default_folder_icon >+ else: >+ icon = entry.getIcon() or default_folder_icon > if entire_menu: > print ("menu \"%s\" \"%s\" {" % (name, icon)).encode(encoding) > process_menu(entry) >@@ -75,7 +95,10 @@ > elif isinstance(entry, xdg.Menu.MenuEntry): > de = entry.DesktopEntry > name = de.getName() or entry.DesktopFileID >- icon = de.getIcon() or default_entry_icon >+ if use_icons: >+ icon = findIcon(de.getIcon(), theme) or default_entry_icon >+ else: >+ icon = de.getIcon() or default_entry_icon > execute = exec_clean2_re.sub('%', exec_clean1_re.sub('', de.getExec())) > if de.getTerminal(): execute = terminal % execute > print ("prog \"%s\" \"%s\" %s" % (name, icon, execute)).encode(encoding) >@@ -83,7 +106,7 @@ > try: opts, args = getopt.getopt(sys.argv[1:], "", > ("help", "version", "locale=", > "root-folder=", "terminal=", "default-folder-icon=", >- "default-entry-icon=", "entire-menu")) >+ "default-entry-icon=", "entire-menu", "theme=", "with-icons")) > except getopt.GetoptError: print_usage() > > locale.setlocale(locale.LC_ALL, "") >@@ -97,6 +120,8 @@ > elif o == "--default-folder-icon": default_folder_icon = v > elif o == "--default-entry-icon": default_entry_icon = v > elif o == "--entire-menu" : entire_menu = 1 >+ elif o == "--with-icons" : use_icons = 1 >+ elif o == "--theme" : theme = o > elif o in ("-h", "-?", "--help"): print_usage(0) > elif o in ("-v", "--version"): print_version() >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 222521
:
145738
|
145744
|
146086
|
146500
|
146523