Page 37 of 42

Posted: Sun 31 Mar 2013, 09:05
by zigbert
A brief look into the gtk3 transition: - This won't be too hard....

The only issue I see is that table-widget doesn't auto-resize column-width as the tree-widget does.
Auto-resizing will make a mess in pMusic's sourcelist, where ie. urls may be long and auto-moves all other columns out in the blue (read: to the right).
Looking at the docs tells that this should be possible to override. But I can't figure out how ... :oops:


Thanks for any suggestions.
Sigmund

Posted: Sun 31 Mar 2013, 10:59
by thunor
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
zigbert wrote:...
The only issue I see is that table-widget doesn't auto-resize column-width as the tree-widget does.
...
Resizeable tree columns was forced to TRUE in code because there was no developer interface to that property. What I shall do is make a custom tag attribute and you can set it with column-resizeable="true|false|true|false".

There will likely be some tweaking involved.

Posted: Sun 31 Mar 2013, 11:37
by thunor
simargl wrote:...
My package manager is working with this version - screenshot bellow, grub4dos also seems to work, sfs_load and pwireless2 don't
...
I've updated the build scripts so that the next time you checkout gtkdialog you should find that ./autogen.sh works. Thanks for the assistance with that.

If the developers of sfs_load and Pwireless2 choose to support gtk3 then they will need to change the combobox, list and table widgets to comboboxtext and tree widgets.

Important Disclaimer
If somebody wants to create a gtk3 Puppy then they need to talk to the developers of those applications that require updating. I want to make it clear from the outset that I'm not pushing Puppy towards gtk3 or forcing developers to update their applications -- it's not mandatory and it's not my business, I'm just supporting another library :)

Regards,
Thunor

Posted: Sun 31 Mar 2013, 15:07
by rcrsn51
thunor wrote:If the developers of sfs_load and Pwireless2 choose to support gtk3 then they will need to change the combobox, list and table widgets to comboboxtext and tree widgets.
Could you please explain that some more? Does that mean that gtkdialog4 would be fixed at gtk-2 and gtkdialog5 would become the gtk-3 version?

So would Puppy builders need to include both versions of gtk? For example, alphaOS has both.

Posted: Sun 31 Mar 2013, 15:15
by jpeps
rcrsn51 wrote:
thunor wrote:If the developers of sfs_load and Pwireless2 choose to support gtk3 then they will need to change the combobox, list and table widgets to comboboxtext and tree widgets.
Could you please explain that some more? Does that mean that gtkdialog4 would be fixed at gtk-2 and gtkdialog5 would become the gtk-3 version?

So would Puppy builders need to include both versions of gtk? For example, alphaOS has both.
It makes more sense to just use the respective names to maintain backwards compatibility.

Posted: Sun 31 Mar 2013, 15:20
by rcrsn51
Regarding the combobox vs comboboxtext widgets:

IIRC, I once looked at comboboxtext in an older gtkdialog and it worked differently from combobox.

But I checked in Slacko and they now appear to be identical. Is comboboxtext now a plug-and-play replacement for combobox?

Posted: Sun 31 Mar 2013, 17:35
by thunor
Uh oh, the mob's assembled with its truck-load of rocks :lol:

Important Disclaimer Two
In gtk2, the combobox (GtkCombo), list (GtkList) and table (GtkCList) widgets were deprecated (I think they were remnants of gtk1) and the gtk3 developers have expunged these old deprecated widgets from gtk3. It's very sad and if you're not happy about it then find out where they live and pooh on their lawns.

I'm adding additional support for the gtk3 library -- it's optional -- so if you want your application to work with this additional optional gtk3 library then you'll have to accept the features that the gtk3 developers have offered you.
jpeps wrote:It makes more sense to just use the respective names to maintain backwards compatibility.
It doesn't make sense to do that. If I substitute a comboboxentry instead of a combobox, a tree instead of a list, a tree instead of a table then they'll behave in the same way and support the same properties? Of course they won't, but an application developer can additionally make their applications work with the optional gtk3 library by upgrading a few widgets if necessary.
rcrsn51 wrote:Could you please explain that some more? Does that mean that gtkdialog4 would be fixed at gtk-2 and gtkdialog5 would become the gtk-3 version?

So would Puppy builders need to include both versions of gtk? For example, alphaOS has both.
That is absolutely none of my business in any possible way.
rcrsn51 wrote:Regarding the combobox vs comboboxtext widgets:

IIRC, I once looked at comboboxtext in an older gtkdialog and it worked differently from combobox.

But I checked in Slacko and they now appear to be identical. Is comboboxtext now a plug-and-play replacement for combobox?
The combobox has an entry and is a very limited widget, so a comboboxentry would supplant it very easily.

Regards,
Thunor

Posted: Sun 31 Mar 2013, 17:56
by rcrsn51
thunor wrote:That is absolutely none of my business in any possible way.
I apologize. I should have directed the question towards the Puppy developers. I was just trying to get a general sense of where this was heading.

Posted: Sun 31 Mar 2013, 18:16
by thunor
Regarding the gtk3 support in combination with Slacko 5.5 and the audacious sfs -- there's no default theme engine or theme so I've compiled the 3.4 branch of gnome-themes-standard (33MB) and got rid of everything except the default Adwaita engine and theme resulting in a 92KB pet, so if you want it then it's attached to this post.

You'll need to create ~/.config/gtk-3.0/ and add two files:
settings.ini

Code: Select all

[Settings]
gtk-theme-name = Adwaita
gtk-fallback-icon-theme = gnome
and gtk.css which will be empty.

gtk3 doesn't support ~/gtkrc-2.0 and GTK2_RC_FILES. The gtk.css file above is explained here.

There is a gtk3 function to load a style sheet so it might be that I'll have to add support for loading a custom gtk.css file.

Regards,
Thunor

Can't compile gtkdialog.gtk rev 505

Posted: Sun 31 Mar 2013, 18:49
by matiasbatero
Thank you so much Thunor for you effort!!! :)

I can't compile gtkdialog.gtk3 rev 505 yet.

I do the next steps:

Code: Select all

svn checkout http://gtkdialog.googlecode.com/svn/trunk/ gtkdialog
cd gtkdialog
./autogen.sh --enable-gtk3=yes
make
All works fine, but "make" gives me this error

Code: Select all

collect2: error: ld returned 1 exit status
make[3]: *** [gtkdialog] Error 1
make[3]: Leaving directory `/home/matt/gtkdialog/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/matt/gtkdialog/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/matt/gtkdialog'
make: *** [all] Error 2
Compiling with gtk2 works perfectly. But with ./autogen.sh --enable-gtk3=yes no.

I don't know how to solve this.
PD: i'm using archlinux

Regards!!
Matt

Posted: Sun 31 Mar 2013, 20:22
by 01micko
thunor wrote:
rcrsn51 wrote:
Could you please explain that some more? Does that mean that gtkdialog4 would be fixed at gtk-2 and gtkdialog5 would become the gtk-3 version?

So would Puppy builders need to include both versions of gtk? For example, alphaOS has both.
That is absolutely none of my business in any possible way.
*I don't think* (spec, at least as far as puppy is concerned) that gtk2 is going anywhere immediately soon. So, for now gtk3 is an option for puplet builders. The whole gtkdialog2, gtkdialog3, gtkdialog4 mess is a bit unfortunate. As most know Slacko ships with 1 and only 1 gtkdialog executable, the backward compatibility is restored with links. This will not change.

I like thunor's suggestion to use gtk3dialog for the executable for now, at least until gtk2 is completely gone. I also, as far as Slacko is concerned, will be using the usual PREFIX path for distro packaged packages, which is /usr, so therefore the exec will go to /usr/bin. Those who compile themselves for their own use should leave the PREFIX paths as default, /usr/local. Of course Barry may completely disagree with what I do (often does).

-

Thanks thunor for the theme! I have another called "Kunitwo" (found on gnome-look.org) which supports gtk2/3 that I am using right now. It's pretty similar to "Adwaita" which is lurking in the Salix repo in disguise.

Re: Can't compile gtkdialog.gtk rev 505

Posted: Sun 31 Mar 2013, 21:34
by thunor
matiasbatero wrote:...
I can't compile gtkdialog.gtk3 rev 505 yet.
...
Hi Matt

Do this:

Code: Select all

make clean
 (./autogen.sh --enable-gtk3=yes && make) | tee output.txt
and either dump the lot in a post or "tar -czvf output.tar.gz output.txt" and attach it.

@Mick

I don't see why gtk2 needs to disappear either. I like it and newer widget libraries look a bit dumbed down to me and I'm not interested in that. Have a look at the colorbutton in gtk3 although the fontbutton looks good.

Code: Select all

echo '<vbox><colorbutton></colorbutton><fontbutton></fontbutton></vbox>' | ./src/gtkdialog -s
I'm using "gtk3dialog" which seems pretty workable.

Apart from using the audacious sfs to give me the gtk3 library, I haven't installed anything else apart from the missing default Adwaita engine and theme and everything I've looked at on gnome-look.org is giving me errors so I expect I'm missing something important. I read something about it here -- "a wild guess is that I don’t have some sort of GNOME resource broker running" -- but I'm fine with Adwaita anwyay.

Regards,
Thunor

Posted: Sun 31 Mar 2013, 22:32
by 01micko
Hi thunor,

A bit OT, but regarding the theme I couldn't get your way to work (PHATSlacko, pretty similar to Slacko) so I copied /usr/share/themes/Adwaita/gtk-3.0/settings.ini to ~/.config/gtk-3.0, also created a blank gtk.css.

Also, to keep your desktop in harmony (and as a side effect mine :P ) I found an Adwaita gtk2 theme, but it requires the murrine engine which I compiled, see attached.

Cheers.

Now it works!!!

Posted: Mon 01 Apr 2013, 01:03
by matiasbatero
Image

Posted: Mon 01 Apr 2013, 06:21
by zigbert
thunor wrote:What I shall do is make a custom tag attribute and you can set it with column-resizeable="true|false|true|false".

There will likely be some tweaking involved.
Yeeees :D


I am very thankful
Sigmund

Re: Can't compile gtkdialog.gtk rev 505

Posted: Mon 01 Apr 2013, 11:49
by simargl
.

Posted: Mon 01 Apr 2013, 13:24
by pemasu
Absolutely off topic.
I downloaded in Upup Raring shimmer themes which have matching gtk2 and gtk3 themes involved, stripped unneeded stuff out. It needs murrine engine which is not included in the attached pet. Check 01micko`s in previous page and ubuntu - debian based Puppies can download it with PPM.
I did hack the involved codes so that every gtk2 - gtk3 theme has wider slider-width. The default one was so tiny.

I didnt involve the stuff Thunor posted earlier for gtk3 theme support.

I think that 01micko`s hacked, Barry`s original wrapper file, gtk_chtheme_wrapper does not update the gtk-theme-name in /root/.config/gtk-3.0/settings.ini file.

So...the gtk2 and gtk3 are not changed unifiedly. Or then I have understood something wrong, which happens every hour in my life.
I do have /root/.config/gtk-3.0 folder and settings.ini and gtk.css files inside the folder, but the gtk-theme-name row just dissappears when using the wrapper file. Other info is there, just the gtk-theme-name row vanishes.

Code: Select all

#!/bin/sh
#(c) Copyright Barry Kauler April 2013, bkhome.org
#license GPL3 (see /usr/share/doc/legal).
#130329 first release.
#130401 01micko: preliminary gtk3 support.

gtk-chtheme

#make Qt4 apps theme match gtk2...
#see also /etc/profile.d/pup_gtk and /root/.config/Trolltech.conf
#/root/.gtkrc-2.0 typically looks like this:
## -- THEME AUTO-WRITTEN DO NOT EDIT
#include "/usr/share/themes/Polished-Blue/gtk-2.0/gtkrc"
#
#include "/root/.gtkrc.mine"
#
## -- THEME AUTO-WRITTEN DO NOT EDIT
CURRGTKTHEME="$(grep '^include "/usr/share/themes/' /root/.gtkrc-2.0 | cut -f 5 -d '/')" #'geany  ex: Polished-Blue
THEREBEFORE="$(grep '^gtk-theme-name' /root/.gtkrc-2.0)"
if [ "$THEREBEFORE" = "" ];then

 echo "gtk-theme-name=\"${CURRGTKTHEME}\"" >> /root/.gtkrc-2.0

 #130401...
 # gtk3 theme support thunor http://murga-linux.com/puppy/viewtopic.php?p=695722#695722
 pathGTK3THEME="`find /usr/share/themes/${CURRGTKTHEME} -type d -name gtk-3.0`"
 if [ "$pathGTK3THEME" ];then #XDG_CONFIG_HOME=/root/.config
  [ -d ${XDG_CONFIG_HOME}/gtk-3.0 ] || mkdir -p ${XDG_CONFIG_HOME}/gtk-3.0
  [ -f ${pathGTK3THEME}/settings.ini ] && cp -af ${pathGTK3THEME}/settings.ini $XDG_CONFIG_HOME/gtk-3.0/ || echo -e "[Settings] \ngtk-theme-name = \"${CURRGTKTHEME}\" \ngtk-fallback-icon-theme = \"gnome\"" > $XDG_CONFIG_HOME/gtk-3.0/settings.ini
  #[ -f ${pathGTK3THEME}/gtk.css ] && cp -af ${pathGTK3THEME}/gtk.css $XDG_CONFIG_HOME/gtk-3.0/ ||\# doesn't work
  echo "" > $XDG_CONFIG_HOME/gtk-3.0/gtk.css
 fi
fi

Posted: Mon 01 Apr 2013, 13:41
by pemasu
To be continued from previous post:

/usr/bin/gtk-chtheme-wrapper executed with -x in console:
+ echo 'gtk-theme-name="Greybird"'
++ find /usr/share/themes/Greybird -type d -name gtk-3.0
+ pathGTK3THEME=/usr/share/themes/Greybird/gtk-3.0
+ '[' /usr/share/themes/Greybird/gtk-3.0 ']'
+ '[' -d /root/.config/gtk-3.0 ']'
+ '[' -f /usr/share/themes/Greybird/gtk-3.0/settings.ini ']'
+ cp -af /usr/share/themes/Greybird/gtk-3.0/settings.ini /root/.config/gtk-3.0/
+ echo ''
/usr/share/themes/Greybird/gtk-3.0/settings.ini does not include gtk-theme-name and you cant even put it there. Tested, gtk3 apps just hungs until you remove the row.

Something else is needed. Would sed command be useful for inserting the gtk-theme-name from /root/.gtkrc-2.0 file.

Posted: Mon 01 Apr 2013, 13:44
by simargl
.

Posted: Mon 01 Apr 2013, 13:54
by pemasu
simargl.
http://bkhome.org/blog2/?viewDetailed=00196

http://bkhome.org/fossil/woof2.cgi/info/0879c4b3a1
Who told you that hacking gtk-chtheme is only way to change gtk3 themes?
No one. I dont even know from whom you heard that I have said that the above is the only one. Yeah....I know....my alzheimer disease and multi-infarct dementia cause black holes to my memory.

Could you provide me the url link where I told it is the only way ?
I would be most grateful and I would even send for you couple of my pills.

Okay...I know how to change the gtk3 themes in Puppy now. Just like Thunor showed. It seems simple way in Puppy. And no....I dont explicitly want to know how they do it in Arch. Spare me from it.
I have tested gtk3 theme swapping couple of hours now. Even edited several of those themes a little.

I just gave my 1½ cents to the code Barry Kauler and 01micko created.
I have to admit that your way to start the conversation has bad effect on me....as you can read above.