Commit Graph

40344 Commits

Author SHA1 Message Date
Matthias Clasen
d3abcd823f places sidebar: Fix the sort function
When returning 1 for a pair (a,b), a sort function must
return -1 for the pair (b,a), otherwise things can go
badly.

https://bugzilla.gnome.org/show_bug.cgi?id=739729
2014-12-17 23:01:33 -05:00
Ryan Lortie
2f9e88b664 GtkMenuTracker: one more visibility tweak
On creation, we call action_removed() in case the action was missing
from the start.  Because we just created the action, 'can_activate' will
always be FALSE here and this function will therefore always do nothing.

We do want the visibility state to be updated though, for the case where
the action is missing but the item should still be visible from the
start.

Update the visibility directly instead of trying to call
action_removed().

https://bugzilla.gnome.org/show_bug.cgi?id=735122
2014-12-14 18:36:53 -05:00
Ryan Lortie
bd6608036a GtkMenuTrackerItem: fix submenu visibility flag
We were only properly setting the "is-visible" flag to TRUE for menu
items with associated actions and not (for example) on submenus.

This was fine because the code for building GtkMenus from models
(correctly) assumed that submenus should always be visible and never
checked the property.

This is not true for the Mac OS code, which actually checked the
property and found it to be false for submenus.

Initialise the property to TRUE so that we get the correct value
reported for items that don't have actions.

https://bugzilla.gnome.org/show_bug.cgi?id=735122
2014-12-14 18:36:42 -05:00
Ryan Lortie
3c745d6f7a quartz menu: update visibility property name
This property is called "is-visible" now, not "visible".

https://bugzilla.gnome.org/show_bug.cgi?id=735122
2014-12-14 18:36:32 -05:00
Matthias Clasen
23eeb44beb GtkFileChooser: Don't crash if invisible files are deleted
This is a crash that has been around for a long time, as
can be seen here:
https://bugzilla.redhat.com/show_bug.cgi?id=1048388
https://bugzilla.redhat.com/show_bug.cgi?id=984375
https://bugzilla.redhat.com/show_bug.cgi?id=1159015
https://bugzilla.redhat.com/show_bug.cgi?id=1059187
https://bugzilla.redhat.com/show_bug.cgi?id=1122172
https://bugzilla.redhat.com/show_bug.cgi?id=1016895
https://bugzilla.redhat.com/show_bug.cgi?id=1133235
https://bugzilla.redhat.com/show_bug.cgi?id=1077500
https://bugzilla.redhat.com/show_bug.cgi?id=1054378
https://bugzilla.redhat.com/show_bug.cgi?id=1173212

Fix suggested by Benjamin Otte.
2014-12-11 22:58:03 -05:00
Matthias Clasen
07f8ecd4cf 3.14.6 3.14.6 2014-12-11 11:51:21 -05:00
Lapo Calamandrei
1cfbf16617 Adwaita: draw drag hilight on treeview rows.
See https://bugzilla.gnome.org/show_bug.cgi?id=741314
2014-12-11 17:48:29 +01:00
Matthias Clasen
ff669c6b12 Make gtk_tree_model_foreach robust
Make gtk_tree_model_foreach safe for callbacks that modify
the model, even if the model does not have persistent iters.

https://bugzilla.gnome.org/show_bug.cgi?id=722781
2014-12-11 09:22:32 -05:00
Matthias Clasen
866c9a498d Don't compare booleans
Just use negation.
2014-12-11 09:22:24 -05:00
Matthias Clasen
87c5c662c0 Fix another header guard oversight
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741252
2014-12-11 09:22:09 -05:00
Matthias Clasen
d6b4bd0967 Fix some oversights with header guards
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741254
2014-12-11 09:22:01 -05:00
Matthias Clasen
023fbb91d6 Drop a few unneeded ifs
It does not hurt to pass NULL to g_list_free().
2014-12-11 09:21:46 -05:00
Matthias Clasen
623f3e00e4 GtkWidget: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741251
2014-12-11 09:21:35 -05:00
Matthias Clasen
1d17891eaa GtkPlacesSidebar: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741250
2014-12-11 09:21:26 -05:00
Matthias Clasen
292a9b4a02 GtkMenuTracker: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741249
2014-12-11 09:21:19 -05:00
Matthias Clasen
812109cc3f GtkEntry: Refresh when activity ends
We need to queue a redraw when pulse mode is ended by
setting a fraction. Noticed in gtk3-demo's search entry demo.
2014-12-11 09:21:07 -05:00
Kjell Ahlstedt
4621142e0c docs: Explain 'icon theme context' better in gtkicontheme.c
Add links from gtk_icon_theme_list_contexts() to
gtk_icon_theme_list_icons(), and from there to the Icon Theme
Specification and the Icon Naming Specification.

https://bugzilla.gnome.org/show_bug.cgi?id=461249
2014-12-11 09:20:55 -05:00
Matthias Clasen
28c39fb0f8 Handle KP keys in copy/paste keybindings
We currently handle KP variants of some keys, but not consistenly.

https://bugzilla.gnome.org/show_bug.cgi?id=364566
2014-12-11 09:20:44 -05:00
Phillip Wood
c68490ee17 Editable cells demo: Add new row at cursor
Adding rows to the bottom of the list is confusing as you cannot see
them if the window is small so it is not apparent that anything has
happened. Fix this by adding the new row immediately below the current
row and set the cursor on the new row so it is ready to be edited.

https://bugzilla.gnome.org/show_bug.cgi?id=721939
2014-12-11 09:20:37 -05:00
Benjamin Otte
7833835930 inspector: Properly update flashing hilight
Previously, the inspector would not change the hilight while the
previous hilight was still flashing.
This is inconvenient while arrowing through the object selection
treeview though where you want the currently selected row to hilight
when arrowing quickly.
2014-12-11 09:18:25 -05:00
Cosimo Cecchi
1a1c1091da GtkPlacesSidebar: add support for unmount notifications
Now that we can use GNotification from here, send a notification when
umounting from GtkPlacesSidebar.

https://bugzilla.gnome.org/show_bug.cgi?id=740896
2014-12-11 09:16:58 -05:00
Matthias Clasen
7e21425228 GtkModelMenuItem: put some space between icon and label
This makes the bloatpad icons menu look slightly less odd.
2014-12-11 09:16:43 -05:00
Yosef Or Boczko
e65112aaef GtkStackSwitcher: Make the buttons fill vertically
It fix some cases with different height for the buttons,
like with Hebrew character.

https://bugzilla.gnome.org/show_bug.cgi?id=740642
2014-12-11 09:15:53 -05:00
Andre Heinecke
7d066258f3 Remove overzealous validity check for secrets
We directly get the length of the secret from the g_variant
   and use it in a following g_strndup which ensures that the
   resulting string is terminated.

   This fixes reading secrets which were stored by system-config-printer.

https://bugzilla.gnome.org/show_bug.cgi?id=740612
2014-12-11 09:14:43 -05:00
Carlos Garnacho
527d262804 wayland: Don't translate a NULL region into an empty one
cairo_region_copy(NULL) will effectively return an empty region, as this
function is always meant to return valid memory. This however inverts the
meaning of the NULL region and results in entirely non-clickable windows.
2014-12-11 09:04:53 -05:00
Carlos Garnacho
b8a154ad69 gtkwindow: claim the press sequence when clicking on the titlebar
This event might not have an action yet, but certainly accounts, and
should be triggering recognition.

This fixes a crash when attempting to drag CSD windows through touch. As
since cfaec2d2f5, gtk_gesture_single_get_current_sequence() would
rightfully return NULL if the gesture didn't enter recognition, making
event lookup fail.
2014-12-11 09:04:30 -05:00
Jasper St. Pierre
bd893461b0 inspector: Remove unused variable 2014-12-11 08:53:44 -05:00
Matthias Clasen
63d0cf2a83 inspector: Look for themes in the right places
Match the places that GtkCssProvider looks in, so we show all
the themes that GTK+ would actually find.
2014-12-11 08:53:11 -05:00
Benjamin Otte
2f5adb1f76 inspector: Add missing directory when scanning for themes 2014-12-11 08:52:43 -05:00
Matthias Clasen
40aadf8502 css: Avoid excessive shadow rendering
The shadow rendering code had code to exit early if we determine
that the shadow is entirely clipped away. Unfortunately, the check
based on cairo clip extents fails for any clip regions that are
more complicated than axis-aligned rectangles, and we are using
a hollow rounded rectangle here. So, instead, do the check manually,
using the just-introduced API in GtkRoundedBox.
2014-12-02 14:29:04 -05:00
Matthias Clasen
10319e1f3d Add clipping apis to GtkRoundedBox
This adds two functions for checking whether an axis-aligned
rectangle is completely outside or inside of a rounded box.
These are not trying to be exact, but fast.
2014-12-02 14:28:57 -05:00
Matias De Lellis
b4ec98dbec GtkPlacesSidebar: Fix Home and Desktop on Windows.
We were concatenating "file://" to the result of g_get_user_special_dir() to build
a URI, but this is not enough on Windows.  Use g_filename_to_uri() instead.

See https://bugzilla.gnome.org/show_bug.cgi?id=739453
2014-12-01 14:58:21 -06:00
Marek Kasik
ab5a8e6bb9 printing: Don't crop dimensions of layout preview
Enlarge area for drawing of layout preview in the print dialog
so that it can embody landscape preview with dimensions.

https://bugzilla.gnome.org/show_bug.cgi?id=730232
2014-12-01 13:13:59 +01:00
Lapo Calamandrei
af3efad099 Adwaita: insensitive GtkTreeView styling
See https://bugzilla.gnome.org/show_bug.cgi?id=740770
2014-11-28 17:49:20 +01:00
Leo Wolf
4d1fdfeb10 printing: Fix origin for scaled, rotated pages
The calls to cairo_translate in
_gtk_print_context_rotate_according_to_orientation,
_gtk_print_context_reverse_according_to_orientation and
_gtk_print_context_translate_into_margin assume an unscaled context.
These functions should therefore be called before scaling the context,
otherwise the origin does not always end up in the top left corner.

https://bugzilla.gnome.org/show_bug.cgi?id=740742
2014-11-27 12:22:32 +01:00
Matthias Clasen
2749b473ce x11: Handle obsolete selection requests without crashing
The ICCCM says:

If the specified property is None , the requestor is an obsolete client.
Owners are encouraged to support these clients by using the specified
target atom as the property name to be used for the reply.

Lets do that, instead of crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=740613
2014-11-26 22:30:03 -05:00
Matthias Clasen
8d6b5ece9f Drop an unused variable 2014-11-26 20:19:10 -05:00
Emmanuele Bassi
98b961a1d6 docs: Fix annotation for GtkCssProviderError
https://bugzilla.gnome.org/show_bug.cgi?id=740374
2014-11-26 20:19:04 -05:00
Matthias Clasen
7c213fa980 Keep gtk_window_set_hide_titlebar_when_maximized working
This broke in 510c2cdfb6.

https://bugzilla.gnome.org/show_bug.cgi?id=740287
2014-11-26 20:19:04 -05:00
Matthias Clasen
8a2bf9f853 GtkStack: Remove some clumsy use of GList API
No need for g_list_next(), and don't open-code g_list_index().
2014-11-26 20:18:52 -05:00
Chun-wei Fan
047dd914a3 Visual Studio Builds: Fix gdkconfig.h Generation
...for Broadway builds, as it was producing a wrongly-named check file for
that configuration, so that a clean would not be correctly performed and
subsequently affected rebuilds.
2014-11-20 22:36:59 +08:00
Efstathios Iosifidis
e3ce367e18 Updated Greek translation 2014-11-18 08:33:52 +00:00
Timm Bäder
9cab6be752 GtkDialog: Connect to activate signals only once
If the widget is an action widget, it's been previously added with
gtk_dialog_add_action_widget, which calls add_response_data on it, which
in turn connects to the clicked/activate signal of that widget, so we
don't need to connect to that signal a second time in
gtk_buildable_custom_finished.
2014-11-17 19:15:57 +01:00
Debarshi Ray
3a683e46e7 query, searchengine: Drop unused and undefined function declarations
https://bugzilla.gnome.org/show_bug.cgi?id=739977
2014-11-12 13:24:43 +01:00
Lapo Calamandrei
3617c3bd15 Adwaita: add a missing comma... 2014-11-11 16:32:02 +01:00
Emmanuele Bassi
0b8f666e02 window: GtkPlug is conditionally supported on X11 only
We cannot do a type check on it if we don't have the X11 backend
compiled in.

https://bugzilla.gnome.org/show_bug.cgi?id=739885
2014-11-10 15:10:41 +00:00
Alexander Larsson
a329677311 gdk_window_end_paint: Flush destination surface after paint
It seems in cairo 1.14 we need this after having painted an image surface
to a X11 window surface (i.e. with GDK_RENDERING=image).

(cherry picked from commit 90555e06be)
2014-11-10 15:29:09 +01:00
Matthias Clasen
f935432ac5 3.14.5 3.14.5 2014-11-09 16:17:51 -05:00
Matthias Clasen
d7bff60140 Fix a problem with screen changes and csd
When a new screen is set on a window, we unrealize it, to
recreate all the resources. But we don't reset the client_decorated
flag, so realize() doesn't call create_decoration() - which makes
sense, since the decoration already exists. But the side-effect
of create_decoration() is to select the rgba visual, and visuals
are per-screen.

Fix this by looking for the rgba visual in set_screen(), and
replacing it with the rgba visual for the new screen, if necessary.
2014-11-09 13:02:20 -05:00
Aurimas Černius
55174e3f62 Updated Lithuanian translation 2014-11-09 17:45:35 +02:00