mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 05:20:17 +00:00
weight value should be an int
Sat Sep 22 16:50:34 2001 Kristian Rietveld <kristian@planet.nl> * gtk/gtktexttag.c (gtk_text_tag_set_property): (case PROP_WEIGHT): weight value should be an int Sat Sep 22 15:17:41 2001 Kristian Rietveld <kristian@planet.nl> * gtk/gtkmenu.c (gtk_menu_select_item): move most code to gtk_menu_scroll_item_visible(). Only call gtk_menu_scroll_item_visible() if the menu widget has been realized. Fixes bug #55310.
This commit is contained in:
parent
b03796ed2f
commit
be317eb291
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
Sat Sep 22 16:50:34 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtktexttag.c (gtk_text_tag_set_property): (case PROP_WEIGHT):
|
||||||
|
weight value should be an int
|
||||||
|
|
||||||
|
Sat Sep 22 15:17:41 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtkmenu.c (gtk_menu_select_item): move most code
|
||||||
|
to gtk_menu_scroll_item_visible(). Only call
|
||||||
|
gtk_menu_scroll_item_visible() if the menu widget has been
|
||||||
|
realized. Fixes bug #55310.
|
||||||
|
|
||||||
2001-09-21 Havoc Pennington <hp@redhat.com>
|
2001-09-21 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
Sat Sep 22 16:50:34 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtktexttag.c (gtk_text_tag_set_property): (case PROP_WEIGHT):
|
||||||
|
weight value should be an int
|
||||||
|
|
||||||
|
Sat Sep 22 15:17:41 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtkmenu.c (gtk_menu_select_item): move most code
|
||||||
|
to gtk_menu_scroll_item_visible(). Only call
|
||||||
|
gtk_menu_scroll_item_visible() if the menu widget has been
|
||||||
|
realized. Fixes bug #55310.
|
||||||
|
|
||||||
2001-09-21 Havoc Pennington <hp@redhat.com>
|
2001-09-21 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
Sat Sep 22 16:50:34 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtktexttag.c (gtk_text_tag_set_property): (case PROP_WEIGHT):
|
||||||
|
weight value should be an int
|
||||||
|
|
||||||
|
Sat Sep 22 15:17:41 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtkmenu.c (gtk_menu_select_item): move most code
|
||||||
|
to gtk_menu_scroll_item_visible(). Only call
|
||||||
|
gtk_menu_scroll_item_visible() if the menu widget has been
|
||||||
|
realized. Fixes bug #55310.
|
||||||
|
|
||||||
2001-09-21 Havoc Pennington <hp@redhat.com>
|
2001-09-21 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
Sat Sep 22 16:50:34 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtktexttag.c (gtk_text_tag_set_property): (case PROP_WEIGHT):
|
||||||
|
weight value should be an int
|
||||||
|
|
||||||
|
Sat Sep 22 15:17:41 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtkmenu.c (gtk_menu_select_item): move most code
|
||||||
|
to gtk_menu_scroll_item_visible(). Only call
|
||||||
|
gtk_menu_scroll_item_visible() if the menu widget has been
|
||||||
|
realized. Fixes bug #55310.
|
||||||
|
|
||||||
2001-09-21 Havoc Pennington <hp@redhat.com>
|
2001-09-21 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
Sat Sep 22 16:50:34 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtktexttag.c (gtk_text_tag_set_property): (case PROP_WEIGHT):
|
||||||
|
weight value should be an int
|
||||||
|
|
||||||
|
Sat Sep 22 15:17:41 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtkmenu.c (gtk_menu_select_item): move most code
|
||||||
|
to gtk_menu_scroll_item_visible(). Only call
|
||||||
|
gtk_menu_scroll_item_visible() if the menu widget has been
|
||||||
|
realized. Fixes bug #55310.
|
||||||
|
|
||||||
2001-09-21 Havoc Pennington <hp@redhat.com>
|
2001-09-21 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
Sat Sep 22 16:50:34 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtktexttag.c (gtk_text_tag_set_property): (case PROP_WEIGHT):
|
||||||
|
weight value should be an int
|
||||||
|
|
||||||
|
Sat Sep 22 15:17:41 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtkmenu.c (gtk_menu_select_item): move most code
|
||||||
|
to gtk_menu_scroll_item_visible(). Only call
|
||||||
|
gtk_menu_scroll_item_visible() if the menu widget has been
|
||||||
|
realized. Fixes bug #55310.
|
||||||
|
|
||||||
2001-09-21 Havoc Pennington <hp@redhat.com>
|
2001-09-21 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
Sat Sep 22 16:50:34 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtktexttag.c (gtk_text_tag_set_property): (case PROP_WEIGHT):
|
||||||
|
weight value should be an int
|
||||||
|
|
||||||
|
Sat Sep 22 15:17:41 2001 Kristian Rietveld <kristian@planet.nl>
|
||||||
|
|
||||||
|
* gtk/gtkmenu.c (gtk_menu_select_item): move most code
|
||||||
|
to gtk_menu_scroll_item_visible(). Only call
|
||||||
|
gtk_menu_scroll_item_visible() if the menu widget has been
|
||||||
|
realized. Fixes bug #55310.
|
||||||
|
|
||||||
2001-09-21 Havoc Pennington <hp@redhat.com>
|
2001-09-21 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass
|
||||||
|
@ -97,6 +97,8 @@ static void gtk_menu_scroll_to (GtkMenu *menu,
|
|||||||
gint offset);
|
gint offset);
|
||||||
static void gtk_menu_stop_scrolling (GtkMenu *menu);
|
static void gtk_menu_stop_scrolling (GtkMenu *menu);
|
||||||
static gboolean gtk_menu_scroll_timeout (gpointer data);
|
static gboolean gtk_menu_scroll_timeout (gpointer data);
|
||||||
|
static void gtk_menu_scroll_item_visible (GtkMenuShell *menu_shell,
|
||||||
|
GtkWidget *menu_item);
|
||||||
static void gtk_menu_select_item (GtkMenuShell *menu_shell,
|
static void gtk_menu_select_item (GtkMenuShell *menu_shell,
|
||||||
GtkWidget *menu_item);
|
GtkWidget *menu_item);
|
||||||
static void gtk_menu_real_insert (GtkMenuShell *menu_shell,
|
static void gtk_menu_real_insert (GtkMenuShell *menu_shell,
|
||||||
@ -1124,6 +1126,9 @@ gtk_menu_realize (GtkWidget *widget)
|
|||||||
gtk_style_set_background (widget->style, menu->view_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);
|
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||||
|
|
||||||
|
gtk_menu_scroll_item_visible (GTK_MENU_SHELL (widget),
|
||||||
|
GTK_MENU_SHELL (widget)->active_menu_item);
|
||||||
|
|
||||||
gtk_menu_paint (widget);
|
gtk_menu_paint (widget);
|
||||||
|
|
||||||
gdk_window_show (menu->bin_window);
|
gdk_window_show (menu->bin_window);
|
||||||
@ -2204,7 +2209,6 @@ gtk_menu_scroll_to (GtkMenu *menu,
|
|||||||
y += MENU_SCROLL_ARROW_HEIGHT;
|
y += MENU_SCROLL_ARROW_HEIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gdk_window_move_resize (menu->view_window,
|
gdk_window_move_resize (menu->view_window,
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
@ -2215,8 +2219,8 @@ gtk_menu_scroll_to (GtkMenu *menu,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_menu_select_item (GtkMenuShell *menu_shell,
|
gtk_menu_scroll_item_visible (GtkMenuShell *menu_shell,
|
||||||
GtkWidget *menu_item)
|
GtkWidget *menu_item)
|
||||||
{
|
{
|
||||||
GtkMenu *menu;
|
GtkMenu *menu;
|
||||||
GtkWidget *child;
|
GtkWidget *child;
|
||||||
@ -2228,8 +2232,6 @@ gtk_menu_select_item (GtkMenuShell *menu_shell,
|
|||||||
gint arrow_height;
|
gint arrow_height;
|
||||||
gboolean last_child = 0;
|
gboolean last_child = 0;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_MENU (menu_shell));
|
|
||||||
|
|
||||||
menu = GTK_MENU (menu_shell);
|
menu = GTK_MENU (menu_shell);
|
||||||
|
|
||||||
/* We need to check if the selected item fully visible.
|
/* We need to check if the selected item fully visible.
|
||||||
@ -2303,6 +2305,16 @@ gtk_menu_select_item (GtkMenuShell *menu_shell,
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_menu_select_item (GtkMenuShell *menu_shell,
|
||||||
|
GtkWidget *menu_item)
|
||||||
|
{
|
||||||
|
GtkMenu *menu = GTK_MENU (menu_shell);
|
||||||
|
|
||||||
|
if (GTK_WIDGET_REALIZED (GTK_WIDGET (menu)))
|
||||||
|
gtk_menu_scroll_item_visible (menu_shell, menu_item);
|
||||||
|
|
||||||
GTK_MENU_SHELL_CLASS (parent_class)->select_item (menu_shell, menu_item);
|
GTK_MENU_SHELL_CLASS (parent_class)->select_item (menu_shell, menu_item);
|
||||||
}
|
}
|
||||||
|
@ -986,7 +986,7 @@ gtk_text_tag_set_property (GObject *object,
|
|||||||
break;
|
break;
|
||||||
case PROP_WEIGHT:
|
case PROP_WEIGHT:
|
||||||
pango_font_description_set_weight (text_tag->values->font,
|
pango_font_description_set_weight (text_tag->values->font,
|
||||||
g_value_get_enum (value));
|
g_value_get_int (value));
|
||||||
break;
|
break;
|
||||||
case PROP_STRETCH:
|
case PROP_STRETCH:
|
||||||
pango_font_description_set_stretch (text_tag->values->font,
|
pango_font_description_set_stretch (text_tag->values->font,
|
||||||
|
Loading…
Reference in New Issue
Block a user