Timm Bäder
4c28ee80a6
filechooserwidget: Create recent manager when setting operation mode
...
Creating a recent manager can be fairly expensive and we won't use it if
the widget is not visible or the recent mode has not been entered. Code
other places can already handle a NULL recent manager, so just create it
when entering the recent mode. And shove 25ms of startup time off the
widget-factory this way.
2019-09-09 17:36:26 +02:00
Timm Bäder
f4c4fe860b
filechooserwidget: Remove custom recent_info_has_application impl
2019-09-09 17:36:26 +02:00
Timm Bäder
4766b475d0
filechooserwidget: Inline come functions into only callers
...
Similar to the previous commit(s), make it clearer what this function
does.
2019-09-09 17:36:26 +02:00
Timm Bäder
ae75d4b565
filechooser: Move extract_recent_folders to filechooserwidget
...
It's not used anywhere else.
2019-09-09 17:36:26 +02:00
Timm Bäder
c102387916
filechooserwidget: Load recent files synchronously
...
Delaying this by one frame by putting it in an idle just makes the code
more complex for no gain. The actual slow part is reading the
recently-used.xbel, which happens when creating the recent manager.
2019-09-09 17:36:26 +02:00
Timm Bäder
86ad215deb
recentmanager: Indentation
2019-09-09 17:36:26 +02:00
Timm Bäder
2ffbb37783
icontheme: Annotate return value of load_icon as nullable
...
It returns NULL in the error case.
2019-09-09 17:36:26 +02:00
Timm Bäder
6821fe0c13
icontheme: Add error argument to _load_texture
...
Loading an icon might fail.
2019-09-09 17:36:26 +02:00
Timm Bäder
a0947232fa
icontheme: optimize icon_uri_is_symbolic as well
2019-09-09 17:36:26 +02:00
Timm Bäder
e3f1a3d27c
main: Check if any debug flags are set in gtk_get_debug_flags()
...
We end up checking the debug flags for the default display, but that's
unnecessary if we know that no display has any debug flags set anyway.
2019-09-09 17:36:26 +02:00
Timm Bäder
d98e05b91a
icontheme: Save the min_suffix for the min_dir
...
We already have to compute that value in the loop before, so just save
it.
2019-09-09 17:36:26 +02:00
Timm Bäder
fa85f4fc2e
icontheme: Remove use_builtin parameter from theme_lookup_icon
...
Unused.
2019-09-09 17:36:26 +02:00
Timm Bäder
44352b375e
icontheme: Remove paramter from get_icon_suffix
...
Turns out nobody care about that one.
2019-09-09 17:36:26 +02:00
Timm Bäder
ebe88ea322
icontheme: Optimize icon_name_is_symbolic
...
We call this function *a lot* it's doing lots of unnecessary work inside
g_str_has_suffix. Get the icon name length only once instead and
open-code the suffix check.
2019-09-09 17:36:26 +02:00
Timm Bäder
6d77723fe0
gtkicontheme: Avoid a get_icon_flags call
...
We're only using the value of the first call at all if
symbolic_suffix & ICON_SUFFIX_PNG is FALSE.
2019-09-09 17:36:26 +02:00
Timm Bäder
c5ed51a188
icontheme: Remove outdated comment
...
It's not called css_fg anymore and it can't possibly be NULL since we
make sure before passing it here.
2019-09-09 17:36:25 +02:00
Timm Bäder
1339c425a8
widget: Queue an allocate on native widgets when changing opacity
...
This way the opacity change works on toplevel windows on wayland.
2019-09-09 17:36:25 +02:00
Timm Bäder
7c723dfc58
inspect-button: Inline deemphasize_window() into only caller
2019-09-09 17:36:25 +02:00
Timm Bäder
72814a8153
inspect-button: Inline some functions into only caller
...
Make them clearer for later commits.
2019-09-09 17:36:25 +02:00
Timm Bäder
9952f72680
filechooserwidget: Properly watch for different display
...
The value returned by gtk_widget_get_settings() depends on the widget's
display, so watch for notify::display instead of using (un)root for
this.
Fixes the warnings seen when show a file chooser from the inspector.
2019-09-09 17:36:25 +02:00
Timm Bäder
cbc3ce5b03
box: Don't do casts before preconditions
2019-09-09 17:36:25 +02:00
Timm Bäder
d223752c55
infobar: Inherit from GtkContainer
...
infobars being a GtkBox doesn't make sense.
Also implement infobars without exposing internal children.
Closes #1957 because it adds the bottom border.
2019-09-09 17:36:25 +02:00
Timm Bäder
74208e9e0c
text: Fix a crash when retrieving the selected text
2019-09-09 17:36:25 +02:00
Timm Bäder
14b7fa1dd6
textview: Remove useless warning
...
The output doesn't make sense anymore and it breaks cursor blinking when
moving the focus back into the textview.
2019-09-09 17:36:25 +02:00
Timm Bäder
4bfe8605cb
layoutoverlay: Fix everything
...
This code is better because:
1) The coordinates translations are actually correct and not sometimes
wrong like before
2) We clip widgets that have overflow set
3) We honor the widget's transform
4) It is less code
2019-09-09 17:36:25 +02:00
Timm Bäder
e86bf764a8
scale: Allocate value close to slider
...
The scale might be allocated at a height greater than requested, and in
that case y=0 is just too far away. Allocate the value directly next to
the slider instead.
2019-09-09 17:36:25 +02:00
Timm Bäder
80411fb905
scale: Use top/left/bottom/right style classes on value label
...
Just top/bottom is not enough anymore.
77769a52b3
broke e.g. horizontal scales
with the value on top/bottom, adding too much space.
2019-09-09 17:36:25 +02:00
Timm Bäder
9166b03c42
fixed: Documentation clarifications
2019-09-09 17:36:25 +02:00
Timm Bäder
31efc882db
fixed: x/y passed to get_child_position are not optional
2019-09-09 17:36:25 +02:00
Timm Bäder
1db59d1c89
fixedlayout: Don't call the child transform position
...
It's a full transform and not just a translation these days.
2019-09-09 17:36:25 +02:00
Timm Bäder
afb3715700
linkbutton: Use widget API to set has-toolip
...
As God intended.
2019-09-09 17:36:24 +02:00
Timm Bäder
6be4279f39
linkbutton: Use proper action name for right-click menu
2019-09-09 17:36:24 +02:00
Timm Bäder
5782871f91
menubutton: Control sensitivity of child button
...
Instead of the menubutton itself.
2019-09-09 17:36:24 +02:00
Timm Bäder
0e9ac9e64b
magnifier: Remove some unused members
2019-09-09 17:36:24 +02:00
Timm Bäder
0821d5b29d
widget: Clear up gtk_widget_class_install_property_action docs
2019-09-09 17:36:24 +02:00
Timm Bäder
b3cffc0516
widget: Remove reference to non-existent function
...
gtk_widget_class_install_stateful_action() does not exist.
2019-09-09 17:36:24 +02:00
Timm Bäder
80a58672d1
widget: Add some missing annotations to gtk_widget_class_query_action
2019-09-09 17:36:24 +02:00
Timm Bäder
18714e25a8
window: Remove useless deprecation guards
...
gtk_window_present() is not deprecated.
2019-09-09 17:36:24 +02:00
Timm Bäder
b29c30c9d5
cssprovider: Remove unused member from GtkCssScanner
2019-09-09 17:36:24 +02:00
Timm Bäder
d8df197489
cssprovider: Don't lookup on empty css providers
...
This should not have a huge performance impact, but debugging is easier
if we don't lookup in empty css providers.
2019-09-09 17:36:24 +02:00
Timm Bäder
514e60c1bb
cssnode: GtkCssAnimatedStyle->style is always a static style
2019-09-09 17:36:24 +02:00
Timm Bäder
32a256bd03
gtksettings: Remove unused functions & prototypes
2019-09-09 17:36:24 +02:00
Timm Bäder
b9316a404a
cssnode: Remove unused struct
2019-09-09 17:36:24 +02:00
Timm Bäder
ea2a3f3e62
cssstyle: Remove unused _add_difference
2019-09-09 17:36:24 +02:00
Timm Bäder
5cd8009c53
stylecontext: Remove leftover function prototypes
2019-09-09 17:36:24 +02:00
Timm Bäder
26aa620efe
stylecontext: Stop exporting _resolve_color
...
Only used in gtkstylecontext.c
2019-09-09 17:36:24 +02:00
Timm Bäder
e0cf6e4775
csscolorvalue: return the initial color value directly
2019-09-09 17:36:24 +02:00
Timm Bäder
df2d43c893
csscolorvalue: Remove unused new_from_rgba()
2019-09-09 17:36:24 +02:00
Timm Bäder
8d6c5ba90e
cssstaticstyle: Compute initial/inherit values directly
2019-09-09 17:36:24 +02:00
Timm Bäder
629f528f6d
cssinitialvalue: Make _compute public
...
So we can use it in cases where the class of css value is known to be an
initial one.
2019-09-09 17:36:24 +02:00