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.

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 *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.

Great The more folk testing, the merrier.

zigbert 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.

If you can duplicate it then tell me and I'll take a look, otherwise just tell me what happened. BTW your Pmusic looks fantastic

BarryK wrote:

When I get onto doing that, I will trawl through this thread...

All my examples are listed in the Development section to make your life easier, if you want to use them

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?

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.

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.

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.

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.

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..._________________DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!

It is also my understanding, maybe wrong, that /usr/doc/gtkdialog/examples is only available when you install devx for the version of Puppy you are using.
So I would suggest making it part of devx so as to keep the Puppy ISO small.

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.

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.

The example below has got something of everything in it. Don't fail to realise that accelerators enable trapping any recognised key combination which will generate an "activate" signal which can perform some function upon some widget -- very powerful.

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_________________Web Programming - Pet Packaging 100 & 101

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,
ThunorLast edited by thunor on Mon 25 Jul 2011, 16:34; edited 2 times in total

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum