Commit Graph

27160 Commits

Author SHA1 Message Date
Emmanuele Bassi
fbf6aa1776 colorscale: Rename variables
Avoid shadowing existing variables.
2016-10-17 11:44:10 +01:00
Emmanuele Bassi
4ba169b82e cellview: Constify argument 2016-10-17 11:44:10 +01:00
Emmanuele Bassi
5880d1b990 gtk: Cast static strings assigned to non-const variables
GtkTargetEntry.target is particularly egregious, and it should really be
constified.
2016-10-17 11:44:10 +01:00
Emmanuele Bassi
9bb816f8ee gtk: Include the appropriate headers 2016-10-17 11:10:14 +01:00
Emmanuele Bassi
3fdbe2ea13 widget: Make gtk_widget_get_parent_muxer() as static
It's a private function, used only inside gtkwidget.c and not declared
in any private header.
2016-10-17 11:10:14 +01:00
Emmanuele Bassi
24d59f6c34 inspector: Mark internal function as static 2016-10-17 11:10:14 +01:00
Emmanuele Bassi
44885bcfed Remove redundant declarations 2016-10-17 11:10:14 +01:00
Emmanuele Bassi
175800f345 Add private header for GtkTextView
This allows us to declare the symbols that are currently used inside
gtktextdisplay.c without incurring in the wrath of the compiler.
2016-10-17 11:10:14 +01:00
Emmanuele Bassi
8b9153d109 Remove redundant declarations 2016-10-17 11:10:14 +01:00
Emmanuele Bassi
5e388fc3e4 Fix _gtk_get_slowdown()
We need to pass void as the argument type.
2016-10-17 11:10:14 +01:00
Emmanuele Bassi
1db5d7fd8d Remove redundant declarations 2016-10-17 11:10:14 +01:00
Emmanuele Bassi
81e5996c91 Include the appropriate headers
The GtkStackAccessible implementation should include the private header,
and the private header should include the public one.
2016-10-17 11:10:14 +01:00
Emmanuele Bassi
d8892c0fdb Remove redundant declarations 2016-10-17 11:10:14 +01:00
Emmanuele Bassi
137e1aa988 Use appropriate const declaration for static strings 2016-10-17 11:10:14 +01:00
Emmanuele Bassi
a87bdc47c7 stylecontext: Remove gtk_gradient_resolve_for_context()
Just like we remove gtk_gradient_resolve().
2016-10-17 11:10:13 +01:00
Emmanuele Bassi
dae97c3027 textview: Remove commented block
It's referencing gdk_cairo_create(), which does not exist any more.
2016-10-17 10:44:27 +01:00
Benjamin Otte
e76ba9a3c3 gdk: Remove gdk_window_set_debug_updates()
The update tracking code was ugly and using deprecated drawing APIs. It
was also in the wrong place.

So instead of trying to keep it working, I'll remove it. We need to find
a better way to put it and make it work there.
2016-10-16 18:18:58 +02:00
Benjamin Otte
4a95f8802c widget: Remove gtk_widget_set_double_buffered()
Everything is always double-buffered.
2016-10-16 18:18:58 +02:00
Benjamin Otte
36b7ad0cd2 shortcutswindow: Modernize some code
No functional changes, just don't call valist functions anymore.
2016-10-16 18:18:58 +02:00
Benjamin Otte
6c7b6f9654 menu: Modernize code
No functional changes, just don't call valist functions anymore.
2016-10-16 18:18:58 +02:00
Benjamin Otte
cda617df4d API: sizegroup: Remove gtk_size_group_set_ignore_hidden() 2016-10-16 18:18:58 +02:00
Benjamin Otte
1d4f23da8e API: container: Remove GtkContainer::child property 2016-10-16 18:18:58 +02:00
Benjamin Otte
d4d3374729 container: Remove gtk_container_set_resize_mode() 2016-10-16 18:18:58 +02:00
Benjamin Otte
4df6ddad54 API: container: Remove gtk_container_set_border_width() 2016-10-16 18:18:58 +02:00
Benjamin Otte
1518fe0a8f API: stylecontext: Remove state argument from getters
The argument must always be the current state.
2016-10-16 18:18:58 +02:00
Benjamin Otte
9b9b475f0a API: stylecontext: Remove regions 2016-10-16 18:17:21 +02:00
Benjamin Otte
95d2f0b831 css: Remove custom properties
Those aren't used anymore, now that theming engines are gone.
2016-10-16 18:17:21 +02:00
Benjamin Otte
1a5b842682 API: Remove GtkStyleProperties 2016-10-16 18:17:21 +02:00
Benjamin Otte
dd83f9ca86 API: Remove API to set CSS properties from GValues
This API was only used in GtkModifierStyle and GtkStyleProperties and
they are both on their way out.

CSS properties must now be set using strings via the regular parser API.
2016-10-16 18:17:21 +02:00
Benjamin Otte
66dd954290 API: stylecontext: Remove old unused animation functions 2016-10-16 18:17:21 +02:00
Timm Bäder
f2c455fedb Remove GtkThemingEngine
As well as the corresponding GtkCssEngineValue used to parse it in css.
2016-10-16 18:17:21 +02:00
Timm Bäder
9f930c08a6 ui: Don't unnecessarily set GtkEntry:invisible-char 2016-10-16 18:17:21 +02:00
Timm Bäder
f360a69f4c entry: Remove invisible-char style property 2016-10-16 18:17:21 +02:00
Timm Bäder
58a76b700f stylecontext: Remove _REGION_ constants 2016-10-16 18:17:21 +02:00
Timm Bäder
ed184b3935 Remove GtkIconFactory
Move the icon size lookup API into gtkicontheme.c
2016-10-16 18:17:21 +02:00
Timm Bäder
9fd1a1bbe3 widget: Remove cursor-aspect-ratio/window-dragging style properties
And replaces its usages in GtkTextView/GtkStyleContext with a hard-coded
0.04 which was the default value for cursor-aspect-ratio.  Also remove
the public gtk_draw_insertion_cursor which used draw_insertion_cursor
which in turn looked up cursor-aspect-ratio
2016-10-16 18:17:21 +02:00
Timm Bäder
ccd3ff7fba gtkwidget: Remove gtk_widget_class_install_style_property_parser...
... from public API
2016-10-16 18:17:21 +02:00
Timm Bäder
281c1e4fe5 widget: Remove cursor-aspect-ratio style property 2016-10-16 18:17:21 +02:00
Timm Bäder
08c1c584b3 Remove GtkModifierStyle 2016-10-16 18:17:21 +02:00
Timm Bäder
9a388690f4 widget: Remove gtk_widget_override* API 2016-10-16 18:17:21 +02:00
Timm Bäder
3c901d6376 Remove a few more unused style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
b1d35a594e widget: Remove text-handle-width/height style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
9f5baf9130 GtkTextHandle: Use min-width/min-height
instead of GtkWidget's text-handle-width/text-handle-height style
properties
2016-10-16 18:17:21 +02:00
Timm Bäder
999d45b4e8 Remove various unused style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
6a6c49369e Fix a few GtkTextTag:*-gdk references 2016-10-16 18:17:21 +02:00
Timm Bäder
601839c825 Remove various sizing related style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
feac88dc52 switch: Remove deprecated style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
86dbe591d2 entry: Remove deprecated style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
2455bd0857 widget: Remove visibility-notify-event 2016-10-16 18:17:21 +02:00
Timm Bäder
1add02879e entry: Remove inner-border (style) property 2016-10-16 18:17:21 +02:00
Timm Bäder
878f2e4107 widget: Remove deprecated margin-left/right properties 2016-10-16 18:17:21 +02:00
Timm Bäder
d34b7d98b2 widget: Remove gtk_widget_{s,g}et_composite_name 2016-10-16 18:17:21 +02:00
Timm Bäder
80ab5ea942 widget: Remove gtk_widget_get_requisition 2016-10-16 18:17:21 +02:00
Timm Bäder
16b0906b4a widget: Remove gtk_widget_send_expose 2016-10-16 18:17:21 +02:00
Timm Bäder
bc0cef27a2 widget: Remove gtk_widget_{s,g}et_state 2016-10-16 18:17:21 +02:00
Timm Bäder
4a2c087a1e widget: Remove gtk_widget_region_intersect 2016-10-16 18:17:21 +02:00
Timm Bäder
a80a1cf8a6 widget: Remove gtk_widget_get_child_requisition 2016-10-16 18:17:21 +02:00
Timm Bäder
b3bd5fefb1 widget: Remove gtk_widget_size_request 2016-10-16 18:17:21 +02:00
Timm Bäder
4c10807e24 widget: Remove state-changed signal 2016-10-16 18:17:21 +02:00
Timm Bäder
96d9abded8 widget: Remove deprecated style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
040db1efcd Remove some deprecated GdkColor style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
627a824cab image: Remove GtkIconSet API 2016-10-16 18:17:21 +02:00
Timm Bäder
efffa3b6bd range: Remove min slider size setter/getter 2016-10-16 18:17:21 +02:00
Timm Bäder
aca35a14a0 scrollbar: Remove min-slider-length style property 2016-10-16 18:17:21 +02:00
Timm Bäder
116cb9fc0c label: Remove now unneeded deprecation markers 2016-10-16 18:17:21 +02:00
Timm Bäder
2e96f8ae70 scrolledwindow: Remove window-placement-set property 2016-10-16 18:17:21 +02:00
Timm Bäder
ba9220591f scrolledwindow: Remove scrollbar-spacing and scrollbars-within-bevel 2016-10-16 18:17:21 +02:00
Timm Bäder
05353ec933 scrolledwindow: Remove _add_with_viewport
Replaced by a normal gtk_container_add
2016-10-16 18:17:21 +02:00
Timm Bäder
33ece4e37a Remove GtkHSV 2016-10-16 18:17:21 +02:00
Timm Bäder
134556435d Remove various deprecated GtkOrientable subclasses 2016-10-16 18:17:21 +02:00
Timm Bäder
d06d17b81e Remove gtkcolorsel(dialog).{c,h} 2016-10-16 18:17:21 +02:00
Timm Bäder
9c09669711 window: Remove _set/_get_opacity 2016-10-16 18:17:21 +02:00
Timm Bäder
7fa4ac08ea window: Remove resize grip API 2016-10-16 18:17:21 +02:00
Timm Bäder
9cfbaf4916 Remove gtkfontsel.{c,h} 2016-10-16 18:17:21 +02:00
Timm Bäder
3b336dda73 dialog: Remove alternative button order API 2016-10-16 18:17:21 +02:00
Timm Bäder
2acc31b46a Remove GtkHandleBox 2016-10-16 18:17:21 +02:00
Timm Bäder
155fa4664d Remove GtkImageMenuItem 2016-10-16 18:17:21 +02:00
Timm Bäder
7f79a3fade Remove GtkMisc 2016-10-16 18:17:21 +02:00
Timm Bäder
367f13a76f Remove GtkArrow 2016-10-16 18:17:21 +02:00
Timm Bäder
9b5a50bf22 shortcutswindow: Stop using GtkArrow 2016-10-16 18:17:21 +02:00
Timm Bäder
ad155fb26c Remove GtkStock API from GtkImage 2016-10-16 18:17:21 +02:00
Timm Bäder
eadb49d97f recentchoosermenu: Stop using GtkImageMenuItem 2016-10-16 18:17:21 +02:00
Timm Bäder
421be38a3c toolbutton: Stop using GtkImageMenuItem 2016-10-16 18:17:21 +02:00
Timm Bäder
10e24d58c3 button: Remove _{get,set}_focus_click
Deprecated for the GtkWidget variant. Also remove some unused fields
from the GtkButtonPrivate struct.
2016-10-16 18:17:21 +02:00
Timm Bäder
10a92a210b button: Remove deprecated style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
9f2ca684e2 button: Remove deprecated signals from public API 2016-10-16 18:17:21 +02:00
Timm Bäder
590cd6a9f2 button: Remove GtkStock API 2016-10-16 18:17:21 +02:00
Timm Bäder
485d1b9835 Button: Remove alignment API 2016-10-16 18:17:21 +02:00
Timm Bäder
9d43644153 label,image: Remove GtkMisc usage 2016-10-16 18:17:21 +02:00
Timm Bäder
f45dadadd0 box: Remove 'padding' child property 2016-10-16 18:17:21 +02:00
Timm Bäder
c301357627 inspector: Remove object_title from css editor
It's unused
2016-10-16 18:17:21 +02:00
Timm Bäder
91f989006c Don't use GtkBox's center child in a few places
We can as well use a normal child and let it hexpand.
2016-10-16 18:17:21 +02:00
Benjamin Otte
eace2cf421 API: Remove gdk_window_set_background()
Backgrounds are always transparent black.
2016-10-16 18:17:21 +02:00
Benjamin Otte
0df388051d API: Remove GtkStyle
All the remaining gtkrc.c stuff like GtkRcStyle goes with it.
2016-10-16 18:17:21 +02:00
Benjamin Otte
05763e4875 settings: Pull in the RC parsing code 2016-10-16 18:17:21 +02:00
Benjamin Otte
361d322bfb immodules: Move path code out of gtkrc 2016-10-16 18:17:21 +02:00
Benjamin Otte
1aa336b500 cellrendererspinner: Draw our own spinner
This is the GtkStyle code just moved.
2016-10-16 18:17:21 +02:00
Benjamin Otte
662001b60a API: Remove ability to set visuals on windows
And with it, gtk_widget_get_visual() and gtk_widget_set_visual() are
gone.

We now always use the RGBA visual (if available) and otherwise fall back
to the system visual.
2016-10-16 18:17:21 +02:00
Benjamin Otte
380494c1d7 API: Remove gtk_drag_dest_set_proxy()
Proxies were only used by GtkSocket.
2016-10-16 18:17:21 +02:00
Benjamin Otte
021fe010b6 API: Remove GtkPlug, GtkSocket and GtkWin32EmbedWidget 2016-10-16 18:17:21 +02:00
Benjamin Otte
89f2e17f91 API: Remove gdk_window_set_composited()
And the related call gdk_display_supports_composite().
2016-10-16 18:17:21 +02:00
Benjamin Otte
ad64402a55 filechooserwidget: Query dpi from CssStyle 2016-10-16 18:17:21 +02:00
Benjamin Otte
77cdbfde97 fontchooserwidget: Query dpi from CssStyle 2016-10-16 18:17:21 +02:00
Benjamin Otte
fec8069e7b API: screen: Stop storing font options
font options are only ever set by the GtkSettings object and only ever
used inside GTK, so just store them there.
2016-10-16 18:17:21 +02:00
Benjamin Otte
fcbd480c76 API: Remove GDK_WA_CURSOR
The cursor was set using gdk_window_set_cursor() even in
gdk_window_new().

So instead of having yet another flag, just make the users of that flag
call gdk_window_set_cursor() directly after the window was created.
2016-10-16 18:17:21 +02:00
Benjamin Otte
2fd5048943 API: window: Remove suppport for changing wmclass_name/group
X11 was the only backend to support it and people can just override it
using XSetClassHint() directly.
The docs already advertised the function as "Do not use".

Keep the existing call to XSetClassHint() in place, so that we keep
setting the same values as in GTK3.
2016-10-16 18:17:21 +02:00
Timm Bäder
fe24fcbc3e Delete gtkvbox.{c,h} 2016-10-16 18:17:21 +02:00
Timm Bäder
fb3d9022ad Remove GtkHBox 2016-10-16 18:17:21 +02:00
Benjamin Otte
9a5de96187 API: Remove GtkNumerableIcon 2016-10-16 18:17:21 +02:00
Benjamin Otte
d09e48cec1 API: Remove -gtk_widget_get_root_window() 2016-10-16 18:17:21 +02:00
Benjamin Otte
c2125e80a3 API: window: Remove geometry support 2016-10-16 18:17:21 +02:00
Benjamin Otte
4ed9452e90 API: menu: Remove tearoff support 2016-10-16 18:17:21 +02:00
Benjamin Otte
d2a8667f83 API: Remove GtkStatusIcon 2016-10-16 18:17:21 +02:00
Benjamin Otte
9222b4cd7c inspector: Use display name instead of screen name
This is for future compatibility as they are guaranteed to be identical.
2016-10-16 18:17:21 +02:00
Benjamin Otte
266fd36f3f inspector: Port to GdkMonitor 2016-10-16 18:17:21 +02:00
Alan Jenkins
b7baf3371b shortcutswindow: working version of set_section_name()
(testing before+after, it actually works now)

https://bugzilla.gnome.org/show_bug.cgi?id=772926
2016-10-14 10:57:32 -04:00
Felix Riemann
b6cdc3961a GtkShortcutsShortcut: Support single finger swipe gestures
https://bugzilla.gnome.org/show_bug.cgi?id=772770
2016-10-13 15:02:36 -04:00
Jakub Steiner
21fa12120c gestures: provide new artwork
- illustrations for single finger swiping left and right

https://bugzilla.gnome.org/show_bug.cgi?id=772770
2016-10-13 15:02:36 -04:00
Alan Jenkins
38667b8dd0 scrolledwindow: fix leak of pan_gesture
https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:39:02 -04:00
Alan Jenkins
982c4a70b6 headerbar: fix leak of label_sizing_box
Since the widget is not added to a container, we have the responsibility
to sink the initial floating reference, and ultimately to unref it.

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:39:02 -04:00
Alan Jenkins
3731da14a0 headerbar: fix leak of separator
https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:39:02 -04:00
Alan Jenkins
8ef4f7fd74 headerbar: fix leak of start_box/end_box
gtk_widget_destroy() removes widgets from their container.  However
_internal_ widgets must be unref'ed using gtk_widget_unparent() instead.
This is symmetric with the fact that these widgets were ref'ed by direct
call to gtk_widget_set_parent().  It's also the method that was used in
gtk_headerbar_destroy().

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:39:01 -04:00
Alan Jenkins
8aa9339b2d shortcutsgroup: fix leak of title
like previous commit, albeit simpler this time

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:39:01 -04:00
Alan Jenkins
353281d9d0 applicationwindow: fix leak of help_overlay
> Due to Gtk+ keeping a reference to the window internally,
> gtk_window_new() does not return a reference to the caller.
> To delete a GtkWindow, call gtk_widget_destroy().

Caller(s) aren't expecting a need to delete help_overlay themselves
once they've installed it.  (E.g. see gtk_application_window_added()).

I didn't notice any direct precedents, but there's a parallel in the
current implementation of gtk_container_destroy() which uses
gtk_widget_destroy() on any added widget.

This avoids leaking 100s of kB per window, when I tested nautilus.

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:39:01 -04:00
Christian Hergert
133da65433 menusectionbox: add support for "text-direction" attribute
This allows the use of a "text-direction" hint set to one of "none", "rtl",
or "ltr" to enforce the text direction of a "horizontal-buttons"
display-hint.

This is useful when a menu has buttons that map to physical space in the
UI and therefore must match the application widgetry.

https://bugzilla.gnome.org/show_bug.cgi?id=772775
2016-10-13 06:34:50 -04:00
Lapo Calamandrei
9054e49776 Adwaita: dodge drop active style for window and decoration nodes
to hilight drop target there is a wildcard selector which turns
the border and shadow to green, this clearly shouldn't happen when
the whole window is a drop target.
2016-10-12 19:34:10 +02:00
Christian Hergert
a68915abd1 shortcuts: the accelerator should always be LTR
Even on RTL languages, we want the shortcut to be LTR so that we always
have <control> to the left of the accel keyval.

https://bugzilla.gnome.org/show_bug.cgi?id=772695
2016-10-10 13:56:48 -07:00
djb
fe6030a41b gtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible
...by putting it in a stack. The busy_spinner and eject_button are
mutually exclusive, but only the latter was coded to ensure that its
visibility did not cause the rest of the row to reflow. By putting both
widgets in a stack and setting child_visible on that, the row allocates
enough space to show one - or none - at once, avoiding any misalignment.

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

https://bugzilla.gnome.org/show_bug.cgi?id=772348
2016-10-10 15:13:50 -04:00
Matthias Clasen
0d00e0c3d3 Fix the build 2016-10-10 14:37:09 -04:00
Adam Jackson
434ce02ebe Use eglGetPlatformDisplay{,EXT} if available
Calling eglGetDisplay forces libEGL to guess what kind of pointer you
passed it. Different EGL libraries will do different things here, and in
particular glvnd will do something different than Mesa. Since we do have
an API that allows us to explicitly type the display, use it.

The explicit call to eglGetProcAddress is working around a bug in
libepoxy 1.3, which does not understand the EGL concept of client
extensions. Since it does not, the normal epoxy resolver for
eglGetPlatformDisplayEXT would not find any provider for that entry
point, and crash when you attempted to call it.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772415
2016-10-10 14:17:09 -04:00
Adam Jackson
3b11575f0b Fix some EGLDisplay * abuse
EGLDisplays are already opaque pointers, and eglGetDisplay returns an
EGLDisplay not a pointer to one.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772415
2016-10-10 14:17:09 -04:00
Matthias Clasen
d053d5c58f Rename Makefile references from 3.0 to 4.0
This is almost certainly incomplete.
Needs careful scrutiny
2016-10-07 10:34:50 -04:00
Matthias Clasen
74f3d7f6d3 Switch gettext domain from gtk30 to gtk40 2016-10-07 10:34:50 -04:00
Matthias Clasen
ddd1ac0934 entry: Fix a corner case of overwrite mode
We currently beep when a character is appended at the end in
overwrite mode. That is obviously not right. Patch based on
a patch by Ian MacDonald.

https://bugzilla.gnome.org/show_bug.cgi?id=772389
2016-10-05 12:22:21 -04:00
Lapo Calamandrei
3da324fbce Adwaita: render updated assets. 2016-10-05 13:47:52 +02:00
Lapo Calamandrei
f2eda1acc5 Adwaita: update assets svg
correct colors for pointy sliders assets.
2016-10-05 11:35:47 +02:00
Piotr Drąg
81cad59aeb gtk-launch: Move translator comment one line down
So it appears in .po files.
2016-10-03 16:45:20 +02:00
William Hua
83efaaf64a gtkcombobox: pass trigger event when popping up menu
https://bugzilla.gnome.org/show_bug.cgi?id=771242
2016-10-03 09:18:59 -04:00
Christoph Reiter
ae8ffc775d widget: Don't print underallocation warnings by default
See similar changes:
    https://git.gnome.org/browse/gtk+/commit/?id=1b15588732f2c4e3c59994a59613d4e5c963e283
    https://git.gnome.org/browse/gtk+/commit/?id=54fdcb3ffac3383432b379f3e16e8cb0086b8101

https://bugzilla.gnome.org/show_bug.cgi?id=770388
2016-09-30 14:41:01 -04:00
Victor Toso
9701b58c4e icon-theme: Fix leaks on error
13 bytes in 1 blocks are definitely lost in loss record 766 of 16,875
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0xA9D0247: vasprintf (in /usr/lib64/libc-2.24.so)
   by 0xA2453FC: g_vasprintf (gprintf.c:316)
   by 0xA2152F7: g_strdup_vprintf (gstrfuncs.c:514)
   by 0xA21539C: g_strdup_printf (gstrfuncs.c:540)
   by 0x678F25C: gdk_rgba_to_string (gdkrgba.c:360)
   by 0x5FAE00D: rgba_to_string_noalpha (gtkicontheme.c:4322)
   by 0x5FAE6F2: gtk_icon_info_load_symbolic_svg (gtkicontheme.c:4492)
   by 0x5FAED4F: gtk_icon_info_load_symbolic_internal (gtkicontheme.c:4622)
   by 0x5FAEEE8: gtk_icon_info_load_symbolic (gtkicontheme.c:4711)
   by 0x5F00246: gtk_css_image_recolor_load (gtkcssimagerecolor.c:118)
   by 0x5F003E4: gtk_css_image_recolor_compute (gtkcssimagerecolor.c:170)

14 bytes in 1 blocks are definitely lost in loss record 801 of 16,875
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0xA9D0247: vasprintf (in /usr/lib64/libc-2.24.so)
   by 0xA2453FC: g_vasprintf (gprintf.c:316)
   by 0xA2152F7: g_strdup_vprintf (gstrfuncs.c:514)
   by 0xA21539C: g_strdup_printf (gstrfuncs.c:540)
   by 0x678F25C: gdk_rgba_to_string (gdkrgba.c:360)
   by 0x5FAE00D: rgba_to_string_noalpha (gtkicontheme.c:4322)
   by 0x5FAE68E: gtk_icon_info_load_symbolic_svg (gtkicontheme.c:4482)
   by 0x5FAED4F: gtk_icon_info_load_symbolic_internal (gtkicontheme.c:4622)
   by 0x5FAEEE8: gtk_icon_info_load_symbolic (gtkicontheme.c:4711)
   by 0x5F00246: gtk_css_image_recolor_load (gtkcssimagerecolor.c:118)
   by 0x5F003E4: gtk_css_image_recolor_compute (gtkcssimagerecolor.c:170)

15 bytes in 1 blocks are definitely lost in loss record 838 of 16,875
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0xA9D0247: vasprintf (in /usr/lib64/libc-2.24.so)
   by 0xA2453FC: g_vasprintf (gprintf.c:316)
   by 0xA2152F7: g_strdup_vprintf (gstrfuncs.c:514)
   by 0xA21539C: g_strdup_printf (gstrfuncs.c:540)
   by 0x678F25C: gdk_rgba_to_string (gdkrgba.c:360)
   by 0x5FAE00D: rgba_to_string_noalpha (gtkicontheme.c:4322)
   by 0x5FAE6C3: gtk_icon_info_load_symbolic_svg (gtkicontheme.c:4487)
   by 0x5FAED4F: gtk_icon_info_load_symbolic_internal (gtkicontheme.c:4622)
   by 0x5FAEEE8: gtk_icon_info_load_symbolic (gtkicontheme.c:4711)
   by 0x5F00246: gtk_css_image_recolor_load (gtkcssimagerecolor.c:118)
   by 0x5F003E4: gtk_css_image_recolor_compute (gtkcssimagerecolor.c:170)

16,384 bytes in 1 blocks are definitely lost in loss record 16,847 of 16,875
   at 0x4C2DADE: malloc (vg_replace_malloc.c:298)
   by 0x4C2FC91: realloc (vg_replace_malloc.c:785)
   by 0xA1F89FA: g_realloc (gmem.c:159)
   by 0xA1BAD2E: g_array_maybe_expand (garray.c:779)
   by 0xA1BA566: g_array_set_size (garray.c:555)
   by 0xA1BBCB8: g_byte_array_set_size (garray.c:1752)
   by 0x8D1CC48: g_file_load_contents (gfile.c:6766)
   by 0x5FAE767: gtk_icon_info_load_symbolic_svg (gtkicontheme.c:4501)
   by 0x5FAED4F: gtk_icon_info_load_symbolic_internal (gtkicontheme.c:4622)
   by 0x5FAEEE8: gtk_icon_info_load_symbolic (gtkicontheme.c:4711)
   by 0x5F00246: gtk_css_image_recolor_load (gtkcssimagerecolor.c:118)
   by 0x5F003E4: gtk_css_image_recolor_compute (gtkcssimagerecolor.c:170)

https://bugzilla.gnome.org/show_bug.cgi?id=772215
2016-09-30 14:20:01 -04:00
Carlos Garnacho
769ee1156d popover: Update scrollable on relative-to hierarchy changes
The relative-to widget may be reparented itself into/out of a
scrollable. In this cases make the hierachy-changed handler to
unset the parent scrollable when unparented, and look up again
the parent scrollable after it's reparented.

https://bugzilla.gnome.org/show_bug.cgi?id=771812
2016-09-29 12:46:34 +02:00
Carlos Garnacho
588a1dce2b popover: Add helper functions around setting up an scrollable
gtk_popover_set_scrollable_full() takes care of the signal connected
on the scrollable itself, in addition to the adjustment signals the
popover listens to.

gtk_popover_update_scrollable() looks up the current relative-to
widget hierarchy and updates the current scrollable.

The places where the scrollable is being maintained have been updated
to use these functions.

https://bugzilla.gnome.org/show_bug.cgi?id=771812
2016-09-29 12:46:34 +02:00
Christian Hergert
73d09c8f74 scrolledwindow: handle NULL cursor safely
It's possible to get a NULL cursor back if there are improperly
configured or missing cursors on the system.
2016-09-28 12:37:41 -07:00
Olivier Fourdan
dbd0923b5f wayland: Avoid negative size constraints
Setting the shadow width earlier as done with commit 4cb1b96 to address
bug 771561 proved to cause unexpected side effects on size_allocate
signal propagation.

As the window is sized correctly earlier, the size_allocate signal is
not emitted again in gtk_widget_size_allocate_with_baseline() which
prevents clutter-gtk from relocating its child widget correctly.

To avoid this issue, revert commit 4cb1b96 but make sure the values
passed as min and max size is never negative in Wayland as this is a
protocol error.

With this, the min/max size will be wrong for a short amount of time,
during the state transition, until the shadow width is updated from
gdk_window_set_shadow_width().

This approach is much safer and less intrusive than changing the
size_allocate logic in gtk.

This reverts commit 4cb1b9645e.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=771915
2016-09-28 09:28:52 +02:00
Christian Hergert
b684b23c74 entry: handle NULL cursor when updating cursors
If we got a NULL cursor from gdk_cursor_new_from_name(), we need
to handle that when unreffing.
2016-09-27 14:12:43 -07:00
Christian Hergert
7ecd337877 entry: handle NULL cursor when releasing reference
If we happen to have gotten NULL back for a cursor, then we
need to check before unreffing it.
2016-09-27 14:09:02 -07:00
Christian Hergert
3c775eb2b8 treeviewcolumn: use g_clear_object when freeing cursor
There is the chance that the cursor returned NULL on systems
with missing cursors. This defensively handles that by checking
for a NULL cursor.
2016-09-27 12:41:55 -07:00
Matthias Clasen
8a7d0ab481 Make gtk_init_with_args behave as documented
This docs say it should return FALSE if the display can't be opened,
but it was failing.

https://bugzilla.gnome.org/show_bug.cgi?id=771959
2016-09-27 15:12:47 -04:00
Matthias Clasen
6181ff2552 paned: quietly handle missing cursors
The row-/col-resize cursors should really be present, but if they
aren't we don't need to crash.

https://bugzilla.gnome.org/show_bug.cgi?id=771963
2016-09-27 14:55:13 -04:00
Gautier Pelloux-Prayer
fea851b3eb Fix wrong URL link in gtkshortcutswindow documentation
https://bugzilla.gnome.org/show_bug.cgi?id=772057
2016-09-27 14:48:38 -04:00
Daniel Drake
fa23641992 _gtk_icon_helper_draw: get style earlier
After checking for rendered_surface, the call to gtk_css_node_get_style
can invalidate the style and result in rendered_surface being set to
NULL. This was result in some icon views appearing blank on
Endless OS on armv7hl, and this error:

Gtk-CRITICAL **: gtk_css_style_render_icon_surface: assertion 'surface != NULL' failed

Call gtk_css_node_get_style earlier to ensure we always pass a valid
surface to gtk_css_style_render_icon_surface.

https://bugzilla.gnome.org/show_bug.cgi?id=765649
https://phabricator.endlessm.com/T13524
2016-09-26 14:23:51 -07:00
Lapo Calamandrei
ebc852249a Adwaita: always use images for button backgrounds
transitions gets messed up when some background-image and
background-color are in the mix.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=769500
2016-09-24 16:11:39 +02:00
Philip Withnall
506426a30e gtktreeviewcolumn: Fix typo in typedef documentation 2016-09-23 21:10:13 -07:00
Carlos Soriano
cc814fdeac gtkplacesview: mark string as translatable
We missed it.

https://bugzilla.gnome.org/show_bug.cgi?id=771666
2016-09-22 17:02:19 +02:00
Rico Tzschichholz
a3f1596069 Add some missing (nullable) annotations
https://bugzilla.gnome.org/show_bug.cgi?id=771826
2016-09-22 14:02:07 +02:00
Timm Bäder
54fdcb3ffa widget: Don't print missing allocation warning by default
This was meant to be silenced unless expicitly requested but
G_ENABLE_DEBUG is defined by default unless --disable-debug is passed to
configure, so use G_ENABLE_CONSISTENCY_CHECKS instead which is only
defined if --enable-debug is explicitly passed.
2016-09-22 09:01:06 +02:00
Lapo Calamandrei
06b2adb107 encodesymbolic: handle circle objects
add circle objects to the injected style for recoloring.
Should avoid randomly colored symbolic icon bits when circles are
in the mix as in network-vpn-acquiring-symbolic for example.
2016-09-21 17:46:19 +02:00
Emmanuele Bassi
b74cd23e29 docs: Add a diagram for GtkListBox nodes
GtkListBox's API reference for CSS nodes should follow the template of
other widget classes.
2016-09-20 23:32:00 +01:00
Jakub Steiner
d8776ae756 Adwaita: sync svg assets with css
- scale slider strokes were lighter on the SVG variants
2016-09-19 22:21:23 +02:00
Olivier Fourdan
4cb1b9645e gtkwindow: Update shadow size on state change
Otherwise, with CSD, we could have a discrepancy where gtk uses the
right values for the shadows whereas the gdk backend still uses the old
values, leading in some cases to invalid or negative min size being
computed (which, in Wayland, leads a protocol error).

https://bugzilla.gnome.org/show_bug.cgi?id=771561
2016-09-19 19:35:50 +02:00
Emmanuele Bassi
08e443e0db docs: Update gtk_window_get_size()
The main corpus of the documentation for gtk_window_get_size() is still
full of X11-isms, so we should port it to something that is more
backend-agnostic. Additionally, having some examples would be nice for
application authors looking at a way to appropriately use this function.
2016-09-17 12:47:39 +01:00
Emmanuele Bassi
bb705837bc Ensure drawing context is set
If somebody decides to use gtk_widget_set_double_buffered() in the
middle of a draw() then there's the risk of calling end_draw_frame()
with an invalid pointer.

Some overeager compilers may warn about the double_buffered bit field
changing values and leading to a potentially uninitialized variable.

In order to avoid compiler warnings or crashes, we can simply store the
value of the double_buffered bit field at the beginning of the rendering
and use that instead of the actual bit field.

https://bugzilla.gnome.org/show_bug.cgi?id=771463
2016-09-15 10:17:24 +01:00
Timm Bäder
5ea69a136b widget: Only warn about missing allocation if G_ENABLE_DEBUG
Not all occurrences of this warning can be fixed today, so put it behind
a G_ENABLE_DEBUG flag since it still shows legitimate problems even if
some of them are false positives.
2016-09-14 18:06:54 -04:00
Matthias Clasen
29faa2db44 Redo focus handling in treeview once more
The fix for bug 767468 had some unintended side-effects. This is
an attempt at doing the same fix (don't grab focus when we are
grab-shadowed), while avoiding the breakage, by using GTK+'s
internal tracking for grab-shadowed-ness.

https://bugzilla.gnome.org/show_bug.cgi?id=770508
2016-09-11 11:47:55 -04:00
Matthias Clasen
3f102c27aa gtk-launch: Add help string for --version
This was missing for no good reason.
2016-09-11 10:51:19 -04:00
Christian Kellner
d4bf215611 placesview: keep reference during network fetching
Analogous to (un)mount operation, we now keep a reference around
during the ongoing operation and make use of the destroyed flag
to check if we are still alive or if we have been cancelled as
a result of the widget being destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=764979
2016-09-09 16:55:47 -04:00
Christian Kellner
7cdc04c8d2 placesview: override destory to cancel ongoing ops
Since we hold on to a reference during (un)mount operations, we
don't trigger the cancellation of operations in finalize anymore.
Instead we now override the GtkWidget's destroy() and cancel any
ongoing operations there.

https://bugzilla.gnome.org/show_bug.cgi?id=764979
2016-09-09 16:55:47 -04:00
Christian Kellner
0e5b0b75c5 placesview: properly recover from cancellation
The current code wrongly assumes that cancellation can only happen
as a result widget finalization, and consequentially does not
properly recover from it. Therefore if the operation is cancelled
as a result of user interaction, the entry is will stay disabled
and the spinner will keep spinning. This is fixed by removal of
the early bail out in case of cancellation.

https://bugzilla.gnome.org/show_bug.cgi?id=764979
2016-09-09 16:55:47 -04:00
Christian Kellner
3ed25941ac placesview: hold onto ref during (un)mount ops
During mount and unmount opertions we keep a reference to the
GtkPlacesView around, so we have a valid view for the callback
code, even in the case that othe external references have been
dropped (i.e. the containing window gets destroyed).

https://bugzilla.gnome.org/show_bug.cgi?id=764979
2016-09-09 16:55:47 -04:00
Tristan Van Berkom
c39ad84970 Revert "about dialog: Set a max-content-height on credits"
This reverts commit 6af5033386.

Scrolled window behavior of propagating child natural sizes
has now been made optional, so there is no need to work around
this by setting a hard coded maximum content height anymore.
2016-09-06 21:29:03 +09:00
Matthias Clasen
e51fd7cb18 css: Complete the cross-fade implementation
We need to actually compute the images. Otherwise,
bad things happen when we try to draw.

https://bugzilla.gnome.org/show_bug.cgi?id=767391
2016-09-06 06:38:50 -04:00
Matthias Clasen
c2ab49e963 Fix whitespace 2016-09-06 06:38:50 -04:00
Matthias Clasen
c30ee622fe css: Set meaningful fallback color
This code was passing out-of-range values into
gdk_cairo_set_source_rgb, which cannot really make
anything better.
2016-09-06 06:38:50 -04:00
Tristan Van Berkom
eaa6ca4a49 GtkScrolledWindow: Bug 766569 - fix return types in added APIs
In gtkscrolledwindow.c, the return type of _get_propagate_natural_width()
and _get_propagate_natural_height() were accidentally gint instead of
gboolean, fixed to match the type correctly declared in the header file.
2016-09-05 16:08:27 +09:00
Matthias Clasen
953b82a584 label: take padding into account when measuring
When doing height-for-width measurements, we need to take
padding into account. This was causing various allocation
errors.

https://bugzilla.gnome.org/show_bug.cgi?id=770849
2016-09-04 15:41:11 -04:00
Matthias Clasen
61e8c69460 label: Fix indentation
Trivial, but annoying.
2016-09-04 15:41:11 -04:00
Matthias Clasen
5b21c7d79f range: Ensure we don't underallocate the highlight gadget
This was causing warnings in HighContrast.

https://bugzilla.gnome.org/show_bug.cgi?id=770614
2016-09-04 09:43:51 -04:00
Matthias Clasen
9ddd40f61e Fix a variable name misspelling
No semantic change here; the misspelling just annoyed me.
2016-09-04 08:21:49 -04:00
Joaquim Rocha
f9658a2faf listbox: Select the last row on page down when there are few rows
When pressing page down doesn't retrieve a valid row (because the list
box has few rows), the last visible one should be selected instead.

https://bugzilla.gnome.org/show_bug.cgi?id=770703
2016-09-03 13:52:39 +02:00
Joaquim Rocha
adabec7d25 listbox: Avoid crashing on page down if the list has few rows
The code always assumed that getting a row at a certain 'y' was
possible but if the list box has more empty space than rows then a
valid row may not be retrieved.

https://bugzilla.gnome.org/show_bug.cgi?id=770703
2016-09-03 13:52:39 +02:00
Timm Bäder
857997be8c popover: Skip first frame when transitioning
Similar to what we do in GtkStack.
2016-09-03 12:24:58 +02:00
Jakub Steiner
63c18bba51 Adwaita,HC: fix icon name
- while we don't use steppers anymore, for some reason they are still
  defined in the theme and if you sacrifice a chicken and jump on one
  leg at full moon, you can enable them.

https://bugzilla.gnome.org/show_bug.cgi?id=769498
2016-09-02 19:11:29 -04:00
Timm Bäder
ce1ae60da2 popover: Propagate drawing 2016-09-01 15:20:12 +02:00
Timm Bäder
2c04941c5c popover: Fix hfw/wfh size request
Since we're using _get_rect_coords in size-allocate when allocating the
size of the child widget, use the newly introduced _get_rect_for_size to
calculate the difference between the passed size_for and the one we're
supposed to pass on to the child widget.
2016-09-01 15:16:58 +02:00
Timm Bäder
7f1ab32e60 popover: Introduce _get_rect helper for a size
When calculating the requested size of a popover, we need to do the
exact same same thing _get_rect_coords did, but not for the
current popopver allocation. Add _get_rect_for_size that can be used for
this purpose
2016-09-01 15:15:18 +02:00
Timm Bäder
4f7ec1f1c0 gtk{info,search}bar.ui: Remove some leftover attributes 2016-09-01 12:32:51 +02:00
Arnaud Bonatti
533de822ba Use 'focused' everywhere.
https://bugzilla.gnome.org/show_bug.cgi?id=770624
2016-09-01 07:14:30 +02:00
Arnaud Bonatti
3c3a11591b Fix typos.
https://bugzilla.gnome.org/show_bug.cgi?id=770624
2016-09-01 07:14:30 +02:00
Tristan Van Berkom
0984d1622d GtkScrolledWindow: Bug 766569 - Make propagation of natural child sizes optional
Making propagation of child natural sizes mandatory (or default, even) was
evidently a mistake as this causes dynamic content in a scrolled window
to resize it's parent when the scrolled window is competing for space
with an adjacent widget.

This patch instead adds API to control whether natural width and
height of the child should be propagated through the scrolled windows
size requests.
2016-08-31 14:44:50 -04:00
Lionel Landwerlin
ea1295c9ab gtk: window: don't forget to realize popovers of subwindows
https://bugzilla.gnome.org/show_bug.cgi?id=770307
2016-08-29 14:01:10 -04:00
Jonas Ådahl
f98c9fec6c window: Add Wayland implementation of gtk_window_export_handle
https://bugzilla.gnome.org/show_bug.cgi?id=769788
2016-08-29 13:20:44 -04: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
Matthias Clasen
6af5033386 about dialog: Set a max-content-height on credits
This keeps the credits section from making the dialog grow
when there are lots of credits.

https://bugzilla.gnome.org/show_bug.cgi?id=770458
2016-08-29 10:01:20 -04:00
Carlos Soriano
cfe4c9e0f4 gtkplacessidebar: fix signal marshal
We were using __VOID for the SHOW_OTHER_LOCATION signal that
uses flags named SHOR_OTHER_LOCATION_WITH_FLAGS.
However, if a signal uses flags the marshal needs to use __FLAGS.

This patch addresses this using VOID__FLAGS as the marshaler parameter.

Thanks to Jan Steffens for pointing this out.

https://bugzilla.gnome.org/show_bug.cgi?id=770550
2016-08-29 15:01:12 +02:00
Benjamin Otte
35c96c2c1f Add braces to appease gcc
-ftrack-macro-expansion=0 doesn't like if statements without braces when
evaluating indentation levels.
2016-08-25 23:02:27 +02:00
Benjamin Otte
c8b301f1ea uimanager: Correctly indent code 2016-08-25 23:02:27 +02:00
Benjamin Otte
da8cef16dc a11y: Correctly indent code 2016-08-25 23:02:27 +02:00
Matthias Clasen
f53706b003 cell renderer text: Allow entries to shrink
Set a small max-width on entries used for editing cells, so they
adapt to small columns and don't overlap the next column.

https://bugzilla.gnome.org/show_bug.cgi?id=770374
2016-08-25 07:53:32 -04:00
Matthias Clasen
f66a76d998 Document window-icon related api as 'may not work'
Some platforms simply don't have window icons (such as Wayland).
2016-08-24 14:43:58 -04:00
Matthias Clasen
ae636ba0c2 notebook: Update arrow state when switching pages
Otherwise, we may end up showing clickable arrows that don't
do anything.

https://bugzilla.gnome.org/show_bug.cgi?id=770332
2016-08-24 14:10:35 -04:00