Commit 25e0ae01 authored by Soeren Sandmann's avatar Soeren Sandmann Committed by Søren Sandmann Pedersen

add gtk_menu_style_set(). fixes #79345

Thu May 30 07:59:38 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c (gtk_menu_style_set): add
	gtk_menu_style_set(). fixes #79345
parent b179b6af
Thu May 30 07:59:38 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_style_set): add
gtk_menu_style_set(). fixes #79345
2002-05-29 Dave Camp <dave@ximian.com> 2002-05-29 Dave Camp <dave@ximian.com>
* gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events. * gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events.
......
Thu May 30 07:59:38 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_style_set): add
gtk_menu_style_set(). fixes #79345
2002-05-29 Dave Camp <dave@ximian.com> 2002-05-29 Dave Camp <dave@ximian.com>
* gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events. * gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events.
......
Thu May 30 07:59:38 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_style_set): add
gtk_menu_style_set(). fixes #79345
2002-05-29 Dave Camp <dave@ximian.com> 2002-05-29 Dave Camp <dave@ximian.com>
* gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events. * gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events.
......
Thu May 30 07:59:38 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_style_set): add
gtk_menu_style_set(). fixes #79345
2002-05-29 Dave Camp <dave@ximian.com> 2002-05-29 Dave Camp <dave@ximian.com>
* gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events. * gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events.
......
Thu May 30 07:59:38 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_style_set): add
gtk_menu_style_set(). fixes #79345
2002-05-29 Dave Camp <dave@ximian.com> 2002-05-29 Dave Camp <dave@ximian.com>
* gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events. * gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events.
......
Thu May 30 07:59:38 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_style_set): add
gtk_menu_style_set(). fixes #79345
2002-05-29 Dave Camp <dave@ximian.com> 2002-05-29 Dave Camp <dave@ximian.com>
* gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events. * gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events.
......
...@@ -162,22 +162,22 @@ box. ...@@ -162,22 +162,22 @@ box.
</para> </para>
<!-- ##### ARG GtkButtonBox:child-min-width ##### --> <!-- ##### ARG GtkButtonBox:child-internal-pad-y ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkButtonBox:child-min-height ##### --> <!-- ##### ARG GtkButtonBox:child-internal-pad-x ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkButtonBox:child-internal-pad-y ##### --> <!-- ##### ARG GtkButtonBox:child-min-width ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkButtonBox:child-internal-pad-x ##### --> <!-- ##### ARG GtkButtonBox:child-min-height ##### -->
<para> <para>
</para> </para>
......
...@@ -248,22 +248,22 @@ mouse cursor is. ...@@ -248,22 +248,22 @@ mouse cursor is.
</para> </para>
<!-- ##### ARG GtkButton:child-displacement-y ##### --> <!-- ##### ARG GtkButton:default-border ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkButton:child-displacement-x ##### --> <!-- ##### ARG GtkButton:default-outside-border ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkButton:default-border ##### --> <!-- ##### ARG GtkButton:child-displacement-y ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkButton:default-outside-border ##### --> <!-- ##### ARG GtkButton:child-displacement-x ##### -->
<para> <para>
</para> </para>
......
...@@ -66,12 +66,12 @@ Creates a new #GtkCheckButton with a #GtkLabel to the right of it. ...@@ -66,12 +66,12 @@ Creates a new #GtkCheckButton with a #GtkLabel to the right of it.
@Returns: @Returns:
<!-- ##### ARG GtkCheckButton:indicator-spacing ##### --> <!-- ##### ARG GtkCheckButton:indicator-size ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkCheckButton:indicator-size ##### --> <!-- ##### ARG GtkCheckButton:indicator-spacing ##### -->
<para> <para>
</para> </para>
......
...@@ -298,12 +298,12 @@ was clicked. ...@@ -298,12 +298,12 @@ was clicked.
</para> </para>
<!-- ##### ARG GtkDialog:button-spacing ##### --> <!-- ##### ARG GtkDialog:content-area-border ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkDialog:content-area-border ##### --> <!-- ##### ARG GtkDialog:button-spacing ##### -->
<para> <para>
</para> </para>
......
...@@ -100,12 +100,12 @@ selected value for the option menu. ...@@ -100,12 +100,12 @@ selected value for the option menu.
</para> </para>
<!-- ##### ARG GtkOptionMenu:indicator-spacing ##### --> <!-- ##### ARG GtkOptionMenu:indicator-size ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkOptionMenu:indicator-size ##### --> <!-- ##### ARG GtkOptionMenu:indicator-spacing ##### -->
<para> <para>
</para> </para>
......
...@@ -153,32 +153,32 @@ Emitted when the range value changes. ...@@ -153,32 +153,32 @@ Emitted when the range value changes.
</para> </para>
<!-- ##### ARG GtkRange:arrow-displacement-y ##### --> <!-- ##### ARG GtkRange:stepper-size ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkRange:arrow-displacement-x ##### --> <!-- ##### ARG GtkRange:slider-width ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkRange:trough-border ##### --> <!-- ##### ARG GtkRange:stepper-spacing ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkRange:stepper-spacing ##### --> <!-- ##### ARG GtkRange:arrow-displacement-y ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkRange:stepper-size ##### --> <!-- ##### ARG GtkRange:arrow-displacement-x ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkRange:slider-width ##### --> <!-- ##### ARG GtkRange:trough-border ##### -->
<para> <para>
</para> </para>
......
...@@ -54,32 +54,32 @@ The #GtkScrollbar struct does not contain any public data. ...@@ -54,32 +54,32 @@ The #GtkScrollbar struct does not contain any public data.
</para> </para>
<!-- ##### ARG GtkScrollbar:min-slider-length ##### --> <!-- ##### ARG GtkScrollbar:has-forward-stepper ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkScrollbar:fixed-slider-length ##### --> <!-- ##### ARG GtkScrollbar:has-backward-stepper ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkScrollbar:has-backward-stepper ##### --> <!-- ##### ARG GtkScrollbar:fixed-slider-length ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkScrollbar:has-secondary-forward-stepper ##### --> <!-- ##### ARG GtkScrollbar:min-slider-length ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkScrollbar:has-secondary-backward-stepper ##### --> <!-- ##### ARG GtkScrollbar:has-secondary-forward-stepper ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkScrollbar:has-forward-stepper ##### --> <!-- ##### ARG GtkScrollbar:has-secondary-backward-stepper ##### -->
<para> <para>
</para> </para>
......
...@@ -386,17 +386,17 @@ Should be used if you wish to perform an action when ever the style of a toolbar ...@@ -386,17 +386,17 @@ Should be used if you wish to perform an action when ever the style of a toolbar
</para> </para>
<!-- ##### ARG GtkToolbar:button-relief ##### --> <!-- ##### ARG GtkToolbar:shadow-type ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkToolbar:space-size ##### --> <!-- ##### ARG GtkToolbar:space-style ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkToolbar:space-style ##### --> <!-- ##### ARG GtkToolbar:button-relief ##### -->
<para> <para>
</para> </para>
...@@ -406,7 +406,7 @@ Should be used if you wish to perform an action when ever the style of a toolbar ...@@ -406,7 +406,7 @@ Should be used if you wish to perform an action when ever the style of a toolbar
</para> </para>
<!-- ##### ARG GtkToolbar:shadow-type ##### --> <!-- ##### ARG GtkToolbar:space-size ##### -->
<para> <para>
</para> </para>
......
...@@ -901,7 +901,7 @@ Function used for #gtk_tree_view_map_expanded_rows. ...@@ -901,7 +901,7 @@ Function used for #gtk_tree_view_map_expanded_rows.
</para> </para>
<!-- ##### ARG GtkTreeView:allow-rules ##### --> <!-- ##### ARG GtkTreeView:expander-size ##### -->
<para> <para>
</para> </para>
...@@ -911,7 +911,7 @@ Function used for #gtk_tree_view_map_expanded_rows. ...@@ -911,7 +911,7 @@ Function used for #gtk_tree_view_map_expanded_rows.
</para> </para>
<!-- ##### ARG GtkTreeView:expander-size ##### --> <!-- ##### ARG GtkTreeView:allow-rules ##### -->
<para> <para>
</para> </para>
......
...@@ -2187,37 +2187,37 @@ a widget changes from un-anchored to anchored or vice-versa. ...@@ -2187,37 +2187,37 @@ a widget changes from un-anchored to anchored or vice-versa.
</para> </para>
<!-- ##### ARG GtkWidget:secondary-cursor-color ##### --> <!-- ##### ARG GtkWidget:focus-line-pattern ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkWidget:cursor-aspect-ratio ##### --> <!-- ##### ARG GtkWidget:interior-focus ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkWidget:focus-line-pattern ##### --> <!-- ##### ARG GtkWidget:focus-padding ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkWidget:cursor-color ##### --> <!-- ##### ARG GtkWidget:cursor-aspect-ratio ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkWidget:interior-focus ##### --> <!-- ##### ARG GtkWidget:cursor-color ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkWidget:focus-padding ##### --> <!-- ##### ARG GtkWidget:focus-line-width ##### -->
<para> <para>
</para> </para>
<!-- ##### ARG GtkWidget:focus-line-width ##### --> <!-- ##### ARG GtkWidget:secondary-cursor-color ##### -->
<para> <para>
</para> </para>
......
...@@ -113,6 +113,9 @@ static void gtk_menu_handle_scrolling (GtkMenu *menu, ...@@ -113,6 +113,9 @@ static void gtk_menu_handle_scrolling (GtkMenu *menu,
gboolean enter); gboolean enter);
static void gtk_menu_set_tearoff_hints (GtkMenu *menu, static void gtk_menu_set_tearoff_hints (GtkMenu *menu,
gint width); gint width);
static void gtk_menu_style_set (GtkWidget *widget,
GtkStyle *previous_style);
static void gtk_menu_stop_navigating_submenu (GtkMenu *menu); static void gtk_menu_stop_navigating_submenu (GtkMenu *menu);
static gboolean gtk_menu_stop_navigating_submenu_cb (gpointer user_data); static gboolean gtk_menu_stop_navigating_submenu_cb (gpointer user_data);
...@@ -206,6 +209,7 @@ gtk_menu_class_init (GtkMenuClass *class) ...@@ -206,6 +209,7 @@ gtk_menu_class_init (GtkMenuClass *class)
widget_class->hide_all = gtk_menu_hide_all; widget_class->hide_all = gtk_menu_hide_all;
widget_class->enter_notify_event = gtk_menu_enter_notify; widget_class->enter_notify_event = gtk_menu_enter_notify;
widget_class->leave_notify_event = gtk_menu_leave_notify; widget_class->leave_notify_event = gtk_menu_leave_notify;
widget_class->style_set = gtk_menu_style_set;
container_class->remove = gtk_menu_remove; container_class->remove = gtk_menu_remove;
...@@ -1260,6 +1264,20 @@ gtk_menu_reorder_child (GtkMenu *menu, ...@@ -1260,6 +1264,20 @@ gtk_menu_reorder_child (GtkMenu *menu,
} }
} }
static void
gtk_menu_style_set (GtkWidget *widget,
GtkStyle *previous_style)
{
if (GTK_WIDGET_REALIZED (widget))
{
GtkMenu *menu = GTK_MENU (widget);
gtk_style_set_background (widget->style, menu->bin_window, GTK_STATE_NORMAL);
gtk_style_set_background (widget->style, menu->view_window, GTK_STATE_NORMAL);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
}
}
static void static void
gtk_menu_realize (GtkWidget *widget) gtk_menu_realize (GtkWidget *widget)
{ {
......
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