From 16310e6100f7668ed14749e5abb552ac34010773 Mon Sep 17 00:00:00 2001 From: sgranjoux Date: Sun, 20 Jul 2008 07:39:04 +0000 Subject: [PATCH] * plugins/build-basic-autotools/build-basic-autotools.c, plugins/build-basic-autotools/anjuta-build-basic-autotools.plugin.in, plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.ui, plugins/message-view/anjuta-message-manager.ui: Fix #375640: Allow user to stop a build in progress git-svn-id: http://svn.gnome.org/svn/anjuta/trunk@4088 1dbfb86a-d425-0410-a06b-cb591aac69f6 --- ChangeLog | 8 +++++ .../anjuta-build-basic-autotools-plugin.ui | 6 ++++ .../anjuta-build-basic-autotools.plugin.in | 1 + .../build-basic-autotools/build-basic-autotools.c | 42 ++++++++++++++++++++++ plugins/message-view/anjuta-message-manager.ui | 1 + 5 files changed, 58 insertions(+) diff --git a/ChangeLog b/ChangeLog index 79906e0b..d9fc6df1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-07-20 Sébastien Granjoux + + * plugins/build-basic-autotools/build-basic-autotools.c, + plugins/build-basic-autotools/anjuta-build-basic-autotools.plugin.in, + plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.ui, + plugins/message-view/anjuta-message-manager.ui: + Fix #375640: Allow user to stop a build in progress + 2008-07-19 Sébastien Granjoux * plugins/build-basic-autotools/build-basic-autotools.c: diff --git a/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.ui b/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.ui index ec022c2a..e47f5649 100644 --- a/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.ui +++ b/plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.ui @@ -41,4 +41,10 @@ + + + + + + diff --git a/plugins/build-basic-autotools/anjuta-build-basic-autotools.plugin.in b/plugins/build-basic-autotools/anjuta-build-basic-autotools.plugin.in index ad26c9de..4ea15a28 100644 --- a/plugins/build-basic-autotools/anjuta-build-basic-autotools.plugin.in +++ b/plugins/build-basic-autotools/anjuta-build-basic-autotools.plugin.in @@ -4,6 +4,7 @@ _Description=Basic autotools build plugin. Location=anjuta-build-basic-autotools:BasicAutotoolsPlugin Icon=anjuta-build-basic-autotools-plugin-48.png Interfaces=IAnjutaBuilder,IAnjutaBuildable,IAnjutaFile +Dependencies=anjuta-message-view:MessageViewPlugin [File Loader] _Title=Execute diff --git a/plugins/build-basic-autotools/build-basic-autotools.c b/plugins/build-basic-autotools/build-basic-autotools.c index d1d18cce..4364e785 100644 --- a/plugins/build-basic-autotools/build-basic-autotools.c +++ b/plugins/build-basic-autotools/build-basic-autotools.c @@ -1924,6 +1924,42 @@ pm_clean (GtkAction *action, BasicAutotoolsPlugin *plugin) g_free (target); } +static void +mv_cancel (GtkAction *action, BasicAutotoolsPlugin *plugin) +{ + IAnjutaMessageManager *msgman; + + msgman = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell, + IAnjutaMessageManager, + NULL); + + if (msgman != NULL) + { + IAnjutaMessageView *view; + + view = ianjuta_message_manager_get_current_view (msgman, NULL); + if (view != NULL) + { + GList *node; + + for (node = g_list_first (plugin->contexts_pool); node != NULL; node = g_list_next (node)) + { + BuildContext *context; + + context = (BuildContext *)node->data; + if (context->message_view == view) + { + if (context->launcher != NULL) + { + anjuta_launcher_signal (context->launcher, SIGTERM); + } + return; + } + } + } + } +} + static GtkActionEntry build_actions[] = { { @@ -2055,6 +2091,12 @@ static GtkActionEntry build_popup_actions[] = N_("_Clean"), NULL, N_("Clean module"), G_CALLBACK (pm_clean) + }, + { + "ActionPopupMVBuildCancel", NULL, + N_("_Cancel command"), NULL, + N_("Cancel build command"), + G_CALLBACK (mv_cancel) } }; diff --git a/plugins/message-view/anjuta-message-manager.ui b/plugins/message-view/anjuta-message-manager.ui index 7d170910..b7b45097 100644 --- a/plugins/message-view/anjuta-message-manager.ui +++ b/plugins/message-view/anjuta-message-manager.ui @@ -28,5 +28,6 @@ + -- 2.11.4.GIT