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 642068 - info: Add panel chooser, graphics tab
info: Add panel chooser, graphics tab
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 642069 (view as bug list)
Depends on: 642067
Blocks:
 
 
Reported: 2011-02-10 22:45 UTC by Colin Walters
Modified: 2011-02-14 22:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
graphics tab (64.49 KB, patch)
2011-02-10 22:52 UTC, Colin Walters
needs-work Details | Review
graphics (63.77 KB, patch)
2011-02-11 19:40 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2011-02-10 22:45:30 UTC
This is work towards implementing
http://live.gnome.org/Design/SystemSettings/SystemInformation

Implemented in this patch is some cleanup and parts of the
Graphics tab.
Comment 1 Colin Walters 2011-02-10 22:46:22 UTC
*** Bug 642069 has been marked as a duplicate of this bug. ***
Comment 2 Colin Walters 2011-02-10 22:52:52 UTC
Created attachment 180624 [details] [review]
graphics tab
Comment 3 Bastien Nocera 2011-02-11 01:33:07 UTC
Review of attachment 180624 [details] [review]:

::: panels/info/cc-info-panel.c
@@ +357,1 @@
+  is_accelerated_binary = g_build_filename (LIBEXECDIR, "gnome-session-is-accelerated", NULL);

Again, a dependency on gnome-session.

@@ +757,3 @@
+  widget = WID (self->priv->builder, "graphics_fallback_switch_box");
+  sw = GTK_SWITCH (gtk_switch_new ());
+  GtkWidget *widget;

See below.

@@ +874,3 @@
+  self->priv->builder = gtk_builder_new ();
+
+

gnome-control-center doesn't depend on gnome-session, so you'll either need to do everything at the gsettings-desktop-schemas level, or just use D-Bus to ask for the session name (and save it).
Comment 4 Colin Walters 2011-02-11 01:44:51 UTC
(In reply to comment #3)
> Review of attachment 180624 [details] [review]:
> 
> ::: panels/info/cc-info-panel.c
> @@ +357,1 @@
> +  is_accelerated_binary = g_build_filename (LIBEXECDIR,
> "gnome-session-is-accelerated", NULL);
> 
> Again, a dependency on gnome-session.

"again"?
 
> gnome-control-center doesn't depend on gnome-session, so you'll either need to
> do everything at the gsettings-desktop-schemas level, or just use D-Bus to ask
> for the session name (and save it).

Umm...why?  In what world does it make sense to run gnome-control-center outside of GNOME?  And even if it did, how would using DBus solve anything?
Comment 5 Bastien Nocera 2011-02-11 02:17:06 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Review of attachment 180624 [details] [review] [details]:
> > 
> > ::: panels/info/cc-info-panel.c
> > @@ +357,1 @@
> > +  is_accelerated_binary = g_build_filename (LIBEXECDIR,
> > "gnome-session-is-accelerated", NULL);
> > 
> > Again, a dependency on gnome-session.
> 
> "again"?

You need to read the reviews backwards, just like I read your code ;)

> > gnome-control-center doesn't depend on gnome-session, so you'll either need to
> > do everything at the gsettings-desktop-schemas level, or just use D-Bus to ask
> > for the session name (and save it).
> 
> Umm...why?  In what world does it make sense to run gnome-control-center
> outside of GNOME?  And even if it did, how would using DBus solve anything?

There's just one case really, you're running GNOME without gnome-session (say, getting systemd's session supported started).

If you're going to add a hard dependency on gnome-session (which is what trying to load the setting is), then you need a pkg-config file in gnome-session, and patch gnome-control-center to hard require it.

I don't trust package maintainers to make the "requires" changes if we don't change the build dependencies.
Comment 6 Colin Walters 2011-02-11 02:26:48 UTC
(In reply to comment #5)

> You need to read the reviews backwards, just like I read your code ;)

Fair enough!

> There's just one case really, you're running GNOME without gnome-session (say,
> getting systemd's session supported started).

But this isn't happening for 3.0, clearly.

> If you're going to add a hard dependency on gnome-session (which is what trying
> to load the setting is), 

Well...it doesn't crash, but yes.

> I don't trust package maintainers to make the "requires" changes if we don't
> change the build dependencies.

A reasonable point, though I'm not sure if gnome-session installing a .pc file is right.  Maybe.  I guess the thing I don't like about it is that pkg-config doesn't have a reasonable way to say "don't use this it's private".
Comment 7 Bastien Nocera 2011-02-11 02:31:55 UTC
(In reply to comment #6)
<snip>
> > If you're going to add a hard dependency on gnome-session (which is what trying
> > to load the setting is), 
> 
> Well...it doesn't crash, but yes.

Loading a GSettings which isn't installed will result in an abort(). So it is a hard dependency.

> > I don't trust package maintainers to make the "requires" changes if we don't
> > change the build dependencies.
> 
> A reasonable point, though I'm not sure if gnome-session installing a .pc file
> is right.  Maybe.  I guess the thing I don't like about it is that pkg-config
> doesn't have a reasonable way to say "don't use this it's private".

The pkg-config can contain very little information. Though it would probably be of interest for it to contain libexecdir, so that you could use that to load the "graphics is accelerated" test.
Comment 8 Colin Walters 2011-02-11 19:40:16 UTC
Created attachment 180683 [details] [review]
graphics