Commit b479ff9c authored by Benjamin Otte's avatar Benjamin Otte
Browse files

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.
parent 522beccc
......@@ -4816,8 +4816,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
......
......@@ -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
......
......@@ -3135,13 +3135,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);
......@@ -3306,13 +3303,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);
......
......@@ -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
......
......@@ -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;
......@@ -8991,35 +8990,6 @@ gtk_widget_pop_composite_child (void)
composite_child_stack--;
}
/**
* 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
......@@ -9439,21 +9409,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:
*
......
......@@ -860,10 +860,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
*/
......@@ -986,8 +984,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,
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment