[gtk+/rendering-cleanup: 94/141] API: Remove gtk_widget_push_colormap()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 94/141] API: Remove gtk_widget_push_colormap()
- Date: Thu, 9 Sep 2010 16:31:14 +0000 (UTC)
commit bd3f2e93cadd6dc66c559722c9b7d18e42743f95
Author: Benjamin Otte <otte redhat com>
Date: Fri Aug 27 19:47:43 2010 +0200
API: Remove gtk_widget_push_colormap()
And of course, gtk_widget_pop_colormap() is gone, too.
No replacement is necessary, the function is basically unused.
docs/reference/gtk/gtk3-sections.txt | 2 -
gtk/gtk.symbols | 2 -
gtk/gtkdnd.c | 6 ----
gtk/gtkinvisible.c | 5 ----
gtk/gtkwidget.c | 45 ----------------------------------
gtk/gtkwidget.h | 4 ---
gtk/gtkwindow.c | 5 ----
7 files changed, 0 insertions(+), 69 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index f2c13bb..9bcc48f 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -4820,8 +4820,6 @@ gtk_widget_set_style
gtk_widget_ensure_style
gtk_widget_get_style
gtk_widget_reset_rc_styles
-gtk_widget_push_colormap
-gtk_widget_pop_colormap
gtk_widget_set_default_colormap
gtk_widget_get_default_style
gtk_widget_get_default_colormap
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index bec74d7..35012d4 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -4278,9 +4278,7 @@ gtk_widget_modify_text
gtk_widget_modify_symbolic_color
gtk_widget_new
gtk_widget_path
-gtk_widget_pop_colormap
gtk_widget_pop_composite_child
-gtk_widget_push_colormap
gtk_widget_push_composite_child
gtk_widget_queue_draw
gtk_widget_queue_draw_area
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index bab86e1..298a603 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -3145,13 +3145,10 @@ set_icon_stock_pixbuf (GdkDragContext *context,
screen = gdk_drawable_get_screen (context->source_window);
- /* Push a NULL colormap to guard against gtk_widget_push_colormap() */
- gtk_widget_push_colormap (NULL);
window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DND);
gtk_window_set_screen (GTK_WINDOW (window), screen);
set_can_change_screen (window, TRUE);
- gtk_widget_pop_colormap ();
gtk_widget_set_events (window, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
gtk_widget_set_app_paintable (window, TRUE);
@@ -3316,13 +3313,10 @@ gtk_drag_set_icon_surface (GdkDragContext *context,
screen = gdk_drawable_get_screen (context->source_window);
- /* Push a NULL colormap to guard against gtk_widget_push_colormap() */
- gtk_widget_push_colormap (NULL);
window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DND);
gtk_window_set_screen (GTK_WINDOW (window), screen);
set_can_change_screen (window, TRUE);
- gtk_widget_pop_colormap ();
gtk_widget_set_events (window, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
gtk_widget_set_app_paintable (window, TRUE);
diff --git a/gtk/gtkinvisible.c b/gtk/gtkinvisible.c
index dc349e9..55f4ec1 100644
--- a/gtk/gtkinvisible.c
+++ b/gtk/gtkinvisible.c
@@ -100,7 +100,6 @@ static void
gtk_invisible_init (GtkInvisible *invisible)
{
GtkInvisiblePrivate *priv;
- GdkColormap *colormap;
invisible->priv = G_TYPE_INSTANCE_GET_PRIVATE (invisible,
GTK_TYPE_INVISIBLE,
@@ -114,10 +113,6 @@ gtk_invisible_init (GtkInvisible *invisible)
priv->has_user_ref_count = TRUE;
priv->screen = gdk_screen_get_default ();
-
- colormap = _gtk_widget_peek_colormap ();
- if (colormap)
- gtk_widget_set_colormap (GTK_WIDGET (invisible), colormap);
}
static void
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index fb92686..57caf80 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -420,7 +420,6 @@ static void gtk_widget_add_events_internal (GtkWidget *widget,
static gpointer gtk_widget_parent_class = NULL;
static guint widget_signals[LAST_SIGNAL] = { 0 };
static GtkStyle *gtk_default_style = NULL;
-static GSList *colormap_stack = NULL;
static guint composite_child_stack = 0;
static GtkTextDirection gtk_default_direction = GTK_TEXT_DIR_LTR;
static GParamSpecPool *style_property_spec_pool = NULL;
@@ -8630,35 +8629,6 @@ gtk_widget_pop_composite_child (void)
}
/**
- * gtk_widget_push_colormap:
- * @cmap: a #GdkColormap
- *
- * Pushes @cmap onto a global stack of colormaps; the topmost
- * colormap on the stack will be used to create all widgets.
- * Remove @cmap with gtk_widget_pop_colormap(). There's little
- * reason to use this function.
- **/
-void
-gtk_widget_push_colormap (GdkColormap *cmap)
-{
- g_return_if_fail (!cmap || GDK_IS_COLORMAP (cmap));
-
- colormap_stack = g_slist_prepend (colormap_stack, cmap);
-}
-
-/**
- * gtk_widget_pop_colormap:
- *
- * Removes a colormap pushed with gtk_widget_push_colormap().
- **/
-void
-gtk_widget_pop_colormap (void)
-{
- if (colormap_stack)
- colormap_stack = g_slist_delete_link (colormap_stack, colormap_stack);
-}
-
-/**
* gtk_widget_set_default_colormap:
* @colormap: a #GdkColormap
*
@@ -9038,21 +9008,6 @@ gtk_widget_real_size_request (GtkWidget *widget,
}
/**
- * _gtk_widget_peek_colormap:
- *
- * Returns colormap currently pushed by gtk_widget_push_colormap, if any.
- *
- * Return value: the currently pushed colormap, or %NULL if there is none.
- **/
-GdkColormap*
-_gtk_widget_peek_colormap (void)
-{
- if (colormap_stack)
- return (GdkColormap*) colormap_stack->data;
- return NULL;
-}
-
-/**
* _gtk_widget_peek_request_cache:
*
* Returns the address of the widget's request cache (strictly for
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 86c69a0..8090227 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -799,10 +799,8 @@ void gtk_widget_reset_rc_styles (GtkWidget *widget);
* This will override the values that got set by the
* gtk_widget_set_default_* () functions.
*/
-void gtk_widget_push_colormap (GdkColormap *cmap);
void gtk_widget_push_composite_child (void);
void gtk_widget_pop_composite_child (void);
-void gtk_widget_pop_colormap (void);
/* widget style properties
*/
@@ -925,8 +923,6 @@ void _gtk_widget_synthesize_crossing (GtkWidget *from,
GdkDevice *device,
GdkCrossingMode mode);
-GdkColormap* _gtk_widget_peek_colormap (void);
-
gpointer _gtk_widget_peek_request_cache (GtkWidget *widget);
void _gtk_widget_buildable_finish_accelerator (GtkWidget *widget,
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index b667ac9..ee8d8ab 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -929,7 +929,6 @@ gtk_window_class_init (GtkWindowClass *klass)
static void
gtk_window_init (GtkWindow *window)
{
- GdkColormap *colormap;
GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE (window);
gtk_widget_set_has_window (GTK_WIDGET (window), TRUE);
@@ -974,10 +973,6 @@ gtk_window_init (GtkWindow *window)
priv->startup_id = NULL;
priv->mnemonics_visible = TRUE;
- colormap = _gtk_widget_peek_colormap ();
- if (colormap)
- gtk_widget_set_colormap (GTK_WIDGET (window), colormap);
-
g_object_ref_sink (window);
window->has_user_ref_count = TRUE;
toplevel_list = g_slist_prepend (toplevel_list, window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]