Porting yast2-gtk to gtk3

36 views
Skip to first unread message

Atri

unread,
May 5, 2011, 1:41:34 PM5/5/11
to yast2-gtk
Hi!
One of the major features of the upcoming 12.1 release (Nov. 2011) is
going to be GNOME 3 (actually it was just decided that 12.1 will
indeed have GNOME 3.2), the new avatar of the already popular desktop
environment, that is now based on gtk3. In this regard we were
discussing over at #opensuse-gnome [1] about how best one could
integrate the YaST shell and module windows with GNOME3. As a first
step, I think it might be important that we look at porting the
existing yast2-gtk framework to gtk3, including the ycc-shell and all
of the module windows. Though right now, I do not have a lot of
insight on how easy or difficult this might be, I am in contact with
people like Vincent who are very strongly into upstream GNOME
development, and I am sure I could find some pointers, etc. on how
best this can be done. I would also like to help with code if
possible, though I understand that yast2-gtk is a complex beast in
many ways (which makes Ricardo even more of a hero) ;-) !

A second question would be on how to integrate YaST itself into the
scheme of the gnome-shell, the new replacement for the gnome desktop
frontend. Regarding this several ideas are floating around at the same
irc channel, and a few have been noted here https://features.opensuse.org/312294
. The opensuse-gnome team is finding a way to do this in the best
possible way, and it is quite removed from core yast2-gtk development.
As such I think it is not really something that should be at the top
of our priorities, but if you are a GNOME 3 user, and have a better
idea for integration you are welcome to share it here or at #opensuse-
gnome.

Summarising, I think we should focus strongly on gtk3-ing yast2-gtk
and, since, as this post [2] and comments therein show (and thankfully
so), yast2 is under active development again, it would be worth the
effort. It would also perhaps be way easier to maintain for the future
than it would if we were to leave it gtk2 based. What do you people
think?

Bye

--
Atri

[1]: irc://irc.opensuse.org/openSUSE-gnome
[2]: http://lizards.opensuse.org/2011/04/29/metal-theme-for-yast2/

Atri

unread,
May 5, 2011, 2:29:58 PM5/5/11
to yast2-gtk

Ricardo Cruz

unread,
May 5, 2011, 3:19:37 PM5/5/11
to yast...@googlegroups.com
Hi Atri,

Duncan (dmac...@suse.de) has already started with the porting:

"I ported (branches/tmp/dmacvicar/gtk) the UI to compile without
deprecated methods, and with SEAL flags etc (all pre-requirements for a
Gtk 3.0 port)
That is revision 63804"

This was about a week ago. I haven't followed up. I'd like to help out,
but it will have to wait for the summer holidays.

In the GTK3 manual, there is a good step-by-step section on how to
migrate from gtk2:
http://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html

What I know about gtk3 is from skimming through the manual. But it seems
it will be a fairly smooth migration. We do extend and add a number of
widgets, so it may require some time, but hopefully it will be a purely
mechanical transition. For example: grep for usages of GDK, and replace
with Cairo calls. Please follow closely the migration plan because there
are semantic changes (which of course only show up when running).

If someone would like to work on it, please contact Duncan.

I don't think there's much specific guidance I can offer with regard to
making it compile against gtk3. When it does compile, if there are
run-time issues, I may be able to offer some insight then.

---

By the way, the changes to the gtk3 API look pretty good. I especially
like the layout changes, which allow containers to "negotiate" the size
with the widgets. We'll be able to, for example, resize a message
dialog, and have the label fill up the apportioned space. The style API
was badly needing a make-over, and it got one: hopefully, it will be now
easier for e.g. the Java/Swing native theme to mimic more closely gtk
style.

They also came up with this new programming language called Vala. C is
really awful for a GUI toolkit, so the Vala preprocessor is probably a
good compromise between moving the all thing to C++ or whatever. It
sounds like you can combine C and Vala code, so hopefully the GTK
basecode itself will get ported to Vala in the future. This will add a
great productivity boost to GTK. (We better continue using C for the
main code: but it would be interesting to port some of our widgets to
Vala... :))

Thanks,
Ricardo


Reply all
Reply to author
Forward
0 new messages