Problems improving GUI with gtkdialog

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
matiasbatero
Posts: 60
Joined: Fri 12 Oct 2012, 01:27
Location: Mar del Plata, Argentina

Problems improving GUI with gtkdialog

#1 Post by matiasbatero »

Hi people!!

I'm developing a CD/DVD bash burning program with "not-common" features.

I have a big progress with it, but i need some help to solve some "problems" to solve with my gtkdialog GUI.

First, a screenshot:
Image

Expanding burn panel:
Image

The program include a lightweight built-in browser. And it have a minimal toolbar that allows add files, folders.. etc.

(To add files/folders, i use the "fileselect function" for it's advantages on file filters etc.. )

(First Way)

One of my currently limitations with it, is that i can't use the "Multiple Selection" to add various files on one hand, because the widget cannot export all selected file paths.

:: If someone knows how to implement this...


or (Second way)
So, i test another way to add files (less usefull that the multiple selection), but for me it's "ok". The idea is:
Launch constantly a chooser gui when the "add file button" is pressed for the user, until he press the Cancel/Abort button. So, in this way, the user avoids to push the "add button" for every file who wants to add.


It consist on external choser dialog allowed in a file.

Code: Select all

<vbox space-expand="true" space-fill="true">
	<chooser space-expand="true" space-fill="true">
		<variable>choser</variable>	
		<height>500</height>
		<width>700</width>		
	</chooser>
	<hbox>
		<button>
			<label>Add file to project</label>
		</button>
		<button cancel></button>
	</hbox>							
</vbox>
On the main GUI, the "Add file" button, execute the next function:

Code: Select all

launch_chooser(){
until [ "$EXIT" = "Cancel" -o "$EXIT" = "Abort" ]
    do
        gtkdialog --center --file "$HOME/choser_gui.file"
done
}
Executing the current code, the program works fine only for the "Add button" (it shows the choser gui constantly for every pressed-add_button). But, when i push the "exit", it doesn't stop. So, the "exit" and "add" buttons works equal.

:: I need some help to solve this way.

If someone have a best idea how to implement this, it will be very usefull for me!

Regards!!

PD: Sorry for my english, i speak spanish. Long Life Gtkdialog!

Post Reply