diff options
-rw-r--r-- | debian/changelog | 22 | ||||
-rw-r--r-- | libindicator/indicator-desktop-shortcuts.c | 34 | ||||
-rw-r--r-- | libindicator/indicator-image-helper.c | 6 | ||||
-rw-r--r-- | tests/service-manager-connect-service.c | 2 | ||||
-rw-r--r-- | tests/service-manager-connect.c | 1 | ||||
-rw-r--r-- | tests/service-manager-no-connect.c | 1 | ||||
-rw-r--r-- | tests/service-manager-nostart-connect.c | 1 | ||||
-rw-r--r-- | tests/service-shutdown-timeout.c | 2 | ||||
-rw-r--r-- | tests/service-version-bad-service.c | 2 | ||||
-rw-r--r-- | tests/service-version-good-service.c | 2 | ||||
-rw-r--r-- | tests/service-version-manager.c | 1 | ||||
-rw-r--r-- | tests/service-version-multiwatch-manager-impolite.c | 1 | ||||
-rw-r--r-- | tests/service-version-multiwatch-manager.c | 1 | ||||
-rw-r--r-- | tests/service-version-multiwatch-service.c | 1 | ||||
-rw-r--r-- | tests/test-desktop-shortcuts.c | 3 | ||||
-rw-r--r-- | tests/test-loader.c | 1 |
16 files changed, 40 insertions, 41 deletions
diff --git a/debian/changelog b/debian/changelog index 17f10ee..75d0828 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,25 @@ +libindicator (12.10.2daily13.06.07-0ubuntu1) saucy; urgency=low + + [ Ted Gould ] + * Migrating away from deprecated gtk_icon_info_free(). + + [ William Hua ] + * Use GIcon's serialization/deserialization interface for indicator + icons so that we can load icons as PNG data transmitted over the + bus. + + [ Marco Trevisan (TreviƱo) ] + * IndicatorDesktopShortcuts: Use the proper way to create an AppInfo + from command-line Removed the hack that we used to create a .desktop + app-info from a locally generated keyfile, using + g_app_info_create_from_commandline instead. (LP: #1168373) + * tests: fix compilation and make check. + + [ Ubuntu daily release ] + * Automatic snapshot from revision 492 + + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 07 Jun 2013 02:02:37 +0000 + libindicator (12.10.2daily13.05.02-0ubuntu1) saucy; urgency=low * Automatic snapshot from revision 487 diff --git a/libindicator/indicator-desktop-shortcuts.c b/libindicator/indicator-desktop-shortcuts.c index 70d964e..740d7e1 100644 --- a/libindicator/indicator-desktop-shortcuts.c +++ b/libindicator/indicator-desktop-shortcuts.c @@ -625,46 +625,34 @@ indicator_desktop_shortcuts_nick_exec_with_context (IndicatorDesktopShortcuts * NULL, NULL); - /* Build a new desktop file with the name and exec in the desktop - group. We have to do this with data as apparently there isn't - and add_group function in g_key_file. Go figure. */ - gchar * desktopdata = g_strdup_printf("[" G_KEY_FILE_DESKTOP_GROUP "]\n" - G_KEY_FILE_DESKTOP_KEY_TYPE "=" G_KEY_FILE_DESKTOP_TYPE_APPLICATION "\n" - G_KEY_FILE_DESKTOP_KEY_NAME "=%s\n" - G_KEY_FILE_DESKTOP_KEY_EXEC "=%s\n" - G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY "=%s\n", - name, exec, launch_context ? "true" : "false"); + GAppInfoCreateFlags flags = G_APP_INFO_CREATE_NONE; - g_free(name); g_free(exec); - /* g_debug("Desktop file: \n%s", desktopdata); */ + if (launch_context) { + flags |= G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION; + } - GKeyFile * launcher = g_key_file_new(); - g_key_file_load_from_data(launcher, desktopdata, -1, G_KEY_FILE_NONE, &error); - g_free(desktopdata); + GAppInfo * appinfo = g_app_info_create_from_commandline(exec, name, flags, &error); + g_free(name); g_free(exec); if (error != NULL) { - g_warning("Unable to build desktop keyfile for executing shortcut '%s': %s", nick, error->message); + g_warning("Unable to build Command line App info: %s", error->message); g_error_free(error); return FALSE; } - GDesktopAppInfo * appinfo = g_desktop_app_info_new_from_keyfile(launcher); if (appinfo == NULL) { - g_warning("Unable to build Desktop App info (unknown)"); - g_key_file_free(launcher); + g_warning("Unable to build Command line App info (unknown)"); return FALSE; } - gboolean launched = g_app_info_launch(G_APP_INFO(appinfo), NULL, launch_context, &error); + + gboolean launched = g_app_info_launch(appinfo, NULL, launch_context, &error); if (error != NULL) { g_warning("Unable to launch file from nick '%s': %s", nick, error->message); - g_error_free(error); - g_key_file_free(launcher); - return FALSE; + g_clear_error(&error); } g_object_unref(appinfo); - g_key_file_free(launcher); return launched; } diff --git a/libindicator/indicator-image-helper.c b/libindicator/indicator-image-helper.c index aff9e39..9f48895 100644 --- a/libindicator/indicator-image-helper.c +++ b/libindicator/indicator-image-helper.c @@ -119,7 +119,13 @@ refresh_image (GtkImage * image) } if (icon_info != NULL) { +#if GTK_CHECK_VERSION(3, 8, 0) + g_object_unref(icon_info); +#else + /* NOTE: Leaving this in for lower version as it seems + the object_unref() doesn't work on earlier versions. */ gtk_icon_info_free (icon_info); +#endif } } diff --git a/tests/service-manager-connect-service.c b/tests/service-manager-connect-service.c index 09a7ba1..e56060a 100644 --- a/tests/service-manager-connect-service.c +++ b/tests/service-manager-connect-service.c @@ -48,8 +48,6 @@ shutdown (void) int main (int argc, char ** argv) { - g_type_init(); - g_debug("Starting service"); IndicatorService * is = indicator_service_new("org.ayatana.test"); diff --git a/tests/service-manager-connect.c b/tests/service-manager-connect.c index 5e7684f..5b07972 100644 --- a/tests/service-manager-connect.c +++ b/tests/service-manager-connect.c @@ -62,7 +62,6 @@ connection (IndicatorServiceManager * sm, gboolean connected, gpointer user_data int main (int argc, char ** argv) { - g_type_init(); g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); IndicatorServiceManager * is = indicator_service_manager_new("org.ayatana.test"); diff --git a/tests/service-manager-no-connect.c b/tests/service-manager-no-connect.c index fab0607..ad28507 100644 --- a/tests/service-manager-no-connect.c +++ b/tests/service-manager-no-connect.c @@ -48,7 +48,6 @@ connection (void) int main (int argc, char ** argv) { - g_type_init(); g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); IndicatorServiceManager * is = indicator_service_manager_new("my.test.name"); diff --git a/tests/service-manager-nostart-connect.c b/tests/service-manager-nostart-connect.c index ce0ac80..48f4997 100644 --- a/tests/service-manager-nostart-connect.c +++ b/tests/service-manager-nostart-connect.c @@ -62,7 +62,6 @@ connection (IndicatorServiceManager * sm, gboolean connected, gpointer user_data int main (int argc, char ** argv) { - g_type_init(); g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); g_usleep(150000); diff --git a/tests/service-shutdown-timeout.c b/tests/service-shutdown-timeout.c index e461af0..b909077 100644 --- a/tests/service-shutdown-timeout.c +++ b/tests/service-shutdown-timeout.c @@ -48,8 +48,6 @@ shutdown (void) int main (int argc, char ** argv) { - g_type_init(); - IndicatorService * is = indicator_service_new("my.test.name"); g_signal_connect(G_OBJECT(is), INDICATOR_SERVICE_SIGNAL_SHUTDOWN, shutdown, NULL); diff --git a/tests/service-version-bad-service.c b/tests/service-version-bad-service.c index 12081d1..556575e 100644 --- a/tests/service-version-bad-service.c +++ b/tests/service-version-bad-service.c @@ -49,8 +49,6 @@ shutdown (void) int main (int argc, char ** argv) { - g_type_init(); - IndicatorService * is = indicator_service_new_version("org.ayatana.version.bad", SERVICE_VERSION_BAD); g_signal_connect(G_OBJECT(is), INDICATOR_SERVICE_SIGNAL_SHUTDOWN, shutdown, NULL); diff --git a/tests/service-version-good-service.c b/tests/service-version-good-service.c index 17f987e..9c0dde7 100644 --- a/tests/service-version-good-service.c +++ b/tests/service-version-good-service.c @@ -62,8 +62,6 @@ shutdown (void) int main (int argc, char ** argv) { - g_type_init(); - is = indicator_service_new_version("org.ayatana.version.good", SERVICE_VERSION_GOOD); g_signal_connect(G_OBJECT(is), INDICATOR_SERVICE_SIGNAL_SHUTDOWN, shutdown, NULL); diff --git a/tests/service-version-manager.c b/tests/service-version-manager.c index 9e582f5..63bd6b0 100644 --- a/tests/service-version-manager.c +++ b/tests/service-version-manager.c @@ -58,7 +58,6 @@ connection_good (IndicatorServiceManager * sm, gboolean connected, gpointer user int main (int argc, char ** argv) { - g_type_init(); g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); g_print("Manager: DBUS_SESSION_BUS_ADDRESS = %s\n", g_getenv("DBUS_SESSION_BUS_ADDRESS")); diff --git a/tests/service-version-multiwatch-manager-impolite.c b/tests/service-version-multiwatch-manager-impolite.c index b4cd1c8..68788b9 100644 --- a/tests/service-version-multiwatch-manager-impolite.c +++ b/tests/service-version-multiwatch-manager-impolite.c @@ -64,7 +64,6 @@ delay_start (gpointer data) int main (int argc, char ** argv) { - g_type_init(); g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); g_print("Manager: DBUS_SESSION_BUS_ADDRESS = %s\n", g_getenv("DBUS_SESSION_BUS_ADDRESS")); diff --git a/tests/service-version-multiwatch-manager.c b/tests/service-version-multiwatch-manager.c index 4db6769..633ee59 100644 --- a/tests/service-version-multiwatch-manager.c +++ b/tests/service-version-multiwatch-manager.c @@ -64,7 +64,6 @@ delay_start (gpointer data) int main (int argc, char ** argv) { - g_type_init(); g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); g_print("Manager: DBUS_SESSION_BUS_ADDRESS = %s\n", g_getenv("DBUS_SESSION_BUS_ADDRESS")); diff --git a/tests/service-version-multiwatch-service.c b/tests/service-version-multiwatch-service.c index 30b7f00..1333d7a 100644 --- a/tests/service-version-multiwatch-service.c +++ b/tests/service-version-multiwatch-service.c @@ -49,7 +49,6 @@ shutdown (void) int main (int argc, char ** argv) { - g_type_init(); g_debug("Service starting"); IndicatorService * is = indicator_service_new_version("org.ayatana.version.good", SERVICE_VERSION_GOOD); diff --git a/tests/test-desktop-shortcuts.c b/tests/test-desktop-shortcuts.c index 2e121fa..4f20d3e 100644 --- a/tests/test-desktop-shortcuts.c +++ b/tests/test-desktop-shortcuts.c @@ -125,7 +125,7 @@ test_desktop_shortcuts_launch (void) const gchar ** nicks = indicator_desktop_shortcuts_get_nicks(ids); g_assert(nicks_contains(nicks, "touch")); - g_assert(indicator_desktop_shortcuts_nick_exec(ids, "touch")); + g_assert(indicator_desktop_shortcuts_nick_exec_with_context(ids, "touch", NULL)); g_usleep(100000); g_assert(g_file_test(BUILD_DIR "/test-desktop-shortcuts-touch-test", G_FILE_TEST_EXISTS)); @@ -149,7 +149,6 @@ test_desktop_shortcuts_suite (void) int main (int argc, char ** argv) { - g_type_init (); g_test_init (&argc, &argv, NULL); gtk_init(&argc, &argv); diff --git a/tests/test-loader.c b/tests/test-loader.c index 45901cb..28187ad 100644 --- a/tests/test-loader.c +++ b/tests/test-loader.c @@ -362,7 +362,6 @@ test_loader_creation_deletion_suite (void) int main (int argc, char ** argv) { - g_type_init (); g_test_init (&argc, &argv, NULL); gtk_init(&argc, &argv); |