action->setData( true );
}
+/***
+ * Same for MIM
+ ***/
+void addMIMStaticEntry( intf_thread_t *p_intf,
+ QMenu *menu,
+ const QString text,
+ const char *icon,
+ const char *member )
+{
+ if( strlen( icon ) > 0 )
+ {
+ QAction *action = menu->addAction( text, THEMIM, member );
+ action->setIcon( QIcon( icon ) );
+ }
+ else
+ {
+ menu->addAction( text, THEMIM, member );
+ }
+}
+
/**
* @brief Enable all static entries, disable the others
* @param enable if false, disable all entries
return i_ret;
}
-/***
- * Same for MIM
- ***/
-void addMIMStaticEntry( intf_thread_t *p_intf,
- QMenu *menu,
- const QString text,
- const char *icon,
- const char *member )
+/**
+ * \return QAction associated to psz_var variable
+ **/
+static QAction * FindActionWithVar( QMenu *menu, const char *psz_var )
{
- if( strlen( icon ) > 0 )
- {
- QAction *action = menu->addAction( text, THEMIM, member );
- action->setIcon( QIcon( icon ) );
- }
- else
+ QList< QAction* > actions = menu->actions();
+ for( int i = 0; i < actions.size(); ++i )
{
- menu->addAction( text, THEMIM, member );
+ if( actions[i]->data().toString() == psz_var )
+ return actions[i];
}
+ return NULL;
}
/*****************************************************************************
return VLC_SUCCESS;
}
-static QAction * FindActionWithVar( QMenu *menu, const char *psz_var )
-{
- QList< QAction* > actions = menu->actions();
- for( int i = 0; i < actions.size(); ++i )
- {
- if( actions[i]->data().toString() == psz_var )
- return actions[i];
- }
- return NULL;
-}
-
/*****************************************************************************
* All normal menus
* Simple Code