After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 736131 - tooltip: Fix warning with GtkCellRendererAccel
tooltip: Fix warning with GtkCellRendererAccel
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-09-05 13:24 UTC by Bastien Nocera
Modified: 2014-09-06 23:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tooltip: Fix warning with GtkCellRendererAccel (2.19 KB, patch)
2014-09-05 13:24 UTC, Bastien Nocera
reviewed Details | Review
tooltip: Fix warning with GtkCellRendererAccel (2.00 KB, patch)
2014-09-06 18:56 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2014-09-05 13:24:43 UTC
.
Comment 1 Bastien Nocera 2014-09-05 13:24:47 UTC
Created attachment 285495 [details] [review]
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
Comment 2 Bastien Nocera 2014-09-05 13:26:41 UTC
The reproducer is:
- grab this extension: https://github.com/OttoAllmendinger/gnome-shell-imgur
- install it
- run: gnome-shell-extension-prefs gnome-shell-imgur@ttll.de
- try to change one of the keybindings

I also cannot make the keybindings capture work, as per:
https://github.com/OttoAllmendinger/gnome-shell-imgur/issues/17
Comment 3 Bastien Nocera 2014-09-05 13:28:06 UTC
Note that the accel cell renderer works just fine in the gnome-control-center keyboard panel.
Comment 4 Matthias Clasen 2014-09-05 13:29:55 UTC
Review of attachment 285495 [details] [review]:

::: gtk/gtktooltip.c
@@ +908,3 @@
       window_widget != tooltip->window &&
+      gtk_widget_is_toplevel (window_widget) &&
+      !GTK_IS_INVISIBLE (window_widget))

That seems backwards - if you want to call a gtk_window function, you should really check GTK_IS_WINDOW(), no ?
Comment 5 Bastien Nocera 2014-09-05 13:33:03 UTC
(In reply to comment #4)
> Review of attachment 285495 [details] [review]:
> 
> ::: gtk/gtktooltip.c
> @@ +908,3 @@
>        window_widget != tooltip->window &&
> +      gtk_widget_is_toplevel (window_widget) &&
> +      !GTK_IS_INVISIBLE (window_widget))
> 
> That seems backwards - if you want to call a gtk_window function, you should
> really check GTK_IS_WINDOW(), no ?

Right. As there are just 3 possible top-levels and GtkInvisible is the only one that's not a GtkWindow child...

In any case, I might be completely off-base with this, and the "can't edit shortcut" problem is still there.
Comment 6 Bastien Nocera 2014-09-06 12:08:26 UTC
Bug 736185 blocks the testing of this bug.
Comment 7 Bastien Nocera 2014-09-06 18:20:10 UTC
(In reply to comment #2)
> The reproducer is:
> - grab this extension: https://github.com/OttoAllmendinger/gnome-shell-imgur

Modify the "metadata.json" file to include your current shell version.

> - install it
> - run: gnome-shell-extension-prefs gnome-shell-imgur@ttll.de
> - try to change one of the keybindings
> 
> I also cannot make the keybindings capture work, as per:
> https://github.com/OttoAllmendinger/gnome-shell-imgur/issues/17
Comment 8 Bastien Nocera 2014-09-06 18:56:36 UTC
Created attachment 285584 [details] [review]
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
Comment 9 Bastien Nocera 2014-09-06 18:57:19 UTC
I've split up the keybindings capture bug to bug 736203
Comment 10 Matthias Clasen 2014-09-06 23:06:12 UTC
Attachment 285584 [details] pushed as c849b8e - tooltip: Fix warning with GtkCellRendererAccel