[gtk/present-toplevel-2: 150/178] surface: Drop unused set_icon_name vfunc



commit 9310c3534feb0b0fafeae8c809c794388269da76
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Mar 9 10:02:39 2020 -0700

    surface: Drop unused set_icon_name vfunc
    
    This is not useful functionality, and was only ever
    implemented on x11.

 gdk/broadway/gdksurface-broadway.c | 12 ------------
 gdk/gdksurfaceprivate.h            |  2 --
 gdk/quartz/gdksurface-quartz.c     |  8 --------
 gdk/wayland/gdksurface-wayland.c   |  9 ---------
 gdk/win32/gdksurface-win32.c       | 30 ------------------------------
 gdk/x11/gdksurface-x11.c           | 38 --------------------------------------
 6 files changed, 99 deletions(-)
---
diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c
index ec1f195a18..d8219e4a3b 100644
--- a/gdk/broadway/gdksurface-broadway.c
+++ b/gdk/broadway/gdksurface-broadway.c
@@ -745,17 +745,6 @@ gdk_broadway_surface_set_icon_list (GdkSurface *surface,
 {
 }
 
-static void
-gdk_broadway_surface_set_icon_name (GdkSurface   *surface,
-                                   const gchar *name)
-{
-  if (GDK_SURFACE_DESTROYED (surface))
-    return;
-
-  g_object_set_qdata (G_OBJECT (surface), g_quark_from_static_string ("gdk-icon-name-set"),
-                      GUINT_TO_POINTER (name != NULL));
-}
-
 static void
 gdk_broadway_surface_minimize (GdkSurface *surface)
 {
@@ -1441,7 +1430,6 @@ gdk_broadway_surface_class_init (GdkBroadwaySurfaceClass *klass)
   impl_class->set_accept_focus = gdk_broadway_surface_set_accept_focus;
   impl_class->set_focus_on_map = gdk_broadway_surface_set_focus_on_map;
   impl_class->set_icon_list = gdk_broadway_surface_set_icon_list;
-  impl_class->set_icon_name = gdk_broadway_surface_set_icon_name;
   impl_class->minimize = gdk_broadway_surface_minimize;
   impl_class->unminimize = gdk_broadway_surface_unminimize;
   impl_class->stick = gdk_broadway_surface_stick;
diff --git a/gdk/gdksurfaceprivate.h b/gdk/gdksurfaceprivate.h
index 0dfaa7a73a..e215383925 100644
--- a/gdk/gdksurfaceprivate.h
+++ b/gdk/gdksurfaceprivate.h
@@ -185,8 +185,6 @@ struct _GdkSurfaceClass
                                          gboolean focus_on_map);
   void         (* set_icon_list)        (GdkSurface *surface,
                                          GList     *pixbufs);
-  void         (* set_icon_name)        (GdkSurface   *surface,
-                                         const gchar *name);
   void         (* minimize)             (GdkSurface *surface);
   void         (* unminimize)           (GdkSurface *surface);
   void         (* stick)                (GdkSurface *surface);
diff --git a/gdk/quartz/gdksurface-quartz.c b/gdk/quartz/gdksurface-quartz.c
index bdcecc44af..24cf0d39d2 100644
--- a/gdk/quartz/gdksurface-quartz.c
+++ b/gdk/quartz/gdksurface-quartz.c
@@ -1831,13 +1831,6 @@ gdk_quartz_surface_set_focus_on_map (GdkSurface *window,
   window->focus_on_map = focus_on_map != FALSE;
 }
 
-static void
-gdk_quartz_surface_set_icon_name (GdkSurface   *window,
-                                 const gchar *name)
-{
-  /* FIXME: Implement */
-}
-
 static void
 gdk_quartz_surface_focus (GdkSurface *window,
                          guint32    timestamp)
@@ -2708,7 +2701,6 @@ gdk_surface_impl_quartz_class_init (GdkSurfaceImplQuartzClass *klass)
   impl_class->set_accept_focus = gdk_quartz_surface_set_accept_focus;
   impl_class->set_focus_on_map = gdk_quartz_surface_set_focus_on_map;
   impl_class->set_icon_list = gdk_quartz_surface_set_icon_list;
-  impl_class->set_icon_name = gdk_quartz_surface_set_icon_name;
   impl_class->minimize = gdk_quartz_surface_minimize;
   impl_class->unminimize = gdk_quartz_surface_unminimize;
   impl_class->stick = gdk_quartz_surface_stick;
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index c571de6e14..3452e53c8e 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -3294,14 +3294,6 @@ gdk_wayland_surface_set_icon_list (GdkSurface *surface,
 {
 }
 
-static void
-gdk_wayland_surface_set_icon_name (GdkSurface  *surface,
-                                   const gchar *name)
-{
-  if (GDK_SURFACE_DESTROYED (surface))
-    return;
-}
-
 static void
 gdk_wayland_surface_minimize (GdkSurface *surface)
 {
@@ -3861,7 +3853,6 @@ gdk_wayland_surface_class_init (GdkWaylandSurfaceClass *klass)
   impl_class->set_accept_focus = gdk_wayland_surface_set_accept_focus;
   impl_class->set_focus_on_map = gdk_wayland_surface_set_focus_on_map;
   impl_class->set_icon_list = gdk_wayland_surface_set_icon_list;
-  impl_class->set_icon_name = gdk_wayland_surface_set_icon_name;
   impl_class->minimize = gdk_wayland_surface_minimize;
   impl_class->unminimize = gdk_wayland_surface_unminimize;
   impl_class->stick = gdk_wayland_surface_stick;
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index bffb3e1748..aa4388756d 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -1981,35 +1981,6 @@ gdk_win32_surface_set_icon_list (GdkSurface *window,
   impl->hicon_small = small_hicon;
 }
 
-static void
-gdk_win32_surface_set_icon_name (GdkSurface   *window,
-                                const gchar *name)
-{
-  /* In case I manage to confuse this again (or somebody else does):
-   * Please note that "icon name" here really *does* mean the name or
-   * title of a window minimized as an icon on the desktop, or in the
-   * taskbar. It has nothing to do with the freedesktop.org icon
-   * naming stuff.
-   */
-
-  g_return_if_fail (GDK_IS_SURFACE (window));
-
-  if (GDK_SURFACE_DESTROYED (window))
-    return;
-
-#if 0
-  /* This is not the correct thing to do. We should keep both the
-   * "normal" window title, and the icon name. When the window is
-   * minimized, call SetWindowText() with the icon name, and when the
-   * window is restored, with the normal window title. Also, the name
-   * is in UTF-8, so we should do the normal conversion to either wide
-   * chars or system codepage, and use either the W or A version of
-   * SetWindowText(), depending on Windows version.
-   */
-  API_CALL (SetWindowText, (GDK_SURFACE_HWND (window), name));
-#endif
-}
-
 static void
 update_single_bit (LONG    *style,
                    gboolean all,
@@ -5206,7 +5177,6 @@ gdk_win32_surface_class_init (GdkWin32SurfaceClass *klass)
   impl_class->set_accept_focus = gdk_win32_surface_set_accept_focus;
   impl_class->set_focus_on_map = gdk_win32_surface_set_focus_on_map;
   impl_class->set_icon_list = gdk_win32_surface_set_icon_list;
-  impl_class->set_icon_name = gdk_win32_surface_set_icon_name;
   impl_class->minimize = gdk_win32_surface_minimize;
   impl_class->unminimize = gdk_win32_surface_unminimize;
   impl_class->stick = gdk_win32_surface_stick;
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index 48ac2d27eb..3c8e3f158f 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -3079,43 +3079,6 @@ gdk_surface_icon_name_set (GdkSurface *surface)
                                               g_quark_from_static_string ("gdk-icon-name-set")));
 }
 
-static void
-gdk_x11_surface_set_icon_name (GdkSurface   *surface,
-                             const gchar *name)
-{
-  GdkDisplay *display;
-
-  if (GDK_SURFACE_DESTROYED (surface))
-    return;
-
-  display = gdk_surface_get_display (surface);
-
-  g_object_set_qdata (G_OBJECT (surface), g_quark_from_static_string ("gdk-icon-name-set"),
-                      GUINT_TO_POINTER (name != NULL));
-
-  if (name != NULL)
-    {
-      XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
-                       GDK_SURFACE_XID (surface),
-                       gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_ICON_NAME"),
-                       gdk_x11_get_xatom_by_name_for_display (display, "UTF8_STRING"), 8,
-                       PropModeReplace, (guchar *)name, strlen (name));
-
-      set_text_property (display, GDK_SURFACE_XID (surface),
-                         gdk_x11_get_xatom_by_name_for_display (display, "WM_ICON_NAME"),
-                         name);
-    }
-  else
-    {
-      XDeleteProperty (GDK_DISPLAY_XDISPLAY (display),
-                       GDK_SURFACE_XID (surface),
-                       gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_ICON_NAME"));
-      XDeleteProperty (GDK_DISPLAY_XDISPLAY (display),
-                       GDK_SURFACE_XID (surface),
-                       gdk_x11_get_xatom_by_name_for_display (display, "WM_ICON_NAME"));
-    }
-}
-
 static void
 gdk_x11_surface_minimize (GdkSurface *surface)
 {
@@ -4780,7 +4743,6 @@ gdk_x11_surface_class_init (GdkX11SurfaceClass *klass)
   impl_class->set_accept_focus = gdk_x11_surface_set_accept_focus;
   impl_class->set_focus_on_map = gdk_x11_surface_set_focus_on_map;
   impl_class->set_icon_list = gdk_x11_surface_set_icon_list;
-  impl_class->set_icon_name = gdk_x11_surface_set_icon_name;
   impl_class->minimize = gdk_x11_surface_minimize;
   impl_class->unminimize = gdk_x11_surface_unminimize;
   impl_class->stick = gdk_x11_surface_stick;


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