~ubuntu-branches/ubuntu/utopic/anjuta/utopic-proposed

« back to all changes in this revision

Viewing changes to plugins/git/git-status.c

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson, Jackson Doak
  • Date: 2014-07-12 15:17:39 UTC
  • mfrom: (1.4.14)
  • Revision ID: package-import@ubuntu.com-20140712151739-p9xy0ntlgbpm2nxq
Tags: 2:3.12.0-1
* Team upload.

[ Jackson Doak ]
* New upstream release
* Drop 03_valac_0.22.patch, fixed upstream\
* debian/control:
  - Bump b-dep version on libgtk-3-dev (>= 3.6.0), libglib2.0-dev (>= 2.34.0)
  - Bump stardards-version to 3.9.5. No changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
struct _GitStatusPriv
28
28
{
29
29
        gchar *path;
30
 
        AnjutaVcsStatus status;
 
30
        AnjutaVcsStatus index_status;
 
31
        AnjutaVcsStatus working_tree_status;
31
32
};
32
33
 
33
34
G_DEFINE_TYPE (GitStatus, git_status, G_TYPE_OBJECT);
60
61
}
61
62
 
62
63
GitStatus *
63
 
git_status_new (const gchar *path, AnjutaVcsStatus status)
 
64
git_status_new (const gchar *path, AnjutaVcsStatus index_status,
 
65
                AnjutaVcsStatus working_tree_status)
64
66
{
65
67
        GitStatus *self;
66
68
        
67
69
        self = g_object_new (GIT_TYPE_STATUS, NULL);
68
70
        
69
71
        self->priv->path = g_strdup (path);
70
 
        self->priv->status = status;
 
72
        self->priv->index_status = index_status;
 
73
        self->priv->working_tree_status = working_tree_status;
71
74
        
72
75
        return self;
73
76
}
79
82
}
80
83
 
81
84
AnjutaVcsStatus
 
85
git_status_get_index_status (GitStatus *self)
 
86
{
 
87
        return self->priv->index_status;
 
88
}
 
89
 
 
90
AnjutaVcsStatus
 
91
git_status_get_working_tree_status (GitStatus *self)
 
92
{
 
93
        return self->priv->working_tree_status;
 
94
}
 
95
 
 
96
AnjutaVcsStatus
82
97
git_status_get_vcs_status (GitStatus *self)
83
98
{
84
 
        return self->priv->status;
 
99
        /* Favor the index status over the working tree */
 
100
        return self->priv->index_status == 0 ? self->priv->working_tree_status :
 
101
                   self->priv->index_status;
85
102
}
86
103