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:
Kristian Rietveld 2001-09-22 14:55:02 +00:00 committed by Kristian Rietveld
parent b03796ed2f
commit be317eb291
9 changed files with 102 additions and 6 deletions

View File

@ -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>
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass

View File

@ -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>
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass

View File

@ -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>
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass

View File

@ -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>
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass

View File

@ -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>
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass

View File

@ -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>
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass

View File

@ -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>
* gtk/gtktextview.c (gtk_text_view_key_press_event): don't pass

View File

@ -97,6 +97,8 @@ static void gtk_menu_scroll_to (GtkMenu *menu,
gint offset);
static void gtk_menu_stop_scrolling (GtkMenu *menu);
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,
GtkWidget *menu_item);
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, 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);
gdk_window_show (menu->bin_window);
@ -2204,7 +2209,6 @@ gtk_menu_scroll_to (GtkMenu *menu,
y += MENU_SCROLL_ARROW_HEIGHT;
}
gdk_window_move_resize (menu->view_window,
x,
y,
@ -2215,8 +2219,8 @@ gtk_menu_scroll_to (GtkMenu *menu,
}
static void
gtk_menu_select_item (GtkMenuShell *menu_shell,
GtkWidget *menu_item)
gtk_menu_scroll_item_visible (GtkMenuShell *menu_shell,
GtkWidget *menu_item)
{
GtkMenu *menu;
GtkWidget *child;
@ -2228,8 +2232,6 @@ gtk_menu_select_item (GtkMenuShell *menu_shell,
gint arrow_height;
gboolean last_child = 0;
g_return_if_fail (GTK_IS_MENU (menu_shell));
menu = GTK_MENU (menu_shell);
/* 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);
}

View File

@ -986,7 +986,7 @@ gtk_text_tag_set_property (GObject *object,
break;
case PROP_WEIGHT:
pango_font_description_set_weight (text_tag->values->font,
g_value_get_enum (value));
g_value_get_int (value));
break;
case PROP_STRETCH:
pango_font_description_set_stretch (text_tag->values->font,