Gtkdialog Development

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#421 Post by Argolance »

Hello thunor!
Had to leave home (far from my Toutou/Puppy, I am running Windows 7! :evil: ), so sorry for replying so late!
Well...
Thanks for brain storming and code lines I will test when I am back on Saturday...
I guess I didn't mind it would be so complicate. I am wondering why this doesn't happen while running Puppy 431, running gtk 2 14 7 and gtkdialog version 0.8.1 (C) 2003-2007 Laszlo Pere, 2011 Thunor (self compiled from svn repository: november 21)
As reported above, when delimiter=comma inside the script, all seems working fine with any locale. Tested with en, es, de, fr locales. (Delemiter=point doesn't work with en, es, de, fr locales).

Strange thing indeed!

Best regards.

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#422 Post by Argolance »

Hello Thunor,
Back home I tried code lines given above and as expected, this seems working perfectly, as well running Puppy/Toutou 4.31 as Wary 5.2.2 with any locales: great! :D
[EDIT on 2011/12/08]... unfortunately not with any locales as said above! :oops:
I am trying to go further!
Thank you so much!
Cordialement.
Last edited by Argolance on Thu 08 Dec 2011, 11:54, edited 1 time in total.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#423 Post by Geoffrey »

I was wondering if it is at all possible to give "fileselect" an option so it is able to select both files and directories and still have the ability to create a newfolder.

I have noticed if "fs-folder="/" is omitted that if fs-action="file" is used that a folder can be selected if it is highlighted and OK is selected, if the folder is double clicked it functions as it should.

Code: Select all

export TEST='	
<window width-request="300" title="This should only select files" resizable="false" decorated="true">
<vbox>
   <hbox>
	<entry fs-action="file" 
		  fs-title="Select a file ">
	<variable>TEST</variable>
	</entry>
	<button>
		<input file stock="gtk-open"></input>
		<action>fileselect:TEST</action>
	</button>
   </hbox>
</vbox>			
</window>'
gtkdialog --program=TEST
Geoffrey

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#424 Post by thunor »

@argolance: You're welcome.

Hi Geoffrey
Geoffrey wrote:I was wondering if it is at all possible to give "fileselect" an option so it is able to select both files and directories and still have the ability to create a newfolder.
Unfortunately no. These are the actions and I've offered them all: http://developer.gnome.org/gtk/2.24/Gtk ... oserAction
Geoffrey wrote:I have noticed if "fs-folder="/" is omitted that if fs-action="file" is used that a folder can be selected if it is highlighted and OK is selected, if the folder is double clicked it functions as it should.
I can't work out what you are saying there. Because fs-action="file", having a folder selected in the list and pressing OK (or double-clicking it) will open the folder which is how it should work. For me there's no difference between the two methods and I have to either select a file and press OK or press Cancel for the dialog to close. I can't select a folder, press OK and have the dialog close.

Regards,
Thunor

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#425 Post by vovchik »

Deat thunor,

Playmusic is a very little app. I am glad you are having fun playing with your own foster child (gtkdialog) and am waiting to see your gtkdialog game!

With kind regards,
vovchik

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#426 Post by 01micko »

Hey guys.. forum member akash_rawal has made a neat discovery (well ... discovery for some of us!)

Read on from his post to the next page. The theming possibilities are endless with the aid of pamcut. (One for the tips thread ziggy)

Cheers
Puppy Linux Blog - contact me for access

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#427 Post by Geoffrey »

thunor wrote:@argolance: You're welcome.

Hi Geoffrey

I can't work out what you are saying there. Because fs-action="file", having a folder selected in the list and pressing OK (or double-clicking it) will open the folder which is how it should work. For me there's no difference between the two methods and I have to either select a file and press OK or press Cancel for the dialog to close. I can't select a folder, press OK and have the dialog close.

Regards,
Thunor
Hi Thunor,
I may have been a little vague, the script in my last post, if I run that and it opens showing "Recently Used" and there is a folder there, if I highlight the folder then press OK it selects the folder showing the path in the entry, if it is doubled clicked and opened then you go back one and select it again it works normally.

I was just thinking that I'm sure I read in the forum a number of years ago that someone asked if both files and directories could be selected and they could and was shown how, but it being so long ago I can't remember how it was done and whether it was to do with "fileselect" or "chooser".

The reason behind this was that the path to an object was needed, either a file or directory, so Ive been hunting for a solution, I was thinking that it may have been an option either file, directory or no restriction which would be handy.

Regards,
Geoffrey

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#428 Post by Argolance »

Hello thunor,
This is how you could approach it:
[...]
=> Please see this thread: Another way to approach... and finally solve it! :wink: (?)
But I am wondering if the easiest way should not be to force a single decimal mark (comma or point) just during the script process? Should it be possible?

Regards

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#429 Post by Geoffrey »

vovchik wrote:Dear thunor,

Would it be possible to add the following:

Code: Select all

gtk_window_set_icon_from_file(long,char*,void*)
to the window code so as to allow for user-defined pixmaps as window/taskbar icons? I have used that gtk call in progs in C and Bacon myself, so I know it is a cinch. All that is needed, apart from the imported function, is an appropriate tag_attr, which, along side the existing icon-name="gtk-xxxx" could be something like pixmap="path to img". Any thoughts?

With kind regards,
vovchik
vovchik,

User icons in gtk window/taskbar, that seems to work in Quirky 1.2.0 and in Racy 5.2.2.
I mention it here http://www.murga-linux.com/puppy/viewto ... 549#589549 It does make easier to distinguish whats running at a glance, looks nicer to :)

regards,
Geoffrey

vovchik,

It looks like I found some clue to how it's done, I copied /usr/share/icons/hicolor/icon-theme.cache from Quirky 1.2.0 and replaced the one in lupu_528, now I can use any of the icons in /usr/share/icons/hicolor/, using this syntax

Code: Select all

 icon-name="abc"
maybe you could confirm that this works and is what you wanted to do.

Geoffrey

Edit: I don't know whats the go with this, but I changed the icon-theme.cache back to the original and it still works, even after a reboot, it must be something else :?

Edit: see vovchik's explanation below in regard to icon-theme.cache
Attachments
gtk_icons.jpg
taskbar image using abc.png I created that I located in /usr/share/icons/hicolor/48x48/apps/abc.png
(2.27 KiB) Downloaded 1041 times
Last edited by Geoffrey on Mon 19 Dec 2011, 05:44, edited 2 times in total.

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#430 Post by vovchik »

Dear Geoffrey,

Thanks. I'll test it out today. Although once Thunor has a bit of time, I am certain he will include the little icon feature.:)

With kind regards,
vovchik

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#431 Post by Dougal »

Geoffrey wrote:It looks like I found some clue to how it's done, I copied /usr/share/icons/hicolor/icon-theme.cache from Quirky 1.2.0 and replaced the one in lupu_528, now I can use any of the icons in /usr/share/icons/hicolor/, using this syntax

Code: Select all

 icon-name="abc"
Hmm. Wouldn't it be simpler to run gtk-update-icon-cache?
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#432 Post by vovchik »

Dear Geoffrey,

Brilliant. It works even without touching icon-theme.cache on Lucid. And it shows the icon I specify on the taskbar. It is a little thing, but does help to identify the program.

Run this to update your own cache:

Code: Select all

gtk-update-icon-cache -f -i /usr/share/icons/hicolor
If you don't use the flags the file will be very big (containing compressed images and not just the names of the images) and existing caches will not get overwritten.

More info here:

http://developer.gimp.org/api/2.0/gtk/g ... cache.html

Thanks.

With kind regards,
vovchik

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#433 Post by Geoffrey »

vovchik wrote:Dear Geoffrey,

Brilliant. It works even without touching icon-theme.cache on Lucid. And it shows the icon I specify on the taskbar. It is a little thing, but does help to identify the program.

Run this to update your own cache:

Code: Select all

gtk-update-icon-cache -f -i /usr/share/icons/hicolor
If you don't use the flags the file will be very big (containing compressed images and not just the names of the images) and existing caches will not get overwritten.

More info here:

http://developer.gimp.org/api/2.0/gtk/g ... cache.html

Thanks.

With kind regards,
vovchik
Great it works for you, I've been using this for at lest the last 12 months, I only came across it by accident and never gave it a second thought.
Dougal wrote:Hmm. Wouldn't it be simpler to run gtk-update-icon-cache?
Was unaware that the icon cache needed to be updated for it to work as it just seemed to work for me.

Yes it is a handy thing for when the taskbar gets a little crowded and the only thing is a icon to see whats running and thank-you for the info much appreciated

Geoffrey

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#434 Post by jpeps »

I thought it would be interesting if there were a way to take <tree selection-mode="3" one step further by adding checkboxes, like with greq -c. I can think of a lot of uses. Thanks!

http://murga-linux.com/puppy/viewtopic. ... 3&start=45

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#435 Post by technosaurus »

doesn't zigbert already have some apps that show icons as the first object in a tree ... can the images change based on "selected"? maybe not, but if so you should be able to use {un}checked.png
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#436 Post by jpeps »

Yeah...it's almost there. It would also be an improvement with selection involving a simple on/off toggle. Presently selection works like a text editor. The icon refresh would have to work in runtime. Probably just a variation of a checkbox widget...

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#437 Post by jpeps »

Found a way to do it; a createchecklist function within a scrollable vbox.

http://murga-linux.com/puppy/viewtopic. ... 3&start=56


I would have liked to use an array with the variable, but couldn't find a way. A hack like STAT$i isn't as clean. To read it later, I needed something like

Code: Select all

  eval echo "\$STAT${i}"

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

Window Icons

#438 Post by seaside »

Right now you can only set a gtkdialog's window dialog icon with a "gtk-stock-item" such as this-

Code: Select all

<window title="Example Window" icon-name="gtk-dialog-warning">
It would be really great to provide a customized icon with any pixmap that would show as the window icon as well as minimized in a tray.

Having this feature would give gtkdialog programs a nice professional and polished look.

Cheers,
s

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#439 Post by vovchik »

Dear seaside,

I agree with you fully. I requested that from thunor a while back and he has kindly listed that feature for inclusion (http://code.google.com/p/gtkdialog/issues/detail?id=48). It's pretty easy to do.

With kind regards,
vovchik

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#440 Post by vovchik »

Sorry - the mail system on the forum had a hiccough and double posted.

Post Reply