Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 25 Oct 2014, 06:26
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Gtkdialog Development
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 7 of 55 Posts_count   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 53, 54, 55 Next
Author Message
8-bit


Joined: 03 Apr 2007
Posts: 3382
Location: Oregon

PostPosted: 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
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3382
Location: Oregon

PostPosted: 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
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: 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?

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Wed 20 Jul 2011, 17:48    Post_subject:  

vovchik wrote:
A timer widget? Sounds tempting! Smile

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 Smile 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 Very Happy

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 Smile

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
View user's profile Send_private_message Visit_website 
8-bit


Joined: 03 Apr 2007
Posts: 3382
Location: Oregon

PostPosted: 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
View user's profile Send_private_message 
disciple

Joined: 20 May 2006
Posts: 6449
Location: Auckland, New Zealand

PostPosted: 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...

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3382
Location: Oregon

PostPosted: 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
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: 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
View user's profile Send_private_message Visit_website 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: 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 Smile

<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

Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: 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
View user's profile Send_private_message Visit_website 
8-bit


Joined: 03 Apr 2007
Posts: 3382
Location: Oregon

PostPosted: 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
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: 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

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3382
Location: Oregon

PostPosted: 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
View user's profile Send_private_message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: 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

Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
01micko


Joined: 11 Oct 2008
Posts: 7836
Location: qld

PostPosted: Mon 25 Jul 2011, 07:52    Post_subject:  

Wink



Smile

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 7 of 55 Posts_count   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 53, 54, 55 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1132s ][ Queries: 13 (0.0187s) ][ GZIP on ]