[Gimp-developer] Adding plug-in-paths to python path
I'm trying to figure out the best way to add all of the paths listed in gimprc under 'plug-in-path' to the python path in order to properly support the python package/module structure. http://docs.python.org/tutorial/modules.html#packages Adding this would allow better organization of larger python plugins and import statements would work correctly. As far as I can tell there is three problems to solve. 1) Getting the directories added to sys.path 2) When gimp scans directories for plugins to register, it'll also need to search through all of the folders 3) When scanning the files, ignore the files without the register function. (right now is outputs a warning) Right now I'm just trying to solve the first problem. The first option is to add the following code(or something similar) to gimpfu.py and gimpplugin.py Most plugins are going to use gimpfu, but adding it in both spots would work for those that just use gimpplugin. import sys try: gimprc_file = open(gimp.personal_rc_file(gimprc), r) for line in gimprc_file: if line.startswith((plug-in-path): for path in line.split('')[1].split(':'): sys.path.append(path) except: pass This approach works, but the same code is in two different spots. 2nd option that I came up with is to make the change in gimpmodule.c in the initgimp function. Having the change in this module would work everywhere. I'm not a C person so my best attempt so far is something along the lines of PyRun_SimpleString(import sys); Loop paths here PyRun_SimpleString(sys.path.append('looped_paths')); I tried using gimp_gimprc_query(plug-in-path) to get the paths, but calling this in initgimp causes the 'gimp wire read' error. So I figure using this approach, I'll have to load and parse the gimprc manually. I would really like to see this functionality added to trunk so if you have any suggestions on what would be an acceptable solution I'd really appreciate it... Thanks... ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Improving the UI, removing the dockable drag handles
Martin Nordholts wrote: On 02/02/2010 02:40 PM, yahvuu wrote: Thanks, I've uploaded a new patch with this addressed. thank you for caring about this stuff! will check it out.. Ideally, the tabs would gracefully degrade when there's not enough space available. For increasing number of tabs: 1. icon + label 2. icon + short label 3. icon only 4. icon || arrows for scrolling here's how that might look like: http://yahvuu.files.wordpress.com/2009/08/tabsdegradation.png To be honest, i like neither 2a) nor 2b) very much. One thing is unclear though, how would we map the current Tab Style settings to this? One approach would be to add a new style Automatic and make it default, but that doesn't feel very elegant... i don't think a default Automatic style hurts much. Nobody should have to mess with that menu on a regular basis. I'd also like to, just for reference, link to a related discussion about making Tab Style a more global setting: [Gimp-developer] Making dockable tab style a global setting http://lists.xcf.berkeley.edu/lists/gimp-developer/2009-December/023825.html while re-reading, i had a look at how CS4 looks like, and i now understand what Peter meant by calmness of text: http://www.softpedia.com/screenshots/Adobe-PhotoShop-Trial_1.png - très chic. and really guides the attention to the dialog. But i don't think that discreet icons really hurt. Here's a second comparison, which also tries small icons, like Alexia said: http://yahvuu.files.wordpress.com/2009/08/tabheighticons.png I guess icon size is within the domain of theming?!? regards, yahvuu ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Improving the UI, removing the dockable drag handles
On 02/03/2010 07:16 PM, yahvuu wrote: while re-reading, i had a look at how CS4 looks like, and i now understand what Peter meant by calmness of text: http://www.softpedia.com/screenshots/Adobe-PhotoShop-Trial_1.png - très chic. and really guides the attention to the dialog. But i don't think that discreet icons really hurt. Here's a second comparison, which also tries small icons, like Alexia said: http://yahvuu.files.wordpress.com/2009/08/tabheighticons.png I guess icon size is within the domain of theming?!? I never really liked that GIMP's UI is so colorful, IMO the UI should be neutral in an image editing application. Your mockup looks nice. Yes, icon size is themeable, GIMP's default Small theme makes those icons smaller for example / Martin ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Invitation to connect on LinkedIn
LinkedIn I'd like to add you to my professional network on LinkedIn. - Yong Confirm that you know Yong Li https://www.linkedin.com/e/isd/1047213435/wNndBlo2/ -- (c) 2010, LinkedIn Corporation___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer