Commit Graph

78 Commits

Author SHA1 Message Date
Emilio Pozuelo Monfort
4e1b73325d ScaleButton: make the popup transient to the button's window
Fixes the popup positioning on wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=720256
2013-12-14 15:49:38 -05: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
cda60c3c40 Another round of template binding api changes
We rename the gtk_widget_class_bind_template_child{_internal}
macros by appending a _private to their name. Otherwise, it
would be too magic to pass the 'public' names as arguments,
but affect a member of the Private struct. At the same time,

Add two new macros with the old names,
gtk_widget_class_bind_template_child{_internal} that operate
on members of the instance struct.
2013-07-26 16:29:12 -04:00
Emmanuele Bassi
89ae3524a3 Rename the widget template API
The macros and functions are inconsistently named, and are not tied to
the "template" concept - to the point that it seems plausible to use
them without setting the template.

The new naming scheme is as follows:

  gtk_widget_class_bind_template_child_full
  gtk_widget_class_bind_template_callback_full

With the convenience macros:

  gtk_widget_class_bind_template_child
  gtk_widget_class_bind_template_child_internal
  gtk_widget_class_bind_template_callback

https://bugzilla.gnome.org/show_bug.cgi?id=700898
https://bugzilla.gnome.org/show_bug.cgi?id=700896
2013-07-26 13:52:15 -04:00
Alexander Larsson
a8e84545d1 widget: Use a real offset in gtk_widget_class_automate_child
Using an offset from the struct means you can have children in
both the public and private (via G_PRIVATE_OFFSET) parts of the
instance. It also matches the new private macros nicer.

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

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2013-07-26 08:41:09 -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
02c793f24a Start migrating internals away from GtkStock 2013-06-24 22:20:49 -04:00
Tristan Van Berkom
b9fd422aca GtkScaleButton: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Benjamin Otte
48c6b3b4f4 gtk: Add get_type() function declarations for private objects
I'm adding a bunch of fixes for gcc complaining about
-Wmissing-declarations.

This set of patches makes private classes in gtk/*.c that use
G_DEFINE_TYPE() safe by adding definitions for the get_type() function
that can't be made static.
2012-10-02 19:32:38 +02:00
Benjamin Otte
2353d60b8a types: Move GtkAdustment declaration to gtktypes.h
... and make all the headers to not include gtkadjustment.h anymore. Of
course, also include it in the source files instead.
2012-03-03 19:45:03 +01:00
Carlos Garnacho
377eb396a3 scalebutton: Set GDK_SCROLL_MASK explicitly
selecting for button press/release doesn't suffice anymore to
get scroll events.
2012-03-01 16:29:01 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
020c1846b7 Use the workarea when placing popups
This uses the new workarea API to avoid placing popups underneath
panels, docks, etc.
2011-12-18 14:29:16 -05:00
Javier Jardón
0853ce3077 Use G_VALUE_INIT
Instead of an explicit { 0, } when declaring the variable.
2011-10-15 16:45:16 +01:00
Matthias Clasen
6f39855c08 More include cleanups 2011-08-28 01:54:55 -04:00
Matthias Clasen
13e8bace97 Convert GailScaleButton to GtkScaleButtonAccessible 2011-07-05 16:08:54 -04: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
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Benjamin Otte
f79c6baa66 scalebutton: Update adjustment usage for sealing
Also rename all variables named "adj" to "adjustment", like they're
called everywhere else.
2011-01-05 23:50:22 +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
Matthias Clasen
b5c6904c2f Drop explicit includes of gdkkeysyms.h
These are no longer needed. At the same time, port gtkimcontextsimpleseqs.h
to use the new GDK_KEY_ symbols.
2011-01-04 12:21:41 -05:00
Michael Natterer
fb5dd9f72f Move all GdkDevice members to private and add one missing accessor 2010-11-23 20:25:13 +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
Javier Jardón
b072ea220c Remove unneded casts
As gtk_adjustment_new() returns a GtkAdjustment* now

https://bugzilla.gnome.org/show_bug.cgi?id=630731
2010-09-29 01:18:10 +02:00
Javier Jardón
42f480a537 gtk_adjustment_new() should return a GtkAdjustment*
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=630731
2010-09-29 01:18:10 +02:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Javier Jardón
3b8184cfee Move classes that currently derive from GtkObject to GInitiallyUnowned 2010-09-26 22:18:13 -04:00
Johan Dahlin
8736d31a04 Fix a couple of broken annotations 2010-09-23 17:57:16 -03:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Colin Walters
913cdf3be7 GDK: Prefix key names with KEY_
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.

For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.

Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
2010-09-08 18:51:44 -04:00
Javier Jardón
27ec5cd556 gtkscalebutton: use accessor functions to access GtkRange 2010-08-23 20:47:45 +02:00
Javier Jardón
41fcf40648 gtk/gtkscalebutton.c: use accessor functions to access GtkWidget 2010-08-22 21:25:25 +02:00
Javier Jardón
9ddda9c844 GtkScaleButton: Move public members to private structure 2010-07-13 19:40:50 +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
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Javier Jardón
08bd42cf8d Move documentation to inline comments: GtkScaleButton 2010-05-16 00:32:05 +02:00
Christian Dywan
2da9103e0c Remove deprecated GtkScaleButton functions 2010-05-03 01:40:41 +02:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02:00
Javier Jardón
51e0dd9a82 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-01-07 10:04:55 +01:00
Dan Winship
0b4af241b6 Change GtkIconSize to int in params/return values
GtkIconSize is an extensible enumeration (via
gtk_icon_size_register()), so methods that claim to take/return a
GtkIconSize need to actually use "int" to work correctly with bindings
that are strict about enum values.

https://bugzilla.gnome.org/show_bug.cgi?id=604895
2009-12-19 10:32:35 +01:00
Bastien Nocera
b436f5b8a3 Bug 461944 – pressing the volume icon in full screen shuts down the sound
Don't pass the click on the button through to the scale when the
dock popup will be moved, otherwise we could end up changing the
sound in unexcepted ways (to zero for vertical popups at the bottom
of the screen for example).
2009-06-22 17:25:21 +01:00
Michael Natterer
576ef4d6ea add static function gtk_scale_button_set_orientation_private() and use it
2009-03-18  Michael Natterer  <mitch@gimp.org>

	* gtk/gtkscalebutton.c: add static function
	gtk_scale_button_set_orientation_private() and use it instead of
	the public but deprecated gtk_scale_button_set_orientation().


svn path=/trunk/; revision=22574
2009-03-18 21:19:07 +00:00
Michael Natterer
06759f3674 don't call gtk_orientable_set_orientation() because that calls
2009-03-06  Michael Natterer  <mitch@gimp.org>

	* gtk/gtkscalebutton.c (gtk_scale_button_set_property): don't call
	gtk_orientable_set_orientation() because that calls g_object_set()
	again -> infinite recursion. Call gtk_scale_button_set_orientation()
	instead.


svn path=/trunk/; revision=22478
2009-03-06 14:06:46 +00:00
Michael Natterer
9da282480f make the orientation flipping much simpler by using the GtkOrientable
2009-02-19  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkscalebutton.c: make the orientation flipping much simpler
	by using the GtkOrientable features of the involved widgets:

	(gtk_scale_button_init): create the frame, box and scale here,
	they never need to be recreated because they implement GtkOrientable.

	(gtk_scale_button_constructor): remove their construction here.

	(gtk_scale_button_set_orientation): don't destroy and re-create
	anything. Instead, simply set the orientation of the above created
	widgets and fiddle a bit with the "plus" and "minus" buttons'
	packing and the scale's "inverted" state.

	Remove separate internal GtkScaleButtonHScale and
	GtkScaleButtonVScale subclasses and simply have a
	GtkScaleButtonScale directly inherited from GtkScale.


svn path=/trunk/; revision=22375
2009-02-19 15:10:34 +00:00
Christian Dywan
856279da34 Bug 566532 – GtkScaleButton implementation of GtkOrientable
2009-01-13  Christian Dywan  <christian@imendio.com>

	Bug 566532 – GtkScaleButton implementation of GtkOrientable

	* gtk/gtk.symbols:
	* gtk/gtkscalebutton.c (gtk_scale_button_class_init),
	(gtk_scale_button_set_property):
	* gtk/gtkscalebutton.h: Deprecate gtk_scale_button_get_orientation
        in favour of implementing GtkOrientable. Patch by Bruce Cowan.

svn path=/trunk/; revision=22112
2009-01-13 15:24:03 +00:00
Christian Dywan
ba5fbdb32b Bug 555523 – gtk_scale_button_set_adjustment should accept NULL
* gtk/gtkscalebutton.c (gtk_scale_button_set_adjustment):
Create a new adjustment if NULL is passed, like other widgets

svn path=/trunk/; revision=21620
2008-10-09 16:19:06 +00:00
Tor Lillqvist
6c08680e2c Don't #define _GNU_SOURCE on Windows as it confuses newest mingw headers.
2008-10-01  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkscalebutton.c: Don't #define _GNU_SOURCE on Windows as it
	confuses newest mingw headers.


svn path=/trunk/; revision=21559
2008-10-01 11:02:51 +00:00
Matthias Clasen
94ba6bba06 Doc fixes
svn path=/trunk/; revision=20887
2008-07-21 23:23:41 +00:00
Michael Natterer
7f00695920 remove _gtk_binding_signal_new().
2008-07-21  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbindings.[ch]: remove _gtk_binding_signal_new().

	* gtk/gtkfilechooserdefault.c
	* gtk/gtkmenu.c
	* gtk/gtkmenushell.c
	* gtk/gtkscalebutton.c
	* gtk/gtktextview.c
	* gtk/gtktoolbar.c
	* gtk/gtkwidget.c: use g_signal_new_class_handler() instead. Add
	some missing I_() to the signal names.


svn path=/trunk/; revision=20874
2008-07-21 09:48:20 +00:00