Commit Graph

428 Commits

Author SHA1 Message Date
Benjamin Otte
85b17e778c button: Don't emit a signal on broken grabs
We don't emit one on grab notify, so we don't want one for broken grabs
either.
2013-12-03 01:57:38 +01:00
Matthias Clasen
9a04a27ba6 GtkButton: don't propagate double-clicks
It is basically always unexpected to have a container handle
double-clicks on a widget that handles single-clicks itself.
2013-11-15 23:43:05 -05:00
Matthias Clasen
c46aca463a Respect deprecated button images setting
I have been convinced that it is a bad idea to change the behaviour
at the same time as deprecating it, so go back to respecting the
Gtk/ButtonImages xsetting in buttons created with
gtk_button_new_from_stock() when it is set.

The setting as well as the function are still deprecated, and the
default value of the setting will remain FALSE.
2013-10-24 20:35:55 -04:00
Bastien Nocera
438cd857c4 all: Add names to timeouts
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
Matthias Clasen
64d0ecaec8 Redo style class handling
We should set the appropriate style classes when we have
constructed the content and know if it is a label, an image,
or both. Doing this in the convenience constructors is
problematic for language bindings, and misses out when the
content is changed after construction.
2013-08-19 14:42:18 -04:00
Matthias Clasen
27cb50b48c Revert "Add the "text-button" style to button created with gtk_button_new_with_{label,mnemonic}"
This reverts commit 8d7bab7d7b.
2013-08-19 14:42:18 -04:00
Yosef Or Boczko
8d7bab7d7b Add the "text-button" style to button created with gtk_button_new_with_{label,mnemonic}
https://bugzilla.gnome.org/show_bug.cgi?id=706220
2013-08-18 10:12:49 +03:00
Yosef Or Boczko
89f701ab2e oopx - fix typo
Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com>
2013-08-14 10:45:35 +03:00
Yosef Or Boczko
2f77a61e61 Add gtk_button_new_from_icon_name
This function is a convenience wrapper around
gtk_button_new() and gtk_button_set_image().

https://bugzilla.gnome.org/show_bug.cgi?id=705918

Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com>
2013-08-14 10:41:42 +03:00
Matthias Clasen
2f1fa7cdc3 Drop some unnecessary includes
Drop includes of deprecated headers where they are
no longer needed.
2013-07-19 22:32:23 -04:00
Matthias Clasen
0aa57d26b5 Move wholly deprecated classes to gtk/deprecated/
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.

Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
William Jon McCann
72c3879893 Add missing G_PARAM_DEPRECATED to stock deprecations 2013-07-08 15:39:55 -04:00
William Jon McCann
c96a1c4980 Deprecate GtkAction and GtkUIManager
It is recommended to use GAction et al and GtkBuilder.
2013-06-30 11:19:50 -04:00
William Jon McCann
65c31629c3 Deprecate and ignore gtk-button-images setting
Button images can still be enabled selectively by the app author
using the always-use-image property on the button.
2013-06-26 09:15:22 -04:00
William Jon McCann
424e1d0059 Start deprecating some GtkStock API 2013-06-25 19:05:32 -04:00
Bastien Nocera
7d54fc14bf GtkButton: Don't suppress unhandled mouse events
Mouse events that we do not handle should bubble up to the parent
widget, so they can be handled there, instead of disappearing inside
the button. Also use GDK_EVENT_{STOP,PROPAGATE} to make return
values clearer.

https://bugzilla.gnome.org/show_bug.cgi?id=696640
2013-05-18 14:49:55 +02:00
Benjamin Otte
cb99cd2052 button: Rework size request/allocation code
- Split out a common function
- Implement hfw properly.
2013-05-01 16:41:11 +02:00
Benjamin Otte
01fe4ce7f4 button: Use _gtk_widget_get_preferred_size_for_size()
This was accidently lost when merging baseline support.
2013-05-01 16:41:11 +02:00
Alexander Larsson
d6684b5748 GtkButton: Add baseline align support 2013-04-23 05:58:06 +02:00
Benjamin Otte
315261260c button: Implement height-for-width
https://bugzilla.gnome.org/show_bug.cgi?id=698433
2013-04-22 18:29:21 -04:00
Alexander Larsson
3d4cd4db3e Add gtk_widget_(un)register_window
This replaces the previously hardcoded calls to gdk_window_set_user_data,
and also lets us track which windows are a part of a widget. Old code
should continue working as is, but new features that require the
windows may not work perfectly.

We need this for the transparent widget support to work, as we need
to specially mark the windows of child widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Sébastien Granjoux
af5ecd77e3 button: Clear highlight when a button is removed from a container
A button is highlighted if the private variable in_button is TRUE.
This variable is set when the pointer is over the button and cleared when
it left the button. When a button is hidden while there is the pointer over
it, GTK generates a leave notification event, in_button is set to FALSE.
But when a button is removed from a container but not destroyed, it is
unrealized and loose its window. It cannot receive the leave notification
event and in_button stay TRUE. So when the button get a new parent it is still
highlighted.

https://bugzilla.gnome.org/show_bug.cgi?id=676890
2012-09-16 23:28:02 -04:00
Ryan Lortie
694be447e3 port GtkButton to GtkActionHelper 2012-08-20 13:11:02 -04:00
William Jon McCann
346b933a85 Provide a way to force showing icons in buttons
https://bugzilla.gnome.org/show_bug.cgi?id=676429
2012-05-21 13:57:18 -04:00
Benjamin Otte
8b1385804e button: Remove _gtk_button_paint()
All buttons use the same paint function these days. States are managed
correctly so this was just leftovers from GTK 1 or GTK 2.
2012-04-17 08:59:23 +02:00
Benjamin Otte
1d54e4e867 widget: Set .default class when widget is default
Don't just conditionally set it on buttons.
2012-04-17 08:59:22 +02:00
Carlos Garnacho
2ccf29f6b3 button: Handle touch events
Touch events don't generate crossing events themselves, so
do not rely on these to determine whether the button release
happened within the event window.
2012-03-01 16:25:25 -05:00
Cosimo Cecchi
5495152e30 button: don't be active when holding the mouse button outside the bounds
GtkButton currently draws itself as active (pressed down) in case we're
pressing and holding the mouse pointer outside its bounds; this is
misleading though, since we won't activate the button unless the mouse
is released inside the button itself.
Fix this by only setting the ACTIVE state flag when the button is
actually pressed down.

https://bugzilla.gnome.org/show_bug.cgi?id=668141
2012-03-01 15:57:55 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Murray Cumming
842d3ac53d GtkButton: Small documentation improvements 2012-02-13 09:18:07 +01:00
Carlos Garcia Campos
e796f3a4e7 gtkbutton: Use symbolic names for button numbers 2012-01-27 09:47:42 +01:00
Ryan Lortie
b7a28de755 GtkButton: don't do string compare on property set
Just set the property unconditionally.

https://bugzilla.gnome.org/show_bug.cgi?id=667394
2012-01-11 00:26:56 -05:00
Ryan Lortie
ab91527032 Rename gtk_application_window_get_observer
This should have been called _create_observer

https://bugzilla.gnome.org/show_bug.cgi?id=667394

Fixup switch
2012-01-11 00:26:47 -05:00
Rui Matos
a1f72eb06c Revert "button: Stop setting state flags on the style context for drawing"
Setting state flags is actually needed here since this function is called by
GtkButton subclasses which add their specific state flags as a parameter.

This reverts commit e868b8d6ea.
2012-01-09 16:45:44 +00:00
Ryan Lortie
cf2590d673 GtkButton: do not allow both types of actions
Only allow one of 'action-name' or 'related-action' to be set.

https://bugzilla.gnome.org/show_bug.cgi?id=667394
2012-01-09 15:02:10 +01:00
Ryan Lortie
88ec007b98 Add new GtkActionable interface
This is the interface for GtkWidgets that can be associated with an
action on a GtkAppicationWindow or associated GtkApplication.

It essentially features 'action-name' and 'action-target' properties
with some associated convenience API.

This interface is implemented by GtkButton and GtkToolButton.

https://bugzilla.gnome.org/show_bug.cgi?id=667394
2012-01-09 15:02:06 +01:00
Cosimo Cecchi
2827cd4518 button: deprecate the inner-border style property
Since we allocate the standard CSS border to the button now, and center
the child accordingly, there's no need for an additional inner-border
style property. Deprecate it and ignore its values.

https://bugzilla.gnome.org/show_bug.cgi?id=666600
2011-12-20 19:01:38 +01:00
Cosimo Cecchi
0021ef19fa button: add CSS borders to the size request
And allocate the button children according to it as well.

https://bugzilla.gnome.org/show_bug.cgi?id=666600
2011-12-20 19:01:38 +01:00
Cosimo Cecchi
fe59c5f954 button: add a border param to gtk_button_get_props()
We'll use it later to compute the child offsets.

https://bugzilla.gnome.org/show_bug.cgi?id=666600
2011-12-20 19:01:38 +01:00
Rui Matos
e868b8d6ea button: Stop setting state flags on the style context for drawing 2011-12-19 19:21:15 +00:00
Benjamin Otte
9aa7e9f050 button: Don't call deprecated functions 2011-11-08 21:14:05 +01:00
Matthias Clasen
5ff8fe6971 Documentation fixes
Mostly making sure that return values and varargs don't loose
their docs.
2011-09-25 21:04:49 -04:00
Matthias Clasen
383127cd0b Clean up unneeded includes 2011-08-28 01:40:10 -04:00
Matthias Clasen
2ba9c4b4a7 Make focus rectangles optional
This commit introduces a new setting, gtk-visible-focus, backed
by the Gtk/VisibleFocus X setting. Its three values control how
focus rectangles are displayed.

'always' is equivalent to the traditional GTK+ behaviour of always
rendering focus rectangles.

'never' does what it says, and is intended for keyboardless
situations, e.g. tablets.

'automatic' hides focus rectangles initially, until the user
interacts with the keyboard, at which point focus rectangles
become visible.

https://bugzilla.gnome.org/show_bug.cgi?id=649567
2011-08-10 16:34:20 +02:00
Matthias Clasen
8432ea3574 Convert GailButton to GtkButtonAccessible
This drops the AtkText implementation, and also strips handling
of children out. Instead of listening for enter/leave/press/released,
just listen for state changes on the widget.
2011-07-05 16:08:57 -04:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Benjamin Otte
c1b2cbcf50 button: Remove unused variables 2011-05-27 16:11:10 +02:00
Cosimo Cecchi
c8a59a6f92 all: avoid boxed structs copying where possible
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.

https://bugzilla.gnome.org/show_bug.cgi?id=650420
2011-05-18 10:27:21 -04:00
Carlos Garnacho
52452236bc button: Fix typo in keyboard grab's evmask
https://bugzilla.gnome.org/show_bug.cgi?id=650382, spotted
by Alexander Larsson.
2011-05-17 13:17:25 +02:00
Cosimo Cecchi
b1d08fe0e9 button: don't use the border values for padding
It's wrong, and makes it impossible to theme the button properly.

https://bugzilla.gnome.org/show_bug.cgi?id=646882
2011-04-12 17:14:31 -04:00
Cosimo Cecchi
f1a7be7f57 button: make gtk_button_get_props() return the padding too
https://bugzilla.gnome.org/show_bug.cgi?id=646882
2011-04-12 17:14:29 -04:00
Murray Cumming
f91c04e284 Minor documentation improvements
Mostly correcting it's to its and changing some , to .
2011-02-23 10:26:21 +01:00
Matthias Clasen
beb8c290d1 Always chain up in ::style-updated
This was not handled consistently, but the default handler
does useful things, so we should always chain up.
2011-02-07 07:30:37 -05:00
Matthias Clasen
d9fcc4c630 Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 21:51:38 -05:00
Carlos Garnacho
a0e1fa9e77 Gtk(Toggle)Button: preserve untouched state flags when updating state.
Partly fixes bug #640282, noticed by Christian Persch. buttons were
clobbering the insensitive flag when updating their state.
2011-01-23 19:34:38 +01:00
Federico Mena Quintero
d07231cb7a bgo#626336 - Don't assume that GtkButton is activated only when a keyboard event is available
Buttons may also be activated at any time from gtk_widget_activate()
or related functions.  In that case, just do the 'show the button
as pushed for a short amount of time' trick, but don't actually
try to grab the keyboard device.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-01-21 15:48:39 -06:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Pavel Holejsovsky
a1c297a310 [GI] Cosmetic cleanups of annotations and doc comments
This change does not introduce any functionality change, mostly
cosmtic cleanups, like re-linebreak when introduced annotations messed
up indentation or whitespace errors fixes.
2011-01-18 17:31:59 +01:00
Carlos Garnacho
e0e36b621f Update _gtk_button_paint() arguments to GtkStyleContext
The detail strings weren't in use anymore, and the state
argument is now a GtkStateFlags. GtkToggleButton has been
updated as well.
2011-01-10 03:49:59 +01:00
Matthias Clasen
98440ad031 Remove gtktypeutils altogether
Based on patches by Javier Jardón.

https://bugzilla.gnome.org/show_bug.cgi?id=629955
2011-01-04 14:51:19 -05:00
Paolo Borelli
b36cb87df9 Use the new style context API in GtkButton
Mostly replaces gtk_widget_style_get with gtk_style_context_get_style
2010-12-05 23:12:32 +01:00
Carlos Garnacho
cf0bd12e6c GtkStyleProperties: Turn border-width into a GtkBorder property.
All current users of this CSS property have been updated to deal
with a GtkBorder.

Also a 0 border width has been set in the default CSS to ensure
GtkStyleContext and GtkThemingEngine always provide a non-NULL
pointer for this property.
2010-12-04 15:39:52 +01:00
Carlos Garnacho
9c0ef02ea5 GtkButton: Remove unneeded gtk_style_context_notify_state_change() calls
There is now code to handle this for one-item widgets (such as GtkButton)
in gtk_widget_set_state_flags()
2010-12-04 15:39:41 +01:00
Carlos Garnacho
4689b63739 GtkButton: Use GtkStyleContext for rendering. 2010-12-04 15:38:55 +01:00
Carlos Garnacho
401b655307 GtkButton: Set widget state as state flags. 2010-12-04 15:38:30 +01:00
Carlos Garnacho
5b11d14a49 GtkButton: Notify on prelight state change. 2010-12-04 15:38:17 +01:00
Carlos Garnacho
91904f6778 GtkButton: Notify on active state when (un)depressed 2010-12-04 15:38:09 +01:00
Michael Natterer
fb5dd9f72f Move all GdkDevice members to private and add one missing accessor 2010-11-23 20:25:13 +01:00
Javier Jardón
dec57f8ce9 Create a private header to access some GtkButton variables 2010-11-19 06:15:26 +01:00
Javier Jardón
c295ab0943 gtktbutton: Move public members to private structure 2010-11-19 06:15:26 +01:00
Javier Jardón
9e78176685 docs: Fix a typo in gtk_button_set_alignment() docs 2010-11-16 03:37:42 +01:00
Michael Natterer
3a0afce509 gtk: remove "gboolean homogeneous" from gtk_box_new()
Because it's FALSE in virtually all use cases.
2010-10-31 19:22:28 +01:00
Javier Jardón
a9894d4cf4 Use gtk_box_new() instead gtk_[v|h]box_new() 2010-10-30 05:22:58 +02:00
Alberto Garcia
d6a73fd5b0 Assign all g_signal_connect() and friends to gulong variables
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=87821
2010-10-22 18:58:47 +02:00
Ryan Lortie
c7e1f567b6 GtkButton: avoid use of gtk_get_event_widget()
We can compare the window to the window instead of the widget to the
widget.
2010-10-21 00:37:29 +02:00
Emmanuele Bassi
9f9edb662e settings: Move setting property registration in gtksettings.c
Some GtkSettings property are registered by other classes. This leads
to the "interesting" issue that setting GtkSettings:gtk-button-images
requires that the GtkButton class is referenced first - or that a
GtkButton is created.

https://bugzilla.gnome.org/show_bug.cgi?id=632538
2010-10-20 10:34:25 +01:00
Javier Jardón
eac1959d2c Move destroy signal to GtkWidget
Also make GtkWidget derive from GInitiallyUnowned
2010-09-26 22:18:18 -04:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.

Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.

So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
  gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
  gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.

The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Benjamin Otte
1d3f6b30b0 API: Rename gtk_cairo_paint_*() to gtk_paint_*()
Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
2010-09-26 15:11:42 +02:00
Benjamin Otte
748d3d612d button: Port to draw vfunc
Also port togglebutton, they use the same paint function.
2010-09-26 15:11:39 +02:00
Benjamin Otte
e0be884297 button: Remove is_drawable() check
It's already done in the expose function
2010-09-26 15:11:39 +02:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Havoc Pennington
85735112d7 GtkButton: let GtkContainer handle border width 2010-09-12 21:47:10 -04:00
Javier Jardón
6cad69e32a gtk/gtkbutton.c: use accessor functions to access GtkWidget 2010-08-22 22:56:15 +02:00
Carlos Garnacho
bddb72476c GtkButton: Also handle activate from mouse events. 2010-08-17 15:45:17 +02:00
Tristan Van Berkom
9ddef2365f Fixed expressions in gtk_button_size_allocate()
Children were getting negative allocations by misusage
of MAX() macro (bad signedness of expressions).
2010-08-07 17:41:29 -04:00
Javier Jardón
5828453ae5 Use accessor functions to access GtkAlignment 2010-07-14 01:48:53 +02:00
Javier Jardón
4427760bcc Use GtkBin accessors 2010-07-13 19:40:47 +02:00
Javier Jardón
3a10216dd0 Use accessor functions to acces GtkContainer 2010-07-13 19:40:46 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Tadej Borovšak
2ed1bab6bf [docs] GtkButton: Move documentation to inline comments
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=617386

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-07-06 22:46:40 +02:00
Mirsal Ennaime
23a61525f6 Add an accessor for the GSEALed Gtkbutton's event_window attribute
* Add the gtk_button_get_event_window() function

Closes: bgo#622581
2010-06-26 21:22:02 -04:00
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
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -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
51ffd59884 Implement GtkExtendedLayout on GtkButton
GtkButton as a content type of widget needs to forward natural size information
to parent containers in order to be resized naturally.
2010-04-06 20:48:41 -04:00
Javier Jardón
8ea37e551b Don't use GTK_WIDGET_STATE in internal code anymore
Use gtk_widget_get/set_state() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:59:06 -04:00
Javier Jardón
e082783fbb 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-04-03 20:59:03 -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
ee0bf98769 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:59 -04:00
Javier Jardón
76943117be Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_CAN_FOCUS)
Use new API instead: gtk_widget_set_can_focus ()
2010-04-03 20:58:22 -04:00
Javier Jardón
3ebbee6958 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_RECEIVES_DEFAULT)
Use new API instead: gtk_widget_set_receives_default ()
2010-04-03 20:58:21 -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
eb90ec7513 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:30 -04:00
Javier Jardón
c3f8b4226d Deprecate widget flag: GTK_WIDGET_SENSITIVE
Use gtk_widget_get_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:30 -04:00
Javier Jardón
e7127daf84 Deprecate widget flag: GTK_WIDGET_IS_SENSITIVE
Use gtk_widget_is_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:29 -04:00
Javier Jardón
04aba4bde2 Deprecate widget flag: GTK_WIDGET_DRAWABLE
Use gtk_widget_is_drawable() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:29 -04:00
Javier Jardón
f8d1cf58af Deprecate widget flag: GTK_WIDGET_CAN_FOCUS
https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:55:11 -04:00
Javier Jardón
69de358b38 Deprecate some widget flags
Deprecate the following:
GTK_WIDGET_APP_PAINTABLE
GTK_WIDGET_CAN_DEFAULT
GTK_WIDGET_DOUBLE_BUFFERED
GTK_WIDGET_HAS_DEFAULT
GTK_WIDGET_HAS_GRAB
GTK_WIDGET_RECEIVES_DEFAULT

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:55:10 -04:00
Christian Dywan
b20f2d26b4 Reset the pressed state of a button when the screen changes
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=599397
2009-12-11 17:17:38 +01:00
Matthias Clasen
53218f5c82 Improve docs of two style properties
See discussion in bug 561334. Based on a patch by Paul Bolle.
2009-11-28 02:17:40 -05:00
Matthias Clasen
584c9c8a02 Make stock buttons have mnemonics again
We used to treat stock buttons as having an implicit use-underline.
A recent but fix lost that.
2009-07-01 19:02:45 -04:00
Matthias Clasen
6382eac6d8 Fix an oversight in mnemonic handling
In some situations, GtkButton would ignore the use-underline
property. This was reported in bug 586330.
2009-06-18 22:12:26 -04:00
Matthias Clasen
e6f6ee193d Rename gtk_activatable_reset to gtk_activatable_sync_action_properties,
* gtk/gtk.symbols:
        * gtk/gtkactivatable.[hc]: Rename gtk_activatable_reset to
        gtk_activatable_sync_action_properties, since the previous name
        was deemed too generic. Update all implementations.


svn path=/trunk/; revision=22389
2009-02-22 05:20:14 +00:00
Matthias Clasen
2d0c9e81be Activate the action in a regular clicked handler instead of the default
* gtk/gtkbutton.c: Activate the action in a regular clicked
        handler instead of the default handler, to make it work with
        derived classes which don't chain up their clicked handler.


svn path=/trunk/; revision=22227
2009-01-27 02:55:02 +00:00
Matthias Clasen
bb72b647f6 i Bug 560228 – Add "action-controller" property to GtkWidgetClass
Rework the way actions and proxies interact, to make the
        interaction less ad hoc, more extensible, and better suited
        for support in GUI builders like glade.

        To be used as a proxy, a widget must now implement the
        GtkActivatable interface, and GtkActivatable implementations
        are responsible for syncing their appearance with the action
        and for activating the action.

        All the widgets that are commonly used as proxies implement
        GtkActivatable now.

        Patch by Tristan van Berkom.

        * gtk/gtkactivatable.[hc]: The GtkActivatable interface.

        * gtk/gtkbutton.c:
        * gtk/gtktogglebutton.c:
        * gtk/gtktoolitem.c:
        * gtk/gtktoolbutton.c:
        * gtk/gtktoggletoolbutton.c:
        * gtk/gtkmenuitem.c:
        * gtk/gtkcheckmenuitem.c:
        * gtk/gtkimagemenuitem.c:
        * gtk/gtkradiomenuitem.c:
        * gtk/gtkrecentchooserprivate.h:
        * gtk/gtkrecentchooser.c:
        * gtk/gtkrecentchooserdefault.c:
        * gtk/gtkrecentchoosermenu.c: Implement GtkActivatable.
        * gtk/gtkaction.[hc]: Move appearance synchronization to
        GtkActivatable implementations.

        * gtk/gtkradioaction.c:
        * gtk/gtkrecentaction.c:
        * gtk/gtktoggleaction.c:
        * gtk/gtkactiongroup.c: Adapt.

        * gtk/gtk.h: Include gtkactivatable.h
        * gtk/gtk.symbols: Add new functions


svn path=/trunk/; revision=22195
2009-01-23 15:15:28 +00:00
Christian Dywan
11faf1c6bd Improve documentation of "gtk-button-images" setting
svn path=/trunk/; revision=21123
2008-08-15 08:23:53 +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
Cody Russell
4e3c97b3f2 Bug 56070 – Can't click button after setting it sensitive.
2008-07-31  Cody Russell  <bratsche@gnome.org>

        Bug 56070 – Can't click button after setting it sensitive.

        * gtk/gtkwidget.[ch] 
        * gtk/gtkwindow.c
        * gtk/gtkmain.c
        * gtk/gtkbutton.c
        * gtk/gtkprivate.h
        * gdk/gdkevents.h: Synthesize crossing events events where necessary.

        * gtk/tests/crossingevents.c: Add unit tests for crossing events.

        Big thanks to Ed Catmur, Matthias Clasen, and everyone else who
        has worked on and helped out with this.


svn path=/trunk/; revision=20924
2008-08-01 03:30:50 +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
33d64796d0 Document a style property
2008-06-20  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkbutton.c: Document a style property


svn path=/trunk/; revision=20664
2008-06-21 12:34:12 +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
Johan Dahlin
12934f6841 Don't markup deprecated in italics.
2008-06-17  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkaboutdialog.c:
    * gtk/gtkbutton.c (gtk_button_class_init):
    Don't markup deprecated in italics.


svn path=/trunk/; revision=20441
2008-06-18 01:19:53 +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
Matthias Clasen
34e44d63ea Don't leave priv->image dangling when use-stock is set to FALSE. (#437281,
2007-07-03  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkbutton.c (gtk_button_construct_child): Don't leave
        priv->image dangling when use-stock is set to FALSE.  (#437281,
        Jochen Baier)


svn path=/trunk/; revision=18362
2007-07-03 17:09:42 +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
75092d295b Unparent the old image before overwriting priv->image. (#437281, Jochen
2007-05-10  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkbutton.c (gtk_button_set_image): Unparent the old
        image before overwriting priv->image.  (#437281, Jochen Baier)


svn path=/trunk/; revision=17816
2007-05-10 20:19:38 +00:00
Matthias Clasen
a9d25d6235 When shift-clicking, keep the larger part of the selection selected.
2006-12-24  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkentry.c (gtk_entry_button_press): When
        shift-clicking, keep the larger part of the selection
        selected.  (#353709, Benjamin Otte)

        * gtk/gtkbutton.c (gtk_button_get_props): Use
        gtk_border_free when freeing borders.
2006-12-24 06:32:07 +00:00
Matthias Clasen
650fd1fd27 Be more careful when faking a button release. (#323146, Travis Abbott)
2006-12-24  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkbutton.c (gtk_button_grab_notify): Be more
        careful when faking a button release.  (#323146,
        Travis Abbott)
2006-12-24 06:06:37 +00:00
Matthias Clasen
721c3bc101 Replace a lot of idle and timeout calls by the new gdk_threads api.
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * *.c: Replace a lot of idle and timeout calls by
        the new gdk_threads api.
2006-12-22 19:10:43 +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
bb6b1f152f Don't call construct_child here, since some apps make assumptions about
2006-06-08  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkbutton.c (gtk_button_style_set): Don't call
        construct_child here, since some apps make assumptions
        about the lifecycle of the constructed label.
2006-06-08 12:47:05 +00:00
Matthias Clasen
9095bd257b Add an icon-spacing style property for the same purpose.
2006-06-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolbutton.c (gtk_tool_button_class_init): Add
	an icon-spacing style property for the same purpose.

	* gtk/gtkbutton.c (gtk_button_class_init):  Add an image-spacing
	style property that allows to adjust the spacing between image
	and label in button.  (#320431, James Moger)
2006-06-01 13:42:14 +00:00
Matthias Clasen
e26ffe55e1 Add a GtkButton::image-position property with getter and setter, to allow
2006-05-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkbutton.h:
	* gtk/gtkbutton.c: Add a GtkButton::image-position property
	with getter and setter, to allow constructing buttons with
	the image stacked on top of the label.  (#342930, Johan Dahlin)
2006-05-31 00:22:19 +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
459eeebde9 Fix handling of image-only buttons. (#332985, Kalle Vahlmann, #333555)
2006-03-05  Matthias Clasen  <mclasen@redhat.com>

	Fix handling of image-only buttons.  (#332985, Kalle
	Vahlmann, #333555)

	* gtk/gtkbutton.c (gtk_button_construct_child): Don't
	return early if there an image to show.
	(show_image): Always return TRUE if there is no text.
2006-03-06 03:47:06 +00:00
Michael Natterer
fbcf588227 remove the "child-spacing" style property again and add "inner-border"
2006-01-17  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbutton.c: remove the "child-spacing" style property again
	and add "inner-border" instead. That's far more flexible and
	"child-spacing" was a bad name anyway.
2006-01-17 15:49:18 +00:00
Michael Natterer
52ee8588c2 applied patch from maemo-gtk which adds a child-spacing style property.
2006-01-16  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbutton.c: applied patch from maemo-gtk which adds a
	child-spacing style property. Fixes bug #327202.
2006-01-16 14:49:36 +00:00
Matthias Clasen
56b4314ae9 Check arguments. (#317491, Paolo Borelli)
2005-09-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Check arguments.  (#317491,
	Paolo Borelli)
2005-09-29 13:42:21 +00:00
Matthias Clasen
ece1601498 No point in using a mem chunk for window groups, buttons, labels.
2005-09-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_get_type):
	* gtk/gtkbutton.c (gtk_button_get_type):
	* gtk/gtkwindow.c (gtk_window_group_get_type): No point in
	using a mem chunk for window groups, buttons, labels.
2005-09-14 04:31:23 +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
f4bbe8f0de Also intern static strings passed to g_object_set_data() 2005-08-31 17:58:55 +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
Manish Singh
5cc0696de6 declare _gdk_xgrab_check_button_event.
Thu Jun 30 14:17:24 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkprivate-x11.h: declare _gdk_xgrab_check_button_event.

        * gtk/gtkbutton.c: fix signature of gtk_button_grab_broken.
2005-06-30 21:18:34 +00:00
Matthias Clasen
87cafe5b4b Handle broken grabs.
2005-06-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkbutton.c (gtk_button_grab_broken): Handle broken
        grabs.

        * gtk/gtkrange.c (gtk_range_grab_broken): Handle broken
        grabs.

        * gdk/gdkevents.h: Add a boolean to specify wether the broken
        grab was implicit.

        * gdk/x11/gdkdisplay-x11.c (gdk_display_pointer_is_grabbed):
        As the documentation states, don't return TRUE for
        implicit grabs.

        * gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add
        a boolean field to store wether a pointer grab is implicit.

        * gdk/x11/gdkmain-x11.c (_gdk_xgrab_check_button_event):
        Track implicit grabs.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
        _gdk_xgrab_check_button_event for button events.
2005-06-30 03:35:30 +00:00
Matthias Clasen
f49eab1248 Continue to activate even if we can't grab the keyboard.
2005-06-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_real_button_activate): Continue
	to activate even if we can't grab the keyboard.
	(gtk_button_finish_activate): Only ungrab when we have
	a keyboard grab.  (#172998, William Jon McCann)
2005-06-27 20:04:33 +00:00
Matthias Clasen
3be3d84b6a Don't trigger warnings if there are extra references to the hbox.
2005-06-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_construct_child): Don't
	trigger warnings if there are extra references to the
	hbox.  (#308677, Dan Winship)
2005-06-23 04:24:24 +00:00
Matthias Clasen
c06b5609d2 Document several button signals as not useful. `
2005-06-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_class_init): Document
	several button signals as not useful.
`
2005-06-17 18:42:49 +00:00
Matthias Clasen
8f95bb18f6 Add some more docs. (#307818, Christian Persch)
2005-06-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Add some more
	docs.  (#307818, Christian Persch)
2005-06-16 12:51:00 +00:00
Sven Neumann
5fc338544b Merged from gtk-2-6:
2005-03-31  Sven Neumann  <sven@gimp.org>

	Merged from gtk-2-6:

	* gtk/gtkbutton.c
	* gtk/gtkiconview.c: fixed gtk-doc comments.
2005-03-31 17:04:25 +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
Matthias Clasen
b6c29a5f1a : Mark param spec strings as static. 2005-03-21 06:02:43 +00:00
Matthias Clasen
cca8dd6347 Make PLT-reduction work with gcc4, and don't include everything in
2005-03-20  Matthias Clasen  <mclasen@redhat.com>

	Make PLT-reduction work with gcc4, and don't include
	everything in gdkalias.h:

	* gtk/grk.symbols: Group symbols by header and source file.
	* gtk/makegtkalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegtkalias.pl -def
	* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
	this file.
	* gtk/*.c: Include gtkalias.h after the other headers,
	include gtkaliasdef.c at the bottom.
	* gtk/*.h: Small cleanups.
2005-03-20 07:01:23 +00:00
Matthias Clasen
263bce4445 x
2005-03-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init):
	* gtk/gtkrange.c (gtk_range_class_init):
	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init):
	* gtk/gtktexttag.c (gtk_text_tag_class_init):
	* gtk/gtktextview.c (gtk_text_view_class_init):
	* gtk/gtkscrollbar.c (gtk_scrollbar_class_init):
	* gtk/gtknotebook.c (gtk_notebook_class_init):
	* gtk/gtkentry.c (gtk_entry_class_init):
	* gtk/gtkexpander.c (gtk_expander_class_init):
	* gtk/gtkarrow.c (gtk_arrow_class_init):
	* gtk/gtkalignment.c (gtk_alignment_class_init):
	* gtk/gtkbutton.c (gtk_button_class_init):
	* gtk/gtklabel.c (gtk_label_class_init):
	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_class_init):
	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init): x
	* gtk/gtkcellrenderer.c (gtk_cell_renderer_class_init):
	* gtk/gtktreeview.c (gtk_tree_view_class_init):
	* gtk/gtkbox.c (gtk_box_class_init):
	* gtk/gtkwindow.c (gtk_window_class_init, gtk_window_class_init):
	* gtk/gtkcontainer.c (gtk_container_class_init):
	* gtk/gtkwidget.c (gtk_widget_class_init):
	* gtk/gtkobject.c (gtk_object_class_init): Use canonical names
	when registering param specs.
2005-03-09 04:04:40 +00:00
Matthias Clasen
35819662f8 Fix docs. (#165180, Jeff Franks)
2005-01-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Fix docs.  (#165180,
	Jeff Franks)
2005-01-25 20:54:00 +00:00
Matthias Clasen
4a6b6aa45c Allow unsetting the custom image by passing NULL. (gtk_button_init):
2005-01-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Allow unsetting the
	custom image by passing NULL.
	(gtk_button_init): Initialize image_is_stock to TRUE, fixing
	a problem with changing stock labels.  (#162273, Marcin
	Krzyzanowski)
2005-01-02 03:14:34 +00:00
Matthias Clasen
283ce68f83 Fix a stupid oversight. 2004-11-17 01:21:16 +00:00
Matthias Clasen
d651bb25cd Really free the list. (#158422, Morten Welinder)
2004-11-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimagemenuitem.c (gtk_image_menu_item_setting_changed):
	* gtk/gtkbutton.c (gtk_button_setting_changed): Really free the
	list.  (#158422, Morten Welinder)
2004-11-16 02:06:20 +00:00
Matthias Clasen
a5869f4c50 Use GPOINTER_TO_UINT()/GUINT_TO_POINTER() for guints. (#158420, Morten
2004-11-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimagemenuitem.c (gtk_image_menu_item_screen_changed):
	* gtk/gtkbutton.c (gtk_button_screen_changed): Use
	GPOINTER_TO_UINT()/GUINT_TO_POINTER() for guints.  (#158420,
	Morten Welinder)
2004-11-16 02:01:41 +00:00
Matthias Clasen
10132d37c9 *** empty log message *** 2004-11-15 20:56:28 +00:00
Matthias Clasen
5cfa1d1b20 *** empty log message *** 2004-11-15 18:07:22 +00:00
Matthias Clasen
32e685c8d4 Revert the button state to !button_down, if we're missing the release
2004-09-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c: Revert the button state to !button_down,
	if we're missing the release event due to grab shadowing
	or insensitivation.

	* gtk/gtkpathbar.c: Make the slider buttons scroll.
2004-09-26 05:47:11 +00:00
Matthias Clasen
ecc1ceee3c Remove unnecessary g_return_if_fail()s from virtual functions. (#153469,
2004-09-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrange.c (gtk_range_map, gtk_range_unmap):
	* gtk/gtkbutton.c (gtk_button_map, gtk_button_unmap): Remove
	unnecessary g_return_if_fail()s from virtual functions.  (#153469,
	(Tristan Van Berkom)
2004-09-22 20:39:56 +00:00
Matthias Clasen
ef7455d981 Add a boolean ::displace-focus style property and apply child displacement
2004-09-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_class_init): Add a boolean ::displace-focus
	style property and apply child displacement to the focus rectangle
	if it is TRUE.  (#141170, Soeren Sandmann)
2004-09-20 14:43:18 +00:00
Matthias Clasen
e4e4aca0fc Fix #150125:
Mon Aug 16 01:35:25 2004  Matthias Clasen  <maclas@gmx.de>

	Fix #150125:

	* gtk/gtkcombobox.[hc]: Add a ::focus-on-click property and
	change the default behaviour to focus on click.

	* gtk/gtkbutton.c (gtk_button_set_focus_on_click): Typo fix.
2004-08-16 05:43:50 +00:00
Matthias Clasen
3612aee585 Add hidden aliases for exported symbols which are used internally in order
Mon Aug  9 12:48:04 2004  Matthias Clasen  <maclas@gmx.de>

	Add hidden aliases for exported symbols which are
	used internally in order to get rid of many PLT
	entries.  (#145519, Arjan van de Ven)

	* gtk/Makefile.am: Add rules to generate gtk.def and
	from gtk.symbols, and make make check check the abi
	with abicheck.sh.
	(gtk_private_h_sources): Add gtkinternals.h
	(gtk_built_private_headers): Add gtkalias.h
	(gtk_extra_sources): Add gtk.symbols
	(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh

	* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
	The file can be processed by cpp to filter out certain
	subsets of symbols.

	* gtk/abicheck.sh: New file. Script to check the actually
	symbols exported from libgtk-x11.2.0.so against the symbols
	found in gtk.symbols.

	* gtk/makegtkalias.pl: New file. Perl script to generate the
	header containing the alias definitions for internally used
	exported symbols from a list of symbols.

	* gtk/gtkinternals.h: New file. An uninstalled header listing
	symbols which must be exported for some reason and do not appear
	in any other header.

	* gtk/*.c: Include gtkalias.h
2004-08-09 16:59:53 +00:00
Matthias Clasen
d287b71399 Add a note about the !CAN_FOCUS quirk in the button size allocation code.
2004-06-04  Matthias Clasen  <mclasen@redhat.com>

	* docs/widget_geometry.txt: Add a note about the !CAN_FOCUS
	quirk in the button size allocation code.

	* gtk/gtkbutton.c (gtk_button_size_allocate): Give the space
	requested for drawing the focus indicator to the child in the
	!CAN_FOCUS case. This should fix issues which the Gimp has with
	the button allocation changes in 2.4.2.
2004-06-05 03:58:50 +00:00
Matthias Clasen
85eb55763f Go back to the initial fix for the focus-overdrawing problem, which was
2004-05-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c: Go back to the initial fix for the
	focus-overdrawing problem, which was actually correct
	according to docs/widget_geometry.txt.

	* gtk/gtkarrow.c (gtk_arrow_class_init): Bump the initial
	arrow size from 11 to 15 to compensate for that.
2004-05-18 17:50:04 +00:00
Matthias Clasen
a455537074 Allocate space for the focus rectangle only if necessary. (#142668,
2004-05-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_size_request)
	(gtk_button_size_allocate, _gtk_button_paint): Allocate
	space for the focus rectangle only if necessary.  (#142668,
	Michael Natterer)
2004-05-17 18:51:24 +00:00
Matthias Clasen
a4f0cc112b Don't let the child draw over the focus rectangle.
2004-05-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_size_allocate): Don't let the child
	draw over the focus rectangle.
2004-05-07 15:26:35 +00:00
Matthias Clasen
ead11a6119 Doc fixes.
2004-04-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcellrenderer.c (gtk_cell_renderer_class_init):
	* gtk/gtkbutton.c (gtk_button_class_init): Doc fixes.
2004-04-15 14:31:02 +00:00
Matthias Clasen
8f52057bbc Fix #136614 in a better way:
Wed Mar 10 01:49:27 2004  Matthias Clasen  <maclas@gmx.de>

	Fix #136614 in a better way:

	* gtk/gtkoptionmenu.c (gtk_option_menu_init): Undo the last change.
	* gtk/gtkbutton.c (struct _GtkButtonPrivate): Add a flag, align_set.
	* gtk/gtkbutton.c (gtk_button_init): Initialize align_set to 0.
	* gtk/gtkbutton.c (maybe_set_alignment): Rework to only set the
	alignment if priv->align_set is set.
	* gtk/gtkbutton.c (gtk_button_set_alignment): Set align_set to 1.
2004-03-10 00:46:51 +00:00
Jonathan Blandford
afec1da061 actually use gtk_button_add.
Sun Mar  7 17:38:03 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkbutton.c (gtk_button_class_init): actually use
        gtk_button_add.

        * gtk/gtkfilechooserdefault.c (error_building_filename_dialog):
        use the uri, not the path, #136317
        (renderer_edited_cb): ditto
        (shortcuts_add_bookmark_from_path): ditto
        (remove_bookmark_button_clicked_cb): ditto
        (gtk_file_chooser_default_remove_shortcut): ditto
        (update_from_entry): ditto
        (up_folder_handler): ditto
2004-03-07 22:49:44 +00:00
Matthias Clasen
e2f66ec797 Don't use xthickness in the height calculation.
Sun Mar  7 22:24:28 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkbutton.c (_gtk_button_paint): Don't use xthickness in the
	height calculation.
2004-03-07 21:20:50 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Matthias Clasen
20cafaeefc Don't let the priv->image pointer dangle. (#136259, Padraig O'Briain)
Fri Mar  5 22:37:15 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkbutton.c (gtk_button_construct_child): Don't let
	the priv->image pointer dangle.  (#136259, Padraig O'Briain)
2004-03-05 21:36:03 +00:00
Matthias Clasen
add52ebbbf Fixes for #82099:
Thu Feb 19 23:41:06 2004  Matthias Clasen  <maclas@gmx.de>

	Fixes for #82099:

	* gdk/x11/gdkevents-x11.c: Introduce new XSettings "Gtk/ButtonImages"
	and "Gtk/MenuImages" and map them to "gtk-button-images" and
	"gtk-menu-images".

	* gtk/gtkimagemenuitem.c: Add a boolean setting "gtk-menu-images" and use
	it to set the visibility of the embedded image.

	* gtk/gtkbutton.c: Add a boolean setting "gtk-button-images" and use
	it to set the visibility of an embedded image.
2004-02-19 22:39:58 +00:00
Matthias Clasen
e4d55e75e0 Don't draw bevels around active, RELIEF_NONE buttons that aren't
Fri Feb 13 01:31:44 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
	active, RELIEF_NONE buttons that aren't depressed. This improves
	the appearance of buttons in notebook tabs.  (#109213, reported
	by Benjamin Otte, patch by Rodney Dawes)
2004-02-13 00:31:19 +00:00
Matthias Clasen
07d4d314b6 The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and
Fri Jan 16 23:59:01 2004  Matthias Clasen  <maclas@gmx.de>

	The first part of the fix for #114351 (see also
	gdk-pixbuf/ChangeLog and po/ChangeLog):

	* gtk/gtkintl.h:
	* gdk-pixbuf/gdk-pixbuf-i18n.h:
	* gdk/gdkintl.h: Define P_() for property blurbs and nicks.

	* gdk/gdkdisplaymanager.c:
	* gdk-pixbuf/gdk-pixbuf.c:
	* modules/input/gtkimcontextxim.c:
	* gtk/*.c:  Mark property blurbs and nicks with P_().

	* po/Makefile.in.in: Add --keyword=P_ to the xgettext
	invocation, since property blurbs and nicks are
	now marked with P_().
2004-01-16 23:10:05 +00:00
Matthias Clasen
3050f437c5 Correct misleading docs. Add docs for the "activate" signal. (#129358,
Thu Dec 18 01:37:59 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkwidget.c (gtk_widget_activate): Correct misleading docs.
	* gtk/gtkbutton.c (gtk_button_class_init): Add docs for the
	"activate" signal.  (#129358, Ka-Hing Cheung)
2003-12-18 00:39:17 +00:00
Matthias Clasen
3fe038b505 Add new properties, xalign and yalign, with getter and setter
Mon Dec 15 00:56:54 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkbutton.[hc]: Add new properties, xalign and yalign, with
	getter and setter gtk_button_[sg]et_alignment(), to set the
	alignment of the child.  (#70961, Jody Goldberg)
2003-12-15 00:00:19 +00:00
Matthias Clasen
96fb3e8832 Make string setters safe for self-assignment. (#122745, Soeren Sandmann)
Fri Nov  7 22:55:49 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkwindow.c (gtk_window_set_role):
	* gtk/gtkwindow.c (gtk_window_set_title):
	* gtk/gtkwidget.c (gtk_widget_set_name):
	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_title):
	* gtk/gtkbutton.c (gtk_button_set_label): Make string setters
	safe for self-assignment.  (#122745, Soeren Sandmann)
2003-11-07 21:57:20 +00:00
Soeren Sandmann
81785924f9 remove GDK_EXPOSURE_MASK for INPUT_ONLY window same same same same
Tue Jul  8 21:10:14 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkbutton.c (gtk_button_realize): remove GDK_EXPOSURE_MASK
	for INPUT_ONLY window
	* gtk/gtkmenuitem.c (gtk_menu_item_realize): same
	* gtk/gtknotebook.c (gtk_notebook_realize): same
	* gtk/gtkexpander.c (gtk_expander_realize): same
	* gtk/gtkrange.c (gtk_range_realize): same

	Fix #116303
2003-07-08 18:59:16 +00:00
Matthias Clasen
913e6e9ea9 Document.
2003-04-13  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeviewcolumn.c
	(gtk_tree_view_column_cell_get_position): Document.

	* gtk/gtktextbuffer.c (gtk_text_buffer_select_range):
	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_[sg]et_expand):
	* gtk/gtkbutton.c (gtk_button_[sg]et_focus_on_click): Document
	these as 2.4 additions.
2003-04-12 22:25:21 +00:00
Soeren Sandmann
b5d8a668bd add property focus_on_click
Wed Apr  2 23:02:26 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkbutton.[ch] (gtk_button_class_init): add property
	focus_on_click

	* gtk/gtkwindow.c (gtk_window_focus): make arrow keyboard
	navigation not wrap around.
2003-04-02 21:50:45 +00:00
Matthias Clasen
14ee65b66a Data constness fixes. (#75754) 2002-12-10 21:39:53 +00:00
Manish Singh
f18d5d3510 Deprecation cleanup
Fri Oct 11 15:56:20 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkaccellabel.[ch] gtk/gtkaccessible.[ch] gtk/gtkbutton.[ch]
        gtk/gtkcheckbutton.[ch] gtk/gtkcolorseldialog.[ch] gtk/gtkdialog.[ch]
        gtk/gtkhandlebox.[ch] gtk/gtkinputdialog.[ch] gtk/gtkmessagedialog.[ch]
        gtk/gtktearoffmenuitem.[ch] gtk/gtktogglebutton.[ch]: Deprecation
        cleanup
2002-10-11 22:57:11 +00:00
Soren Sandmann
77eee887f3 Minor documentation fixes
2002-08-10  Soren Sandmann  <sandmann@daimi.au.dk>

	* docs/reference/gtk/tree_widget.sgml,
	docs/reference/gtk/tmpl/gtkdialog.sgml,
	docs/reference/gtk/tmpl/gtkentry.sgml,
	docs/reference/gtk/tmpl/gtkfilesel.sgml,
	docs/reference/gtk/tmpl/gtkfontsel.sgml,
	docs/reference/gtk/tmpl/gtkfontseldlg.sgml,
	docs/reference/gtk/tmpl/gtktreemodel.sgml,
	docs/reference/gtk/tmpl/gtkwidget.sgml, gdk/x11/gdkdisplay-x11.c,
	gtk/gtkbbox.c, gtk/gtkbox.c, gtk/gtkbutton.c, gtk/gtkcellrenderer.c,
	gtk/gtkcellrendererpixbuf.c, gtk/gtkcellrenderertext.c,
	gtk/gtkcheckmenuitem.c, gtk/gtkcontainer.c, gtk/gtkcurve.c,
	gtk/gtkdialog.h, gtk/gtkentry.c, gtk/gtkfilesel.c, gtk/gtkfontsel.c,
	gtk/gtkframe.c, gtk/gtkhandlebox.c, gtk/gtkiconfactory.c,
	gtk/gtkimage.c, gtk/gtkinvisible.c, gtk/gtkitemfactory.c,
	gtk/gtklabel.c, gtk/gtklayout.c, gtk/gtkmenu.c, gtk/gtkprogress.c,
	gtk/gtkprogressbar.c, gtk/gtkscrolledwindow.c, gtk/gtksizegroup.c,
	gtk/gtktable.c, gtk/gtktextiter.c, gtk/gtktexttag.c,
	gtk/gtktexttag.h, gtk/gtktextview.c, gtk/gtktogglebutton.c,
	gtk/gtktoolbar.c, gtk/gtktreemodel.c, gtk/gtktreeselection.c,
	gtk/gtktreestore.c, gtk/gtktreeview.c, gtk/gtktreeviewcolumn.c,
	gtk/gtkviewport.c, gtk/gtkwidget.c, gtk/gtkwidget.h,
	gtk/gtkwindow.c:

	Minor documentation fixes

	(#89254, patch from Brett Nash;
	 #85809, patch from daten@dnetc.org;
	 #76391, patch from Ross Burton;
	 #74559, Manuel Clos;
	 #73569, #72005, Alexey A. Malyshev;
	 #70061, patch from Dennis Bj"orklund;
	 #64566, #63388, #58328, #57499, #81007, #77349, Vitaly Tishkov;
	 #78932, Vitaly Tishkov, patch from Ross Burton;
	 #73306)
2002-08-10 09:55:41 +00:00
Alex Larsson
4632fb81c7 Integrate Erwann Chenede's multihead changes for the gtk/ directory.
Mon Apr 29 18:28:00 2002  Owen Taylor  <otaylor@redhat.com>

	Integrate Erwann Chenede's multihead changes for the gtk/ directory.

	* gtk/gtkclipboard.[ch]: Add gtk_clipboard_get_for_display(),
	make internals multihead aware.

	* gtk/gtkcolorsel.[ch]: Add
	gtk_color_selection_set_change_palette_with_screen_hook () [ugh!]
	make up for non-multihead safety of
	gtk_color_selection_set_change_palette_hook()

	* gtk/gtkinvisible.[ch] gtk/gtkmenu.[ch] gtkwindow.[ch]: Add
	gtk_{invisible,menu,window}_set_screen(); add "screen" properties
	for GtkWindow and GtkMenu.

	* gtk/gtkplug.[ch]: Add gtk_plug_construct_for_display(),
	gtk_plug_new_for_display(). Multihead fixes.

	* gtk/gtkselection.[ch]: Add gtk_selection_owner_set_for_display(),
	make internals multihead aware.

	* gtk/gtksettings.[ch]: Add gtk_settings_get_for_screen(), get
	rid of now-useless gtk_settings_constructor().

	* gtk/gtkstyle.[ch]: Add gtk_style_get_font_for_display(), fix
	check/radio button indicators bitmap handling to be multihead
	safe.

	* gtk/gtkwidget.[ch]: Add gtk_widget_get_screen(), gtk_widget_has_screen(),
	gtk_widget_get_display(), gtk_widget_get_clipboard(),
	gtk_widget_get_root_window().

	* gtk/gtkbindings.c gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkcombo.c
	gtk/gtkctree.c gtk/gtkdnd.c gtk/gtkfilesel.c gtk/gtkgamma.c
	gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtkimcontext.c gtk/gtklabel.c
	gtk/gtklist.c gtk/gtkmain.c gtk/gtkmenuitem.c gtk/gtkmenushell.c
	gtk/gtknotebook.c gtk/gtkoldeditable.c gtk/gtkoptionmenu.c
	gtk/gtkpaned.c gtk/gtkpreview.c gtk/gtksocket.c gtk/gtktext.c
	gtk/gtktextbuffer.c gtk/gtktextview.c gtk/gtktipsquery.c
	gtk/gtktooltips.c gtk/gtktreeview.c gtk/gtktreeviewcolumn.c:
	misc mechanical multihead-safety fixes.

	* gtk/gtkclipboard.c: Use a GtkImage rather than a pixmap for
	the dropper, look up the color palette only at realization time,
	other multihead fixes.

	* gtk/gtkcombo.c (gtk_combo_unrealize): Popdown the list when
	unrealizing.

	* gtk/gtkentry.c: Only claim ownership of the primary selection
	when realized, misc multihead fixes.

	* gtk/gtkfontsel.c: Only fill in fonts when attached to a screen,
	fix gtk_font_selection_get_font() for multihead.

	* gtk/gtkgc.c: make the depth => drawable hash per-screen.

	* gtk/gtkinvisible.c: Add a constructor that realizes the
	widget, so we get a realized widget with g_object_new() as
	well gtk_invisible_new() as before.

	* gtk/gtkmain.c: Get rid of unused gtk_visual/gtk_colormap
	variables.

	* gtk/gtktextdisplay.c: Add warnings if stipple bitmaps
	are used on the wrong screen.

	* gtk/gtktoolbar.c: Make handling of GtkSettings-based layout
	read properties and connect to settings when the screen is changed,
	rather than on init/finalize.

	* gtk/gtkwindow.c: Fix icon handing to be multihead safe ...
	default icon pixmaps/mask are only shared between windows on the
	same screen. Misc multihead fixes.

Sat Apr 27 13:49:53 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkclipboard.c (gtk_clipboard_get_for_display):
	Update docs to reference GDK_SELECTION_CLIPBOARD rather GDK_NONE.

2002-04-29  Alex Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkproperty-fb.c (gdk_property_get):
	Fix silly bug, noticed by Sven Neumann.

Sun Apr 28 22:43:55 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
	so that you can set a new sort func.
2002-04-29 22:53:45 +00:00
Soeren Sandmann
5d81847f20 feedback when check and radio buttons are depressed.
Fri Feb 22 14:08:38 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkradiobutton.c, gtk/gtkcheckbutton.c, gtkbutton.h,
	gtktogglebutton.c: feedback when check and radio buttons are
	depressed.
2002-02-22 13:34:28 +00:00
Owen Taylor
708e1a9574 Implement "fuzzy" key binding lookups; allow matches on key and level but
Wed Feb 20 14:26:47 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkkeyhash.[ch]: Implement "fuzzy" key binding lookups;
        allow matches on key and level but not group. Also, implement
        ignoring "consumed modifiers correctly."

        * gtk/gtkaccelgroup.c gtk/gtkbindings.c: Convert to using
        GtkKeyHash.

        * gtk/gtkdebug.h gtk/gtkmain.c: Support GTK_DEBUG=keybindings

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Fill in
        the group for key release events as well as key press events.

        * gdk/gdkkeys.h gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Rename unused_modifiers to consumed_modifiers, make the docs and
        non-Xkb implementation match the Xkb implementation.

        * gdk/linux-fb/gdkkeyboard-fb.c gdk/win32/gdkkeys-win32.c: Propagate
        doc and parameter name changes.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        XkbTranslateKeyCode doesn't handle LockMask, we need to handle
        it ourselves.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Force
        <Shift>Tab to give GDK_ISO_Left_Tab, since we need consistency
        to allow dealing with ISO_Left_Tab.

        * gtk/gtkwindow.c gtk/gtktextview.c gtk/gtkscrolledwindow.c
        gtk/gtkpaned.c gtk/gtkcombo.c  gtk/gtknotebook.c:
        Remove inappropriate uses of GDK_ISO_Left_Tab. (GDK_ISO_Left_Tab
        or <Shift>Tab both are equivalent as a binding specifier.)

        * gtk/gtkbutton.c (gtk_button_class_init): Make ::activate
        GTK_RUN_ACTION, so you can bind an accelerator to it.

        * gtk/gtklabel.c (gtk_label_set_uline_text_internal): Call
        gdk_unicode_to_keyval on the mnemonic character.

        * tests/testgtk.c: Add a test for the new fuzzy key binding matching.
2002-02-21 17:14:10 +00:00
Matthias Clasen
4dddfb2dc6 Remove excess calls to g_return_if_fail from static and virtual functions. 2002-01-30 22:29:03 +00:00
Matthias Clasen
e2b730ac43 General property notification cleanup. 2002-01-28 18:52:49 +00:00
Matthias Clasen
3aabcd2891 More precise documentation about underscores and mnemonics. (#66380)
* gtk/gtklabel.c (gtk_label_new_with_mnemonic),
        gtk/gtkbutton.c (gtk_button_new_with_mnemonic): More precise
        documentation about underscores and mnemonics. (#66380)

        * gtk/gtktextiter.c (gtk_text_iter_backward_word_starts): Fix
        cyclic reference in docs.

        * gtk/gtklabel.c (gtk_label_set_justify): Correct documentation
        of default value. (#65402)

        * gtk/gtkmain.c (gtk_set_locale, gtk_disable_set_locale):
        Markup fixes.

        * gdk-pixbuf-io.c, gdk-pixbuf-animation.c, gdk-pixbuf-data.c,
        gdk-pixbuf-loader.c, gdk-pixbuf-scale.c, gdk-pixbuf-util.c,
        gdk-pixdata.c: Markup fixes.

        * gtk/text_widget.sgml: More precise wording. (#63388)

        * gtk/tmpl/gtksignal.sgml (GTK_SIGNAL_OFFSET): Add docs.

        * gtk/resources.sgml: Fix markup of mail URLs.

        * gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkobject.sgml: Markup fixes.

        * gtk/tmpl/gtktoolbar.sgml (gtk_toolbar_{prepend,append}_element):
        Expand documentation. (#60471)

        * gtk/tmpl/gtkmain.sgml: Remove misleading information about
        gtk_set_locale().  (#65758)
2001-12-20 23:09:29 +00:00
Owen Taylor
7537825b34 Patch from Bill Haneman (with many modifications) to make the focus color
Mon Dec  3 16:39:17 2001  Owen Taylor  <otaylor@redhat.com>

	Patch from Bill Haneman (with many modifications) to make
	the focus color work on dark themes and to make the
	focus line width configurable. (#61079, #63074)

        * gtk/gtkwidget.c: Add style properties,
	::focus-widget, ::focus-line-width, and ::focus-padding.

	* gtk/gtkstyle.[ch]: Make gtk_paint_focus() take a
	state argument as well so we can use fg[STATE] to
	draw instead of always drawing with black.
	Cange paint_focus() to respect GtkWidget::focus-width
	and GtkWidget::focus-line-pattern. Fix continuity
	problem where the default 1-1 stipple had a blob
	in one corner and a gap in the other. Change the
	interpretation of x/y/width/height to be the bounding
	box of the focus rect instead of the rectangle
	passed to gdk_draw_rectangle.

	* gtk/gtkcheckbutton.c gtk/gtklistitem.c gtk/gtknotebook.c
	gtk/gtkoptionmenu.c gtk/gtkradiobutton.c gtk/gtkspinbutton.c
	gtk/gtktextview.c gtk/gtktreeview.c: Handle ::focus-width
	and ::focus-line-padding.

	* gtk/gtkentry.c: Handle :;focus-width property; cleanup
	and remove duplicated code; fix drawing of focus rectangle
	when interior-focus = FALSE. (#63072, #63073)

	* gtk/gtkrange.c gtk/gtktext.c gtk/gtktreeitem.c
	gtk/gtktreeviewcolumn.c: Basic fixups to make compile;
	Range and TreeViewColumn will need more extensive fixing.

	* gtk/gtkcolorsel.c: Honor focus line attributes when
	drawing the focus on the color swatches. (#63071)

	* gtk/gtkhsv.c: Honor focus line attributes when
	drawing the focus for the ring and triangle.

	* docs/widget_geometry.txt: Start at documenting how
	various widgets are drawn.

	* gtk/gtkbutton.c (_gtk_button_paint): Export
	_gtk_button_paint() librarywide, so we don't have
	duplicate a bunch of code in gtktogglebutton.c.

	* gtk/gtktogglebutton.c: Use _gtk_button_paint().
2001-12-04 03:27:30 +00:00