Gtkdialog Development

Under development: PCMCIA, wireless, etc.
Message
Author
simargl

#761 Post by simargl »

.
Last edited by simargl on Sun 01 Sep 2013, 15:01, edited 1 time in total.

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#762 Post by thunor »

simargl wrote:
thunor wrote:[*]Added gtk3 specific code to the comboboxtext and comboboxentry widgets so that they now function identically to the gtk2 equivalents.
Does this mean sfs_load will now work with gtk3 because it uses combobox, sorry if this is stupid question I had to ask.
No, it means that in gtk3 some of the comboboxtext/entry functions are named differently and take an additional parameter and I had to compensate for that. I then checked them to make sure that they behave identically in gtk2 and gtk3.
simargl wrote:Here is how I named gtkdialog binaries in alphaos:
version 0.8.3 installed as /usr/bin/gtkdialog2
gtkdialog3 and gtkdialog4 are symbolic links pointing to this version

version svn504 installed as /usr/bin/gtkdialog

Idea for this came from python package in Archlinux, where older version 2.7 is named python2, and new version 3.3 is just python - I think that make sense.

Cheers!
I create gtkdialog. It is not my business what people rename it to. Those incrementing numbers trailing gtkdialog are not directly related to gtkdialog's version number. You need to talk to the people who rename it.

Regards,
Thunor

simargl

#763 Post by simargl »

.
Last edited by simargl on Sun 01 Sep 2013, 15:00, edited 1 time in total.

scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

#764 Post by scsijon »

thunor wrote:
zigbert wrote:...
Puppy apps will make it into the future.
It had to be done didn't it. The gates to gtk3 are now open for Puppy apps and Puppy itself although it may yet be discovered that gtk2 is worth staying with :P
.
.
.
There will likely be some tweaking involved.
Just because gtk3 is appearing is not a reason to abandon gtk2!

In some cases, gtk2 will always be the better option.

Having worked with both mageia while building mage2, and my work with opensuse which goes back to the early SuSE 6 days, both have the two gtk's operating.

I see them as being not exclusive, with one totally replacing the other, but complementory as is gtkdialog3 and gtkdialog4 within puppy.

By the way, QT4 / QT5 compiled for gtk2 needs to be recompiled if gtk3 is used in any way as are quite a number of other libs, it won't be a simple task!


scsijon

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#765 Post by thunor »

simargl wrote:
thunor wrote:I create gtkdialog. It is not my business what people rename it to.
Sorry, I thought you'd care. And you do great job at creating gtkdialog. Bye
It's not about caring, it's about the fact that there are people (or person) who specifically choose/set the names of the gtkdialog binaries and [Puppy] developer's scripts look for these names and it doesn't involve me, so it's not my business giving you advice or expressing an opinion on your own naming scheme however much thought you may have put into it :) I recommend that you discuss this with somebody who assembles a Puppy distro/flavour.

Try web searching "gtkdialog2 gtkdialog3 gtkdialog4 gtkdialog5" and you should find everything you need to know within the first few posts.

Regards,
Thunor

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#766 Post by zigbert »

Thunor
I tested the new column-resizable <tree> option, but could not get it to work.
I wonder, does this option require gtk3?

Image

Code: Select all

gtkdialog -v > /tmp/gtkdialog_input

echo '
<vbox>
 <tree column-resizable="false|false|false">
  <label>"First column|Second column|Third column"</label>
  <input file>/tmp/gtkdialog_input</input>
  <width>600</width>
 </tree>
</vbox>' | gtkdialog -s

Sigmund

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#767 Post by thunor »

Hi Sigmund

Try column-resizeable. I've checked that it works in both gtk2/3 and it does.

Let me know how you get on because I can tweak things to a degree.

Regards,
Thunor

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#768 Post by zigbert »

Okeeey, I see
...It works how you intended, but not the way I expected.... :)
The column is now not resizable, but it still auto-widen the column to fit content. As I understand it, gtk-tree-view-columns-autosize should handle this, - not the resizing done by the user.

This example should explain the difference between <tree> and <table>

Code: Select all

gtkdialog -v > /tmp/gtkdialog_input

echo '
<vbox>
 <tree column-resizeable="false|false|false">
  <label>"INPUT defines width of column|Second|Third"</label>
  <input file>/tmp/gtkdialog_input</input>
  <width>600</width>
 </tree>
 <table>
  <label>"HEADER defines width of column|Second|Third"</label>
  <input file>/tmp/gtkdialog_input</input>
 </table>
</vbox>' | gtkdialog -s

Sigmund

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#769 Post by thunor »

@Sigmund

These are the column properties but you can't set them, I have to create custom tag attributes for them:
https://developer.gnome.org/gtk2/2.24/GtkTreeViewColumn.html#GtkTreeViewColumn.properties

I'll have a play with them and see if I can set the width by column header label rather than the contents of the row, or simulate it somehow.

Cheers

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#770 Post by zigbert »

Thunor
I am hoping for the best.
This might sound like a minor issue, but the fact is that this behavior makes pMusic still choose <table> over <tree>. And keep in mind that using the <tree> widget would give icons, doubleclick and a right-click menu.

It must be mentioned that a secondary solution would be to update column width when the <tree> widget is updated. - So that the column width decreases if content has become narrower.


Thank you for your effort!
Sigmund

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#771 Post by zigbert »

svn510
column-width works great :D
Thanks a lot


pMusic 4 - here we go
Sigmund

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#772 Post by thunor »

@Sigmund

In revision 512:

column-sizing="mode|mode|mode|...".

This is a combination of the sizing and width properties:
  • If mode is 0 or "" then column grows as default (GTK_TREE_VIEW_COLUMN_GROW_ONLY)
  • If mode is 1 then column autosizes i.e. grows and shrinks (GTK_TREE_VIEW_COLUMN_AUTOSIZE)
  • If mode is >= 2 then column width is fixed to the value in mode (GTK_TREE_VIEW_COLUMN_FIXED)
Cheers,
Thunor

[EDIT] You posted just before I pressed Submit. I've tweaked it in r511. Anyway, I'm glad it works :)

Also, "Please note that GTK_TREE_VIEW_COLUMN_AUTOSIZE is inefficient for large views, and can make columns appear choppy".

I haven't documented it yet, wiki/reference update to follow.

[EDIT2] I've renamed it to column-sizing in r512 because it makes more sense naming it that way around.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#773 Post by zigbert »

Thunor
Great stuff, just a 'minor' issue...
Using single-click runs <action> when resizing column width.
Example should explain:

Code: Select all

gtkdialog -v > /tmp/gtkdialog_input

echo '
<vbox>
 <text><label>Using signal="button-release-event", action is executed when resizing column width</label></text>
 <tree column-sizing="50|1|1">
  <label>"First|Second|Third"</label>
  <input file>/tmp/gtkdialog_input</input>
  <action signal="button-release-event">gxmessage "hello" &</action>
 </tree>
</vbox>' | gtkdialog -s

Sigmund

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#774 Post by zigbert »

Credits to thunor

Image

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#775 Post by thunor »

zigbert wrote:...
Using single-click runs <action> when resizing column width.
...
Nice screenshot :) I just listened to Tor with the Hammer and I like that.

Are using the button-release-event for a menu? I guess you've gone to bed now but let me know what it is you are trying to achieve with this signal and then we might be able to work something out. You know you can't resize the columns with any other mouse button than 1?

This works fine if this is what you need:

Code: Select all

<action signal="button-release-event">[ $PTR_BTN -eq 3 ] && gxmessage "hello" &</action>
But you know that anyway so I guess it's not what you want.

Cheers,
Thunor

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#776 Post by thunor »

murga-linux is alive! https://webchat.freenode.net/?channels=puppylinux was fun though :)

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#777 Post by zigbert »

Thunor
pMusic will resize column-width nicely, as I have settled on selection-mode="3" for mulitple selections. But, it would also take benefit of a signal="button-release-event" (left-click) if that was possible without interfere with resizing column-width.


Sigmund

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#778 Post by zigbert »

zigbert wrote:But, it would also take benefit of a signal="button-release-event" (left-click) if that was possible without interfere with resizing column-width.
Probably not, since single-click is dedicated to selection.


Sigmund

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#779 Post by thunor »

My problem is that that's the way the widget is made and there's nothing that I can adjust anywhere.

In gtkdialog, when a widget is created it results in a widget pointer which is stored in an array. Signals are then connected-up, some unique to the widget plus many common signals which are actually part of the base class GtkWidget. The button-release-event signal is simply coming from the tree (GtkTreeView) widget (it's connected to the tree widget's pointer) and I can't modify where it gets emitted from.

Let me know how you get on. Maybe you're already doing it differently now.

Regards,
Thunor

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#780 Post by zigbert »

Thunor
Nothing to bother about. Everything is working properly.


Thank you a lot for your cooperation!
Sigmund

Post Reply