Matthias Clasen
733a590fbe
GtkButton: warn slightly less
...
Use gtk_misc_set_alignment when setting x/align on button children
where possible, to avoid the runtime warning that g_object_set
incurs nowadays.
2014-06-28 10:56:54 -04:00
Matthias Clasen
598777166f
GtkButton: Use FLAT style class
...
This commit makes button always draw background and frame.
Buttons with relief none get a new style class, FLAT, which
allows themes to style these buttons as they like.
We also (finally) mark GTK_RELIEF_HALF as deprecated. It
has never done anything different from GTK_RELIEF_NORMAL.
https://bugzilla.gnome.org/show_bug.cgi?id=732256
2014-06-26 22:02:18 -04:00
Jasper St. Pierre
9c37b3de74
gtk: Don't use GObjectClass.constructor
...
Use the newer constructed instead, which has a fast path in GObject.
2014-06-26 19:06:43 -04:00
Matthias Clasen
d09c458ced
GtkButton: Queue a redraw on enter/leave
...
We currently getting a redraw for buttons, but that is just luck.
Better to make it explicit.
2014-06-24 13:21:05 -04:00
Matthias Clasen
41fd2ae898
Deprecate outside-border style properties
...
These should just be replaced by CSS margins, etc.
2014-06-11 19:38:22 -04:00
Matthias Clasen
48db936b70
GtkButton: Don't use a non-zero border by default
...
The non-zero default default-border was causing buttons to shrink as
the focus moves around them. Themes which want a default-border should
define it explicitly.
2014-06-11 19:06:36 -04:00
Matthias Clasen
d218e17a2a
GtkButton: Use G_PARAM_EXPLICIT_NOTIFY
2014-06-09 13:30:52 -04:00
Matthias Clasen
62d591a550
GtkButton: Convert to g_object_class_install_properties
2014-06-09 13:30:51 -04:00
Carlos Garnacho
2012b67c5b
button: Claim the sequence on multipress::pressed
...
In order to avoid the event from bubbling, as it used to (not) do.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
907e9f1946
gtk: Update GtkGesture users to the GtkPropagationPhase semantics change
...
Mainly doing s/TARGET/BUBBLE/ on the fully ported widgets, but GtkTreeView
where the double click handler has moved to GTK_PHASE_TARGET so it runs
parallelly to the still existing event handlers.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
d05a9f9a7b
gesture: Replace gtk_gesture_attach/detach with event controller API
...
Event controllers now auto-attach, and the GtkCapturePhase only determines
when are events dispatched, but all controllers are managed by the widget wrt
grabs.
All callers have been updated.
2014-05-27 17:47:12 +02:00
Benjamin Otte
a9bcea5118
button: Implement clip
2014-05-24 16:12:21 +02:00
Matthias Clasen
04703689b8
Deprecate GtkAligment
...
This has been dangling ever since 3.0.
https://bugzilla.gnome.org/show_bug.cgi?id=645781
2014-05-23 20:31:25 -04:00
Carlos Garnacho
ced7e7c08d
button: Make multipress gesture exclusive
...
We only want actions to be triggered by a single sequence there,
so buttons trigger no actions on further simultaneous touches
happening.
2014-05-23 19:54:31 +02:00
Carlos Garnacho
fd9925141b
button: Use GtkGestureMultiPress for signal emission
...
It is now useful for that purpose with a ::release signal, so replace
the custom GtkGestureSingle with one of these.
2014-05-23 19:54:31 +02:00
Carlos Garnacho
5369c77029
gesture: Simplify gesture/widget interaction public API
...
The propagation phase property/methods in GtkEventController are gone,
This is now set directly on the GtkWidget add/remove controller API,
which has been made private.
The only public bit now are the new functions gtk_gesture_attach() and
gtk_gesture_detach() that will use the private API underneath.
All callers have been updated.
2014-05-23 19:54:29 +02:00
Matthias Clasen
487ac50e93
GtkButton: Don't leak the gesture
2014-05-23 19:54:28 +02:00
Matthias Clasen
0106099f5b
GtkButton: Port to GtkGesture
...
Quick-and-dirty patch to use a GtkGestureSingle for both
button press/release and touch event handling.
2014-05-23 19:54:28 +02:00
Matthias Clasen
d769f338f2
GtkButton: tighten code a bit
...
Make it so we only use GtkMisc in one place.
2014-05-22 23:15:08 -04:00
Matthias Clasen
f6af96723c
GtkButton: Deprecated setters and getters as well
...
gtk_button_set/get_alignment should be deprecated together
with the properties they are setters/getters for.
2014-05-13 22:19:30 -04:00
Matthias Clasen
ec0a60a248
Deprecate GtkMisc
...
This has been dangling ever since 3.0.
2014-05-13 08:45:00 -04:00
Matthias Clasen
42f8b4b48b
GtkButton: Deprecate xalign and yalign properties
...
These are directly passed through to GtkMisc/GtkAlignment, which
are both on the way to deprecation.
2014-05-13 06:26:19 -04:00
Cosimo Cecchi
694b209094
button: don't use focus-line-width
2014-05-09 11:02:44 -07:00
Cosimo Cecchi
bbadfbcd2a
button: remove unused code
2014-05-09 11:02:44 -07:00
Cosimo Cecchi
8b068e996f
button: don't read focus padding property
...
We're going to deprecate it.
2014-05-09 11:02:42 -07:00
Cosimo Cecchi
4c06925ec2
button: always use interior focus
...
We're going to deprecate the property, and this is what everyone has
been using.
2014-05-09 11:02:41 -07:00
Benjamin Otte
3914bc9ce6
button: Remove unneeded checks
...
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
Matthias Clasen
bf8a169cb9
docs: Another round of markup removal
2014-03-29 00:24:15 -04:00
William Jon McCann
469d333aa2
docs: use Returns: consistently
...
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
13998c55e7
docs: use proper quotations instead of '*'
2014-02-07 14:22:39 -05:00
William Jon McCann
e34bd4137d
docs: use apostrophes in *n't
2014-02-07 13:32:47 -05:00
William Jon McCann
7a208fbbf3
docs: use proper apostrophe
...
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
2a45418b67
docs: use proper quotes
2014-02-05 15:08:42 -05:00
Benjamin Otte
b6f9ce8a73
button: Allow :hover on insensitive buttons
...
You can still hover a mouse on insensitive elements; it's up to the
theme to disable that.
This is in line with the HTML/CSS interpretation of :hover.
Insensitive elements still cannot be clicked.
https://bugzilla.gnome.org/show_bug.cgi?id=719486
2013-12-07 01:39:38 +01:00
Benjamin Otte
9a0064c684
button: Call the new function
...
This simplifies a lot of code and doesn't require hacks setting
in_button anymore.
2013-12-03 01:57:38 +01:00
Benjamin Otte
804be65a09
button: Split out function
...
This is in preparation of the following cleanup commits.
2013-12-03 01:57:38 +01:00
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