aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-10-05 18:16:16 +0200
committerThomas White <taw@physics.org>2011-10-05 18:16:16 +0200
commita7914f60c8900a1de536e8c1129e68b6a72bcff7 (patch)
treef2557181b53e702f11e98e19f8cc74818fe32511 /src/mainwindow.c
parentc89e22542ffd440e646b9217c963ca98c5c7a5ad (diff)
Force the text tool on when creating furniture
Diffstat (limited to 'src/mainwindow.c')
-rw-r--r--src/mainwindow.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 6ea3fa7..6416027 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -389,6 +389,15 @@ static gint set_tool_sig(GtkWidget *widget, GtkRadioAction *action,
}
+static void force_tool(struct presentation *p, enum tool_id tool)
+{
+ GtkAction *action;
+ action = gtk_ui_manager_get_action(p->ui,
+ "/ui/displaywindowtoolbar/select");
+ gtk_radio_action_set_current_value(GTK_RADIO_ACTION(action), tool);
+}
+
+
static gint add_furniture(GtkWidget *widget, struct presentation *p)
{
gchar *name;
@@ -399,6 +408,7 @@ static gint add_furniture(GtkWidget *widget, struct presentation *p)
g_free(name);
if ( sty == NULL ) return 0;
+ force_tool(p, TOOL_TEXT);
p->text_tool->create_default(p, sty, p->text_tool);
return 0;