summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/main.cpp3
-rw-r--r--linux/system.cpp4
-rw-r--r--linux/toolbar.cpp4
3 files changed, 9 insertions, 2 deletions
diff --git a/linux/main.cpp b/linux/main.cpp
index 9c97e5e..c252801 100644
--- a/linux/main.cpp
+++ b/linux/main.cpp
@@ -30,6 +30,9 @@ bool ignore_commands = false;
void OnCommandDirect(GtkWidget *w, gpointer data)
{
+ if (ignore_commands)
+ return;
+
project->HandleCommand((LC_COMMANDS)(int)data, 0);
}
diff --git a/linux/system.cpp b/linux/system.cpp
index bda9063..8aa21ce 100644
--- a/linux/system.cpp
+++ b/linux/system.cpp
@@ -207,6 +207,7 @@ void SystemUpdateColorList(int new_color)
void SystemUpdateRenderingMode(bool bBackground, bool bFast)
{
+ ignore_commands = true;
if (bFast)
{
gtk_widget_set_sensitive (main_toolbar.bg, TRUE);
@@ -219,6 +220,7 @@ void SystemUpdateRenderingMode(bool bBackground, bool bFast)
}
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(main_toolbar.fast), bFast);
+ ignore_commands = false;
}
void SystemUpdateUndoRedo(char* undo, char* redo)
@@ -323,12 +325,14 @@ void SystemUpdateTime(bool bAnimation, int nTime, int nTotal)
void SystemUpdateAnimation(bool bAnimation, bool bAddKeys)
{
+ ignore_commands = true;
gtk_widget_set_sensitive (anim_toolbar.play, bAnimation);
gtk_widget_set_sensitive (anim_toolbar.stop, FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(anim_toolbar.anim), bAnimation);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(anim_toolbar.keys), bAddKeys);
gtk_label_set_text (GTK_LABEL(GTK_BIN(main_menu.piece_copy_keys)->child),
bAnimation ? "Copy Keys from Instructions" : "Copy Keys from Animation");
+ ignore_commands = false;
}
void SystemUpdateMoveSnap(unsigned short move_snap)
diff --git a/linux/toolbar.cpp b/linux/toolbar.cpp
index d82d80d..1985754 100644
--- a/linux/toolbar.cpp
+++ b/linux/toolbar.cpp
@@ -236,10 +236,10 @@ void create_toolbars(GtkWidget *window, GtkWidget *vbox)
GTK_SIGNAL_FUNC (OnCommandDirect), (void*)LC_VIEW_STEP_LAST);
anim_toolbar.anim = gtk_toolbar_append_element (GTK_TOOLBAR (anim_toolbar.toolbar),
GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "Mode", "Toggle Animation or Instructions", "",
- new_pixmap (window, an_anim), GTK_SIGNAL_FUNC (OnCommandDirect), (void*)LC_TOOLBAR_ADDKEYS);
+ new_pixmap (window, an_anim), GTK_SIGNAL_FUNC (OnCommandDirect), (void*)LC_TOOLBAR_ANIMATION);
anim_toolbar.keys = gtk_toolbar_append_element (GTK_TOOLBAR (anim_toolbar.toolbar),
GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "Keys", "Add Keys", "",
- new_pixmap (window, an_key), GTK_SIGNAL_FUNC (OnCommandDirect), (void*)LC_TOOLBAR_ANIMATION);
+ new_pixmap (window, an_key), GTK_SIGNAL_FUNC (OnCommandDirect), (void*)LC_TOOLBAR_ADDKEYS);
}
// =========================================================