[gtk/wip/otte/icontheme: 7/11] icontheme: Remove gtk_icon_get_base_size() and gtk_icon_get_base_dir()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/icontheme: 7/11] icontheme: Remove gtk_icon_get_base_size() and gtk_icon_get_base_dir()
- Date: Tue, 4 Feb 2020 03:30:05 +0000 (UTC)
commit 52c97fe6174822d9e9e2487717b1a21542e93fbf
Author: Benjamin Otte <otte redhat com>
Date: Sun Feb 2 01:05:42 2020 +0100
icontheme: Remove gtk_icon_get_base_size() and gtk_icon_get_base_dir()
Those functions are unused and the documentation says "Returns some
random number that the icon theme creator chose" which does not seem at
all useful and an implementation detail.
So get rid of it.
docs/reference/gtk/gtk4-sections.txt | 2 --
gtk/gtkicontheme.c | 46 ------------------------------------
gtk/gtkicontheme.h | 4 ----
tests/testicontheme.c | 1 -
4 files changed, 53 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 8ed0069f72..e57e2f6e95 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -5011,8 +5011,6 @@ gtk_icon_theme_choose_icon_finish
gtk_icon_theme_lookup_by_gicon
gtk_icon_theme_list_icons
gtk_icon_theme_get_icon_sizes
-gtk_icon_get_base_size
-gtk_icon_get_base_scale
gtk_icon_get_filename
gtk_icon_is_symbolic
gtk_icon_download_texture
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index ee1549c9cc..9d15bf2a0d 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -3354,52 +3354,6 @@ gtk_icon_class_init (GtkIconClass *klass)
gobject_class->finalize = gtk_icon_finalize;
}
-/**
- * gtk_icon_get_base_size:
- * @self: a #GtkIcon
- *
- * Gets the base size for the icon. The base size
- * is a size for the icon that was specified by
- * the icon theme creator. This may be different
- * than the actual size of image;
- * These icons will be given
- * the same base size as the larger icons to which
- * they are attached.
- *
- * Note that for scaled icons the base size does
- * not include the base scale.
- *
- * Returns: the base size, or 0, if no base
- * size is known for the icon.
- */
-gint
-gtk_icon_get_base_size (GtkIcon *icon)
-{
- g_return_val_if_fail (icon != NULL, 0);
-
- return icon->dir_size;
-}
-
-/**
- * gtk_icon_get_base_scale:
- * @self: a #GtkIcon
- *
- * Gets the base scale for the icon. The base scale is a scale
- * for the icon that was specified by the icon theme creator.
- * For instance an icon drawn for a high-dpi monitor with window
- * scale 2 for a base size of 32 will be 64 pixels tall and have
- * a base scale of 2.
- *
- * Returns: the base scale
- */
-gint
-gtk_icon_get_base_scale (GtkIcon *icon)
-{
- g_return_val_if_fail (icon != NULL, 0);
-
- return icon->dir_scale;
-}
-
/**
* gtk_icon_get_filename:
* @self: a #GtkIcon
diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h
index aad41ca274..55d85d6778 100644
--- a/gtk/gtkicontheme.h
+++ b/gtk/gtkicontheme.h
@@ -154,10 +154,6 @@ GList * gtk_icon_theme_list_icons (GtkIconTheme
GDK_AVAILABLE_IN_ALL
GType gtk_icon_get_type (void) G_GNUC_CONST;
-GDK_AVAILABLE_IN_ALL
-gint gtk_icon_get_base_size (GtkIcon *self);
-GDK_AVAILABLE_IN_ALL
-gint gtk_icon_get_base_scale (GtkIcon *self);
GDK_AVAILABLE_IN_ALL
const gchar * gtk_icon_get_filename (GtkIcon *self);
GDK_AVAILABLE_IN_ALL
diff --git a/tests/testicontheme.c b/tests/testicontheme.c
index 7ef888ccec..21acb2b9ed 100644
--- a/tests/testicontheme.c
+++ b/tests/testicontheme.c
@@ -142,7 +142,6 @@ main (int argc, char *argv[])
{
GdkPaintable *paintable = GDK_PAINTABLE (icon);
- g_print ("Base size: %d, Scale: %d\n", gtk_icon_get_base_size (icon), gtk_icon_get_base_scale
(icon));
g_print ("texture size: %dx%d\n", gdk_paintable_get_intrinsic_width (paintable),
gdk_paintable_get_intrinsic_height (paintable));
g_object_unref (icon);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]