[anjuta/git-shell] git: Implement the Delete Tags pane
- From: James Liggett <jrliggett src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/git-shell] git: Implement the Delete Tags pane
- Date: Sat, 24 Jul 2010 03:17:58 +0000 (UTC)
commit eb1e757f131cabe499d33d9cf088ff9f00eb4359
Author: James Liggett <jrliggett cox net>
Date: Fri Jul 23 20:16:17 2010 -0700
git: Implement the Delete Tags pane
plugins/git/Makefile.am | 4 ++-
plugins/git/git-delete-tags-pane.c | 51 ++++++++++++++++++++++++++++++++++++
plugins/git/git-delete-tags-pane.h | 28 +++++++++++++++++++
plugins/git/plugin.c | 9 ++++++
4 files changed, 91 insertions(+), 1 deletions(-)
---
diff --git a/plugins/git/Makefile.am b/plugins/git/Makefile.am
index 641753b..048d1f0 100644
--- a/plugins/git/Makefile.am
+++ b/plugins/git/Makefile.am
@@ -199,7 +199,9 @@ libanjuta_git_la_SOURCES = \
git-tags-pane.c \
git-tags-pane.h \
git-create-tag-pane.c \
- git-create-tag-pane.h
+ git-create-tag-pane.h \
+ git-delete-tags-pane.c \
+ git-delete-tags-pane.h
libanjuta_git_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
diff --git a/plugins/git/git-delete-tags-pane.c b/plugins/git/git-delete-tags-pane.c
new file mode 100644
index 0000000..e10a336
--- /dev/null
+++ b/plugins/git/git-delete-tags-pane.c
@@ -0,0 +1,51 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * git-shell-test
+ * Copyright (C) James Liggett 2010 <jrliggett cox net>
+ *
+ * git-shell-test is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * git-shell-test is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "git-delete-tags-pane.h"
+
+void
+on_delete_tags_button_clicked (GtkAction *action, Git *plugin)
+{
+ GList *tags;
+ GitTagDeleteCommand *delete_command;
+
+ tags = git_tags_pane_get_selected_tags (GIT_TAGS_PANE (plugin->tags_pane));
+
+ if (tags)
+ {
+ delete_command = git_tag_delete_command_new (plugin->project_root_directory,
+ tags);
+
+ git_command_free_string_list (tags);
+
+ g_signal_connect (G_OBJECT (delete_command), "command-finished",
+ G_CALLBACK (git_pane_report_errors),
+ plugin);
+
+
+ g_signal_connect (G_OBJECT (delete_command), "command-finished",
+ G_CALLBACK (g_object_unref),
+ NULL);
+
+ anjuta_command_start (ANJUTA_COMMAND (delete_command));
+ }
+ else
+ anjuta_util_dialog_error (NULL, _("No tags selected."));
+}
+
\ No newline at end of file
diff --git a/plugins/git/git-delete-tags-pane.h b/plugins/git/git-delete-tags-pane.h
new file mode 100644
index 0000000..87f0d6d
--- /dev/null
+++ b/plugins/git/git-delete-tags-pane.h
@@ -0,0 +1,28 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * git-shell-test
+ * Copyright (C) James Liggett 2010 <jrliggett cox net>
+ *
+ * git-shell-test is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * git-shell-test is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _GIT_DELETE_TAGS_PANE_H_
+#define _GIT_DELETE_TAGS_PANE_H_
+
+#include "git-tag-delete-command.h"
+#include "git-tags-pane.h"
+
+void on_delete_tags_button_clicked (GtkAction *action, Git *plugin);
+
+#endif
\ No newline at end of file
diff --git a/plugins/git/plugin.c b/plugins/git/plugin.c
index 14cddcc..a56866f 100644
--- a/plugins/git/plugin.c
+++ b/plugins/git/plugin.c
@@ -42,6 +42,7 @@
#include "git-resolve-conflicts-pane.h"
#include "git-tags-pane.h"
#include "git-create-tag-pane.h"
+#include "git-delete-tags-pane.h"
AnjutaCommandBarEntry branch_entries[] =
{
@@ -104,6 +105,14 @@ AnjutaCommandBarEntry tag_entries[] =
N_("Create a tag"),
GTK_STOCK_NEW,
G_CALLBACK (on_create_tag_button_clicked)
+ },
+ {
+ ANJUTA_COMMAND_BAR_ENTRY_BUTTON,
+ "DeleteTags",
+ N_("Delete selected tags"),
+ N_("Delete selected tags"),
+ GTK_STOCK_DELETE,
+ G_CALLBACK (on_delete_tags_button_clicked)
}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]