Commit Graph

102 Commits

Author SHA1 Message Date
Tristan Van Berkom
edd57602b8 Mass api change from GtkExtendedLayout --> GtkSizeRequest
This commit makes a few massive changes to the extended layout
code:
  a.) gtkextendedlayout.c --> gtksizerequest.c
  b.) _is_height_for_width --> get_request_mode()
  c.) get_desired_size(), get_desired_width(), get_desired_height() -->
      get_size(), get_width(), get_height()

This is the first partial commit and only effects portions
of the tree that have already been merged in master (in order to
easily cherry pick this commit).

Conflicts:

	gtk/Makefile.am
	gtk/gtk.h
	gtk/gtk.symbols
	gtk/gtkextendedlayout.h
2010-06-18 00:11:26 -04:00
Tristan Van Berkom
1b2e9124f0 Fixed negative allocations from gtk_box_size_allocate()
Fixed the allocation loop to check if it was allocated at least
enough space to hold its visible children before going and distributing
extra space among children. Fixes bgo #617444.
2010-06-15 14:27:12 -04:00
Matthias Clasen
294f810021 Docmentation improvements
Don't mention removed _defaults functions in the docs, also try
to clarify the situation around fill and expand defaults.
2010-06-15 01:23:30 -04:00
Matthias Clasen
700196f71e Update documentation for orientables
Don't document these as abstract anymore, since they are now
instantiatable.
2010-06-03 01:18:42 -04:00
Matthias Clasen
654bb6ca66 Simple typo fix 2010-05-30 02:17:51 -04:00
Matthias Clasen
b4e2ff3da3 Make orientable base classes instantiable
This commit adds constructors for GtkPaned, GtkBox, GtkButtonBox,
GtkRuler, GtkScale, GtkScrollbar and GtkSeparator and makes these
types instantiable.
2010-05-25 18:55:15 -04:00
Christian Dywan
0d7d1ae8dc Remove deprecated functions from GtkBox 2010-05-03 01:39:49 +02:00
Javier Jardón
0d85671bc9 Fix some compilation warnings 2010-05-01 03:52:03 +02:00
Matthias Clasen
db76c77b81 Merge branch 'native-layout-incubator'
Conflicts:
	configure.in
	docs/reference/gtk/tmpl/gtkaction.sgml
	docs/reference/gtk/tmpl/gtkbuilder.sgml
	gdk/directfb/gdkkeys-directfb.c
	gdk/gdk.symbols
	gdk/x11/gdkwindow-x11.c
	gtk/gtkalignment.c
	gtk/gtkbox.c
	gtk/gtkbutton.c
	gtk/gtkcelleditable.c
	gtk/gtkfilechooser.c
	gtk/gtkframe.c
	gtk/gtkinvisible.c
	gtk/gtklabel.c
	gtk/gtkscrolledwindow.c
	gtk/gtksearchenginetracker.c
	gtk/gtktextview.c
	gtk/gtktoolbutton.c
	gtk/gtktooltip.c
	gtk/gtkviewport.c
	gtk/gtkwidget.c
	gtk/gtkwindow.c
	po-properties/ca@valencia.po
	po-properties/es.po
	po-properties/kn.po
	po-properties/mr.po
	po/ca.po
	po/ca@valencia.po
	po/el.po
	po/es.po
	po/gl.po
	po/id.po
	po/kn.po
	po/lv.po
	po/mr.po
	po/th.po
2010-04-30 17:56:50 -04:00
Tadej Borovšak
ef4e7b2473 Move documentation to inline comments: GtkBox
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611742

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-28 18:41:33 +02:00
Matthias Clasen
f285ed1348 Treat h and v boxes the same way
...we've got the money!
2010-04-25 17:12:15 -04:00
Matthias Clasen
ff0eb03201 Fix a regression in RTL flipping
This was only showing up with pack-end packing in horizontal boxes.
The RTL flipping has to be applied after moving the reference point
to the left edge of the child.
2010-04-25 16:23:01 -04:00
Tristan Van Berkom
9306a73dfd Added documentation, implemented gtk_extended_layout_is_height_for_width() where needed. 2010-04-21 01:32:55 -04:00
Tristan Van Berkom
35cc52f418 Compute the collective heights for the width of a horizontal box.
Introduce an algorithm to allocate children some virtual widths based on
their base widths returned by ->get_desired_width(), then return the
collective desired heights for each or thier virtually allocated width.

This will only work in the horizontal orientation.
2010-04-18 18:09:40 -04:00
Tristan Van Berkom
d2c35ec62a Mega commit to change ->get_desired_size() for ->get_desired_width/height().
This commit changes gtk_extended_layout_get_desired_size() for
per dimension variants. Furthermore this commit reverts the actions
done in size-groups for now as it needs a different approach.

The natural width/height parameters added to aux_info have been changed
for a per width cache for heights and a per height cache for widths.

gtk-demo is still working, currently sizegroups are not taken
into account as mentioned above - size groups need to be alerted both
when the widths and heights are updated independantly and then that
information needs to repropagate also to other extended layout implementors.
2010-04-12 22:21:46 -04:00
Tristan Van Berkom
6b89f05a99 Implemented gtk_extended_layout_is_height_for_width() and added another guess algorithm
This patch adds another commented algorythm to find the collective
minimum and natural height for a said width of a horizontally oriented
box (or the opposite). The algorithm works quite well and can be optimized
a bit more - currently its commented because GtkLabel cannot effectively
do width-for-height calculations (doh).

Further, this patch returns an is_height_for_width() preference depending
on the boxes orientation (vertical boxes are width-for-height).
2010-04-10 22:39:11 -04:00
Tristan Van Berkom
1041a186c7 Added get_height_for_width/get_width_for_height implementation to GtkBox.
In order for natural size information to cascade correctly up through
the ancestry GtkBox needs to report height-for-width and width-for-height,
this patch includes an implementation for both in both orientations, one
of them is commented for now as its much too cpu intensive to actually use.
2010-04-09 21:50:33 -04:00
Tristan Van Berkom
7304e4227f Fixed gtk_box_size_allocate() for homogeneous boxes
gtk_box_size_allocate() was forgetting to fetch the minimum
size for children when allocating in homogeneous mode and then
accessing the uninitialized allocated values in that case, fixed.
2010-04-08 21:45:07 -04:00
Tristan Van Berkom
68c38e0ffd Fixed classes to call gtk_extended_layout_get_desired_size_again()
The previous patch removes the ambiguous gtk_widget_get_desired_size().
2010-04-06 02:55:07 -04:00
Tristan Van Berkom
24ed2f8aa1 Fixed 2 bugs in gtk_box_size_allocate()
This commit fixes the loop to take into consideration the
child->padding that will be allocated to the child while calculating
full available size. Additionally it fixes the initial positioning
of child widgets when packed at the end (a special case because the
x position used starts from the end of the box).
2010-04-05 18:01:56 -04:00
Tristan Van Berkom
ae2c0b02c3 Refixed merge conflicts for GTK_WIDGET_MAPPED/GTK_WIDGET_VISIBLE 2010-04-03 21:35:18 -04:00
Javier Jardón
e2f79c33ff Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_NO_WINDOW)
Use new API instead: gtk_widget_set_has_window ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:59:02 -04:00
Javier Jardón
edc65ce1d2 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:20 -04:00
Javier Jardón
24bafd8693 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_NO_WINDOW)
Use new API instead: gtk_widget_set_has_window ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-06 11:37:06 +01:00
Javier Jardón
214a023e91 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 07:52:07 +01:00
Johannes Schmid
24c1a4f24b native-layout: Fix typo that brakes layout completely 2009-12-14 17:16:21 +01:00
Johannes Schmid
9724366289 native-layout: Don't expose extra gtk_widget_* function that are similar to the GtkExtendedLayout interface 2009-12-14 16:28:56 +01:00
Johannes Schmmid
e08d04b561 native-layout: Introduce GtkExtendedLayout interface. 2009-12-14 15:32:49 +01:00
Tim Janik
aa70a0a619 gtk/gtkbox.c: fixed type declaration.
svn path=/trunk/; revision=21600
2008-10-07 09:32:20 +00:00
11:03:30 Tim Janik
ddd556aff4 keep GtkBox as an abstract type and keep _gtk_box_new() as private
2008-10-07 11:03:30  Tim Janik  <timj@imendio.com>

        * gtk/gtkbox.h: keep GtkBox as an abstract type and keep _gtk_box_new()
        as private function until we settle on the exact semantics.
        renamed _gtk_box_set_old_defaults() as suggested by Mitch.


svn path=/trunk/; revision=21599
2008-10-07 09:07:27 +00:00
Michael Natterer
a23bb3bf88 reindent static prototypes.
2008-10-07  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbox.c: reindent static prototypes.


svn path=/trunk/; revision=21598
2008-10-07 07:50:04 +00:00
Michael Natterer
97a9867c9f Bug 553573 – Add orientation API to GtkBox
2008-10-07  Michael Natterer  <mitch@imendio.com>

	Bug 553573 – Add orientation API to GtkBox

	* gtk/gtkbox.[hh]: implement the GtkOrientable interface and
	swallow all code from GtkHBox and GtkVBox. Add gtk_box_new()
	which takes a GtkOrientation argument. Also move the newly
	added "spacing_set" boolean from struct GtkBox to the new
	private struct.

	* gtk/gtkhbox.[ch]
	* gtk/gtkvbox.[ch]: remove all code except the constructor and
	call gtk_orientable_set_orientation() in init().

	* gtk/gtk.symbols: add gtk_box_new().


svn path=/trunk/; revision=21596
2008-10-07 07:44:06 +00:00
Christian Dywan
3a872a3c42 Bug 408244 – add GtkDialog::content-area-spacing
* gtk/gtkbox.c (gtk_box_init), (gtk_box_set_spacing),
(_gtk_box_set_spacing_set), (_gtk_box_get_spacing_set):
* gtk/gtkbox.h:
* gtk/gtkdialog.c (gtk_dialog_class_init), (update_spacings):
Implement "content-area-spacing" style property in GtkDialog
and internal helper _gtk_box_get_spacing_set in GtkBox.
Patch by Tim Janik, Sven Herzberg and myself.

svn path=/trunk/; revision=21508
2008-09-24 08:41:46 +00:00
Michael Natterer
8a1bdcbe4a use gtk_box_pack_start() instead of the deprecated
2008-07-21  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbox.c (gtk_box_add): use gtk_box_pack_start() instead of
	the deprecated gtk_box_pack_start_defaults().

	* gtk/gtkbindings.c (gtk_binding_entry_add_signal)
	(gtk_binding_parse_signal): use _gtk_binding_entry_add_signall()
	instead of the deprecated gtk_binding_entry_add_signall().


svn path=/trunk/; revision=20885
2008-07-21 14:35:51 +00:00
Matthias Clasen
36f5e8d776 Deprecate gtk_box_pack_{start,end}_defaults
svn path=/trunk/; revision=20786
2008-07-06 04:46:36 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Mikael Hallendal
ff7f25c9af Removed accidental empty row in gtk_box_pack.
2008-06-27  Mikael Hallendal  <micke@imendio.com>

	* gtk/gtkbox.c (gtk_box_pack): Removed accidental empty row.

svn path=/trunk/; revision=20701
2008-06-28 16:21:28 +00:00
Mikael Hallendal
257ca7ef7d Factor out gtk_box_pack from gtk_box_pack_start and gtk_box_pack_end to reduce code duplication.
2008-06-27  Mikael Hallendal  <micke@imendio.com>

        * gtk/gtkbox.c (gtk_box_pack, gtk_box_pack_start, gtk_box_pack_end):
        Factored out gtk_box_pack from gtk_box_pack_start and use it from both
        pack_start and pack_end in order to reduce the code duplication.

svn path=/trunk/; revision=20700
2008-06-28 16:16:26 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Michael Natterer
d95069aa1f gtk/gtkaction.c gtk/gtkassistant.c gtk/gtkbin.c gtk/gtkbox.c
2008-02-07  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkaction.c
	* gtk/gtkassistant.c
	* gtk/gtkbin.c
	* gtk/gtkbox.c
	* gtk/gtkcalendar.c
	* gtk/gtkcellrenderercombo.c
	* gtk/gtkcombobox.c
	* gtk/gtkcombo.c
	* gtk/gtkdrawingarea.c
	* gtk/gtkentrycompletion.c
	* gtk/gtkfixed.h
	* gtk/gtkgamma.c
	* gtk/gtkhpaned.c
	* gtk/gtkiconview.c
	* gtk/gtkitem.c
	* gtk/gtkitemfactory.c: remove g_return_if_fail() from private
	functions and virtual function implementations.


svn path=/trunk/; revision=19491
2008-02-07 15:50:39 +00:00
Matthias Clasen
08cc834061 Update docs Deprecate gtk_widget_{ref,unref}
2007-06-09  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkwidget.c:
        * gtk/gtkscrolledwindow.c: Update docs
        * gtk/gtkwidget.h: Deprecate gtk_widget_{ref,unref}

        * gtk/tmpl/gtkbindings.sgml:
        * gtk/tmpl/gtkrc.sgml:
        * gtk/tmpl/gtkwidget.sgml:
        * gtk/tmpl/gtkrecentmanager.sgml:
        * gtk/*.sgml:
        * gtk/tmpl/gtkstock.sgml:
        * gtk/gtk-sections.txt: Updates



svn path=/trunk/; revision=18090
2007-06-10 06:52:51 +00:00
Matthias Clasen
19f4715cee Some doc updates
svn path=/trunk/; revision=18089
2007-06-10 02:53:17 +00:00
Matthias Clasen
b80b526080 Require gtk-doc 1.6, for signal and property links.
2007-05-26  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Require gtk-doc 1.6, for signal and property links.
        * gtk/gtkbox.c:
        * gtk/gtkbutton.c:
        * gtk/gtkcontainer.c:
        * gtk/gtkdialog.c:
        * gtk/gtkentry.c:
        * gtk/gtkimage.c:
        * gtk/gtklabel.c:
        * gtk/gtkmisc.c:
        * gtk/gtksettings.c:
        * gtk/gtkwidget.c: Documentation improvements, link signals
        and properties where it makes sense.

svn path=/trunk/; revision=17924
2007-05-26 06:59:36 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Matthias Clasen
94eec04267 Intern some more strings.
2005-09-01  Matthias Clasen  <mclasen@redhat.com>

        * gdk/*.c: Intern some more strings.
        * gtk/gtkintl.h:
        * gtk/*.c: Define an I_() macro and use it instead of the
        bulky g_intern_static_string().
2005-09-01 05:11:46 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/Makefile.am:
	* gtk/Makefile.am: Intern type names in code generated by
	glib-mkenums, too.

	* gtk/*.c:
	* gdk/x11/*.c:
	* gdk/*.c: Intern type names before registering the type to avoid
	unnecessary copies.
2005-08-31 16:53:43 +00:00
Matthias Clasen
4c28ce0877 Use canonical names for g_object_notify() as well.
2005-03-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c:
	* gdk/gdkdisplaymanager.c:
	Use canonical names for g_object_notify() as well.
2005-03-26 05:49:15 +00:00
Matthias Clasen
269d89c79c Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
	GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like
	their G_ counterparts, but also mark the name, nick
	and blurb as static.

	* gtk/*.c: Mark param spec strings as static, using
	the new macros.
2005-03-22 02:14:55 +00:00