Gtkdialog Development

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#101 Post by 8-bit »

Barry,
See the code I left on your Blog. Patriot changed Gtkdialog a while back to support closing of a child window from the main program.
And it still works.

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

#102 Post by technosaurus »

~line 368 of stringman.c

Code: Select all

/*      Thunor: Redundant.
        snprintf(tmp, 127, "/usr/share/icons/Bluecurve/16x16/stock/%s",
                        filename);
        tmp[127] = '\0';
        if (access(tmp, R_OK) == 0)
                return strdup(tmp);
how about uncommenting and replacing
/usr/share/icons/Bluecurve/16x16/stock/
with
/usr/share/mini-icons/

so that we can use the plethora of available icons without having to specify the full path??
The main reason I ask is that the full path is typically not included in the .desktop files and parsing them to autogenerate a gtkdialog program requires some pretty slow workarounds... or missing icons

I have always fixed this in the past by making a symlink between
/usr/share/icons/Bluecurve/16x16/stock/ and /usr/share/mini-icons/
... or by including locate and updatedb
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].

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#103 Post by 8-bit »

I concur with technosaurus.
As a matter of fact, we do not have a /usr/share/icons/Bluecurve directory in Puppy Lucid 520! So coding that in is not good.

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

#104 Post by thunor »

BarryK wrote:A problem!

I cannot close a child window...
Code that was added to Patriot's Edition went into Gtkdialog -- I created a diff patch -- so there shouldn't be any loss of functionality.

Patriot's closewindow fix is explained here. The parameter passed to the closewindow function should be any variable declared within the launched window. Patriot places this atop the child window, but I've used this function with the variable declared within the button that's being used to close the window.

It should actually be the launched dialog's shell variable name but I guess it didn't work so Patriot made a fix.
technosaurus wrote:how about uncommenting and replacing
/usr/share/icons/Bluecurve/16x16/stock/
with
/usr/share/mini-icons/

so that we can use the plethora of available icons without having to specify the full path??
The main reason I ask is that the full path is typically not included in the .desktop files and parsing them to autogenerate a gtkdialog program requires some pretty slow workarounds... or missing icons

I have always fixed this in the past by making a symlink between
/usr/share/icons/Bluecurve/16x16/stock/ and /usr/share/mini-icons/
... or by including locate and updatedb
Why can't you write a shell function to check the existence of a file and if not found prefix it with "/usr/share/mini-icons/" and if still not found then attempt to find it with the locate program which you have installed?

[EDIT] I could code something on the command-line that enables you to pass a list of directories for find_pixmap to look through if it can't find an image file, and then another command-line option to specify to use locate as a last resort, but all these things are executed before the widgets are realized i.e. before the user sees anything, so I'm thinking why should I code all that when you can do it in the script. Doing it in the script also enables you to use a default image if locate fails too. Let me know what you think.

Regards,
Thunor
Last edited by thunor on Mon 25 Jul 2011, 20:34, edited 2 times in total.

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

#105 Post by 01micko »

:wink:

Image

:)
Puppy Linux Blog - contact me for access

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

#106 Post by thunor »

Wow 01micko, that looks really nice, and somebody has good taste in music, well, Judas Priest at least :P

So can I update my Pmusic in lupu-520? I haven't been visiting other threads to be honest as I haven't had the time.

[EDIT] Ok, I found this thread, downloaded pmusic-1.9.2.pet and it doesn't look like yours, so I guess it's still being developed.

Regards,
Thunor

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

#107 Post by technosaurus »

thunor wrote:
technosaurus wrote:how about uncommenting and replacing
/usr/share/icons/Bluecurve/16x16/stock/
with
/usr/share/mini-icons/

so that we can use the plethora of available icons without having to specify the full path??
The main reason I ask is that the full path is typically not included in the .desktop files and parsing them to autogenerate a gtkdialog program requires some pretty slow workarounds... or missing icons

I have always fixed this in the past by making a symlink between
/usr/share/icons/Bluecurve/16x16/stock/ and /usr/share/mini-icons/
... or by including locate and updatedb
Why can't you write a shell function to check the existence of a file and if not found prefix it with "/usr/share/mini-icons/" and if still not found then attempt to find it with the locate program which you have installed?

[EDIT] I could code something on the command-line that enables you to pass a list of directories for find_pixmap to look through if it can't find an image file, and then another command-line option to specify to use locate as a last resort, but all these things are executed before the widgets are realized i.e. before the user sees anything, so I'm thinking why should I code all that when you can do it in the script. Doing it in the script also enables you to use a default image if locate fails too. Let me know what you think.

Regards,
Thunor
here is some code for icon finding ... I could only get it down to adding 0.3 sec (for parsing all .desktop icons) using shell compared to having it coded into gtkdialog

Code: Select all

if [ -e $Icon -a $Icon ];then Icon=$Icon
elif [ -e /usr/share/mini-icons/${Icon:-so.xpm} ];then Icon=/usr/share/mini-icons/${Icon:-so.xpm} #default Icon
elif [ -e /usr/share/pixmaps/$Icon ];then Icon=/usr/share/pixmaps/$Icon
else Icon=`find /usr/share -iname $Icon`
fi
it would add a lot more if /usr/share/icons/{hicolor,bluecurve}/... are searched for any kind of backward/cross-distro compatibility, but this seems to work for most puppy icons

it seems like this would be something that could be added to a gtkrc file, since libgtk actually looks in some of them itself (/usr/share/pixmaps and 1 or 2 others iirc)

EDIT
nevermind, we could probably just add something like this to the gtkrc file
pixmap_path "/usr/share/mini-icons:/another/path/to/more/icons"
(it should probably be in the default gtkrc since some gtk programs, especially window managers depend on it)
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].

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

#108 Post by 01micko »

thunor wrote:Wow 01micko, that looks really nice, and somebody has good taste in music, well, Judas Priest at least :P

So can I update my Pmusic in lupu-520? I haven't been visiting other threads to be honest as I haven't had the time.

[EDIT] Ok, I found this thread, downloaded pmusic-1.9.2.pet and it doesn't look like yours, so I guess it's still being developed.

Regards,
Thunor
I'll make an announcement soon about the new pequalizer app that zigbert and myself have been developing.
Zigbert has posted another alpha for Pmusic (1.9.3) in the slacko thread as well as the latest pequalizer-0.2.
If you can't wait you will find necessary deps (alsaequal, CAPS, ffmpeg-0.8 [x264 and libvpx required by ffmpeg, and probably mplayer, although if you keep the old ffmpeg libs then you need not bother with mplayer]) here - lupu only, hopefully all versions 5.0.0 to 5.2.5. (Ignore the old equaliser pet).

Have fun! :)
Puppy Linux Blog - contact me for access

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#109 Post by 8-bit »

Just to be clear, does this new version of Pmusic require the updated version of gtkdialog?
If so, and not stated, I can see a lot of unhappy campers complaining.

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

#110 Post by 01micko »

8-bit wrote:Just to be clear, does this new version of Pmusic require the updated version of gtkdialog?
If so, and not stated, I can see a lot of unhappy campers complaining.
Well in this thread I guess it goes without saying "yes it requires at least revision 123".. however when I do post a thread for pequalizer I'll compile a binary and post a link. There will be some unhappy campers with gtk+ < 2.16! I think wary sneaks through ok, correct me if I'm wrong.

I'm not sure on which approach zigbert will take. Some features of Pmusic won't work without the latest ffmpeg, that also requires a newish puppy version. He may decide to "fork" such that older versions are bugfixed for older puppies but the newer versions enhanced along with developments in gtkdialog and ffmpeg. His choice.
Puppy Linux Blog - contact me for access

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#111 Post by zigbert »

01micko wrote:I'm not sure on which approach zigbert will take. Some features of Pmusic won't work without the latest ffmpeg, that also requires a newish puppy version. He may decide to "fork" such that older versions are bugfixed for older puppies but the newer versions enhanced along with developments in gtkdialog and ffmpeg. His choice.
Pmusic 1 will still be available for ffmpeg-0.6/gtkdialog-0.7.20. Critical bugs may be fixed, but no further development. Pmusic 1.8.3 is still a reasonable good player.
Pmusic 2 will use recent ffmpeg and gtkdialog.

There had to come a switch in dependencies because of
- Improved streaming (the WebMusic module that allows playing of youtube music)
- New features in gtkdialog made it possible to offer a full-featured player-module... and more.... much more....
- ... Which lead to a new look and the structure for graphical themes had to be updated.
- It also gives me an opportunity to clean up some core-code.

Next release is expected to be the first beta... But I will be away for a couple of weeks (leaving tomorrow).


Sigmund

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#112 Post by BarryK »

01micko wrote:
8-bit wrote:Just to be clear, does this new version of Pmusic require the updated version of gtkdialog?
If so, and not stated, I can see a lot of unhappy campers complaining.
Well in this thread I guess it goes without saying "yes it requires at least revision 123".. however when I do post a thread for pequalizer I'll compile a binary and post a link. There will be some unhappy campers with gtk+ < 2.16! I think wary sneaks through ok, correct me if I'm wrong.
yes, Wary has gtk 2.20.1
[url]https://bkhome.org/news/[/url]

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

#113 Post by Dougal »

technosaurus wrote:~line 368 of stringman.c

Code: Select all

/*      Thunor: Redundant.
        snprintf(tmp, 127, "/usr/share/icons/Bluecurve/16x16/stock/%s",
                        filename);
        tmp[127] = '\0';
        if (access(tmp, R_OK) == 0)
                return strdup(tmp);
how about uncommenting and replacing
/usr/share/icons/Bluecurve/16x16/stock/
with
/usr/share/mini-icons/
The standard location is /usr/share/icons. Anyway, there are ways for getting the info.
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
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#114 Post by 8-bit »

One important thing we all have to remember is that thunor is updating gtkdialog for the linux community.
This does include Puppy, but it is not necessarily specific to it.
This would mean that a path to icons or pixmaps on Puppy may not be the same as another linux release.

IMO, thunor is doing a great job.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#115 Post by sunburnt »

How about changing the syntax from XML to more like Basic.
Easier to type, easier read and understand, etc.
Only the /hbox, /vbox, and /bookmark tags need companion closing tags!
Lots of tag "<>" qualifiers must be typed, and they do nothing!

I suggested this years ago, maybe it`ll make some sense now... ( timing :wink: )

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#116 Post by 8-bit »

If closing tags are missing, gtkdialog will not run the script, since that is the way it is designed.
To modify it as you suggest would make it another gtk scripting language.
It also would break almost all Puppy programs that were written using gtkdialog.

But if you would like to try your hand at creating a scripting language, there is no one stopping you but you.

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

#117 Post by technosaurus »

Someone already started a ***** to gtkdialog "compiler" of sorts iirc ... in programming I think
Dougal wrote:
technosaurus wrote:~line 368 of stringman.c

Code: Select all

/*      Thunor: Redundant.
        snprintf(tmp, 127, "/usr/share/icons/Bluecurve/16x16/stock/%s",
                        filename);
        tmp[127] = '\0';
        if (access(tmp, R_OK) == 0)
                return strdup(tmp);
how about uncommenting and replacing
/usr/share/icons/Bluecurve/16x16/stock/
with
/usr/share/mini-icons/
The standard location is /usr/share/icons. Anyway, there are ways for getting the info.
So /usr/share/icons/hicolor/16x16/ would be the standard and puppy should have a compatibility symlink to its mini-icons directory as I did before with bluecurve ... or just use a gtkrc file.
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].

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#118 Post by sunburnt »

I hope Thunor can straighten out gtkDialog, it`s a mess.
And probably the biggest sore point of Puppy ( GUI`s ), and for it`s development.

I just thought the crappy XML syntax would benefit from a rewrite also.
It could always be made to accept both types of syntax ( of course ).

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

#119 Post by thunor »

sunburnt wrote:How about changing the syntax from XML to more like Basic.
Easier to type, easier read and understand, etc.
Only the /hbox, /vbox, and /bookmark tags need companion closing tags!
Lots of tag "<>" qualifiers must be typed, and they do nothing!

I suggested this years ago, maybe it`ll make some sense now... ( timing :wink: )
BASIC is a programming language, XML is a markup language.

What's a "/bookmark" tag?

The closing tags trigger widget creation. Can you let me know which widgets don't require a closing tag please as it could be a bug and should be fixed.

Which are the tag qualifiers that do nothing? If you can tell me then I'll investigate them.
sunburnt wrote:I hope Thunor can straighten out gtkDialog, it`s a mess.
And probably the biggest sore point of Puppy ( GUI`s ), and for it`s development.

I just thought the crappy XML syntax would benefit from a rewrite also.
It could always be made to accept both types of syntax ( of course ).
If you can tell me which parts are a mess then I can make a feature request in the issue tracker to improve them.

I don't know anything about Gtkdialog being a "sore point of Puppy" as I haven't been using Puppy Linux for that long.

Why of course can it always be made to accept both types of syntax?

If you'd like to create some issues yourself within the issue tracker then feel free. Then all Linux users can benefit from your bug and usability reports :)

Kindest regards,
Thunor

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#120 Post by 8-bit »

I now use a script file to keep current on gtkdialog.
I placed it in the base directory created by the initial download using
"svn checkout http://gtkdialog.googlecode.com/svn/trunk/ gtkdialog" from a command prompt.

The script I use is this:

Code: Select all

 #!/bin/bash
svn update
make clean
./autogen.sh
make
 cd src
 cp -a gtkdialog gtkdialog3
 strip gtkdialog3
cp -af gtkdialog3 /usr/sbin
   `xmessage -name 'Gtkdialog Update' -center -bg orange -fg black " Update of Gtkdialog3 completed."`
It automates the process of keeping gtkdialog current with thunor's additions and revisions.

Post Reply