[gtksourceview/wip/gsv-4] MarkAttributes: remove the deprecated API
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/gsv-4] MarkAttributes: remove the deprecated API
- Date: Fri, 4 Nov 2016 20:25:16 +0000 (UTC)
commit ec82776bd6b71870d54465a5a7d09bc2298363c2
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Nov 4 21:20:07 2016 +0100
MarkAttributes: remove the deprecated API
docs/reference/gtksourceview-4.0-sections.txt | 2 -
gtksourceview/gtksourcemarkattributes.c | 87 +------------------------
gtksourceview/gtksourcemarkattributes.h | 7 --
3 files changed, 2 insertions(+), 94 deletions(-)
---
diff --git a/docs/reference/gtksourceview-4.0-sections.txt b/docs/reference/gtksourceview-4.0-sections.txt
index 4aeb42d..23db4be 100644
--- a/docs/reference/gtksourceview-4.0-sections.txt
+++ b/docs/reference/gtksourceview-4.0-sections.txt
@@ -570,8 +570,6 @@ GtkSourceMarkAttributes
gtk_source_mark_attributes_new
gtk_source_mark_attributes_set_background
gtk_source_mark_attributes_get_background
-gtk_source_mark_attributes_set_stock_id
-gtk_source_mark_attributes_get_stock_id
gtk_source_mark_attributes_set_icon_name
gtk_source_mark_attributes_get_icon_name
gtk_source_mark_attributes_set_gicon
diff --git a/gtksourceview/gtksourcemarkattributes.c b/gtksourceview/gtksourcemarkattributes.c
index e88274b..b81f7a2 100644
--- a/gtksourceview/gtksourcemarkattributes.c
+++ b/gtksourceview/gtksourcemarkattributes.c
@@ -59,11 +59,6 @@
* </listitem>
* <listitem>
* <para>
- * gtk_source_mark_attributes_set_stock_id()
- * </para>
- * </listitem>
- * <listitem>
- * <para>
* gtk_source_mark_attributes_set_gicon()
* </para>
* </listitem>
@@ -98,7 +93,6 @@ enum
{
PROP_0,
PROP_BACKGROUND,
- PROP_STOCK_ID,
PROP_PIXBUF,
PROP_ICON_NAME,
PROP_GICON
@@ -138,20 +132,6 @@ set_background (GtkSourceMarkAttributes *attributes,
}
static void
-set_stock_id (GtkSourceMarkAttributes *attributes,
- const gchar *stock_id)
-{
- if (0 != g_strcmp0 (gtk_source_pixbuf_helper_get_stock_id (attributes->priv->helper),
- stock_id))
- {
- gtk_source_pixbuf_helper_set_stock_id (attributes->priv->helper,
- stock_id);
-
- g_object_notify (G_OBJECT (attributes), "stock-id");
- }
-}
-
-static void
set_icon_name (GtkSourceMarkAttributes *attributes,
const gchar *icon_name)
{
@@ -210,9 +190,6 @@ gtk_source_mark_attributes_set_property (GObject *object,
case PROP_BACKGROUND:
set_background (self, g_value_get_boxed (value));
break;
- case PROP_STOCK_ID:
- set_stock_id (self, g_value_get_string (value));
- break;
case PROP_PIXBUF:
set_pixbuf (self, g_value_get_object (value));
break;
@@ -248,10 +225,6 @@ gtk_source_mark_attributes_get_property (GObject *object,
g_value_set_boxed (value, NULL);
}
break;
- case PROP_STOCK_ID:
- g_value_set_string (value,
- gtk_source_pixbuf_helper_get_stock_id (self->priv->helper));
- break;
case PROP_PIXBUF:
g_value_set_object (value,
gtk_source_pixbuf_helper_get_pixbuf (self->priv->helper));
@@ -295,23 +268,6 @@ gtk_source_mark_attributes_class_init (GtkSourceMarkAttributesClass *klass)
G_PARAM_STATIC_STRINGS));
/**
- * GtkSourceMarkAttributes:stock-id:
- *
- * A stock id that may be a base of a rendered icon.
- *
- * Deprecated: 3.10: Don't use this property.
- */
- g_object_class_install_property (object_class,
- PROP_STOCK_ID,
- g_param_spec_string ("stock-id",
- "Stock Id",
- "The stock id",
- NULL,
- G_PARAM_READWRITE |
- G_PARAM_DEPRECATED |
- G_PARAM_STATIC_STRINGS));
-
- /**
* GtkSourceMarkAttributes:pixbuf:
*
* A #GdkPixbuf that may be a base of a rendered icon.
@@ -456,44 +412,6 @@ gtk_source_mark_attributes_get_background (GtkSourceMarkAttributes *attributes,
}
/**
- * gtk_source_mark_attributes_set_stock_id:
- * @attributes: a #GtkSourceMarkAttributes.
- * @stock_id: a stock id.
- *
- * Sets stock id to be used as a base for rendered icon.
- *
- * Deprecated: 3.10: Don't use this function.
- */
-void
-gtk_source_mark_attributes_set_stock_id (GtkSourceMarkAttributes *attributes,
- const gchar *stock_id)
-{
- g_return_if_fail (GTK_SOURCE_IS_MARK_ATTRIBUTES (attributes));
-
- set_stock_id (attributes, stock_id);
-}
-
-/**
- * gtk_source_mark_attributes_get_stock_id:
- * @attributes: a #GtkSourceMarkAttributes.
- *
- * Gets a stock id of an icon used by this attributes. Note that the stock id can
- * be %NULL if it wasn't set earlier.
- *
- * Returns: (transfer none): Stock id. Returned string is owned by @attributes and
- * shouldn't be freed.
- *
- * Deprecated: 3.10: Don't use this function.
- */
-const gchar *
-gtk_source_mark_attributes_get_stock_id (GtkSourceMarkAttributes *attributes)
-{
- g_return_val_if_fail (GTK_SOURCE_IS_MARK_ATTRIBUTES (attributes), NULL);
-
- return gtk_source_pixbuf_helper_get_stock_id (attributes->priv->helper);
-}
-
-/**
* gtk_source_mark_attributes_set_icon_name:
* @attributes: a #GtkSourceMarkAttributes.
* @icon_name: name of an icon to be used.
@@ -603,9 +521,8 @@ gtk_source_mark_attributes_get_pixbuf (GtkSourceMarkAttributes *attributes)
*
* Renders an icon of given size. The base of the icon is set by the last call
* to one of: gtk_source_mark_attributes_set_pixbuf(),
- * gtk_source_mark_attributes_set_gicon(),
- * gtk_source_mark_attributes_set_icon_name() or
- * gtk_source_mark_attributes_set_stock_id(). @size cannot be lower than 1.
+ * gtk_source_mark_attributes_set_gicon() or
+ * gtk_source_mark_attributes_set_icon_name(). @size cannot be lower than 1.
*
* Returns: (transfer none): A rendered pixbuf. The pixbuf belongs to @attributes
* and should not be unreffed.
diff --git a/gtksourceview/gtksourcemarkattributes.h b/gtksourceview/gtksourcemarkattributes.h
index 32a3f36..99a36c8 100644
--- a/gtksourceview/gtksourcemarkattributes.h
+++ b/gtksourceview/gtksourcemarkattributes.h
@@ -78,13 +78,6 @@ GTK_SOURCE_AVAILABLE_IN_ALL
gboolean gtk_source_mark_attributes_get_background (GtkSourceMarkAttributes *attributes,
GdkRGBA *background);
-GTK_SOURCE_DEPRECATED_IN_3_10
-void gtk_source_mark_attributes_set_stock_id (GtkSourceMarkAttributes *attributes,
- const gchar *stock_id);
-
-GTK_SOURCE_DEPRECATED_IN_3_10
-const gchar *gtk_source_mark_attributes_get_stock_id (GtkSourceMarkAttributes *attributes);
-
GTK_SOURCE_AVAILABLE_IN_ALL
void gtk_source_mark_attributes_set_icon_name (GtkSourceMarkAttributes *attributes,
const gchar *icon_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]