From c1c9dd8191ae8490b169071860fdacf442195077 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Mon, 6 Feb 2012 15:38:27 +0100 Subject: Use g_spawn_command_line_async to launch g-c-c --- src/show-printer-settings.c | 55 --------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 src/show-printer-settings.c (limited to 'src/show-printer-settings.c') diff --git a/src/show-printer-settings.c b/src/show-printer-settings.c deleted file mode 100644 index b213bb2..0000000 --- a/src/show-printer-settings.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2012 Canonical Ltd. - * - * Authors: Lars Uebernickel - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3, as published - * by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranties of - * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#include - - -void -show_printer_settings (const gchar *printer) -{ - GAppInfo *appinfo; - GError *err = NULL; - gchar *cmdline; - - if (printer) - cmdline = g_strdup_printf ("gnome-control-center printers show-printer %s", - printer); - else - cmdline = g_strdup_printf ("gnome-control-center printers"); - - appinfo = g_app_info_create_from_commandline (cmdline, - "gnome-control-center", - G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION, - &err); - g_free (cmdline); - - if (err) { - g_warning ("failed to create application info: %s", err->message); - g_error_free (err); - return; - } - - g_app_info_launch (appinfo, NULL, NULL, &err); - if (err) { - g_warning ("failed to launch gnome-control-center: %s", err->message); - g_error_free (err); - } - - g_object_unref (appinfo); -} - -- cgit v1.2.3