Commit Graph

21663 Commits

Author SHA1 Message Date
Matthias Clasen
be97bad3a0 Avoid criticals when drags end
Its seems that gtk_gesture_get_last_event may return NULL,
protect against that to avoid critical warnings.
2014-09-07 21:24:01 -04:00
Timm Bäder
53014d0132 inspector: Don't unref NULL objects
When closing the application window before closing the inspector window,
the selected widget will be set to NULL once and all the property pages
will try to g_object_weak_unref that NULL widget, so bail out in
gtk_inspector_prop_list_set_object if it's NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=736201
2014-09-06 21:35:23 -04:00
Matthias Clasen
a1af365566 Don't forget to allocate popovers
When GtkApplicationWindow has a menubar, we don't chain up
to the GtkWindow size_allocate, which used to position the
popovers. Move that to _gtk_window_set_allocation() which
is always called by GtkApplicationWindow.

https://bugzilla.gnome.org/show_bug.cgi?id=736205
2014-09-06 21:32:53 -04:00
Matthias Clasen
e9df5edc11 Avoid compiler warnings
The previous commit was sloppy with parameter types.
2014-09-06 21:28:31 -04:00
Matthias Clasen
794230e708 GtkCellRendererAccel: Try harder to capture bound keys
Add a grab on the editable widget, so that we can capture
also shortcuts which are bound in the application itself.

https://bugzilla.gnome.org/736203
2014-09-06 20:56:03 -04:00
Benjamin Otte
9a8a4a8b14 widget: Don't assume opacity is 100%
... just because there is no style context instantiated yet. Instead,
instantiate a style context during realize() and ask it.

Fixes problems with dim labels not being dimmed on first show.

Testcase included.

https://bugzilla.gnome.org/show_bug.cgi?id=735240
2014-09-07 01:57:10 +02:00
Benjamin Otte
95959ef470 overlay: Handle overlays when no main widget exists
Just pretend that the main widget is an empty widget the size of the
overlay.
Makes it possible to write testcases where no size requests are run on
overlay widgets before size_allocate() is called.

Testcase included.
2014-09-07 01:57:09 +02:00
Bastien Nocera
c849b8edd6 tooltip: Fix warning with GtkCellRendererAccel
(gnome-shell-extension-prefs:22382): GLib-GObject-WARNING **: invalid cast from 'GtkInvisible' to 'GtkWindow'
(gnome-shell-extension-prefs:22382): Gtk-CRITICAL **: gtk_window_set_transient_for: assertion 'parent == NULL || GTK_IS_WINDOW (parent)' failed

 #1  0x00007fffeeb81a12 in g_log (log_domain=log_domain@entry=0x7fffeeea3464 "GLib-GObject", log_level=log_level@entry=G_LOG_LEVEL_WARNING, format=format@entry=0x7fffeeeaa878 "invalid cast from '%s' to '%s'") at gmessages.c:1079
 #2  0x00007fffeee9c2a9 in g_type_check_instance_cast (type_instance=0xb314c0, iface_type=iface_type@entry=9020048) at gtype.c:4021
 #3  0x00007ffff0a06e25 in gtk_tooltip_set_last_window (tooltip=tooltip@entry=0xbb8c10, window=<optimized out>) at gtktooltip.c:910
 #4  0x00007ffff0a08dfd in _gtk_tooltip_handle_event (event=event@entry=0xbf72c0) at gtktooltip.c:1538
 #5  0x00007ffff090d7a9 in gtk_main_do_event (event=0xbf72c0) at gtkmain.c:1785
 #6  0x00007ffff0496ab2 in gdk_event_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at gdkeventsource.c:364
 #7  0x00007fffeeb7a8c3 in g_main_dispatch (context=0x807300) at gmain.c:3067

https://bugzilla.gnome.org/show_bug.cgi?id=736131
2014-09-06 19:05:46 -04:00
Matthias Clasen
fa0e43471c GtkCellRendererAccel: Stop editing on focus out
This is not automatic, and with grabs in place, it is awkward
to have focus moved elsewhere, so stop editing whenever the
cell editable loses focus.
2014-09-06 19:03:07 -04:00
Matthias Clasen
bdd1871cba GtkCellRendererAccel: rework the grabbing
Grab keyboard/mouse on the toplevel, and grab the focus to the
cell editable, so we actually see the key events.
2014-09-06 19:03:06 -04:00
Matthias Clasen
fcb69e110b Remove an unneeded include 2014-09-06 19:03:06 -04:00
Matthias Clasen
fe11f8f875 Revert "gtkcellrendereraccel: Use a GtkInvisible to grab on"
This reverts commit fe5402d32e.
2014-09-06 19:02:41 -04:00
Matthias Clasen
84ff0c201a Don't set an input shape unless client-decorated
We were actually setting an input shape larger than the window
in !csd, and this was confusing at least openbox.

https://bugzilla.gnome.org/736064
2014-09-06 15:43:11 -04:00
Matthias Clasen
98c87dc6ed inspector: Fix fallout from function renaming 2014-09-06 12:47:41 -04:00
Timm Bäder
a4d9eccbc6 inspector: Show widget allocation
https://bugzilla.gnome.org/show_bug.cgi?id=736191
2014-09-06 11:39:48 -04:00
Lapo Calamandrei
7633118e7d Adwaita: inhert backdrop selected list rows 2014-09-06 17:14:09 +02:00
Lapo Calamandrei
66accf2b37 Adwaita: set color on flat buttons in selected list-rows 2014-09-06 17:09:08 +02:00
Lapo Calamandrei
c6f5ad8855 Adwaita: better switch on selected list-rows 2014-09-06 17:02:20 +02:00
Hiroyuki Ito
e5eb59a2f8 Fix a crash in recent chooser DND
Reported in https://bugzilla.gnome.org/show_bug.cgi?id=736173
2014-09-06 10:37:25 -04:00
Lapo Calamandrei
532a8afeb1 Adwaita: really fix tooltips background
See https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
2014-09-06 16:02:34 +02:00
Matthias Clasen
d55e3b25a7 Fix various compiler warnings
Mostly missing declarations and missing statics.
2014-09-05 21:21:49 -04:00
Matthias Clasen
c88c16d1f4 inspector: Fix various compiler warnings
Mostly missing declarations and missing statics.
2014-09-05 20:52:03 -04:00
Matthias Clasen
f401c85ee3 Adwaita: Avoid double backgrounds in tooltips 2014-09-05 14:57:04 -04:00
Matthias Clasen
1629903943 GtkIconTheme: Make suffix_from_name NULL-safe
This can happen sometimes with GFileIcons that are
not representable as a local path. Better not to crash
in this case.
2014-09-05 13:15:14 -04:00
Lapo Calamandrei
f66d84deec Adwaita: tooltip fixes
The "too dark" background was caused by box-shadow inherited by
window-frame.csd, so box-shadow: none and the right background
color on tooltip selector.
2014-09-05 16:17:00 +02:00
Lapo Calamandrei
7f4105bcaf Adwaita: tranlucent shadows inside entries
So evo background changing entry doesn't look broken.
2014-09-05 15:06:37 +02:00
Jesse van den Kieboom
3fa425bb9c scrolling: interpret smooth deltas as pixels on quartz
This is a temporary workaround for scrolling units being amplified
on quartz, due to the assumption that smooth scrolling deltas are
always in some abstract unit similar to the one from xi2.

A proper solution for the situation is described in bug #736121, but
since we are close to release, this patch solves the issue temporarily.

https://bugzilla.gnome.org/show_bug.cgi?id=736121
2014-09-05 14:02:11 +02:00
Cosimo Cecchi
aaf2498374 Adwaita: fix inline-toolbar backgrounds
This was lost in a recent cleanup.
2014-09-04 15:07:54 -07:00
Timm Bäder
0ed03363e4 Fontchooserbutton: baseline-align icon and label
https://bugzilla.gnome.org/show_bug.cgi?id=736056
2014-09-04 17:15:07 -04:00
Lapo Calamandrei
94da331c6a Adwaita: more translucent tooltips 2014-09-04 20:02:43 +02:00
Lapo Calamandrei
bbac2900e6 Adwaita: bottom edge hilight for selection mode buttons 2014-09-04 19:41:47 +02:00
Lapo Calamandrei
e5d34372c4 Adwaita: in app-notification padding
Adwaita now adds the `right` padding to the app notification, so it
shouldn't be set in the code via margins or whatever.
2014-09-04 19:18:13 +02:00
Lapo Calamandrei
fa415d58a2 Adwaita: flat colored buttons 2014-09-04 19:13:29 +02:00
Lapo Calamandrei
5420e48fbf Adwaita: don't color insensitive colored buttons.
Insensitive suggested or destructive action buttons make no sense,
so Adwaita doesn't color them.
2014-09-04 19:05:16 +02:00
Lapo Calamandrei
4bc437db15 Adwaita: set color on osd backdrop buttons 2014-09-04 19:00:10 +02:00
Carlos Garnacho
9629fd07e3 entry: Handle touch events on entry icons
Those used to work indirectly due to GtkEntry not setting GDK_TOUCH_MASK,
so pointer emulation would happen on those, but the event handlers on icons
and its icon-pressed/released signals have never been explicitly touch
aware, and this broke since the GDK_TOUCH_MASK can be set indirectly by
GtkGestures.

So make the icon event handler handle touch events, each icon can get hold
of one GdkEventSequence, reacting exclusively to it. This is still not
ported to GtkGesture due to GdkEvent exposure in these icon signals, as
users might expect GDK_2/3BUTTON_PRESS while GtkGesture ignores those.

Also, unset all icon pressed/sequence state on grab-notify, this used to
happen ad-hoc when initiating icon DnD, but that doesn't cut it for
user-defined reasons to initiate a grab (eg. popovers).

https://bugzilla.gnome.org/show_bug.cgi?id=736004
2014-09-04 16:43:16 +02:00
Lapo Calamandrei
0a9d60cdde Adwaita: big buttons surgey
- cover missing statusses in selection-mode and the like
- button drawing functions cleanup and extension
- remove inline toolbar (ugly) special case not needed anymore
- button selector structure simplification and rationalization
- add back shadow to window control buttons
2014-09-04 15:11:21 +02:00
Carlos Garnacho
bf8f824760 treeview: Run the row dragging gesture on the bubble phase
This is so signal handlers have an opportunity to undo its effect by
returning GDK_EVENT_STOP on ::button-press-event, just like they used
to do pre-gestures.

https://bugzilla.gnome.org/show_bug.cgi?id=735965
2014-09-04 14:59:08 +02:00
Carlos Garnacho
6f538950d4 dnd: Make the drag gesture obey the button mask specified
This was forgotten when making DnD use a GtkGesture in the handlers
attached to the widget in gtk_drag_source_set(). The gesture must obey
the specified button mask, and switch to denied state if the pressed
button isn't part of the given mask.

https://bugzilla.gnome.org/show_bug.cgi?id=735965
2014-09-04 14:59:08 +02:00
Matthias Clasen
768c0c21b5 GtkPlacesSidebar: Cancel async ops when finalized
This is the common practice for objects that start async operations.
https://bugzilla.gnome.org/show_bug.cgi?id=735953
2014-09-03 23:30:43 -04:00
Emmanuele Bassi
c68fc27719 places-sidebar: Use asynchronous API for querying bookmarks
Removes two FIXMEs, and ensures that the places sidebar does not block
while enumerating bookmarks or application shortcuts to remote volumes.

https://bugzilla.gnome.org/show_bug.cgi?id=735953
2014-09-03 23:30:43 -04:00
Matthias Clasen
6efbe745b1 Stop using the deprecated GtkTreeView:rules-hint
This was still used in the file chooser and the font chooser.
2014-09-03 23:30:43 -04:00
Matthias Clasen
bbc7cd2351 GtkEntryCompletion: Treat ::text-column specially
Using the setting for this property conflicts with the documentation
for gtk_entry_completion_set_text_column() which explicitly states
that setting the property directly behaves differently. Concretely,
this caused the file chooser entry completion popup to have two
columns (with identical content).

This partially reverts 331c28b369.
2014-09-03 22:46:38 -04:00
Matthias Clasen
1cc5cf3797 GtkLabel: better treatment for selection with ellipsis
This commit arranges things so that we treat an ellipsized
region like a single character for the purpose of selection
and cursor navigation.

https://bugzilla.gnome.org/show_bug.cgi?id=328449
2014-09-03 22:23:08 -04:00
Matthias Clasen
fc5f7cc138 GtkLabel: Make it possible to get the ellipsis range
This will be used in the next commit to expand the selection.
2014-09-03 22:23:08 -04:00
Matthias Clasen
1cddd14ab4 GtkLabel: better treatment for ellipsized links
When links are entirely hidden in an ellipsis, don't let
them be activated by clicking and skip them when moving
the focus around.

This commit depends on enhancements in pango 1.36.7 which
make it possible to find the ellipsed runs in a PangoLayout.
With older pango, things will work the same way as before.

https://bugzilla.gnome.org/show_bug.cgi?id=668258
2014-09-03 22:23:08 -04:00
Lapo Calamandrei
0ff5cf7daf Adwaita: fix path-bar buttons padding
The padding there previously made the pathbar 1px taller then
buttons, not good in general and specifically not good for
Nautilus.
2014-09-04 00:53:10 +02:00
Cosimo Cecchi
db372382e9 toolitem: set clip on allocation
So that widgets that are children of tool items can render their shadows
too.
2014-09-03 14:45:51 -07:00
Lapo Calamandrei
356e02fc78 Adwaita: more sass functions remixing 2014-09-03 20:40:43 +02:00
Lapo Calamandrei
4570806ad6 Adwaita: more usefull headerbar related functions 2014-09-03 19:41:50 +02:00