After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 450635 - Convert to GtkBuilder
Convert to GtkBuilder
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
2.19.x
Other Linux
: Normal normal
: ---
Assigned To: Philip Withnall
General Totem maintainer(s)
Depends on: 447969
Blocks: 451856
 
 
Reported: 2007-06-24 15:00 UTC by Philip Withnall
Modified: 2007-07-05 23:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use GtkVolumeButton instead of BaconVolume (32.19 KB, patch)
2007-06-25 22:52 UTC, Jan Arne Petersen
none Details | Review
Updated patch (Use GtkVolumeButton instead of BaconVolume) (34.47 KB, patch)
2007-06-26 10:50 UTC, Jan Arne Petersen
none Details | Review
Move to GtkBuilder (508.68 KB, patch)
2007-06-27 23:22 UTC, Philip Withnall
needs-work Details | Review
Move to GtkBuilder (updated) (403.40 KB, patch)
2007-06-29 15:10 UTC, Philip Withnall
none Details | Review
Move to GtkBuilder (updated again) (403.62 KB, patch)
2007-07-05 14:33 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2007-06-24 15:00:45 UTC
Once the GtkBuilder API's had its little bugs worked out and it's been in trunk a few weeks to stabilise, it might be nice for us to convert to using it instead of Glade, and then drop our Glade dependency.
Comment 1 Bastien Nocera 2007-06-24 16:25:55 UTC
If we're going to up the reqs for GTK+, we'll want to use the new volume button everywhere as well (removing the current hacks for the 2 different types of volume widgets).
Comment 2 Jan Arne Petersen 2007-06-25 22:52:47 UTC
Created attachment 90642 [details] [review]
Use GtkVolumeButton instead of BaconVolume
Comment 3 Bastien Nocera 2007-06-26 09:42:00 UTC
(In reply to comment #2)
> Created an attachment (id=90642) [edit]
> Use GtkVolumeButton instead of BaconVolume

It should be possible to share the GtkAdjustment between the 2 volume widgets/buttons (ie. use a GTK+ volume button in the fullscreen widget as well), so we can remove the volume lock.
Comment 4 Jan Arne Petersen 2007-06-26 10:50:08 UTC
Created attachment 90654 [details] [review]
Updated patch (Use GtkVolumeButton instead of BaconVolume)

Changes to the previous patch:

Share the GtkAdjustment
Remove vol_lock and the second value_changed handler
Remove not used "fs" data
Comment 5 Philip Withnall 2007-06-26 14:16:06 UTC
I've started work on this, but if we're going to do it properly, we'll need the API from bug #447969, so I'm adding it as a dependency.
Comment 6 Johan (not receiving bugmail) Dahlin 2007-06-26 14:19:39 UTC
(In reply to comment #5)
> I've started work on this, but if we're going to do it properly, we'll need the
> API from bug #447969, so I'm adding it as a dependency.
> 

It's not a requirement though, it's perfectly possible to create a GtkBuilder interface in the current way. Don't let that bug block your work!

You can copy the code to totem in worst case, it's only using public APIs.
Comment 7 Philip Withnall 2007-06-27 13:58:05 UTC
After talking to Bastien, he's decided we're going to put everything possible into the GtkBuilder XML files, i.e. signals, objects such as TreeView models, and GtkDialog windows and buttons (which we previously did in C).
Comment 8 Philip Withnall 2007-06-27 23:22:39 UTC
Created attachment 90789 [details] [review]
Move to GtkBuilder

This is the first draft of the patch, and it includes Jan's patch for the volume widget. There are still a few problems/things to do:
 - The "stock-tool-brightness-contrast-22.png" image on the Preferences dialog no longer shows up. I've tried everything I can to get it to appear, but no luck. We may want to move to using a proper stock icon instead of the one in /data.
 - I'm sure there are signals and GObjects I've missed, but since this is a first draft, I think that's OK, and they can be caught in later patches (once this one's been applied).
 - As discussed with Bastien, I haven't been able to move dialogs such as TotemOpenLocation completely into the XML, so we're still reparenting the vbox from the XML to the dialog GObject. I can't see much of a way round this at the moment, but there's still room for experimentation (and if this can be done, lots of stuff can be cleaned up).
 - There's still cleanup to do once bug #447969 lands, using the API it'll introduce.

Sorry for the massive patch, but most of it's just repetitive stuff.
Comment 9 Bastien Nocera 2007-06-28 15:09:43 UTC
Jan, I committed a slightly modified version of your patch, which uses a GtkVolumeButton in fullscreen as well, removing quite a bit of code in the process. Thinking about it, it's probably a good idea to make the seek bars use the same GtkAdjustment as well, that would remove quite a few hacks (bug 451912).

Philip, your patch didn't apply cleanly against the current SVN, could you re-diff?

2007-06-28  Bastien Nocera  <hadess@hadess.net>

        * browser-plugin/totem-plugin-viewer.c: (cb_vol),
        (totem_embedded_construct), (totem_volume_create):
        * configure.in:
        * data/totem.glade:
        * src/Makefile.am:
        * src/bacon-volume.c:
        * src/bacon-volume.h:
        * src/totem-private.h:
        * src/totem.c: (totem_action_set_mrl_with_warning),
        (update_volume_sliders), (volume_button_value_changed),
        (popup_hide), (totem_callback_connect), (totem_volume_create),
        (main): Remove the BaconVolume widget, and use the GtkVolumeButton
        in the new GTK+ instead, use the scale button in fullscreen mode as
        well, make both volume buttons share the same GtkAdjustment,
        modified version of patch from Jan Arne Petersen <jpetersen@jpetersen.org>
        (Helps: #450635)
Comment 10 Philip Withnall 2007-06-29 15:10:03 UTC
Created attachment 90882 [details] [review]
Move to GtkBuilder (updated)

This one's updated to apply cleanly against SVN HEAD, and all the points from comment #8 still apply. It took far too long to merge this in with Bastien's fullscreen stuff. :-P
Comment 11 Philip Withnall 2007-07-05 14:33:52 UTC
Created attachment 91240 [details] [review]
Move to GtkBuilder (updated again)

Updated again to apply cleanly to HEAD.
Comment 12 Bastien Nocera 2007-07-05 23:27:38 UTC
Didn't want to haggle too much, so committed this. The skipto dialog doesn't update the label anymore though, so that'll need to be fixed.

2007-07-05  Bastien Nocera  <hadess@hadess.net>

        * Load of files: Patch from Philip Withnall <pwithnall@svn.gnome.org>
        to use GtkBuilder instead of libglade (Closes: #450635)

2007-07-06  Bastien Nocera  <hadess@hadess.net>

        * POTFILES.in: skip_to.glade was renamed to skipto.ui

2007-07-05  Bastien Nocera  <hadess@hadess.net>

        * POTFILES.in:
        * POTFILES.skip: Updated for GtkBuilder migration