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 478309 - [GtkScaleButton] Add way to control popup presence
[GtkScaleButton] Add way to control popup presence
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: Other
2.12.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 594053
 
 
Reported: 2007-09-19 10:49 UTC by Bastien Nocera
Modified: 2009-09-04 13:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
gtk-scale-button-add-popup-visible-property.patch (4.44 KB, patch)
2007-09-19 12:14 UTC, Bastien Nocera
needs-work Details | Review

Description Bastien Nocera 2007-09-19 10:49:51 UTC
+++ This bug was initially created as a clone of Bug #477529 +++

Please describe the problem:
Under very specific circumstances are the fullscreen controls never removed, even when leaving fullscreen mode.


Steps to reproduce:
1. Start totem, load a movie and enter fullscreen mode
2. When in fullscreen, click on the volume button so the slider is shown
3. Press the Escape button to cancel the volume slider


Actual results:
The result is that the popups don't get removed, ever. Not even leaving fullscreen mode helps


Expected results:
The same behaviour as when the volume slider is removed due to clicking the mouse button outside the slider.

Does this happen every time?
Yes

Other information:
The cause of this bug is that the volume sliders release event callback (totem_fullscreen_vol_slider_released_cb) never gets called when it's been closed with the Escape key (only when clicking ouside the volume slider), thus the totem->fs->vol_lock remains TRUE with the effect that the timer callback (totem_fullscreen_popup_hide) that should remove the popup is cancelled.


We need a way to know that the dock has been popped up. Could we add a read/write property to do that in 2.12?
Comment 1 Bastien Nocera 2007-09-19 12:14:43 UTC
Created attachment 95845 [details] [review]
gtk-scale-button-add-popup-visible-property.patch

Adds the popup-visible read-write property, and use it in the test app.
Comment 2 Matthias Clasen 2007-11-21 05:42:05 UTC
Seems to work for me. Are you still seeing this issue ?
Comment 3 Bastien Nocera 2007-11-21 10:29:33 UTC
No, but the code I'm using to detect whether the popup is visible and popping it down are sub-par.

Checking it's visible:
static GtkWidget *
totem_fullscreen_get_volume_popup (TotemFullscreen *fs)
{
       return gtk_widget_get_toplevel (GTK_SCALE_BUTTON (fs->volume)->plus_button);
}

static gboolean
totem_fullscreen_is_volume_popup_visible (TotemFullscreen *fs)
{
       GtkWidget *toplevel;

       /* FIXME we should use the popup-visible property instead */
       toplevel = totem_fullscreen_get_volume_popup (fs);
       return GTK_WIDGET_VISIBLE (toplevel);
}

Popping it down:
       /* Popdown the volume button if it's visible */
       if (totem_fullscreen_is_volume_popup_visible (fs))
              gtk_bindings_activate (GTK_OBJECT (fs->volume), GDK_Escape, 0);

A property would be nicer.
Comment 4 Matthias Clasen 2007-11-21 13:45:08 UTC
Ok, fair point. 

How about making it more similar to the corresponding combobox property ?

GtkComboBox::popup-shown is readonly
Comment 5 Bastien Nocera 2007-11-21 13:53:11 UTC
(In reply to comment #4)
> Ok, fair point. 
> 
> How about making it more similar to the corresponding combobox property ?
> 
> GtkComboBox::popup-shown is readonly

We'd need to read-write, or add popup/popdown functions as in GtkComboBox (gtk_combo_box_popup and gtk_combo_box_popdown)
Comment 6 Bastien Nocera 2009-09-03 16:36:12 UTC
GtkScaleButton::popup-shown property and _popup/_popdown accessors it will be then.
Comment 7 Bastien Nocera 2009-09-04 13:14:00 UTC
Using:
GTK_WIDGET_VISIBLE (gtk_scale_button_get_popup (GTK_SCALE_BUTTON (button)))
actually works fine, so closing.