Gtkdialog Development

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#741 Post 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?

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

#742 Post 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

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#743 Post 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.

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

#744 Post 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
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 439 times

User avatar
matiasbatero
Posts: 60
Joined: Fri 12 Oct 2012, 01:27
Location: Mar del Plata, Argentina

Can't compile gtkdialog.gtk rev 505

#745 Post 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

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#746 Post 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.
Puppy Linux Blog - contact me for access

User avatar
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

#747 Post 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

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#748 Post 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.
Attachments
adwaita-gtk2-0.1.pet
(14.9 KiB) Downloaded 679 times
murine-0.98-i486-s.pet
(80.96 KiB) Downloaded 405 times
capture1146.png
(97.49 KiB) Downloaded 796 times
Puppy Linux Blog - contact me for access

User avatar
matiasbatero
Posts: 60
Joined: Fri 12 Oct 2012, 01:27
Location: Mar del Plata, Argentina

Now it works!!!

#749 Post by matiasbatero »

Image

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

#750 Post 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

simargl

Re: Can't compile gtkdialog.gtk rev 505

#751 Post by simargl »

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

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#752 Post 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
Attachments
shimmer-themes-gtk2-gtk3-murrine-engine-dependent-0.0.1.pet
(117.38 KiB) Downloaded 363 times
Last edited by pemasu on Mon 01 Apr 2013, 14:02, edited 1 time in total.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#753 Post 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.
Last edited by pemasu on Mon 01 Apr 2013, 13:45, edited 1 time in total.

simargl

#754 Post by simargl »

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

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#755 Post 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.

simargl

#756 Post by simargl »

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

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#757 Post by pemasu »

For matching gtk2 and gtk3 themes this worked for me:

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
Yeah....I know....not for multiuser environment, but I have heard that Puppy is....

2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#758 Post by 2byte »

This may be of interest for GTK+3 themes

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.


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

#759 Post by thunor »

Changes in r507:
  • 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.
That's it, although I have yet to compensate for the defunct ~/.gtkrc-2.0 and GTK2_RC_FILES but I can load gtk.css style sheets in gtk3 at runtime which might be fun.

Cheers,
Thunor

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#760 Post by 01micko »

To save all the OT about themes, I have created a thread

All welcome.
Puppy Linux Blog - contact me for access

Post Reply