Commit Graph

316 Commits

Author SHA1 Message Date
Javier Jardón
1934de4b65 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_REALIZED)
Use new API instead: gtk_widget_set_realized ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-06 11:51:33 +01: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
16a59ad912 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:41:05 +01:00
Javier Jardón
1fe7d3cefd Deprecate widget flag: GTK_WIDGET_MAPPED
Use gtk_widget_get_mapped() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:19:03 +01:00
Javier Jardón
483a5a9e1a Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_CAN_FOCUS)
Use new API instead: gtk_widget_set_can_focus ()
2010-03-02 04:42:54 +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
Javier Jardón
4232115e22 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

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

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 05:32:51 +01:00
Javier Jardón
4f78f70b15 Deprecate widget flag: GTK_WIDGET_DRAWABLE
Use gtk_widget_is_drawable() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 04:55:55 +01:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02:00
Matthias Clasen
833b9b42cc Fix a redraw problem with action widgets
Fixes bug 603245.
2010-01-18 17:06:48 -05:00
Matthias Clasen
d253fb5140 Fix some issues with action widgets
We need to hide/show them depending on show_tabs, and we should
not grow the notebooks requisition unless we have to. Reported
in bug 601412.
2010-01-18 01:20:50 -05:00
Javier Jardón
f1676cfb11 [docs] Use the correct GTK-doc syntax to refer to GTK+ properties 2010-01-12 21:00:30 +01:00
Christian Dywan
bb1824c131 Deprecate flag macros for toplevel, state, no window and composite child
Deprecate widget flag macros GTK_WIDGET_STATE, GTK_WIDGET_SAVED_STATE,
GTK_WIDGET_FLAGS, GTK_WIDGET_TOPLEVEL, GTK_WIDGET_NO_WINDOW and
GTK_WIDGET_COMPOSITE_CHILD.

Also deprecate the type macros GTK_WIDGET_TYPE, GTK_OBJECT_TYPE_NAME and
GTK_OBJECT_TYPE which have become redundant.

Instances of GTK_WIDGET_TOPLEVEL are replaced with gtk_widget_is_toplevel,
GTK_WIDGET_TYPE is replaced with G_OBJECT_TYPE, GTK_WIDGET_COMPOSITE_CHILD
is replaced with use of the "composite-child" property and uses of
GTK_WIDGET_NO_WINDOW are adjusted to use gtk_widget_get_has_window.

Uses of GTK_WIDGET_SAVED_STATE and GTK_WIDGET_FLAGS inside GtkWidget are
changed to direct flag usage.

Documentation is updated to refer to gtk_widget_set_has_window and
gtk_widget_get_has_window.

Gail and tests are updated as well.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-01-04 07:57:05 +01:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Christian Dywan
cb49a28f8c Mention exact property names in notebook tab packing deprecation
Follow-up for bug 596083.
2009-11-30 12:55:29 +01:00
Christian Persch
5bf30c2885 Make the action widgets internal children of GtkNotebook
So they're not included in the result of gtk_container_foreach() which
preserves it as a convenient way to get the list of all notebook content
widgets.

Bug #601409.
2009-11-28 18:05:09 +01:00
Christian Dywan
148ffd2cc9 Clarify documentation of gtk_notebook_set_action_widget 2009-11-09 16:36:17 +01:00
Matthias Clasen
c605474fa9 Add GtkBuilder support for notebook action area.
Allow to place children into the notebooks action areas by using
"action-start" or "action-end" as the type.
2009-11-08 21:34:29 -05:00
Matthias Clasen
c7e4a1a012 Add an 'action area' to GtkNotebook
Add support for putting widgets in the tab area, before or after
the tabs. This was requested a long time ago in bug 116650. The
implementation is the work of Johannes Schmid.
2009-11-08 21:28:17 -05:00
Matthias Clasen
80de4ab0d9 Another property formatting fix 2009-11-01 18:53:51 -05:00
Matthias Clasen
0a9a1bec93 Work around a gtk-doc formatting problem 2009-11-01 16:41:48 -05:00
Christian Dywan
272e0b5b76 Deprecated GtkNotebook tab packing
https://bugzilla.gnome.org/show_bug.cgi?id=596083
2009-10-21 18:25:02 +02:00
Benjamin Otte
e3bdf9291f Bug 590959 - Set child_has_focus flag properly (second try)
Previously, this flag wasn't cleared properly when the notebook lost
focus, but only when the notebook was focussed again later.
As this flag is only used to advance correctly focus pages by grabbing
focus to the new page after switching the page, this is not good.
In particular, it can cause a focus grab when programmatically switching
the notebook page and the focus is inside a completely different widget.

A previous attempt at this fix in
6e0af6c252 has been reverted in
dfe0c8c0ca because it didn't work
correctly.
2009-08-12 14:49:02 +02:00
Xan Lopez
dfe0c8c0ca Revert "Bug 590959 - Set child_has_focus flag properly"
This reverts commit 6e0af6c252.

The patch seems to break focus handling in some applications, like
Epiphany.
2009-08-07 15:51:17 +03:00
Benjamin Otte
6e0af6c252 Bug 590959 - Set child_has_focus flag properly
Previously, this flag wasn't cleared properly when the notebook lost
focus, but only when the notebook was focussed again later.
As this flag is only used to advance correctly focus pages by grabbing
focus to the new page after switching the page, this is not good.
In particular, it can cause a focus grab when programmatically switching
the notebook page and the focus is inside a completely different widget.
2009-08-06 16:39:19 +02:00
Stanislav Brabec
a39b2dcee4 bgo#529908 - Sanitize handling of motion events in GtkNotebook
GtkNotebook used gdk_window_get_pointer() incorrectly, as it already
had coordinates from various GdkEvents.  Using get_pointer() means
that you get pointer positions *after* the event has happened, which
leads to visual out-of-sync results, or inadvertently detached tabs if
you click on them while your machine is being slow.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-23 14:36:22 -05:00
Matthias Clasen
122e0b40ba Improve GtkNotbook behaviour with too little space
This fixes bug 582488. The patch was provided by Morten Welinder.
2009-05-17 23:47:30 -04:00
Matthias Clasen
d65c585c28 Keep popups on the right screen. Pointed out by Morten Welinder
* gtk/gtkentrycompletion.c:
        * gtk/gtknotebook.c: Keep popups on the right screen.
        Pointed out by Morten Welinder


svn path=/trunk/; revision=22423
2009-02-28 06:13:58 +00:00
Matthias Clasen
9ca66dd1c4 Bug 558522 – scroll arrow painted insensitive even though there are
2008-10-30  Matthias Clasen  <mclasen@redhat.com>

        Bug 558522 – scroll arrow painted insensitive even though there
        are pages beyond the edge

        gtk/gtknotebook.c (gtk_notebook_real_insert_page): Redraw
        arrows. Pointed out by Christian Persch


svn path=/trunk/; revision=21738
2008-10-31 03:46:00 +00:00
Matthias Clasen
9b320a62f1 Bug 553578 - tabs are not drawn correctly
2008-09-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 553578 - tabs are not drawn correctly

        * gtk/gtknotebook.c: Track the visibility state of notebook tabs
        between allocations so that we know to redraw the tab labels if
        tabs are hidden and shown without changing position.
        Reported by Marek Kašík, patch by Owen Taylor.


svn path=/trunk/; revision=21525
2008-09-26 23:58:12 +00:00
Matthias Clasen
1df29bcae8 Bug 329593 – Entering characters on a line very cpu intensive and
slow

        * gtk/gtknotebook.c (gtk_notebook_page_allocate): Return a boolean
        that indicates whether the tab allocation has changed.
        (gtk_notebook_pages_allocate): Only redraw the tabs if their
        allocation has changed.
        (gtk_notebook_calculate_tabs_allocations): Remove unused return value.
        Patch by Owen Taylor


svn path=/trunk/; revision=21414
2008-09-17 16:02:26 +00:00
Milan Crha
1e1fc9ff9e Allow changing page with arrows even on non-focusable notebook. (#528091)
2008-08-05  Milan Crha  <mcrha@redhat.com> 

        * gtk/gtknotebook.c: (gtk_notebook_do_arrow): Allow changing page with
        arrows even on non-focusable notebook. (#528091)


svn path=/trunk/; revision=21170
2008-08-20 08:17:35 +00:00
Sven Neumann
851061574a gtk/gtknotebook.c property nick and blurb should be marked with P_(), not
2008-08-12  Sven Neumann  <sven@gimp.org>

	* gtk/gtknotebook.c
	* gtk/gtkradiotoolbutton.c: property nick and blurb should be
	marked with P_(), not _().


svn path=/trunk/; revision=21091
2008-08-12 11:32:35 +00:00
Michael Natterer
d9d3379698 gtk/gtkaccellabel.c gtk/gtkcalendar.c gtk/gtkclist.c gtk/gtkentry.c
2008-08-12  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkaccellabel.c
	* gtk/gtkcalendar.c
	* gtk/gtkclist.c
	* gtk/gtkentry.c
	* gtk/gtkeventbox.c
	* gtk/gtkfilechooserbutton.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkhandlebox.c
	* gtk/gtkhsv.c
	* gtk/gtkiconview.c
	* gtk/gtkimage.c
	* gtk/gtklayout.c
	* gtk/gtklistitem.c
	* gtk/gtkmenuitem.c
	* gtk/gtkmessagedialog.c
	* gtk/gtknotebook.c
	* gtk/gtkpaned.c
	* gtk/gtkpathbar.c
	* gtk/gtkplug.c
	* gtk/gtkprintunixdialog.c
	* gtk/gtkrange.c
	* gtk/gtkrecentchooserdefault.c
	* gtk/gtkruler.c
	* gtk/gtksocket.c
	* gtk/gtktext.c
	* gtk/gtktextview.c
	* gtk/gtktoolbar.c
	* gtk/gtktreeitem.c
	* gtk/gtktreeview.c
	* gtk/gtkviewport.c
	* gtk/gtkwin32embedwidget.c: chain up unconditionally in
	realize(), unrealize(), map(), unmap(), style_set(),
	key_press_event() and size_request()


svn path=/trunk/; revision=21088
2008-08-12 09:44:32 +00:00
Michael Natterer
e18d3c6fd3 consistently chain up using GTK_FOO_CLASS(parent_class)->bar(instance)
2008-08-12  Michael Natterer  <mitch@imendio.com>

	* gtk/*.c: consistently chain up using
	GTK_FOO_CLASS(parent_class)->bar(instance) instead of
	(*GTK_FOO_CLASS(parent_class))->bar(instance).


svn path=/trunk/; revision=21085
2008-08-12 09:06:34 +00:00
Sven Neumann
9cf66a8a9c gtk/gtkmenu.c gtk/gtkmenuitem.c gtk/gtkmenushell.c gtk/gtknotebook.c
2008-08-11  Sven Neumann  <sven@gimp.org>

	* gtk/gtkmenu.c
	* gtk/gtkmenuitem.c
	* gtk/gtkmenushell.c
	* gtk/gtknotebook.c
	* gtk/gtkoldeditable.c
	* gtk/gtkpaned.c: use canonical signal names.



svn path=/trunk/; revision=21063
2008-08-11 11:52:06 +00:00
Carlos Garnacho
e9be9eb190 Set drag window background to be the GtkNotebook background color. This is
2008-08-04  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtknotebook.c (gtk_notebook_expose): Set drag window background
        to be the GtkNotebook background color. This is a workaround to
        prevent black pixels in rounded tabs when reordering. Improves
        #368234.

svn path=/trunk/; revision=20973
2008-08-04 14:46:22 +00:00
Michael Natterer
05a6983f62 Fix make check:
2008-07-04  Michael Natterer  <mitch@imendio.com>

	Fix make check:

	* gtk/Makefile.am: remove GTK_DISABLE_DEPRECATED from INCLUDES
	again :-(

	* gtk/gtkclist.c
	* gtk/gtkcombo.c
	* gtk/gtkctree.c
	* gtk/gtklist.c
	* gtk/gtklistitem.c
	* gtk/gtknotebook.c
	* gtk/gtkobject.c
	* gtk/gtkoldeditable.c
	* gtk/gtkpixmap.c
	* gtk/gtktext.c
	* gtk/gtktree.c
	* gtk/gtktreeitem.c: don't #define it again before including
	gtkalias.h after it has been #undef'ed before.


svn path=/trunk/; revision=20763
2008-07-04 18:38:36 +00:00
Michael Natterer
da4da16baf Allocate with GSlice:
2008-07-04  Michael Natterer  <mitch@imendio.com>

	Allocate with GSlice:

	* gtk/gtkassistant.c: GtkAssistantPage
	* gtk/gtkcellview.c: GtkCellViewCellInfo
	* gtk/gtkentry.c: GtkEntryPasswordHint, PopupInfo
	* gtk/gtkfilefilter.c: FilterRule
	* gtk/gtknotebook.c: GtkNotebookPage


svn path=/trunk/; revision=20761
2008-07-04 14:27:40 +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
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
Johan Dahlin
ef5e0e9601 Fix up deprecated markup syntax. Add version numbers and a message on the
2008-06-20  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkbutton.c:
    * gtk/gtkcolorsel.c:
    * gtk/gtkentry.c:
    * gtk/gtkitemfactory.c:
    * gtk/gtknotebook.c:
    Fix up deprecated markup syntax. Add version numbers and
    a message on the remaning ones.


svn path=/trunk/; revision=20655
2008-06-20 19:42:53 +00:00
Tor Lillqvist
293ed565ee Need to do the GTK_DISABLE_DEPRECATED #undef/#define dance here, too,
2008-06-17  Tor Lillqvist  <tml@novell.com>

	* gtk/gtknotebook.c: Need to do the GTK_DISABLE_DEPRECATED
	#undef/#define dance here, too, because
	gtk_notebook_set_group_id() is deprecated but used here before it
	is defined, and gcc complains about conflicting type from the
	implicit int declaration when it sees the actual void definition.


svn path=/trunk/; revision=20435
2008-06-17 19:29:22 +00:00
Björn Lindqvist
6dfbe3b4f8 Bug 131920 – gtkNotebook sends incorrect switch_page value
2008-06-08  Björn Lindqvist  <bjourne@gmail.com>

	Bug 131920 – gtkNotebook sends incorrect switch_page value

	* gtk/gtknotebook.c (gtk_notebook_real_remove): Make switch-page
	signal send correct page index when page index 0 is active and
	removed. (#131920, Samuel Fogh)

svn path=/trunk/; revision=20339
2008-06-08 21:41:16 +00:00
Carlos Garnacho
5f6e577866 Do not call gtk_widget_set_parent_window(), using widget->window instead
2008-04-10  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtknotebook.c (hide_drag_window): Do not call
        gtk_widget_set_parent_window(), using widget->window instead of NULL
        to unset is the wrong thing, and gtk_widget_unparent() will already
        take care of this (#467698, patch by Sébastien Granjoux)

svn path=/trunk/; revision=19987
2008-04-10 17:16:08 +00:00
Matthias Clasen
3456639c39 Prevent a crash with hidden, reorderable tabs. (#513230, Mike Massonnet,
2008-02-15  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_stop_reorder): Prevent
        a crash with hidden, reorderable tabs.  (#513230,
        Mike Massonnet, patch by Carlos Garnacho)


svn path=/trunk/; revision=19593
2008-02-16 04:09:15 +00:00
Michael Natterer
e7355f82c2 gtk/gtkcontainer.c gtk/gtkexpander.c gtk/gtkframe.c gtk/gtklabel.c
2008-02-06  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcontainer.c
	* gtk/gtkexpander.c
	* gtk/gtkframe.c
	* gtk/gtklabel.c
	* gtk/gtkmain.c
	* gtk/gtkmenu.c
	* gtk/gtkmenuitem.c
	* gtk/gtkmenushell.c
	* gtk/gtknotebook.c
	* gtk/gtkseparatortoolitem.c
	* gtk/gtksocket.c
	* gtk/gtktextlayout.c
	* gtk/gtktoggletoolbutton.c
	* gtk/gtktoolbutton.c
	* gtk/gtktoolitem.c
	* gtk/gtktree.c
	* gtk/gtktreeitem.c: replace "foo && GTK_IS_FOO (foo)" by simply
	"GTK_IS_FOO (foo)".


svn path=/trunk/; revision=19481
2008-02-06 09:53:34 +00:00
Johan Dahlin
71e9be7e6d Use G_OBJECT_WARN_INVALID_PROPERTY_ID consistently. Fixes #5075
2008-01-06  Johan Dahlin  <johan@gnome.org>

	* gtk/gtkcellrenderercombo.c:
	(gtk_cell_renderer_combo_get_property),
	(gtk_cell_renderer_combo_set_property):
	* gtk/gtkcombobox.c: (gtk_combo_box_set_property):
	* gtk/gtkcomboboxentry.c: (gtk_combo_box_entry_set_property):
	* gtk/gtknotebook.c: (gtk_notebook_set_property):
	* gtk/gtkspinbutton.c: (gtk_spin_button_set_property):
	* gtk/gtktextbuffer.c: (gtk_text_buffer_set_property),
	(gtk_text_buffer_get_property):
	* gtk/gtktextview.c: (gtk_text_view_set_property):
	* gtk/gtktogglebutton.c: (gtk_toggle_button_set_property):
	* gtk/gtktoolbutton.c: (gtk_tool_button_set_property),
	(gtk_tool_button_get_property):
	* gtk/gtktoolitem.c: (gtk_tool_item_set_property),
	(gtk_tool_item_get_property):
	* gtk/gtktreeview.c: (gtk_tree_view_set_property):
	* gtk/gtkwidget.c: (gtk_widget_set_property):
	* gtk/gtkwindow.c: (gtk_window_set_property):
	Use G_OBJECT_WARN_INVALID_PROPERTY_ID consistently.
	Fixes #5075

svn path=/trunk/; revision=19311
2008-01-06 03:28:40 +00:00