[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: Mon, 13 Sep 2010 23:52:48 +0000 (UTC)
commit 8329489c5242998ef600617cc8d985561a69411a
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 | 7 +----
7 files changed, 1 insertions(+), 70 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index 55b7d55..5736232 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 91bc33f..216816b 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -4280,9 +4280,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 c77dc06..6452a2c 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -437,7 +437,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;
@@ -8987,35 +8986,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
*
@@ -9435,21 +9405,6 @@ gtk_widget_real_adjust_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 a353252..279ebf5 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -837,10 +837,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
*/
@@ -963,8 +961,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 60d351b..4ba2159 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -972,13 +972,12 @@ static void
gtk_window_init (GtkWindow *window)
{
GtkWindowPrivate *priv;
- GdkColormap *colormap;
window->priv = G_TYPE_INSTANCE_GET_PRIVATE (window,
GTK_TYPE_WINDOW,
GtkWindowPrivate);
priv = window->priv;
-
+
gtk_widget_set_has_window (GTK_WIDGET (window), TRUE);
_gtk_widget_set_is_toplevel (GTK_WIDGET (window), TRUE);
@@ -1021,10 +1020,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);
priv->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]