The time now is Mon 23 Apr 2018, 06:08
All times are UTC - 4 |
Page 1 of 56 [833 Posts] |
Goto page: 1, 2, 3, ..., 54, 55, 56 Next |
Author |
Message |
Dougal

Joined: 19 Oct 2005 Posts: 2504 Location: Hell more grotesque than any medieval woodcut
|
Posted: Wed 22 Jun 2011, 15:09 Post subject:
Gtkdialog Development Subject description: Improving Gtkdialog |
|
The user thunor has started improving gtkdialog (and even created a Google Code project page), over at the gtkdialog-tips thread.
It had better have a thread of its own, for better visibility (and to avoid taking over the other thread).
Post here any bugs you know of or feature requests.
_________________ What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Last edited by Dougal on Thu 23 Jun 2011, 09:01; edited 1 time in total
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Wed 22 Jun 2011, 16:37 Post subject:
|
|
I started to post on the other thread, but I guess it should be continued here.....
thunor,
Many, many thanks for providing the multiple selection features, as it really supplies just that extra item needed for a modern interface.
Your speed and agility in taking Gtkdialog over has inspired and motivated everyone here.
Very best,
s
(That example you gave for multiple selection is absolutely terrific! Now I just have to compile and see if it actually works )
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Thu 23 Jun 2011, 09:58 Post subject:
|
|
Thanks Dougal for creating this thread and thanks seaside for your kind words What I'll do first then is create a [maintained] post listing improvements I've made to Gtkdialog and record anything I find useful to application developers as I dig through the source code.
Project Page
http://code.google.com/p/gtkdialog/
Downloading
There's little point in me creating source package releases at this time as it's quite fast moving. Therefore you'll need to download the source code from the SVN repository, but I'll explain the process and how to stay up-to-date. Open a terminal somewhere and type:
Code: | svn checkout http://gtkdialog.googlecode.com/svn/trunk/ gtkdialog
cd gtkdialog
./autogen.sh
make
|
You can pass the usual configure options to autogen.sh if you want. The gtkdialog binary will be in the src folder but you can do a "make install" as super user or "sudo make install" if you wish. Later, every few days or so depending on your level of interest, you can type this from within the same folder:
Code: | make clean
svn update
./autogen.sh
make
|
This will download only the files I've updated and you'll be in sync with what I'm doing.
Wiki
The widget reference is now complete and there is an interface to it on the Gtkdialog Project Page.
Development
Extended functionality, new features, bug fixes etc.
- AUTHORS, ChangeLog, issue tracker, update log
- Applied as many relevant patches as I could find and removed the compilation warnings
- Added <pixmap> widget image refresh code (example)
- Added <button> widget image refresh code (example)
- Added <pixmap> widget image scaling (example) (currently animated gifs stop animating)
- Added <button> widget image scaling (example) (currently animated gifs stop animating)
- Added <tree> widget none, single, browse and multiple selection modes (example)
- Added <hbox> and <vbox> widgets scrolling capability (example)
- Added <hseparator> and <vseparator> widgets (example)
- Added <comboboxtext> widget (example)
- Fixed bugs in the glade support (diff)
- Added <button> widget image positioning capability (example)
- Added <comboboxentry> widget (example)
- Added <hscale> and <vscale> widgets (example)
- Overhauled the <entry> widget (example)
- Overhauled the <menu> and <menuitem> widgets - part 1 (example)
- Fixed, tweaked, tidied-up, made consistent and added comments to many scripts within the examples folder
- Overhauled the <menu> and <menuitem> widgets - final (example)
- Improved the theme icon support (example)
- Added <spinbutton> widget (example)
- Added <timer> widget (example)
- Overhauled the <notebook> widget (example)
- Added <togglebutton> widget (example)
- Overhauled the fileselect action function (example)
- Added <statusbar> widget (example)
- Added <tree> widget support for inserting stock or theme icons from an input file (example)
- Added <colorbutton> widget (example)
- Overhauled the widget packing method (example)
Some widget properties and features may be unavailable to you if you are using an older version of GTK+, but they will not prevent you from compiling and using Gtkdialog as Gtkdialog checks the user's version of GTK+ at compile time and removes support for unsupported properties and features to enable compilation against different GTK+ versions. Ultimately though, the features that the application developer chooses to implement and therefore the version of GTK+ that his application requires is not within my realm of operation.
Retrieving and Testing Against Gtkdialog's Version
For Puppy Linux
Firstly you'll need to locate the correct binary (courtesy of 01micko):
Code: | if [ "$(which gtkdialog)" = "" ]; then
GTKDIALOG="gtkdialog3"
else
GTKDIALOG="gtkdialog"
fi
|
Now you're ready to check Gtkdialog's version number and Barry Kauler states that "Woof as from April 2011 has 'vercmp' which will be in all Puppy builds":
Code: | function funcGTKDVGet() {
GTKDV=( $($GTKDIALOG -v) )
GTKDV=${GTKDV[2]}
echo "Gtkdialog version: $GTKDV"
if vercmp $GTKDV lt 0.7.21 ; then
echo "This application requires at least gtkdialog-0.7.21"
exit
fi
}
funcGTKDVGet
|
For *nix in General
Gtkdialog's version number increased from 0.59.8 to 0.6.0 in 2006 and then 0.7.1 through to 0.7.21 where we are today, so breaking it down into major, minor and revision (micro) would require some tweaking, but if we treat it as a string then the extended test command (extended test facility) will suffice:
Code: | GTKDIALOG=gtkdialog
function funcGTKDVGet() {
GTKDV=( $($GTKDIALOG -v) )
GTKDV=${GTKDV[2]}
echo "Gtkdialog version: $GTKDV"
if [[ $GTKDV < 0.7.21 ]]; then
echo "This application requires at least gtkdialog-0.7.21"
exit
fi
}
funcGTKDVGet
|
Research
Gtkdialog uses a lexer/parser (Flex/Bison) which manages the XML-like structures that applications are encoded within. Most widget tags accept attributes (tag attributes) and the majority of these are GTK widget properties, but some have been created exclusively for Gtkdialog (custom tag attributes) with the hbox and vbox's "scrollable" attribute being a good example. If you'd like to know which attributes can be applied to a widget, the best place to look is the GTK+ 2 Reference Manual. Some tags such as <table> don't currently accept attributes because that's how they've been set-up in the lexer/parser, but these things can be modified if needed. Please note that the original author created the widgets in the way that he thought was appropriate, so some attributes might make GTK unhappy and you'll know via the terminal or receive a segfault in return for your meddling
Widgets inherit properties from their ancestor classes, so for example the <text> widget being a GtkLabel has the object hierarchy of GtkWidget->GtkMisc->GtkLabel and the properties of all of those object classes become available to the application developer for implementation as widget tag attributes. Following is an example of this property inheritance: the text widget is a GtkLabel which inherits the xpad and ypad properties from its parent class GtkMisc and the name property from its ancestor class GtkWidget:
Code: | <text name="txtLabel "xpad="300" ypad="300">
<label>Testing this label</label>
</text>
|
After a widget has been created it is populated with data (if any). The directives (visible, default, width, height etc.) and custom tag attributes are applied and the signals are connected. Then it is realized and the GTK properties are passed on to GTK to be set as widget properties. Note that directives and custom tag attributes are applied pre-realization and GTK properties post-realization. This is why you can visibly see the effects of the width-request and height-request GTK properties but not the width and height directives; there is a note about this in the ChangeLog: "The widget properties are set only when the widget is realized. This modification has been made because some properties can be set only if there is a parent window".
Widget Construction
It helps to understand how the Gtkdialog widgets are constructed, especially if you are experiencing difficulties applying an attribute:
To be continued...
Last edited by thunor on Thu 22 Sep 2011, 21:13; edited 59 times in total
|
Back to top
|
|
 |
Moose On The Loose

Joined: 24 Feb 2011 Posts: 778
|
Posted: Thu 23 Jun 2011, 11:04 Post subject:
Re: Gtkdialog Development Subject description: Improving Gtkdialog |
|
Dougal wrote: | The user thunor has started improving gtkdialog (and even created a Google Code project page), over at the gtkdialog-tips thread.
It had better have a thread of its own, for better visibility (and to avoid taking over the other thread).
Post here any bugs you know of or feature requests. |
Make sure you fix this:
Code: |
static gint
get_program_from_stdin(void)
{
/* Moose: changed from PRG_MEMORY */
source = PRG_STDIN;
PIP_DEBUG("Start.");
}
|
main.c line 312
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 2641
|
Posted: Thu 23 Jun 2011, 11:17 Post subject:
|
|
Ou know what would be very useful? If you could manage to create diffs as you go along, which separate each feature or bugfix into a single patch. This would help others to track (and correct if needed) each change you make. I know this is kind of counter to any VCS system you are using -although some (git, for instance) make this step very easy.
I'm very glad to see you continuing the development!
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Thu 23 Jun 2011, 12:33 Post subject:
|
|
01micko:
I thought I'd mention that the gtkdialog3 you compiled in this post http://www.murga-linux.com/puppy/viewtopic.php?t=38608&start=509 broke any tree widget with this error "gtkdialog3: symbol lookup error: gtkdialog3: undefined symbol: g_malloc_n". This was testing in pup 431.
thunor,
The research you're doing on Gtkdialog is especially valuable because much of this is such a mystery Thanks again.
Cheers,
s
|
Back to top
|
|
 |
Dougal

Joined: 19 Oct 2005 Posts: 2504 Location: Hell more grotesque than any medieval woodcut
|
Posted: Thu 23 Jun 2011, 14:42 Post subject:
|
|
amigo wrote: | Ou know what would be very useful? If you could manage to create diffs as you go along, which separate each feature or bugfix into a single patch. |
The project uses SVN, so the log will probably show you all you need to know...
_________________ What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
|
Back to top
|
|
 |
Dougal

Joined: 19 Oct 2005 Posts: 2504 Location: Hell more grotesque than any medieval woodcut
|
Posted: Thu 23 Jun 2011, 14:46 Post subject:
Re: Gtkdialog Development Subject description: Improving Gtkdialog |
|
Moose On The Loose wrote: | Make sure you fix this:
Code: |
static gint
get_program_from_stdin(void)
{
/* Moose: changed from PRG_MEMORY */
source = PRG_STDIN;
PIP_DEBUG("Start.");
}
|
main.c line 312 |
This seems to indicate he did (the log also shows he used the Debian patches, from which this is taken.
_________________ What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Thu 23 Jun 2011, 16:18 Post subject:
|
|
Thanks seaside.
I removed the attachments, advising to try gtkdialog from svn in the edit. It's probably better that gtkdialog is compiled in an older puppy for compatibility.
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Thu 23 Jun 2011, 16:40 Post subject:
|
|
01micko wrote: |
Thanks seaside.
I removed the attachments, advising to try gtkdialog from svn in the edit. It's probably better that gtkdialog is compiled in an older puppy for compatibility. |
01micko,
If you think it was just the compilation, you might just leave the source up, so that someone could compile it for earlier pups.
Regards,
s
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Thu 23 Jun 2011, 16:55 Post subject:
|
|
Hi seaside,
Just going by the "undefined symbol: g_malloc_n" error that is my hunch. Actually I might boot 431 and try it out with my patch (replaced incidentally ) and the svn source.
Cheers
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Thu 23 Jun 2011, 17:02 Post subject:
|
|
01micko wrote: | Hi seaside,
Just going by the "undefined symbol: g_malloc_n" error that is my hunch. Actually I might boot 431 and try it out with my patch (replaced incidentally ) and the svn source.
Cheers |
Fantastic..
Thanks,
s
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Thu 23 Jun 2011, 17:21 Post subject:
|
|
Hi seaside
Looks ok in 431 . Petget is the most obvious app using <tree> widget and that works fine with the patch I supplied. Now doing an svn checkout. BTW, I made a silly little dice roller app in the games section and will replace the exec I uploaded there when done. (provided it works ok in later pups )
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Thu 23 Jun 2011, 17:53 Post subject:
|
|
01micko wrote: | Hi seaside
Looks ok in 431 . Petget is the most obvious app using <tree> widget and that works fine with the patch I supplied. Now doing an svn checkout. BTW, I made a silly little dice roller app in the games section and will replace the exec I uploaded there when done. (provided it works ok in later pups ) |
01micko,
Wow, that was fast. Will this include thunor's multi-selection update?
Thanks,
s
(I might as well try dice, the stock market hasn't been so good)
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Thu 23 Jun 2011, 17:56 Post subject:
|
|
Yes (Freshly compiled and tested in 431, wary and spup)
Cheers
Description |
|
Filesize |
56.62 KB |
Viewed |
8595 Time(s) |

|
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
|
Page 1 of 56 [833 Posts] |
Goto page: 1, 2, 3, ..., 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
|