Set the background on the action view cell renderer here, not in init, so

Wed Mar 10 23:40:15 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the background
	on the action view cell renderer here, not in init, so that a) we catch
	style changes, and b) we get the real style, not the default one.
	Partial fix for #127648, reported by Dave Bordoley.
This commit is contained in:
Matthias Clasen 2004-03-10 22:42:48 +00:00 committed by Matthias Clasen
parent 6e5d959730
commit d96974454f
6 changed files with 45 additions and 3 deletions

View File

@ -1,3 +1,10 @@
Wed Mar 10 23:40:15 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the background
on the action view cell renderer here, not in init, so that a) we catch
style changes, and b) we get the real style, not the default one.
Partial fix for #127648, reported by Dave Bordoley.
2004-03-10 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents-win32.c (build_key_event_state): Set also

View File

@ -1,3 +1,10 @@
Wed Mar 10 23:40:15 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the background
on the action view cell renderer here, not in init, so that a) we catch
style changes, and b) we get the real style, not the default one.
Partial fix for #127648, reported by Dave Bordoley.
2004-03-10 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents-win32.c (build_key_event_state): Set also

View File

@ -1,3 +1,10 @@
Wed Mar 10 23:40:15 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the background
on the action view cell renderer here, not in init, so that a) we catch
style changes, and b) we get the real style, not the default one.
Partial fix for #127648, reported by Dave Bordoley.
2004-03-10 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents-win32.c (build_key_event_state): Set also

View File

@ -1,3 +1,10 @@
Wed Mar 10 23:40:15 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the background
on the action view cell renderer here, not in init, so that a) we catch
style changes, and b) we get the real style, not the default one.
Partial fix for #127648, reported by Dave Bordoley.
2004-03-10 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents-win32.c (build_key_event_state): Set also

View File

@ -1,3 +1,10 @@
Wed Mar 10 23:40:15 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the background
on the action view cell renderer here, not in init, so that a) we catch
style changes, and b) we get the real style, not the default one.
Partial fix for #127648, reported by Dave Bordoley.
2004-03-10 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents-win32.c (build_key_event_state): Set also

View File

@ -284,9 +284,6 @@ gtk_entry_completion_init (GtkEntryCompletion *completion)
gtk_tree_selection_unselect_all (sel);
cell = gtk_cell_renderer_text_new ();
g_object_set (cell, "cell_background_gdk",
&priv->tree_view->style->bg[GTK_STATE_NORMAL],
NULL);
gtk_tree_view_insert_column_with_data_func (GTK_TREE_VIEW (priv->action_view),
0, "",
cell,
@ -1119,10 +1116,20 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
gint monitor_num;
GdkRectangle monitor;
GtkRequisition popup_req;
GtkTreeViewColumn *column;
GList *renderers;
if (GTK_WIDGET_MAPPED (completion->priv->popup_window))
return;
column = gtk_tree_view_get_column (GTK_TREE_VIEW (completion->priv->action_view), 0);
renderers = gtk_tree_view_column_get_cell_renderers (column);
gtk_widget_ensure_style (completion->priv->tree_view);
g_object_set (GTK_CELL_RENDERER (renderers->data), "cell_background_gdk",
&completion->priv->tree_view->style->bg[GTK_STATE_NORMAL],
NULL);
g_list_free (renderers);
gtk_widget_show_all (completion->priv->vbox);
gdk_window_get_origin (completion->priv->entry->window, &x, &y);