Commit Graph

120 Commits

Author SHA1 Message Date
Matthias Clasen
ffd6baec42 gtk: Intern css names
This avoids a bunch of strdups at startup.
2017-11-17 22:49:57 -05:00
Benjamin Otte
a7754a14b5 toolbar: Remove icon sizes 2017-11-15 14:22:16 -05:00
Timm Bäder
ff6cd8f75e widget: Remove parent-set signal
When a widget unparents its child widget manually in finalize, this can
lead to the parent-set signal being emitted for those child widgets. The
parent already has a ref_count of 0 though, so it can't be used in a
meaningful way. Specifically, emitting the signal will already try to
ref the parent which prints a critical.

Since GtkWidget already has a "parent" property, one can use its notify
signal instead to get notified when the parent widget changes.
2017-10-29 17:24:12 +01:00
Daniel Boles
c0fdf522dd ToolItem: Fix nullable annotation put on wrong arg
D’oh
2017-09-20 23:55:15 +01:00
Daniel Boles
5095ca6ed7 ToolItem: Add see-also from proxy setter to signal 2017-09-03 10:59:34 +01:00
Daniel Boles
7ed0d9344e ToolItem: Annotate menu proxy item as nullable
It can be NULL. ::create-menu-proxy gave an example of when a NULL proxy
menu item could be useful, but the accessors did not annotate it as such.
2017-09-03 10:59:33 +01:00
Timm Bäder
f40c61fb40 toolitem: Remove size_allocate implementation
A GtkToolItem is a GtkBin and that already does exactly what this
implementation did.
2017-07-19 21:27:14 -04:00
Timm Bäder
60e053f52a Remove calls to gtk_widget_set_allocation
gtk_widget_size_allocate_with_baselines does it automatically now.
2017-07-19 21:27:12 -04:00
Carlos Garnacho
d9d0c56eb7 gtktoolitem: Remove gtk_tool_item_set_use_drag_window()
This API call is not necessary anymore, since it's no longer necessary
to receive events.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
a72404dd5a gtk: Mass delete all GtkWidget event mask API
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.

Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
2017-05-25 16:25:58 +02:00
Benjamin Otte
32a5729d18 gtk: Chain up in realize()
... instead of copy/paste from gtk_widget_real_realize.
2016-11-02 07:16:08 +01:00
Timm Bäder
9992a616ef widget: Use ::measure vfunc to measure size
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
2016-10-22 19:05:47 +02:00
Timm Bäder
0c7d091651 toolitem: Stop implementing GtkActivatable 2016-10-18 00:34:40 +02:00
Timm Bäder
4f9bcaf3c6 toolbar: Remove button-relief style property
And in turn also public API to set the button relief on the toolbar as
well as the vfunc from GtkToolShell.
2016-10-18 00:29:16 +02:00
Benjamin Otte
ac79aed338 toolitem: Use gdk_window_new_input() 2016-10-18 00:22:35 +02:00
Benjamin Otte
4df6ddad54 API: container: Remove gtk_container_set_border_width() 2016-10-16 18:18:58 +02:00
Benjamin Otte
e1a03ead7a Use NULL for generic marshallers in g_signal_new()
glib will use the correct marshaller automatically. And as a side
effect, we also get all glib optimizations, like a va marshaller.
2016-08-29 16:20:54 +02:00
Cosimo Cecchi
3740c7f092 toolitem: fix a copy/paste typo 2015-12-29 16:33:53 -08:00
Matthias Clasen
8edbbde127 toolitem: Set a css name 2015-12-08 20:53:56 -05:00
Cosimo Cecchi
db372382e9 toolitem: set clip on allocation
So that widgets that are children of tool items can render their shadows
too.
2014-09-03 14:45:51 -07:00
Matthias Clasen
17059f9c17 GtkToolItem: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:12 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
Matthias Clasen
30cc1512e6 Docs: Use markdown for lists
This greatly reduces the amount of xml in the docs.
2014-02-02 01:07:39 -05: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
c96a1c4980 Deprecate GtkAction and GtkUIManager
It is recommended to use GAction et al and GtkBuilder.
2013-06-30 11:19:50 -04:00
Will Thompson
507bf6e5cf docs: correct various spelling and grammar errors
I noticed a few cases of "wether", and while fixing them noticed a few
"its" which should be "it's". It all went downhill from there.
2013-03-04 22:48:22 +00: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
Claudio Saavedra
560952d3c0 Chain up relevant GObjectClass:notify vfuncs
These widgets have ancestors other than GObject which could eventually
implement the notify vfunc for their properties. For correctness, they
should chain up the notify vfunc.

https://bugzilla.gnome.org/show_bug.cgi?id=673478
2012-08-07 18:14:56 +03:00
Cosimo Cecchi
f70fc49ebc docs: fix a number of typos and obsolete references 2012-07-02 10:41:11 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Murray Cumming
a0b4ab109d Documentation: Correct references to properties.
These should use :, not ::, though signals would use ::.
See
http://developer.gnome.org/gtk-doc-manual/unstable/documenting_syntax.html.en
and
http://developer.gnome.org/gtk-doc-manual/unstable/documenting_symbols.html.en
2012-02-15 11:43:33 +01:00
Michael Natterer
5c4f2ef0c1 gtk: move _gtk_modules_has_mixed_deps() to gtkmodlesprivate.h
and remove gtkmainprivate.h completely.
2011-10-23 13:57:07 +02:00
Matthias Clasen
93203ca2f6 GtkToolItemPrivate: Improve struct packing 2011-04-12 12:49:16 -04:00
Matthias Clasen
b123bc41fd Move docs for gtkmain inline
At the same time, introduce a gtkmainprivate.h header
and various other cleanups.

Based on a patch by Tadej Borovšak.
https://bugzilla.gnome.org/show_bug.cgi?id=617471
2011-01-04 17:32:12 -05:00
Carlos Garnacho
c296d11ac3 GtkToolItem: Remove unneeded call 2011-01-04 03:06:19 +01:00
Matthias Clasen
9f074f8612 Remove size_request from gtkToolItem 2010-10-30 17:35:19 +09: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
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Javier Jardón
b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Javier Jardón
5e2c943742 gtk/gtktoolitem.c: use accessor functions to access GtkWidget 2010-08-22 21:25:23 +02:00
Javier Jardón
aedc5e967f GtkToolItem: unseal private pointer 2010-07-14 02:24:58 +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
Javier Jardón
c477b2fa0b Move documentation to inline comments: GtkToolItem 2010-05-13 01:26:09 +02:00
Christian Dywan
e8f1a3ccf0 Remove deprecated GtkTooltips 2010-05-03 01:51:21 +02:00
Javier Jardón
d3fc78bfb6 [gtk/gtktoolitem] Remove deprecated GtkToolItem stuff
This completes 221dcb6955cb89d1f89e71f442fc4c42fb76fcf3
2010-05-03 01:51:20 +02:00