[anjuta/git-shell] git: Remove the existing git UI
- From: James Liggett <jrliggett src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/git-shell] git: Remove the existing git UI
- Date: Thu, 13 May 2010 04:31:44 +0000 (UTC)
commit 88f794b61dfc52a3ee124d7607b6e13a9d2aba6d
Author: James Liggett <jrliggett cox net>
Date: Wed May 12 21:29:13 2010 -0700
git: Remove the existing git UI
The transition to git shell begins...
plugins/git/Makefile.am | 70 +--
plugins/git/anjuta-git.xml | 139 ---
plugins/git/git-add-dialog.c | 136 ---
plugins/git/git-add-dialog.h | 34 -
plugins/git/git-add-remote-dialog.c | 178 ----
plugins/git/git-add-remote-dialog.h | 33 -
plugins/git/git-apply-mailbox-dialog.c | 147 ---
plugins/git/git-apply-mailbox-dialog.h | 37 -
plugins/git/git-apply-stash-dialog.c | 108 ---
plugins/git/git-apply-stash-dialog.h | 29 -
plugins/git/git-bisect-dialog.c | 344 -------
plugins/git/git-bisect-dialog.h | 43 -
plugins/git/git-cat-file-menu.c | 172 ----
plugins/git/git-cat-file-menu.h | 36 -
plugins/git/git-checkout-files-dialog.c | 183 ----
plugins/git/git-checkout-files-dialog.h | 33 -
plugins/git/git-cherry-pick-dialog.c | 181 ----
plugins/git/git-cherry-pick-dialog.h | 35 -
plugins/git/git-commit-dialog.c | 338 -------
plugins/git/git-commit-dialog.h | 33 -
plugins/git/git-create-branch-dialog.c | 266 -----
plugins/git/git-create-branch-dialog.h | 35 -
plugins/git/git-create-patch-series-dialog.c | 151 ---
plugins/git/git-create-patch-series-dialog.h | 34 -
plugins/git/git-create-tag-dialog.c | 275 ------
plugins/git/git-create-tag-dialog.h | 35 -
plugins/git/git-delete-branch-dialog.c | 263 -----
plugins/git/git-delete-branch-dialog.h | 34 -
plugins/git/git-delete-remote-dialog.c | 147 ---
plugins/git/git-delete-remote-dialog.h | 34 -
plugins/git/git-delete-tag-dialog.c | 150 ---
plugins/git/git-delete-tag-dialog.h | 34 -
plugins/git/git-diff-dialog.c | 114 ---
plugins/git/git-diff-dialog.h | 36 -
plugins/git/git-fetch-dialog.c | 84 --
plugins/git/git-fetch-dialog.h | 33 -
plugins/git/git-ignore-dialog.c | 133 ---
plugins/git/git-ignore-dialog.h | 33 -
plugins/git/git-init-dialog.c | 54 -
plugins/git/git-init-dialog.h | 33 -
plugins/git/git-log-dialog.c | 1337 --------------------------
plugins/git/git-log-dialog.h | 50 -
plugins/git/git-merge-dialog.c | 212 ----
plugins/git/git-merge-dialog.h | 34 -
plugins/git/git-pull-dialog.c | 265 -----
plugins/git/git-pull-dialog.h | 34 -
plugins/git/git-push-dialog.c | 374 -------
plugins/git/git-push-dialog.h | 35 -
plugins/git/git-rebase-dialog.c | 190 ----
plugins/git/git-rebase-dialog.h | 37 -
plugins/git/git-remove-dialog.c | 136 ---
plugins/git/git-remove-dialog.h | 34 -
plugins/git/git-reset-dialog.c | 190 ----
plugins/git/git-reset-dialog.h | 35 -
plugins/git/git-resolve-dialog.c | 154 ---
plugins/git/git-resolve-dialog.h | 33 -
plugins/git/git-revert-dialog.c | 134 ---
plugins/git/git-revert-dialog.h | 35 -
plugins/git/git-stash-changes-dialog.c | 102 --
plugins/git/git-stash-changes-dialog.h | 28 -
plugins/git/git-stash-widget.c | 479 ---------
plugins/git/git-stash-widget.h | 37 -
plugins/git/git-switch-dialog.c | 144 ---
plugins/git/git-switch-dialog.h | 34 -
plugins/git/git-unstage-dialog.c | 154 ---
plugins/git/git-unstage-dialog.h | 33 -
plugins/git/plugin.c | 741 +--------------
plugins/git/plugin.h | 19 -
68 files changed, 2 insertions(+), 9375 deletions(-)
---
diff --git a/plugins/git/Makefile.am b/plugins/git/Makefile.am
index 5f2c7ae..6307653 100644
--- a/plugins/git/Makefile.am
+++ b/plugins/git/Makefile.am
@@ -4,10 +4,6 @@
git_gladedir = $(anjuta_glade_dir)
git_glade_DATA = anjuta-git.ui
-# Plugin UI file
-git_uidir = $(anjuta_ui_dir)
-git_ui_DATA = anjuta-git.xml
-
# Plugin Icon file
git_pixmapsdir = $(anjuta_image_dir)
git_pixmaps_DATA = \
@@ -50,60 +46,36 @@ libanjuta_git_la_SOURCES = \
git-ui-utils.h \
git-diff-command.c \
git-diff-command.h \
- git-diff-dialog.c \
- git-diff-dialog.h \
git-status.c \
git-status.h \
git-status-command.c \
git-status-command.h \
git-commit-command.h \
git-commit-command.c \
- git-commit-dialog.c \
- git-commit-dialog.h \
git-add-command.h \
git-add-command.c \
- git-add-dialog.c \
- git-add-dialog.h \
git-remove-command.c \
git-remove-command.h \
- git-remove-dialog.c \
- git-remove-dialog.h \
- git-resolve-dialog.c \
- git-resolve-dialog.h \
git-branch.h \
git-branch.c \
git-branch-list-command.h \
git-branch-list-command.c \
git-merge-command.h \
git-merge-command.c \
- git-merge-dialog.h \
- git-merge-dialog.c \
git-branch-checkout-command.h \
git-branch-checkout-command.c \
- git-switch-dialog.c \
- git-switch-dialog.h \
git-branch-create-command.h \
git-branch-create-command.c \
- git-create-branch-dialog.c \
- git-create-branch-dialog.h \
git-branch-delete-command.c \
git-branch-delete-command.h \
- git-delete-branch-dialog.c \
- git-delete-branch-dialog.h \
git-reset-files-command.c \
git-reset-files-command.h \
- git-unstage-dialog.c \
- git-unstage-dialog.h \
git-checkout-files-command.c \
git-checkout-files-command.h \
- git-checkout-files-dialog.c \
- git-checkout-files-dialog.h \
giggle-graph-renderer.c \
giggle-graph-renderer.h \
git-log-command.c \
git-log-command.h \
- git-log-dialog.c \
- git-log-dialog.h \
git-revision.c \
git-revision.h \
git-log-message-command.c \
@@ -116,30 +88,18 @@ libanjuta_git_la_SOURCES = \
git-raw-output-command.h \
git-diff-tree-command.c \
git-diff-tree-command.h \
- git-create-tag-dialog.c \
- git-create-tag-dialog.h \
git-tag-create-command.c \
git-tag-create-command.h \
- git-reset-dialog.c \
- git-reset-dialog.h \
git-reset-tree-command.c \
git-reset-tree-command.h \
git-revert-command.c \
git-revert-command.h \
- git-revert-dialog.c \
- git-revert-dialog.h \
git-fetch-command.c \
git-fetch-command.h \
- git-fetch-dialog.c \
- git-fetch-dialog.h \
git-rebase-continue-command.c \
git-rebase-continue-command.h \
- git-rebase-dialog.c \
- git-rebase-dialog.h \
git-rebase-start-command.c \
git-rebase-start-command.h \
- git-bisect-dialog.c \
- git-bisect-dialog.h \
git-bisect-reset-command.c \
git-bisect-reset-command.h \
git-bisect-start-command.c \
@@ -150,70 +110,44 @@ libanjuta_git_la_SOURCES = \
git-file-command.h \
git-ignore-command.c \
git-ignore-command.h \
- git-ignore-dialog.c \
- git-ignore-dialog.h \
- git-add-remote-dialog.c \
- git-add-remote-dialog.h \
git-remote-add-command.c \
git-remote-add-command.h \
- git-delete-remote-dialog.c \
- git-delete-remote-dialog.h \
git-remote-delete-command.c \
git-remote-delete-command.h \
git-remote-list-command.c \
git-remote-list-command.h \
git-format-patch-command.h \
git-format-patch-command.c \
- git-create-patch-series-dialog.c \
- git-create-patch-series-dialog.h \
git-pull-command.c \
git-pull-command.h \
- git-pull-dialog.c \
- git-pull-dialog.h \
git-list-tree-command.c \
git-list-tree-command.h \
git-cat-blob-command.c \
git-cat-blob-command.h \
- git-cat-file-menu.c \
- git-cat-file-menu.h \
git-vcs-interface.c \
git-vcs-interface.h \
git-clone-command.h \
git-clone-command.c \
git-push-command.c \
git-push-command.h \
- git-push-dialog.c \
- git-push-dialog.h \
git-apply-mailbox-command.c \
git-apply-mailbox-command.h \
git-apply-mailbox-continue-command.c \
git-apply-mailbox-continue-command.h \
- git-apply-mailbox-dialog.c \
- git-apply-mailbox-dialog.h \
git-cherry-pick-command.c \
git-cherry-pick-command.h \
- git-cherry-pick-dialog.c \
- git-cherry-pick-dialog.h \
- git-delete-tag-dialog.c \
- git-delete-tag-dialog.h \
git-tag-delete-command.c \
git-tag-delete-command.h \
git-tag-list-command.c \
git-tag-list-command.h \
git-stash-save-command.h \
git-stash-save-command.c \
- git-stash-changes-dialog.c \
- git-stash-changes-dialog.h \
- git-stash-widget.c \
- git-stash-widget.h \
git-stash.c \
git-stash.h \
git-stash-list-command.c \
git-stash-list-command.h \
git-stash-apply-command.c \
git-stash-apply-command.h \
- git-apply-stash-dialog.c \
- git-apply-stash-dialog.h \
git-stash-show-command.c \
git-stash-show-command.h \
git-stash-drop-command.c \
@@ -221,9 +155,7 @@ libanjuta_git_la_SOURCES = \
git-stash-clear-command.c \
git-stash-clear-command.h \
git-init-command.c \
- git-init-command.h \
- git-init-dialog.c \
- git-init-dialog.h
+ git-init-command.h
libanjuta_git_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
diff --git a/plugins/git/plugin.c b/plugins/git/plugin.c
index f1cc000..7ec7c94 100644
--- a/plugins/git/plugin.c
+++ b/plugins/git/plugin.c
@@ -21,588 +21,9 @@
#include "plugin.h"
#include "git-vcs-interface.h"
-#include "git-diff-dialog.h"
-#include "git-commit-dialog.h"
-#include "git-add-dialog.h"
-#include "git-remove-dialog.h"
-#include "git-resolve-dialog.h"
-#include "git-merge-dialog.h"
-#include "git-switch-dialog.h"
-#include "git-create-branch-dialog.h"
-#include "git-delete-branch-dialog.h"
-#include "git-unstage-dialog.h"
-#include "git-checkout-files-dialog.h"
-#include "git-log-dialog.h"
-#include "git-create-tag-dialog.h"
-#include "git-reset-dialog.h"
-#include "git-revert-dialog.h"
-#include "git-fetch-dialog.h"
-#include "git-rebase-dialog.h"
-#include "git-bisect-dialog.h"
-#include "git-ignore-dialog.h"
-#include "git-add-remote-dialog.h"
-#include "git-delete-remote-dialog.h"
-#include "git-create-patch-series-dialog.h"
-#include "git-pull-dialog.h"
-#include "git-cat-file-menu.h"
-#include "git-push-dialog.h"
-#include "git-apply-mailbox-dialog.h"
-#include "git-cherry-pick-dialog.h"
-#include "git-delete-tag-dialog.h"
-#include "git-stash-changes-dialog.h"
-#include "git-stash-widget.h"
-#include "git-apply-stash-dialog.h"
-#include "git-init-dialog.h"
-
-#define UI_FILE PACKAGE_DATA_DIR"/ui/anjuta-git.xml"
static gpointer parent_class;
-/* Give the top-level git menu its own action group. The items in the menu
- * are separated so that we can disable the menu's actions in one shot
- * without disabling the whole menu. */
-static GtkActionEntry action_git_menu_toplevel =
-{
- "ActionMenuGit", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Git"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
-};
-
-static GtkActionEntry actions_git[] =
-{
- {
- "ActionMenuGitChanges", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Changes"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitCommit", /* Action name */
- GTK_STOCK_YES, /* Stock icon, if any */
- N_("_Commitâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Commit changes to the local repository"), /* Tooltip */
- G_CALLBACK (on_menu_git_commit) /* action callback */
- },
- {
- "ActionGitDiffUncommitted", /* Action name */
- GTK_STOCK_ZOOM_100, /* Stock icon, if any */
- N_("_Diff uncommitted changes"), /* Display label */
- NULL, /* short-cut */
- N_("Show uncommitted changes"), /* Tooltip */
- G_CALLBACK (on_menu_git_diff) /* action callback */
- },
- {
- "ActionMenuGitStash", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Stash"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitStashUncommitted", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Stash uncommitted changesâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Save uncommitted changes and re-apply them later"), /* Tooltip */
- G_CALLBACK (on_menu_git_stash_changes) /* action callback */
- },
- {
- "ActionGitApplyStash", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Apply stashed changesâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Apply stashed changes to the working tree"), /* Tooltip */
- G_CALLBACK (on_menu_git_apply_stash) /* action callback */
- },
- {
- "ActionGitLog", /* Action name */
- GTK_STOCK_ZOOM_100, /* Stock icon, if any */
- N_("_View logâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("View change history"), /* Tooltip */
- G_CALLBACK (on_menu_git_log) /* action callback */
- },
- {
- "ActionMenuGitRemoteRepository", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Remote repository"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitPush", /* Action name */
- GTK_STOCK_GO_FORWARD, /* Stock icon, if any */
- N_("_Pushâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Push changes to a remote repository"), /* Tooltip */
- G_CALLBACK (on_menu_git_push) /* action callback */
- },
- {
- "ActionGitPull", /* Action name */
- GTK_STOCK_GO_BACK, /* Stock icon, if any */
- N_("_Pullâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Update the working copy"), /* Tooltip */
- G_CALLBACK (on_menu_git_pull) /* action callback */
- },
- {
- "ActionGitFetch", /* Action name */
- GTK_STOCK_CONNECT, /* Stock icon, if any */
- N_("_Fetch"), /* Display label */
- NULL, /* short-cut */
- N_("Update remote branches"), /* Tooltip */
- G_CALLBACK (on_menu_git_fetch) /* action callback */
- },
- {
- "ActionMenuGitFiles", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Files"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitAdd", /* Action name */
- GTK_STOCK_ADD, /* Stock icon, if any */
- N_("_Addâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Add files to the repository"), /* Tooltip */
- G_CALLBACK (on_menu_git_add) /* action callback */
- },
- {
- "ActionGitRemove", /* Action name */
- GTK_STOCK_REMOVE, /* Stock icon, if any */
- N_("_Removeâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Remove files from the repository"), /* Tooltip */
- G_CALLBACK (on_menu_git_remove) /* action callback */
- },
- {
- "ActionGitIgnore", /* Action name */
- GTK_STOCK_DIALOG_ERROR, /* Stock icon, if any */
- N_("_Ignoreâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Ignore files"), /* Tooltip */
- G_CALLBACK (on_menu_git_ignore) /* action callback */
- },
- {
- "ActionGitCheckoutFiles", /* Action name */
- GTK_STOCK_UNDO, /* Stock icon, if any */
- N_("_Check out filesâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Revert uncommitted changes to files"), /* Tooltip */
- G_CALLBACK (on_menu_git_checkout_files) /* action callback */
- },
- {
- "ActionGitUnstageFiles", /* Action name */
- GTK_STOCK_CANCEL, /* Stock icon, if any */
- N_("_Unstage filesâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Remove files from the commit index"), /* Tooltip */
- G_CALLBACK (on_menu_git_unstage) /* action callback */
- },
- {
- "ActionGitResolve", /* Action name */
- GTK_STOCK_PREFERENCES, /* Stock icon, if any */
- N_("_Resolve conflictsâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Mark conflicted files as resolved"), /* Tooltip */
- G_CALLBACK (on_menu_git_resolve) /* action callback */
- },
- {
- "ActionMenuGitPatches", /* Action name */
- NULL, /* Stock icon, if any */
- N_("Patches"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitCreatePatchSeries", /* Action name */
- GTK_STOCK_DND_MULTIPLE, /* Stock icon, if any */
- N_("Create patch seriesâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Generate patch files for submission upstream"), /* Tooltip */
- G_CALLBACK (on_menu_git_create_patch_series) /* action callback */
- },
- {
- "ActionMenuGitApplyMailboxFiles", /* Action name */
- NULL, /* Stock icon, if any */
- N_("Apply mailbox files"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitApplyMailboxApply", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Applyâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Start applying a patch series"), /* Tooltip */
- G_CALLBACK (on_menu_git_apply_mailbox_apply) /* action callback */
- },
- {
- "ActionGitApplyMailboxContinue", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Continue with resolved conflicts"), /* Display label */
- NULL, /* short-cut */
- N_("Continue applying a series after resolving conflicts"), /* Tooltip */
- G_CALLBACK (on_menu_git_apply_mailbox_resolved) /* action callback */
- },
- {
- "ActionGitApplyMailboxSkip", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Skip current patch"), /* Display label */
- NULL, /* short-cut */
- N_("Skip the current patch in the series and continue"), /* Tooltip */
- G_CALLBACK (on_menu_git_apply_mailbox_skip) /* action callback */
- },
- {
- "ActionGitApplyMailboxAbort", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Abort"), /* Display label */
- NULL, /* short-cut */
- N_("Stop applying the series and return the repository to its original state"), /* Tooltip */
- G_CALLBACK (on_menu_git_apply_mailbox_abort) /* action callback */
- },
- {
- "ActionMenuGitBranches", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Branches"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitCreateBranch", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Create branchâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Create a branch"), /* Tooltip */
- G_CALLBACK (on_menu_git_create_branch) /* action callback */
- },
- {
- "ActionGitDeleteBranch", /* Action name */
- GTK_STOCK_DELETE, /* Stock icon, if any */
- N_("_Delete branchâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Delete branches"), /* Tooltip */
- G_CALLBACK (on_menu_git_delete_branch) /* action callback */
- },
- {
- "ActionGitSwitch", /* Action name */
- GTK_STOCK_JUMP_TO, /* Stock icon, if any */
- N_("_Switch to another branchâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Switch to another branch"), /* Tooltip */
- G_CALLBACK (on_menu_git_switch) /* action callback */
- },
- {
- "ActionGitMerge", /* Action name */
- GTK_STOCK_CONVERT, /* Stock icon, if any */
- N_("_Mergeâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Merge changes from another branch into the current one"), /* Tooltip */
- G_CALLBACK (on_menu_git_merge) /* action callback */
- },
- {
- "ActionMenuGitRebase", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Rebase"), /* Display label */
- NULL, /* short-cut */
- N_("Merge your changes with an upstream remote branch"), /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitRebaseStart", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Startâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Start a rebase"), /* Tooltip */
- G_CALLBACK (on_menu_git_rebase_start) /* action callback */
- },
- {
- "ActionGitRebaseContinue", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Continue"), /* Display label */
- NULL, /* short-cut */
- N_("Continue a rebase that stopped because of conflicts"), /* Tooltip */
- G_CALLBACK (on_menu_git_rebase_continue) /* action callback */
- },
- {
- "ActionGitRebaseSkip", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Skip"), /* Display label */
- NULL, /* short-cut */
- N_("Skip the current conflicted commit and continue"), /* Tooltip */
- G_CALLBACK (on_menu_git_rebase_skip) /* action callback */
- },
- {
- "ActionGitRebaseAbort", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Abort"), /* Display label */
- NULL, /* short-cut */
- N_("Abort the rebase and put the repository in its original state"), /* Tooltip */
- G_CALLBACK (on_menu_git_rebase_abort) /* action callback */
- },
- {
- "ActionGitCherryPick", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Cherry pickâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Selectively merge individual changes from other branches into the current one"), /* Tooltip */
- G_CALLBACK (on_menu_git_cherry_pick) /* action callback */
- },
- {
- "ActionMenuGitRemoteBranches", /* Action name */
- GTK_STOCK_NETWORK, /* Stock icon, if any */
- N_("_Remote branches"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitRemoteAdd", /* Action name */
- GTK_STOCK_ADD, /* Stock icon, if any */
- N_("_Addâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Add a remote branch"), /* Tooltip */
- G_CALLBACK (on_menu_git_add_remote) /* action callback */
- },
- {
- "ActionGitRemoteDelete", /* Action name */
- GTK_STOCK_DELETE, /* Stock icon, if any */
- N_("_Deleteâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Delete a remote branch"), /* Tooltip */
- G_CALLBACK (on_menu_git_delete_remote) /* action callback */
- },
- {
- "ActionMenuGitTags", /* Action name */
- NULL, /* Stock icon, if any */
- N_("Tags"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitCreateTag", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Create tagâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Create a tag"), /* Tooltip */
- G_CALLBACK (on_menu_git_create_tag) /* action callback */
- },
- {
- "ActionGitDeleteTag", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Delete tagâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Delete tags"), /* Tooltip */
- G_CALLBACK (on_menu_git_delete_tag) /* action callback */
- },
- {
- "ActionMenuGitResetRevert", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Reset/Revert"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitReset", /* Action name */
- GTK_STOCK_REFRESH, /* Stock icon, if any */
- N_("_Reset treeâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Reset repository head to any past state"), /* Tooltip */
- G_CALLBACK (on_menu_git_reset) /* action callback */
- },
- {
- "ActionGitRevert", /* Action name */
- GTK_STOCK_UNDO, /* Stock icon, if any */
- N_("_Revert commitâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Revert a commit"), /* Tooltip */
- G_CALLBACK (on_menu_git_revert) /* action callback */
- },
- {
- "ActionMenuGitBisect", /* Action name */
- NULL, /* Stock icon, if any */
- N_("Bisect"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitBisectStart", /* Action name */
- GTK_STOCK_MEDIA_PLAY, /* Stock icon, if any */
- N_("_Startâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Start a bisect operation"), /* Tooltip */
- G_CALLBACK (on_menu_git_bisect_start) /* action callback */
- },
- {
- "ActionGitBisectReset", /* Action name */
- GTK_STOCK_REFRESH, /* Stock icon, if any */
- N_("_Reset"), /* Display label */
- NULL, /* short-cut */
- N_("Stop the bisect and bring the tree back to normal"), /* Tooltip */
- G_CALLBACK (on_menu_git_bisect_reset) /* action callback */
- },
- {
- "ActionGitBisectGood", /* Action name */
- GTK_STOCK_YES, /* Stock icon, if any */
- N_("_Good"), /* Display label */
- NULL, /* short-cut */
- N_("Mark the current head revision as good"), /* Tooltip */
- G_CALLBACK (on_menu_git_bisect_good) /* action callback */
- },
- {
- "ActionGitBisectBad", /* Action name */
- GTK_STOCK_NO, /* Stock icon, if any */
- N_("_Bad"), /* Display label */
- NULL, /* short-cut */
- N_("Mark the current head revision as bad"), /* Tooltip */
- G_CALLBACK (on_menu_git_bisect_bad) /* action callback */
- },
- {
- "ActionGitInit", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Initialize repository"), /* Display label */
- NULL, /* short-cut */
- N_("Create a new git repository or reinitialize an existing one"), /* Tooltip */
- G_CALLBACK (on_menu_git_init) /* action callback */
- },
-};
-
-static GtkActionEntry actions_log[] =
-{
- {
- "ActionGitLogCommitDiff", /* Action name */
- GTK_STOCK_ZOOM_100, /* Stock icon, if any */
- N_("_Show commit diff"), /* Display label */
- NULL, /* short-cut */
- N_("Show changes introduced by this commit"), /* Tooltip */
- G_CALLBACK (on_log_menu_git_commit_diff) /* action callback */
- },
- {
- "ActionGitLogViewRevision", /* Action name */
- GTK_STOCK_FIND, /* Stock icon, if any */
- N_("_View selected revision"), /* Display label */
- NULL, /* short-cut */
- N_("View a copy of this file at this revision"), /* Tooltip */
- G_CALLBACK (on_log_menu_git_cat_file) /* action callback */
- },
- {
- "ActionGitLogCreateBranch", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Create branchâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Create a branch with the selected revision as its head"), /* Tooltip */
- G_CALLBACK (on_log_menu_git_create_branch) /* action callback */
- },
- {
- "ActionGitLogCreateTag", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Create tagâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Create a tag at this revision"), /* Tooltip */
- G_CALLBACK (on_log_menu_git_create_tag) /* action callback */
- },
- {
- "ActionGitLogReset", /* Action name */
- GTK_STOCK_REFRESH, /* Stock icon, if any */
- N_("_Reset treeâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Reset repository head to this revision"), /* Tooltip */
- G_CALLBACK (on_log_menu_git_reset) /* action callback */
- },
- {
- "ActionGitLogRevert", /* Action name */
- GTK_STOCK_UNDO, /* Stock icon, if any */
- N_("_Revert commitâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Revert this commit"), /* Tooltip */
- G_CALLBACK (on_log_menu_git_revert) /* action callback */
- },
- {
- "ActionGitLogCherryPick", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Cherry pickâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Merge this commit into the current branch"), /* Tooltip */
- G_CALLBACK (on_log_menu_git_cherry_pick) /* action callback */
- },
- {
- "ActionMenuGitLogBisect", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Bisect"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitLogBisectGood", /* Action name */
- GTK_STOCK_YES, /* Stock icon, if any */
- N_("_Set good revision"), /* Display label */
- NULL, /* short-cut */
- N_("Mark this revision as good"), /* Tooltip */
- G_CALLBACK (on_log_menu_git_bisect_good) /* action callback */
- },
- {
- "ActionGitLogBisectBad", /* Action name */
- GTK_STOCK_NO, /* Stock icon, if any */
- N_("_Set bad revision"), /* Display label */
- NULL, /* short-cut */
- N_("Mark this revision as bad"), /* Tooltip */
- G_CALLBACK (on_log_menu_git_bisect_bad) /* action callback */
- }
-};
-
-static GtkActionEntry actions_fm[] =
-{
- {
- "ActionMenuGitFM", /* Action name */
- NULL, /* Stock icon, if any */
- N_("_Git"), /* Display label */
- NULL, /* short-cut */
- NULL, /* Tooltip */
- NULL /* action callback */
- },
- {
- "ActionGitFMLog", /* Action name */
- GTK_STOCK_ZOOM_100, /* Stock icon, if any */
- N_("_View logâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("View changes to this file or folder"), /* Tooltip */
- G_CALLBACK (on_fm_git_log) /* action callback */
- },
- {
- "ActionGitFMAdd", /* Action name */
- GTK_STOCK_ADD, /* Stock icon, if any */
- N_("_Addâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Add this file or folder to the repository"), /* Tooltip */
- G_CALLBACK (on_fm_git_add) /* action callback */
- },
- {
- "ActionGitFMRemove", /* Action name */
- GTK_STOCK_REMOVE, /* Stock icon, if any */
- N_("_Removeâ?¦"), /* Display label */
- NULL, /* short-cut */
- N_("Remove this file or folder from the repository"), /* Tooltip */
- G_CALLBACK (on_fm_git_remove) /* action callback */
- }
-};
-
static void
on_project_root_added (AnjutaPlugin *plugin, const gchar *name,
const GValue *value, gpointer user_data)
@@ -610,8 +31,6 @@ on_project_root_added (AnjutaPlugin *plugin, const gchar *name,
Git *git_plugin;
gchar *project_root_uri;
GFile *file;
- AnjutaUI *ui;
- GtkAction *git_fm_menu_action;
git_plugin = ANJUTA_PLUGIN_GIT (plugin);
@@ -621,33 +40,13 @@ on_project_root_added (AnjutaPlugin *plugin, const gchar *name,
git_plugin->project_root_directory = g_file_get_path (file);
g_object_unref (file);
- ui = anjuta_shell_get_ui (plugin->shell, NULL);
- git_fm_menu_action = anjuta_ui_get_action (ui,
- "ActionGroupGitFM",
- "ActionMenuGitFM");
-
- g_object_set (git_plugin->git_menu_actions, "sensitive", TRUE, NULL);
- gtk_action_set_sensitive (git_fm_menu_action, TRUE);
- gtk_widget_set_sensitive (git_plugin->log_viewer, TRUE);
- gtk_widget_set_sensitive (git_plugin->stash_widget, TRUE);
- gtk_widget_set_sensitive (git_plugin->stash_widget_grip, TRUE);
-
g_free (project_root_uri);
-
- git_plugin->bisect_file_monitor = bisect_menus_init (git_plugin);
- git_plugin->log_branch_refresh_monitor = git_log_setup_branch_refresh_monitor (git_plugin);
- git_plugin->log_refresh_monitor = git_log_setup_log_refresh_monitor (git_plugin);
- git_plugin->stash_refresh_monitor = git_stash_widget_setup_refresh_monitor (git_plugin);
- git_log_refresh_branches (git_plugin);
- git_stash_widget_refresh (git_plugin);
}
static void
on_project_root_removed (AnjutaPlugin *plugin, const gchar *name,
gpointer user_data)
{
- AnjutaUI *ui;
- GtkAction *git_fm_menu_action;
Git *git_plugin;
AnjutaStatus *status;
@@ -656,32 +55,6 @@ on_project_root_removed (AnjutaPlugin *plugin, const gchar *name,
g_free (git_plugin->project_root_directory);
git_plugin->project_root_directory = NULL;
-
- ui = anjuta_shell_get_ui (plugin->shell, NULL);
-
- git_fm_menu_action = anjuta_ui_get_action (ui,
- "ActionGroupGitFM",
- "ActionMenuGitFM");
-
- g_object_set (git_plugin->git_menu_actions, "sensitive", FALSE, NULL);
- gtk_action_set_sensitive (git_fm_menu_action, FALSE);
- gtk_widget_set_sensitive (git_plugin->log_viewer, FALSE);
- gtk_widget_set_sensitive (git_plugin->stash_widget, FALSE);
- gtk_widget_set_sensitive (git_plugin->stash_widget_grip, FALSE);
-
- git_log_window_clear (git_plugin);
- git_stash_widget_clear (git_plugin);
- anjuta_status_set_default (status, _("Branch"), NULL);
-
- g_file_monitor_cancel (git_plugin->bisect_file_monitor);
- g_file_monitor_cancel (git_plugin->log_branch_refresh_monitor);
- g_file_monitor_cancel (git_plugin->log_refresh_monitor);
- g_file_monitor_cancel (git_plugin->stash_refresh_monitor);
-
- g_object_unref (git_plugin->bisect_file_monitor);
- g_object_unref (git_plugin->log_branch_refresh_monitor);
- g_object_unref (git_plugin->log_refresh_monitor);
- g_object_unref (git_plugin->stash_refresh_monitor);
}
static void
@@ -722,97 +95,14 @@ on_editor_removed (AnjutaPlugin *plugin, const gchar *name, gpointer user_data)
git_plugin->current_editor_filename = NULL;
}
-static void
-on_fm_file_added (AnjutaPlugin *plugin, const char *name,
- const GValue *value, gpointer data)
-{
- Git *git_plugin;
- GFile *file;
-
- git_plugin = ANJUTA_PLUGIN_GIT (plugin);
-
- g_free (git_plugin->current_fm_filename);
-
- file = G_FILE (g_value_get_object (value));
- git_plugin->current_fm_filename = g_file_get_path (file);
-}
-
-static void
-on_fm_file_removed (AnjutaPlugin *plugin, const char *name, gpointer data)
-{
- Git *git_plugin;
-
- git_plugin = ANJUTA_PLUGIN_GIT (plugin);
-
- g_free (git_plugin->current_fm_filename);
- git_plugin->current_fm_filename = NULL;
-}
-
static gboolean
git_activate_plugin (AnjutaPlugin *plugin)
{
- AnjutaUI *ui;
Git *git_plugin;
- GtkAction *git_fm_menu_action;
DEBUG_PRINT ("%s", "Git: Activating Git plugin â?¦");
git_plugin = ANJUTA_PLUGIN_GIT (plugin);
- ui = anjuta_shell_get_ui (plugin->shell, NULL);
-
- /* Add all our actions */
- git_plugin->git_top_actions = anjuta_ui_add_action_group_entries (ui,
- "ActionGroupGitToplevelMenu",
- _("Top level git menu item"),
- &action_git_menu_toplevel,
- 1,
- GETTEXT_PACKAGE,
- TRUE,
- plugin);
- git_plugin->git_menu_actions = anjuta_ui_add_action_group_entries (ui,
- "ActionGroupGit",
- _("Git operations"),
- actions_git,
- G_N_ELEMENTS (actions_git),
- GETTEXT_PACKAGE, TRUE, plugin);
- git_plugin->git_log_actions = anjuta_ui_add_action_group_entries (ui, "ActionGroupGitLog",
- _("Git log operations"),
- actions_log,
- G_N_ELEMENTS (actions_log),
- GETTEXT_PACKAGE, TRUE, plugin);
- git_plugin->git_fm_actions = anjuta_ui_add_action_group_entries (ui, "ActionGroupGitFM",
- _("Git FM operations"),
- actions_fm,
- G_N_ELEMENTS (actions_fm),
- GETTEXT_PACKAGE, TRUE, plugin);
-
- git_plugin->uiid = anjuta_ui_merge (ui, UI_FILE);
-
- git_plugin->log_popup_menu = gtk_ui_manager_get_widget (GTK_UI_MANAGER (ui),
- "/PopupLog");
-
- /* Log viewer */
- git_plugin->log_viewer = git_log_window_create (git_plugin);
- anjuta_shell_add_widget (plugin->shell,
- git_plugin->log_viewer,
- "GitLogViewer",
- _("Git Log"),
- GTK_STOCK_ZOOM_100,
- ANJUTA_SHELL_PLACEMENT_CENTER,
- NULL);
- g_object_unref (git_plugin->log_viewer);
-
- /* Stash widget */
- git_stash_widget_create (git_plugin, &git_plugin->stash_widget,
- &git_plugin->stash_widget_grip);
- anjuta_shell_add_widget_custom (plugin->shell,
- git_plugin->stash_widget,
- "GitStashWidget",
- _("Stash"),
- GTK_STOCK_SAVE,
- git_plugin->stash_widget_grip,
- ANJUTA_SHELL_PLACEMENT_LEFT,
- NULL);
/* Add watches */
git_plugin->project_root_watch_id = anjuta_plugin_add_watch (plugin,
@@ -827,26 +117,14 @@ git_activate_plugin (AnjutaPlugin *plugin)
on_editor_removed,
NULL);
- git_plugin->fm_watch_id = anjuta_plugin_add_watch (plugin,
- IANJUTA_FILE_MANAGER_SELECTED_FILE,
- on_fm_file_added,
- on_fm_file_removed,
- NULL);
-
/* Git needs a working directory to work with; it can't take full paths,
* so make sure that Git can't be used if there's no project opened. */
- git_fm_menu_action = anjuta_ui_get_action (anjuta_shell_get_ui (plugin->shell,
- NULL),
- "ActionGroupGitFM",
- "ActionMenuGitFM");
if (!git_plugin->project_root_directory)
{
- g_object_set (git_plugin->git_menu_actions, "sensitive", FALSE, NULL);
- gtk_action_set_sensitive (git_fm_menu_action, FALSE);
- gtk_widget_set_sensitive (git_plugin->log_viewer, FALSE);
+ /* Disable the dock and command bar when they're put in */
}
return TRUE;
@@ -855,7 +133,6 @@ git_activate_plugin (AnjutaPlugin *plugin)
static gboolean
git_deactivate_plugin (AnjutaPlugin *plugin)
{
- AnjutaUI *ui = anjuta_shell_get_ui (plugin->shell, NULL);
Git *git_plugin;
AnjutaStatus *status;
@@ -863,29 +140,14 @@ git_deactivate_plugin (AnjutaPlugin *plugin)
status = anjuta_shell_get_status (plugin->shell, NULL);
DEBUG_PRINT ("%s", "Git: Dectivating Git plugin â?¦");
-
- anjuta_status_set_default (status, _("Branch"), NULL);
- anjuta_ui_unmerge (ui, git_plugin->uiid);
anjuta_plugin_remove_watch (plugin, git_plugin->project_root_watch_id,
TRUE);
anjuta_plugin_remove_watch (plugin, git_plugin->editor_watch_id,
TRUE);
- anjuta_plugin_remove_watch (plugin, git_plugin->fm_watch_id,
- TRUE);
g_free (git_plugin->project_root_directory);
g_free (git_plugin->current_editor_filename);
- g_free (git_plugin->current_fm_filename);
-
- anjuta_ui_remove_action_group (ui, git_plugin->git_top_actions);
- anjuta_ui_remove_action_group (ui, git_plugin->git_menu_actions);
- anjuta_ui_remove_action_group (ui, git_plugin->git_log_actions);
- anjuta_ui_remove_action_group (ui, git_plugin->git_fm_actions);
-
- anjuta_shell_remove_widget (plugin->shell, git_plugin->log_viewer, NULL);
- anjuta_shell_remove_widget (plugin->shell, git_plugin->stash_widget, NULL);
- gtk_widget_destroy (git_plugin->log_popup_menu);
return TRUE;
}
@@ -913,7 +175,6 @@ static void
git_instance_init (GObject *obj)
{
Git *plugin = ANJUTA_PLUGIN_GIT (obj);
- plugin->uiid = 0;
plugin->command_queue = anjuta_command_queue_new (ANJUTA_COMMAND_QUEUE_EXECUTE_AUTOMATIC);
}
diff --git a/plugins/git/plugin.h b/plugins/git/plugin.h
index ec5dca3..bdf0800 100644
--- a/plugins/git/plugin.h
+++ b/plugins/git/plugin.h
@@ -50,34 +50,15 @@ typedef struct _GitClass GitClass;
struct _Git
{
AnjutaPlugin parent;
- gint uiid;
-
- GtkActionGroup *git_top_actions;
- GtkActionGroup *git_menu_actions;
- GtkActionGroup *git_log_actions;
- GtkActionGroup *git_fm_actions;
gchar *project_root_directory;
gchar *current_editor_filename;
- gchar *current_fm_filename;
IAnjutaMessageView *message_view;
AnjutaCommandQueue *command_queue;
/* Watches */
gint project_root_watch_id;
gint editor_watch_id;
- gint fm_watch_id;
-
- GtkWidget *log_viewer;
- GtkWidget *log_popup_menu;
- GtkWidget *stash_widget;
- GtkWidget *stash_widget_grip;
-
- /* File monitors */
- GFileMonitor *bisect_file_monitor;
- GFileMonitor *log_branch_refresh_monitor;
- GFileMonitor *log_refresh_monitor;
- GFileMonitor *stash_refresh_monitor;
};
struct _GitClass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]