Gtkdialog Development
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Uh oh, the mob's assembled with its truck-load of rocks
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.
Regards,
Thunor
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.
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.jpeps wrote:It makes more sense to just use the respective names to maintain backwards compatibility.
That is absolutely none of my business in any possible way.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.
The combobox has an entry and is a very limited widget, so a comboboxentry would supplant it very easily.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?
Regards,
Thunor
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
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
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
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
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
- Attachments
-
- gtk3-adwaita-theme.png
- Default gtk3 Adwaita theme applied to a gtkdialog example built supporting gtk3
- (5.49 KiB) Downloaded 871 times
-
- gnome-themes-standard-3.4.2-i686.pet
- Slacko 5.5 i686 gtk3 default Adwaita theme engine and theme
- (92.08 KiB) Downloaded 440 times
- matiasbatero
- Posts: 60
- Joined: Fri 12 Oct 2012, 01:27
- Location: Mar del Plata, Argentina
Can't compile gtkdialog.gtk rev 505
Thank you so much Thunor for you effort!!!
I can't compile gtkdialog.gtk3 rev 505 yet.
I do the next steps:
All works fine, but "make" gives me this error
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
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
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
I don't know how to solve this.
PD: i'm using archlinux
Regards!!
Matt
*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.thunor wrote:That is absolutely none of my business in any possible way.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.
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.
Puppy Linux Blog - contact me for access
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Re: Can't compile gtkdialog.gtk rev 505
Hi Mattmatiasbatero wrote:...
I can't compile gtkdialog.gtk3 rev 505 yet.
...
Do this:
Code: Select all
make clean
(./autogen.sh --enable-gtk3=yes && make) | tee output.txt
@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
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
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 ) I found an Adwaita gtk2 theme, but it requires the murrine engine which I compiled, see attached.
Cheers.
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 ) I found an Adwaita gtk2 theme, but it requires the murrine engine which I compiled, see attached.
Cheers.
- Attachments
-
- adwaita-gtk2-0.1.pet
- (14.9 KiB) Downloaded 680 times
-
- murine-0.98-i486-s.pet
- (80.96 KiB) Downloaded 406 times
-
- capture1146.png
- (97.49 KiB) Downloaded 796 times
Puppy Linux Blog - contact me for access
- matiasbatero
- Posts: 60
- Joined: Fri 12 Oct 2012, 01:27
- Location: Mar del Plata, Argentina
Re: Can't compile gtkdialog.gtk rev 505
.
Last edited by simargl on Sun 01 Sep 2013, 15:01, edited 1 time in total.
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.
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
- Attachments
-
- shimmer-themes-gtk2-gtk3-murrine-engine-dependent-0.0.1.pet
- (117.38 KiB) Downloaded 368 times
Last edited by pemasu on Mon 01 Apr 2013, 14:02, edited 1 time in total.
To be continued from previous post:
/usr/bin/gtk-chtheme-wrapper executed with -x in console:
Something else is needed. Would sed command be useful for inserting the gtk-theme-name from /root/.gtkrc-2.0 file.
/usr/bin/gtk-chtheme-wrapper executed with -x in console:
/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.+ 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 ''
Something else is needed. Would sed command be useful for inserting the gtk-theme-name from /root/.gtkrc-2.0 file.
Last edited by pemasu on Mon 01 Apr 2013, 13:45, edited 1 time in total.
simargl.
http://bkhome.org/blog2/?viewDetailed=00196
http://bkhome.org/fossil/woof2.cgi/info/0879c4b3a1
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.
http://bkhome.org/blog2/?viewDetailed=00196
http://bkhome.org/fossil/woof2.cgi/info/0879c4b3a1
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.Who told you that hacking gtk-chtheme is only way to change gtk3 themes?
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.
For matching gtk2 and gtk3 themes this worked for me:
Yeah....I know....not for multiuser environment, but I have heard that Puppy is....
Code: Select all
#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
rm $XDG_CONFIG_HOME/gtk-3.0
ln -s ${pathGTK3THEME} $XDG_CONFIG_HOME
fi
fi
This may be of interest for GTK+3 themes
https://developer.gnome.org/gtk3/3.1/Gt ... der-struct
https://developer.gnome.org/gtk3/3.1/Gt ... der-struct
certain files will be read when GTK+ is initialized. First, the file $XDG_CONFIG_HOME/gtk-3.0/gtk.css is loaded if it exists. Then, GTK+ tries to load $HOME/.themes/theme-name/gtk-3.0/gtk.css, falling back to datadir/share/themes/theme-name/gtk-3.0/gtk.css, where theme-name is the name of the current theme (see the "gtk-theme-name" setting) and datadir is the prefix configured when GTK+ was compiled, unless overridden by the GTK_DATA_PREFIX environment variable.

- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Changes in r507:
Cheers,
Thunor
- Added gtk3 specific code to the comboboxtext and comboboxentry widgets so that they now function identically to the gtk2 equivalents.
- The file selection dialog filename retrieval issue was specific to less than gtk-2.4.0 so I've wrapped it in a macro for those versions.
- Added "GTK+ 2/3" to the supported libraries list with gtkdialog -v.
- Added the "column-resizeable" tag attribute to the tree widget.
- Updated a few wiki/reference pages with new info, fixed bad links.
- Added helpful error messages when attempting to create combobox, list and table widgets with GTK+ 3.
Cheers,
Thunor
Puppy Linux Blog - contact me for access