Commit Graph

30926 Commits

Author SHA1 Message Date
Matthias Clasen
d13cd9cb67 Merge branch 'fix-shell-colorpicker' into 'master'
colorpickershell: Unpack the tuple returned from PickColor()

See merge request GNOME/gtk!296
2018-08-17 12:35:46 +00:00
Matthias Clasen
79b87cc543 print portal: don't leak window handles
Pointed out by Christian Persch.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1274
2018-08-15 23:21:15 +00:00
Matthias Clasen
3c2aceba63 print portal: Plug a memory leak
Pointed out by Christian Persch.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1271
2018-08-15 23:13:15 +00:00
Matthias Clasen
a01feae15b Use defines for bus names
This helps eradicate typos (we had some here).

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1267
2018-08-15 15:54:34 -07:00
Matthias Clasen
b4d4f73d9f Merge branch 'sort' into 'master'
updateiconcache: Sort list of entries

See merge request GNOME/gtk!297
2018-08-15 22:00:13 +00:00
Matthias Clasen
c1de6219ed font chooser: Remove an unneeded ifdef
We can just always create the axes hashtable.
2018-08-15 14:52:37 -07:00
Bernhard M. Wiedemann
b364827a5b updateiconcache: Sort list of entries
because filesystem readdir order is indeterministic.

Without this patch, building openSUSE's balsa package
had variations between builds in /usr/share/balsa/icon-theme.cache
2018-08-15 03:15:14 +02:00
Iain Lane
08f32c6560 colorpickershell: Unpack the tuple returned from PickColor()
When calling PickColor on org.gnome.Shell, we get back an "a{sv}", which
GDBus provides to us as "(a{sv})".

At the minute we're not unpacking this tuple, and so picking fails with
messages like:

  GLib-CRITICAL **: 13:38:19.439: g_variant_lookup_value: assertion 'g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{s*}")) || g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{o*}"))' failed

  Gtk-WARNING **: 13:38:19.439: Picking color failed: No color received

Let's unpack it.
2018-08-13 13:52:41 +01:00
Yi-Soo An
b3c8c8e592 window: Fix memory leak
https://gitlab.gnome.org/GNOME/gtk/issues/1268
2018-08-13 17:21:42 +09:00
Matthias Clasen
ff6c4ed07e Merge branch 'gtk-4-improve-error-message' into 'master'
gtkplacessidebar: Improve error message when unlocking volume fails

See merge request GNOME/gtk!267
2018-08-07 10:01:09 +00:00
segfault
61f50f2410 gtkplacessidebar: Improve error message when unlocking volume fails 2018-08-05 18:59:40 +02:00
Timm Bäder
ab30850aad widget: Rename width and height member to {width,height}_request
Because that's much closer to the meaning of those values.
2018-08-05 10:22:11 +02:00
Timm Bäder
f5e04b59e9 main: Pass toplevel_widget directly to GtkWidget API
We already have the toplevel as GtkWidget: toplevel_widget.
2018-08-05 10:22:10 +02:00
Timm Bäder
c67bcf09b9 sizerequestcache: Inline out-var assignments
The additional assignment to the old result variable just adds an
indirection even though we know the point where we assign it in all
cases. Just pass the values out and return in those cases instead.
2018-08-05 10:22:10 +02:00
Timm Bäder
5eba0bc932 widgetprivate: Remove useless prototype
We implement that function lower down in that header file.
2018-08-05 10:22:10 +02:00
Timm Bäder
ff2ba52bc6 pathbar: Remove priv pointer 2018-08-05 10:22:10 +02:00
Timm Bäder
a822d6fce9 menuitem: Don't redraw unnecessarily
The gtk_widget_(un)set_state_flags calls before will do this if
necessary.
2018-08-05 10:22:10 +02:00
Timm Bäder
b749fe4270 menu: Use correct content height 2018-08-05 10:22:10 +02:00
Timm Bäder
933cb857cf menu: Allocate children according to scroll_offset
This was done by simply moving the bin_window before but now we have to
do it ourselves.
2018-08-05 10:22:10 +02:00
Timm Bäder
dde535bbdf levelbar: Don't return a double value from a gboolean function 2018-08-05 10:22:10 +02:00
Timm Bäder
71b36db88d acitonbar: Remove snapshot implementation 2018-08-05 10:22:10 +02:00
Timm Bäder
b5576397f7 modelbutton: Remove snapshot implementation
Previously, GtkBin was only snapshot'ing its one and only child, but
nowadays it doesn't implement snapshot at all and the default
implementation in GtkWidget just snapshots all child widgets, which is
exactly what the implementation in gtkmodelbutton.c was doing.
2018-08-05 10:22:10 +02:00
Matthias Clasen
4e86858405 Make color picker circular
The need for center alignment was pointed out by Timm Baeder.
2018-08-04 21:42:28 -04:00
Ernestas Kulik
94162197a1 sidebarrow: Hide busy_spinner by default
Since the original implementation was likely based on GTK+ 3, the change
in default visibility might have not been considered, which results in
all rows suddenly sporting a visible spinner when opening a fresh file
chooser.
2018-08-03 13:29:07 +03:00
Matthias Clasen
8669d31c30 color picker: Also try kwin
use a kwin color picker when we run under kwin.
2018-08-02 20:55:07 -04:00
Matthias Clasen
e76d17a786 Only use the portal color picker when appropriate
This is just moving this check around.
2018-08-02 20:54:21 -04:00
Matthias Clasen
5ab90f1a80 Add a kwin color picker
This uses the org.kde.kwin.ColorPicker interface.
2018-08-02 20:53:37 -04:00
Georges Basile Stavracas Neto
5596feae9b listbox: Store child iter in a variable when removing
Unparenting a GtkListBoxRow can drop its last reference, which
will free its memory. Right after unparenting, though, we were
accessing the row's iter - which assumes that the row is still
alive. This causes a crash when, for example, binding two or
more models to the listbox.

Fix that by storing the iter in a variable, and not trying to
access it after unparenting. After unparenting, the variables
that are potentially garbage were explicitly assigned NULL for
clarity.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1258
2018-08-02 10:24:12 -03:00
Benjamin Otte
50d5666db0 container: Remove focus chains
They're prectically unused.

Widgets who want to influcence the focus chain behavior should implement
GtkWidgetClass::focus and deal with focus there.
2018-07-31 22:34:27 +02:00
Benjamin Otte
e06044530f widgetfocus: Fix copy/paste error
This lead to erratic focus behavior with <Tab> in hboxes, where the
smallest child got focus first instead of the leftmost child.
2018-07-31 22:34:27 +02:00
Benjamin Otte
7ce7e5503f colorpicker: Fix gcc warning 2018-07-31 22:34:27 +02:00
Benjamin Otte
1129febd7d bindings: Remove GTK_TYPE_IDENTIFIER
bindings now treat identifiers and strings the same way.

The only difference was that one allowed lookup of enum/flags by name
while the other didn't and g_warning()ed. Now both work.
2018-07-31 06:46:36 +02:00
Matthias Clasen
47928b9e14 color picker: Better debug spew
This will help in debugging issues.
2018-07-30 18:12:14 -04:00
Benjamin Otte
03a6420c37 treeview: Fix compiler warning 2018-07-30 19:58:38 +02:00
Benjamin Otte
813957a92f gdk: Remove gdk_event_get_string()
You want to use an IM module to get strings out of keypresses, not some
crude hack that only works on X11 and Wayland anyway.
2018-07-30 19:32:38 +02:00
Mohammed Sadiq
76ed6cf9d8 colorpickerportal: Fix memory leak 2018-07-30 18:10:31 +05:30
Carlos Garnacho
a8c6f222ed inspector: Remove unnecessary cast
Pointed out by Timm.
2018-07-30 14:21:22 +02:00
Matthias Clasen
c5afea0c6b Merge branch 'gtk-4-add-spinner-to-sidebar-row' into 'master'
gtkplacessidebar: Show busy spinner in sidebar row during mount ops

See merge request GNOME/gtk!261
2018-07-30 12:04:05 +00:00
Carlos Garnacho
71762d3b28 gtkscrolledwindow: Use controller for motion capturing
Perform scrollbar visibility checks through a motion controller,
always based on GtkScrolledView-relative coordinates. The captured
event handler remains though, for a tiny bit of GDK_SCROLL event
handling.
2018-07-30 13:14:12 +02:00
Carlos Garnacho
f15224926a gtkwindow: Replace captured event handler with motion controller 2018-07-30 13:14:12 +02:00
Carlos Garnacho
6d3eb18578 gtktreeview: Use key controller on search entry handling
Use a distinct key controller so we correctly handle navigation
across matches and search cancellation. As the events are forwarded
to the search_window, those need to be pushed down the entry manually.
2018-07-30 13:14:12 +02:00
Carlos Garnacho
d301695ba1 gtktreeview: Replace event vmethod with key controller 2018-07-30 13:14:12 +02:00
Carlos Garnacho
ca8008e2c9 gtkcombobox: Use keycontroller on GtkCellEditable implementation 2018-07-30 13:14:12 +02:00
Carlos Garnacho
0d7b4ecb14 gtkentry: Use keycontroller on GtkCellEditable implementation 2018-07-30 13:14:12 +02:00
Carlos Garnacho
9a541d9b91 inspector: Use gestures/controllers for inspect button 2018-07-30 13:14:12 +02:00
Carlos Garnacho
cdfde6673d gtkcombobox: Use controller to handle combobox keybindings in menus
Instead of an ::event callback.
2018-07-30 13:14:12 +02:00
Matthias Clasen
7ef95734af Merge branch 'fix-gs-issue-404' into 'master'
window: Fallback to CSD titlebar in focus-chain

Closes gnome-software#404

See merge request GNOME/gtk!271
2018-07-30 10:53:22 +00:00
Jakub Steiner
f8a971a7df Adwaita: devel style
- nightly/development versions of apps should get a styled
  headerbar.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/142
2018-07-30 12:09:41 +02:00
Andrea Azzarone
e1a7629a85 window: Fallback to CSD titlebar in focus-chain
CSD titlebar are included in the focus-chain. The logic used makes sure that the
initial focus avoids the titlebar, but tabbing around will eventually get there.
This logic fails in case the window has no other focusable widgets apart from
the ones in the header-bar. If this happens keynav focus will be lost. To handle
the above scenario, we need to fallback to focus the header-bar (if any).

Fixes: https://gitlab.gnome.org/GNOME/gnome-software/issues/404
2018-07-30 09:30:26 +02:00
Matthias Clasen
7d3b8b0d09 treeview: Get rid of child surfaces
Drop the drag-highlight and drag surfaces. The highlighting
is broken anyway, so just drop it for now. And for dragging
the header button, we can just position it properly, that
works just as well as this reparenting approach.
2018-07-29 15:23:41 -04:00