GNOME Bugzilla – Bug 621002
[GApplication] Switch to using variants for timestamps, split out signals
Last modified: 2010-06-14 18:40:57 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".
Created attachment 163089 [details] [review] [GApplication] Switch to using variants for timestamps, split out signals
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.