The time now is Tue 24 Apr 2018, 05:05
All times are UTC - 4 |
Page 7 of 56 [833 Posts] |
Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 54, 55, 56 Next |
Author |
Message |
8-bit

Joined: 03 Apr 2007 Posts: 3425 Location: Oregon
|
Posted: Wed 20 Jul 2011, 11:14 Post subject:
|
|
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.
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3425 Location: Oregon
|
Posted: Wed 20 Jul 2011, 11:24 Post subject:
|
|
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?
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4787 Location: Kingwood, TX
|
Posted: Wed 20 Jul 2011, 17:19 Post subject:
|
|
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?
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Wed 20 Jul 2011, 17:48 Post subject:
|
|
vovchik wrote: | A timer widget? Sounds tempting! |
I'll add a feature request for it. [EDIT] done.
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. |
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.
Regards,
Thunor
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3425 Location: Oregon
|
Posted: Wed 20 Jul 2011, 22:04 Post subject:
|
|
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.
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6781 Location: Auckland, New Zealand
|
Posted: Thu 21 Jul 2011, 01:05 Post subject:
|
|
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. |
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...
_________________ If you have or know of a good gtkdialog application, please post a link here
Classic Puppy quotes
ROOT FOREVER
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3425 Location: Oregon
|
Posted: Thu 21 Jul 2011, 01:34 Post subject:
|
|
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.
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 8526 Location: Perth, Western Australia
|
Posted: Thu 21 Jul 2011, 08:40 Post subject:
|
|
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. |
Thanks, I've removed it.
_________________ http://bkhome.org/news/
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sun 24 Jul 2011, 18:33 Post subject:
|
|
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.
- 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.
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/viewtopic.php?p=549591#549591.
Regards,
Thunor
Last edited by thunor on Mon 08 Aug 2011, 18:03; edited 9 times in total
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 8526 Location: Perth, Western Australia
|
Posted: Sun 24 Jul 2011, 19:20 Post subject:
|
|
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?
_________________ http://bkhome.org/news/
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3425 Location: Oregon
|
Posted: Sun 24 Jul 2011, 23:22 Post subject:
|
|
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.
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4787 Location: Kingwood, TX
|
Posted: Mon 25 Jul 2011, 04:54 Post subject:
|
|
~line 368 of stringman.c
Code: |
/* 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 github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3425 Location: Oregon
|
Posted: Mon 25 Jul 2011, 05:05 Post subject:
|
|
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.
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Mon 25 Jul 2011, 07:28 Post subject:
|
|
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, 16:34; edited 2 times in total
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Mon 25 Jul 2011, 07:52 Post subject:
|
|
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
|
Page 7 of 56 [833 Posts] |
Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 54, 55, 56 Next |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|