all repos — fluxbox @ 7d8ca27562c060e06a200a143ae447a19fccf324

custom fork of the fluxbox windowmanager

removed exec and function from MenuItem
fluxgen fluxgen
commit

7d8ca27562c060e06a200a143ae447a19fccf324

parent

eecde95040c7225fa2390a3f97f5fee83ae64608

1 files changed, 8 insertions(+), 19 deletions(-)

jump to
M src/FbTk/Menu.hhsrc/FbTk/Menu.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Menu.hh,v 1.2 2003/01/07 02:09:43 fluxgen Exp $ +// $Id: Menu.hh,v 1.3 2003/01/09 16:43:54 fluxgen Exp $ #ifndef FBTK_MENU_HH #define FBTK_MENU_HH

@@ -64,8 +64,8 @@ */

//@{ /// add a menu item with a label and a command int insert(const char *label, RefCount<Command> &cmd, int pos=-1); - /// note: obsolete - int insert(const char *label, int function= 0, const char *exec = 0, int pos = -1); + /// add empty menu item + int insert(const char *label, int pos=-1); /// add submenu int insert(const char *label, Menu *submenu, int pos= -1); /// remove an item

@@ -183,22 +183,17 @@ */

class MenuItem { public: MenuItem( - const char *label, - int function, - const char *exec = (const char *) 0) - : m_label(label ? label : "") - , m_exec(exec ? exec : "") - , m_submenu(0) - , m_function(function) - , m_enabled(true) - , m_selected(false) + const char *label) + : m_label(label ? label : ""), + m_submenu(0), + m_enabled(true), + m_selected(false) { } /// create a menu item with a specific command to be executed on click MenuItem(const char *label, RefCount<Command> &cmd): m_label(label ? label : ""), m_submenu(0), m_command(cmd), - m_function(0), m_enabled(true), m_selected(false) {

@@ -206,9 +201,7 @@ }

MenuItem(const char *label, Menu *submenu) : m_label(label ? label : "") - , m_exec("") , m_submenu(submenu) - , m_function(0) , m_enabled(true) , m_selected(false) { }

@@ -220,9 +213,7 @@ /**

@name accessors */ //@{ - const std::string &exec() const { return m_exec; } const std::string &label() const { return m_label; } - int function() const { return m_function; } const Menu *submenu() const { return m_submenu; } bool isEnabled() const { return m_enabled; } bool isSelected() const { return m_selected; }

@@ -232,10 +223,8 @@ //@}

private: std::string m_label; ///< label of this item - std::string m_exec; ///< command string to execute Menu *m_submenu; ///< a submenu, 0 if we don't have one RefCount<Command> m_command; ///< command to be executed - int m_function; bool m_enabled, m_selected; friend class Menu;