Commit Graph

28075 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
Daniel Boles
4bea7b0ae8 Entry—Fix inverted movements by arrow keys 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:    Ori Avtalion <ori@avtalion.name>
Date:      Tue Apr 20 08:06:23 2010 +0000

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-19 12:39:05 +00:00
Daniel Boles
3e28b1fc64 Scale: Fix signal documentation syntax
Oops, sorry. Thanks to Cristoph Reiter for correcting me on this.
2017-02-19 10:14:01 +00:00
Daniel Boles
5c9a100fe8 Scale: Improve docs of format-value property 2017-02-19 09:12:38 +00:00
Daniel Boles
ebca0c6ebf Scale: Improve docs of prop digits in other places
There were places still implying that it was only used for display.
2017-02-19 08:39:31 +00:00
Daniel Boles
97fe47bbd9 Scale: consistent #Class:signal-or-property syntax
Use : everywhere, not a mixture of : and ::
2017-02-19 08:39:30 +00:00
Daniel Boles
a1239a9a6a CssSelector: Fix warning for bad pseudo-class name
It was "Missing name of pseudo-class", but the real problem is exactly
the opposite: we /have/ been given a name, but it is not a valid one.
Change it to "Invalid name of pseudo-class" to minimise confusion.
2017-02-18 21:01:38 +00:00
Timm Bäder
85aaf13c03 scrolledwindow: Remove unused define 2017-02-18 19:11:22 +01:00
Timm Bäder
9fc739e2c7 image: Remove useless queue_resize call
This will be done form GtkIconHelper already when we call
gtk_image_reset
2017-02-18 19:01:41 +01:00
Timm Bäder
0f15519794 expander: Remove unused defines 2017-02-18 19:01:28 +01:00
Timm Bäder
e1f8d5a647 notebook: Use gtk_widget_measure 2017-02-18 19:01:28 +01:00
Timm Bäder
4c94242988 expander: Use gtk_widget_measure 2017-02-18 19:01:28 +01:00
Timm Bäder
ed245b42cb scrolledwindow: Avoid usage of uninitialized local
the scrollbar passed in better be either priv->hscrollbar or
priv->vscrollbar. Ensure that by using a simple else instead of an
else-if and a g_assert.
2017-02-18 19:01:28 +01:00
Lionel Landwerlin
72801a27eb widget: propagate scale factor upon reparenting a widget
When a widget is created, its default scale is the scale of the
primary screen (for instance 2). But once parented to another widget
its scale factor should be the one of its parent (if parented to a
widget on a screen at scale factor 1, it should be 1).

The problem is that we don't emit the notify::scale-factor signal when
reparenting happens.

https://bugzilla.gnome.org/show_bug.cgi?id=776821
2017-02-18 02:53:57 +00:00
Daniel Boles
1a8a35f347 Image—Add some more missing (nullable) annotations 2017-02-17 22:17:08 +00:00
Timm Bäder
0675fce506 flowboxchild: Use gtk_widget_measure to measure widget sizes
GtkFlowBoxChild is a simple GtkBin, so measure the child widget size in
a simple way.
2017-02-17 18:23:10 +01:00
Timm Bäder
8165b641cd paned: Use gtk_widget_measure to measure widget sizes 2017-02-17 18:23:10 +01:00
Timm Bäder
a0323e52a6 combobox: Use gtk_widget_measure to measure widgets 2017-02-17 18:23:10 +01:00
Timm Bäder
848d55a187 cssimage: Plug a small memory leak 2017-02-17 18:23:10 +01:00
Timm Bäder
2786d52ab6 filechooserentry: Avoid an uninitialized value
|= with a garbage value on the left side results in a still-garbage
value.
2017-02-17 18:23:01 +01:00
Timm Bäder
aebea7d644 filechooserwidget: Fix profiling code compilation 2017-02-17 18:23:01 +01:00
Timm Bäder
548f6138ef Add a few missing (nullable) annotations 2017-02-17 18:23:01 +01:00
Timm Bäder
e0738b1e43 builder: avoid an uninitialized value
When g_module_supported() returns FALSE, args.module is garbage
otherwise.
2017-02-17 18:22:49 +01:00
Timm Bäder
d637b0eeed filechooserwidget: Fix rename popover position calculation
Since the browse_file_popover is positioned correctly, just convert the
coordinates in the same way we do there.

https://bugzilla.gnome.org/show_bug.cgi?id=778746
2017-02-17 18:22:15 +01:00
Nelson Benítez León
aa48399002 textiter: fix bug in gtk_text_iter_backward_line()
gtk_text_iter_backward_line() checks the value of
real->line_char_offset without previously calling
ensure_char_offsets (real) to make sure the former
is up-to-date.

As a consequence of this, when gtk_text_iter_backward_line()
is called after a gtk_text_buffer_insert_range() in the
first line of buffer, the iter is not moved to the start of
the line, and the return value is wrong.

Fixed by adding the ensure_char_offsets() call.

A test case for this bug is added to the textiter gtk testsuite.
2017-02-17 19:49:55 +05:00
Daniel Boles
0c09e4776d combobox—Always popup menu using current event
priv->trigger_event is never set, so it is always NULL. This means the
gtk_menu_popup*() methods use the current event. The only way to get any
other event to combobox_menu_popup() was from the button-press-event
handler I just removed, which would end up being the current one anyway.

So, bin priv->trigger_event & explicitly pass NULL to gtk_menu_popup*().
2017-02-16 21:33:25 +00:00
Daniel Boles
69d2459471 combobox—Remove useless button-press-event handler
We use toggled, which does everything we need; this adds nothing useful.

Credit to Timm for noticing this—I didn’t when moving it to the ui file.
2017-02-16 21:09:55 +00:00
Emmanuele Bassi
51010da740 Use gtk_show_uri_on_window() in GtkLabel
Avoid the deprecated gtk_show_uri(), and allow activating link in
sandboxed applications.

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:37:55 +01:00
Bastien Nocera
0875aa56ba GtkMountOperation: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:37:55 +01:00
Bastien Nocera
76dfef6257 gtk: Ignore gtk_show_uri() deprecation warnings
https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:37:55 +01:00
Bastien Nocera
c358383d6c GtkLinkButton: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:37:55 +01:00
Bastien Nocera
d2c1e6faff GtkAboutDialog: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:37:55 +01:00
Daniel Boles
02e9fb5a78 widget: Document signal mnemonic-activate
Name the extra bool argument, and move the explanatory paragraph from
the emitting method to the signal, with some minor tweaks to wording.

https://bugzilla.gnome.org/show_bug.cgi?id=778534
2017-02-15 21:44:29 +00:00
Bastien Nocera
22ea1a535e gtkshow: Prefer gtk_show_uri_on_window() which works for sandboxed apps
gtk_show_uri_on_window() will pass enough information for Portal helpers
to allow dialogue parenting in Flatpak, gtk_show_uri() won't, so
deprecate it.

https://bugzilla.gnome.org/show_bug.cgi?id=778678
2017-02-15 16:33:01 +01:00
Timm Bäder
4e141883e8 iconhelper: Remove unused _draw implementation 2017-02-14 16:56:55 +01:00
Timm Bäder
08355997c2 snapshot: Avoid a double-free
We can't pass the same string to two different snapshot states since
removing one of them will free the passed string, so just create another
one for the second state.
2017-02-14 16:56:55 +01:00
Timm Bäder
6a6b6549ea widget: Remove get_preferred_width/height mention in warning 2017-02-14 16:56:55 +01:00
Timm Bäder
1fcbc5b9e9 gtkcontainerprivate: Remove unused function prototypes 2017-02-14 16:56:55 +01:00
Timm Bäder
ec2ce26d82 colorbutton: Inherit from GtkWidget 2017-02-14 16:56:55 +01:00
Lapo Calamandrei
c4524623a9 HC: insensitive styling for views. 2017-02-08 21:32:47 -05:00
Lapo Calamandrei
6eb9b57e72 adwaita: insensitive styling for views
Add an insensitive style to views, somehow we didn't ship one, so
for example, disabled textviews looked the same as sensitive ones.
2017-02-08 21:32:33 -05:00
Timm Bäder
78a36cf4bb popover: Simplify gtk_popover_measure 2017-02-05 15:03:35 +01:00
Timm Bäder
07643764a6 infobar: Use GtkButton:icon-name 2017-02-05 15:03:35 +01:00
Timm Bäder
3b1601f8ad colorchooserwidget: Show palette by default
Restore the old behavior.
2017-02-05 15:03:35 +01:00
Michael Catanzaro
3905726627 notebook: redraw arrows after closing a tab
Thanks to Daniel Boles for helping with a crash in an earlier version of
this patch.

https://bugzilla.gnome.org/show_bug.cgi?id=777547
2017-02-04 12:57:08 -06:00
Timm Bäder
f251c5bf94 spinbutton: Fix right and middle click on +/- buttons
Tell the gesture that we handle all buttons and actually claim the
gesture in the ::pressed handler
2017-02-01 21:05:27 +01:00
Daniel Boles
2f2ec4fec8 searchentry: Fix typo in documentation 2017-01-31 09:39:39 +00:00
Timm Bäder
2f6d60d6af stack: Fix node position during crossfade 2017-01-30 18:11:15 +01:00
Timm Bäder
2aea8dfee9 togglebutton: Move :inconsistent to GtkCheckButton 2017-01-30 18:11:00 +01:00
Timm Bäder
66d584ce6e togglebutton: Move :draw-indicator property to GtkCheckButton
It's not used in GtkToggleButton at all, only in GtkCheckButton and
GtkRadioButton.
2017-01-30 18:11:00 +01:00
Timm Bäder
1a0577b3f4 checkbutton: Remove unused vfunc 2017-01-30 18:11:00 +01:00
Timm Bäder
eb0c5a6a6c checkbutton: Remove unused function prototype 2017-01-30 18:11:00 +01:00
Timm Bäder
6c6ed7496c widget: Remove gtk_widget_class_list_style_properties
Unused.
2017-01-30 18:11:00 +01:00
Timm Bäder
de56947e86 gtkbuilder: Remove unused struct 2017-01-30 18:11:00 +01:00
Timm Bäder
c82fee4882 build: Stop compressing ui files
It's slower at runtime. Instead, strip blanks.
2017-01-30 18:11:00 +01:00
Piotr Drąg
bfaed659f1 Fix translator comments
They need to be exactly one line above a string to show up in .po files.
2017-01-28 01:13:12 +01:00
Michael Catanzaro
03c026e6b6 Revert "notebook: redraw arrows after closing a tab"
This reverts commit 218beb2ef4.
2017-01-27 08:54:24 -06:00
Michael Catanzaro
218beb2ef4 notebook: redraw arrows after closing a tab
https://bugzilla.gnome.org/show_bug.cgi?id=777547
2017-01-24 08:33:35 -06:00
Timm Bäder
572639fed7 widget: Remove gtk_widget_get_preferred_size mention from docs
Mention gtk_widget_measure instead.
2017-01-22 15:01:53 +01:00
Timm Bäder
82e49952e5 flowbox: Measure child widget sizes using gtk_widget_measure 2017-01-22 15:01:40 +01:00
Timm Bäder
f05402ce2b widget: Remove warning about already visible widgets
That was just added by mistake of course.
2017-01-22 14:48:28 +01:00
Timm Bäder
56a58655fe Remove unnecessary gtk_widget_show calls 2017-01-22 14:38:21 +01:00
Timm Bäder
dc904ffaf9 gtkfontbutton: hexpand the font label
To restore the previous look.
2017-01-22 14:38:21 +01:00
Daniel Boles
90b9dc458f combobox: Stop pointlessly NULL-checking the menu
We now have a valid menu to use at all times.
2017-01-21 21:34:46 +00:00
Daniel Boles
8c980445e3 combobox: Move area and menu to .ui file
Now that priv->area is guaranteed to be constructed by us, and not
passed in by a user, we can move it to the .ui file and stop manually
managing its lifetime altogether. And once the area is there, we can
move the menu there too (and stop pointlessly destroying/rebuilding it).
2017-01-21 21:34:46 +00:00
Daniel Boles
439fcf7578 combobox: Remove property cell-area
The CellArea is going to become a pure implementation detail & be moved
to the .ui, instead of letting users mess with it (if anyone ever did).
2017-01-21 21:34:45 +00:00
Daniel Boles
36413a8eca combobox: Reuse code rather than reimplementing it
We already have cell_layout_is_sensitive() to get whether at least one
cell in a Layout is sensitive, which we need because CellLayout/View
do not implement foreach(). So, since we wrote that, we can use it to
check our CellArea too, instead of doing foreach with a custom callback.
2017-01-21 19:00:10 +00:00
Daniel Boles
c7e4c82df4 combobox: some code cleanups
* Merge adjacent if statements with the same condition
 * Add a space between a function and its declaration
2017-01-21 18:59:27 +00:00
Daniel Boles
c5c0127e10 menushell: Fix select_last() to get last, not 1st
It was broken in the same way as select_first(), as explained in
commit a5211adb22
2017-01-21 18:55:46 +00:00
Daniel Boles
c662e691ed combobox: Fix documentation typo bx => box 2017-01-21 16:13:44 +00:00
Daniel Boles
a5211adb22 menushell: Make select_first() do that, not last…
It was looping over all items, not breaking out when it found the first
selectable one, and then selecting the _last_ selectable one (if any)
found. So, it did exactly the opposite of its name. This made me quite
baffled when opening a submenu with right-arrow put me at its last item.

Originally, the loop set to_select and broke if the current item was
selectable and not tear-off, meaning that it would correctly select the
first suitable item. However, when tear-off functionality was removed
in commit 4ed9452e90, so was the break.
2017-01-21 15:50:54 +00:00
Piotr Drąg
e47bd31e6a Fix CSS spelling in a translatable string 2017-01-20 23:46:38 +01:00
Daniel Boles
71d7a1b3d0 menushell: Don’t dereference before typechecking 2017-01-20 22:15:42 +00:00
Daniel Boles
802f838aa0 combobox: If typechecking, don’t reference before 2017-01-20 21:08:58 +00:00
Timm Bäder
ab051fd53f Don't hide windows and popovers in init()
Instead, don't make them visible in gtk_widget_init in the first place.
2017-01-20 21:51:05 +01:00
Timm Bäder
b1408c9694 fontbutton: Be a GtkWidget 2017-01-20 21:51:03 +01:00
Timm Bäder
6376aaf44b assistant: Don't forget to remove child widgets 2017-01-20 21:50:02 +01:00
Timm Bäder
0f2e043c3d toolitemgroup: Properly remove internal child widget
We now need to use gtk_widget_unparent and can't just destroy it.
2017-01-20 21:50:02 +01:00
Timm Bäder
4bd2a9bca9 popovermenu: Remove forall implementation 2017-01-20 21:50:02 +01:00
Timm Bäder
3fb4b079e1 button: Don't explicitly show child widgets 2017-01-20 21:50:02 +01:00
Timm Bäder
c36ad400fa recorder: Adapt to widget visibility changes
We now need to explicitly hide the details label.
2017-01-20 21:50:02 +01:00
Timm Bäder
3ec15d98fa Fix some widget visibility fallout 2017-01-20 21:37:08 +01:00
Timm Bäder
f4341ee9f7 widget: Remove show-all property
Doesn't make sense anymore now that gtk_widget_show_all is gone.
2017-01-20 21:37:07 +01:00
Timm Bäder
ea897c6df4 Remove gtk_widget_show_all 2017-01-20 21:37:04 +01:00
Timm Bäder
13b001b77c widget: Remove show_all vfunc 2017-01-20 21:33:38 +01:00
Timm Bäder
5f57e3b711 filechooserbutton: Be a GtkWidget
Instead of subclassing GtkBox to have 2 child widgets, subclass
GtkWidget and only render one of them.
2017-01-20 21:33:38 +01:00
Timm Bäder
d862c5c6df sizerequest: Use gtk_widget_measure to measure widget sizes 2017-01-20 21:33:38 +01:00
Timm Bäder
9679c4f0e0 gtkbuilder: Improve error messages 2017-01-20 21:33:37 +01:00
Timm Bäder
2a84be4ae5 shortcutswindow: Unset search_bar in dispose
And check for null-ness in unmap. This prevents a crash when the window
is first disposed and then unmapped.
2017-01-20 21:33:37 +01:00
Timm Bäder
5dbf8458f5 shortcutswindow: Use GtkButton:icon-name for search button 2017-01-20 21:33:37 +01:00
Timm Bäder
524bf22db7 shortcutsshortcut: Be a GtkWidget
Instead of subclassing GtkBox and overriding _add to not work, subclass
GtkWidget and add a normal GtkBox as a child widget.
2017-01-20 21:33:37 +01:00
Timm Bäder
8085884277 gtkshortcutswindow: Adapt to GtkWidget visibility changes 2017-01-20 21:33:37 +01:00
Timm Bäder
02c2887772 filechooser: adapt to GtkWidget:visible changes 2017-01-20 21:33:37 +01:00
Timm Bäder
b1eccd770e coloreditor: Hide overlay boxes 2017-01-20 21:33:37 +01:00
Timm Bäder
33d41fccdd Hide popovers and toplevels by default 2017-01-20 21:33:37 +01:00
Timm Bäder
fee788cd4a widget: Be visible by default 2017-01-20 21:33:36 +01:00
Daniel Boles
360fbd0920 combobox: popdown() the menu during unmap()
combo_box_popdown() currently skips popping down our menu if it is NULL.
But the required call to this at end-of-life was in destroy(), by which
point dispose() already NULLed the menu, so Menu::popdown() would never
run, even if it should. Fix this by trying popdown() earlier in unmap().
Also, add a converse assurance that we don’t popup() while not mapped.

Even once we remove all the now-pointless NULL checks, destroy() was the
wrong place to call combo_box_popdown(), and unmap() is the right place.
2017-01-20 13:47:26 +00:00
Chun-wei Fan
3629def0d0 gtkmain: Fix build on Windows
gtk_init() removed its support for supporting arguments, so we ought to do
likewise for Windows, which actually defines items that call gtk_init()
the old way (and also get rid of argument support in those functions,
since the direction is to not support them).

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-01-20 19:50:02 +08:00
Benjamin Otte
f8b6831c98 gtk: Register GSK resources at startup
That way they show up in the resource list in the inspector even when
running with the Cairo renderer.
2017-01-20 01:19:02 +01:00
Daniel Boles
68824e80fd combobox: Remove dead code & unneeded type checks
Commit fdc0c6426b removed the appears-as-
list style property, & hence the ability to put the ComboBox into list
mode – but it left behind a pile of hijinks that were only used in said
mode & so were now doing absolutely nothing. This commit deletes those.

While doing that, I got carried away…so this also stops pointlessly type
checking popup_widget, as that can never be anything but a GtkTreeMenu.
It still checks for NULL everywhere, which shouldn’t be needed, but (A)
this commit is already too big, & (B) simply removing such checks where
they _seem_ unnecessary causes bad times. I’ll puzzle through that later
2017-01-19 23:50:09 +00:00
Daniel Boles
c790724469 combobox: Make wrap-width and grid mode work again
Commit fdc0c6426b for removing (partly!)
appears-as-list also deleted the code that propagated wrap-width to the
TreeMenu and thus put us into “grid mode”. This restores that code.

And as Benjamin noted, calling check_appearance() here is wrong, so bye.
2017-01-19 22:08:45 +00:00