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 723031 - grilo: Use popover for the source selection
grilo: Use popover for the source selection
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Plugins
unspecified
Other All
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on: 723030
Blocks:
 
 
Reported: 2014-01-26 16:41 UTC by Bastien Nocera
Modified: 2014-01-28 17:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
grilo: Use popover for the source selection (10.78 KB, patch)
2014-01-26 16:41 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2014-01-26 16:41:36 UTC
.
Comment 1 Bastien Nocera 2014-01-26 16:41:39 UTC
Created attachment 267237 [details] [review]
grilo: Use popover for the source selection
Comment 2 Bastien Nocera 2014-01-26 16:48:32 UTC
Problems with GtkPopover:
- If we don't call gtk_popover_set_position(), nor "gtk_widget_show (self->priv->listbox);" meaning that the popover is empty, we get warnings as GtkPopover is placed on top of the entry:
(totem:12066): Gtk-CRITICAL **: gtk_render_frame_gap: assertion 'xy0_gap >= 0' failed

(totem:12066): Gtk-CRITICAL **: gtk_render_frame_gap: assertion 'xy0_gap >= 0' failed

(totem:12066): Gtk-CRITICAL **: gtk_render_frame_gap: assertion 'xy0_gap >= 0' failed
- We never get a row-activated signal from the listbox, the popover pops down before we receive the signal
- We'd like to hide the popover when somebody clicks on the tag after it's been opened, but GtkPopover pops it down before we get the click, so we can't pop it down.
Comment 3 Carlos Garnacho 2014-01-28 15:36:05 UTC
(In reply to comment #2)
> Problems with GtkPopover:
> - If we don't call gtk_popover_set_position(), nor "gtk_widget_show
> (self->priv->listbox);" meaning that the popover is empty, we get warnings as
> GtkPopover is placed on top of the entry:
> (totem:12066): Gtk-CRITICAL **: gtk_render_frame_gap: assertion 'xy0_gap >= 0'
> failed
> 
> (totem:12066): Gtk-CRITICAL **: gtk_render_frame_gap: assertion 'xy0_gap >= 0'
> failed
> 
> (totem:12066): Gtk-CRITICAL **: gtk_render_frame_gap: assertion 'xy0_gap >= 0'
> failed

The allocated size was indeed too small, so the gap was calculated out of boundaries, with commit 709fb26587 it should get a minimal size that caters for border-radius too, so the gap fits.

> - We never get a row-activated signal from the listbox, the popover pops down
> before we receive the signal

GtkListBox button press handler was returning FALSE, so the popover would handle and popdown even if the listbox expected a button release...

> - We'd like to hide the popover when somebody clicks on the tag after it's been
> opened, but GtkPopover pops it down before we get the click, so we can't pop it
> down.

GtkPopover was unfortunately handling popdown on button press, so the widget below the pointer would get the button release after the grab was gone, and not all widgets track button state. Commit 7b4ef99320 moves that to button release, so that click only dismisses the popover and can't possibly trigger other actions.
Comment 4 Bastien Nocera 2014-01-28 17:05:30 UTC
Attachment 267237 [details] pushed as a8601ee - grilo: Use popover for the source selection