Commit Graph

27975 Commits

Author SHA1 Message Date
Timm Bäder
6bbb9a1173 GtkRecentManager: Remove superfluous local variable 2017-03-19 15:44:15 +01:00
Timm Bäder
c7c9a0ee51 entrycompletion: Remove unnecessary NULL check
completion really shouldn't be NULL at this point, especially since it
gets dereferenced higher up in the function.
2017-03-18 07:13:13 +01:00
Timm Bäder
53f0c2626e calendar: Fix else branch indentations 2017-03-18 07:07:06 +01:00
Matthias Clasen
3ec954a54a Avoid a critical warning in the filechooser portal
This was showing up when cancelling a portal file chooser
in recipes.
2017-03-17 19:59:55 -04:00
Murray Cumming
158015be6c
docs: Remove mentions of gtk_init_with_args().
Because it has been removed: See commit 7e8eb3ddcd
2017-03-17 21:12:12 +01:00
Timm Bäder
c71c3954f4 headerbar: Fix size requisition variable mixup
Happened when porting to gtk_widget_measure.
2017-03-17 18:49:52 +01:00
Alexander Larsson
1fe4b13871 Allow custom renderer for the inspector
If you set GTK_INSPECTOR_RENDERER to the same type of
values that GSK_RENDERER takes this can change the renderer
used for the inspector. This is useful if you're debugging
one renderer and don't want to affect the inspector.
2017-03-17 16:12:45 +01:00
Timm Bäder
a65fbf2d49 filechooserwidget: Remvoe useless gtk_widget_show call
And a comment above. Even if it is not correct, it doesn't matter since
we call gtk_widget_show on it again later in that function.
2017-03-13 12:45:38 +01:00
Timm Bäder
6607ef4ae2 modelmenuitem: Remove unnecessary gtk_widget_show calls 2017-03-13 12:14:38 +01:00
Timm Bäder
373d261d15 listbox: Avoid a gtk_widget_destroy call 2017-03-13 12:08:58 +01:00
Timm Bäder
4d3b15e37c filechooserwidget: Avoid a gtk_widget_destroy 2017-03-13 12:08:58 +01:00
Timm Bäder
fa5c39942c filechooserwidget: Remove unnecessary gtk_widget_show calls 2017-03-13 12:08:58 +01:00
Timm Bäder
9047a5dc52 entry: make sure priv->current_pos is valid
We can e.g. get the entry dispose()d and a focus_out event after that
(because the toplevel unsets the focus which previously was the entry).
We then later use priv->current_pos in a call to pango API which makes
sure the given index is valid for the given layout. Since we lazily
create a GtkEntryBuffer in get_buffer() and a PangoLayout lazily in
gtk_entry_create_layout, these 2 are always valid but don't match
priv->current_pos in this situation.

Fix this by resetting priv->current-pos in dispose().
2017-03-13 12:08:58 +01:00
Timm Bäder
fca6bef697 entry: Remove cursor type parameter from get_cursor_locations
We are only ever passing CURSOR_STANDARD anyway.
2017-03-13 12:08:58 +01:00
TingPing
47f4e44aec Improve GContentType usage
Convert to content type where needed.
Should fix various issues on Windows and OS X.

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-08 23:10:49 -05:00
Jakub Steiner
ee3994f715 Adwaita: border for selmode checkboxes
- there was an extra border for selection mode
2017-03-06 17:02:01 +00:00
Daniel Boles
24b966f6e7 Frame: minor update to intro docs
This incorporates a couple of recent tweaks from gtk-3-22.
2017-03-06 07:25:08 +00:00
Timm Bäder
73f8636687 widget: Remove direction-dependent margin code
Since margin-left and margin-right are gone, we don't have to care
about the difference between them and start/end anymore and we can just
save start as left and end as right.
2017-03-05 16:24:20 +01:00
Timm Bäder
f860ff8647 widget: Remove get_valign_with_baseline
This only existed for backwards compat reasons which aren't interesting
for gtk4.
2017-03-05 15:18:32 +01:00
Timm Bäder
f1f39e8924 sizerequest: Fix min_size > nat_size error message
Instead of mentioning the old _get_preferred_xxx functions, mention
measure() and print the for_size value as well. The orientation is given
by printing either "width" for GTK_ORIENTATION_HORIZONTAL or "height"
for GTK_ORIENTATION_VERTICAL.
2017-03-05 15:01:57 +01:00
Timm Bäder
bd86af4e15 treeviewcolumn: Use gtk_widget_measure to measure widget sizes 2017-03-05 09:24:41 +01:00
Timm Bäder
a8ac6fe8de pathbar: Use gtk_widget_measure to measure widget sizes 2017-03-05 09:24:41 +01:00
Timm Bäder
a29343d4cf widget: Reword size request documentation 2017-03-04 08:57:50 +01:00
Timm Bäder
75a3d0fab6 treeview: Use gtk_widget_measure to measure widget sizes 2017-03-04 08:44:49 +01:00
Timm Bäder
846e6dc0b1 menus: Use gtk_widget_measure to measure widget sizes 2017-03-04 08:44:49 +01:00
Timm Bäder
b16a322c4c applicationwindow: Use gtk_widget_measure to measure widget sizes 2017-03-04 08:44:49 +01:00
Daniel Boles
0a0f9718ef HighContrast/parse-sass.sh: Use a reliable shebang
/usr/bin/sh does not exist on e.g. Debian sid.
Use the same shebang as Adwaita/parse-sass.sh
2017-03-03 08:46:32 +00:00
Jakub Steiner
870447446d Adwaita: style selectionmode checks for flowbox tiles
- continue being asset based rather than drawn by CSS
- using node 'check' rather than style '.check'

https://bugzilla.gnome.org/show_bug.cgi?id=779074
2017-03-02 19:42:50 +00:00
Jakub Steiner
6fe1d30e62 Adwaita: style flowbox tiles
+ fixups by Daniel Boles from gtk-3-22

https://bugzilla.gnome.org/show_bug.cgi?id=779073
2017-03-02 19:42:47 +00:00
Carlos Garnacho
ed34be8bb3 gtkgesturesingle: Fallback to GtkGesture handling on GDK_TOUCHPAD_SWIPE
There are GtkGestureSingle subclasses that can be made to handle multiple
fingers (GtkGestureSingle is a subclass of GtkGesture, and not the
opposite, after all). And GtkGestureSwipe already tries to handle
GDK_TOUCHPAD_SWIPE events, except this event handler silently ignores
those.

Falling back to the GtkGesture generic handler which already
handles touchpad gesture events fixes this.
2017-03-02 18:25:04 +01:00
Timm Bäder
dc511a38d0 placesview: Simplify button construction 2017-03-02 15:16:08 +01:00
Timm Bäder
0d2debad48 placessidebar: Fix css node name typo 2017-03-02 15:16:08 +01:00
Timm Bäder
dc8904d9c7 widgetnode: Remove unused define 2017-03-02 15:16:08 +01:00
Timm Bäder
4c39204ddd cssnodestylecache: Use const pointer in lookup 2017-03-02 15:16:08 +01:00
Timm Bäder
7d85ffce33 switch: remove unnecessary gtk_widget_show calls 2017-03-02 15:16:08 +01:00
Timm Bäder
b52966a318 cssselector: Stop parsing deprecated selectors 2017-03-02 15:16:08 +01:00
Timm Bäder
8eb7575c7f csswidgetnode: Remove unused include 2017-03-02 15:16:08 +01:00
cedlemo
4bef292253 Fix bad check of GtkActionPadType in gtk_pad_controller_set_action
https://bugzilla.gnome.org/show_bug.cgi?id=779317
2017-03-01 12:55:29 +01:00
Daniel Boles
db7ff6d88a Range: Remove leftover comment about update policy
Update policies were removed way back in 2011… in
commit c43a31ea33
2017-02-27 20:05:37 +00:00
Daniel Boles
ad5ff5f6d1 Inspector: Use Title Case for labels & menu items
https://developer.gnome.org/hig/stable/writing-style.html.en

https://bugzilla.gnome.org/show_bug.cgi?id=779147
2017-02-23 19:13:41 +00:00
Daniel Boles
b23513e2da TextView—Avoid pointless Pango in iter_line_is_rtl
Get the direction that was already worked out and stored in the
TextLineDisplay, rather than making Pango figure it out again.

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-22 21:28:13 +00:00
Daniel Boles
2c9c871c5f TextView—Plug a memory leak
Thanks to Nelson Benitez for pointing this out.

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-22 21:27:59 +00:00
Daniel Boles
10e49a2861 Revert "ScrolledWindow—Don’t req size for auto-hidden bars"
This reverts commit 901e5ff3a3.

This causes criticals in e.g. the Text View: Multiple Buffers demo.
More work is required to get a fix for Bug 778853 that does not cause
anything else to regress.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-22 19:31:38 +00:00
Daniel Boles
830eb623e7 Scale: Fix erroneously removed : in a signal doc 2017-02-22 08:54:27 +00:00
Daniel Boles
e0b70f3629 Frame—Note set_label always destroys :label-widget
The fact that it doesn’t reuse the existing GtkLabel if present is not
immediately obvious to users (or is it just me?), so clarify that the
pre-existing :label-widget, if any, is always removed and replaced.
2017-02-21 21:26:43 +00:00
Daniel Boles
b106c5e4d5 Frame—Clarify relationship of :shadow-type & .flat 2017-02-21 21:26:41 +00:00
Daniel Boles
b953710fd7 Frame: Explain the .flat style class 2017-02-19 17:19:08 +00:00
Daniel Boles
901e5ff3a3 ScrolledWindow—Don’t req size for auto-hidden bars
POLICY_AUTOMATIC means scrollbars are only shown when needed, i.e. when
the size of the window is not large enough to show the entire child. So
when measuring the preferred size, such scrollbars should be ignored.

But measure() was adding size for bars for which policy_may_be_visible()
was TRUE, which it returns for POLICY_ALWAYS (good) & _AUTOMATIC (bad).
So we reserved space for child plus scrollbars, & because we have enough
space for the child, POLICY_AUTOMATIC hides the scrollbar, leaving the
extra reserved space empty at the right/bottom sides of the child. This
is very noticeable/inconvenient for non-overlay, automatic scrollbars.

Fix this by only requesting size for scrollbars that use POLICY_ALWAYS,
rather than basing the decision on policy_may_be_visible().

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-19 17:03:44 +00:00
Daniel Boles
0128b8d33f TextView—Fix inverted movements by arrows in RTL
Using Ctrl + left/right to skip between words, or left/right to cancel a
selection, were causing movement on the screen in the opposite direction
of the glyph on the key. This was surprising and awful UX for RTL users.

This is based on a patch covering the former case by:
Author:    Mehdi Sadeghi <mehdi@mehdix.org>
Date:      Sat Feb 18 02:16:00 2017 +0000

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-19 12:39:05 +00:00
Daniel Boles
c4fbce52ce Entry: Add newlines to ease reading huge switches
These are monstrosities!
2017-02-19 12:39:05 +00:00