luzfcb / tintwizard

Automatically exported from code.google.com/p/tintwizard
2 stars 0 forks source link

integration with tint2conf #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Euan, 

tint2 have now a theme switcher tint2conf.
I would like to integrate a customised version of tintwizard in tint2conf.

The idea is to have a list of possible theme and a button 'properties'
witch call tintwizard on current config file.

To do it I need to:
- call tintwizard with a file as parameter
- replace menu and button with a button "save" or "close"

What do you think about it ? and if possible how to do it ?
is it better to include the change in tintwizard, or to distributed a
forked version of tintwizard with tint2 ???

Thanks

thierry

Original issue reported on code.google.com by thilo...@gmail.com on 26 Oct 2009 at 3:23

GoogleCodeExporter commented 9 years ago
Hi Thierry,

It should be easy to call tintwizard with a filename as parameter, and have it 
load
that config. The functions already exist to read from a file so we just need to 
make
use of those. We would just have to check to see if a filename was given as 
parameter.

The user-interface could be altered during the init() constructor to create 
just a
'save' and 'close' button instead of the menu and buttons, depending on what 
mode tw
is started in.

I've been very busy lately so don't have the time to work on this, but I can 
add you
to the project if you'd like to work on these changes yourself.

Original comment by eua...@gmail.com on 26 Oct 2009 at 3:40

GoogleCodeExporter commented 9 years ago
ok, I'm ready to do some job on it.
when you have time, take a look to the change because never used python before 
:)

Original comment by thilo...@gmail.com on 26 Oct 2009 at 5:37

GoogleCodeExporter commented 9 years ago
I've added you to the project.

Python accesses the command line parameters using the sys.argv list. 
sys.argv[0] is the 
relative filename of the script and the rest of the list values are any command 
line 
arguments.

I think a tint2 config could be opened by checking if any arguments were given 
(  
len(sys.argv) > 1  ) at the end of the init() method of TintWizardGUI (approx 
line 1277). 
If a filename was given, set self.filename to the filename and then call 
readTint2Config().

The init() method is where the GUI is set up. At approx line 246 is an XML 
definition for 
the menu and toolbar layouts, followed by an actiongroup (line 293) which is 
where the menu 
and toolbar items are defined. We could use an if statement to decide whether 
to create the 
menu/toolbar as it currently is, or to just use the 'save' and 'close' buttons.

Original comment by eua...@gmail.com on 26 Oct 2009 at 6:16

GoogleCodeExporter commented 9 years ago
thanks for the tips.
will have a look later.

Original comment by thilo...@gmail.com on 27 Oct 2009 at 7:58

GoogleCodeExporter commented 9 years ago
oups ... sorry for the bad commit (using 0.2.9 version)

have removed menu and toolbar for integration with tint2.
and added licence + credit into tint2.

Original comment by thilo...@gmail.com on 3 Nov 2009 at 3:33

GoogleCodeExporter commented 9 years ago
have done the change and try to do small step (so you can easilly review the 
code).

have put a copy of tintwizard into tint2 SVN and call tintwizard on button 
'Properties'.

it's done for me :)

Original comment by thilo...@gmail.com on 5 Nov 2009 at 7:46

GoogleCodeExporter commented 9 years ago
Nice work Thierry! tint2conf is looking good =)

Original comment by eua...@gmail.com on 5 Nov 2009 at 8:15