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 697154 - Add a test token for classic mode
Add a test token for classic mode
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Yelp maintainers
Yelp maintainers
Depends on:
Blocks: 697155
 
 
Reported: 2013-04-03 00:38 UTC by Matthias Clasen
Modified: 2013-04-05 23:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a test token for classic mode (3.01 KB, patch)
2013-04-03 00:38 UTC, Matthias Clasen
none Details | Review
Add a test token for classic mode (3.11 KB, patch)
2013-04-05 17:51 UTC, Matthias Clasen
none Details | Review

Description Matthias Clasen 2013-04-03 00:38:06 UTC
This will be used to adjust the GNOME user guide for classic mode
in a few places.
Comment 1 Matthias Clasen 2013-04-03 00:38:10 UTC
Created attachment 240450 [details] [review]
Add a test token for classic mode
Comment 2 Allison Karlitskaya (desrt) 2013-04-05 16:52:46 UTC
Review of attachment 240450 [details] [review]:

::: libyelp/yelp-settings.c
@@ +309,3 @@
+            GVariant *v;
+            g_variant_get (ret, "(v)", &v);
+            g_variant_get (v, "&s", &name);

this is unsafe.  you don't know what's inside of the "v" and it may not be a string, making this a programmer error.

the use of a char* to store the return of "&s" is also a technical (if not pedantic) type error.

do it like

if (g_variant_is_of_type (v, G_VARIANT_TYPE_STRING) &&
    g_str_equal (g_variant_get_string (v, NULL), "classic"))

or something like that
Comment 3 Shaun McCance 2013-04-05 17:13:35 UTC
I'd rather have the word "gnome" in the test token. platform:gnome-classic perhaps. And I trust desrt's nitpicks about the GVariant use. Other than that, if you don't think it's too much for 3.8.1, this is cool.
Comment 4 Matthias Clasen 2013-04-05 17:51:15 UTC
Created attachment 240779 [details] [review]
Add a test token for classic mode

The test token is called platform:gnome-classic.
This will be used to adjust the GNOME user guide for classic mode
in a few places.
Comment 5 Matthias Clasen 2013-04-05 23:40:51 UTC
Attachment 240450 [details] pushed as ef92b1f - Add a test token for classic mode
Attachment 240779 [details] pushed as ef92b1f - Add a test token for classic mode