Commit Graph

49506 Commits

Author SHA1 Message Date
Jordi Mas
67274f7d9d Update Catalan translation 2018-02-03 21:31:08 +01:00
Matthias Clasen
9b69fe7a7e iconview: Fix a problem with the previous change
After commit ffef28a7e8,
gtk-icon-browser was spewing critical warnings when
changing sections. Avoid that by respecting the return
value of gtk_tree_model_get_iter.
2018-01-31 18:37:19 +01:00
Jason Gerecke
c94993e29b wayland: Add support for BTN_STYLUS3
BTN_STYLUS3 is defined by the Linux 4.15 kernel and is sent when the
third button on a stylus is pressed. At the moment, only Wacom's "Pro
Pen 3D" has three stylus buttons. Pressing this button triggers a button
8 event to be sent under X11, so we use the same mapping here.

https://bugzilla.gnome.org/show_bug.cgi?id=790033
2018-01-30 21:32:24 +01:00
Kalev Lember
60750b3ffd tests: Don't add testswitch twice in Makefile.am 2018-01-27 14:49:34 +01:00
Timm Bäder
136b88534c menu: Guard against NULL toplevel
This can happen, as indicated by GtkMenu explicitly connecting to
::destroy of its toplevel window. Do the same thing in GtkComboBox.
2018-01-26 11:37:31 +01:00
Pieter Schalk Schoeman
4c8f7c4aca Update Afrikaans translation 2018-01-24 11:40:40 +00:00
Pieter Schalk Schoeman
0cbf45a663 Update Afrikaans translation 2018-01-24 11:36:50 +00:00
Daniel Boles
b8e2430486 Widget: Don’t call reset() on NULL EventController
GtkGesture is a GtkEventController. gtk_event_controller_dispose() calls
_gtk_widget_remove_controller(). That NULLs the pointer-to-Controller in
our EventControllerData but does not delete said ECData from our GList.

Subsequently, if that same Widget gets unparent()ed, that method calls
unset_state_flags(), which leads to doing reset_controllers() if we are
insensitive. Now, unlike most most other loops over the GList of ECData,
reset_controllers() does not skip nodes whose pointer-to-Controller is
NULL. So, we call gtk_event_controller_reset(NULL) and get a CRITICAL.

This surfaced in a gtkmm program. The Gesture is destroyed before the
Widget. The Widget then gets dispose()d, which calls unparent()… boom.
I didn’t find an MCVE yet but would hope this logic is correct anyway:

The simplest fix is to make the loop in gtk_widget_reset_controllers()
skip GList nodes with a NULL Controller pointer, like most other such
loops, so we avoid passing the NULL to gtk_event_controller_reset().

In other, live cases, _gtk_widget_run_controllers() loops over the GList
and removes/frees nodes having NULL Controllers, so that should suffice.
But this clearly was not getting a chance to happen in the failing case.

https://bugzilla.gnome.org/show_bug.cgi?id=792624
2018-01-22 19:09:50 +00:00
GNOME Translation Robot
814c55d473 Update Esperanto translation 2018-01-22 18:34:48 +00:00
Juan Pablo Ugarte
beed1f660e GtkGestureMultiPress: check event state before emiting released signal
Fix bug 771986 "Inconsistent 'row-activated' signal emission before \
drag'n'drop, 'activate-on-single-click'=TRUE, 'reorderable'=TRUE"
2018-01-22 15:42:54 +01:00
Balázs Úr
e6be9a2a4d Update Hungarian translation 2018-01-21 22:53:01 +00:00
Balázs Úr
51220e3a31 Update Hungarian translation 2018-01-21 22:49:00 +00:00
Matthias Clasen
5ab5a5166e iconview: Fix updates with filter models
Filter models rely on views taking a ref on every node
they care about. GtkIconView was not doing that. Amazingly,
this has never shown up in a bug so far, until I spotted
the fallout in gnome-font-viewer.
2018-01-19 16:06:01 +01:00
Matthias Clasen
5b19d6b1b8 Add a test for ::row-changed vs node refs
Test that filter models propagate ::row-changed if there is
an external reference on the node, and not otherwise. This
is showing up in buggy icon view behaviour, where the icon
view is not redrawing if the content changes in a model that
is below a filter model.
2018-01-19 16:05:51 +01:00
Matthias Clasen
ef72f3cbce font chooser: Fix property notification
We must notify the font and font-desc properties when the
list selection changes, and return NULL values for them
when there is no selection in the list.
2018-01-18 19:58:27 -05:00
Matthias Clasen
5f675181ce font chooser dialog: Improve sensitivity handling
Enable the select button when a font is selected, as it should be.
2018-01-18 19:48:12 -05:00
Matthias Clasen
e10f616065 font chooser: Small revision of the UI
Show only the font names in the list, in their own
font, in order to make the list less noisy.
2018-01-18 19:36:56 -05:00
Chris Lamb
6b85162f43 gtk/queryimmodules.c: Make the output deterministic.
Whilst working on the Reproducible Builds effort [0], we noticed that
queryimmodules generates non-reproducible output as it iterates over the
filesystem without sorting.

Patch attached.

 [0] https://reproducible-builds.org/

Signed-off-by: Chris Lamb <lamby@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=786528
2018-01-16 22:39:03 -05:00
Matthias Clasen
53bc2566b3 tree model sort: Fix set_sort_column
We were failing to change the sort order for the
default sort column in some cases. Fix that, and
add a testcase for this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=792459

Add a testcase for the previous fix
2018-01-16 18:19:10 -05:00
Matthias Clasen
e1aeb73a62 tree model sort: Fix initial default sort func
gtk_tree_sortable_has_default_sort_func should return
FALSE initially.
2018-01-16 18:19:01 -05:00
Piotr Drąg
bb844e44b6 Update Polish translation 2018-01-15 22:16:51 +01:00
Matthias Clasen
9e3b814580 emoji: Skip overly wide fallback rendering
Some emoji fonts (such as Emoji One), render Emoji sequences
such as some of the family variations using multiple individual
glyphs. This rendering is too wide and breaks our grid layout.
Therefore, we will just skip any sequence whose rendering is
more than twice as wide as a simple smiley.
2018-01-15 08:21:52 -05:00
Daniel Boles
bcd3c42b92 GdkMonitor: Fix link to nonexistent Display method
There is no gdk_display_get_monitors(). Instead, we have to use
gdk_display_get_n_monitors() and gdk_display_get_monitor(int).
2018-01-13 20:03:37 +00:00
Daniel Boles
b5e4a9d716 HeaderBar: Explain use in conjunction w/ GtkWindow
After hinting how good GtkHeaderBar is for GtkWindow, let’s link to
the latter and indicate how users can make the two work together.
2018-01-12 23:12:19 +00:00
Daniel Boles
fe220402cb Window: Mention GtkHeaderBar in set_titlebar() doc
This is the typical thing passed here and what most users want, so we
should mention it here, rather than requiring users to figure it out.
2018-01-12 23:12:19 +00:00
Daniel Boles
e75d91e7b1 Window: Clarify resize() doc about titlebar widget
Clarify the reference to HeaderBar, as it applies to any custom title
widget; HeaderBar is only the most common one used. Also, fix a typo.
2018-01-12 23:03:44 +00:00
Ting-Wei Lan
b68e55ecce wayland: Use portable sed syntax in gdk/wayland/Makefile.am
Replace non-portable \<, \>, \+ with \(, \), \{, \} to avoid build
failure on systems not using GNU sed.

https://bugzilla.gnome.org/show_bug.cgi?id=792279
2018-01-10 00:45:07 +08:00
Juan Pablo Ugarte
2a8e1745cf GtkCssImageSurface: add cache for the last drawn size.
Keep a copy of the scaled image to speed up rendering multiple times
the image at the same size.
2018-01-09 11:29:10 -03:00
Daniel Boles
8ed4b48b4c Adwaita: Fix typo lenght => length in SASS 2018-01-09 09:49:24 +00:00
Sveinn í Felli
d96a7c9e87 Update Icelandic translation 2018-01-08 17:47:11 +00:00
Sveinn í Felli
856486fea8 Update Icelandic translation 2018-01-08 17:39:46 +00:00
Daniel Boles
a9499dbe48 ScrolledWindow: add() before remove() in snippet
We can't remove() a child widget that wasn't already add()ed, of course.
2018-01-07 16:47:41 +00:00
Matthias Clasen
081488f8f2 file button: Don't leak rows
The file chooser button manually manages the memory of
data in its model, so it needs to explicitly free the
rows.
2018-01-07 16:38:42 +00:00
Matthias Clasen
7de01b31ef Remove a dead macro
GCs have been dead for a long time.
2018-01-07 16:38:42 +00:00
Timm Bäder
d15fbee353 Make a few more code samples compile 2018-01-07 16:38:42 +00:00
Timm Bäder
fda98ba562 entry: Remove some questionable code examples 2018-01-07 16:38:41 +00:00
Timm Bäder
c006c2fdbc widget: Make all code snippets compile 2018-01-07 16:38:41 +00:00
Timm Bäder
6e197ffac9 liststore: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
e00de3814e searchbar: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
a443b525c3 menuitem: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
456ca1062b expander: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
e5240de5bc treeviewcolumn: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
a65ae5fb40 notebook: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
af1d5362ab scrolledwindow: Fix code sample compilation 2018-01-07 16:38:41 +00:00
Matthias Clasen
9cf48ec3f8 Drop an unused enum value
We haven't had a GtkWindow::frame-event since the
linux-fb backends demise.
2018-01-07 16:38:41 +00:00
Rico Tzschichholz
6f26d0dc0c filechooser: Add missing array annotations to add_choice() 2018-01-06 09:40:39 +01:00
Rico Tzschichholz
43433f3ccd iconview: Prevent ownership transfer of cell out-param in get_item_at_pos() 2018-01-06 09:40:26 +01:00
Arnaud Bonatti
01c349995c Add test for GtkActionable GtkListBoxRow.
https://bugzilla.gnome.org/show_bug.cgi?id=741633
2018-01-02 17:53:20 -08:00
Arnaud Bonatti
cb935d947c Make GtkListBoxRow GtkActionable.
https://bugzilla.gnome.org/show_bug.cgi?id=741633
2018-01-02 17:53:20 -08:00
Ting-Wei Lan
31f7b55306 configure: Don't declare functions in AC_TRY_COMPILE and AC_LANG_PROGRAM
Both AC_TRY_COMPILE and AC_LANG_PROGRAM put code passed to their second
arguments to the body of the main function. This means that we cannot
and should not declare functions there, or we end up checking whether
the compiler support nested functions instead of whether a compiler or
linker flag is supported.

GCC supports nested functions and tests succeed. Clang doesn't support
nested functions, so tests fail and -fvisibility=hidden won't be used.
This means that functions which are not intended to be used by other
programs, such as gtk_menu_tracker*, gtk_action_observ*,
gtk_menu_muxer_*, become global symbols with default visibility.

GNOME Shell has a private library libgnome-shell-menu.so, which also has
symbols gtk_menu_tracker*, gtk_action_observ*, gtk_menu_muxer_* that are
intended to be used by GNOME Shell itself. When GNOME Shell still used
Autotools build system, the executable gnome-shell explicitly linked to
libgnome-shell-menu.so, so the linker loaded libgnome-shell-menu.so
before libgtk-3.so.0 and GNOME Shell used correct symbols from its
private library.

However, after GNOME Shell switched to Meson build system, gnome-shell
executable no longer lists libgnome-shell-menu.so as its dependency.
Even if we adds it to the build file, it won't be listed in DT_NEEDED of
gnome-shell because Meson uses -Wl,--as-needed by default. This causes
the runtime linker to load libgtk-3.so.0 before libgnome-shell-menu.so
and symbols gtk_menu_tracker*, gtk_action_observ*, gtk_menu_muxer_* are
bound to libgtk-3.so.0 instead of libgnome-shell-menu.so. GNOME Shell
hangs when opening more than one window because it uses functions from
the wrong library.

This problem is already fixed in OpenBSD ports. The article describing
it can be found on OpenBSD Journal with this link:
https://undeadly.org/cgi?action=article;sid=20170930133438

https://bugzilla.gnome.org/show_bug.cgi?id=791943
2018-01-03 02:19:18 +08:00