[libwnck/wip/muktupavels/remove-deprecated-things: 13/14] util: remove deprecated API




commit 9d7cc624ae015eb4c53252bae1c1f5e8894fbf4f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Sep 16 13:00:38 2022 +0300

    util: remove deprecated API
    
    https://gitlab.gnome.org/GNOME/libwnck/-/issues/150

 libwnck/util.c | 72 +---------------------------------------------------------
 libwnck/util.h |  9 --------
 2 files changed, 1 insertion(+), 80 deletions(-)
---
diff --git a/libwnck/util.c b/libwnck/util.c
index 83659dc8..acd21cdb 100644
--- a/libwnck/util.c
+++ b/libwnck/util.c
@@ -113,87 +113,17 @@ wnck_pid_read_resource_usage (GdkDisplay        *gdisplay,
   _wnck_read_resource_usage_pid (gdisplay, pid, usage);
 }
 
-static WnckClientType client_type = 0;
-
-/**
- * wnck_set_client_type:
- * @ewmh_sourceindication_client_type: a role for the client.
- *
- * Sets the role of the libwnck user.
- *
- * The default role is %WNCK_CLIENT_TYPE_APPLICATION. Therefore, for
- * applications providing some window management features, like pagers or
- * tasklists, it is important to set the role to %WNCK_CLIENT_TYPE_PAGER for
- * libwnck to properly work.
- *
- * This function should only be called once per program. Additional calls
- * with the same client type will be silently ignored. An attempt to change
- * the client type to a differnet value after it has already been set will
- * be ignored and a critical warning will be logged.
- *
- * Since: 2.14
- */
-void
-wnck_set_client_type (WnckClientType ewmh_sourceindication_client_type)
-{
-  /* Clients constantly switching types makes no sense; this should only be
-   * set once.
-   */
-  if (client_type != 0 && client_type != ewmh_sourceindication_client_type)
-    g_critical ("wnck_set_client_type: changing the client type is not supported.\n");
-  else
-    client_type = ewmh_sourceindication_client_type;
-}
-
 static WnckHandle *wnck_handle = NULL;
 
 WnckHandle *
 _wnck_get_handle (void)
 {
   if (wnck_handle == NULL)
-    {
-      /* If the type hasn't been set yet, use the default--treat it as a
-       * normal application.
-       */
-      if (client_type == 0)
-        client_type = WNCK_CLIENT_TYPE_APPLICATION;
-
-      wnck_handle = wnck_handle_new (client_type);
-    }
+    wnck_handle = wnck_handle_new (WNCK_CLIENT_TYPE_APPLICATION);
 
   return wnck_handle;
 }
 
-/**
- * wnck_set_default_icon_size:
- * @size: the default size for windows and application standard icons.
- *
- * The default main icon size is %WNCK_DEFAULT_ICON_SIZE. This function allows
- * to change this value.
- *
- * Since: 2.4.6
- */
-void
-wnck_set_default_icon_size (gsize size)
-{
-  wnck_handle_set_default_icon_size (_wnck_get_handle(), size);
-}
-
-/**
- * wnck_set_default_mini_icon_size:
- * @size: the default size for windows and application mini icons.
- *
- * The default main icon size is %WNCK_DEFAULT_MINI_ICON_SIZE. This function
- * allows to change this value.
- *
- * Since: 2.4.6
- */
-void
-wnck_set_default_mini_icon_size (gsize size)
-{
-  wnck_handle_set_default_mini_icon_size (_wnck_get_handle (), size);
-}
-
 /**
  * _make_gtk_label_bold:
  * @label: The label.
diff --git a/libwnck/util.h b/libwnck/util.h
index 91a4e083..4c1e9b25 100644
--- a/libwnck/util.h
+++ b/libwnck/util.h
@@ -100,18 +100,9 @@ typedef enum {
   WNCK_CLIENT_TYPE_PAGER = 2
 } WnckClientType;
 
-G_DEPRECATED_FOR(wnck_handle_new)
-void wnck_set_client_type (WnckClientType ewmh_sourceindication_client_type);
-
 #define WNCK_DEFAULT_ICON_SIZE 32
 #define WNCK_DEFAULT_MINI_ICON_SIZE 16
 
-G_DEPRECATED_FOR(wnck_handle_set_default_icon_size)
-void wnck_set_default_icon_size      (gsize size);
-
-G_DEPRECATED_FOR(wnck_handle_set_default_mini_icon_size)
-void wnck_set_default_mini_icon_size (gsize size);
-
 void wnck_shutdown        (void);
 
 void wnck_xid_read_resource_usage (GdkDisplay        *gdk_display,


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