gboolean Hide_button_press( GtkWidget *widget, GdkEventButton *event, gpointer data ){ if ( event->button == 3 && event->type == GDK_BUTTON_PRESS ) { GlobalCommands_find( "ShowHidden" ).m_callback(); ToggleActions = 0; return TRUE; } return FALSE; }
GtkButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const char* commandName ){ return toolbar_append_button( toolbar, description, icon, GlobalCommands_find( commandName ) ); }
GtkMenuItem* create_menu_item_with_mnemonic( GtkMenu* menu, const char *mnemonic, const char* commandName ){ GlobalShortcuts_register( commandName, 1 ); const Command& command = GlobalCommands_find( commandName ); global_accel_group_connect( command.m_accelerator, command.m_callback ); return create_menu_item_with_mnemonic( menu, mnemonic, command ); }
void command_disconnect_accelerator( const char* name ){ const Command& command = GlobalCommands_find( name ); global_accel_group_disconnect( command.m_accelerator, command.m_callback ); }
void command_connect_accelerator( const char* name ){ const Command& command = GlobalCommands_find( name ); GlobalShortcuts_register( name, 1 ); global_accel_group_connect( command.m_accelerator, command.m_callback ); }