Page 1 of 2

GTK+ Front-End Refactored.

Posted: 06.12.2005, 05:04
by suwalski
Hello,

t00fri wrote:Comparing the GNOME and notably the KDE flavors to the GTK version for Linux, I think it is fair to insist that the difference is still /VERY/ large. It is simply much more "than just a little bit of work" to get the gtk version to the same standards.


So, I took the challenge that was laid before me.

I'm happy to announce, that after two-and-a-half weeks of average five-hour-per-day work, I've rewritten the GTK+ and GNOME front-ends.

Here is the list of changes:

Major Changes
  • Split source into multiple files
  • Performance: removed repeated calls to resync preferences
  • Redesigned the interface to use GtkActions and GtkUIManager
  • Added preference saving to file
  • Commented heavily
Minor Changes
  • New about dialog
  • Made non-modal: GoTo, View Options, Tour Guide, Browsers,
  • EclipseFinder
  • Changed a few calls to standard C to allow for Windows building
  • Star Browser now uses greek letters in names
  • Added tab-completion support on overlay entry
  • Replaced deprecated GtkOptionMenu with GtkComboBox in Set Time window
  • New GTK save/open dialog
  • Moved the License dialog from Help menu to new About box
  • Added "Copy" and "Open" URL functions
  • Galaxy Brightness preferences saved
  • Updated GConf schema/settings
  • Added command line options
  • Fixed automake bug where GConf schema would always install

It would be awesome if all Linux-able people could test and give feedback.

Posted: 06.12.2005, 10:52
by selden
It also would help if you'd mention how to get the revised source code. :)

Re: GTK+ Front-End Refactored.

Posted: 06.12.2005, 10:57
by t00fri
suwalski wrote:Hello,

t00fri wrote:Comparing the GNOME and notably the KDE flavors to the GTK version for Linux, I think it is fair to insist that the difference is still /VERY/ large. It is simply much more "than just a little bit of work" to get the gtk version to the same standards.

So, I took the challenge that was laid before me.

I'm happy to announce, that after two-and-a-half weeks of average five-hour-per-day work, I've rewritten the GTK+ and GNOME front-ends.



WOW! Yes where is the code for testing!? I will only be available for that again Friday...

Bye Fridger

PS: OK I found it later in the CVS...(usually takes a while)

Posted: 06.12.2005, 12:48
by steffens
There are lots of changes in CVS lately :wink:

Posted: 06.12.2005, 19:17
by suwalski
selden wrote:It also would help if you'd mention how to get the revised source code.

It's in celestia/src/celestia/gtk, which was previously only populated with some random bits of data.

t00fri wrote:PS: OK I found it later in the CVS...(usually takes a while)

If there are issues compiling it, the gtk_file_chooser_set_do_overwrite_confirmation() lines can be commented out, as all they do is pretty obvious. If there is an issue with ui.h, then the GTK_STOCK_x can just be replaced with NULL. But distros less than two years old should have that funcitonality. Again, if it's a problem, I will probably remove it from the code altogether.

steffens wrote:There are lots of changes in CVS lately


Indeed, there are. But what everyone wants is a release. :)

Posted: 06.12.2005, 22:24
by Paolo
Hi Pat

Can you please post some screenshots of the GTK Celestia version running on windows?

Thank you!

Posted: 10.12.2005, 08:24
by suwalski
Paolo wrote:Can you please post some screenshots of the GTK Celestia version running on windows?


I can do better than that. You can get a full (recent) CVS tree with a GTK Windows binary here (it will be there for a little while):

http://pat.suwalski.net/celestia/misc/C ... 051210.zip (22.2MB)

You will need these GTK libraries here for now:

http://prdownloads.sourceforge.net/glad ... e?download

Not everything works right now, but it's not too bad, considering I rewrote most of it recently. At least one thing is better than the normal Windows front-end: the Star Browser shows names with Greek Glyph Goodness (tm).

Maybe I'll do screenshots whenever I wake up.

Posted: 11.12.2005, 16:22
by Paolo
Hi Pat
Thank you but I have a very slow Internet Connection, so can you please place some screenshots.
I hope to have a DSL connection as Christmas self made present!

Posted: 11.12.2005, 19:20
by suwalski
Yes, I got around to posting a screenshot on my blog, so I might as well link to it here:

http://pat.suwalski.net/log/20051211.jpg

It's actually a side-by-side screen comparison of a few dialogs from the same code running on Linux and Windows. Fun stuff!

Posted: 11.12.2005, 20:42
by t00fri
suwalski wrote:Yes, I got around to posting a screenshot on my blog, so I might as well link to it here:

http://pat.suwalski.net/log/20051211.jpg

It's actually a side-by-side screen comparison of a few dialogs from the same code running on Linux and Windows. Fun stuff!


Ha! Looks the same on my machine EXCEPT the lacking text in the View Options dialog ;-)

Cheers,
Fridger

Posted: 11.12.2005, 21:00
by suwalski
t00fri wrote:Ha! Looks the same on my machine EXCEPT the lacking text in the View Options dialog ;-)


Even under Windows?! :P

Posted: 11.12.2005, 21:22
by t00fri
suwalski wrote:
t00fri wrote:Ha! Looks the same on my machine EXCEPT the lacking text in the View Options dialog ;-)

Even under Windows?! :P


Under Windows with gtk 2.8.8rc2 the ViewOptions dialog is fine, but the other bugs are definitely confirmed:

1) The Set Time bug is worse: local time zones are completely missing
2) The window size is not restored.

And not to forget...the ViewOptions dialog is only shown to work with gtk-2.8.8rc2! No statements about older versions (with witch your celestia binary does not work) may be inferred...

Bye Fridger

Posted: 11.12.2005, 21:59
by t00fri
Hi Pat,

I guess that I now proved the missing text in View options to be a downward-incompatibility in your code: I have compiled the tarball of gtk-2.8.8 and installed it. Now View Options shows the missing text just like in Windows...

So that case seems almost solved. However, with that version the background of all menues is black (in all gtk applications including Gimp). This bug I know already since long and therefore still kept to gtk-2.6.8, the last version where this does not happen.

There is a corresponding Gdk warning:

(celestia-gtk:1388): Gdk-WARNING **: gdk_window_set_back_pixmap(): pixmap must have a colormap


Do you know how to get rid of this problem?? If yes I could easily update gtk2.

Bye Fridger

Posted: 12.12.2005, 00:42
by t00fri
Hey Pat,

GREAT, after your last CVS update a short while ago and my update of gtk2-glib2-pango-cairo-pkgconfig-(gtk-qt-engine) /everything/ works perfectly!

Code: Select all

CTRL+M  (+Menue entry) is gorgeous for hiding the menue bar,
            View Options now have text
            The Window size is saved
            Time setting also works better


The black menue background was a bug in gtk-qt-engine. when you alluded to the theme issue, I actually remembered that I knew the reason already ;-) . The fix was in the net! But the font rendering is now pretty horrible for those applications where gtk-qt-engine has acted (gimp, celestia,...). I noticed that also some time ago. Any ideas? Firefox, Thunderbird have very neat font display.

My recent new code also works fine with Celestia-gnome, gtk.


Cheers,
Fridger

Posted: 14.12.2005, 08:49
by steffens
First of all - many thanks for taking up the lot of work on the GTK frontend. It is very much appreciated! As I am using Gnome as my default desktop, I was always looking forward to a Celestia frontend that nicely fits.

suwalski wrote:If there are issues compiling it, the gtk_file_chooser_set_do_overwrite_confirmation() lines can be commented out, as all they do is pretty obvious. If there is an issue with ui.h, then the GTK_STOCK_x can just be replaced with NULL. But distros less than two years old should have that funcitonality. Again, if it's a problem, I will probably remove it from the code altogether.

Compiling on Debian Sarge I had exactly these two problems. The missing definitions were "GTK_STOCK_INFO" and "GTK_STOCK_FULLSCREEN".

Sadly, I do experience the same problem as toofri: missing text labels in the "View Options" dialog. What can I do to find the cause of that?

steffens

Posted: 14.12.2005, 09:00
by t00fri
steffens wrote:First of all - many thanks for taking up the lot of work on the GTK frontend. It is very much appreciated! As I am using Gnome as my default desktop, I was always looking forward to a Celestia frontend that nicely fits.

suwalski wrote:If there are issues compiling it, the gtk_file_chooser_set_do_overwrite_confirmation() lines can be commented out, as all they do is pretty obvious. If there is an issue with ui.h, then the GTK_STOCK_x can just be replaced with NULL. But distros less than two years old should have that funcitonality. Again, if it's a problem, I will probably remove it from the code altogether.
Compiling on Debian Sarge I had exactly these two problems. The missing definitions were "GTK_STOCK_INFO" and "GTK_STOCK_FULLSCREEN".

Sadly, I do experience the same problem as toofri: missing text labels in the "View Options" dialog. What can I do to find the cause of that?

steffens


Well,

I used the occasion to upgrade my gtk2-glib2-pango-cairo-fontconfig setup. I compiled these from the sources of SuSE 10.0 which went without problems.

Now I have gtk+-2.8.8, glib-2.84 etc..., the text on the View Options dialog is coming on fine and gtk_file_chooser_set_do_overwrite_confirmation(), GTK_STOCK_INFO" and "GTK_STOCK_FULLSCREEN" are recognized.

But definitely, Pat has to include a fix for people using older versions, despite his claim that View Options is displaying fine under gtk+-2.6.4.
As long as we are not sure what precisely caused the problem, one should go on "digging". In any case it's independent of the gnome libs, since celestia-gtk showed the same problem.

Bye Fridger

Posted: 14.12.2005, 09:10
by steffens
Ah, that reminds me of another question I forgot to ask:
What exactly is the difference between the GTK version and the gnome version? I compiled the GTK version as a quick test, because I had to install more -dev packages for the gnome one.

Fixing the problems for "old" distributions (or stable ones, as Debian people would call it) would definitely be very nice.

steffens

Posted: 15.12.2005, 06:11
by suwalski
Aw, crud. I wasn't getting any of the response notification eMails.

t00fri wrote:1) The Set Time bug is worse: local time zones are completely missing
2) The window size is not restored.

Yes, both of these were known issues, because they are areas that required removing Linux-specific code. I've checked in some changes. Window saving works better now. Time is still an issue. It will do local time, but will not handle DST correctly at this time.

t00fri wrote:And not to forget...the ViewOptions dialog is only shown to work with gtk-2.8.8rc2! No statements about older versions (with witch your celestia binary does not work) may be inferred...

I've typed this before, I'll type it again. I did my testing on Debian Sarge, with GTK+ 2.6.4. My autopackage will also run on every distribution out there (I've had it tested). You can get that here:

http://pat.suwalski.net/celestia/misc/c ... 86.package

It is my hope that when 1.4.0-proper comes out, we can put this in the SF.net downloads and avoid the usual packaging mess we have. There is nothing wrong with doing individual distribution packages per se, but the autopackage is much more standardised. The downside is that it does require the download of support code. "Pick your poison." :)

steffens wrote:First of all - many thanks for taking up the lot of work on the GTK frontend. It is very much appreciated! As I am using Gnome as my default desktop, I was always looking forward to a Celestia frontend that nicely fits.

Ah, a fellow GNOME user. Thanks for the kind words. If you want to try something new with the GNOME front-end, it supports cel:// URLs for web browsing. More on other features later.

steffens wrote:Sadly, I do experience the same problem as toofri: missing text labels in the "View Options" dialog. What can I do to find the cause of that?

I'm curious what distro this is? Is it under KDE? Are you also using the qt-gtk theme engine? Does a different theme change anything? If it's SuSe it could be a bug in SuSe Gtk 2.6 packages.

steffens wrote:As long as we are not sure what precisely caused the problem, one should go on "digging". In any case it's independent of the gnome libs, since celestia-gtk showed the same problem.

I would love to solve it. However: (1) I cannot reproduce it under any distro. (2) It's a bug at the toolkit level. Which SuSe was this exactly? I'll grab a copy at work and go through the very painful installation process and see if I get it there. It runs fine on SuSe 10.

steffens wrote:What exactly is the difference between the GTK version and the gnome version? I compiled the GTK version as a quick test, because I had to install more -dev packages for the gnome one.

So, at the moment the differences between the GTK+ and GNOME interfaces are minimal, as a lot of the GNOME-specific stuff I was using in the 1.3.x series got pushed up to the GTK+ 2.6.

The major difference right now is that Celestia/GNOME uses GConf for its configuration settings. Celestia/GTK uses an ini-style file in the home directory. Using GConf allows for GNOME integration, such as for the web browser. At this point, the GTK version is otherwise just as polished at the GNOME version.

The real advantage to the GNOME front-end comes in the future. I'm already planning a video-capture system like what the Windows interface has, using GStreamer. GStreamer is a dependency for GNOME, so it's already there. It doesn't make sense to have the GTK interface depend on it. Additionally, the Help system could be quite literally "recompiled" (is that what we call it for docbook?) from KDE to have nicely integrated help, with minimal effort... things like that.

On the other hand, the GTK front-end is to be kept as bare-bones as possible. It should be the most basic interface that can access all of the direct features of the CelestiaCore. It should have no outside dependencies apart from GTK and gtkglext (for GL). In fact, my autopackage has the latter compiled in statically (it's only 15K), so the only dependency above plain X is GTK. That autopackage is really a cool thing that I'm going to encourage people to use.

The way I rewrote the code is perfectly set up for maintaining these streams without cluttering the code. For example, I currently have a settings-gconf.cpp and settings-file.cpp. This limits the ifdefs in the main code to little one-line snippets, because if you look at their .h files, you'll see have a consistent API. Adding a settings-win32.cpp for the Windows Registry will be a one-evening task. But that will be after 1.4.0.

steffens wrote:Fixing the problems for "old" distributions (or stable ones, as Debian people would call it) would definitely be very nice.


While I am aware of this bug about missing text, I can't see anything like it in the GTK bugzilla, open or closed, for the last 2 years. And it definitely runs on Debian stable. That's what the autopackage was built on, from a clean install.

Posted: 15.12.2005, 09:10
by steffens
Thanks for the response and explanations.
suwalski wrote:I've typed this before, I'll type it again. I did my testing on Debian Sarge, with GTK+ 2.6.4.
...
steffens wrote:Sadly, I do experience the same problem as toofri: missing text labels in the "View Options" dialog. What can I do to find the cause of that?

I'm curious what distro this is? Is it under KDE? Are you also using the qt-gtk theme engine? Does a different theme change anything? If it's SuSe it could be a bug in SuSe Gtk 2.6 packages.

Unfortunately, I do have Debian Sarge on my side too, so this seems really strange. I tried the celestia-gtk build on Gnome using the ClearLooks theme.

I have just found that there was a security update for GTK in Debian Sarge in the end of november, so the current version should be 2.6.4-3.1
I'll double-check, which version I do have installed when I'm back home. Maybe there are subtile differences...

steffens

Posted: 15.12.2005, 14:16
by suwalski
Okay, so it's Sarge. My Sarges have libgtk-2.0-0 version 2.6.4-3.1.

I have personally tried this on five Sarge computers now, with ATI, nVidia, S3, and Intel video hardware, without any problems.

Maybe it's something with the XFree xserver? I'm using Progeny's X.org 6.8.0 from:

deb http://archive.progeny.com/progeny/x11 x11-6.8 main

This is a requirement for all of my these new video cards.