Commit Graph

555 Commits

Author SHA1 Message Date
Johan Dahlin
c4aa58f9bc Remove unused variable and check if the widget is a GtkWidget subclass,
2008-06-20  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkwidget.c (gtk_widget_get_allocation): Remove unused variable
    and check if the widget is a GtkWidget subclass, not the uninitialized
    allocation.


svn path=/trunk/; revision=20644
2008-06-20 14:19:22 +00:00
Johan Dahlin
e46eeab2a9 Add missing Since: gtk-doc markup for newly added GSEAL API. Change all
2008-06-20  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkaccelgroup.c:
    * gtk/gtkcolorseldialog.c:
    * gtk/gtkcontainer.c:
    * gtk/gtkdialog.c:
    * gtk/gtkentry.c (gtk_entry_class_init):
    * gtk/gtkfontsel.c:
    * gtk/gtkhandlebox.c:
    * gtk/gtklayout.c:
    * gtk/gtkmenu.c (gtk_menu_class_init):
    * gtk/gtkmenuitem.c (gtk_menu_item_class_init):
    * gtk/gtkplug.c (gtk_plug_class_init):
    * gtk/gtkselection.c:
    * gtk/gtksocket.c:
    * gtk/gtktreeselection.c:
    * gtk/gtkwidget.c (gtk_widget_class_init):
    * gtk/gtkwindow.c:
    Add missing Since: gtk-doc markup for newly added GSEAL API.
    Change all Since: GSEAL-branch to Since: 2.14.


svn path=/trunk/; revision=20639
2008-06-20 13:54:31 +00:00
Tim Janik
bf2323b1de Change docs and signature of gtk_widget_get_allocation
svn path=/trunk/; revision=20625
2008-06-20 11:10:14 +00:00
Tim Janik
886ffbe067 Fix gtk_widget_get_allocation
svn path=/trunk/; revision=20622
2008-06-20 11:09:56 +00:00
Tim Janik
10896d4874 Seal GtkWidget
svn path=/trunk/; revision=20620
2008-06-20 11:09:42 +00:00
Johan Dahlin
7c45f6f5fc Add deprecated versions and fixup markup.
2008-06-17  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkwidget.c: 
    Add deprecated versions and fixup markup.


svn path=/trunk/; revision=20442
2008-06-18 01:31:22 +00:00
Michael Natterer
ff5ba96c26 gtk/gtkfontsel.c gtk/gtkrc.c gtk/gtkstyle.c use g_object_unref() instead
2008-06-16  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkfontsel.c
	* gtk/gtkrc.c
	* gtk/gtkstyle.c
	* gtk/gtkwidget.c: use g_object_unref() instead of the deprecated
	gtk_rc_style_unref().


svn path=/trunk/; revision=20405
2008-06-16 16:53:39 +00:00
Christian Persch
dcc9428036 Bug 535608 – do not string-copy accel paths in the menu code
Don't store the accel path as a string in gtkmenu/gtkmenuitem.
The accel path will be interned anyway, so keeping a string copy around
is just a waste of memory.
Improve the documentation to mention this.

svn path=/trunk/; revision=20331
2008-06-07 20:40:20 +00:00
Matthias Clasen
3a4ac605a8 Fix Since tags
svn path=/trunk/; revision=20244
2008-05-30 02:46:49 +00:00
10:33:41 Tim Janik
727a7dbf46 guard gtk_widget_get_snapshot() against invalid or invisible widgets.
2008-05-27 10:33:41  Tim Janik  <timj@imendio.com>

        * gtk/gtkwidget.c: guard gtk_widget_get_snapshot() against
        invalid or invisible widgets.


svn path=/trunk/; revision=20187
2008-05-27 08:35:24 +00:00
Matthias Clasen
e19eee548f Some doc formatting fixes.
svn path=/trunk/; revision=20172
2008-05-26 05:38:20 +00:00
Hans Breuer
0b57c6b98f updated fix c99ism (variable at start of block export functions for window
2008-05-23  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc gtk/makefile.msc.in : updated
	* gtk/gtkwidget.c : fix c99ism (variable at start of block
	* gdk/gdk.symbols gtk/gtk.symbols : export functions for window 
	redirection
	* gtk/gtkfilechooserdefault.c : #include <locale.h> for 
	setlocale(LC_ALL, ...)

svn path=/trunk/; revision=20131
2008-05-23 20:29:27 +00:00
21:10:15 Tim Janik
b3d160ced5 added GdkRectangle *clip_rect to gtk_widget_get_snapshot().
2008-05-21 21:10:15  Tim Janik  <timj@imendio.com>

        * gtk/gtkwidget.h: added GdkRectangle *clip_rect to gtk_widget_get_snapshot().

        * gtk/gtkwidget.c: clip the returned snapshot pixmap to clip_rect.
        return snapshot pixmap coordinates widget relative in *clip_rect.

        * tests/testgtk.c: fixed bogus NULL pointer unref.


svn path=/trunk/; revision=20124
2008-05-21 19:15:12 +00:00
21:04:28 Tim Janik
aa4ab3f037 grow snapshot area from widget's allocation to cover extra widget windows
2008-05-21 21:04:28  Tim Janik  <timj@imendio.com>

        * gtk/gtkwidget.c gtk_widget_get_snapshot(): grow snapshot area from
        widget's allocation to cover extra widget windows placed outside the
        widget allocation (spinbutton arrows are the prime example for this).


svn path=/trunk/; revision=20123
2008-05-21 19:07:40 +00:00
10:49:20 Tim Janik
4111cf2065 Bug 318807 – Offscreen windows and window redirection.
2008-03-18 10:49:20  Tim Janik  <timj@imendio.com>

	* Applied pixmap redirection patch by Alexander Larsson with
	various updates from:
	Bug 318807 – Offscreen windows and window redirection.


	Updates:

	* updated docs to mention "Since 2.16".

	* tests/testgtk.c: fixed snapshooting pixmap leak.
	convert pixmap to pixbuf after snapshooting, to compensate for different
	bit depths (occurs when snapshooting ARGB visuals and displaying the
	pixmap in an RGB visual).

	* gdk/gdkwindow.[hc]: made GdkWindowRedirect private.

	* gdk/gdkwindow.c: removed damage idle handler, there's no aparent
	need for it. enqueue damage notification as GDK_DAMAGE events
	for each painting redirection at the start of the event queue.
	consider windows with a redirection fully visible when invalidating,
	and when updating from backing store. cleaned up stale variables.

	* gdk/gdkevents.c: added _gdk_event_queue_prepend().

	* gtk/gtkwidget.c: fixed coordinates for !NO_WINDOW widgets in
	gtk_widget_get_snapshot; this fixes garbage snap offsets for gammacurve,
	tree, drawingarea, text, handlebox, etc.
	clip the redirected window hierarchy to window sizes, the visible
	rectangles don't need to be taken into account here.
	extended snapshooting docs to recommend gdk_pixbuf_get_from_drawable()
	in case pixmap visuals could mismatch.

	* gdk/x11/gdkwindow-x11.c: removed _gdk_windowing_window_get_visible_rect().


	Base patch:

	* tests/testgtk.c: add a "Snapshot" test to demonstrate snapshooting
	of possibly obscured widgets into an offscreen pixmap.

	* gtk/gtkwidget.[hc]: add GtkWidget::damage-event signal, add
	gtk_widget_get_snapshot() to render a widget's contents to a GdkPixmap.

	* gtk/gtkmain.c: dispatch GDK_DAMAGE events.

	* gdk/gdkwindow.c: moved outer gdk_window_new() and gdk_window_reparent()
	implementations here, adapted them to propagate redirects to child windows.
	gdk_window_end_paint(): copy repainted window contents to redirection pixmap,
	clipped to visible region. queue GDK_DAMAGE event delivery.
	gdk_window_redirect_to_drawable(): install window painting redirection.
	gdk_window_remove_redirection(): remove previously installed redirection.

	* gdk/x11/gdkwindow-x11.c: added _gdk_windowing_window_get_visible_rect(),
	renamed _gdk_window_new() and _gdk_window_reparent().

	* gdk/gdkwindow.h: added GdkWindowRedirect* to GdkWindowObject, export
	gdk_window_redirect_to_drawable() and gdk_window_remove_redirection().

	* gdk/gdkevents.h: added GDK_DAMAGE event type.

	* gdk/gdkevents.c: extract time and state from GDK_DAMAGE events.

	* gdk/gdkinternals.h: added internal prototypes.



svn path=/trunk/; revision=20122
2008-05-21 19:04:24 +00:00
Tristan Van Berkom
e6ffa4f5de Clarified a g_warning message regarding parsing accelerators from builder
* gtk/gtkwidget.c: Clarified a g_warning message regarding
	parsing accelerators from builder files.


svn path=/trunk/; revision=19978
2008-04-06 03:10:23 +00:00
Matthias Clasen
f51751d2d8 Use g_value_set_static_string() where appropriate. (#515042, Christian
2008-02-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilesystemmodel.c:
        * gtk/gtkprinter.c:
        * gtk/gtkwidget.c: Use g_value_set_static_string() where
        appropriate.  (#515042, Christian Persch)


svn path=/trunk/; revision=19527
2008-02-12 15:41:30 +00:00
Johan Dahlin
fddc9b8561 Implement accessible support, fixes #454653.
2008-01-25  Johan Dahlin  <johan@gnome.org>

        * gtk/gtkwidget.c: (gtk_widget_buildable_interface_init),
        (gtk_widget_buildable_get_internal_child), (free_action),
        (free_relation), (gtk_widget_buildable_parser_finished),
        (accessibility_start_element),
        (gtk_widget_buildable_custom_tag_start),
        (gtk_widget_buildable_custom_finished):
        Implement accessible support, fixes #454653.

        * gtk/gtk-builder-convert:
        Add support for migrating old glade files
        
        * tests/buildertest.c: (test_widget), (test_file):
        Add accessible tests and improve the test_file function to display
        toplevels and run dialogs.


svn path=/trunk/; revision=19403
2008-01-25 16:17:38 +00:00
Michael Natterer
a362eecc4a gtk/gtkbutton.h gtk/gtkcellrenderer.h gtk/gtkimcontext.h gtk/gtkstyle.h
2008-01-25  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbutton.h
	* gtk/gtkcellrenderer.h
	* gtk/gtkimcontext.h
	* gtk/gtkstyle.h
	* gtk/gtktoolbar.h
	* gtk/gtktooltip.h
	* gtk/gtktreeprivate.h
	* gtk/gtktreeviewcolumn.h
	* gtk/gtkwidget.h: add const to constant structs which are passed
	into GTK+. Also add some forgotten const for const strings.

	* gtk/gtkbutton.c
	* gtk/gtkcellrenderer.c
	* gtk/gtkimcontext.c
	* gtk/gtkstyle.c
	* gtk/gtktoolbar.c
	* gtk/gtktooltip.c
	* gtk/gtktreeview.c
	* gtk/gtktreeviewcolumn.c
	* gtk/gtkwidget.c: changed accordingly.


svn path=/trunk/; revision=19399
2008-01-25 09:30:40 +00:00
Christian Persch
7265ed4fc8 Store the event mask and extension event mode directly in the gobject data
* gtk/gtkwidget.c: Store the event mask and extension event mode
	directly in the gobject data pointer, instead of in an allocated
	gint. Bug #506604.

svn path=/trunk/; revision=19381
2008-01-16 19:14:49 +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
Mathias Hasselmann
26124bb10b Avoid some compiler warnings (#507000).
* gtk/gtkbuilder.c, gtk/gtkbuilderprivate.h: Use proper sign
for value argument of _gtk_builder_flags_from_string.
* gtk/gtkwidget.c: Don't alias the child pointer passed
to gdk_window_get_user_data.

svn path=/trunk/; revision=19306
2008-01-05 08:33:53 +00:00
Ray Strode
8609315d28 Suggest g_signal_connect (..., "realize", ...) instead of
2007-12-14  Ray Strode  <rstrode@redhat.com>

	* gtk/gtkwidget.c: Suggest g_signal_connect (..., "realize", ...)
	instead of g_signal_connect_after (..., "realize", ...) as an
	alternative to gtk_widget_realize () (bug 503537).

svn path=/trunk/; revision=19181
2007-12-14 17:06:08 +00:00
Mathias Hasselmann
dce782750f Mention impact of GtkDestDefaults on "drag-motion" handlers. Clearify
* gtk/gtkdnd.c, gtk/gtkwidget.c: Mention impact of GtkDestDefaults
on "drag-motion" handlers. Clearify documentation for
gtk_drag_dest_set.

svn path=/trunk/; revision=19159
2007-12-11 18:56:56 +00:00
Matthias Clasen
4896e24bb1 Require gtk-doc 1.8
2007-11-25  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Require gtk-doc 1.8

        * */*.c: Use gtk-doc abbreviations for examples in docs.


svn path=/trunk/; revision=19041
2007-11-25 06:51:19 +00:00
Michael Natterer
f93e2db2a9 fixed docs.
2007-11-06  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.c (gtk_widget_keynav_failed): fixed docs.


svn path=/trunk/; revision=18968
2007-11-06 08:57:33 +00:00
Cody Russell
46bbf4ebd8 gtk/gtkwidget.c gtk/gtkscrolledwindow.c Correct documentation that refers
2007-08-14  Cody Russell  <bratsche@gnome.org>

        * gtk/gtkwidget.c
        * gtk/gtkscrolledwindow.c
        * gtk/gtklabel.c: Correct documentation that refers to the
        deprecated gtk_widget_set_usize() API.  Refer instead to
        gtk_widget_set_size_request().  (#459340, Guillaume Cottenceau)


svn path=/trunk/; revision=18613
2007-08-14 22:44:11 +00:00
Ryan Lortie
f0cfba930c add note that the semantics of this call, when mixed with the new
2007-07-20  Ryan Lortie  <desrt@desrt.ca>

        * gtk/gtkwidget.c (gtk_widget_is_composited): add note that the
        semantics of this call, when mixed with the new
        gdk_window_set_composited(), will change in the future.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): only grab Damage
        events that belong to us.


svn path=/trunk/; revision=18506
2007-07-19 23:50:39 +00:00
Matthias Clasen
1fe3fa46ea Apply a patch by Xan Lopez to document a lot of GtkWidget signals.
2007-07-16  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkwidget.c: Apply a patch by Xan Lopez to document
        a lot of GtkWidget signals.  (#172424)


svn path=/trunk/; revision=18474
2007-07-16 14:40:37 +00:00
Kristian Rietveld
15dee8e529 add getter/setter pair, slight addition to has-tooltip property
2007-07-10  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtk.symbols:
	* gtk/gtkwidget.[ch] (gtk_widget_{get,set}_has_tooltip): add
	getter/setter pair, slight addition to has-tooltip property
	documentation,
	(gtk_widget_real_set_has_tooltip): renamed internal function.


svn path=/trunk/; revision=18439
2007-07-10 18:24:37 +00:00
Kristian Rietveld
c255676e25 Replace non-deprecated API using old tooltips API, deprecate old tooltips
2007-07-09  Kristian Rietveld  <kris@imendio.com>

	Replace non-deprecated API using old tooltips API, deprecate
	old tooltips API for real. (#451575).

	* gtk/gtk.symbols: updated.

	* gtk/gtkwidget.c (gtk_widget_real_show_help): don't call
	_gtk_tooltips_toggle_keyboard_mode() anymore.

	* gtk/gtkmenutoolbutton.[ch] (gtk_menu_tool_button_set_arrow_tooltip):
	deprecated,
	(gtk_menu_tool_button_set_arrow_tooltip_{text,markup}): replacements.

	* gtk/gtktoolitem.[ch] (gtk_tool_item_real_set_tooltip): use
	new API,
	(gtk_tool_item_set_tooltip): deprecated,
	(gtk_tool_item_set_tooltip_{text,markup): replacements.
	(GtkToolItemClass:set_tooltip): deprecated.

	* gtk/gtktooltips.[ch]: strip out all unused parts, made
	gtk_tooltips_set_tip() call gtk_widget_set_tooltip_text(),
	deprecate all of gtk_tooltips_*.

	* gtk/gtktoolbar.[ch] (gtk_toolbar_get_tooltips): always return
	TRUE,
	(GtkToolbar:tooltips): deprecated, renamed.

	* gtk/gtkaction.c (gtk_action_sync_tooltip): use new API to
	set the tooltip text.

	* tests/autotestfilechooser.c: #undef GTK_DISABLE_DEPRECATED for now,
	will be removed GtkFileChooserDefault has been converted.


svn path=/trunk/; revision=18418
2007-07-09 19:23:18 +00:00
Matthias Clasen
6942fa3981 Fix a typo and a memory management bug
svn path=/trunk/; revision=18400
2007-07-08 03:59:30 +00:00
Johan Dahlin
0aeff7f47b Parse <accessibility> but don't do anything yet. Do not strip
2007-07-08  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkwidget.c (gtk_widget_buildable_custom_tag_start): 
    Parse <accessibility> but don't do anything yet.
    * gtk/gtk-builder-convert (GtkBuilderConverter._parse): 
    Do not strip atk/accessibility tags
    * tests/buildertest.c (test_widget): 
    Test this


svn path=/trunk/; revision=18399
2007-07-08 03:22:18 +00:00
Tristan Van Berkom
12bdfb430e Fixed assertions from setting "tooltip-text" to NULL (bug 452425)
* gtk/gtkwidget.c: Fixed assertions from setting "tooltip-text" to NULL
	(bug 452425)


svn path=/trunk/; revision=18353
2007-07-03 15:39:59 +00:00
Johan Dahlin
aaab9c05a5 Improve error handling for enum/flags, rename the converter functions to
2007-06-30  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkbuilder.c:
    * gtk/gtkbuilder.h:
    * gtk/gtkbuilderparser.c:
    * gtk/gtkbuilderprivate.h:
    * gtk/gtkwidget.c: 
    * tests/buildertest.c:

    Improve error handling for enum/flags, rename the converter functions
    to be consistent. Add tests. Fixes #452465


svn path=/trunk/; revision=18312
2007-06-30 18:27:39 +00:00
Johan Dahlin
60a409785f Rename buildable methods to not clash with widget methods. (#448928,
2007-06-19  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/*: Rename buildable methods to not clash with widget 
    methods. (#448928, Torsten Schoenfeld)


svn path=/trunk/; revision=18187
2007-06-19 12:23:36 +00:00
Mathias Hasselmann
a34dfc3c5c Forgot to free the unescaped tooltip text.
2007-06-15  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkwidget.c: Forgot to free the unescaped tooltip text.

svn path=/trunk/; revision=18144
2007-06-15 18:34:21 +00:00
Mathias Hasselmann
ced0bab02f Improving handling of tooltip-text property. Also check result of tooltip
2007-06-15 Mathias Hasselmann <mathias.hasselmann@gmx.de>

	* gtk/gtkwidget.c: Improving handling of tooltip-text property.
	* tests/testtooltips.c: Also check result of tooltip getters.

svn path=/trunk/; revision=18143
2007-06-15 18:25:11 +00:00
Mathias Hasselmann
9b604e29a2 Introduce convenience property "GtkWidget:tooltip-text" taking care of
2007-06-15 Mathias Hasselmann <mathias.hasselmann@gmx.de>

        * docs/reference/gtk/gtk-sections.txt, gtk/gtk.symbols,
        gtk/gtkwidget.c, gtk/gtkwidget.h, tests/testtooltips.c: Introduce
        convenience property "GtkWidget:tooltip-text" taking care of escaping
        it for unwanted markup entities. Add functions to set tooltip text:
        gtk_widget_set_tooltip_text(), gtk_widget_set_tooltip_markup(),
        gtk_widget_get_tooltip_text(), gtk_widget_get_tooltip_markup().

        * gtk/gtktooltip.c, gtk/gtktooltip.h: Add gtk_tooltip_set_text()
        to set the tooltip text without using markup.

        Patches from Emmanuele Bassi (#447643).

svn path=/trunk/; revision=18142
2007-06-15 18:24:55 +00:00
Johan Dahlin
4d638bf0c1 Add GtkBuilder, fixes #172535
2007-06-15  Johan Dahlin  <jdahlin@async.com.br>

    * demos/gtk-demo/Makefile.am:
    * demos/gtk-demo/builder.c: (quit_activate), (about_activate),
    (do_builder):
    * demos/gtk-demo/demo.ui:
    * docs/reference/gtk/gtk-docs.sgml:
    * docs/reference/gtk/gtk-sections.txt:
    * docs/reference/gtk/gtk.types:
    * docs/reference/gtk/tmpl/gtkbuildable.sgml:
    * docs/reference/gtk/tmpl/gtkbuilder.sgml:
    * gtk/Makefile.am:
    * gtk/gtk.h:
    * gtk/gtk.symbols:
    * gtk/gtkaction.c: (gtk_action_buildable_init),
    (gtk_action_buildable_set_name), (gtk_action_buildable_get_name):
    * gtk/gtkactiongroup.c: (gtk_action_group_get_type),
    (gtk_action_group_buildable_init),
    (gtk_action_group_buildable_add),
    (gtk_action_group_buildable_set_name),
    (gtk_action_group_buildable_get_name):
    * gtk/gtkbuildable.c: (gtk_buildable_get_type),
    (gtk_buildable_set_name), (gtk_buildable_get_name),
    (gtk_buildable_add), (gtk_buildable_set_property),
    (gtk_buildable_parser_finished), (gtk_buildable_construct_child),
    (gtk_buildable_custom_tag_start), (gtk_buildable_custom_tag_end),
    (gtk_buildable_custom_finished),
    (gtk_buildable_get_internal_child):
    * gtk/gtkbuildable.h:
    * gtk/gtkbuilder.c: (gtk_builder_class_init), (gtk_builder_init),
    (gtk_builder_finalize), (gtk_builder_set_property),
    (gtk_builder_get_property), (_gtk_builder_resolve_type_lazily),
    (gtk_builder_real_get_type_from_name),
    (gtk_builder_get_parameters), (gtk_builder_get_internal_child),
    (_gtk_builder_construct), (_gtk_builder_add),
    (apply_delayed_properties), (_gtk_builder_finish),
    (gtk_builder_new), (gtk_builder_add_from_file),
    (gtk_builder_add_from_string), (gtk_builder_get_object),
    (object_add_to_list), (gtk_builder_get_objects),
    (gtk_builder_set_translation_domain),
    (gtk_builder_get_translation_domain),
    (gtk_builder_connect_signals_default),
    (gtk_builder_connect_signals), (gtk_builder_connect_signals_full),
    (gtk_builder_value_from_string),
    (gtk_builder_value_from_string_type),
    (_gtk_builder_enum_from_string), (_gtk_builder_flags_from_string),
    (gtk_builder_get_type_from_name), (gtk_builder_error_quark):
    * gtk/gtkbuilder.h:
    * gtk/gtkbuilderparser.c: (state_push), (state_peek), (state_pop),
    (error_missing_attribute), (error_invalid_attribute),
    (error_invalid_tag), (builder_construct), (parse_object),
    (free_object_info), (_get_type_by_symbol), (parse_child),
    (free_child_info), (parse_property), (free_property_info),
    (parse_signal), (_free_signal_info), (parse_interface),
    (create_subparser), (free_subparser), (subparser_start),
    (subparser_end), (parse_custom), (start_element), (end_element),
    (text), (_gtk_builder_parser_parse_buffer):
    * gtk/gtkbuilderprivate.h:
    * gtk/gtkcelllayout.c: (attributes_start_element),
    (attributes_text_element),
    (_gtk_cell_layout_buildable_custom_tag_start),
    (_gtk_cell_layout_buildable_custom_tag_end),
    (_gtk_cell_layout_buildable_add):
    * gtk/gtkcelllayout.h:
    * gtk/gtkcellview.c: (gtk_cell_view_buildable_init),
    (gtk_cell_view_buildable_custom_tag_start),
    (gtk_cell_view_buildable_custom_tag_end):
    * gtk/gtkcolorseldialog.c:
    (gtk_color_selection_dialog_buildable_interface_init),
    (gtk_color_selection_dialog_buildable_get_internal_child):
    * gtk/gtkcombobox.c: (gtk_combo_box_buildable_init),
    (gtk_combo_box_buildable_custom_tag_start),
    (gtk_combo_box_buildable_custom_tag_end):
    * gtk/gtkcomboboxentry.c:
    (gtk_combo_box_entry_buildable_interface_init),
    (gtk_combo_box_entry_buildable_get_internal_child):
    * gtk/gtkcontainer.c: (gtk_container_get_type),
    (gtk_container_buildable_init), (gtk_container_buildable_add),
    (gtk_container_buildable_set_child_property),
    (attributes_start_element), (attributes_text_element),
    (gtk_container_buildable_custom_tag_start),
    (gtk_container_buildable_custom_tag_end):
    * gtk/gtkdebug.h:
    * gtk/gtkdialog.c: (gtk_dialog_buildable_interface_init),
    (gtk_dialog_buildable_get_internal_child),
    (attributes_start_element), (attributes_text_element),
    (gtk_dialog_buildable_custom_tag_start),
    (gtk_dialog_buildable_custom_finished):
    * gtk/gtkentrycompletion.c: (gtk_entry_completion_buildable_init):
    * gtk/gtkexpander.c: (gtk_expander_buildable_add),
    (gtk_expander_buildable_init):
    * gtk/gtkfontsel.c:
    (gtk_font_selection_dialog_buildable_interface_init),
    (gtk_font_selection_dialog_buildable_get_internal_child):
    * gtk/gtkframe.c: (gtk_frame_buildable_init),
    (gtk_frame_buildable_add):
    * gtk/gtkiconview.c: (gtk_icon_view_buildable_init),
    (gtk_icon_view_buildable_custom_tag_start),
    (gtk_icon_view_buildable_custom_tag_end):
    * gtk/gtkliststore.c: (gtk_list_store_buildable_init),
    (list_store_start_element), (list_store_end_element),
    (list_store_text), (gtk_list_store_buildable_custom_tag_start),
    (gtk_list_store_buildable_custom_tag_end):
    * gtk/gtkmain.c:
    * gtk/gtknotebook.c: (gtk_notebook_buildable_init),
    (gtk_notebook_buildable_add):
    * gtk/gtksizegroup.c: (gtk_size_group_buildable_init),
    (size_group_start_element),
    (gtk_size_group_buildable_custom_tag_start),
    (gtk_size_group_buildable_custom_finished):
    * gtk/gtktreestore.c: (gtk_tree_store_buildable_init),
    (tree_model_start_element),
    (gtk_tree_store_buildable_custom_tag_start),
    (gtk_tree_store_buildable_custom_finished):
    * gtk/gtktreeview.c: (gtk_tree_view_buildable_init),
    (gtk_tree_view_buildable_add):
    * gtk/gtktreeviewcolumn.c: (gtk_tree_view_column_buildable_init):
    * gtk/gtkuimanager.c: (gtk_ui_manager_buildable_init),
    (gtk_ui_manager_buildable_add),
    (gtk_ui_manager_buildable_construct_child),
    (gtk_ui_manager_buildable_custom_tag_start),
    (gtk_ui_manager_buildable_custom_tag_end):
    * gtk/gtkwidget.c: (gtk_widget_get_type),
    (gtk_widget_buildable_interface_init),
    (gtk_widget_buildable_set_name), (gtk_widget_buildable_get_name),
    (gtk_widget_buildable_set_property),
    (gtk_widget_buildable_parser_finshed), (accel_group_start_element),
    (gtk_widget_buildable_custom_tag_start),
    (gtk_widget_buildable_custom_finshed):
    * gtk/gtkwindow.c: (gtk_window_buildable_interface_init),
    (gtk_window_buildable_set_property),
    (gtk_window_buildable_parser_finished):
    * tests/Makefile.am:
    * tests/buildertest.c: (builder_new_from_string), (test_parser),
    (signal_normal), (signal_after), (signal_object),
    (signal_object_after), (signal_first), (signal_second),
    (signal_extra), (signal_extra2), (test_connect_signals),
    (test_uimanager_simple), (test_domain), (test_translation),
    (test_sizegroup), (test_list_store), (test_tree_store),
    (test_types), (test_spin_button), (test_notebook),
    (test_construct_only_property), (test_children),
    (test_child_properties), (test_treeview_column), (test_icon_view),
    (test_combo_box), (test_combo_box_entry), (test_cell_view),
    (test_dialog), (test_accelerators), (test_widget), (main):

    Add GtkBuilder, fixes #172535


svn path=/trunk/; revision=18141
2007-06-15 17:53:46 +00:00
Matthias Clasen
cf8205eeef Improve docs
svn path=/trunk/; revision=18128
2007-06-14 04:03:58 +00:00
Cody Russell
5c48e783d4 Fix inconsistency in GTK_WIDGET_SAVED_STATE (#435840, Xan Lopez)
2007-06-13  Cody Russell  <bratsche@gnome.org>

       * gtk/gtkwidget.c: Fix inconsistency in GTK_WIDGET_SAVED_STATE
       (#435840, Xan Lopez)



svn path=/trunk/; revision=18122
2007-06-13 14:17:53 +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
Yevgen Muntyan
2cbaeadf43 new method, gtk_widget_modify_cursor() (#89314).
2007-06-06  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtkwidget.c:
	* gtk/gtkwidget.h: new method, gtk_widget_modify_cursor() (#89314).

	* gtkrc.c:
	* gtkrc.h: new functions _gtk_rc_style_set_rc_property() and
	_gtk_rc_style_unset_rc_property().

	* gtk/gtk.symbols: added gtk_widget_modify_cursor.

	* tests/testtext.c (do_cursor_visible_changed):
	* tests/testgtk.c (create_styles): test it.


svn path=/trunk/; revision=18066
2007-06-06 19:43:31 +00:00
Michael Natterer
e631aef881 Move "move-focus" signals from several widgets to GtkWidget to enable more
2007-06-04  Michael Natterer  <mitch@imendio.com>

	Move "move-focus" signals from several widgets to GtkWidget to
	enable more flexible costomization of keyboard navigation via
	bindings. Fixes bug #414947.

	* gtk/gtkwidget.c: add "move-focus" binding signal, default to
	calling the toplevel GtkWindow's "move-focus" vfunc.

	* gtk/gtktextview.[ch]
	* gtk/gtkwindow.[ch]: remove "move-focus" signals and add compat
	code that makes sure that both emitting the signal on the widget
	and overriding the virtual functions keeps working as before.

	* gtk/gtktoolbar.c: remove "move-focus" signal here too and use
	GtkWidget's signal. This change slightly changes keyboard
	navigation in toolbars. I'll fix the behavior if somebody can
	explain me if and how exactly the new behavior is broken.


svn path=/trunk/; revision=18025
2007-06-04 15:00:22 +00:00
Carlos Garnacho
500e7c9375 Add back variable declaration removed in r17958.
2007-05-28  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtkwidget.c (gtk_widget_propagate_hierarchy_changed_recurse):
        Add back variable declaration removed in r17958.


svn path=/trunk/; revision=17964
2007-05-28 13:34:39 +00:00
Matthias Clasen
e95f511143 Document some more signals
svn path=/trunk/; revision=17958
2007-05-28 06:46:33 +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
Kristian Rietveld
5e59105ea3 translate coordinates from the window they were received on to the event
2007-05-23  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (find_widget_under_pointer): translate coordinates
	from the window they were received on to the event widget's window;
	correct for no-window widgets after that, bail out on failure.  This
	makes the coordinates given by GtkWidget::query-tooltip truly relative
	to widget->window.  (#435188).

	* gtk/gtkwidget.c (gtk_widget_class_init): update docs for
	GtkWidget::query-tooltip.


svn path=/trunk/; revision=17896
2007-05-23 12:32:42 +00:00
Kristian Rietveld
1e2e601e5c don't unref tooltip_window, since this is handled by set_qdata_full()
2007-03-28  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkwidget.c (gtk_widget_set_tooltip_window): don't unref
	tooltip_window, since this is handled by set_qdata_full() already.
	(#412001, Torsten Schoenfeld).


svn path=/trunk/; revision=17566
2007-03-28 10:00:31 +00:00
Xan Lopez
74ca458b9a Fix documentation error in gtk_widget_set_redraw_on_allocate.
* gtk/gtkwidget.c: Fix documentation error in
gtk_widget_set_redraw_on_allocate.

svn path=/trunk/; revision=17533
2007-03-16 16:05:56 +00:00
Michael Natterer
d953ce8775 Make gtk_widget_set_extension_events() work on already realized widgets
2007-03-14  Michael Natterer  <mitch@imendio.com>

	Make gtk_widget_set_extension_events() work on already realized
	widgets (bug #379550, Tommi Komulainen)

	* gdk/x11/gdkinput.c (gdk_input_set_extension_events): allow to be
	called multiple times without leaking and work correctly when
	already realized (don't rely on a configure event following).

	* gtk/gtkwidget.c (gtk_widget_set_extension_events_internal): new
	internal function which walks the GdkWindow tree and sets the
	extension events on all windows that belong to the widget.

	(gtk_widget_realize)
	(gtk_widget_set_extension_events): use the new function.


svn path=/trunk/; revision=17515
2007-03-14 13:55:12 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Kristian Rietveld
0ef946ed64 New tooltips API.
2007-02-06  Kristian Rietveld  <kris@imendio.com>

	New tooltips API.

	* gtk/Makefile.am
	* gtk/gtk.h
	* gtk/gtk.symbols: build system foo.

	* gtk/gtkmain.c (gtk_main_do_event): call tooltip event handler
	hook for appropriate events.

	* gtk/gtkmarshalers.list: add BOOLEAN:INT,INT,BOOLEAN,OBJECT.

	* gtk/gtkrc.c: add style for gtk-tooltip.

	* gtk/gtksettings.c (gtk_settings_class_init): make the
	different tooltip timeouts configurable.

	* gtk/gtkwidget.[ch]: add new properties, signals, make sure
	tooltips are hidden on unmap, destroy, update window event
	mask on realize, hook into focus change and show help
	handlers.

	* gtk/gtkwindow.h: move GtkWindow typdef to gtkwidget.h ...

	* gtk/gtktooltip.[ch]: new files.

	* tests/Makefile.am
	* tests/testtooltips.c: add test application.


svn path=/trunk/; revision=17264
2007-02-06 10:25:21 +00:00
Michael Natterer
7446ae9fd7 revert generic disabling of PRELIGHT state for the reasons given in bug
2007-01-24  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.c (gtk_widget_set_state): revert generic disabling
	of PRELIGHT state for the reasons given in bug #135666. Widget
	states are sometimes abused or otherwise used wrongly for historic
	reasons, causing this part of the patch to break e.g. menu items.


svn path=/trunk/; revision=17211
2007-01-24 16:10:40 +00:00
Carlos Garnacho
d42bbb6466 Make GtkNotebook able to drop detached tabs anywhere. Bug #360225.
2006-12-28  Carlos Garnacho  <carlosg@gnome.org>

        Make GtkNotebook able to drop detached tabs anywhere. Bug #360225.

        * gtk/gtkwidget.c (gtk_widget_class_init): add "drag-failed" signal.
        * gtk/gtkmarshalers.list: add new marshaler definition.
        * gtk/gtkenums.h: add GtkDragResult enum.

        * gtk/gtkdnd.c (gtk_drag_drop_finished): emit "drag-failed" if DND
        operation wasn't successful.
        (_gtk_drag_source_handle_event) (gtk_drag_drop)
        (gtk_drag_selection_get) (gtk_drag_cancel) (gtk_drag_key_cb)
        (gtk_drag_grab_broken_event_cb) (gtk_drag_grab_notify_cb)
        (gtk_drag_button_release_cb) (gtk_drag_abort_timeout): tell
        gtk_drag_drop_finished() the operation result.

        * gtk/gtknotebook.c (gtk_notebook_drag_failed): new function.
        (gtk_notebook_drag_data_get): do not call window creation hook here.
        (gtk_notebook_init): do not set "application/x-rootwindow-drop"
        target, instead connect to "drag-failed".
        (gtk_notebook_draw_focus): fix potential crasher if cur_page is NULL.
2006-12-28 16:38:49 +00:00
Matthias Clasen
6ef83209bd Add a g_return_if_fail. (#362614, Xan Lopez)
2006-12-27  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkwidget.c (gtk_widget_show): Add a g_return_if_fail.
        (#362614, Xan Lopez)
2006-12-27 06:45:19 +00:00
Matthias Clasen
33153bec36 Don't leak draw_border. (#387170, Kjartan Maraas)
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkwidget.c (gtk_widget_get_draw_rectangle): Don't
        leak draw_border.  (#387170, Kjartan Maraas)
2006-12-22 06:29:51 +00:00
Michael Natterer
7f374a74ba Add new infrastructure for notifications of failed keyboard navigation and
2006-11-16  Michael Natterer  <mitch@imendio.com>

	Add new infrastructure for notifications of failed keyboard
	navigation and navigation with restricted set of keys.

	The patch handles configurable beeping, navigating the GUI with
	cursor keys only (as in phone environments), and configurable
	wrap-around. Fixes bugs #322640, #70986, #318827, #334726, #334742
	and #309291.

	* gtk/gtksettings.c: added properties gtk-keynav-cursor-only,
	gtk-keynav-wrap-around and gtk-error-bell.

	* gtk/gtkwidget.[ch]: added new signal "keynav-failed" and public
	API to emit it. Added New function gtk_widget_error_bell() which
	looks at the gtk-error-bell setting and calls gdk_window_beep()
	accordingly.

	* gtk/gtk.symbols: add the new widget symbols.

	* gtk/gtkcellrendereraccel.c
	* gtk/gtkimcontextsimple.c
	* gtk/gtkmenu.c
	* gtk/gtknotebook.c: use gtk_widget_error_bell() or look at the
	gtk-error-bell setting instead of calling gdk_display_beep()
	unconditionally.

	* gtk/gtkcombobox.c
	* gtk/gtkentry.c
	* gtk/gtkiconview.c
	* gtk/gtklabel.c
	* gtk/gtkmenushell.c
	* gtk/gtkspinbutton.c
	* gtk/gtktextview.c
	* gtk/gtktreeview.c: call gtk_widget_error_bell() on failed keynav.

	* gtk/gtkentry.c
	* gtk/gtklabel.c
	* gtk/gtkrange.c
	* gtk/gtktextview.c: consult gtk_widget_keynav_failed() on failed
	cursor navigation and leave the widget if it returns FALSE.

	* gtk/gtkmenushell.c
	* gtk/gtknotebook.c: only wrap around if gtk-keynav-wrap-around
	is TRUE.

	* gtk/gtkradiobutton.c: ask gtk_widget_keynav_failed() to decide
	whether to to wrap-around, and don't select active items on cursor
	navigation if gtk-keynav-cursor-only is TRUE. Should look at
	gtk-keynav-wrap-around too, will look into that.
2006-11-16 12:56:30 +00:00
Matthias Clasen
07e7719441 Apply a cleanup patch by Kjartan Maraas (#341812)
2006-10-08  Matthias Clasen  <mclasen@redhat.com>

	* Apply a cleanup patch by Kjartan Maraas  (#341812)
2006-10-08 05:07:55 +00:00
Matthias Clasen
0724c7887b Add docs for the parent-set signal. (#353772, Mariano Suárez-Alvarez)
2006-09-09  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkwidget.c: Add docs for the parent-set signal.
        (#353772, Mariano Suárez-Alvarez)
2006-09-09 05:12:49 +00:00
Matthias Clasen
df29084c1f Fix a typo. (#354035, Mariano Suárez-Alvarez)
2006-09-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_class_init): Fix a typo.
	(#354035, Mariano Suárez-Alvarez)
2006-09-03 06:08:20 +00:00
Matthias Clasen
465daa910f Replace gtk_rc_style_ref/unref by g_object_ref/unref.
2006-07-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c:
	* gtk/gtkrc.c:
	* gtk/gtkwidget.c: Replace gtk_rc_style_ref/unref by
	g_object_ref/unref.
2006-07-21 14:52:05 +00:00
Matthias Clasen
f8794cccca Improve consistency of signal and property names 2006-07-06 05:14:03 +00:00
Matthias Clasen
01c092c00c broken pipe 2006-06-22 02:29:37 +00:00
Matthias Clasen
02ed1e9bdb Make GTK+ work as an untrusted X client. (#136571, Ed Catmur)
2006-05-25  Matthias Clasen  <mclasen@redhat.com>

	Make GTK+ work as an untrusted X client. (#136571,
	Ed Catmur)
2006-05-25 05:30:14 +00:00
Matthias Clasen
15eef255e3 Make style properties in dynamic types work better 2006-05-24 18:03:19 +00:00
Matthias Clasen
ad4a5a4aea Add docs for new style properties. (#342535, Mart Raudsepp)
2006-05-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_class_init): Add docs
	for new style properties.  (#342535, Mart Raudsepp)
2006-05-22 12:39:54 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Tim Janik
4e8e3add5b applied unified patch for configurable scroll arrow sizes from bug #333632
Wed May 10 15:57:53 2006  Tim Janik  <timj@imendio.com>

        * applied unified patch for configurable scroll arrow sizes from
        bug #333632 and bug #325282.

        * gtk/gtkwidget.c (gtk_widget_class_init): added ::scroll-arrow-hlength
        and ::scroll-arrow-vlength style properties. fixed upper limit for
        ::separator-width and ::separator-height to be MAXINT.

        * gtk/gtkmenu.c: use GtkWidget::scroll-arrow-vlength to determine the
        scroll arrow size, instead of using a hard coded constant.

        * gtk/gtknotebook.c: use GtkWidget::scroll-arrow-vlength and
        GtkWidget::scroll-arrow-hlength to determine scroll arrow sizes.
        added GtkNotebook::arrow-spacing style property to configure the
        spacing between scroll arrows.
2006-05-10 14:02:20 +00:00
Matthias Clasen
7f399f19f9 Make GtkWidget abstract again.
2006-05-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c: Make GtkWidget abstract again.
2006-05-03 16:04:07 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Behdad Esfahbod
7dc3689dbe Change colormap to font map in docs. (#340093)
2006-04-29  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtkwidget.c (gtk_widget_create_pango_layout)
        (gtk_widget_get/create_pango_context): Change colormap to font map in
        docs. (#340093)
2006-04-29 06:57:29 +00:00
Matthias Clasen
f6ce27f4c9 Fix a C99ism. (#340055, Kazuki Iwamoto)
2006-04-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_is_composited): Fix a C99ism.  (#340055,
	Kazuki Iwamoto)
2006-04-29 04:36:28 +00:00
Behdad Esfahbod
0bce92f67d Fix typo in docs. (#340063)
2006-04-28  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtkwidget.c (gtk_widget_create_pango_layout): Fix typo in
        docs. (#340063)
2006-04-28 21:43:44 +00:00
Søren Sandmann
b9d1a03440 Create 'composited' label.
Tue Apr 25 10:25:28 2006  Søren Sandmann  <sandmann@redhat.com>

	* tests/testgtk.c (create_alpha_window): Create 'composited' label.

	* tests/testgtk.c (on_composited_changed): New function, change
	the label to say whether the screen is composited or not.

	* gtk/gtkwindow.c (gtk_window_on_composited_changed): When
	composited status change, invalidate the window and propagate the signal;.

	* gtk/gtkwindow.c (gtk_window_map): Set the appropriate type hint
	if reset_type_hint is TRUE.

	* gtk/gtkwindow.c (gtk_window_set_type_hint): If hint is one of
	the old hints, store a shadow copy in the public window->type_hint
	bitfield, otherwise set this field to normal. Set the private
	field to the type hint.

	* gtk/gtkwindow.c (gtk_window_init): Initialize priv->type_hint.

	* gtk/gtkwindow.c (struct _GtkWindowPrivate): New field
	"reset_type_hint" indicating whether the type hint needs to be
	reset. New field type_hint containing a GdkWindowTypeHint.

	* gtk/gtkwidget.c (propagate_composited_changed): New function to
	propagate changes in composited status.
	(gtk_widget_class_init): Add composited_changed signal.

	* gtk/gtkwidget.h (struct _GtkWidgetClass): New signal composited-changed.

	* gtk/gtkwidget.c (gtk_widget_is_composited): New function.

	* gtk/gtktooltips.c (gtk_tooltips_draw_tips): Set transient for.

	* gtk/gtktooltips.c (gtk_tooltips_force_window): Set the type hint

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Compute whether
	the item belongs to a menubar. Set the type_hint appropriately
	depending on the outcome.

	* gtk/gtkmenu.c (gtk_menu_position): Set the default type hint here.

	* gtk/gtkmenu.c (gtk_menu_attach_to_widget): connect to hierarchy
	changed on the attach widget.

	* gtk/gtkmenu.c (attach_widget_hierarchy_changed): New function to
	set the transient_for property for menus.

	* gtk/gtkdnd.c (set_icon_stock_pixbuf): Set the appropriate type hint.

	* gtk/gtkcombo.c (gtk_combo_popup_list): Make the popup window
	transient for the toplevel.

	* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Set
	transient-for, for the popup window.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): Support for
	new window types.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_type_hint): Add support
	for new window types.

	* gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
	New function called whenever the compositing manager comes and goes.

	* gdk/x11/gdkscreen-x11.c (gdk_screen_is_composited): New function.

	* gdk/x11/gdkscreen-x11.c
	(_gdk_x11_screen_request_cm_notification, make_cm_atom,
	check_is_composited): New functions

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
	_gdk_x11_screen_process_owner_change when an
	XFixesSelectionNotifyEvent is received.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Call
	_gdk_x11_screen_request_cm_notification() on all screens.

	* gdk/quartz/gdkscreen-quartz.c (gdk_screen_is_composited): Dummy
	implementation.

	* gdk/gdkscreen.c (gdk_screen_class_init): New signal,
	'composited-changed'.

	* gdk/gdkwindow.h: Add new EWMH window types.

	* gdk/win32/gdkscreen-win32.c (gdk_screen_is_composited)
2006-04-25 14:27:32 +00:00
Matthias Clasen
4fc90e0973 Revert accidental changes 2006-04-06 03:12:04 +00:00
Matthias Clasen
12704a67bc Rework the code which emits ::grab-notify signals to ensure that we emit
2006-04-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmain.c (gtk_grab_add, gtk_grab_remove, gtk_grab_notify)
	(gtk_grab_notify_foreach): Rework the code which emits ::grab-notify
	signals to ensure that we emit enough signals. Also optimize the
	code to not do unnecessary tree walking.

	* gtk/gtkwidget.c (gtk_widget_class_init): Document ::grab-notify.
2006-04-06 01:58:38 +00:00
Ross Burton
ff8ea494f9 Turn off prelighting when gtk-touchscreen-mode is enabled (#135666)
2006-03-09  Ross Burton  <ross@openedhand.com>

	* gtk/gtkwidget.c:
	* gtk/gtkrange.c:
	* gtk/gtktogglebutton.c:
	Turn off prelighting when gtk-touchscreen-mode is enabled (#135666)
2006-03-09 18:48:38 +00:00
Michael Natterer
43cb6010cc Applied modified patch from maemo-gtk which makes separators more
2006-03-03  Michael Natterer  <mitch@imendio.com>

	Applied modified patch from maemo-gtk which makes separators more
	themeable. Fixes bug #332022.

	* gtk/gtkwidget.c: added style properties "wide-separators",
	"separator-width" and "separator-height".

	* gtk/gtkhseparator.c
	* gtk/gtkvseparator.c
	* gtk/gtkmenuitem.c
	* gtk/gtktoolbar.c: honor the new settings and paint separators
	using gtk_paint_box() if wide-separators is true.
2006-03-03 12:38:42 +00:00
Matthias Clasen
1ad93a683b Support input shapes: (#331070)
2006-02-19  Matthias Clasen  <mclasen@redhat.com>

	Support input shapes:  (#331070)

	* gdk/gdk.symbols:
	* gdk/gdkdisplay.h:
	* gdk/gdkwindow.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_display_supports_shapes)
	(gdk_display_supports_input_shapes): Functions to determine
	if a display supports shaped windows or input shapes.

	* gdk/x11/gdkwindow-x11.c (gdk_window_input_shape_combine_region):
	(gdk_window_input_shape_combine_mask):
	(gdk_window_set_child_input_shapes):
	(gdk_window_merge_child_input_shapes): Input shape versions
	of the window shape API.

	* gtk/gtk.symbols:
	* gtk/gtkwidget.h:
	* gtk/gtkwidget.c (gtk_widget_input_shape_combine_mask):
	New function to set an input shape on a widget.
2006-02-20 01:36:50 +00:00
Matthias Clasen
2540f8298b Remove redundant check. Pointed out by Bodo-Merle Sandor.
2006-02-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_send_expose): Remove redundant
	check.  Pointed out by Bodo-Merle Sandor.
2006-02-14 14:35:07 +00:00
Matthias Clasen
403aefae00 Wrap docs 2006-02-01 15:46:05 +00:00
Matthias Clasen
deb3e42d44 Add link-color and visited-link-color style properties. (#113649, Leena
2006-01-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c: Add link-color and visited-link-color style
	properties.  (#113649, Leena Gunda)

	* gtk/gtkaboutdialog.c: Use the new style properties here instead
	of the about dialogs own link-color property.
2006-01-24 00:20:06 +00:00
Matthias Clasen
37e804fe5a Add some docs about RGBA windows. (#326486, Benjamin Otte)
2006-01-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_set_app_paintable): Add some docs
	about RGBA windows. (#326486, Benjamin Otte)
2006-01-12 18:43:35 +00:00
Matthias Clasen
04eceaf621 Use the slice allocator for many small allocations.
2006-01-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaccelmap.c:
	* gtk/gtkactiongroup.c:
	* gtk/gtkdialog.c:
	* gtk/gtkfilesystemunix.c:
	* gtk/gtkgc.c:
	* gtk/gtkkeyhash.c:
	* gtk/gtkplug.c:
	* gtk/gtktextiter.c:
	* gtk/gtktextlayout.c:
	* gtk/gtkuimanager.c:
	* gtk/gtkwidget.c:
	* gtk/gtkwindow.c:
	* gtk/gtkxembed.c: Use the slice allocator for many small
	allocations.

	* gtk/gtkcolorsel.c:
	* gtk/gtktreeview.c: Use IPN.

	* gtk/gtkwidget.c: Remove an unused field from the AccelPath
	struct.
2006-01-04 07:06:12 +00:00
Matthias Clasen
7dc70fba99 Use g_slice instead of mem chunks.
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c:
	* gtk/gtkuimanager.c:
	* gtk/gtktreedatalist.c:
	* gtk/gtktext.c:
	* gtk/gtkmain.c:
	* gtk/gtkitemfactory.c:
	* gtk/gtkseparator.[hc]:
	* gtk/gtkclist.[hc]:
	* gtk/gtkctree.c:
	* gtk/gtkgc.c: Use g_slice instead of mem chunks.
2005-12-05 21:28:32 +00:00
Tim Janik
fbb2e3f4f5 deprecated floating/sink API and implemented it in terms of the GObject
Wed Nov 23 18:55:47 2005  Tim Janik  <timj@imendio.com>

        * gtk/gtkobject.[hc]: deprecated floating/sink API and implemented it
        in terms of the GObject floating/sink API.

        * gtk/gtkaboutdialog.c:
        * gtk/gtkaction.c:
        * gtk/gtkcellview.c:
        * gtk/gtkclist.c:
        * gtk/gtkcolorsel.c:
        * gtk/gtkcombobox.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkiconview.c:
        * gtk/gtkinvisible.c:
        * gtk/gtkitemfactory.c:
        * gtk/gtklayout.c:
        * gtk/gtkmenu.c:
        * gtk/gtkmenutoolbutton.c:
        * gtk/gtknotebook.c:
        * gtk/gtkprogress.c:
        * gtk/gtkrange.c:
        * gtk/gtkspinbutton.c:
        * gtk/gtkstatusicon.c:
        * gtk/gtktext.c:
        * gtk/gtktextview.c:
        * gtk/gtktoolbar.c:
        * gtk/gtktoolbutton.c:
        * gtk/gtktoolitem.c:
        * gtk/gtktreeitem.c:
        * gtk/gtktreeview.c:
        * gtk/gtktreeviewcolumn.c:
        * gtk/gtkuimanager.c:
        * gtk/gtkviewport.c:
        * gtk/gtkwidget.c:
        * gtk/gtkwindow.c:
        ported to use GObject's g_object_ref_sink().

        * gtk/gtkcolorsel.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkaboutdialog.c:
        fixed compiler warnings.
2005-11-23 18:06:58 +00:00
Matthias Clasen
155cfe3e9e Fix the documentation for the grab-broken-event signal, noticed by Damon
2005-09-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_class_init): Fix the documentation
	for the grab-broken-event signal, noticed by Damon Chaplin.
2005-09-22 14:46:23 +00:00
Matthias Clasen
463aab93dd Various cleanups. (#315360, Kjartan Maraas)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c: Various cleanups.  (#315360, Kjartan Maraas)
2005-09-13 19:57:42 +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
b3a757762c Make the GdkScreen font options api public, and add properties
2005-08-26  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/gdkscreen.h:
	* gdk/gdkscreen.c: Make the GdkScreen font options api
	public, and add properties GdkScreen::font-options and
	GdkScreen::resolution.  (#314004)

	* gdk/gdkpango.c:
	* gtk/gtksettings.c:
	* gtk/gtkwidget.c: Adjust all callers.

	* gdk/gdkintl.h: Simplify and use glib/gi18n-lib.h.
	* gdk/gdkpango.c: Include gdkintl.h, not gtkintl.h.
	* gdk/gdkscreen.c: Include gdkintl.h.
2005-08-26 18:49:52 +00:00
Owen Taylor
2b1bea02f2 Fix for #314004, reported by Michael Reinsch:
2005-08-23  Owen Taylor  <otaylor@redhat.com>

        Fix for #314004, reported by Michael Reinsch:

        * gdk/gdk.symbols:
        * gdk/gdkscreen.[ch]: Add gdk_screen_get/set_font_options_libgtk_only()
        Add gdk_screen_get/set_resolution_libgtk_only()

        * gdk/gdkpango.c (gdk_pango_context_get_for_screen): Set
        the options for the screen on the newly created context.

        * gtk/gtksettings.c (settings_update_font_options/dpi) gtkwidget.c:
        Move font options and dpi code from gtkwidget.c to gtksettings.c, set
        the font options on the screen.

        * gtk/gtkwidget.c (gtk_widget_update_pango_context): Just get
        the font options from the screen and set them on the context.
2005-08-24 03:29:06 +00:00
Owen Taylor
49e9aef502 Fix a couple of leaks.
2005-07-21  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.c (update_pango_context): Fix a couple of leaks.
2005-07-21 23:37:19 +00:00
Owen Taylor
8f3399d410 Change machinery for following font rendering xsettings to set cairo font
2005-07-19  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtksettings.c gtk/gtkwidget.c: Change machinery for
        following font rendering xsettings to set cairo font
        options on PangoContext

        * gdk/x11/gdkxftdefaults.c gdk/x11/gdkevents-x11.c gdkscreen-x11.h
        gdkprivate-x11.h: Get default values for rendering options
        (such as antialiasing, dpi) from the Xft resources for the
        display, borrowing a bit of code from Xft.

        * gtk/gtksettings.c (gtk_settings_class_init): Fix docs for
        values of gtk-xft-hintstyle.
2005-07-21 13:59:22 +00:00
Matthias Clasen
c0775d1c70 Revert an accidental commit 2005-07-21 05:24:45 +00:00
Matthias Clasen
a5bc998bfd Add hints on how to handle "no window" widgets. (#136347)
2005-07-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_modify_bg, gtk_widget_modify_base):
	Add hints on how to handle "no window" widgets.  (#136347)
2005-07-21 04:33:37 +00:00
Matthias Clasen
0d0c6e1c37 Add a note about the need to handle expose events. We really need a
2005-07-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_set_double_buffered): Add a note
	about the need to handle expose events. We really need a chapter
	on the GTK+ drawing model that we can refer to here... (#310765,
	Steve Chaplin)
2005-07-18 14:25:56 +00:00
Matthias Clasen
9b356ea0d8 Add a GrabBroken event to GDK, and a grab-broken-event signal to
2005-06-25  Matthias Clasen  <mclasen@redhat.com>

	Add a GrabBroken event to GDK, and a grab-broken-event
	signal to GtkWidget.  (#107320, Simon Cooke, initial patch
	by John Ehresman)

	* gdk/gdkevents.h: Add a GDK_GRAB_BROKEN event type,
	define a GdkEventGrabBroken event struct.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	Generate GrabBroken events in response to WM_KILLFOCUS.

	* gdk/x11/gdkmain-x11.c: Generate GrabBroken events
	when a grab is broken by the window becoming unviewable,
	or by another grab from the same client.

	* gtk/gtkwidget.h (GtkWidgetClass): Add grab_broken_event.

	* gtk/gtkwidget.c (gtk_widget_event_internal): Translate
	GrabBroken events into grab_broken_event signals.

	* gtk/gtkmain.c (gtk_main_do_event): Propagate GrabBroken
	events.

	* gtk/gtkmenushell.c (gtk_menu_shell_grab_broken): Deactivate
	the menu when the grab is broken.

	* gtk/gtkcolorsel.c (gtk_color_selection_grab_broken): Stop
	the color picker if the grab is broken.

	* gtk/gtkpaned.c (gtk_paned_grab_broken): Stop the drag if
	the grab is broken.
2005-06-25 07:10:40 +00:00