Page 6 of 42

Posted: Mon 25 Jul 2011, 03:22
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.

Posted: Mon 25 Jul 2011, 08:54
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

Posted: Mon 25 Jul 2011, 09:05
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.

Posted: Mon 25 Jul 2011, 11:28
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

Posted: Mon 25 Jul 2011, 11:52
by 01micko
:wink:

Image

:)

Posted: Mon 25 Jul 2011, 13:26
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

Posted: Mon 25 Jul 2011, 22:19
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)

Posted: Tue 26 Jul 2011, 04:32
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! :)

Posted: Tue 26 Jul 2011, 04:54
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.

Posted: Tue 26 Jul 2011, 05:04
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.

Posted: Tue 26 Jul 2011, 09:11
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

Posted: Wed 27 Jul 2011, 08:35
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

Posted: Wed 27 Jul 2011, 19:12
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.

Posted: Thu 28 Jul 2011, 03:35
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.

Posted: Thu 28 Jul 2011, 04:12
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: )

Posted: Thu 28 Jul 2011, 06:27
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.

Posted: Thu 28 Jul 2011, 06:28
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.

Posted: Thu 28 Jul 2011, 06:50
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 ).

Posted: Thu 28 Jul 2011, 16:56
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

Posted: Thu 28 Jul 2011, 19:18
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.