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 146523 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]
patch with upstream revisions and icon size command line switch
icewm-xdg-menu-giboa-original.patch (text/plain), 4.10 KB, created by
Patrice Dumas
on 2007-01-25 10:47:51 UTC
(
hide
)
Description:
patch with upstream revisions and icon size command line switch
Filename:
MIME Type:
Creator:
Patrice Dumas
Created:
2007-01-25 10:47:51 UTC
Size:
4.10 KB
patch
obsolete
>--- icewm-xdg-menu-old 2007-01-25 11:43:34.000000000 +0100 >+++ icewm-xdg-menu 2007-01-25 11:33:33.000000000 +0100 >@@ -2,7 +2,7 @@ > """ > This script generates FreeDesktop application menu for IceWM window manager. > >-Written by Konstantin Korikov <lostclus@ua.fm> >+Written by Konstantin Korikov <lostclus@ua.fm>, put in the public domain > > Requires pyxdg http://cvs.freedesktop.org/cgi-bin/viewcvs.cgi/pyxdg/ > >@@ -21,8 +21,10 @@ > import re > import xdg.Menu > import xdg.DesktopEntry >+import xdg.IconTheme >+import xdg.Config > >-version = "0.1" >+version = "0.2" > > def print_usage(exit_code = 1): > print """Usage: %s [options] >@@ -32,7 +34,11 @@ > --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-theme-paths convert icon base names to icon absolute paths >+ using icon theme > --entire-menu print entire menu >+ --icon-size set default icon size >+ --theme theme set icon theme > --help print this help and exit > --version print version and exit > """ % sys.argv[0] >@@ -47,18 +53,27 @@ > terminal = "xterm -e %s" > default_folder_icon = "folder" > default_entry_icon = "-" >-entire_menu = 0 >+entire_menu = False >+with_theme_paths = False >+icon_size = 16 > > exec_clean1_re = re.compile(r'%[a-zA-Z]') > exec_clean2_re = re.compile(r'%%') > encoding = None > locale_str = None > >+def find_icon(entry): >+ icon = entry.getIcon() >+ if icon and with_theme_paths: >+ icon = xdg.IconTheme.getIconPath(icon, icon_size) or icon >+ return icon >+ > 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 >+ icon = find_icon(entry) or default_folder_icon >+ > if entire_menu: > print ("menu \"%s\" \"%s\" {" % (name, icon)).encode(encoding) > process_menu(entry) >@@ -68,14 +83,17 @@ > (" --root-folder \"%s\"" % entry.getPath(org=True)) + > (" --terminal \"%s\"" % terminal) + > (" --default-folder-icon \"%s\"" % default_folder_icon) + >- (" --default-entry-icon \"%s\"" % default_entry_icon)).encode(encoding), >+ (" --default-entry-icon \"%s\"" % default_entry_icon) + >+ (" --theme \"%s\"" % xdg.Config.icon_theme) + >+ (" --icon-size \"%s\"" % icon_size) + >+ (with_theme_paths and " --with-theme-paths" or "")).encode(encoding), > if locale_str: > print (" --locale \"%s\"" % locale_str).encode(encoding), > print > elif isinstance(entry, xdg.Menu.MenuEntry): > de = entry.DesktopEntry > name = de.getName() or entry.DesktopFileID >- icon = de.getIcon() or default_entry_icon >+ icon = find_icon(de) 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 +101,8 @@ > 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-theme-paths", >+ "icon-size=")) > except getopt.GetoptError: print_usage() > > locale.setlocale(locale.LC_ALL, "") >@@ -96,7 +115,10 @@ > elif o == "--terminal": terminal = v > 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 == "--entire-menu" : entire_menu = True >+ elif o == "--with-theme-paths" : with_theme_paths = True >+ elif o == "--icon-size": icon_size = int(v) >+ elif o == "--theme" : xdg.Config.setIconTheme(v) > 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