Gentoo Archives: gentoo-commits

From: "Thomas Sachau (tommy)" <tommy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-themes/fvwm-crystal/files: fvwm-crystal.apps.patch
Date: Fri, 26 Jun 2009 20:04:36
Message-Id: E1MKHf1-0006x0-5N@stork.gentoo.org
1 tommy 09/06/26 20:04:35
2
3 Added: fvwm-crystal.apps.patch
4 Log:
5 Misc fixes (bug 254360, bug 71033 and bug 272945), ebuild and patch from Naohiro Aota (naota@×××××.net)
6 (Portage version: 13596-svn/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 x11-themes/fvwm-crystal/files/fvwm-crystal.apps.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-themes/fvwm-crystal/files/fvwm-crystal.apps.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-themes/fvwm-crystal/files/fvwm-crystal.apps.patch?rev=1.1&content-type=text/plain
13
14 Index: fvwm-crystal.apps.patch
15 ===================================================================
16 --- bin/fvwm-crystal.apps~ 2009-05-24 17:38:56.000000000 +0900
17 +++ bin/fvwm-crystal.apps 2009-05-24 17:49:44.000000000 +0900
18 @@ -102,7 +102,7 @@
19 group = OptionGroup(parser, "General creation options", "Options definig what should be generated")
20 # group.add_option('-g', '--generate', action = 'store', choices=['all','menus','panel','topapps'], dest='generate', default='all', metavar='WHAT',
21 # help = "what should be generated. aviable options are: all, menus, panel, topapps. default is all.")
22 - group.add_option('--with', action = 'append', type='string', dest='with', metavar='DIRECTORY',
23 + group.add_option('--with', action = 'append', type='string', dest='with_only', metavar='DIRECTORY',
24 help = 'generate entries only for defined entries (directories or files)')
25 group.add_option('--without', action = 'append', type='string', dest='without', metavar='DIRECTORY',
26 help = 'do NOT use defined entries (directories or files) for generating output.')
27 @@ -206,12 +206,12 @@
28 #end of parseArgv
29
30
31 -def getAppsData(databases=[database],checkExecs=False,searchIconsIn='',sortOrder='prio',minLength=3,with=None,without=None,rootName='/Applications',topInSub=True,fileIcon='default.png',dirIcon='directory.png'):
32 +def getAppsData(databases=[database],checkExecs=False,searchIconsIn='',sortOrder='prio',minLength=3,with_only=None,without=None,rootName='/Applications',topInSub=True,fileIcon='default.png',dirIcon='directory.png'):
33 """Read application databases from directories.
34 if checkExecs is True then use exec_field from file name to check access before adding it to database
35 if searchIconsIn is provided then use this path to check icons existence
36 sortOrder defines sorting order for entries
37 - with is a list of entries (relative to the database root) that should be read
38 + with_only is a list of entries (relative to the database root) that should be read
39 without is a list of entries (relative to the database root or absolute targets for symlinks) that should be left out
40 """
41
42 @@ -235,7 +235,7 @@
43 return True
44 return False
45
46 - def get_entry(root,dir,cat,sort,check,with,without,realcat):
47 + def get_entry(root,dir,cat,sort,check,with_only,without,realcat):
48 if not os.path.isdir(os.path.join(root,dir)) or not os.access(os.path.join(root,dir),os.R_OK):
49 yield None
50 for entry in os.listdir(os.path.join(root,dir)):
51 @@ -268,9 +268,9 @@
52 if not checkFileAccess(test):
53 continue
54
55 - if with and len(with)>0:
56 + if with_only and len(with_only)>0:
57 cont=False
58 - for i,v in enumerate(with):
59 + for i,v in enumerate(with_only):
60 if not (os.path.join(cat,name).startswith(v) or os.path.join(cat,name.replace('_',' ')).startswith(v)):
61 cont=True
62 break
63 @@ -305,7 +305,7 @@
64 x = realcat[:]
65 x.extend([prio,name])
66 if access:
67 - for sub in get_entry(root,os.path.join(dir,entry),os.path.join(cat,name).replace(' ','_'),sort,check,with,without,x):
68 + for sub in get_entry(root,os.path.join(dir,entry),os.path.join(cat,name).replace(' ','_'),sort,check,with_only,without,x):
69 yield sub
70 elif os.path.isfile(file):
71 if sort=='name' or sort=='rname':
72 @@ -327,7 +327,7 @@
73 db=os.path.abspath(os.path.expanduser(databases[i]))
74 if not os.path.isdir(db) or not os.access(db,os.R_OK):
75 continue
76 - for entry in get_entry(db,'',os.path.join('/',rootName),sortOrder,checkExecs,with,without,[0,rootName]):
77 + for entry in get_entry(db,'',os.path.join('/',rootName),sortOrder,checkExecs,with_only,without,[0,rootName]):
78 if not entry:
79 continue
80 if not entry[5]:
81 @@ -850,7 +850,7 @@
82 if params[0].database and len(params[0].database)>0:
83 database=params[0].database
84
85 -apps=getAppsData(database,checkExecs=params[0].checkExecs,searchIconsIn=params[0].iconPath,sortOrder=params[0].sortOrder,minLength=params[0].subLength,with=params[0].with,without=params[0].without,rootName=params[0].rootCat,topInSub=params[0].topInSub,fileIcon=params[0].fileDefault,dirIcon=params[0].dirDefault)
86 +apps=getAppsData(database,checkExecs=params[0].checkExecs,searchIconsIn=params[0].iconPath,sortOrder=params[0].sortOrder,minLength=params[0].subLength,with_only=params[0].with_only,without=params[0].without,rootName=params[0].rootCat,topInSub=params[0].topInSub,fileIcon=params[0].fileDefault,dirIcon=params[0].dirDefault)
87
88 ########################## DEBUG ################################
89 if params[0].verbosity > 1: