Make sure to free watched file names when the plugin deactivates
[anjuta-git-plugin.git] / plugins / git / plugin.c
blob1f30d74b00f4ae7e07864084266f795dfe0884d7
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /*
3 plugin.c
4 Copyright (C) James Liggett 2008
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301 USA
22 #include "plugin.h"
23 #include "git-diff-dialog.h"
24 #include "git-commit-dialog.h"
25 #include "git-add-dialog.h"
26 #include "git-remove-dialog.h"
27 #include "git-resolve-dialog.h"
28 #include "git-merge-dialog.h"
29 #include "git-switch-dialog.h"
30 #include "git-create-branch-dialog.h"
31 #include "git-delete-branch-dialog.h"
32 #include "git-unstage-dialog.h"
33 #include "git-checkout-files-dialog.h"
34 #include "git-log-dialog.h"
35 #include "git-create-tag-dialog.h"
36 #include "git-reset-dialog.h"
37 #include "git-revert-dialog.h"
38 #include "git-fetch-dialog.h"
39 #include "git-rebase-dialog.h"
40 #include "git-bisect-dialog.h"
41 #include "git-ignore-dialog.h"
42 #include "git-add-remote-dialog.h"
43 #include "git-delete-remote-dialog.h"
44 #include "git-create-patch-series-dialog.h"
45 #include "git-pull-dialog.h"
47 #define UI_FILE PACKAGE_DATA_DIR"/ui/anjuta-git.ui"
49 static gpointer parent_class;
51 static GtkActionEntry actions_git[] =
54 "ActionMenuGit", /* Action name */
55 NULL, /* Stock icon, if any */
56 N_("_Git"), /* Display label */
57 NULL, /* short-cut */
58 NULL, /* Tooltip */
59 NULL /* action callback */
62 "ActionGitCommit", /* Action name */
63 GTK_STOCK_YES, /* Stock icon, if any */
64 N_("_Commit..."), /* Display label */
65 NULL, /* short-cut */
66 NULL, /* Tooltip */
67 G_CALLBACK (on_menu_git_commit) /* action callback */
70 "ActionGitFetch", /* Action name */
71 GTK_STOCK_CONNECT, /* Stock icon, if any */
72 N_("_Fetch"), /* Display label */
73 NULL, /* short-cut */
74 NULL, /* Tooltip */
75 G_CALLBACK (on_menu_git_fetch) /* action callback */
78 "ActionMenuGitRebase", /* Action name */
79 NULL, /* Stock icon, if any */
80 N_("_Rebase"), /* Display label */
81 NULL, /* short-cut */
82 NULL, /* Tooltip */
83 NULL /* action callback */
86 "ActionGitRebaseStart", /* Action name */
87 NULL, /* Stock icon, if any */
88 N_("_Start..."), /* Display label */
89 NULL, /* short-cut */
90 NULL, /* Tooltip */
91 G_CALLBACK (on_menu_git_rebase_start) /* action callback */
94 "ActionGitRebaseContinue", /* Action name */
95 NULL, /* Stock icon, if any */
96 N_("_Continue"), /* Display label */
97 NULL, /* short-cut */
98 NULL, /* Tooltip */
99 G_CALLBACK (on_menu_git_rebase_continue) /* action callback */
102 "ActionGitRebaseSkip", /* Action name */
103 NULL, /* Stock icon, if any */
104 N_("_Skip"), /* Display label */
105 NULL, /* short-cut */
106 NULL, /* Tooltip */
107 G_CALLBACK (on_menu_git_rebase_skip) /* action callback */
110 "ActionGitRebaseAbort", /* Action name */
111 NULL, /* Stock icon, if any */
112 N_("_Abort"), /* Display label */
113 NULL, /* short-cut */
114 NULL, /* Tooltip */
115 G_CALLBACK (on_menu_git_rebase_abort) /* action callback */
118 "ActionGitPull", /* Action name */
119 GTK_STOCK_GO_BACK, /* Stock icon, if any */
120 N_("_Pull..."), /* Display label */
121 NULL, /* short-cut */
122 NULL, /* Tooltip */
123 G_CALLBACK (on_menu_git_pull) /* action callback */
126 "ActionGitUnstageFiles", /* Action name */
127 GTK_STOCK_CANCEL, /* Stock icon, if any */
128 N_("_Unstage files..."), /* Display label */
129 NULL, /* short-cut */
130 NULL, /* Tooltip */
131 G_CALLBACK (on_menu_git_unstage) /* action callback */
134 "ActionGitCheckoutFiles", /* Action name */
135 GTK_STOCK_UNDO, /* Stock icon, if any */
136 N_("_Check out files..."), /* Display label */
137 NULL, /* short-cut */
138 NULL, /* Tooltip */
139 G_CALLBACK (on_menu_git_checkout_files) /* action callback */
142 "ActionGitResolve", /* Action name */
143 GTK_STOCK_PREFERENCES, /* Stock icon, if any */
144 N_("_Resolve conflicts..."), /* Display label */
145 NULL, /* short-cut */
146 NULL, /* Tooltip */
147 G_CALLBACK (on_menu_git_resolve) /* action callback */
150 "ActionGitCreatePatchSeries", /* Action name */
151 GTK_STOCK_DND_MULTIPLE, /* Stock icon, if any */
152 N_("Create patch series..."), /* Display label */
153 NULL, /* short-cut */
154 NULL, /* Tooltip */
155 G_CALLBACK (on_menu_git_create_patch_series) /* action callback */
158 "ActionGitReset", /* Action name */
159 GTK_STOCK_REFRESH, /* Stock icon, if any */
160 N_("_Reset tree..."), /* Display label */
161 NULL, /* short-cut */
162 NULL, /* Tooltip */
163 G_CALLBACK (on_menu_git_reset) /* action callback */
166 "ActionGitRevert", /* Action name */
167 GTK_STOCK_UNDO, /* Stock icon, if any */
168 N_("_Revert commit..."), /* Display label */
169 NULL, /* short-cut */
170 NULL, /* Tooltip */
171 G_CALLBACK (on_menu_git_revert) /* action callback */
174 "ActionMenuGitBisect", /* Action name */
175 NULL, /* Stock icon, if any */
176 N_("_Bisect"), /* Display label */
177 NULL, /* short-cut */
178 NULL, /* Tooltip */
179 NULL /* action callback */
182 "ActionGitBisectStart", /* Action name */
183 GTK_STOCK_MEDIA_PLAY, /* Stock icon, if any */
184 N_("_Start..."), /* Display label */
185 NULL, /* short-cut */
186 NULL, /* Tooltip */
187 G_CALLBACK (on_menu_git_bisect_start) /* action callback */
190 "ActionGitBisectReset", /* Action name */
191 GTK_STOCK_REFRESH, /* Stock icon, if any */
192 N_("_Reset"), /* Display label */
193 NULL, /* short-cut */
194 NULL, /* Tooltip */
195 G_CALLBACK (on_menu_git_bisect_reset) /* action callback */
198 "ActionGitBisectGood", /* Action name */
199 GTK_STOCK_YES, /* Stock icon, if any */
200 N_("_Good"), /* Display label */
201 NULL, /* short-cut */
202 NULL, /* Tooltip */
203 G_CALLBACK (on_menu_git_bisect_good) /* action callback */
206 "ActionGitBisectBad", /* Action name */
207 GTK_STOCK_NO, /* Stock icon, if any */
208 N_("_Bad"), /* Display label */
209 NULL, /* short-cut */
210 NULL, /* Tooltip */
211 G_CALLBACK (on_menu_git_bisect_bad) /* action callback */
214 "ActionGitLog", /* Action name */
215 GTK_STOCK_ZOOM_100, /* Stock icon, if any */
216 N_("_View log..."), /* Display label */
217 NULL, /* short-cut */
218 NULL, /* Tooltip */
219 G_CALLBACK (on_menu_git_log) /* action callback */
222 "ActionGitAdd", /* Action name */
223 GTK_STOCK_ADD, /* Stock icon, if any */
224 N_("_Add..."), /* Display label */
225 NULL, /* short-cut */
226 NULL, /* Tooltip */
227 G_CALLBACK (on_menu_git_add) /* action callback */
230 "ActionGitRemove", /* Action name */
231 GTK_STOCK_REMOVE, /* Stock icon, if any */
232 N_("_Remove..."), /* Display label */
233 NULL, /* short-cut */
234 NULL, /* Tooltip */
235 G_CALLBACK (on_menu_git_remove) /* action callback */
238 "ActionGitIgnore", /* Action name */
239 GTK_STOCK_DIALOG_ERROR, /* Stock icon, if any */
240 N_("_Ignore..."), /* Display label */
241 NULL, /* short-cut */
242 NULL, /* Tooltip */
243 G_CALLBACK (on_menu_git_ignore) /* action callback */
247 "ActionGitCreateBranch", /* Action name */
248 NULL, /* Stock icon, if any */
249 N_("_Create branch..."), /* Display label */
250 NULL, /* short-cut */
251 NULL, /* Tooltip */
252 G_CALLBACK (on_menu_git_create_branch) /* action callback */
255 "ActionGitDeleteBranch", /* Action name */
256 GTK_STOCK_DELETE, /* Stock icon, if any */
257 N_("_Delete branch..."), /* Display label */
258 NULL, /* short-cut */
259 NULL, /* Tooltip */
260 G_CALLBACK (on_menu_git_delete_branch) /* action callback */
263 "ActionGitSwitch", /* Action name */
264 GTK_STOCK_JUMP_TO, /* Stock icon, if any */
265 N_("_Switch to another branch..."), /* Display label */
266 NULL, /* short-cut */
267 NULL, /* Tooltip */
268 G_CALLBACK (on_menu_git_switch) /* action callback */
271 "ActionGitMerge", /* Action name */
272 GTK_STOCK_CONVERT, /* Stock icon, if any */
273 N_("_Merge..."), /* Display label */
274 NULL, /* short-cut */
275 NULL, /* Tooltip */
276 G_CALLBACK (on_menu_git_merge) /* action callback */
279 "ActionMenuGitRemoteBranches", /* Action name */
280 GTK_STOCK_NETWORK, /* Stock icon, if any */
281 N_("_Remote branches"), /* Display label */
282 NULL, /* short-cut */
283 NULL, /* Tooltip */
284 NULL /* action callback */
287 "ActionGitRemoteAdd", /* Action name */
288 GTK_STOCK_ADD, /* Stock icon, if any */
289 N_("_Add..."), /* Display label */
290 NULL, /* short-cut */
291 NULL, /* Tooltip */
292 G_CALLBACK (on_menu_git_add_remote) /* action callback */
295 "ActionGitRemoteDelete", /* Action name */
296 GTK_STOCK_DELETE, /* Stock icon, if any */
297 N_("_Delete..."), /* Display label */
298 NULL, /* short-cut */
299 NULL, /* Tooltip */
300 G_CALLBACK (on_menu_git_delete_remote) /* action callback */
303 "ActionGitCreateTag", /* Action name */
304 NULL, /* Stock icon, if any */
305 N_("_Create tag..."), /* Display label */
306 NULL, /* short-cut */
307 NULL, /* Tooltip */
308 G_CALLBACK (on_menu_git_create_tag) /* action callback */
311 "ActionGitDiffUncommitted", /* Action name */
312 GTK_STOCK_ZOOM_100, /* Stock icon, if any */
313 N_("_Diff uncommitted changes"), /* Display label */
314 NULL, /* short-cut */
315 NULL, /* Tooltip */
316 G_CALLBACK (on_menu_git_diff) /* action callback */
320 static GtkActionEntry actions_log[] =
323 "ActionGitLogCommitDiff", /* Action name */
324 GTK_STOCK_ZOOM_100, /* Stock icon, if any */
325 N_("_Show commit diff"), /* Display label */
326 NULL, /* short-cut */
327 NULL, /* Tooltip */
328 G_CALLBACK (on_log_menu_git_commit_diff) /* action callback */
331 "ActionGitLogCreateBranch", /* Action name */
332 NULL, /* Stock icon, if any */
333 N_("_Create branch..."), /* Display label */
334 NULL, /* short-cut */
335 NULL, /* Tooltip */
336 G_CALLBACK (on_log_menu_git_create_branch) /* action callback */
339 "ActionGitLogCreateTag", /* Action name */
340 NULL, /* Stock icon, if any */
341 N_("_Create tag..."), /* Display label */
342 NULL, /* short-cut */
343 NULL, /* Tooltip */
344 G_CALLBACK (on_log_menu_git_create_tag) /* action callback */
347 "ActionGitLogReset", /* Action name */
348 GTK_STOCK_REFRESH, /* Stock icon, if any */
349 N_("_Reset tree..."), /* Display label */
350 NULL, /* short-cut */
351 NULL, /* Tooltip */
352 G_CALLBACK (on_log_menu_git_reset) /* action callback */
355 "ActionGitLogRevert", /* Action name */
356 GTK_STOCK_UNDO, /* Stock icon, if any */
357 N_("_Revert commit..."), /* Display label */
358 NULL, /* short-cut */
359 NULL, /* Tooltip */
360 G_CALLBACK (on_log_menu_git_revert) /* action callback */
363 "ActionMenuGitLogBisect", /* Action name */
364 NULL, /* Stock icon, if any */
365 N_("_Bisect"), /* Display label */
366 NULL, /* short-cut */
367 NULL, /* Tooltip */
368 NULL /* action callback */
371 "ActionGitLogBisectGood", /* Action name */
372 GTK_STOCK_YES, /* Stock icon, if any */
373 N_("_Set good revision"), /* Display label */
374 NULL, /* short-cut */
375 NULL, /* Tooltip */
376 G_CALLBACK (on_log_menu_git_bisect_good) /* action callback */
379 "ActionGitLogBisectBad", /* Action name */
380 GTK_STOCK_NO, /* Stock icon, if any */
381 N_("_Set bad revision"), /* Display label */
382 NULL, /* short-cut */
383 NULL, /* Tooltip */
384 G_CALLBACK (on_log_menu_git_bisect_bad) /* action callback */
388 static GtkActionEntry actions_fm[] =
391 "ActionMenuGitFM", /* Action name */
392 NULL, /* Stock icon, if any */
393 N_("_Git"), /* Display label */
394 NULL, /* short-cut */
395 NULL, /* Tooltip */
396 NULL /* action callback */
399 "ActionGitFMLog", /* Action name */
400 GTK_STOCK_ZOOM_100, /* Stock icon, if any */
401 N_("_View log..."), /* Display label */
402 NULL, /* short-cut */
403 NULL, /* Tooltip */
404 G_CALLBACK (on_fm_git_log) /* action callback */
408 static void
409 on_project_root_added (AnjutaPlugin *plugin, const gchar *name,
410 const GValue *value, gpointer user_data)
412 Git *git_plugin;
413 gchar *project_root_uri;
414 GFile *file;
415 AnjutaUI *ui;
416 GtkAction *git_menu_action;
417 GtkAction *git_fm_menu_action;
419 git_plugin = ANJUTA_PLUGIN_GIT (plugin);
421 g_free (git_plugin->project_root_directory);
422 project_root_uri = g_value_dup_string (value);
423 file = g_file_new_for_uri (project_root_uri);
424 git_plugin->project_root_directory = g_file_get_path (file);
425 g_object_unref (file);
427 ui = anjuta_shell_get_ui (plugin->shell, NULL);
428 git_menu_action = anjuta_ui_get_action (ui,
429 "ActionGroupGit",
430 "ActionMenuGit");
431 git_fm_menu_action = anjuta_ui_get_action (ui,
432 "ActionGroupGitFM",
433 "ActionMenuGitFM");
435 gtk_action_set_sensitive (git_menu_action, TRUE);
436 gtk_action_set_sensitive (git_fm_menu_action, TRUE);
437 gtk_widget_set_sensitive (git_plugin->log_viewer, TRUE);
439 g_free (project_root_uri);
441 git_plugin->bisect_file_monitor = bisect_menus_init (git_plugin);
444 static void
445 on_project_root_removed (AnjutaPlugin *plugin, const gchar *name,
446 gpointer user_data)
448 AnjutaUI *ui;
449 GtkAction *git_menu_action;
450 GtkAction *git_fm_menu_action;
451 Git *git_plugin;
453 git_plugin = ANJUTA_PLUGIN_GIT (plugin);
455 g_free (git_plugin->project_root_directory);
456 git_plugin->project_root_directory = NULL;
458 ui = anjuta_shell_get_ui (plugin->shell, NULL);
460 git_menu_action = anjuta_ui_get_action (ui,
461 "ActionGroupGit",
462 "ActionMenuGit");
463 git_fm_menu_action = anjuta_ui_get_action (ui,
464 "ActionGroupGitFM",
465 "ActionMenuGitFM");
467 gtk_action_set_sensitive (git_menu_action, FALSE);
468 gtk_action_set_sensitive (git_fm_menu_action, FALSE);
469 gtk_widget_set_sensitive (git_plugin->log_viewer, FALSE);
470 git_log_window_clear (git_plugin);
472 g_file_monitor_cancel (git_plugin->bisect_file_monitor);
473 g_object_unref (git_plugin->bisect_file_monitor);
476 static void
477 on_editor_added (AnjutaPlugin *plugin, const gchar *name, const GValue *value,
478 gpointer user_data)
480 Git *git_plugin;
481 IAnjutaEditor *editor;
482 GFile *current_editor_file;
484 git_plugin = ANJUTA_PLUGIN_GIT (plugin);
485 editor = g_value_get_object (value);
487 g_free (git_plugin->current_editor_filename);
488 git_plugin->current_editor_filename = NULL;
490 if (IANJUTA_IS_EDITOR (editor))
492 current_editor_file = ianjuta_file_get_file (IANJUTA_FILE (editor),
493 NULL);
495 if (current_editor_file)
497 git_plugin->current_editor_filename = g_file_get_path (current_editor_file);
498 g_object_unref (current_editor_file);
503 static void
504 on_editor_removed (AnjutaPlugin *plugin, const gchar *name, gpointer user_data)
506 Git *git_plugin;
508 git_plugin = ANJUTA_PLUGIN_GIT (plugin);
510 g_free (git_plugin->current_editor_filename);
511 git_plugin->current_editor_filename = NULL;
514 static void
515 on_fm_file_added (AnjutaPlugin *plugin, const char *name,
516 const GValue *value, gpointer data)
518 Git *git_plugin;
519 GFile *file;
521 git_plugin = ANJUTA_PLUGIN_GIT (plugin);
523 g_free (git_plugin->current_fm_filename);
525 file = G_FILE (g_value_get_object (value));
526 git_plugin->current_fm_filename = g_file_get_path (file);
529 static void
530 on_fm_file_removed (AnjutaPlugin *plugin, const char *name, gpointer data)
532 Git *git_plugin;
534 git_plugin = ANJUTA_PLUGIN_GIT (plugin);
536 g_free (git_plugin->current_fm_filename);
537 git_plugin->current_fm_filename = NULL;
540 static gboolean
541 git_activate_plugin (AnjutaPlugin *plugin)
543 AnjutaUI *ui;
544 Git *git_plugin;
545 GtkAction *git_menu_action;
546 GtkAction *git_fm_menu_action;
548 DEBUG_PRINT ("Git: Activating Git plugin ...");
550 git_plugin = ANJUTA_PLUGIN_GIT (plugin);
551 ui = anjuta_shell_get_ui (plugin->shell, NULL);
553 /* Add all our actions */
554 anjuta_ui_add_action_group_entries (ui, "ActionGroupGit",
555 _("Git operations"),
556 actions_git,
557 G_N_ELEMENTS (actions_git),
558 GETTEXT_PACKAGE, TRUE, plugin);
559 anjuta_ui_add_action_group_entries (ui, "ActionGroupGitLog",
560 _("Git log operations"),
561 actions_log,
562 G_N_ELEMENTS (actions_log),
563 GETTEXT_PACKAGE, TRUE, plugin);
564 anjuta_ui_add_action_group_entries (ui, "ActionGroupGitFM",
565 _("Git FM operations"),
566 actions_fm,
567 G_N_ELEMENTS (actions_fm),
568 GETTEXT_PACKAGE, TRUE, plugin);
570 git_plugin->uiid = anjuta_ui_merge (ui, UI_FILE);
572 git_plugin->log_popup_menu = gtk_ui_manager_get_widget (GTK_UI_MANAGER (ui),
573 "/PopupLog");
575 /* Add watches */
576 git_plugin->project_root_watch_id = anjuta_plugin_add_watch (plugin,
577 IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI,
578 on_project_root_added,
579 on_project_root_removed,
580 NULL);
582 git_plugin->editor_watch_id = anjuta_plugin_add_watch (plugin,
583 IANJUTA_DOCUMENT_MANAGER_CURRENT_DOCUMENT,
584 on_editor_added,
585 on_editor_removed,
586 NULL);
588 git_plugin->fm_watch_id = anjuta_plugin_add_watch (plugin,
589 IANJUTA_FILE_MANAGER_SELECTED_FILE,
590 on_fm_file_added,
591 on_fm_file_removed,
592 NULL);
594 /* Log viewer */
595 git_plugin->log_viewer = git_log_window_create (git_plugin);
596 anjuta_shell_add_widget (plugin->shell,
597 git_plugin->log_viewer,
598 "GitLogViewer",
599 _("Git Log"),
600 GTK_STOCK_ZOOM_100,
601 ANJUTA_SHELL_PLACEMENT_CENTER,
602 NULL);
603 g_object_unref (git_plugin->log_viewer);
607 /* Git needs a working directory to work with; it can't take full paths,
608 * so make sure that Git can't be used if there's no project opened. */
609 git_menu_action = anjuta_ui_get_action (anjuta_shell_get_ui (plugin->shell,
610 NULL),
611 "ActionGroupGit",
612 "ActionMenuGit");
613 git_fm_menu_action = anjuta_ui_get_action (anjuta_shell_get_ui (plugin->shell,
614 NULL),
615 "ActionGroupGitFM",
616 "ActionMenuGitFM");
618 if (!git_plugin->project_root_directory)
620 gtk_action_set_sensitive (git_menu_action, FALSE);
621 gtk_action_set_sensitive (git_fm_menu_action, FALSE);
622 gtk_widget_set_sensitive (git_plugin->log_viewer, FALSE);
625 return TRUE;
628 static gboolean
629 git_deactivate_plugin (AnjutaPlugin *plugin)
631 AnjutaUI *ui = anjuta_shell_get_ui (plugin->shell, NULL);
632 Git *git_plugin;
634 git_plugin = ANJUTA_PLUGIN_GIT (plugin);
636 DEBUG_PRINT ("Git: Dectivating Git plugin ...");
637 anjuta_ui_unmerge (ui, git_plugin->uiid);
638 anjuta_plugin_remove_watch (plugin, git_plugin->project_root_watch_id,
639 TRUE);
640 anjuta_plugin_remove_watch (plugin, git_plugin->editor_watch_id,
641 TRUE);
642 anjuta_plugin_remove_watch (plugin, git_plugin->fm_watch_id,
643 TRUE);
645 g_free (git_plugin->project_root_directory);
646 g_free (git_plugin->current_editor_filename);
647 g_free (git_plugin->current_fm_filename);
649 anjuta_shell_remove_widget (plugin->shell, git_plugin->log_viewer, NULL);
650 gtk_widget_destroy (git_plugin->log_popup_menu);
652 return TRUE;
655 static void
656 git_finalize (GObject *obj)
658 /* Finalization codes here */
659 G_OBJECT_CLASS (parent_class)->finalize (obj);
662 static void
663 git_dispose (GObject *obj)
665 /* Disposition codes */
666 G_OBJECT_CLASS (parent_class)->dispose (obj);
669 static void
670 git_instance_init (GObject *obj)
672 Git *plugin = ANJUTA_PLUGIN_GIT (obj);
673 plugin->uiid = 0;
676 static void
677 git_class_init (GObjectClass *klass)
679 AnjutaPluginClass *plugin_class = ANJUTA_PLUGIN_CLASS (klass);
681 parent_class = g_type_class_peek_parent (klass);
683 plugin_class->activate = git_activate_plugin;
684 plugin_class->deactivate = git_deactivate_plugin;
685 klass->finalize = git_finalize;
686 klass->dispose = git_dispose;
689 ANJUTA_PLUGIN_BOILERPLATE (Git, git);
690 ANJUTA_SIMPLE_PLUGIN (Git, git);