The time now is Tue 24 Apr 2018, 05:04
All times are UTC - 4 |
Author |
Message |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Wed 10 Apr 2013, 17:48 Post subject:
|
|
Here is a minor issue:
Tooltip containing & fails
Code: | #!/bin/sh
echo -e "1|2|3 - tooltip with & fails\n1|2|3 - tooltip " > /tmp/test
echo '
<window>
<vbox>
<tree tooltip-column="5" hover-selection="true">
<label>1|2|tooltip column</label>
<input file>/tmp/test</input>
</tree>
</vbox>
</window>
' | gtkdialog -s
|
_________________ Stardust resources
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Wed 10 Apr 2013, 20:08 Post subject:
|
|
Dear Zigbert,
Pango markup doesn't like ampersands, greater than or less than chars. To overcome that situation, just use &, followed by a semicolon.
With kind regards,
Vovchik
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Thu 11 Apr 2013, 16:52 Post subject:
|
|
& works for me (like HTML) -- GTK was warning me in the terminal too.
I've not used that property before. I'm impressed that you worked out it was column 5 i.e. gtkdialog maintains 3 hidden columns on the left for pixmap management
I imagine you could make some good use for tooltips in pMusic within the Music Sources Overview.
Regards,
Thunor
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Thu 11 Apr 2013, 19:00 Post subject:
|
|
Whilst I'm here:
In SVN now I've added a command-line option:
Code: | GTK+ 2 build:
--styles=filename Load styles in the form of a resource file.
GTK+ 3 build:
--styles=filename Load styles in the form of a style sheet. |
which takes either a gtkrc or a gtk.css file respectively. The usual GTK2_RC_FILES=$TEMP_DIR/gtkrc:~/.gtkrc-2.0 still works for GTK+ 2 but now directly loading it works too, so take your pick.
I've created a new action function called "loadstyles" which you would use like:
Code: | <action>loadstyles:/path/to/some/gtk.css</action> |
which works for GTK+ 3 and it should be possible with GTK+ 2 but I haven't got it to work yet, so at least currently with GTK+ 3 you can change styles at runtime
The example examples/eventbox/eventbox in SVN demonstrates how to detect the gtk version and pass the correct styles file (css is a lot easier than the original syntax).
I'm currently still going through the examples and testing them with GTK+ 3. All the examples will now pickup GTKDIALOG from the environment which makes my life easier at least because you can use
Code: | GTKDIALOG=gtkdialog ./hbox_scrollable
or
GTKDIALOG=gtk3dialog ./hbox_scrollable |
for example or just export it and then you won't have to keep declaring it.
So, what's next, qt4dialog, sdldialog Only joking although sdldialog would be pretty cool.
Cheers,
Thunor
Last edited by thunor on Thu 11 Apr 2013, 19:32; edited 1 time in total
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Thu 11 Apr 2013, 19:31 Post subject:
|
|
thunor wrote: | Whilst I'm here:.. [snip]
So, what's next, qt4dialog, sdldialog Only joking although sdldialog would be pretty cool. |
Ha.. nearly suggested that one (a few pages back) given you have a good SDL background.
EDIT: however, most pups don't ship with SDL as standard. I did it in slacko for a bit more functionality ootb, at not a huge cost in terms of bloat.
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Thu 11 Apr 2013, 20:30 Post subject:
|
|
01micko wrote: | Ha.. nearly suggested that one (a few pages back) given you have a good SDL background.
EDIT: however, most pups don't ship with SDL as standard. I did it in slacko for a bit more functionality ootb, at not a huge cost in terms of bloat. |
I wrote an SDL engine a few years back but it became one of those projects that never gets finished for one reason or another (Tetravex works though as long as you stay away from the unfinished high score entry) and I've been thinking about recycling it Anyway, just an idea I've got whizzing around.
Yeah, I liked having the full SDL monty with Slacko 5.5 because normally what I do is download all the SDL source packages and dependencies and create my own pets but I was mostly spared that, which was nice. It was in fact the default presence of those libraries that got me thinking.
What other lightweight toolkits does Puppy include? I've got flsynclient so there must be fltk I guess. I don't really know much about it. I'm just thinking out loud.
Time to get some sleep anyway, cheers,
Thunor
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Mon 15 Apr 2013, 11:51 Post subject:
|
|
vovchik wrote: | Pango markup doesn't like ampersands, greater than or less than chars. To overcome that situation, just use &, followed by a semicolon. | Thank you for the knowledge.
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Mon 15 Apr 2013, 11:52 Post subject:
|
|
thunor wrote: | I imagine you could make some good use for tooltips in pMusic within the Music Sources Overview. | Already there
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 4208 Location: Kiel,Germany
|
Posted: Thu 18 Apr 2013, 10:53 Post subject:
|
|
Just a short catchup :
Have compiled gtkdialog-0.7.20-21-r83 from bk sources and 0.8.2 from google code
on Puppy derivate having gtk-2.16.1 :
svg icons don't work for me , showing the icon for not available ( paper with X ) .
Path to the svg is there and inscapelite opens and shows shows the created svg .
ls /usr/lib/librsvg*
/usr/lib/librsvg-2.a /usr/lib/librsvg-2.la /usr/lib/librsvg-2.so /usr/lib/librsvg-2.so.2 /usr/lib/librsvg-2.so.2.22.3
Description |
|
Filesize |
54.57 KB |
Viewed |
672 Time(s) |

|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4787 Location: Kingwood, TX
|
Posted: Thu 18 Apr 2013, 16:48 Post subject:
|
|
IIRC there was a problem displaying svg that ended up being related to glib - I think Jemimah finally tracked it down
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 4208 Location: Kiel,Germany
|
Posted: Thu 18 Apr 2013, 19:51 Post subject:
[SOLVED] Svg not displayed in gtkdialog 3 and 4 |
|
Quote: | hmmm, it works on Puppeee, though the build is slightly different. Can someone on 4.3.1 check? I think Ttuuxxx updated the gtk on Puppies, and forgot SVG support or something because I've had other problems with tray applets on Puppies in the past. |
Fond the above : Goggles Music Manager
http://murga-linux.com/puppy/viewtopic.php?p=409260#409260
And it's true , runtt21 used a 432 devx by ttuuxxx for Macpup Foxy 3 . Opera 2 has gtk2-14.7 but i have put in the 16.1 from F3 so geany shows the delete icon-button in the find entry line . Will check things out !
Cheers !
EDIT:
Have compiled 0.8.2 with the 14.7 default gtk-2 libraries of Puppy-4.3.1 and svg works now for latest woof2 partview . technosaurus, thank you very much !
/EDIT
|
Back to top
|
|
 |
simargl
Joined: 11 Feb 2013 Posts: 572
|
Posted: Sun 28 Apr 2013, 04:01 Post subject:
|
|
.
Last edited by simargl on Sun 01 Sep 2013, 11:04; edited 1 time in total
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Tue 30 Apr 2013, 15:00 Post subject:
|
|
Working with pMusic 4, I have met some issues with the latest gtkdialog. I wouldn't call them bugs as things may work as expected. On the other hand, I see no reason for not mention, and maybe one or two could easily be 'fixed'.
vbox / hbox
If scrollable="true". I am not able to get use of space-expand="true" space-fill="true" to expand width.
I have to use <window width-request="300">, but this a not the best solution if someone uses a longer NLS-string.
Improving my template for a right-click menu, I wanted to add a frame. But the <frame> widget is both not complete (always a gap for label), and takes a lot of place since I am not able to set spacing, I looked at the scrollable vbox. This one accepts both spacing and different shadow-types...
This is basically how the right-click menu looks like. Here is scrollable set to true, so window won't expand to show the complete label. Code: | echo '<window decorated="false" skip_taskbar_hint="true" resizable="false" height-request="40" modal="true">
<vbox spacing="2" scrollable="true" hscrollbar-policy="2" vscrollbar-policy="2" space-expand="true" space-fill="true">
<hbox spacing="0" space-expand="false" space-fill="true">
<pixmap height-request="20" icon_size="1" space-expand="false" space-fill="false"><input file stock="gtk-add"></input></pixmap>
<button height-request="20" xalign="0" can-focus="no" relief="2" space-expand="true" space-fill="true">
<label>" This could have been a nice ADD menuitem, but menu is too narrow"</label>
<action>EXIT:exit</action>
</button>
</hbox>
</vbox>
<action signal="focus-out-event">EXIT:exit</action>
</window>' | gtkdialog -s |
Using a scrollable vbox is of course not necessary here, but a ordinary vbox won't let me set a frame. It seems to me that the option Shadow-type only works if scrollable="true".
tree
One of the major improvements in pMusic 4, is the switching from table to tree widget and the usage of multiple selection. This gives many new features when it comes to track/playlists/file managing. This has lead to a simpler workflow. and it is looking all good. What is a bit awkward, is that hover-selection can't be combined with a selection-mode
With multiple selection activated (selection-mode="3"), selecting a list-item is activated after the signal="button-press-event", and the right-click menu is shown by that signal. This is logic, because else the selection would be deactivated when right-click. BUT! this means that the user has to first click on an item, and then click another time to show the menu. If hover-selection was possible to combine with selection-mode this would work as other gtk-apps. This would also allow drag and drop internally in any gtkdialog app. ( Am I dreaming... ) Drag and drop works in the pMusic playlist, but only because multiple-selection isn't activated and hover-selection="true".
Switching from <table> to <tree> has been easy with the latest updates of gtkdialog. In fact most stuff works better with the tree widget. But I have met one tiny issue. To force the scrollbar to top I clear:tree before refresh:tree. This is a nice 'trick', but works only for the hscrollbar. Strangely the clear command does NOT reset vertical scrollbar.
Thanks for gtkdialog
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Tue 30 Apr 2013, 18:11 Post subject:
|
|
I'll have a look at these issues soon, a bit at a time because I've got other things to do at the moment.
I have noticed that the GtkLabel text in the <text> widget is being rendered differently in gtk3 but I'm testing the examples and then researching any issues/differences and I've haven't reached "t" yet.
[EDIT] @simargl: I think you're just assuming wrongly regarding the justify property: justify is relative to the other lines within the same widget; the xalign property is what you want -- the examples/text/text_advanced and examples/text/text_attributes demonstrate both of these.
I'll start on your issues Sigmund tomorrow evening.
Regards,
Thunor
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Wed 01 May 2013, 20:17 Post subject:
|
|
zigbert wrote: | ...
vbox / hbox
If scrollable="true". I am not able to get use of space-expand="true" space-fill="true" to expand width.
I have to use <window width-request="300">, but this a not the best solution if someone uses a longer NLS-string.
Improving my template for a right-click menu, I wanted to add a frame. But the <frame> widget is both not complete (always a gap for label), and takes a lot of place since I am not able to set spacing, I looked at the scrollable vbox. This one accepts both spacing and different shadow-types...
...
Using a scrollable vbox is of course not necessary here, but a ordinary vbox won't let me set a frame. It seems to me that the option Shadow-type only works if scrollable="true".
... |
Making a vbox scrollable packs it inside a GtkViewport inside a GtkScrolledWindow and that's it. It does what you would expect it to such as expanding to accommodate its contents and adding scrollbars if it becomes bigger than the viewport that you're looking through. shadow-type does indeed only affect the GtkViewport.
The frame widget is flawed because all of the empty space within the tag becomes the label. I'm sure the original author thought it was a good idea at the time but it means that you can't set GtkFrame properties. Also it automatically has a vbox placed within it and of course you can't set its properties either. Anyway, even though without a label the border is unbroken, there's a top margin.
You could try h/vseparators I just tried it and if you set the spacing to 0 then they connect at the corners.
[EDIT] Actually forget the separator idea -- it'll drive you insane I was just playing with an eventbox with a border inside an eventbox with a dark background which is great but it's theme dependent. Also gtk3 requires the interior eventbox to have a background colour set which again is theme dependent.
Regards,
Thunor
Last edited by thunor on Thu 02 May 2013, 11:19; edited 1 time in total
|
Back to top
|
|
 |
|
|
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
|