~ubuntu-branches/ubuntu/trusty/anjuta/trusty

« back to all changes in this revision

Viewing changes to plugins/git/git-unstage-pane.c

  • Committer: Package Import Robot
  • Author(s): Steve Ovens
  • Date: 2014-01-03 21:06:06 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20140103210606-pmvzhu0s68qy6261
Tags: 2:3.10.2-0ubuntu1
* New upstream release (LP: #1266037)
- Updated Build-Depends of libgtk-3-dev (>= 3.6.0),
  libglib2.0-dev (>= 2.34.0)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
        GList *paths;
26
26
        GitResetFilesCommand *reset_command;
27
27
 
28
 
        paths = git_status_pane_get_selected_commit_items (GIT_STATUS_PANE (plugin->status_pane),
29
 
                                                           ANJUTA_VCS_STATUS_ALL);
 
28
        paths = git_status_pane_get_checked_commit_items (GIT_STATUS_PANE (plugin->status_pane),
 
29
                                                          ANJUTA_VCS_STATUS_ALL);
30
30
 
31
31
        if (paths)
32
32
        {
50
50
        else
51
51
                anjuta_util_dialog_error (NULL, _("No staged files selected."));
52
52
}
 
53
 
 
54
void
 
55
on_git_status_unstage_activated (GtkAction *action, Git *plugin)
 
56
{
 
57
        gchar *path;
 
58
        GList *paths;
 
59
        GitResetFilesCommand *reset_command;
 
60
 
 
61
        path = git_status_pane_get_selected_commit_path (GIT_STATUS_PANE (plugin->status_pane));
 
62
 
 
63
        if (path)
 
64
        {
 
65
                paths = g_list_append (NULL, path);
 
66
 
 
67
                reset_command = git_reset_files_command_new (plugin->project_root_directory,
 
68
                                                             GIT_RESET_FILES_HEAD,
 
69
                                                             paths);
 
70
 
 
71
                g_signal_connect (G_OBJECT (reset_command), "command-finished",
 
72
                                  G_CALLBACK (git_pane_report_errors),
 
73
                                  plugin);
 
74
 
 
75
                g_signal_connect (G_OBJECT (reset_command), "command-finished",
 
76
                                  G_CALLBACK (g_object_unref),
 
77
                                  NULL);
 
78
 
 
79
                anjuta_util_glist_strings_free (paths);
 
80
 
 
81
                anjuta_command_start (ANJUTA_COMMAND (reset_command));
 
82
        }
 
83
}
53
84
 
 
 
b'\\ No newline at end of file'