Danial Behzadi [Sun, 22 Sep 2019 11:36:55 +0000 (11:36 +0000)]
Update Persian translation
Timm Bäder [Sat, 21 Sep 2019 07:41:53 +0000 (09:41 +0200)]
headerbar: Fix end-packed child order
We pack from right to left there.
Matthias Clasen [Mon, 16 Sep 2019 22:10:02 +0000 (22:10 +0000)]
Merge branch 'wip/kill-menu' into 'master'
Use menus less
See merge request GNOME/gtk!1098
Matthias Clasen [Sat, 14 Sep 2019 20:55:06 +0000 (16:55 -0400)]
toolbar: Use a popover for overflow
We are phasing out menus.
This is not quite complete, toolitems still
create menuitems, which we translate on the fly.
Matthias Clasen [Sat, 14 Sep 2019 19:03:22 +0000 (15:03 -0400)]
notebook: Use a popover for the tab menu
We are phasing out menus.
Matthias Clasen [Sat, 14 Sep 2019 21:14:55 +0000 (17:14 -0400)]
menutoolbutton: Add support for popovers
Just like the underlying menu button, support
popovers too.
Matthias Clasen [Fri, 13 Sep 2019 23:06:26 +0000 (19:06 -0400)]
window: Make fallback menu a popover
We want to phase out menus.
Matthias Clasen [Fri, 13 Sep 2019 21:24:37 +0000 (17:24 -0400)]
Remove unused includes
Don't include gtkmenu.h in places where
it isn't used anymore.
Matthias Clasen [Fri, 13 Sep 2019 21:25:02 +0000 (17:25 -0400)]
text util: Remove an unused function
_gtk_text_util_append_special_char_menuitems was not used.
Rico Tzschichholz [Sun, 15 Sep 2019 15:54:52 +0000 (17:54 +0200)]
gtk: Fix some g-i annotation warnings
Rico Tzschichholz [Sun, 15 Sep 2019 15:31:41 +0000 (17:31 +0200)]
gtk: Fix parameter annotations for gtk_buildable_parse_context_get_position
Rico Tzschichholz [Sun, 15 Sep 2019 15:49:34 +0000 (17:49 +0200)]
build: gtkbuilderparser.c contains g-i annotations for public API
Matthias Clasen [Sun, 15 Sep 2019 15:54:08 +0000 (15:54 +0000)]
Merge branch 'wip/rah/screensaver-active-fix' into 'master'
gtkapplication-dbus: Initialise screensaver-active property
See merge request GNOME/gtk!1091
Matthias Clasen [Sat, 14 Sep 2019 21:18:02 +0000 (21:18 +0000)]
Merge branch 'wip/chergert/fix-textview-clip' into 'master'
textview: clip to text window when drawing
See merge request GNOME/gtk!1095
Christian Hergert [Fri, 13 Sep 2019 23:26:26 +0000 (16:26 -0700)]
textview: clip to text window when drawing
When drawing the GtkTextView text, we need to clip to the visible area
so that we do not risk drawing under the border windows.
Christian Hergert [Fri, 13 Sep 2019 23:02:28 +0000 (16:02 -0700)]
textview: fix textview drawing in presence of gutters
When drawing a left or top gutter, we need to adjust the origin of the
text snapshot or we risk the gutter drawing above the text.
Timm Bäder [Fri, 13 Sep 2019 12:45:54 +0000 (14:45 +0200)]
notebook: Use a box layout
And incidentally make the CSS node docs correct again.
Timm Bäder [Fri, 13 Sep 2019 12:28:48 +0000 (14:28 +0200)]
fontbutton: Shorten clear_font_data a bit
Timm Bäder [Fri, 13 Sep 2019 09:53:24 +0000 (11:53 +0200)]
fontbutton: Use a bin layout
Timm Bäder [Fri, 13 Sep 2019 09:39:34 +0000 (11:39 +0200)]
appchooserdialog: Remove unnecessary gtk_widget_show() calls
Timm Bäder [Fri, 13 Sep 2019 08:40:26 +0000 (10:40 +0200)]
headerbar: Remove spacing property
Replace it with border-spacing in css
Timm Bäder [Fri, 13 Sep 2019 03:53:17 +0000 (05:53 +0200)]
pixbuf: Add a missing return value transfer annotation
And add a (nullable)
Timm Bäder [Wed, 11 Sep 2019 16:15:30 +0000 (18:15 +0200)]
headerbar: Use a center layout
Get rid of the custom title centering etc. and use a GtkCenterLayout.
Use a box on the start/end to manage the child widgets.
Timm Bäder [Wed, 11 Sep 2019 11:11:02 +0000 (13:11 +0200)]
Add GtkCenterLayout
And use it in GtkCenterBox, different widgets following.
Timm Bäder [Tue, 10 Sep 2019 13:28:31 +0000 (15:28 +0200)]
native: Don't compare a pointer with 0
We have NULL for that.
Timm Bäder [Tue, 10 Sep 2019 12:51:55 +0000 (14:51 +0200)]
widget: Inline build_finalize_assertions into only caller
Timm Bäder [Tue, 10 Sep 2019 12:18:20 +0000 (14:18 +0200)]
headerbar: Don't update window buttons when unrealized
It doesn't make much sense in that case and we will update them again
when realizing.
Timm Bäder [Tue, 10 Sep 2019 11:11:03 +0000 (13:11 +0200)]
Rename gtkbookmarkmanager.h to gtkbookmarksmanagerprivate.h
It's a private type, so gets a private header file name.
Timm Bäder [Tue, 10 Sep 2019 11:08:42 +0000 (13:08 +0200)]
bookmarksmanager: Stop exporting get_xdg_type
Timm Bäder [Tue, 10 Sep 2019 07:55:37 +0000 (09:55 +0200)]
switch: Stop using a private struct
Private type, no private struct needed.
Alexander Larsson [Mon, 2 Sep 2019 09:25:09 +0000 (11:25 +0200)]
GtkBuildable: Fix indentation
Alexander Larsson [Thu, 29 Aug 2019 14:19:33 +0000 (16:19 +0200)]
GtkWidget: Precompile template xml on class creation
Ideally we will precompile during build and store the result in the
resource, but if that doesn't happen at least we will only parse
the xml once.
Alexander Larsson [Thu, 29 Aug 2019 14:18:55 +0000 (16:18 +0200)]
GtkBuilder: Add support for precompiling builder xml
Alexander Larsson [Thu, 29 Aug 2019 13:21:20 +0000 (15:21 +0200)]
Use the new GtkBuildableParser type in GtkBuildable interfaces
Alexander Larsson [Mon, 26 Aug 2019 20:28:18 +0000 (23:28 +0300)]
GtkBuildableParser: Add a wrapper for GMarkupParser
This currenly just wraps GMarkupParser, but the plan is to expose this
instead of GMarkup in the GtkBuildable interfaces, allowing us to
replace the parser with something that handles pre-parsed input
instead.
Note that we duplicate some of the features of GMarkup to implement
the APIs rather then call down to GMarkup, as we need to support these
in the pre-parsed case anyway.
Matthias Clasen [Tue, 10 Sep 2019 01:42:13 +0000 (01:42 +0000)]
Merge branch 'wip/chergert/tune-linedisplay-cache' into 'master'
textview: optimize linedisplay cache based on number of visible rows
See merge request GNOME/gtk!1090
Matthias Clasen [Tue, 10 Sep 2019 01:09:31 +0000 (01:09 +0000)]
Merge branch 'nested-popover-menu' into 'master'
Nested popover menus
See merge request GNOME/gtk!1076
Piotr Drąg [Mon, 9 Sep 2019 17:13:53 +0000 (19:13 +0200)]
Update POTFILES.in
Timm Bäder [Sun, 8 Sep 2019 12:57:40 +0000 (14:57 +0200)]
icontheme: Stop using a private struct
The GtkIconTheme/GtkIconInfo structs aren't public anymore, so use the
structs directly instead of a priv pointer.
Timm Bäder [Sun, 8 Sep 2019 09:10:01 +0000 (11:10 +0200)]
Icontheme: Clean up gtk_icon_info_load_async
Timm Bäder [Sun, 8 Sep 2019 08:22:21 +0000 (10:22 +0200)]
scrolledwindow: Actually add controller to widget
Closes #2127
Timm Bäder [Sun, 8 Sep 2019 08:21:50 +0000 (10:21 +0200)]
testlist2: quit on window close
Timm Bäder [Mon, 2 Sep 2019 07:35:37 +0000 (09:35 +0200)]
icontheme: Adapt a code sample to the GdkPaintable transition
Timm Bäder [Mon, 2 Sep 2019 06:29:04 +0000 (08:29 +0200)]
pixbufutils: Escape file data only once
Timm Bäder [Mon, 2 Sep 2019 06:11:35 +0000 (08:11 +0200)]
pixbufutils: Pass colors as string to load_symbolic_svg
We were converting the same colors over and over again to a string, just
to free them again at the end of the function. We know the colors at
compile time however, so don't convert them at all.
Timm Bäder [Mon, 2 Sep 2019 05:58:20 +0000 (07:58 +0200)]
pixbufutils: Only get icon size once
load_symbolic_svg was loading the pixbuf just to get its size via
gdk_pixbuf_get_{width,height}. However, this function is called in a
loop in gtk_make_symbolic_pixbuf_from_data.
So, do this only once and pass the icon size along to load_symbolic_svg.
Timm Bäder [Sun, 1 Sep 2019 14:29:30 +0000 (16:29 +0200)]
icontheme: Remove symbolic pixbuf cache
We recolor icons on via color matrix nodes these days, so this cache is
basically unused.
Timm Bäder [Sun, 1 Sep 2019 11:25:44 +0000 (13:25 +0200)]
icontheme: Add LRU cache back
Add a cache of icon infos that we keep around a little longer, to avoid
loading icons from disk that only exist for a short amount of time (e.g.
during one frame of a cell renderer snapshot).
We make sure recently used items are kept alive by just adding them to
the cache on lookup.
Timm Bäder [Sun, 1 Sep 2019 09:25:48 +0000 (11:25 +0200)]
icontheme: Remove GtkIconInfo->pixbuf
Create textures as soon as possible.
Timm Bäder [Sun, 1 Sep 2019 08:56:29 +0000 (10:56 +0200)]
icontheme: Remove icon_info_load_pixbuf
What it does overlaps with the only caller a lot now.
Timm Bäder [Sun, 1 Sep 2019 08:20:00 +0000 (10:20 +0200)]
icontheme: Optimize suffix_from_name
We call this function a lot, so avoid repeated strlen() calls on @name
and the different suffixes.
Timm Bäder [Sun, 1 Sep 2019 08:04:32 +0000 (10:04 +0200)]
icontheme: Avoid creating useless IconThemeDirs
We were allocating IconThemeDir instances and then only later assign a
value to has_icons. In the !has_icons case, we were directly throwing
the IconThemeDir away again.
Delay allocating the IconThemeDirs until we know that it has icons.
This avoids allocating and then de-allocating around 1400 IconThemeDir
instances when opening the widget-factory.
Timm Bäder [Sun, 1 Sep 2019 07:26:16 +0000 (09:26 +0200)]
icontheme: Inline scan_resources into only caller
The previous code was hiding the fact that the scan_resources function
almost always did nothing and just used g_resources_enumerate_children()
and then returned FALSE, leaving the caller with cleaning up the already
allocated IconThemeDir. By inlining this, we make sure that calling code
does not even need to allocate the IconThemeDir.
Timm Bäder [Sun, 1 Sep 2019 06:39:05 +0000 (08:39 +0200)]
icontheme: Remove proxy pixbufs
These were only used for the LRU cache.
Timm Bäder [Sun, 1 Sep 2019 06:34:41 +0000 (08:34 +0200)]
icontheme: Remove lru cache
We will replace it with something else later
Timm Bäder [Sat, 31 Aug 2019 08:46:06 +0000 (10:46 +0200)]
icontheme: Annotate return value as nullable
Timm Bäder [Fri, 30 Aug 2019 20:58:41 +0000 (22:58 +0200)]
icontheme: Remove gtk_icon_info_load_texture
It's the same as load_icon now.
Timm Bäder [Fri, 30 Aug 2019 20:20:51 +0000 (22:20 +0200)]
icontheme: Return a paintable from gtk_icon_info_load_icon
Timm Bäder [Fri, 30 Aug 2019 19:26:21 +0000 (21:26 +0200)]
icontheme: Return paintables from more API
Timm Bäder [Fri, 30 Aug 2019 18:54:16 +0000 (20:54 +0200)]
icontheme: Return textures from load_icon{,_for_scale}
Timm Bäder [Fri, 30 Aug 2019 18:51:47 +0000 (20:51 +0200)]
gdk: Add gtk_pixbuf_get_from_texture
Timm Bäder [Fri, 30 Aug 2019 12:23:56 +0000 (14:23 +0200)]
icontheme: Don't try to scale pixbufs to same size
Timm Bäder [Fri, 30 Aug 2019 06:26:25 +0000 (08:26 +0200)]
recentmanager: Stop using linked lists
It doesn't really make sense to save the applications and groups in
recent infos as linked lists. We get them from glib as arrays, so we can
as well just save them as such.
Timm Bäder [Fri, 30 Aug 2019 05:37:55 +0000 (07:37 +0200)]
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.
Timm Bäder [Fri, 30 Aug 2019 05:30:12 +0000 (07:30 +0200)]
filechooserwidget: Remove custom recent_info_has_application impl
Timm Bäder [Fri, 30 Aug 2019 05:17:31 +0000 (07:17 +0200)]
filechooserwidget: Inline come functions into only callers
Similar to the previous commit(s), make it clearer what this function
does.
Timm Bäder [Fri, 30 Aug 2019 05:13:25 +0000 (07:13 +0200)]
filechooser: Move extract_recent_folders to filechooserwidget
It's not used anywhere else.
Timm Bäder [Fri, 30 Aug 2019 05:07:48 +0000 (07:07 +0200)]
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.
Timm Bäder [Fri, 30 Aug 2019 04:45:44 +0000 (06:45 +0200)]
recentmanager: Indentation
Timm Bäder [Fri, 30 Aug 2019 04:18:45 +0000 (06:18 +0200)]
widget-factory: Use proper setter to set has-arrow
Timm Bäder [Fri, 30 Aug 2019 02:14:22 +0000 (04:14 +0200)]
icontheme: Annotate return value of load_icon as nullable
It returns NULL in the error case.
Timm Bäder [Thu, 29 Aug 2019 15:07:45 +0000 (17:07 +0200)]
icontheme: Add error argument to _load_texture
Loading an icon might fail.
Timm Bäder [Tue, 28 May 2019 08:14:52 +0000 (10:14 +0200)]
icontheme: optimize icon_uri_is_symbolic as well
Timm Bäder [Sat, 25 May 2019 15:38:26 +0000 (17:38 +0200)]
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.
Timm Bäder [Sat, 25 May 2019 14:51:30 +0000 (16:51 +0200)]
icontheme: Save the min_suffix for the min_dir
We already have to compute that value in the loop before, so just save
it.
Timm Bäder [Tue, 21 May 2019 12:53:03 +0000 (14:53 +0200)]
icontheme: Remove use_builtin parameter from theme_lookup_icon
Unused.
Timm Bäder [Tue, 21 May 2019 12:51:09 +0000 (14:51 +0200)]
icontheme: Remove paramter from get_icon_suffix
Turns out nobody care about that one.
Timm Bäder [Tue, 21 May 2019 12:26:19 +0000 (14:26 +0200)]
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.
Timm Bäder [Tue, 21 May 2019 09:07:23 +0000 (11:07 +0200)]
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.
Timm Bäder [Thu, 29 Aug 2019 14:40:41 +0000 (16:40 +0200)]
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.
Timm Bäder [Wed, 28 Aug 2019 12:24:50 +0000 (14:24 +0200)]
widget: Queue an allocate on native widgets when changing opacity
This way the opacity change works on toplevel windows on wayland.
Timm Bäder [Wed, 28 Aug 2019 11:52:16 +0000 (13:52 +0200)]
inspect-button: Inline deemphasize_window() into only caller
Timm Bäder [Wed, 28 Aug 2019 10:25:55 +0000 (12:25 +0200)]
inspect-button: Inline some functions into only caller
Make them clearer for later commits.
Timm Bäder [Wed, 28 Aug 2019 09:50:59 +0000 (11:50 +0200)]
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.
Timm Bäder [Wed, 28 Aug 2019 08:05:48 +0000 (10:05 +0200)]
glarea: Fix buffer initialization
This only worked when the vao id and the buffer id accidentally matched,
for example when running gtk4-demo with --run=glarea
Fixes #2042
Timm Bäder [Wed, 28 Aug 2019 07:26:29 +0000 (09:26 +0200)]
box: Don't do casts before preconditions
Timm Bäder [Wed, 28 Aug 2019 06:13:18 +0000 (08:13 +0200)]
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.
Timm Bäder [Tue, 27 Aug 2019 08:05:51 +0000 (10:05 +0200)]
text: Fix a crash when retrieving the selected text
Timm Bäder [Tue, 27 Aug 2019 07:33:54 +0000 (09:33 +0200)]
textview: Remove useless warning
The output doesn't make sense anymore and it breaks cursor blinking when
moving the focus back into the textview.
Timm Bäder [Mon, 26 Aug 2019 17:34:52 +0000 (19:34 +0200)]
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
Timm Bäder [Mon, 26 Aug 2019 16:58:42 +0000 (18:58 +0200)]
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.
Timm Bäder [Mon, 26 Aug 2019 16:56:04 +0000 (18:56 +0200)]
scale: Use top/left/bottom/right style classes on value label
Just top/bottom is not enough anymore.
77769a52b3cc0b836b226457963d7b5fe92ee115 broke e.g. horizontal scales
with the value on top/bottom, adding too much space.
Timm Bäder [Mon, 26 Aug 2019 16:23:31 +0000 (18:23 +0200)]
gl renderer: Remove unused matrix
Timm Bäder [Sun, 25 Aug 2019 13:02:57 +0000 (15:02 +0200)]
fixed: Documentation clarifications
Timm Bäder [Sun, 25 Aug 2019 12:59:01 +0000 (14:59 +0200)]
fixed: x/y passed to get_child_position are not optional
Timm Bäder [Sun, 25 Aug 2019 12:56:13 +0000 (14:56 +0200)]
fixedlayout: Don't call the child transform position
It's a full transform and not just a translation these days.
Timm Bäder [Sun, 25 Aug 2019 12:30:33 +0000 (14:30 +0200)]
linkbutton: Use widget API to set has-toolip
As God intended.
Timm Bäder [Sun, 25 Aug 2019 12:22:46 +0000 (14:22 +0200)]
linkbutton: Use proper action name for right-click menu
Timm Bäder [Sun, 25 Aug 2019 12:15:12 +0000 (14:15 +0200)]
menubutton: Control sensitivity of child button
Instead of the menubutton itself.
Timm Bäder [Sun, 25 Aug 2019 08:18:04 +0000 (10:18 +0200)]
magnifier: Remove some unused members