[gnome-control-center] printers: Revert previous 2 commits



commit 2b1f76f8eae5da3b074c843182e8a352efda64d6
Author: Marek Kasik <mkasik redhat com>
Date:   Fri May 24 19:12:00 2019 +0200

    printers: Revert previous 2 commits
    
    I'm sorry, I pushed to wrong branch. This code is
    for testing now and will be proposed later, after
    https://gitlab.gnome.org/GNOME/gnome-settings-daemon/merge_requests/108
    will be merged.

 panels/printers/pp-job.c | 63 ++++--------------------------------------------
 1 file changed, 5 insertions(+), 58 deletions(-)
---
diff --git a/panels/printers/pp-job.c b/panels/printers/pp-job.c
index 5a953b679..7664222a3 100644
--- a/panels/printers/pp-job.c
+++ b/panels/printers/pp-job.c
@@ -89,38 +89,14 @@ void
 pp_job_cancel_purge_async (PpJob        *self,
                            gboolean      job_purge)
 {
-  GDBusConnection  *bus;
+  GDBusConnection *bus;
   g_autoptr(GError) error = NULL;
-  gint              job_id;
+  gint            *job_id;
 
   g_object_get (self, "id", &job_id, NULL);
 
-  bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
-  if (bus == NULL)
-    {
-      g_warning ("Failed to get session bus: %s", error->message);
-      return;
-    }
-
-  g_dbus_connection_call (bus,
-                          "org.gnome.SettingsDaemon.PrintNotifications",
-                          "/org/gnome/SettingsDaemon/PrintNotifications",
-                          "org.gnome.SettingsDaemon.PrintNotifications",
-                          "DoNotNotifyJob",
-                          g_variant_new ("(it)",
-                                         job_id,
-                                         1 << IPP_JSTATE_CANCELED),
-                          NULL,
-                          G_DBUS_CALL_FLAGS_NONE,
-                          -1,
-                          NULL,
-                          NULL,
-                          NULL);
-
-  g_object_unref (bus);
-
   bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
-  if (bus == NULL)
+  if (!bus)
     {
       g_warning ("Failed to get session bus: %s", error->message);
       return;
@@ -166,41 +142,12 @@ pp_job_set_hold_until_async (PpJob        *self,
 {
   GDBusConnection  *bus;
   g_autoptr(GError) error = NULL;
-  gint              job_id;
-  gboolean          resuming;
+  gint             *job_id;
 
   g_object_get (self, "id", &job_id, NULL);
-  if (g_strcmp0 (job_hold_until, "no-hold") == 0)
-    resuming = TRUE;
-  else
-    resuming = FALSE;
-
-  bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
-  if (bus == NULL)
-    {
-      g_warning ("Failed to get session bus: %s", error->message);
-      return;
-    }
-
-  g_dbus_connection_call (bus,
-                          "org.gnome.SettingsDaemon.PrintNotifications",
-                          "/org/gnome/SettingsDaemon/PrintNotifications",
-                          "org.gnome.SettingsDaemon.PrintNotifications",
-                          "DoNotNotifyJob",
-                          g_variant_new ("(it)",
-                                         job_id,
-                                         resuming ? 1 << IPP_JSTATE_PROCESSING : 1 << IPP_JSTATE_HELD),
-                          NULL,
-                          G_DBUS_CALL_FLAGS_NONE,
-                          -1,
-                          NULL,
-                          NULL,
-                          NULL);
-
-  g_object_unref (bus);
 
   bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
-  if (bus == NULL)
+  if (!bus)
     {
       g_warning ("Failed to get session bus: %s", error->message);
       return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]