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 621002 - [GApplication] Switch to using variants for timestamps, split out signals
[GApplication] Switch to using variants for timestamps, split out signals
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-06-08 18:17 UTC by Colin Walters
Modified: 2010-06-14 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[GApplication] Switch to using variants for timestamps, split out signals (25.91 KB, patch)
2010-06-08 18:17 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2010-06-08 18:17:18 UTC
Like how we're handling activation, use GVariant for timestamps.  To
avoid polluting the GtkApplication API with GVariants, we rename the
GApplication signals to "quit-with-data" and "action-with-data".
GtkApplication will then wrap those as just "quit" and "action".
Comment 1 Colin Walters 2010-06-08 18:17:19 UTC
Created attachment 163089 [details] [review]
[GApplication] Switch to using variants for timestamps, split out signals
Comment 2 Matthias Clasen 2010-06-10 21:43:40 UTC
Review of attachment 163089 [details] [review]:

::: gio/gapplication.c
@@ +93,3 @@
  *     <methodname>InvokeAction</methodname>
  *     <methodparam><modifier>in</modifier><type>s</type><parameter>action</parameter></methodparam>
+ *     <methodparam><modifier>in</modifier><type>a{sv}</type><parameter>data</parameter></methodparam>

Here you change things to a{sv}

@@ +122,3 @@
+ * invoke one of the actions exported by the application.  On X11
+ * platforms, it should have a "timestamp" parameter of type "u" with
+ * the server time of the initiating event.

...and here you still describe them as 'u'.

@@ +549,3 @@
   g_return_if_fail (name != NULL);
+  g_return_if_fail (platform_data == NULL
+                    || strcmp (g_variant_get_type_string (platform_data), "a{sv}") == 0);

Please use g_variant_is_of_type here

@@ +765,3 @@
   g_return_val_if_fail (G_IS_APPLICATION (application), FALSE);
+  g_return_val_if_fail (platform_data == NULL
+			|| strcmp (g_variant_get_type_string (platform_data), "a{sv}") == 0, FALSE);

...and here too.