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 630913 - Add Introspection support
Add Introspection support
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: general
2.90.x
Other All
: Normal normal
: ---
Assigned To: Giovanni Campagna
Desktop Maintainers
Depends on: 634091 634095
Blocks: randr-tracker 585444 630917 634332
 
 
Reported: 2010-09-29 15:53 UTC by Javier Jardón (IRC: jjardon)
Modified: 2011-01-06 22:20 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
Use non recursive automake for the library (2.83 KB, patch)
2010-10-20 20:11 UTC, Giovanni Campagna
none Details | Review
Use non recursive automake for the library (2.94 KB, patch)
2010-10-20 20:15 UTC, Giovanni Campagna
none Details | Review
Turn GnomeRRScreen into a GObject (26.35 KB, patch)
2010-10-21 15:22 UTC, Giovanni Campagna
none Details | Review
Add support for GObjectIntrospection (17.89 KB, patch)
2010-10-25 17:28 UTC, Giovanni Campagna
none Details | Review
Turn GnomeRRConfig and GnomeOutputInfo into GObjects (81.52 KB, patch)
2010-11-04 16:22 UTC, Giovanni Campagna
none Details | Review
Turn GnomeRRConfig and GnomeOutputInfo into GObjects (81.74 KB, patch)
2010-11-07 10:47 UTC, Giovanni Campagna
none Details | Review
Move include files to libgnome-desktop/ (10.73 KB, patch)
2010-11-07 11:04 UTC, Giovanni Campagna
reviewed Details | Review
Move include files to libgnome-desktop/ (10.88 KB, patch)
2010-11-08 17:48 UTC, Giovanni Campagna
committed Details | Review
Turn GnomeRRScreen into a GObject (26.30 KB, patch)
2010-11-08 18:10 UTC, Giovanni Campagna
committed Details | Review
Add support for GObjectIntrospection (17.82 KB, patch)
2010-11-08 18:10 UTC, Giovanni Campagna
committed Details | Review
Turn GnomeRRConfig and GnomeOutputInfo into GObjects (81.48 KB, patch)
2010-11-08 18:11 UTC, Giovanni Campagna
committed Details | Review

Description Javier Jardón (IRC: jjardon) 2010-09-29 15:53:07 UTC
Add support for gobject-introspection to the build system.
http://live.gnome.org/GnomeGoals/AddGObjectIntrospectionSupport
Comment 1 Giovanni Campagna 2010-10-20 20:11:34 UTC
Created attachment 172878 [details] [review]
Use non recursive automake for the library

Switching to non recursive automake, so that all header files are defined
in one Makefile.
This is a necessary step for GObjectIntrospection to work, but should also
help future maintenance of the library (no need to distinguish libgnome vs
libgnomeui).
Comment 2 Giovanni Campagna 2010-10-20 20:15:05 UTC
Created attachment 172879 [details] [review]
Use non recursive automake for the library

Switching to non recursive automake, so that all header files are defined
in one Makefile.
This is a necessary step for GObjectIntrospection to work, but should also
help future maintenance of the library (no need to distinguish libgnome vs
libgnomeui).
Comment 3 Giovanni Campagna 2010-10-21 15:22:09 UTC
Created attachment 172942 [details] [review]
Turn GnomeRRScreen into a GObject

Rework GnomeRRScreen so that it is a full GObject, and all its data
is moved to GnomeRRScreenPrivate.
GObject's are more supported when it comes to introspection and bindings,
in particular wrt constructors. Therefore, this is a necessary step
for useful introspection generation.
Comment 4 Federico Mena Quintero 2010-10-21 18:49:41 UTC
Review of attachment 172942 [details] [review]:

This is a very interesting patch.  It would be perfect if GnomeRR were a public API, but it is intended to be used only by gnome-settings-daemon's RANDR plugin and gnome-display-properties from the control center.

I don't think we need to worry about sanitizing GnomeRR for public consumption (or at least, not just yet).  The public API for doing RANDR stuff is the D-Bus API (see #623223 for a proposed extension).
Comment 5 Giovanni Campagna 2010-10-21 20:02:01 UTC
Well, in addition to gnome-control-center and gnome-settings-daemon, another user of GnomeRR may be gnome-shell, which will show the screen indicator in the system status area.
This is why it is particularly important for GnomeRR to be introspected and accessed from bindings.

Of course, a native DBus based binding would fit, but why would you introduce a new API, with IPC overhead, when there is a library that works just as well?
Comment 6 Federico Mena Quintero 2010-10-22 16:23:50 UTC
Oh, yeah, I forgot about gnome-shell...

Would you have time to make the corresponding changes in gnome-settings-daemon/plugins/xrandr and gnome-control-center/capplets/display (or whatever the directory is called these days), to be able to see how the new API looks like from clients?

(I like your patch and it should go in, if gnome-shell will end up using it.  For now I don't want to break anything in g-s-d and g-c-c, so let's get that working before pushing the patch to gnome-desktop.)
Comment 7 Giovanni Campagna 2010-10-22 20:28:01 UTC
Actually, since the whole contents of the GnomeRRScreen struct is private, and the only way to create it is gnome_rr_screen_new, which is preserved with the same signature and behaviour, no API changes are introduced by this patch, which should just work on master g-s-d and g-c-c
Comment 8 Federico Mena Quintero 2010-10-22 23:03:53 UTC
OK, that's good to know.

Hmm, now that I think about it, the really important API there is GnomeRRConfig.  *That* is what g-s-d and g-c-c use to look at the RANDR configuration.  The GnomeRRScreen API is lower-level stuff; it is also used, but the main entry points are in GnomeRRConfig.

If gnome-shell wants to implement its own status icon for displays, then it will definitely want to use GnomeRRConfig.  I wonder how many changes that needs to be binding-friendly - it uses things like arrays in structs that you iterate by hand, etc.

(Maybe it's easier to just bind that by hand in gnome-shell itself?  No idea.)
Comment 9 Giovanni Campagna 2010-10-25 17:28:28 UTC
Created attachment 173191 [details] [review]
Add support for GObjectIntrospection

Turned all GnomeRR structures into boxed types, then added the needed
annotations and the Makefile.am bits.
Does not yet include API changes, but should bind (awfully) all of
libgnome-desktop.
Comment 10 Giovanni Campagna 2010-11-04 16:22:52 UTC
Created attachment 173831 [details] [review]
Turn GnomeRRConfig and GnomeOutputInfo into GObjects

For easier binding and introspectability, rework GnomeRRConfig and
GnomeOutputInfo to be GObjects (GInitables, actually) instead of
boxed types. This commit *does* break API, as previous API just
accessed fields in the public structs, while now everything has been
moved to private structures and accessors must be used.
Also, rework GnomeRRLabeler to use both a public and a private structure,
so that gobject-introspection can find instance/class sizes.
Modifications to gnome-control-center and gnome-settings-daemon will
follow.
Comment 11 Bastien Nocera 2010-11-05 15:38:52 UTC
Need to have patches for gnome-settings-daemon as well.
Comment 12 Vincent Untz 2010-11-05 16:35:29 UTC
(In reply to comment #2)
> Created an attachment (id=172879) [details] [review]
> Use non recursive automake for the library
> 
> Switching to non recursive automake, so that all header files are defined
> in one Makefile.
> This is a necessary step for GObjectIntrospection to work, but should also
> help future maintenance of the library (no need to distinguish libgnome vs
> libgnomeui).

Gah, that's something I dislike a bit -- could be because I'm not used to this, but my experience with non-recursive automake has been a bit painful in the past :/

I'm not sure how it's really required for g-i support. In the worst case, we can move the headers in the same directory as the c files (which makes sense anyway).
Comment 13 Giovanni Campagna 2010-11-07 10:45:27 UTC
(In reply to comment #12)
> (In reply to comment #2)
> > Created an attachment (id=172879) [details] [review] [details] [review]
> > Use non recursive automake for the library
> > 
> > Switching to non recursive automake, so that all header files are defined
> > in one Makefile.
> > This is a necessary step for GObjectIntrospection to work, but should also
> > help future maintenance of the library (no need to distinguish libgnome vs
> > libgnomeui).
> 
> Gah, that's something I dislike a bit -- could be because I'm not used to this,
> but my experience with non-recursive automake has been a bit painful in the
> past :/
 
Why so?
Non recursive automake is actually easier than recursive one, IMHO.

> I'm not sure how it's really required for g-i support. In the worst case, we
> can move the headers in the same directory as the c files (which makes sense
> anyway).

You need all the headers defined in one place, and that place must be the same of sources for g-i to work.
Anyway, will move the headers to libgnome-desktop/.

(As a side note, maybe it's time to drop libgnome/ and libgnomeui/ and just install in $(includedir)/gnome-desktop-3/)
Comment 14 Giovanni Campagna 2010-11-07 10:47:19 UTC
Created attachment 173984 [details] [review]
Turn GnomeRRConfig and GnomeOutputInfo into GObjects

For easier binding and introspectability, rework GnomeRRConfig and
GnomeOutputInfo to be GObjects (GInitables, actually) instead of
boxed types. This commit *does* break API, as previous API just
accessed fields in the public structs, while now everything has been
moved to private structures and accessors must be used.
Also, rework GnomeRRLabeler to use both a public and a private structure,
so that gobject-introspection can find instance/class sizes.
Modifications to gnome-control-center and gnome-settings-daemon will
follow.
Comment 15 Giovanni Campagna 2010-11-07 11:04:33 UTC
Created attachment 173985 [details] [review]
Move include files to libgnome-desktop/

gobject-introspection requires all header and source files to be
defined in one place. This is one way to achieve that, without
using non recursive automake.
Comment 16 Vincent Untz 2010-11-08 15:41:39 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #2)
> > > Created an attachment (id=172879) [details] [review] [details] [review] [details] [review]
> > > Use non recursive automake for the library
> > > 
> > > Switching to non recursive automake, so that all header files are defined
> > > in one Makefile.
> > > This is a necessary step for GObjectIntrospection to work, but should also
> > > help future maintenance of the library (no need to distinguish libgnome vs
> > > libgnomeui).
> > 
> > Gah, that's something I dislike a bit -- could be because I'm not used to this,
> > but my experience with non-recursive automake has been a bit painful in the
> > past :/
> 
> Why so?
> Non recursive automake is actually easier than recursive one, IMHO.

Well, the fact that I'm used to type make in subdirs to build a subpart of a modules, and my experience with webkitgtk which just takes ages to build ;-)

> > I'm not sure how it's really required for g-i support. In the worst case, we
> > can move the headers in the same directory as the c files (which makes sense
> > anyway).
> 
> You need all the headers defined in one place, and that place must be the same
> of sources for g-i to work.
> Anyway, will move the headers to libgnome-desktop/.
> 
> (As a side note, maybe it's time to drop libgnome/ and libgnomeui/ and just
> install in $(includedir)/gnome-desktop-3/)

Yes, we'll want to do that. We just need to do it just after a release (like after 2.91.2) so we give time for people to fix it.
Comment 17 Vincent Untz 2010-11-08 15:50:03 UTC
Review of attachment 173985 [details] [review]:

Thanks, this mostly looks good, feel free to commit after the next release with the following changes. Could you send a mail to d-d-l about the includedir change once this is done?

::: libgnome-desktop/Makefile.am
@@ +49,3 @@
+        gnome-rr-config.h               \
+        gnome-rr-labeler.h
+

As you suggested, let's put them all in the same directory. That would be $(includedir)/gnome-desktop-3.0/libgnome-desktop.

::: libgnome-desktop/libgnomeui/gnome-bg.h
@@ +33,3 @@
 #include <gconf/gconf-client.h>
+#include "gnome-desktop-thumbnail.h"
+#include "gnome-bg-crossfade.h"

You need to use <> since it's a header that is going to be used by external apps.

Which makes me believe we might want to put those files in /usr/include/gnome-desktop-3.0/libgnome-desktop/ so that we can use #include <libgnome-desktop/gnome-bg.h>

::: libgnome-desktop/gnome-desktop-utils.c
@@ +32,2 @@
 #define GNOME_DESKTOP_USE_UNSTABLE_API
+#include <gnome-desktop-utils.h>

Use "" instead of <>, to be consistent with the change in other .c files (unless there's a good reason for this that I missed)

::: libgnome-desktop/libgnomeui/gnome-rr-config.h
@@ +31,2 @@
 #include <glib.h>
+#include "gnome-rr.h"

Same comment as for gnome-bg.h

::: libgnome-desktop/libgnomeui/gnome-rr-labeler.h
@@ +31,3 @@
 #endif
 
+#include "gnome-rr-config.h"

Same comment as for gnome-bg.h
Comment 18 Giovanni Campagna 2010-11-08 16:55:24 UTC
(In reply to comment #17)
> Review of attachment 173985 [details] [review]:
> 
> Thanks, this mostly looks good, feel free to commit after the next release with
> the following changes. Could you send a mail to d-d-l about the includedir
> change once this is done?
> 
> ::: libgnome-desktop/Makefile.am
> @@ +49,3 @@
> +        gnome-rr-config.h               \
> +        gnome-rr-labeler.h
> +
> 
> As you suggested, let's put them all in the same directory. That would be
> $(includedir)/gnome-desktop-3.0/libgnome-desktop.
> 
> ::: libgnome-desktop/libgnomeui/gnome-bg.h
> @@ +33,3 @@
>  #include <gconf/gconf-client.h>
> +#include "gnome-desktop-thumbnail.h"
> +#include "gnome-bg-crossfade.h"
> 
> You need to use <> since it's a header that is going to be used by external
> apps.
> 
> Which makes me believe we might want to put those files in
> /usr/include/gnome-desktop-3.0/libgnome-desktop/ so that we can use #include
> <libgnome-desktop/gnome-bg.h>

The problem is that libgnome-desktop source files want to include gnome-bg.h, and they don't have a libgnome-desktop directory to search in.
We can either:
- reproduce the libgnome-desktop directory layout (and use non-recursive automake)
- install everything in /usr/include/gnome-desktop-3.0 and gradually move to including only a single <gnome-desktop.h>
- use "" in public headers (so that dependent headers are always looked for in the same folder as the including one)
Comment 19 Vincent Untz 2010-11-08 17:29:06 UTC
(In reply to comment #18)
> The problem is that libgnome-desktop source files want to include gnome-bg.h,
> and they don't have a libgnome-desktop directory to search in.

They do have. Look at the directory the sources are in :-)
Comment 20 Giovanni Campagna 2010-11-08 17:30:55 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > The problem is that libgnome-desktop source files want to include gnome-bg.h,
> > and they don't have a libgnome-desktop directory to search in.
> 
> They do have. Look at the directory the sources are in :-)

Oh. Right. Patch coming :D
Comment 21 Giovanni Campagna 2010-11-08 17:48:51 UTC
Created attachment 174074 [details] [review]
Move include files to libgnome-desktop/

gobject-introspection requires all header and source files to be
defined in one place. This is one way to achieve that, without
using non recursive automake.
Also, remove the outdated references to libgnome and libgnomeui

As agreed, I will commit as soon as 2.91.2 is released, and I will
send an email to desktop-devel-list with the changes.
Comment 22 Giovanni Campagna 2010-11-08 18:10:29 UTC
Created attachment 174076 [details] [review]
Turn GnomeRRScreen into a GObject

Rework GnomeRRScreen so that it is a full GObject, and all its data
is moved to GnomeRRScreenPrivate.
GObject's are more supported when it comes to introspection and bindings,
in particular wrt constructors. Therefore, this is a necessary step
for useful introspection generation.
Comment 23 Giovanni Campagna 2010-11-08 18:10:42 UTC
Created attachment 174077 [details] [review]
Add support for GObjectIntrospection

Turned all GnomeRR structures into boxed types, then added the needed
annotations and the Makefile.am bits.
Does not yet include API changes, but should bind (awfully) all of
libgnome-desktop.
Comment 24 Giovanni Campagna 2010-11-08 18:11:00 UTC
Created attachment 174078 [details] [review]
Turn GnomeRRConfig and GnomeOutputInfo into GObjects

For easier binding and introspectability, rework GnomeRRConfig and
GnomeOutputInfo to be GObjects (GInitables, actually) instead of
boxed types. This commit *does* break API, as previous API just
accessed fields in the public structs, while now everything has been
moved to private structures and accessors must be used.
Also, rework GnomeRRLabeler to use both a public and a private structure,
so that gobject-introspection can find instance/class sizes.
Modifications to gnome-control-center and gnome-settings-daemon will
follow.
Comment 25 Giovanni Campagna 2010-11-23 15:42:03 UTC
Has some of the gnome-desktop maintainers started to review this?
Not a full thorough review, just to know if there is interest in cleaning up GnomeRR (even though the gnome-shell display status has been rejected).
I'm asking this because continous advances in gnome-control-center and gnome-settings-daemon are bitrotting the related patches, so if there is interest in this, it should be pushed soon.
Comment 26 Federico Mena Quintero 2010-11-23 23:29:38 UTC
See bug #631995 about supporting a status icon for monitors in gnome-shell.
Comment 27 Federico Mena Quintero 2010-11-23 23:32:22 UTC
Bug #634332 is another one about gnome-shell.
Comment 28 Giovanni Campagna 2010-11-24 13:46:08 UTC
I know about bug 634332 (I am the reporter...), in fact it was decided that this feature, if it should exist at all, should be an extension.
But besides that, I am asking: is it worth improving libgnome-desktop the way I proposed?
Basically, is clean code for the sake of clean code useful?
Comment 29 Federico Mena Quintero 2010-11-24 20:26:54 UTC
To answer your last question about clean code - yes, clean code is useful, but GObject-kosher code is hard to read ;)  I'd like to see the corresponding patches to gnome-settings-daemon and to the capplet.  See my comments below about possibly not hiding all the struct fields, but nevertheless adding accessors for the benefit of bindings.

Can you please push a branch with the modified patches?  We can merge master into that branch periodically to keep it fresh, until we figure out what to do for gnome-shell et al.

Here is a detailed review for each commit (I see that you reverted them).

"Turn GnomeRRScreen into a GObject"

+ fill_out_screen_info() - g_return_val_if_fail() is wrong here; keep the g_assert()s.

+ lots of foo->blah->priv->baz - pull the priv into a variable and use that:
  some_func (screen)
  {
    Priv *priv = screen->priv;

    priv->somefield = 42;
  }

+ The version checks are iffy.  Look for rr_major_version and rr_minor_version.  In all cases, we want to say "too old" if major < 1 or (major == 1 && minor < 2)".  Be careful for the checks that *do* need 1.3 or later, as when calling XRRGetScreenResourcesCurrent().

+ gnome_rr_screen_finalize() - needs to chain up to the parent class handler

+ no get_property() in GnomeRRScreen?  It would be nice to fetch the GdkScreen back.

+ gnome_rr_screen_new() - Don't pass the callback anymore. Have callers connect to the signal instead.

+ gnome_rr_screen_destroy() - Remove it?  Do we need immediate disposal?  If so, add a ::dispose() and shut down things there, instead of in ::finalize().

+ gnome_rr_screen_set_primary_output() - Fix the version check so major > 1 will work.

+ GnomeRRScreenClass - no slot for the "changed" vmethod?  I don't expect anyone to subclass this, but anyway...

"Add support for GObjectIntrospection"

+ output_copy() - this is not a deep-copy (it just copies the pointers to crtcs, but doesn't copy the crtcs themselves).  Is that intended?

+ crtc_copy() - Same as above.

"Turn GnomeRRConfig and GnomeOutputInfo into GObjects"
	+ I don't like using a "current" property to say whether you want to init a GnomeRRConfig from a GnomeRRScreen or from a file.  I'd rather have a gnome_rr_config_new() that gives you an empty configuration (essentially a wrapper for g_object_new()).  And then, to have gnome_rr_config_set_from_screen (config, rr_screen) and a gboolean gnome_rr_config_set_from_file(config, filename, gerror), which would be just like the old gnome_rr_config_new_stored() but with a filename.

+ I don't really like hiding all the fields in outputs/crtcs/modes.
The code in gnome-settings-daemon is going to get a lot uglier.  If
bindings really need accesors, can we have accessors *and* public
struct fields?
Comment 30 Giovanni Campagna 2010-11-28 14:44:18 UTC
I pushed rebased patches to "gobject-gnomerr" branch.
I'll improve them with your comments soon.
Comment 31 Giovanni Campagna 2010-11-28 15:34:04 UTC
(In reply to comment #29)
> To answer your last question about clean code - yes, clean code is useful, but
> GObject-kosher code is hard to read ;)  I'd like to see the corresponding
> patches to gnome-settings-daemon and to the capplet.  See my comments below
> about possibly not hiding all the struct fields, but nevertheless adding
> accessors for the benefit of bindings.
> 
> Can you please push a branch with the modified patches?  We can merge master
> into that branch periodically to keep it fresh, until we figure out what to do
> for gnome-shell et al.
> 
> Here is a detailed review for each commit (I see that you reverted them).
> 
> "Turn GnomeRRScreen into a GObject"

All of this incorporated. Thanks!

> "Add support for GObjectIntrospection"
> 
> + output_copy() - this is not a deep-copy (it just copies the pointers to
> crtcs, but doesn't copy the crtcs themselves).  Is that intended?
> 
> + crtc_copy() - Same as above.

Yes, because {output,crtc}_free don't free the depending object (also, it would mess with recursion because they reference each other freely).
 
> "Turn GnomeRRConfig and GnomeOutputInfo into GObjects"
>     + I don't like using a "current" property to say whether you want to init a
> GnomeRRConfig from a GnomeRRScreen or from a file.  I'd rather have a
> gnome_rr_config_new() that gives you an empty configuration (essentially a
> wrapper for g_object_new()).  And then, to have gnome_rr_config_set_from_screen
> (config, rr_screen) and a gboolean gnome_rr_config_set_from_file(config,
> filename, gerror), which would be just like the old
> gnome_rr_config_new_stored() but with a filename.

Will do that.
Do you mind if gnome_rr_config_new_current and gnome_rr_config_new_stored are kept?

> + I don't really like hiding all the fields in outputs/crtcs/modes.
> The code in gnome-settings-daemon is going to get a lot uglier.  If
> bindings really need accesors, can we have accessors *and* public
> struct fields?

We could, but:
- I'd like to drop some repetitive code in gnome-control-center and gnome-settings-daemon by adding more methods to GnomeRROutputInfo
- I'd like to add properties on GnomeRROutputInfo / GnomeRRConfig at some point 
- There is no distinction of readable and read/write fields, so the comment on top of GnomeOutputInfo would be back

Actually, code is not that bad, and this is no different than what for example Gtk has been doing for a while.
Comment 32 Giovanni Campagna 2011-01-05 17:26:50 UTC
A month passed.
Any progress on reviewing this?
Or were you expecting anything from me?
Comment 33 Vincent Untz 2011-01-05 18:02:25 UTC
Federico: do you want somebody else to review the patches?
Comment 34 Federico Mena Quintero 2011-01-05 22:27:49 UTC
(In reply to comment #31)

> Will do that.
> Do you mind if gnome_rr_config_new_current and gnome_rr_config_new_stored are
> kept?

I see that you did that; it is fine.  They are the convenience functions that client code already uses, anyway.

It's kind of weird not to have a gnome_rr_config_new() and still have load_filename() and load_current().  However, I guess only the bindings will use the g_object_new() equivalent plus those functions...

> - I'd like to drop some repetitive code in gnome-control-center and
> gnome-settings-daemon by adding more methods to GnomeRROutputInfo

Interesting.  What are you thinking about?

> - There is no distinction of readable and read/write fields, so the comment on
> top of GnomeOutputInfo would be back

Well, that's the thing.  You query for a bunch of stuff.  Then you modify things that make sense (output positions, etc.) and leave alone those that don't make sense to change (CRTC IDs, etc.).  Then you ask for things to magically be changed to your specifications.

I guess you could be *very* neurotic and properly dissect the read-only vs. read-write fields, but it sounds like overkill :)


I've pushed a few fixes to your branch.  One is to fix the version checks for good, and the others are stylistic changes.

I just quickly checked the gobject-gnomerr branches in gnome-settings-daemon and gnome-control-center; they look good.

One final change before you merge all three branches - can you please rename gnome_rr_output_info_get_connected() to gnome_rr_output_info_is_connected()?  That's the convention for boolean values.

After that, please merge all three branches to their modules :)

Thanks for working on this!
Comment 35 Giovanni Campagna 2011-01-06 20:08:05 UTC
(In reply to comment #34)
> (In reply to comment #31)
> 
> > - I'd like to drop some repetitive code in gnome-control-center and
> > gnome-settings-daemon by adding more methods to GnomeRROutputInfo
> 
> Interesting.  What are you thinking about?

I was thinking about functions to find the primary output, to find the laptop, to make clone modes. Anyway, it is another feature, so if and when it will done, it will be in a different bug.
> 
> > - There is no distinction of readable and read/write fields, so the comment on
> > top of GnomeOutputInfo would be back
> 
> Well, that's the thing.  You query for a bunch of stuff.  Then you modify
> things that make sense (output positions, etc.) and leave alone those that
> don't make sense to change (CRTC IDs, etc.).  Then you ask for things to
> magically be changed to your specifications.
> 
> I guess you could be *very* neurotic and properly dissect the read-only vs.
> read-write fields, but it sounds like overkill :)

I tried to do exactly that, by adding setters only for some fields, and I looks that they're enough (for gnome-control-center and gnome-settings-daemon, at least)

> 
> I've pushed a few fixes to your branch.  One is to fix the version checks for
> good, and the others are stylistic changes.
> 
> I just quickly checked the gobject-gnomerr branches in gnome-settings-daemon
> and gnome-control-center; they look good.
> 
> One final change before you merge all three branches - can you please rename
> gnome_rr_output_info_get_connected() to gnome_rr_output_info_is_connected()? 
> That's the convention for boolean values.
> 
> After that, please merge all three branches to their modules :)
> 
> Thanks for working on this!

Merged, fixed, tested, pushed!
Comment 36 Wouter Bolsterlee (uws) 2011-01-06 21:42:38 UTC
This breaks the gnome-screensaver build - see bug #630913. Could anyone review/confirm the trivial patch posted there?
Comment 37 André Klapper 2011-01-06 22:13:57 UTC
(In reply to comment #36)
> bug #630913.

Wrong bug number?
Comment 38 André Klapper 2011-01-06 22:20:44 UTC
--> bug 638867
Comment 39 Wouter Bolsterlee (uws) 2011-01-06 22:20:55 UTC
Sorry, I meant bug #638867 in comment 36.