]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/qt4.cpp
* configure.ac: enabled Obj-C exceptions in the OBJCFLAGS (they're currently used...
[vlc] / modules / gui / qt4 / qt4.cpp
index 49e6c08736909ed532a12ff161dbe567f81388cb..9c0d6361066781c42b8d002d43b4e925497739c9 100644 (file)
@@ -71,7 +71,7 @@ static int Open( vlc_object_t *p_this )
                             VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
     if( !p_intf->p_sys->p_playlist )
         return VLC_EGENERIC;
-                            
+
     p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
 
     return VLC_SUCCESS;
@@ -154,3 +154,16 @@ static void ShowDialog( intf_thread_t *p_intf, int i_dialog_event, int i_arg,
     QApplication::postEvent( DialogsProvider::getInstance( p_intf ),
                              static_cast<QEvent*>(event) );
 }
+
+/*****************************************************************************
+ * PopupMenuCB: callback to show the popupmenu.
+ *  We don't show the menu directly here because we don't want the
+ *  caller to block for a too long time.
+ *****************************************************************************/
+static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
+                        vlc_value_t old_val, vlc_value_t new_val, void *param )
+{
+    intf_thread_t *p_intf = (intf_thread_t *)param;
+    ShowDialog( p_intf, INTF_DIALOG_POPUPMENU, new_val.b_bool, 0 );
+    return VLC_SUCCESS;
+}