Gtkdialog Development
thunor,
I noticed in the hscale/vscale code that no provision is made to add to an old scale.
So could that possibly be what is messing up the positioning on the scale of the markup text?
As an example, if I run the example you provided, the type2 scale is displayed with all the markup text on the vertical scale displayed on the same line/area.
Since each item is calling the code as a new scale, that seems to be the case.
Could a mod be made to call old scale to add marks with markup after the first item for the scale as a test?
I noticed in the hscale/vscale code that no provision is made to add to an old scale.
So could that possibly be what is messing up the positioning on the scale of the markup text?
As an example, if I run the example you provided, the type2 scale is displayed with all the markup text on the vertical scale displayed on the same line/area.
Since each item is calling the code as a new scale, that seems to be the case.
Could a mod be made to call old scale to add marks with markup after the first item for the scale as a test?
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
With *scale and refreshable pixmaps, a unified tray applet is now possible using gtkdialog.... although gtkstatusicon would make it work outside of jwm (in wm without swallow capacity)
For example:
Volume, battery, CPU, memory etc...
Glade can do gtkstatusicon, but if it is deprecated perhaps it's a poor choice?
For example:
Volume, battery, CPU, memory etc...
Glade can do gtkstatusicon, but if it is deprecated perhaps it's a poor choice?
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].
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
I'll add a feature request for it. [EDIT] done.vovchik wrote:A timer widget? Sounds tempting!
Great The more folk testing, the merrier.amigo wrote:I *will* be compiling your new code pretty soon(on a system with gtk-2.16.6), though, and will gladly notify you if any problems come up.
If you can duplicate it then tell me and I'll take a look, otherwise just tell me what happened. BTW your Pmusic looks fantasticzigbert wrote:Regarding gtk compatibility, I think there is an issue with h/vscale when using scale-step that is not an integer. I get error in Puppy 5.11, but not in the latest Spup.
All my examples are listed in the Development section to make your life easier, if you want to use themBarryK wrote:When I get onto doing that, I will trawl through this thread...
You may be surprised to find that all directives and tag attributes are in fact static except that <input> and <input file> enable the application developer to alter the input data. Therefore adding marks and markup to an existing "shown" scale at a later time isn't possible.8-bit wrote:I noticed in the hscale/vscale code that no provision is made to add to an old scale.
...
Since each item is calling the code as a new scale, that seems to be the case.
Could a mod be made to call old scale to add marks with markup after the first item for the scale as a test?
I've tried a number of things to get the vertical markup to position correctly including fixing the bar size so that GTK doesn't resize it. The code that deals with both scales is identical since they share the GtkScale base class which includes the simple gtk-scale-add-mark function.
You have the source code: in widgets.c:126 you'll find the function fill_scale_by_items. Comment-out the "#ifdef DEBUG" and the "#endif" a few lines down and after compiling it watch the values in the terminal. I can't do anything else with it at the moment and the first thing I would do is test it on another Linux distro. Also I haven't even found a GTK+ 2 app using marks let alone markup.
Regards,
Thunor
I tend to agree that the way the code is written in gtk 2.16, there is not a whole lot one can do.
That is considering that a lot of applications Puppy uses require gtk version 2 and gtk version 3 has not assured backward compatability and would break a lot of applications.
Also, you are correct in that I too have not seen any applications at all that use the vscale.
It appears though that Zigbert has implemented a horizontal scale in Pmusic.
And, It looks really great! Good work there!
One thing that bugs me is that the original maker of gtkdialog, if it was indeed him, included an example that just flat out does not work.
It is the list_actions one.
No one even attempts to use it since it is broken.
That is considering that a lot of applications Puppy uses require gtk version 2 and gtk version 3 has not assured backward compatability and would break a lot of applications.
Also, you are correct in that I too have not seen any applications at all that use the vscale.
It appears though that Zigbert has implemented a horizontal scale in Pmusic.
And, It looks really great! Good work there!
One thing that bugs me is that the original maker of gtkdialog, if it was indeed him, included an example that just flat out does not work.
It is the list_actions one.
No one even attempts to use it since it is broken.
Rather than an examples_extra, why not add the new examples in with the old ones, upstream? It seems senseless to maintain puppy specific changes...BarryK wrote:The "official" gtkdialog PET on ibiblio.org 'common' repo is thunor's revision 86 I think. I'm going to upgrade it soon, and I want to put in examples to illustrate the new features, well more examples to illustrate old features also.
The PET has /usr/share/doc/gtkdialog3/examples (in devx), which are the original ones.
I was thinking of adding /usr/share/doc/gtkdialog3/examples_extra.
When I get onto doing that, I will trawl through this thread, but if you want to send any to me, just short examples of a particular feature, not full applications, kindly email them: STARTbkaulerATgmailDOTcomEND
Put "gtkdialog" somewhere in the email title.
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Thanks, I've removed it.8-bit wrote:BarryK,
In including examples, when devx is loaded, the example in /usr/share/doc/gtkdialog3/examples called 07.02-list_actions is broken.
When it is run, the processor maxes out and the example has to be killed to recover.
So removal of that example is suggested.
[url]https://bkhome.org/news/[/url]
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Overhauled the menu and menuitem widgets - part 1
I've added quite a few useful things that I may as well announce now since I've got a fair amount of work left to do before the menu system is adequately updated and extended.
Submenu, checkbutton and radiobutton menuitems are to follow
<menu> and <menuitem> widgets example:
Updated 2011-08-02 16:46: example superseded by http://www.murga-linux.com/puppy/viewto ... 591#549591.
Regards,
Thunor
I've added quite a few useful things that I may as well announce now since I've got a fair amount of work left to do before the menu system is adequately updated and extended.
- The "icon" tag attribute now loads icons set to 16x16 and not 20x20.
- It's now possible to use the <menuitem use-stock="true" label="gtk-stock_id"> GTK property method of setting stock images as well as the easier custom stock="gtk-stock_id" method.
- The menu widget now accepts tag attributes so that <menu label="_File" use-underline="true"> works.
- Menu items now support accelerators using the "accel-key" and "accel-mods" custom tag attributes and both can be entered as either decimal or hexadecimal values.
- Added support for the <visible> directive although it's already possible to use the GTK "sensitive" property.
Submenu, checkbutton and radiobutton menuitems are to follow
<menu> and <menuitem> widgets example:
Updated 2011-08-02 16:46: example superseded by http://www.murga-linux.com/puppy/viewto ... 591#549591.
Regards,
Thunor
Last edited by thunor on Mon 08 Aug 2011, 22:03, edited 9 times in total.
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
A problem!
I cannot close a child window, I have described the problem on my blog:
http://bkhome.org/blog/?viewDetailed=02366
Ages ago, I know it did work, but I can't remember if we had to do anything special, or if "closewindow" used to work. Maybe that was with gtkdialog2.
Can anyone help?
I cannot close a child window, I have described the problem on my blog:
http://bkhome.org/blog/?viewDetailed=02366
Ages ago, I know it did work, but I can't remember if we had to do anything special, or if "closewindow" used to work. Maybe that was with gtkdialog2.
Can anyone help?
[url]https://bkhome.org/news/[/url]
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
~line 368 of stringman.c
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
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);
/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].
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
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.BarryK wrote:A problem!
I cannot close a child window...
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.
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?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
[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.
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Wow 01micko, that looks really nice, and somebody has good taste in music, well, Judas Priest at least
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
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
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
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 gtkdialogthunor wrote: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?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
[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
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 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].
I'll make an announcement soon about the new pequalizer app that zigbert and myself have been developing.thunor wrote:Wow 01micko, that looks really nice, and somebody has good taste in music, well, Judas Priest at least
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
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
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.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.
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