[gtksourceview] Remove use of stock_detail.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Remove use of stock_detail.
- Date: Thu, 9 Dec 2010 06:02:31 +0000 (UTC)
commit 5ff08609859998f0709b58b5cd4b332c2e70e55d
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Wed Dec 8 22:50:16 2010 +0100
Remove use of stock_detail.
It is not needed after switching to gtk_widget_render_icon_pixbuf().
docs/reference/gtksourceview-3.0-sections.txt | 4 --
gtksourceview/gtksourcegutterrendererpixbuf.c | 45 -----------------------
gtksourceview/gtksourcegutterrendererpixbuf.h | 5 ---
gtksourceview/gtksourcemarkcategory.c | 49 -------------------------
gtksourceview/gtksourcemarkcategory.h | 4 --
gtksourceview/gtksourcepixbufhelper.c | 24 ------------
gtksourceview/gtksourcepixbufhelper.h | 5 ---
7 files changed, 0 insertions(+), 136 deletions(-)
---
diff --git a/docs/reference/gtksourceview-3.0-sections.txt b/docs/reference/gtksourceview-3.0-sections.txt
index b75c5e2..9d814c1 100644
--- a/docs/reference/gtksourceview-3.0-sections.txt
+++ b/docs/reference/gtksourceview-3.0-sections.txt
@@ -194,8 +194,6 @@ gtk_source_gutter_renderer_pixbuf_set_stock_id
gtk_source_gutter_renderer_pixbuf_get_stock_id
gtk_source_gutter_renderer_pixbuf_set_icon_size
gtk_source_gutter_renderer_pixbuf_get_icon_size
-gtk_source_gutter_renderer_pixbuf_set_stock_detail
-gtk_source_gutter_renderer_pixbuf_get_stock_detail
gtk_source_gutter_renderer_pixbuf_set_gicon
gtk_source_gutter_renderer_pixbuf_get_gicon
gtk_source_gutter_renderer_pixbuf_set_icon_name
@@ -319,8 +317,6 @@ gtk_source_mark_category_set_priority
gtk_source_mark_category_get_priority
gtk_source_mark_category_set_stock_id
gtk_source_mark_category_get_stock_id
-gtk_source_mark_category_set_stock_detail
-gtk_source_mark_category_get_stock_detail
gtk_source_mark_category_set_icon_name
gtk_source_mark_category_get_stock_icon_name
gtk_source_mark_category_set_gicon
diff --git a/gtksourceview/gtksourcegutterrendererpixbuf.c b/gtksourceview/gtksourcegutterrendererpixbuf.c
index 72d3c5c..18b6610 100644
--- a/gtksourceview/gtksourcegutterrendererpixbuf.c
+++ b/gtksourceview/gtksourcegutterrendererpixbuf.c
@@ -40,7 +40,6 @@ enum
PROP_STOCK_ID,
PROP_ICON_NAME,
PROP_GICON,
- PROP_STOCK_DETAIL
};
static void
@@ -185,18 +184,6 @@ set_stock_id (GtkSourceGutterRendererPixbuf *renderer,
}
static void
-set_stock_detail (GtkSourceGutterRendererPixbuf *renderer,
- const gchar *stock_detail)
-{
- gtk_source_pixbuf_helper_set_stock_detail (renderer->priv->helper,
- stock_detail);
-
- g_object_notify (G_OBJECT (renderer), "stock-detail");
-
- gtk_source_gutter_renderer_queue_draw (GTK_SOURCE_GUTTER_RENDERER (renderer));
-}
-
-static void
set_gicon (GtkSourceGutterRendererPixbuf *renderer,
GIcon *icon)
{
@@ -239,9 +226,6 @@ gtk_source_gutter_renderer_pixbuf_set_property (GObject *object,
case PROP_STOCK_ID:
set_stock_id (renderer, g_value_get_string (value));
break;
- case PROP_STOCK_DETAIL:
- set_stock_detail (renderer, g_value_get_string (value));
- break;
case PROP_ICON_NAME:
set_icon_name (renderer, g_value_get_string (value));
break;
@@ -274,10 +258,6 @@ gtk_source_gutter_renderer_pixbuf_get_property (GObject *object,
g_value_set_string (value,
gtk_source_pixbuf_helper_get_stock_id (renderer->priv->helper));
break;
- case PROP_STOCK_DETAIL:
- g_value_set_string (value,
- gtk_source_pixbuf_helper_get_stock_detail (renderer->priv->helper));
- break;
case PROP_ICON_NAME:
g_value_set_string (value,
gtk_source_pixbuf_helper_get_icon_name (renderer->priv->helper));
@@ -324,14 +304,6 @@ gtk_source_gutter_renderer_pixbuf_class_init (GtkSourceGutterRendererPixbufClass
G_PARAM_READWRITE));
g_object_class_install_property (object_class,
- PROP_STOCK_DETAIL,
- g_param_spec_string ("stock-detail",
- _("Stock Detail"),
- _("The stock detail"),
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
PROP_ICON_NAME,
g_param_spec_string ("icon-name",
_("Icon Name"),
@@ -416,23 +388,6 @@ gtk_source_gutter_renderer_pixbuf_get_stock_id (GtkSourceGutterRendererPixbuf *r
}
void
-gtk_source_gutter_renderer_pixbuf_set_stock_detail (GtkSourceGutterRendererPixbuf *renderer,
- const gchar *stock_detail)
-{
- g_return_if_fail (GTK_IS_SOURCE_GUTTER_RENDERER_PIXBUF (renderer));
-
- set_stock_detail (renderer, stock_detail);
-}
-
-const gchar *
-gtk_source_gutter_renderer_pixbuf_get_stock_detail (GtkSourceGutterRendererPixbuf *renderer)
-{
- g_return_val_if_fail (GTK_IS_SOURCE_GUTTER_RENDERER_PIXBUF (renderer), NULL);
-
- return gtk_source_pixbuf_helper_get_stock_detail (renderer->priv->helper);
-}
-
-void
gtk_source_gutter_renderer_pixbuf_set_gicon (GtkSourceGutterRendererPixbuf *renderer,
GIcon *icon)
{
diff --git a/gtksourceview/gtksourcegutterrendererpixbuf.h b/gtksourceview/gtksourcegutterrendererpixbuf.h
index e4c1c74..004a5ee 100644
--- a/gtksourceview/gtksourcegutterrendererpixbuf.h
+++ b/gtksourceview/gtksourcegutterrendererpixbuf.h
@@ -75,11 +75,6 @@ void gtk_source_gutter_renderer_pixbuf_set_icon_size (GtkSourceGutter
GtkIconSize gtk_source_gutter_renderer_pixbuf_get_icon_size (GtkSourceGutterRendererPixbuf *renderer);
-void gtk_source_gutter_renderer_pixbuf_set_stock_detail (GtkSourceGutterRendererPixbuf *renderer,
- const gchar *stock_detail);
-
-const gchar *gtk_source_gutter_renderer_pixbuf_get_stock_detail (GtkSourceGutterRendererPixbuf *renderer);
-
void gtk_source_gutter_renderer_pixbuf_set_gicon (GtkSourceGutterRendererPixbuf *renderer,
GIcon *icon);
diff --git a/gtksourceview/gtksourcemarkcategory.c b/gtksourceview/gtksourcemarkcategory.c
index d716c02..044a21d 100644
--- a/gtksourceview/gtksourcemarkcategory.c
+++ b/gtksourceview/gtksourcemarkcategory.c
@@ -46,7 +46,6 @@ enum
PROP_BACKGROUND,
PROP_PRIORITY,
PROP_STOCK_ID,
- PROP_STOCK_DETAIL,
PROP_PIXBUF,
PROP_ICON_NAME,
PROP_GICON
@@ -115,22 +114,6 @@ set_stock_id (GtkSourceMarkCategory *category,
}
static void
-set_stock_detail (GtkSourceMarkCategory *category,
- const gchar *stock_detail)
-{
- if (g_strcmp0 (gtk_source_pixbuf_helper_get_stock_detail (category->priv->helper),
- stock_detail) == 0)
- {
- return;
- }
-
- gtk_source_pixbuf_helper_set_stock_detail (category->priv->helper,
- stock_detail);
-
- g_object_notify (G_OBJECT (category), "stock-detail");
-}
-
-static void
set_icon_name (GtkSourceMarkCategory *category,
const gchar *icon_name)
{
@@ -198,9 +181,6 @@ gtk_source_mark_category_set_property (GObject *object,
case PROP_STOCK_ID:
set_stock_id (self, g_value_get_string (value));
break;
- case PROP_STOCK_DETAIL:
- set_stock_detail (self, g_value_get_string (value));
- break;
case PROP_PIXBUF:
set_pixbuf (self, g_value_get_object (value));
break;
@@ -258,10 +238,6 @@ gtk_source_mark_category_get_property (GObject *object,
g_value_set_object (value,
gtk_source_pixbuf_helper_get_gicon (self->priv->helper));
break;
- case PROP_STOCK_DETAIL:
- g_value_set_string (value,
- gtk_source_pixbuf_helper_get_stock_detail (self->priv->helper));
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -338,14 +314,6 @@ gtk_source_mark_category_class_init (GtkSourceMarkCategoryClass *klass)
G_TYPE_ICON,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class,
- PROP_STOCK_DETAIL,
- g_param_spec_string ("stock-detail",
- _("Stock Detail"),
- _("The stock detail"),
- NULL,
- G_PARAM_READWRITE));
-
signals[QUERY_TOOLTIP_TEXT] =
g_signal_new ("query-tooltip-text",
G_TYPE_FROM_CLASS (klass),
@@ -449,23 +417,6 @@ gtk_source_mark_category_get_stock_id (GtkSourceMarkCategory *category)
}
void
-gtk_source_mark_category_set_stock_detail (GtkSourceMarkCategory *category,
- const gchar *stock_detail)
-{
- g_return_if_fail (GTK_IS_SOURCE_MARK_CATEGORY (category));
-
- set_stock_detail (category, stock_detail);
-}
-
-const gchar *
-gtk_source_mark_category_get_stock_detail (GtkSourceMarkCategory *category)
-{
- g_return_val_if_fail (GTK_IS_SOURCE_MARK_CATEGORY (category), NULL);
-
- return gtk_source_pixbuf_helper_get_stock_detail (category->priv->helper);
-}
-
-void
gtk_source_mark_category_set_icon_name (GtkSourceMarkCategory *category,
const gchar *icon_name)
{
diff --git a/gtksourceview/gtksourcemarkcategory.h b/gtksourceview/gtksourcemarkcategory.h
index 5daa9a6..bb8ee4f 100644
--- a/gtksourceview/gtksourcemarkcategory.h
+++ b/gtksourceview/gtksourcemarkcategory.h
@@ -78,10 +78,6 @@ void gtk_source_mark_category_set_stock_id (GtkSourceMarkCate
const gchar *stock_id);
const gchar *gtk_source_mark_category_get_stock_id (GtkSourceMarkCategory *category);
-void gtk_source_mark_category_set_stock_detail (GtkSourceMarkCategory *category,
- const gchar *stock_detail);
-const gchar *gtk_source_mark_category_get_stock_detail (GtkSourceMarkCategory *category);
-
void gtk_source_mark_category_set_icon_name (GtkSourceMarkCategory *category,
const gchar *icon_name);
const gchar *gtk_source_mark_category_get_stock_icon_name (GtkSourceMarkCategory *category);
diff --git a/gtksourceview/gtksourcepixbufhelper.c b/gtksourceview/gtksourcepixbufhelper.c
index c62ade5..611e1a3 100644
--- a/gtksourceview/gtksourcepixbufhelper.c
+++ b/gtksourceview/gtksourcepixbufhelper.c
@@ -38,7 +38,6 @@ struct _GtkSourcePixbufHelper
GdkPixbuf *pixbuf;
gchar *icon_name;
gchar *stock_id;
- gchar *stock_detail;
GIcon *gicon;
};
@@ -67,7 +66,6 @@ gtk_source_pixbuf_helper_free (GtkSourcePixbufHelper *helper)
}
g_free (helper->stock_id);
- g_free (helper->stock_detail);
g_free (helper->icon_name);
g_slice_free (GtkSourcePixbufHelper, helper);
@@ -144,28 +142,6 @@ gtk_source_pixbuf_helper_get_stock_id (GtkSourcePixbufHelper *helper)
}
void
-gtk_source_pixbuf_helper_set_stock_detail (GtkSourcePixbufHelper *helper,
- const gchar *detail)
-{
- helper->type = ICON_TYPE_STOCK;
-
- if (helper->stock_detail)
- {
- g_free (helper->stock_detail);
- }
-
- helper->stock_detail = g_strdup (detail);
-
- clear_cache (helper);
-}
-
-const gchar *
-gtk_source_pixbuf_helper_get_stock_detail (GtkSourcePixbufHelper *helper)
-{
- return helper->stock_detail;
-}
-
-void
gtk_source_pixbuf_helper_set_icon_name (GtkSourcePixbufHelper *helper,
const gchar *icon_name)
{
diff --git a/gtksourceview/gtksourcepixbufhelper.h b/gtksourceview/gtksourcepixbufhelper.h
index c78c34b..330724e 100644
--- a/gtksourceview/gtksourcepixbufhelper.h
+++ b/gtksourceview/gtksourcepixbufhelper.h
@@ -39,11 +39,6 @@ void gtk_source_pixbuf_helper_set_stock_id (GtkSourcePixbufHelper *helper,
const gchar *gtk_source_pixbuf_helper_get_stock_id (GtkSourcePixbufHelper *helper);
-void gtk_source_pixbuf_helper_set_stock_detail (GtkSourcePixbufHelper *helper,
- const gchar *stock_id);
-
-const gchar *gtk_source_pixbuf_helper_get_stock_detail (GtkSourcePixbufHelper *helper);
-
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]