[gtk+/native-layout: 203/203] Merge branch 'master' into native-layout



commit 54d44a9bd04cfbed8426614fc69c027a46f41a14
Merge: b3b22c3 67194ed
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Mon Aug 30 14:56:28 2010 +0900

    Merge branch 'master' into native-layout
    
    Conflicts:
    	gtk/gtkplug.c
    	gtk/gtkscrolledwindow.c

 configure.ac                                       |   21 +-
 demos/gtk-demo/changedisplay.c                     |    2 +-
 demos/gtk-demo/colorsel.c                          |    7 +-
 demos/gtk-demo/drawingarea.c                       |   20 +-
 demos/gtk-demo/hypertext.c                         |   10 +-
 demos/gtk-demo/offscreen_window.c                  |   61 +-
 demos/gtk-demo/offscreen_window2.c                 |   55 +-
 demos/gtk-demo/panes.c                             |   24 +-
 demos/gtk-demo/rotated_text.c                      |   12 +-
 demos/gtk-demo/toolpalette.c                       |   23 +-
 demos/testpixbuf-scale.c                           |   11 +-
 docs/reference/gdk/Makefile.am                     |    1 -
 docs/reference/gdk/gdk3-sections.txt               |    1 -
 docs/reference/gtk/Makefile.am                     |    1 -
 docs/reference/gtk/building.sgml                   |    5 +-
 docs/reference/gtk/directfb.sgml                   |   44 -
 docs/reference/gtk/gtk-docs.sgml                   |    1 -
 docs/reference/gtk/gtk3-sections.txt               |   36 +-
 docs/tools/shooter.c                               |   10 +-
 docs/tools/widgets.c                               |   10 +-
 gdk/Makefile.am                                    |    8 +-
 gdk/directfb/AUTHORS                               |   28 -
 gdk/directfb/Makefile.am                           |   57 -
 gdk/directfb/README                                |  106 -
 gdk/directfb/TODO                                  |   56 -
 gdk/directfb/gdkapplaunchcontext-directfb.c        |   42 -
 gdk/directfb/gdkcolor-directfb.c                   |  463 --
 gdk/directfb/gdkcursor-directfb.c                  |  546 --
 gdk/directfb/gdkdirectfb.h                         |   82 -
 gdk/directfb/gdkdisplay-directfb.c                 |  540 --
 gdk/directfb/gdkdisplay-directfb.h                 |   59 -
 gdk/directfb/gdkdnd-directfb.c                     |  634 --
 gdk/directfb/gdkdrawable-directfb.c                |  626 --
 gdk/directfb/gdkevents-directfb.c                  |  963 ---
 gdk/directfb/gdkgeometry-directfb.c                |  254 -
 gdk/directfb/gdkglobals-directfb.c                 |   58 -
 gdk/directfb/gdkim-directfb.c                      |   60 -
 gdk/directfb/gdkinput-directfb.c                   |  327 --
 gdk/directfb/gdkinput-directfb.h                   |  143 -
 gdk/directfb/gdkkeys-directfb.c                    | 2032 -------
 gdk/directfb/gdkmain-directfb.c                    |  417 --
 gdk/directfb/gdkpixmap-directfb.c                  |  232 -
 gdk/directfb/gdkprivate-directfb.h                 |  381 --
 gdk/directfb/gdkproperty-directfb.c                |  397 --
 gdk/directfb/gdkscreen-directfb.c                  |  248 -
 gdk/directfb/gdkselection-directfb.c               |  494 --
 gdk/directfb/gdkspawn-directfb.c                   |  104 -
 gdk/directfb/gdktestutils-directfb.c               |  263 -
 gdk/directfb/gdkvisual-directfb.c                  |  493 --
 gdk/directfb/gdkwindow-directfb.c                  | 2891 ----------
 gdk/directfb/gdkwindowid.c                         |   69 -
 gdk/directfb/x-cursors.xbm                         |  924 ---
 gdk/gdk.c                                          |    4 +-
 gdk/gdk.symbols                                    |   24 -
 gdk/gdkwindow.c                                    |    2 +-
 gdk/gdkwindowimpl.c                                |   18 +-
 gdk/win32/gdkdrawable-win32.c                      |  404 --
 gdk/win32/gdkmain-win32.c                          |  129 -
 gdk/win32/gdkpixmap-win32.c                        |   33 +-
 gdk/win32/gdkprivate-win32.h                       |   17 -
 gdk/win32/gdkvisual-win32.c                        |    8 -
 gdk/win32/gdkwin32.h                               |   16 -
 gdk/win32/gdkwindow-win32.c                        |  179 +-
 gdk/x11/gdkeventtranslator.c                       |   20 +-
 gdk/x11/gdkkeys-x11.c                              |    1 +
 gtk/Makefile.am                                    |   24 +-
 gtk/gtk.h                                          |    1 +
 gtk/gtk.symbols                                    |   25 +-
 gtk/gtkaboutdialog.c                               |    5 +-
 gtk/gtkaccessible.c                                |    8 +-
 gtk/gtkaccessible.h                                |    4 +-
 gtk/gtkactivatable.c                               |   27 +-
 gtk/gtkalignment.c                                 |   26 +-
 gtk/gtkalignment.h                                 |    8 +-
 gtk/gtkarrow.c                                     |   18 +-
 gtk/gtkarrow.h                                     |    8 +-
 gtk/gtkaspectframe.c                               |   18 +-
 gtk/gtkaspectframe.h                               |    8 +-
 gtk/gtkassistant.c                                 |   61 +-
 gtk/gtkbbox.c                                      |  333 +-
 gtk/gtkbbox.h                                      |    8 +-
 gtk/gtkbin.c                                       |   24 +-
 gtk/gtkbin.h                                       |    8 +-
 gtk/gtkbox.c                                       |   58 +-
 gtk/gtkbox.h                                       |    8 +-
 gtk/gtkbuilderparser.c                             |    2 +-
 gtk/gtkbutton.c                                    |  118 +-
 gtk/gtkcalendar.c                                  |  255 +-
 gtk/gtkcelllayout.c                                |   31 +-
 gtk/gtkcellrenderer.c                              |   40 +-
 gtk/gtkcellrenderer.h                              |    8 +-
 gtk/gtkcellrendereraccel.c                         |   39 +-
 gtk/gtkcellrendereraccel.h                         |    8 +-
 gtk/gtkcellrenderercombo.c                         |   20 +-
 gtk/gtkcellrenderercombo.h                         |    8 +-
 gtk/gtkcellrendererpixbuf.c                        |   30 +-
 gtk/gtkcellrendererpixbuf.h                        |    8 +-
 gtk/gtkcellrendererprogress.c                      |   23 +-
 gtk/gtkcellrendererspinner.c                       |    2 +-
 gtk/gtkcellrenderertext.c                          |   57 +-
 gtk/gtkcellrenderertext.h                          |    8 +-
 gtk/gtkcellrenderertoggle.c                        |   26 +-
 gtk/gtkcellrenderertoggle.h                        |    8 +-
 gtk/gtkcellsizerequest.c                           |   22 +-
 gtk/gtkcellview.c                                  |   17 +-
 gtk/gtkcheckbutton.c                               |   85 +-
 gtk/gtkcheckmenuitem.c                             |   44 +-
 gtk/gtkcheckmenuitem.h                             |    8 +-
 gtk/gtkclipboard.c                                 |    4 +-
 gtk/gtkcolorbutton.c                               |    2 +-
 gtk/gtkcolorsel.c                                  |   59 +-
 gtk/gtkcolorseldialog.c                            |   12 +-
 gtk/gtkcolorseldialog.h                            |    8 +-
 gtk/gtkcombobox.c                                  |  191 +-
 gtk/gtkcontainer.c                                 |  180 +-
 gtk/gtkcontainer.h                                 |    8 +-
 gtk/gtkdialog.c                                    |   88 +-
 gtk/gtkdialog.h                                    |    8 +-
 gtk/gtkdnd.c                                       |   91 +-
 gtk/gtkdrawingarea.c                               |   39 +-
 gtk/gtkentry.c                                     |  194 +-
 gtk/gtkentrycompletion.c                           |   20 +-
 gtk/gtkenums.h                                     |   46 +
 gtk/gtkeventbox.c                                  |   47 +-
 gtk/gtkexpander.c                                  |  106 +-
 gtk/gtkfilechooser.c                               |   50 +-
 gtk/gtkfilechooserbutton.c                         |    2 +-
 gtk/gtkfilechooserdefault.c                        |   56 +-
 gtk/gtkfilechooserentry.c                          |   31 +-
 gtk/gtkfilesystem.c                                |  108 +-
 gtk/gtkfilesystem.h                                |   30 +-
 gtk/gtkfilesystemmodel.c                           |    5 +-
 gtk/gtkfixed.c                                     |   59 +-
 gtk/gtkfixed.h                                     |   10 +-
 gtk/gtkfontsel.c                                   |   78 +-
 gtk/gtkfontsel.h                                   |   16 +-
 gtk/gtkframe.c                                     |  155 +-
 gtk/gtkframe.h                                     |    8 +-
 gtk/gtkhandlebox.c                                 |   50 +-
 gtk/gtkhandlebox.h                                 |    8 +-
 gtk/gtkhsv.c                                       |  176 +-
 gtk/gtkhsv.h                                       |    8 +-
 gtk/gtkiconfactory.c                               |   26 +-
 gtk/gtkiconfactory.h                               |    6 +-
 gtk/gtkimage.c                                     |   62 +-
 gtk/gtkimage.h                                     |    8 +-
 gtk/gtkimagemenuitem.c                             |   93 +-
 gtk/gtkimagemenuitem.h                             |    8 +-
 gtk/gtkimcontextsimple.c                           |   32 +-
 gtk/gtkimcontextsimple.h                           |    8 +-
 gtk/gtkinfobar.c                                   |   17 +-
 gtk/gtkinvisible.c                                 |   31 +-
 gtk/gtkinvisible.h                                 |    8 +-
 gtk/gtkitem.c                                      |   29 +-
 gtk/gtklabel.c                                     |  316 +-
 gtk/gtklabel.h                                     |    8 +-
 gtk/gtklayout.c                                    |  104 +-
 gtk/gtklayout.h                                    |    8 +-
 gtk/gtklinkbutton.c                                |   10 +-
 gtk/gtkliststore.c                                 |   92 +-
 gtk/gtkliststore.h                                 |    8 +-
 gtk/gtkmain.c                                      |    6 +-
 gtk/gtkmenubar.c                                   |   35 +-
 gtk/gtkmenuitem.c                                  |  287 +-
 gtk/gtkmenushell.c                                 |   62 +-
 gtk/gtkmenutoolbutton.c                            |   49 +-
 gtk/gtkmessagedialog.c                             |   30 +-
 gtk/gtkmessagedialog.h                             |    8 +-
 gtk/gtkmisc.c                                      |   20 +-
 gtk/gtkmisc.h                                      |    8 +-
 gtk/gtkmnemonichash.c                              |    7 +-
 gtk/gtkmountoperation-stub.c                       |    2 +-
 gtk/gtkmountoperation-x11.c                        |    2 +-
 gtk/gtkmountoperation.c                            |    2 +-
 gtk/gtknotebook.c                                  |  228 +-
 gtk/gtknotebook.h                                  |    8 +-
 gtk/gtkoffscreenwindow.c                           |   35 +-
 gtk/gtkpaned.c                                     |  116 +-
 gtk/gtkplug-x11.c                                  |   53 +-
 gtk/gtkplug.c                                      |  265 +-
 gtk/gtkplug.h                                      |   12 +-
 gtk/gtkplugprivate.h                               |   12 +
 gtk/gtkprintoperation.c                            |    5 +-
 gtk/gtkprintunixdialog.c                           |   53 +-
 gtk/gtkprogressbar.c                               |  218 +-
 gtk/gtkprogressbar.h                               |    8 +-
 gtk/gtkradiobutton.c                               |   56 +-
 gtk/gtkradiobutton.h                               |    8 +-
 gtk/gtkradiomenuitem.c                             |   14 +-
 gtk/gtkradiomenuitem.h                             |    8 +-
 gtk/gtkrange.c                                     | 1699 +++---
 gtk/gtkrange.h                                     |   61 +-
 gtk/gtkrc.c                                        |    1 -
 gtk/gtkrecentchooser.c                             |   47 +-
 gtk/gtkrecentchooserdefault.c                      |   22 +-
 gtk/gtkruler.c                                     |   34 +-
 gtk/gtkruler.h                                     |   10 +-
 gtk/gtkscale.c                                     |  209 +-
 gtk/gtkscale.h                                     |    8 +-
 gtk/gtkscalebutton.c                               |   75 +-
 gtk/gtkscrollbar.c                                 |   11 +-
 gtk/gtkscrolledwindow.c                            |   82 +-
 gtk/gtkselection.c                                 |   39 +-
 gtk/gtkseparator.c                                 |   32 +-
 gtk/gtkseparator.h                                 |    7 +-
 gtk/gtkseparatortoolitem.c                         |   45 +-
 gtk/gtksizegroup.c                                 |   49 +-
 gtk/gtksizegroup.h                                 |    8 +-
 gtk/gtksizerequest.c                               |   25 +-
 gtk/gtksocket-x11.c                                |   26 +-
 gtk/gtksocket.c                                    |   46 +-
 gtk/gtkspinbutton.c                                |   94 +-
 gtk/gtkspinbutton.h                                |    8 +-
 gtk/gtkspinner.c                                   |   16 +-
 gtk/gtkstatusbar.c                                 |  109 +-
 gtk/gtkstatusbar.h                                 |    8 +-
 gtk/gtkstatusicon.c                                |   32 +-
 gtk/gtkstock.c                                     |    4 +-
 gtk/gtkstock.h                                     |    2 +
 gtk/gtkstyle.c                                     |   13 +-
 gtk/gtktable.c                                     |   85 +-
 gtk/gtktable.h                                     |   12 +-
 gtk/gtktearoffmenuitem.c                           |   85 +-
 gtk/gtktearoffmenuitem.h                           |    8 +-
 gtk/gtktestutils.c                                 |   23 +-
 gtk/gtktextbufferserialize.c                       |    2 +-
 gtk/gtktextdisplay.c                               |   36 +-
 gtk/gtktexttagtable.c                              |   26 +-
 gtk/gtktexttagtable.h                              |    6 +-
 gtk/gtktextutil.c                                  |   23 +-
 gtk/gtktoolbar.c                                   |  299 +-
 gtk/gtktoolbar.h                                   |    8 +-
 gtk/gtktoolbutton.c                                |   41 +-
 gtk/gtktoolitem.c                                  |   60 +-
 gtk/gtktoolitemgroup.c                             |  151 +-
 gtk/gtktoolpalette.c                               |   70 +-
 gtk/gtktoolshell.c                                 |   19 +-
 gtk/gtktooltip.c                                   |   93 +-
 gtk/gtktrayicon-x11.c                              |   45 +-
 gtk/gtktreeview.c                                  |   22 +-
 gtk/gtktreeviewcolumn.c                            |    6 +-
 gtk/gtkuimanager.c                                 |   18 +-
 gtk/gtkviewport.c                                  |  130 +-
 gtk/gtkviewport.h                                  |    8 +-
 gtk/gtkwidget.c                                    |    7 +-
 gtk/gtkwin32embedwidget.c                          |   54 +-
 gtk/gtkwindow-decorate.c                           |   16 +-
 gtk/gtkwrapbox.c                                   | 2403 ++++++++
 gtk/gtkwrapbox.h                                   |  101 +
 .../16/{dialog-info.png => dialog-information.png} |  Bin 879 -> 879 bytes
 .../16/{dialog-info.svg => dialog-information.svg} |    0
 .../{edit-preferences.png => gtk-preferences.png}  |  Bin 1014 -> 1014 bytes
 .../{edit-preferences.svg => gtk-preferences.svg}  |    0
 .../24/{dialog-info.png => dialog-information.png} |  Bin 1420 -> 1420 bytes
 .../24/{dialog-info.svg => dialog-information.svg} |    0
 .../{edit-preferences.png => gtk-preferences.png}  |  Bin 1691 -> 1691 bytes
 .../{edit-preferences.svg => gtk-preferences.svg}  |    0
 .../48/{dialog-info.png => dialog-information.png} |  Bin 3259 -> 3259 bytes
 .../48/{dialog-info.svg => dialog-information.svg} |    0
 gtk/tests/builder.c                                |   22 +-
 gtk/tests/testing.c                                |    9 +-
 gtk/tests/treeview-scrolling.c                     |    8 +-
 modules/input/gtkimcontextxim.c                    |   27 +-
 modules/other/gail/gail.c                          |   15 +-
 modules/other/gail/gailbutton.c                    |    9 +-
 modules/other/gail/gailmenu.c                      |    2 +-
 modules/other/gail/gailrange.c                     |   16 +-
 modules/other/gail/gailscrollbar.c                 |    6 +-
 modules/other/gail/gailtoplevel.c                  |    4 +-
 modules/other/gail/gailtreeview.c                  |    3 +-
 modules/other/gail/gailutil.c                      |   23 +-
 modules/other/gail/gailwidget.c                    |   61 +-
 modules/other/gail/gailwindow.c                    |   20 +-
 modules/other/gail/libgail-util/gailmisc.c         |    5 +-
 modules/other/gail/tests/ferret.c                  |    2 +-
 modules/other/gail/tests/testtext.c                |    6 +-
 modules/printbackends/cups/gtkprintbackendcups.c   |    2 +-
 perf/gtkwidgetprofiler.c                           |   12 +-
 po-properties/POTFILES.in                          |   24 +-
 po-properties/bg.po                                | 3949 ++++++-------
 po-properties/da.po                                | 3911 +++++++-------
 po-properties/gl.po                                | 1202 +++--
 po-properties/hu.po                                | 3966 ++++++-------
 po-properties/hy.po                                | 6097 ++++++++++----------
 po/POTFILES.in                                     |    3 +-
 po/bg.po                                           | 2609 +++------
 po/es.po                                           |  335 +-
 po/et.po                                           |   62 +-
 po/fr.po                                           | 2135 ++++----
 po/gl.po                                           |  618 +-
 po/he.po                                           |  500 +-
 po/hu.po                                           |  390 +-
 po/hy.po                                           | 3724 ++----------
 po/nn.po                                           | 1987 ++++----
 po/sl.po                                           |  322 +-
 tests/Makefile.am                                  |    8 +-
 tests/gtkoffscreenbox.c                            |   94 +-
 tests/print-editor.c                               |   14 +-
 tests/testcairo.c                                  |    6 +-
 tests/testellipsise.c                              |   19 +-
 tests/testframe.c                                  |   11 +-
 tests/testgtk.c                                    |  215 +-
 tests/testheightforwidth.c                         |    4 +-
 tests/testiconview-keynav.c                        |    8 +-
 tests/testinput.c                                  |   25 +-
 tests/testoffscreen.c                              |    4 +-
 tests/testoffscreenwindow.c                        |    2 +-
 tests/testselection.c                              |    2 +-
 tests/testsocket.c                                 |    6 +-
 tests/testsocket_common.c                          |    6 +-
 tests/testtooltips.c                               |   13 +-
 tests/testwindows.c                                |   13 +-
 tests/testwrapbox.c                                |  547 ++
 tests/testxinerama.c                               |    2 +-
 314 files changed, 23769 insertions(+), 37193 deletions(-)
---
diff --cc gtk/gtkscrolledwindow.c
index e769fdf,2e26646..e3ccbed
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@@ -1747,30 -1759,36 +1761,31 @@@ gtk_scrolled_window_size_request_init (
    iface->get_width_for_height = gtk_scrolled_window_get_width_for_height;
  }
  
 -static void
 -gtk_scrolled_window_get_size (GtkSizeRequest *widget,
 -			      GtkOrientation  orientation,
 -			      gint           *minimum_size,
 -			      gint           *natural_size)
 +static void     
 +gtk_scrolled_window_get_width (GtkSizeRequest      *widget,
 +			       gint                   *minimum_size,
 +			       gint                   *natural_size)
  {
 +
    GtkScrolledWindow *scrolled_window;
 -  GtkBin *bin;
 -  gint extra_width;
 -  gint extra_height;
 -  gint scrollbar_spacing;
    GtkRequisition hscrollbar_requisition;
    GtkRequisition vscrollbar_requisition;
 -  GtkRequisition minimum_req, natural_req;
+   GtkStyle *style;
    GtkWidget *child;
 +  gint min_width, nat_width;
    gint min_child_size, nat_child_size;
 -  guint border_width;
 +  gint extra_width, border_width;
 +  gint scrollbar_spacing;
  
    scrolled_window = GTK_SCROLLED_WINDOW (widget);
 -  bin = GTK_BIN (scrolled_window);
 +  child = gtk_bin_get_child (GTK_BIN (scrolled_window));
  
    scrollbar_spacing = _gtk_scrolled_window_get_scrollbar_spacing (scrolled_window);
 +  border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
  
    extra_width = 0;
 -  extra_height = 0;
 -  minimum_req.width = 0;
 -  minimum_req.height = 0;
 -  natural_req.width = 0;
 -  natural_req.height = 0;
 +  min_width = 0;
 +  nat_width = 0;
    
    gtk_widget_size_request (scrolled_window->hscrollbar,
  			   &hscrollbar_requisition);
@@@ -1825,14 -1882,35 +1840,15 @@@
  
    if (scrolled_window->shadow_type != GTK_SHADOW_NONE)
      {
-       min_width += 2 * GTK_WIDGET (widget)->style->xthickness;
-       nat_width += 2 * GTK_WIDGET (widget)->style->xthickness;
+       style = gtk_widget_get_style (GTK_WIDGET (widget));
 -      minimum_req.width += 2 * style->xthickness;
 -      minimum_req.height += 2 * style->ythickness;
 -      natural_req.width += 2 * style->xthickness;
 -      natural_req.height += 2 * style->ythickness;
++      min_width += 2 * style->xthickness;
++      nat_width += 2 * style->xthickness;
      }
  
 -  if (orientation == GTK_ORIENTATION_HORIZONTAL)
 -    {
 -      if (minimum_size)
 -	*minimum_size = minimum_req.width;
 -      if (natural_size)
 -	*natural_size = natural_req.width;
 -    }
 -  else
 -    {
 -      if (minimum_size)
 -	*minimum_size = minimum_req.height;
 -      if (natural_size)
 -	*natural_size = natural_req.height;
 -    }
 -}
 -
 -static void     
 -gtk_scrolled_window_get_width (GtkSizeRequest      *widget,
 -			       gint                   *minimum_size,
 -			       gint                   *natural_size)
 -{
 -  gtk_scrolled_window_get_size (widget, GTK_ORIENTATION_HORIZONTAL, minimum_size, natural_size);
 +  if (minimum_size)
 +    *minimum_size = min_width;
 +  if (natural_size)
 +    *natural_size = nat_width;
  }
  
  static void
@@@ -1840,86 -1918,7 +1856,88 @@@ gtk_scrolled_window_get_height (GtkSize
  				gint                *minimum_size,
  				gint                *natural_size)
  {  
 -  gtk_scrolled_window_get_size (widget, GTK_ORIENTATION_VERTICAL, minimum_size, natural_size);
 +  GtkScrolledWindow *scrolled_window;
 +  GtkRequisition hscrollbar_requisition;
 +  GtkRequisition vscrollbar_requisition;
 +  GtkWidget *child;
++  GtkStyle *style;
 +  gint min_height, nat_height;
 +  gint min_child_size, nat_child_size;
 +  gint extra_height, border_width;
 +  gint scrollbar_spacing;
 +
 +  scrolled_window = GTK_SCROLLED_WINDOW (widget);
 +  child = gtk_bin_get_child (GTK_BIN (scrolled_window));
 +
 +  scrollbar_spacing = _gtk_scrolled_window_get_scrollbar_spacing (scrolled_window);
 +  border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
 +
 +  extra_height = 0;
 +  min_height = 0;
 +  nat_height = 0;
 +  
 +  gtk_widget_size_request (scrolled_window->hscrollbar,
 +			   &hscrollbar_requisition);
 +  gtk_widget_size_request (scrolled_window->vscrollbar,
 +			   &vscrollbar_requisition);
 +  
 +  if (child && gtk_widget_get_visible (child))
 +    {
 +      gtk_size_request_get_height (GTK_SIZE_REQUEST (child),
 +				   &min_child_size,
 +				   &nat_child_size);
 +      
 +      if (scrolled_window->vscrollbar_policy == GTK_POLICY_NEVER)
 +	{
 +	  min_height += min_child_size;
 +	  nat_height += nat_child_size;
 +	}
 +      else
 +	{
 +	  GtkWidgetAuxInfo *aux_info = _gtk_widget_get_aux_info (child, FALSE);
 +	  
 +	  if (aux_info && aux_info->height > 0)
 +	    {
 +	      min_height += aux_info->height;
 +	      nat_height += aux_info->height;
 +	      extra_height = -1;
 +	    }
 +	  else
 +	    {
 +	      min_height += hscrollbar_requisition.height;
 +	      nat_height += hscrollbar_requisition.height;
 +	    }
 +	}
 +    }
 +
 +  if (scrolled_window->hscrollbar_policy == GTK_POLICY_AUTOMATIC ||
 +      scrolled_window->hscrollbar_policy == GTK_POLICY_ALWAYS)
 +    {
 +      if (!extra_height || scrolled_window->hscrollbar_policy == GTK_POLICY_ALWAYS)
 +	extra_height = scrollbar_spacing + hscrollbar_requisition.height;
 +    }
 +
 +  if (scrolled_window->vscrollbar_policy == GTK_POLICY_AUTOMATIC ||
 +      scrolled_window->vscrollbar_policy == GTK_POLICY_ALWAYS)
 +    {
 +      min_height = MAX (min_height, vscrollbar_requisition.height);
 +      nat_height = MAX (nat_height, vscrollbar_requisition.height);
 +    }
 +
 +  min_height += border_width * 2 + MAX (0, extra_height);
 +  nat_height += border_width * 2 + MAX (0, extra_height);
 +
 +  if (scrolled_window->shadow_type != GTK_SHADOW_NONE)
 +    {
-       min_height += 2 * GTK_WIDGET (widget)->style->ythickness;
-       nat_height += 2 * GTK_WIDGET (widget)->style->ythickness;
++      style = gtk_widget_get_style (GTK_WIDGET (widget));
++      min_height += 2 * style->ythickness;
++      nat_height += 2 * style->ythickness;
 +    }
 +
 +  if (minimum_size)
 +    *minimum_size = min_height;
 +  if (natural_size)
 +    *natural_size = nat_height;
  }
  
  static void
diff --cc tests/testheightforwidth.c
index bc16452,5bac79f..26e9ea8
--- a/tests/testheightforwidth.c
+++ b/tests/testheightforwidth.c
@@@ -912,360 -912,6 +912,360 @@@ TestInterface interfaces[] = 
      "</interface>",
      NULL
    },
 +
 +  {
 +    "Ellipsizing Treeview",
 +    "Demonstrates how natural size can be shared across treeview columns and renderers.",
 +    "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
 +    "<interface>"
 +    "  <requires lib=\"gtk+\" version=\"2.20\"/>"
 +    "  <!-- interface-naming-policy project-wide -->"
 +    "  <object class=\"GtkWindow\" id=\"window\">"
 +    "    <property name=\"default_width\">500</property>"
 +    "    <child>"
 +    "      <object class=\"GtkHPaned\" id=\"hpaned1\">"
 +    "        <property name=\"visible\">True</property>"
 +    "        <property name=\"can_focus\">True</property>"
 +    "        <property name=\"position\">400</property>"
 +    "        <child>"
 +    "          <object class=\"GtkTreeView\" id=\"treeview1\">"
 +    "            <property name=\"visible\">True</property>"
 +    "            <property name=\"can_focus\">True</property>"
 +    "            <property name=\"model\">liststore1</property>"
 +    "            <property name=\"headers_clickable\">False</property>"
 +    "            <property name=\"search_column\">0</property>"
 +    "            <child>"
 +    "              <object class=\"GtkTreeViewColumn\" id=\"treeviewcolumn1\">"
 +    "                <property name=\"sizing\">autosize</property>"
 +    "                <property name=\"title\" translatable=\"yes\">#1</property>"
 +    "                <property name=\"expand\">True</property>"
 +    "                <child>"
 +    "                  <object class=\"GtkCellRendererText\" id=\"cellrenderertext1\">"
 +    "                    <property name=\"ellipsize\">end</property>"
 +    "                  </object>"
 +    "                  <attributes>"
 +    "                    <attribute name=\"text\">0</attribute>"
 +    "                  </attributes>"
 +    "                </child>"
 +    "                <child>"
 +    "                  <object class=\"GtkCellRendererPixbuf\" id=\"cellrendererpixbuf1\"/>"
 +    "                  <attributes>"
 +    "                    <attribute name=\"icon-name\">1</attribute>"
 +    "                  </attributes>"
 +    "                </child>"
 +    "              </object>"
 +    "            </child>"
 +    "            <child>"
 +    "              <object class=\"GtkTreeViewColumn\" id=\"treeviewcolumn2\">"
 +    "                <property name=\"sizing\">autosize</property>"
 +    "                <property name=\"title\" translatable=\"yes\">#2</property>"
 +    "                <property name=\"expand\">True</property>"
 +    "                <child>"
 +    "                  <object class=\"GtkCellRendererPixbuf\" id=\"cellrendererpixbuf2\"/>"
 +    "                  <attributes>"
 +    "                    <attribute name=\"icon-name\">1</attribute>"
 +    "                  </attributes>"
 +    "                </child>"
 +    "                <child>"
 +    "                  <object class=\"GtkCellRendererText\" id=\"cellrenderertext2\">"
 +    "                    <property name=\"ellipsize\">start</property>"
 +    "                  </object>"
 +    "                  <attributes>"
 +    "                    <attribute name=\"text\">2</attribute>"
 +    "                  </attributes>"
 +    "                </child>"
 +    "                <child>"
 +    "                  <object class=\"GtkCellRendererText\" id=\"cellrenderertext3\">"
 +    "                    <property name=\"ellipsize\">end</property>"
 +    "                  </object>"
 +    "                  <attributes>"
 +    "                    <attribute name=\"text\">3</attribute>"
 +    "                  </attributes>"
 +    "                </child>"
 +    "              </object>"
 +    "            </child>"
 +    "          </object>"
 +    "          <packing>"
 +    "            <property name=\"resize\">False</property>"
 +    "            <property name=\"shrink\">False</property>"
 +    "          </packing>"
 +    "        </child>"
 +    "        <child>"
 +    "          <object class=\"GtkLabel\" id=\"label1\">"
 +    "            <property name=\"visible\">True</property>"
 +    "            <property name=\"label\" translatable=\"yes\">static\n"
 +    "text\n"
 +    "here</property>"
 +    "          </object>"
 +    "          <packing>"
 +    "            <property name=\"resize\">True</property>"
 +    "            <property name=\"shrink\">False</property>"
 +    "          </packing>"
 +    "        </child>"
 +    "      </object>"
 +    "    </child>"
 +    "  </object>"
 +    "  <object class=\"GtkListStore\" id=\"liststore1\">"
 +    "    <columns>"
 +    "      <!-- column-name first-text -->"
 +    "      <column type=\"gchararray\"/>"
 +    "      <!-- column-name icon-name -->"
 +    "      <column type=\"gchararray\"/>"
 +    "      <!-- column-name second-text -->"
 +    "      <column type=\"gchararray\"/>"
 +    "      <!-- column-name third-text -->"
 +    "      <column type=\"gchararray\"/>"
 +    "    </columns>"
 +    "    <data>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">both columns</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-ok</col>"
 +    "        <col id=\"2\" translatable=\"yes\">this</col>"
 +    "        <col id=\"3\" translatable=\"yes\">this</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">contain ellipsizing cell renderers</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-cancel</col>"
 +    "        <col id=\"2\" translatable=\"yes\">renderer</col>"
 +    "        <col id=\"3\" translatable=\"yes\">renderer</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">to demonstrate natural</col>"
-     "        <col id=\"1\" translatable=\"yes\">gtk-info</col>"
++    "        <col id=\"1\" translatable=\"yes\">gtk-execute</col>"
 +    "        <col id=\"2\" translatable=\"yes\">is not</col>"
 +    "        <col id=\"3\" translatable=\"yes\">can</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">distribution of size</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-apply</col>"
 +    "        <col id=\"2\" translatable=\"yes\">wide</col>"
 +    "        <col id=\"3\" translatable=\"yes\">be</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">across columns</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-dialog-warning</col>"
 +    "        <col id=\"2\" translatable=\"yes\">at all</col>"
 +    "        <col id=\"3\" translatable=\"yes\">wide because of this long text.</col>"
 +    "      </row>"
 +    "    </data>"
 +    "  </object>"
 +    "</interface>",
 +    NULL
 +  },
 +
 +  {
 +    "Wrapping Treeview",
 +    "Demonstrates how treeviews can recalculate row heights based on allocated widths.",
 +    "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
 +    "<interface>"
 +    "  <requires lib=\"gtk+\" version=\"2.20\"/>"
 +    "  <!-- interface-naming-policy project-wide -->"
 +    "  <object class=\"GtkListStore\" id=\"liststore1\">"
 +    "    <columns>"
 +    "      <!-- column-name first-text -->"
 +    "      <column type=\"gchararray\"/>"
 +    "      <!-- column-name icon-name -->"
 +    "      <column type=\"gchararray\"/>"
 +    "      <!-- column-name second-text -->"
 +    "      <column type=\"gchararray\"/>"
 +    "      <!-- column-name third-text -->"
 +    "      <column type=\"gchararray\"/>"
 +    "    </columns>"
 +    "    <data>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">both columns contain word-wrapping</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-ok</col>"
 +    "        <col id=\"2\" translatable=\"yes\">this</col>"
 +    "        <col id=\"3\" translatable=\"yes\">this</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">cell renderers</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-cancel</col>"
 +    "        <col id=\"2\" translatable=\"yes\">renderer</col>"
 +    "        <col id=\"3\" translatable=\"yes\">renderer</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">to demonstrate height-for-width</col>"
-     "        <col id=\"1\" translatable=\"yes\">gtk-info</col>"
++    "        <col id=\"1\" translatable=\"yes\">gtk-execute</col>"
 +    "        <col id=\"2\" translatable=\"yes\">is not</col>"
 +    "        <col id=\"3\" translatable=\"yes\">can</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">trading</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-apply</col>"
 +    "        <col id=\"2\" translatable=\"yes\">wide</col>"
 +    "        <col id=\"3\" translatable=\"yes\">be</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">for individual rows</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-dialog-warning</col>"
 +    "        <col id=\"2\" translatable=\"yes\">at all</col>"
 +    "        <col id=\"3\" translatable=\"yes\">wide because of this long text.</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">---------------</col>"
 +    "        <col id=\"1\" translatable=\"yes\"></col>"
 +    "        <col id=\"2\" translatable=\"yes\">-------</col>"
 +    "        <col id=\"3\" translatable=\"yes\">-------------</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">here we add some</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-bold</col>"
 +    "        <col id=\"2\" translatable=\"yes\">more</col>"
 +    "        <col id=\"3\" translatable=\"yes\">lets put some more</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">more text just</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-execute</col>"
 +    "        <col id=\"2\" translatable=\"yes\">and</col>"
 +    "        <col id=\"3\" translatable=\"yes\">text in all these</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">to show the scrolled window</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-add</col>"
 +    "        <col id=\"2\" translatable=\"yes\">more</col>"
 +    "        <col id=\"3\" translatable=\"yes\">columns</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">resizing and scrolling</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-remove</col>"
 +    "        <col id=\"2\" translatable=\"yes\">text</col>"
 +    "        <col id=\"3\" translatable=\"yes\">damn there are alot</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">more and more</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-copy</col>"
 +    "        <col id=\"2\" translatable=\"yes\">here</col>"
 +    "        <col id=\"3\" translatable=\"yes\">of columns to fill</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">text to enter</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-paste</col>"
 +    "        <col id=\"2\" translatable=\"yes\">more</col>"
 +    "        <col id=\"3\" translatable=\"yes\">in this liststore !</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">bla bla bla...</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-edit</col>"
 +    "        <col id=\"2\" translatable=\"yes\">text</col>"
 +    "        <col id=\"3\" translatable=\"yes\">ok here it comes</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">almost getting to the last column here</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-italic</col>"
 +    "        <col id=\"2\" translatable=\"yes\">more</col>"
 +    "        <col id=\"3\" translatable=\"yes\">its getting closer</col>"
 +    "      </row>"
 +    "      <row>"
 +    "        <col id=\"0\" translatable=\"yes\">stop its the last row !</col>"
 +    "        <col id=\"1\" translatable=\"yes\">gtk-save</col>"
 +    "        <col id=\"2\" translatable=\"yes\">text</col>"
 +    "        <col id=\"3\" translatable=\"yes\">and tada we reached the last damn row</col>"
 +    "      </row>"
 +    "    </data>"
 +    "  </object>"
 +    "  <object class=\"GtkWindow\" id=\"window\">"
 +    "    <property name=\"default_width\">700</property>"
 +    "    <property name=\"default_height\">400</property>"
 +    "    <child>"
 +    "      <object class=\"GtkHPaned\" id=\"hpaned1\">"
 +    "        <property name=\"visible\">True</property>"
 +    "        <property name=\"can_focus\">True</property>"
 +    "        <property name=\"position\">400</property>"
 +    "        <child>"
 +    "          <object class=\"GtkScrolledWindow\" id=\"scrolledwindow1\">"
 +    "            <property name=\"visible\">True</property>"
 +    "            <property name=\"can_focus\">True</property>"
 +    "            <property name=\"hscrollbar_policy\">automatic</property>"
 +    "            <property name=\"vscrollbar_policy\">automatic</property>"
 +    "            <property name=\"shadow_type\">in</property>"
 +    "            <child>"
 +    "              <object class=\"GtkTreeView\" id=\"treeview1\">"
 +    "                <property name=\"visible\">True</property>"
 +    "                <property name=\"can_focus\">True</property>"
 +    "                <property name=\"model\">liststore1</property>"
 +    "                <property name=\"headers_clickable\">False</property>"
 +    "                <property name=\"search_column\">0</property>"
 +    "                <child>"
 +    "                  <object class=\"GtkTreeViewColumn\" id=\"treeviewcolumn1\">"
 +    "                    <property name=\"sizing\">autosize</property>"
 +    "                    <property name=\"title\" translatable=\"yes\">#1</property>"
 +    "                    <property name=\"expand\">True</property>"
 +    "                    <child>"
 +    "                      <object class=\"GtkCellRendererText\" id=\"cellrenderertext1\">"
 +    "                        <property name=\"width_chars\">10</property>"
 +    "                        <property name=\"wrap_mode\">word</property>"
 +    "                        <property name=\"wrap_width\">300</property>"
 +    "                      </object>"
 +    "                      <attributes>"
 +    "                        <attribute name=\"text\">0</attribute>"
 +    "                      </attributes>"
 +    "                    </child>"
 +    "                    <child>"
 +    "                      <object class=\"GtkCellRendererPixbuf\" id=\"cellrendererpixbuf1\"/>"
 +    "                      <attributes>"
 +    "                        <attribute name=\"icon-name\">1</attribute>"
 +    "                      </attributes>"
 +    "                    </child>"
 +    "                  </object>"
 +    "                </child>"
 +    "                <child>"
 +    "                  <object class=\"GtkTreeViewColumn\" id=\"treeviewcolumn2\">"
 +    "                    <property name=\"sizing\">autosize</property>"
 +    "                    <property name=\"title\" translatable=\"yes\">#2</property>"
 +    "                    <property name=\"expand\">True</property>"
 +    "                    <child>"
 +    "                      <object class=\"GtkCellRendererPixbuf\" id=\"cellrendererpixbuf2\"/>"
 +    "                      <attributes>"
 +    "                        <attribute name=\"icon-name\">1</attribute>"
 +    "                      </attributes>"
 +    "                    </child>"
 +    "                    <child>"
 +    "                      <object class=\"GtkCellRendererText\" id=\"cellrenderertext2\">"
 +    "                        <property name=\"ellipsize\">start</property>"
 +    "                      </object>"
 +    "                      <attributes>"
 +    "                        <attribute name=\"text\">2</attribute>"
 +    "                      </attributes>"
 +    "                    </child>"
 +    "                    <child>"
 +    "                      <object class=\"GtkCellRendererText\" id=\"cellrenderertext3\">"
 +    "                        <property name=\"width_chars\">10</property>"
 +    "                        <property name=\"wrap_mode\">word</property>"
 +    "                        <property name=\"wrap_width\">300</property>"
 +    "                      </object>"
 +    "                      <attributes>"
 +    "                        <attribute name=\"text\">3</attribute>"
 +    "                      </attributes>"
 +    "                    </child>"
 +    "                  </object>"
 +    "                </child>"
 +    "              </object>"
 +    "            </child>"
 +    "          </object>"
 +    "          <packing>"
 +    "            <property name=\"resize\">False</property>"
 +    "            <property name=\"shrink\">False</property>"
 +    "          </packing>"
 +    "        </child>"
 +    "        <child>"
 +    "          <object class=\"GtkLabel\" id=\"label1\">"
 +    "            <property name=\"visible\">True</property>"
 +    "            <property name=\"label\" translatable=\"yes\">static\n"
 +    "text\n"
 +    "here\n</property>"
 +    "          </object>"
 +    "          <packing>"
 +    "            <property name=\"resize\">True</property>"
 +    "            <property name=\"shrink\">False</property>"
 +    "          </packing>"
 +    "        </child>"
 +    "      </object>"
 +    "    </child>"
 +    "  </object>"
 +    "</interface>",
 +    NULL
 +  },
    
  };
  



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]