diff --git a/ChangeLog b/ChangeLog index f33091b8e3..279288a631 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-09-20 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't + try to handle alignment here, because it's done by PangoLayout + after we set the layout width. Fix from Dov. + 2001-09-21 Hans Breuer * gdk/gdk.def : diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index f33091b8e3..279288a631 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2001-09-20 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't + try to handle alignment here, because it's done by PangoLayout + after we set the layout width. Fix from Dov. + 2001-09-21 Hans Breuer * gdk/gdk.def : diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f33091b8e3..279288a631 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2001-09-20 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't + try to handle alignment here, because it's done by PangoLayout + after we set the layout width. Fix from Dov. + 2001-09-21 Hans Breuer * gdk/gdk.def : diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f33091b8e3..279288a631 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2001-09-20 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't + try to handle alignment here, because it's done by PangoLayout + after we set the layout width. Fix from Dov. + 2001-09-21 Hans Breuer * gdk/gdk.def : diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f33091b8e3..279288a631 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2001-09-20 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't + try to handle alignment here, because it's done by PangoLayout + after we set the layout width. Fix from Dov. + 2001-09-21 Hans Breuer * gdk/gdk.def : diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f33091b8e3..279288a631 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2001-09-20 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't + try to handle alignment here, because it's done by PangoLayout + after we set the layout width. Fix from Dov. + 2001-09-21 Hans Breuer * gdk/gdk.def : diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f33091b8e3..279288a631 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2001-09-20 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't + try to handle alignment here, because it's done by PangoLayout + after we set the layout width. Fix from Dov. + 2001-09-21 Hans Breuer * gdk/gdk.def : diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml index a745705aa6..b6ac0926fa 100644 --- a/docs/reference/gtk/tmpl/gtk-unused.sgml +++ b/docs/reference/gtk/tmpl/gtk-unused.sgml @@ -1793,6 +1793,19 @@ arrow. @show_toggle_indicator: unused @show_submenu_indicator: whether to show the arrow or not + + +Specifies the placement of the submenu around the menu item. The placement +is usually #GTK_LEFT_RIGHT for menu items in a popup menu and +#GTK_TOP_BOTTOM in menu bars. + + +This function is useless in usual applications. + + +@menu_item: the menu item +@placement: the submenu placement + Private function to get an argument and argument info from an object. @@ -2480,6 +2493,15 @@ fundamental type. @group_cycling: @Returns: + + + + + +@widget: +@width: +@height: + diff --git a/docs/reference/gtk/tmpl/gtkmenu.sgml b/docs/reference/gtk/tmpl/gtkmenu.sgml index 13e9c079dd..e9a9ccfcf9 100644 --- a/docs/reference/gtk/tmpl/gtkmenu.sgml +++ b/docs/reference/gtk/tmpl/gtkmenu.sgml @@ -96,9 +96,9 @@ Creates a new #GtkMenu. Adds a new #GtkMenuItem to the end of the menu's item list. + @menu: a #GtkMenu. @child: The #GtkMenuItem to add. - @m: @c: @@ -108,8 +108,8 @@ Adds a new #GtkMenuItem to the end of the menu's item list. Adds a new #GtkMenuItem to the beginning of the menu's item list. -@menu_child: +@menu_child: @m: @c: @menu: a #GtkMenu. @@ -122,10 +122,10 @@ Adds a new #GtkMenuItem to the menu's item list at the position indicated by @position. + @menu: a #GtkMenu. @child: The #GtkMenuItem to add. @pos: - @position: The position in the item list where @child is added. Positions are numbered from 0 to n-1. diff --git a/docs/reference/gtk/tmpl/gtkmenuitem.sgml b/docs/reference/gtk/tmpl/gtkmenuitem.sgml index 286ab7b6d6..9694f0822c 100644 --- a/docs/reference/gtk/tmpl/gtkmenuitem.sgml +++ b/docs/reference/gtk/tmpl/gtkmenuitem.sgml @@ -91,20 +91,6 @@ Removes the widget's submenu. @menu_item: the menu item widget - - -Specifies the placement of the submenu around the menu item. The placement -is usually #GTK_LEFT_RIGHT for menu items in a popup menu and -#GTK_TOP_BOTTOM in menu bars. - - -This function is useless in usual applications. - - -@menu_item: the menu item -@placement: the submenu placement - - Emits the "select" signal on the given item. Behaves exactly like diff --git a/docs/reference/gtk/tmpl/gtkrc.sgml b/docs/reference/gtk/tmpl/gtkrc.sgml index cc0b23b6d2..30ffca8235 100644 --- a/docs/reference/gtk/tmpl/gtkrc.sgml +++ b/docs/reference/gtk/tmpl/gtkrc.sgml @@ -495,7 +495,6 @@ This can later be composited together with other #GtkRcStyle structures to form a #GtkStyle. -@parent_instance: @name: @bg_pixmap_name: @font_desc: diff --git a/docs/reference/gtk/tmpl/gtkwidget.sgml b/docs/reference/gtk/tmpl/gtkwidget.sgml index 8d6c08c9a5..b360b44d7a 100644 --- a/docs/reference/gtk/tmpl/gtkwidget.sgml +++ b/docs/reference/gtk/tmpl/gtkwidget.sgml @@ -1372,16 +1372,6 @@ GtkWidget @height: - - - - - -@widget: -@width: -@height: - - diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index 62ac18c6f4..2b77c91b3c 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -1097,8 +1097,7 @@ totally_invisible_line (GtkTextLayout *layout, static void set_para_values (GtkTextLayout *layout, GtkTextAttributes *style, - GtkTextLineDisplay *display, - gdouble *align) + GtkTextLineDisplay *display) { PangoAlignment pango_align = PANGO_ALIGN_LEFT; int layout_width; @@ -1129,19 +1128,6 @@ set_para_values (GtkTextLayout *layout, break; } - switch (pango_align) - { - case PANGO_ALIGN_LEFT: - *align = 0.0; - break; - case PANGO_ALIGN_RIGHT: - *align = 1.0; - break; - case PANGO_ALIGN_CENTER: - *align = 0.5; - break; - } - pango_layout_set_alignment (display->layout, pango_align); pango_layout_set_spacing (display->layout, style->pixels_inside_wrap * PANGO_SCALE); @@ -1670,7 +1656,6 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout, gchar *text; PangoAttrList *attrs; gint text_allocated, layout_byte_offset, buffer_byte_offset; - gdouble align; PangoRectangle extents; gboolean para_values_set = FALSE; GSList *cursor_byte_offsets = NULL; @@ -1739,7 +1724,7 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout, */ if (!para_values_set) { - set_para_values (layout, style, display, &align); + set_para_values (layout, style, display); para_values_set = TRUE; } @@ -1908,7 +1893,7 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout, if (!para_values_set) { style = get_style (layout, &iter); - set_para_values (layout, style, display, &align); + set_para_values (layout, style, display); release_style (layout, style); } @@ -1955,8 +1940,6 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout, pango_layout_get_extents (display->layout, NULL, &extents); - display->x_offset += (display->total_width - PANGO_PIXELS (extents.x + extents.width)) * align; - display->width = PANGO_PIXELS (extents.width) + display->left_margin + display->right_margin; display->height += PANGO_PIXELS (extents.height);