Page 1 of 2

GTK problem with File menus-openSuse 11.1

Posted: 20.08.2009, 01:36
by cartrite
I've been having a problem with gtk builds when I build on openSuse 11.1. This goes back to 1.5.1. I built that with gcc 3.3. I also built 1.6.0, actually r4751, and the latest svn. They exhibit this problem with action menus under File. Capture Image is one of them and here is a screen shot of what it looks like.

Image
View of Save As window in the GTK version of Celestia

Everything is disabled except the Cancel button. Clicking on Recently Used will populate the window with recently used image files from all over my computer but clicking on them does nothing. I was wondering if anyone else is having this problem with gtk builds. If so, please let me know what version of GTK and GLIB2 you got on your system.
Looking into this problem led me to discover a better way to use the file menus from the GNOME build. I uploaded a newer patch # 2 that creates previews. It is in a couple of posts down near the bottom of the page.
viewtopic.php?p=117177#p117177
It will come in handy if you have folders with many image files of different formats. It will also do well separating cel scripts from celx scripts .

Here is a couple screen shots that illustrate what this does using Capture Image as an example using GNOME.
Image
Image
Image
Here is a couple more showing the Open Script menu in GNOME. Keep in mind I moved 53 of the scripts that get installed in the top source folder to the scripts folder.

snapshot8.jpg


snapshot9.jpg


cartrite

Re: GTK problem with File menus-openSuse 11.1

Posted: 20.08.2009, 04:57
by John Van Vliet
--- edit ---

Re: GTK problem with File menus-openSuse 11.1

Posted: 20.08.2009, 09:32
by cartrite
John,
I thin you are misunderstanding me.
GTK is broken. Gnome is fine. Everything works in Gnome just like yours without any patch. I thought there may have been a problem with the filter buttons. In Capture Image, it is not that big of a deal with just jpg and png being supported but when I see a button with up and down arrows on it, I get the impression that a menu should show up when clicking on it. This patch becomes more useful for filtering scripts. Then you can put all the .cel and .celx files in the same script folder.

GTK is another story. The GTK Save As and Open windows are completely broken. And gnome and gtk build almost the same code. The difference is they use different settings files for saving settings after exit. The code that produces these windows is the same. The easiest thing to do will be to stop building GTK and just build GNOME. But I would like to find out why this is happening.

So until I find out that others with new operating systems can build GTK and don't have this problem, I'm assuming that there is a bug in newer versions of GTK, Glib, or Celestia. If it is in Celestia, it must be in configure.in or a Makefile.am. Maybe there is a CXXFLAG or CFLAG being set differently. I don't know.
openSuse 11.1 uses GTK version 2.14 and Glib version 2.18.
cartrite

Re: GTK problem with File menus-openSuse 11.1

Posted: 20.08.2009, 15:49
by John Van Vliet
--- edit ---

Re: GTK problem with File menus-openSuse 11.1

Posted: 20.08.2009, 17:41
by cartrite
I haven't built --with-glut in years. I did build it a couple times long ago to see what it is like. From what I remember, There is no ui at all. You need to know keyboard commands. I doubt that it's affected though. GTK and GNOME seem identical. If GTK was working, I probably couldn't tell them apart.

I heard that this may have something to do with gvfs and gio. Apparently, they are part of Glib now. I'm not sure what to do about it though.
I tried linking gio-2.0 to the GTK_LIBS but that didn't do anything. Funny, a search showed the g_get_home_dir() symbol was in gio-2.0.
cartrite

Re: GTK problem with File menus-openSuse 11.1

Posted: 20.08.2009, 18:23
by t00fri
Steve,

today the new computer arrived for my office at the lab. Besides a powerful Core2Duo processor (E8400@3GHz) with 4GB of RAM, it has a GF 9500GT/512MB/CUDA graphics card (passively cooled), realtek sound and a large, fast harddisk.

I am planning to install OpenSuSE 11.1 + updates via smart (besides WinXP SP3 & CYGWIN). What was your overall impression of 11.1 so far? Isolated bugs one finds everywhere, so I am well used to that "feature" ;-)

Fridger

Re: GTK problem with File menus-openSuse 11.1

Posted: 20.08.2009, 18:59
by cartrite
I like openSuse 11.1 just fine. It has it's moments but overall I got no complaints.
I wish I was able to install XP again but it will not install on a SATA disk. My installation disk is SP1 and SATA wasn't out yet when that came out.
Tried hooking up a floppy drive to load the sata driver at installation time but all I ever got was the BLUE SCREEN of DEATH. :(
Windows XP is about to be depreciated anyhow. Few years tops. What I really need is a new system board.
cartrite

Re: GTK problem with File menus-openSuse 11.1

Posted: 21.08.2009, 03:42
by John Van Vliet
--- edit ---

Re: GTK problem with File menus-openSuse 11.1

Posted: 21.08.2009, 04:08
by cartrite
In openSuse 11.1, I run KDE3. KDE4 is a little slow and I never did get used to the gnome desktop. I like KDE3 though. It's pretty quick.
John, here is a patch in case you want to try it. It will fix the filter buttons in both GTK and GNOME and also adds a preview window.
suse11.1-gtk-gnome-file-filter-fix2.txt.zip

There are a couple of screen shots here.
viewtopic.php?p=117159#p117159
cartrite

Re: GTK problem with File menus-openSuse 11.1

Posted: 21.08.2009, 04:28
by John Van Vliet
--- edit ---

Re: GTK problem with File menus-openSuse 11.1

Posted: 21.08.2009, 04:34
by cartrite
John,
If you haven't built yet be sure to update svn to 4853. Chris removed 3 files tonight that caused an error in main.cpp. I committed a fix soon after. I forgot to remove an #include <celengine/glext.h> line last week.
This patch creates previews and that added a lot of code.
cartrite

Re: GTK problem with File menus-openSuse 11.1

Posted: 21.08.2009, 04:51
by John Van Vliet
--- edit ---

Re: GTK problem with File menus-openSuse 11.1

Posted: 21.08.2009, 05:45
by John Van Vliet
--- edit ---

Re: GTK problem with File menus-openSuse 11.1

Posted: 21.08.2009, 08:47
by cartrite
The error for not having the extension in the filename is no surprise. I get the same error. I couldn't find a symbol that will append a suffix extension. I'm still looking.

It does surprise me that gtk works though. Have to see if Fridger got Suse 11.1 installed. If his works too, then I got troubles.
cartrite

Re: GTK problem with File menus-openSuse 11.1

Posted: 21.08.2009, 16:11
by John Van Vliet
--- edit ---

Re: GTK problem with File menus-openSuse 11.1

Posted: 21.08.2009, 18:41
by cartrite
this is the version of gtk i am using
GTK = 2.10.0
openSuse 11.1 uses GTK version 2.14 and Glib version 2.18. There is apparently a new virtual file system too. GVFS. Not sure when Suse/GTK/GNOME started using GVFS. This may explain why gtk works on your system and not mine.
it worked before( and after ) the patch
The patch was never meant to fix my gtk problem. I haven't found an answer to that yet.
.Then after i had png previews IF PNG was selected and jpg previews IF jpg was selected
Now this is the way the patch is supposed to work. I still haven't found a way to append a file extension to the end of the filename when a user doesn't type one in. I know that there must be a way. The gimp will put .xcf to the end of the file if no extension is given.
The Stock GtkFileChooser Save As Window doesn't seem to have a way to do it. But the documentation isn't clear on a lot of symbols. I may be missing something simple. I may be able to free the selection so the basename could be deleted easily. Then the cursor would be at the start of the filename input box and the extension still behind the cursor.
cartrite

Re: GTK problem with File menus-openSuse 11.1

Posted: 24.08.2009, 02:41
by John Van Vliet
--- edit ---

Re: GTK problem with File menus-openSuse 11.1

Posted: 27.08.2009, 19:47
by t00fri
cartrite wrote:
It does surprise me that gtk works though. Have to see if Fridger got Suse 11.1 installed. If his works too, then I got troubles.
cartrite

Steve,

incidentally, I finished configuring my new office machine with OpenSuSE 11.1 and upgrades thereof (and dual boot Win XP SP3 of course) . I am happy with the graphical and numerical performance and notably...for the first time... I experience beautiful CUDA 2.3 acceleration (NV driver 190.18) of my F-TexTools with regard to direct DXT compression of VT tiles!!! 2048 VTs (level5) are now generated and DXT3 compressed (high quality mode!) in about 10 minutes with txtilesDXT! Hence highest quality DXT compression of "monster VT sets" is now becoming a "snap".

My tools and the CUDA 2.3/NV-textools 2.06 implementation are completely stable now and provide a CUDA-based speed increase of a factor 3 to 10, depending on the degree of optimization for the normal code.

Not to forget that this GF 9500GT/512 MB card costs barely 50 Euro and is passively cooled. Hence NO noise whatsoever.

There will be a timely respective thread at CM very soon...Watch out!

Back to GTK2.
----------------

Indeed now the image-capture file selector of celestia-gtk is broken
as well ($HOME missing) in my new installation, while celestia-gnome works fine.

Sorry again that I lost track of your extensive discussions with John: what's the upshot for celestia-gtk and OpenSuSE 11.1??

Is it a bug in the gtk2/glib2 code or elsewhere or is it a problem in the Celestia-gtk code? My GIMP 2.6.2 fileselector also works perfectly fine.

Fridger

Re: GTK problem with File menus-openSuse 11.1

Posted: 27.08.2009, 20:23
by John Van Vliet
--- edit ---

Re: GTK problem with File menus-openSuse 11.1

Posted: 27.08.2009, 20:30
by t00fri
john Van Vliet wrote:I works on fedora 11 ( on a old computer ) ??? so it is looking like a SUSE issue


i had noticed this before since i had not build a gtk only since celestia 1.3 or 1.4
list of installed gtk rpm's

Code: Select all

 rpm -qa | grep gtk
gtkglext-devel-1.2.0-9.fc11.i586
usermode-gtk-1.100-2.i586
gtk-doc-1.11-4.fc11.noarch
pygtksourceview-2.6.0-1.fc11.i586
gtk-nodoka-engine-0.7.2-5.fc11.i586
gtk+-1.2.10-68.fc11.i586
gtk-sharp2-2.12.7-5.fc11.i586
authconfig-gtk-5.4.10-1.fc11.i586
pygtk2-devel-2.14.1-1.fc11.i586
gtkimageview-1.6.3-1.fc11.i586
webkitgtk-1.1.10-1.fc11.i586
xdg-user-dirs-gtk-0.8-3.fc11.i586
GConf2-gtk-2.26.2-1.fc11.i586
gtkglext-libs-1.2.0-9.fc11.i586
pygtk2-libglade-2.14.1-1.fc11.i586
python-slip-gtk-0.1.15-3.fc11.noarch
ibus-gtk-1.1.0.20090612-3.fc11.i586
gtkspell-2.0.15-1.fc11.i586
pygtkglext-1.1.0-6.fc11.i586
aiksaurus-gtk-1.2.1-19.fc11.i586
gtk2-devel-2.16.5-1.fc11.i586
gtk2-engines-2.18.2-1.fc11.i586
pygtk2-doc-2.14.1-1.fc11.noarch
gtkmm24-2.16.0-1.fc11.i586
gtk2-2.16.5-1.fc11.i586
PackageKit-gtk-module-0.4.9-1.fc11.i586
fusion-icon-gtk-0.5-126.fc11.noarch
swfdec-gtk-0.9.2-2.fc11.i586
gtkpod-0.99.14-2.fc11.i586
libcanberra-gtk2-0.12-1.fc11.i586
pygtk2-2.14.1-1.fc11.i586
pygtk2-codegen-2.14.1-1.fc11.i586
gtkhtml2-2.11.1-5.fc11.i586
gtkhtml3-3.26.3-1.fc11.i586
gnome-python2-gtkhtml2-2.25.3-6.fc11.i586
gtksourceview2-2.6.2-1.fc11.i586
gtkmathview-0.8.0-3.fc11.i586
[JKV@JKV ~]$

and the required source builds for installing Gimp ( the prerequisites )

Well as we have discussed on the dev list, it worked also for me with my previous OpenSuse 10.3 & latest gtk2/glib2 (smart) updates.
There I used gtk2-2.12.9/glib2-2.16.3.

How do you interpret the fact that the file selector is only broken ($HOME dir missing) for Celestia image capture, while for GIMP it is perfect!?

Fridger