[gtk+/wip/otte/gtk4: 22/127] API: screen: Remove gdk_screen_make_display_name()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gtk4: 22/127] API: screen: Remove gdk_screen_make_display_name()
- Date: Sat, 8 Oct 2016 03:12:02 +0000 (UTC)
commit 1d57447e5eb44bb86c0dba5ea6795bfcf54e8733
Author: Benjamin Otte <otte redhat com>
Date: Wed Sep 28 02:52:25 2016 +0200
API: screen: Remove gdk_screen_make_display_name()
It's identical to gdk_display_get_name().
docs/reference/gdk/gdk3-sections.txt | 1 -
gdk/broadway/gdkscreen-broadway.c | 7 -------
gdk/gdkscreen.c | 19 -------------------
gdk/gdkscreen.h | 2 --
gdk/gdkscreenprivate.h | 1 -
gdk/mir/gdkmirscreen.c | 8 --------
gdk/quartz/gdkscreen-quartz.c | 7 -------
gdk/wayland/gdkscreen-wayland.c | 7 -------
gdk/win32/gdkscreen-win32.c | 7 -------
gdk/x11/gdkscreen-x11.c | 30 ------------------------------
10 files changed, 0 insertions(+), 89 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index 38ccefc..33efa6d 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -207,7 +207,6 @@ gdk_screen_get_display
gdk_screen_get_number
gdk_screen_list_visuals
gdk_screen_get_toplevel_windows
-gdk_screen_make_display_name
gdk_screen_get_n_monitors
gdk_screen_get_primary_monitor
gdk_screen_get_monitor_geometry
diff --git a/gdk/broadway/gdkscreen-broadway.c b/gdk/broadway/gdkscreen-broadway.c
index 787c48d..b608399 100644
--- a/gdk/broadway/gdkscreen-broadway.c
+++ b/gdk/broadway/gdkscreen-broadway.c
@@ -154,12 +154,6 @@ gdk_broadway_screen_is_composited (GdkScreen *screen)
}
-static gchar *
-gdk_broadway_screen_make_display_name (GdkScreen *screen)
-{
- return g_strdup ("browser");
-}
-
static void
gdk_broadway_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event)
@@ -191,7 +185,6 @@ gdk_broadway_screen_class_init (GdkBroadwayScreenClass *klass)
screen_class->get_display = gdk_broadway_screen_get_display;
screen_class->get_root_window = gdk_broadway_screen_get_root_window;
screen_class->is_composited = gdk_broadway_screen_is_composited;
- screen_class->make_display_name = gdk_broadway_screen_make_display_name;
screen_class->broadcast_client_message = gdk_broadway_screen_broadcast_client_message;
screen_class->get_setting = gdk_broadway_screen_get_setting;
screen_class->get_rgba_visual = gdk_broadway_screen_get_rgba_visual;
diff --git a/gdk/gdkscreen.c b/gdk/gdkscreen.c
index 36ca9c8..ee69322 100644
--- a/gdk/gdkscreen.c
+++ b/gdk/gdkscreen.c
@@ -484,25 +484,6 @@ gdk_screen_is_composited (GdkScreen *screen)
}
/**
- * gdk_screen_make_display_name:
- * @screen: a #GdkScreen
- *
- * Determines the name to pass to gdk_display_open() to get
- * a #GdkDisplay with this screen as the default screen.
- *
- * Returns: a newly allocated string, free with g_free()
- *
- * Since: 2.2
- **/
-gchar *
-gdk_screen_make_display_name (GdkScreen *screen)
-{
- g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
-
- return GDK_SCREEN_GET_CLASS (screen)->make_display_name (screen);
-}
-
-/**
* gdk_screen_get_setting:
* @screen: the #GdkScreen where the setting is located
* @name: the name of the setting
diff --git a/gdk/gdkscreen.h b/gdk/gdkscreen.h
index e981d38..ea237c7 100644
--- a/gdk/gdkscreen.h
+++ b/gdk/gdkscreen.h
@@ -57,8 +57,6 @@ GDK_AVAILABLE_IN_ALL
GList * gdk_screen_list_visuals (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GList * gdk_screen_get_toplevel_windows (GdkScreen *screen);
-GDK_AVAILABLE_IN_ALL
-gchar * gdk_screen_make_display_name (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GdkScreen *gdk_screen_get_default (void);
diff --git a/gdk/gdkscreenprivate.h b/gdk/gdkscreenprivate.h
index 3361a8a..941502c 100644
--- a/gdk/gdkscreenprivate.h
+++ b/gdk/gdkscreenprivate.h
@@ -63,7 +63,6 @@ struct _GdkScreenClass
GdkVisual * (* get_system_visual) (GdkScreen *screen);
GdkVisual * (* get_rgba_visual) (GdkScreen *screen);
gboolean (* is_composited) (GdkScreen *screen);
- gchar * (* make_display_name) (GdkScreen *screen);
void (* broadcast_client_message) (GdkScreen *screen,
GdkEvent *event);
gboolean (* get_setting) (GdkScreen *screen,
diff --git a/gdk/mir/gdkmirscreen.c b/gdk/mir/gdkmirscreen.c
index 694e847..19f0915 100644
--- a/gdk/mir/gdkmirscreen.c
+++ b/gdk/mir/gdkmirscreen.c
@@ -419,13 +419,6 @@ gdk_mir_screen_is_composited (GdkScreen *screen)
return TRUE;
}
-static gchar *
-gdk_mir_screen_make_display_name (GdkScreen *screen)
-{
- //g_printerr ("gdk_mir_screen_make_display_name\n");
- return NULL; // FIXME
-}
-
static void
gdk_mir_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event)
@@ -804,7 +797,6 @@ gdk_mir_screen_class_init (GdkMirScreenClass *klass)
screen_class->get_system_visual = gdk_mir_screen_get_system_visual;
screen_class->get_rgba_visual = gdk_mir_screen_get_rgba_visual;
screen_class->is_composited = gdk_mir_screen_is_composited;
- screen_class->make_display_name = gdk_mir_screen_make_display_name;
screen_class->broadcast_client_message = gdk_mir_screen_broadcast_client_message;
screen_class->get_setting = gdk_mir_screen_get_setting;
screen_class->visual_get_best_depth = gdk_mir_screen_visual_get_best_depth;
diff --git a/gdk/quartz/gdkscreen-quartz.c b/gdk/quartz/gdkscreen-quartz.c
index 9ec6352..31b06b8 100644
--- a/gdk/quartz/gdkscreen-quartz.c
+++ b/gdk/quartz/gdkscreen-quartz.c
@@ -452,12 +452,6 @@ _gdk_quartz_screen_get_monitor_scale_factor (GdkScreen *screen,
return scale_factor;
}
-static gchar *
-gdk_quartz_screen_make_display_name (GdkScreen *screen)
-{
- return g_strdup (gdk_display_get_name (_gdk_display));
-}
-
static gboolean
gdk_quartz_screen_is_composited (GdkScreen *screen)
{
@@ -487,7 +481,6 @@ gdk_quartz_screen_class_init (GdkQuartzScreenClass *klass)
screen_class->get_monitor_geometry = gdk_quartz_screen_get_monitor_geometry;
screen_class->get_monitor_workarea = gdk_quartz_screen_get_monitor_workarea;
screen_class->is_composited = gdk_quartz_screen_is_composited;
- screen_class->make_display_name = gdk_quartz_screen_make_display_name;
screen_class->broadcast_client_message = _gdk_quartz_screen_broadcast_client_message;
screen_class->get_setting = _gdk_quartz_screen_get_setting;
screen_class->get_rgba_visual = _gdk_quartz_screen_get_rgba_visual;
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index ca58d3e..4bdcbd6 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -135,12 +135,6 @@ gdk_wayland_screen_is_composited (GdkScreen *screen)
return TRUE;
}
-static gchar *
-gdk_wayland_screen_make_display_name (GdkScreen *screen)
-{
- return g_strdup (gdk_display_get_name (GDK_WAYLAND_SCREEN (screen)->display));
-}
-
static void
gdk_wayland_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event)
@@ -806,7 +800,6 @@ _gdk_wayland_screen_class_init (GdkWaylandScreenClass *klass)
screen_class->get_system_visual = gdk_wayland_screen_get_system_visual;
screen_class->get_rgba_visual = gdk_wayland_screen_get_rgba_visual;
screen_class->is_composited = gdk_wayland_screen_is_composited;
- screen_class->make_display_name = gdk_wayland_screen_make_display_name;
screen_class->broadcast_client_message = gdk_wayland_screen_broadcast_client_message;
screen_class->get_setting = gdk_wayland_screen_get_setting;
screen_class->visual_get_best_depth = gdk_wayland_screen_visual_get_best_depth;
diff --git a/gdk/win32/gdkscreen-win32.c b/gdk/win32/gdkscreen-win32.c
index c67c8ae..df9d104 100644
--- a/gdk/win32/gdkscreen-win32.c
+++ b/gdk/win32/gdkscreen-win32.c
@@ -386,12 +386,6 @@ gdk_win32_screen_get_root_window (GdkScreen *screen)
return GDK_WIN32_SCREEN (screen)->root_window;
}
-static gchar *
-gdk_win32_screen_make_display_name (GdkScreen *screen)
-{
- return g_strdup (gdk_display_get_name (_gdk_display));
-}
-
static gboolean
gdk_win32_screen_is_composited (GdkScreen *screen)
{
@@ -527,7 +521,6 @@ gdk_win32_screen_class_init (GdkWin32ScreenClass *klass)
screen_class->get_display = gdk_win32_screen_get_display;
screen_class->get_root_window = gdk_win32_screen_get_root_window;
screen_class->is_composited = gdk_win32_screen_is_composited;
- screen_class->make_display_name = gdk_win32_screen_make_display_name;
screen_class->get_setting = _gdk_win32_screen_get_setting;
screen_class->get_system_visual = gdk_win32_screen_get_system_visual;
screen_class->get_rgba_visual = gdk_win32_screen_get_rgba_visual;
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 53e61a4..1aa27ec 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -1052,35 +1052,6 @@ _gdk_x11_screen_process_owner_change (GdkScreen *screen,
#endif
}
-static gchar *
-substitute_screen_number (const gchar *display_name,
- gint screen_number)
-{
- GString *str;
- gchar *p;
-
- str = g_string_new (display_name);
-
- p = strrchr (str->str, '.');
- if (p && p > strchr (str->str, ':'))
- g_string_truncate (str, p - str->str);
-
- g_string_append_printf (str, ".%d", screen_number);
-
- return g_string_free (str, FALSE);
-}
-
-static gchar *
-gdk_x11_screen_make_display_name (GdkScreen *screen)
-{
- const gchar *old_display;
-
- old_display = gdk_display_get_name (gdk_screen_get_display (screen));
-
- return substitute_screen_number (old_display,
- gdk_x11_screen_get_screen_number (screen));
-}
-
static gboolean
gdk_x11_screen_get_setting (GdkScreen *screen,
const gchar *name,
@@ -1385,7 +1356,6 @@ gdk_x11_screen_class_init (GdkX11ScreenClass *klass)
screen_class->get_system_visual = _gdk_x11_screen_get_system_visual;
screen_class->get_rgba_visual = gdk_x11_screen_get_rgba_visual;
screen_class->is_composited = gdk_x11_screen_is_composited;
- screen_class->make_display_name = gdk_x11_screen_make_display_name;
screen_class->get_setting = gdk_x11_screen_get_setting;
screen_class->visual_get_best_depth = _gdk_x11_screen_visual_get_best_depth;
screen_class->visual_get_best_type = _gdk_x11_screen_visual_get_best_type;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]