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 688497 - AppInfo: Add sufficient api to port gnome-session from EggDesktopFile
AppInfo: Add sufficient api to port gnome-session from EggDesktopFile
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 688499
 
 
Reported: 2012-11-16 23:27 UTC by Matthias Clasen
Modified: 2012-11-22 02:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make autostart implementable (5.71 KB, patch)
2012-11-16 23:27 UTC, Matthias Clasen
accepted-commit_now Details | Review
make startup ids trackable (4.01 KB, patch)
2012-11-16 23:28 UTC, Matthias Clasen
reviewed Details | Review
make autostart implementable (5.92 KB, patch)
2012-11-21 22:42 UTC, Matthias Clasen
reviewed Details | Review
tests (1.53 KB, patch)
2012-11-21 22:42 UTC, Matthias Clasen
accepted-commit_now Details | Review
make startup ids trackable (5.14 KB, patch)
2012-11-21 22:43 UTC, Matthias Clasen
reviewed Details | Review
tests (2.40 KB, patch)
2012-11-21 22:43 UTC, Matthias Clasen
accepted-commit_now Details | Review

Description Matthias Clasen 2012-11-16 23:27:59 UTC
Created attachment 229182 [details] [review]
make autostart implementable

gnome-session needs a few more APIs in order to implement the autostart spec and track startup ids.
Comment 1 Matthias Clasen 2012-11-16 23:28:20 UTC
Created attachment 229183 [details] [review]
make startup ids trackable
Comment 2 Colin Walters 2012-11-17 01:13:27 UTC
Review of attachment 229183 [details] [review]:

Possibly more forward-extension-compatible if we have a GVariant a{sv} for platform-specific launch information, rather than a fixed bag of 3 things?  Like GApplication has IIRC.

Windows doesn't have startup ids too.
Comment 3 Colin Walters 2012-11-17 01:16:41 UTC
Review of attachment 229182 [details] [review]:

No tests...but eh, I assume gnome-session is enough of a test.
Comment 4 Matthias Clasen 2012-11-21 22:42:21 UTC
Created attachment 229596 [details] [review]
make autostart implementable
Comment 5 Matthias Clasen 2012-11-21 22:42:51 UTC
Created attachment 229597 [details] [review]
tests
Comment 6 Matthias Clasen 2012-11-21 22:43:13 UTC
Created attachment 229598 [details] [review]
make startup ids trackable
Comment 7 Matthias Clasen 2012-11-21 22:43:38 UTC
Created attachment 229599 [details] [review]
tests
Comment 8 Matthias Clasen 2012-11-21 22:44:03 UTC
thanks for insisting on the tests - they found a bug !
Comment 9 Colin Walters 2012-11-21 22:49:31 UTC
Review of attachment 229596 [details] [review]:

Doc tweaks:

::: gio/gdesktopappinfo.c
@@ +3465,3 @@
+ * The @key is looked up in the "Desktop Entry" group.
+ *
+ * Returns: a newly allocated string

, or %NULL if the key is not found

@@ +3488,3 @@
+ * The @key is looked up in the "Desktop Entry" group.
+ *
+ * Returns: the boolean value

, or %FALSE if the key is not found

(Note: ambiguous, may want to create a version which has a gboolean for success, and a separate gboolean *out value)

@@ +3503,3 @@
+
+gboolean
+g_desktop_app_info_has_key (GDesktopAppInfo *info,

Missing docs.
Comment 10 Colin Walters 2012-11-21 22:50:05 UTC
Review of attachment 229597 [details] [review]:

Looks good to me.
Comment 11 Colin Walters 2012-11-21 22:53:49 UTC
Review of attachment 229598 [details] [review]:

One docs nit:

::: gio/gappinfo.c
@@ +830,3 @@
   object_class->finalize = g_app_launch_context_finalize;
+
+  signals[LAUNCH_FAILED] = g_signal_new ("launch-failed",

No docs for this...maybe just reference the existing docs for g_app_launch_context_launch_failed() ?
Comment 12 Colin Walters 2012-11-21 22:55:06 UTC
Review of attachment 229599 [details] [review]:

Makes sense.

::: gio/tests/appinfo.c
@@ +232,3 @@
+                                                NULL);
+
+  error = NULL;

Unncessary, we already init to NULL above