The time now is Wed 19 Jun 2013, 05:24
All times are UTC - 4 |
|
Page 38 of 54 Posts_count |
Goto page: Previous 1, 2, 3, ..., 36, 37, 38, 39, 40, ..., 52, 53, 54 Next |
| Author |
Message |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Thu 13 Sep 2012, 23:21 Post_subject:
|
|
Thanks for your encouragement vovchik
| zigbert wrote: | | ... sort-function="0/1/2" to the <tree> widget? |
I've just committed this in r426.
Because tree columns can have different data types, the tag attribute is called column-sort-function which must match columns of type string else you'll get a warning message. For example if you use column-type="string|uint64|string|double" then column-sort-function="1|0|2|0" would be fine or if you're only interested in the first column then column-sort-function="1" would work too.
See tree widget reference.
I'm getting towards the end now.
Regards,
Thunor
|
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2199 Location: UK
|
Posted: Sat 15 Sep 2012, 07:30 Post_subject:
|
|
Thanks for all the updates.. How do I get (checkout) a version older than the latest? Cos with r428 I have taller than usual <tree> entries... The height of each entry is larger than before... I would like to go back and build the latest rev where this doesn't happen, for now...
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sat 15 Sep 2012, 08:13 Post_subject:
|
|
| sc0ttman wrote: | | Thanks for all the updates.. How do I get (checkout) a version older than the latest? Cos with r428 I have taller than usual <tree> entries... The height of each entry is larger than before... I would like to go back and build the latest rev where this doesn't happen, for now... |
Hi sc0ttman
Can you please attach an image showing the taller rows. What version of Puppy are you using?
I haven't experienced this myself so I need to look into it. This is quite strange because Gtk+ decides what the row height is going to be based upon what you're putting into it and that hasn't changed. Maybe a newly introduced property that I've set is the cause.
You might want to try:
| Code: | | svn checkout -r 420 http://gtkdialog.googlecode.com/svn/trunk/ gtkdialog |
to take you back to before the tree widget update.
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sat 15 Sep 2012, 09:47 Post_subject:
|
|
| technosaurus wrote: | I figured out a more cross-platform way to do autorefresh:
(my previous implementation may be faster on linux, but won't work on systems without inotify like bsd, solaris, unix, mac or windows)
| Code: | --- src/widget_pixmap.c~ 2012-09-06 13:18:44.189883986 +0800
+++ src/widget_pixmap.c 2012-09-06 13:13:03.901816603 +0800
@@ -61,6 +61,8 @@ void widget_pixmap_clear(variable *var)
/***********************************************************************
* Create *
***********************************************************************/
+void autorefresh(GFileMonitor *monitor, GFile *file, GFile *to_file, GFileMonitorEvent event, gpointer image){
+ gtk_image_set_from_file( GTK_IMAGE(image), g_file_get_path(file));}
GtkWidget *widget_pixmap_create(
AttributeSet *Attr, tag_attr *attr, gint Type)
{
@@ -136,6 +138,9 @@ GtkWidget *widget_pixmap_create(
widget = gtk_image_new_from_file("");
}
}
+/* Note that this autorefresh is on by default - should add another tag_attr */
+ g_signal_connect(g_file_monitor_file(g_file_new_for_path(find_pixmap(file_name)),
+ G_FILE_MONITOR_NONE, FALSE, NULL), "changed", G_CALLBACK(autorefresh),(gpointer) widget);
break; /* Only one image is required */
}
}
|
|
Thanks for that technosaurus
It's in r430.
I've connected-up the "changed" signal so that application developers can make use of it too.
There are two tag attributes: auto-refresh and rate-limit (default 800ms) although I haven't managed to get rate-limit to change to anything other than its default.
http://code.google.com/p/gtkdialog/wiki/pixmap
[EDIT]
I'm thinking about the possibility of adding this file monitoring facility across all widgets so it's possible I'll not focus on auto-refresh but rather input-file-monitor and then the application developer has the choice of what they want to do on the "changed" signal e.g. <action signal="changed">refresh:PIXMAP</action>.
Cheers,
Thunor
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5292 Location: Valåmoen, Norway
|
Posted: Sat 15 Sep 2012, 10:58 Post_subject:
|
|
| thunor wrote: | | zigbert wrote: | | ... sort-function="0/1/2" to the <tree> widget? |
I've just committed this in r426. | Thank you !!!
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5292 Location: Valåmoen, Norway
|
Posted: Sat 15 Sep 2012, 11:02 Post_subject:
|
|
| thunor wrote: | | sc0ttman wrote: | | Thanks for all the updates.. How do I get (checkout) a version older than the latest? Cos with r428 I have taller than usual <tree> entries... The height of each entry is larger than before... I would like to go back and build the latest rev where this doesn't happen, for now... |
...
You might want to try:
| Code: | | svn checkout -r 420 http://gtkdialog.googlecode.com/svn/trunk/ gtkdialog |
| This useful info should be available a more visited place.
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5292 Location: Valåmoen, Norway
|
Posted: Sat 15 Sep 2012, 11:12 Post_subject:
|
|
| Code: | | <action signal="changed">refresh:PIXMAP</action> | Well, I don't have the knowledge to tell, but could this reduce the cpu-usage by replacing <timers> with <action signal="changed">?
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2199 Location: UK
|
Posted: Sat 15 Sep 2012, 12:29 Post_subject:
|
|
| Quote: | You might want to try:
| Code: | | svn checkout -r 420 http://gtkdialog.googlecode.com/svn/trunk/ gtkdialog |
to take you back to before the tree widget update. |
Thanks, that's what I was lookin for...
| Quote: | | Can you please attach an image showing the taller rows. What version of Puppy are you using? |
I am using Akita, based on pup420, but now wary5.1.x toolchain and libs, etc... I have attached the screenshots... The 1st is r420, showing normal height, the 2nd is r430, showing large heights..
EDIT: The change comes in at r428
Here is the code for <tree> in the PPM (I haven't changed it, it's original pup4 code):
| Code: | <tree icon=\"pet48x\">
<label>${Loc_Col_Package}|${Loc_Col_Description}|${Loc_Col_end}</label>
<height>280</height><width>668</width>
<variable>TREE1</variable>
<input>cat /tmp/filterpkgs.results</input>
<action signal=\"button-release-event\">/usr/local/petget/installpreview.sh</action>
<action signal=\"button-release-event\">/usr/local/petget/findinstalledpkgs.sh</action>
<action signal=\"button-release-event\">refresh:TREE2</action>
</tree> |
I notice the tree below doesn't change, here is the code for that one:
| Code: | <tree icon=\"pet48x\">
<label>${Loc_InstPack1}</label>
<height>100</height><width>480</width>
<variable>TREE2</variable>
<input>cat /tmp/installedpkgs.results</input>
<action signal=\"button-release-event\">/usr/local/petget/removepreview.sh</action>
<action signal=\"button-release-event\">/usr/local/petget/findinstalledpkgs.sh</action>
<action signal=\"button-release-event\">refresh:TREE2</action>
</tree> |
| Description |
r420, normal heights |
| Filesize |
101.53 KB |
| Viewed |
488 Time(s) |

|
| Description |
r430, large height of tree entries, first occurs r428 |
| Filesize |
73.55 KB |
| Viewed |
492 Time(s) |

|
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sat 15 Sep 2012, 13:20 Post_subject:
|
|
In r433, "auto-refresh" is now "file-monitor" to make it more generic so that I can add this functionality to other widgets later.
The monitor's "changed" signal is now a custom "file-changed" signal.
Nothing is auto-refreshed. If developers want to execute <action signal="file-changed">refresh:PIXMAP</action> then they now have the choice.
sc0ttman, try the latest r433 which will solve the tree issue. BTW the PPM looks really nice.
Going out jogging now...
|
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2199 Location: UK
|
Posted: Sat 15 Sep 2012, 13:57 Post_subject:
|
|
| thunor wrote: | sc0ttman, try the latest r433 which will solve the tree issue. BTW the PPM looks really nice.
Going out jogging now... |
Doh... I was just coming on here to say how damn proud I am that I located the the problem myself, and even fixed it by editing the source code, (also) re-enabling the 'g_strstrip' stuff in widget_tree.c...
But now I see you beat me to it..
BTW, I tested re-enabling all 3, which worked...
..but so did re-enabling only the 1st one, g_strstrip(oneline);
Thanks, enjoy the jog.
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3845
|
Posted: Sat 15 Sep 2012, 14:15 Post_subject:
|
|
| thunor wrote: | In r433, "auto-refresh" is now "file-monitor" to make it more generic so that I can add this functionality to other widgets later.
The monitor's "changed" signal is now a custom "file-changed" signal.
Nothing is auto-refreshed. If developers want to execute <action signal="file-changed">refresh:PIXMAP</action> then they now have the choice.
sc0ttman, try the latest r433 which will solve the tree issue. BTW the PPM looks really nice.
Going out jogging now... |
I'll have to test it out. My idea was to allow basic board and grid games using svg's include capabilities to place sprites in a grid. I already have a basic framework including simple collision detection.
800ms should be fine for card, board and strategy games
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sat 15 Sep 2012, 18:43 Post_subject:
|
|
| sc0ttman wrote: | Doh... I was just coming on here to say how damn proud I am that I located the the problem myself, and even fixed it by editing the source code, (also) re-enabling the 'g_strstrip' stuff in widget_tree.c...
But now I see you beat me to it..
BTW, I tested re-enabling all 3, which worked...
..but so did re-enabling only the 1st one, g_strstrip(oneline);
Thanks, enjoy the jog. |
When I recently updated the tree widget I saw those g_strstrips and as this isn't being done in other widgets, in the interests of performance I disabled them, but now we know g_strstrip strips [CR]LFs too (I ran some test code) so that's why that initial g_strstrip(oneline); was necessary. I've now replaced that with my usual [CR]LF stripping code and only used g_strstrip on the stock/icon-names if passed in because it's required. I've tested all sorts of weird rows with space and newlines scattered throughout and it renders as it should so I've committed that in r434 and it would be great if you could let me know if everything's ok.
Regards,
Thunor
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sun 16 Sep 2012, 08:40 Post_subject:
|
|
| zigbert wrote: | | Code: | | <action signal="changed">refresh:PIXMAP</action> | Well, I don't have the knowledge to tell, but could this reduce the cpu-usage by replacing <timers> with <action signal="changed">?
Sigmund |
I've just committed r436 and the file-monitor has been added to the [toggle]button and checkbox widgets. I can add it easily to the remaining widgets which I shall continue to do.
I was thinking when adding it to the checkbox that it would be quite useful for the conditional widget refreshing trick. Instead of having a timer refresh a checkbox once a second in case the checkbox's inputfile has changed, you'd do it on the file-monitor's "file-changed" signal which would refresh the checkbox only when necessary. So yeah, it will be more efficient.
|
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2199 Location: UK
|
Posted: Tue 18 Sep 2012, 07:55 Post_subject:
|
|
| thunor wrote: | I've now replaced that with my usual [CR]LF stripping code and only used g_strstrip on the stock/icon-names if passed in because it's required... so I've committed that in r434 and it would be great if you could let me know if everything's ok.
Regards,
Thunor |
I built r444 and it works OK, no extra tall <tree> entries.. Thanks.
BTW, I think I saw earlier someone way they'd like the build time config options in the help info. I would like that too, but not as much as I'd like to see the revision number when using -v ... I like VLCs -vvv option...
Thanks again.
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Wed 19 Sep 2012, 17:46 Post_subject:
|
|
| sc0ttman wrote: | I built r444 and it works OK, no extra tall <tree> entries.. Thanks.
BTW, I think I saw earlier someone way they'd like the build time config options in the help info. I would like that too, but not as much as I'd like to see the revision number when using -v ... I like VLCs -vvv option...
Thanks again. |
Thanks sc0ttman for testing.
In r451:
Compiling from SVN results in:
| Code: | # gtkdialog -v
gtkdialog version 0.8.1 r451 (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor
Built with additional support for: Glade, VTE. |
Compiling from a [future] source package results in:
| Code: | # gtkdialog -v
gtkdialog version 0.8.2 release (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor
Built with additional support for: Glade, VTE. |
Cheers,
Thunor
|
|
Back to top
|
|
 |
|
|
Page 38 of 54 Posts_count |
Goto page: Previous 1, 2, 3, ..., 36, 37, 38, 39, 40, ..., 52, 53, 54 Next |
|
|
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
|