[gtksourceview/wip/gsv-4] Pixbuf helper: remove support for stock-id
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/gsv-4] Pixbuf helper: remove support for stock-id
- Date: Fri, 4 Nov 2016 20:25:21 +0000 (UTC)
commit cf718a9edcd995e44de33279fc760c95fc22607c
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Nov 4 21:24:13 2016 +0100
Pixbuf helper: remove support for stock-id
No longer used.
gtksourceview/gtksourcepixbufhelper.c | 56 ---------------------------------
gtksourceview/gtksourcepixbufhelper.h | 7 ----
2 files changed, 0 insertions(+), 63 deletions(-)
---
diff --git a/gtksourceview/gtksourcepixbufhelper.c b/gtksourceview/gtksourcepixbufhelper.c
index 7a76d11..1667b41 100644
--- a/gtksourceview/gtksourcepixbufhelper.c
+++ b/gtksourceview/gtksourcepixbufhelper.c
@@ -24,7 +24,6 @@
typedef enum _IconType
{
ICON_TYPE_PIXBUF,
- ICON_TYPE_STOCK,
ICON_TYPE_GICON,
ICON_TYPE_NAME
} IconType;
@@ -36,7 +35,6 @@ struct _GtkSourcePixbufHelper
GdkPixbuf *pixbuf;
gchar *icon_name;
- gchar *stock_id;
GIcon *gicon;
};
@@ -64,7 +62,6 @@ gtk_source_pixbuf_helper_free (GtkSourcePixbufHelper *helper)
g_object_unref (helper->gicon);
}
- g_free (helper->stock_id);
g_free (helper->icon_name);
g_slice_free (GtkSourcePixbufHelper, helper);
@@ -119,28 +116,6 @@ gtk_source_pixbuf_helper_get_pixbuf (GtkSourcePixbufHelper *helper)
}
void
-gtk_source_pixbuf_helper_set_stock_id (GtkSourcePixbufHelper *helper,
- const gchar *stock_id)
-{
- helper->type = ICON_TYPE_STOCK;
-
- if (helper->stock_id)
- {
- g_free (helper->stock_id);
- }
-
- helper->stock_id = g_strdup (stock_id);
-
- clear_cache (helper);
-}
-
-const gchar *
-gtk_source_pixbuf_helper_get_stock_id (GtkSourcePixbufHelper *helper)
-{
- return helper->stock_id;
-}
-
-void
gtk_source_pixbuf_helper_set_icon_name (GtkSourcePixbufHelper *helper,
const gchar *icon_name)
{
@@ -215,34 +190,6 @@ from_pixbuf (GtkSourcePixbufHelper *helper,
GDK_INTERP_BILINEAR));
}
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-
-static void
-from_stock (GtkSourcePixbufHelper *helper,
- GtkWidget *widget,
- gint size)
-{
- GtkIconSize icon_size;
- gchar *name;
-
- name = g_strdup_printf ("GtkSourcePixbufHelper%d", size);
-
- icon_size = gtk_icon_size_from_name (name);
-
- if (icon_size == GTK_ICON_SIZE_INVALID)
- {
- icon_size = gtk_icon_size_register (name, size, size);
- }
-
- g_free (name);
-
- set_cache (helper, gtk_widget_render_icon_pixbuf (widget,
- helper->stock_id,
- icon_size));
-}
-
-G_GNUC_END_IGNORE_DEPRECATIONS;
-
static void
from_gicon (GtkSourcePixbufHelper *helper,
GtkWidget *widget,
@@ -328,9 +275,6 @@ gtk_source_pixbuf_helper_render (GtkSourcePixbufHelper *helper,
case ICON_TYPE_PIXBUF:
from_pixbuf (helper, widget, size);
break;
- case ICON_TYPE_STOCK:
- from_stock (helper, widget, size);
- break;
case ICON_TYPE_GICON:
from_gicon (helper, widget, size);
break;
diff --git a/gtksourceview/gtksourcepixbufhelper.h b/gtksourceview/gtksourcepixbufhelper.h
index ff6aef9..f73df76 100644
--- a/gtksourceview/gtksourcepixbufhelper.h
+++ b/gtksourceview/gtksourcepixbufhelper.h
@@ -39,13 +39,6 @@ G_GNUC_INTERNAL
GdkPixbuf *gtk_source_pixbuf_helper_get_pixbuf (GtkSourcePixbufHelper *helper);
G_GNUC_INTERNAL
-void gtk_source_pixbuf_helper_set_stock_id (GtkSourcePixbufHelper *helper,
- const gchar *stock_id);
-
-G_GNUC_INTERNAL
-const gchar *gtk_source_pixbuf_helper_get_stock_id (GtkSourcePixbufHelper *helper);
-
-G_GNUC_INTERNAL
void gtk_source_pixbuf_helper_set_icon_name (GtkSourcePixbufHelper *helper,
const gchar *icon_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]