1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 * Copyright (C) James Liggett 2008 <jrliggett@cox.net>
6 * anjuta is free software.
8 * You may redistribute it and/or modify it under the terms of the
9 * GNU General Public License, as published by the Free Software
10 * Foundation; either version 2 of the License, or (at your option)
13 * anjuta is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 * See the GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with anjuta. If not, write to:
20 * The Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor
22 * Boston, MA 02110-1301, USA.
25 #include "git-fetch-dialog.h"
27 /* FIXME: We don't really have a dialog yet. We would probably need one to
28 * support some advanced options of fetch, though. Make the dialog when we
32 on_fetch_command_finished (AnjutaCommand
*command
, guint return_code
,
37 status
= anjuta_shell_get_status (ANJUTA_PLUGIN (plugin
)->shell
,
40 anjuta_status (status
, _("Git: Fetch complete."), 5);
42 git_report_errors (command
, return_code
);
44 g_object_unref (command
);
49 git_fetch (Git
*plugin
)
51 GitProgressData
*data
;
52 GitFetchCommand
*fetch_command
;
54 data
= git_progress_data_new (plugin
, _("Git: Fetching..."));
55 fetch_command
= git_fetch_command_new (plugin
->project_root_directory
);
57 g_signal_connect (G_OBJECT (fetch_command
), "data-arrived",
58 G_CALLBACK (on_git_command_info_arrived
),
61 g_signal_connect (G_OBJECT (fetch_command
), "command-finished",
62 G_CALLBACK (on_fetch_command_finished
),
65 g_signal_connect_swapped (G_OBJECT (fetch_command
), "command-finished",
66 G_CALLBACK (git_progress_data_free
),
69 g_signal_connect (G_OBJECT (fetch_command
), "progress",
70 G_CALLBACK (on_git_command_progress
),
73 git_create_message_view (plugin
);
75 anjuta_command_start (ANJUTA_COMMAND (fetch_command
));
80 on_menu_git_fetch (GtkAction
*action
, Git
*plugin
)