~ubuntu-branches/ubuntu/vivid/gitg/vivid

« back to all changes in this revision

Viewing changes to gitg/gitg-repository.c

  • Committer: Bazaar Package Importer
  • Author(s): Jonny Lamb
  • Date: 2009-04-09 00:44:07 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090409004407-xl4cwh7yk5tfbiq4
Tags: 0.0.2-1
* New upstream release. (Closes: #522919)
  + Timestamp to date string conversion is now valid UTF-8. (Closes: #518705)
  + Fixes to async task cancellation. (Closes: #520922)
* debian/control: Changed Section to vcs.
* debian/patches/:
  + 0001-Change-Categories-to-Development-RevisionControl.patch: Added
    to change Categories to Development;RevisionControl. (Closes: 520887)
  + 0001-Terminate-gtk_text_buffer_create_tag-s-arguments-wit.patch: Removed
    as applied upstream.
  + 0002-Initial-patch-to-show-tags-referenced-from-tag-objec.patch: Added
    to show tags referenced from tag objects. (Closes: #521062)
* debian/watch: Added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
        return gtk_tree_path_new_from_indices(GPOINTER_TO_INT(iter->user_data), -1);
164
164
}
165
165
 
166
 
static gchar *
167
 
timestamp_to_str(guint64 timestamp)
168
 
{
169
 
        time_t t = timestamp;
170
 
 
171
 
        struct tm *tms = localtime(&t);
172
 
        char buf[255];
173
 
        
174
 
        strftime(buf, 255, "%c", tms);
175
 
        return g_strdup(buf);
176
 
}
177
 
 
178
166
static void 
179
167
tree_model_get_value(GtkTreeModel *tree_model, GtkTreeIter *iter, gint column, GValue *value)
180
168
{
203
191
                        g_value_set_string(value, gitg_revision_get_author(rv));
204
192
                break;
205
193
                case DATE_COLUMN:
206
 
                        g_value_take_string(value, timestamp_to_str(gitg_revision_get_timestamp(rv)));
 
194
                        g_value_take_string(value, gitg_utils_timestamp_to_str(gitg_revision_get_timestamp(rv)));
207
195
                break;
208
196
                default:
209
197
                        g_assert_not_reached();
762
750
                {
763
751
                        GitgRef *ref = add_ref(self, components[1], components[0]);
764
752
                        
765
 
                        if (strncmp(components[1], current, strlen(current)) == 0)
 
753
                        if (current != NULL && strncmp(components[1], current, strlen(current)) == 0)
766
754
                                self->priv->current_ref = gitg_ref_copy(ref);
767
755
                }
768
756