~ubuntu-branches/debian/squeeze/tasks/squeeze

« back to all changes in this revision

Viewing changes to libkoto/koto-task-store.c

  • Committer: Bazaar Package Importer
  • Author(s): Ross Burton, Ross Burton, Loïc Minier, Emilio Pozuelo Monfort
  • Date: 2009-08-10 10:08:52 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090810100852-6gp4pydhwflg4vnb
Tags: 0.16-1
[ Ross Burton ]
* New upstream release (Closes: #539510)
* Fix debug package section and depends
* Bump Standards

[ Loïc Minier ]
* Set LDFLAGS directly; bump cdbs bdep to >= 0.4.41.
* Create tasks.pot during build: Add a common-build-arch:: snippet to call
  langpack.mk's langpack-mk-update-pot target with
  DEB_BUILDDIR=$(DEB_SRCDIR); intltool-update can't be called in builddir as
  it needs POTFILES.in and even with it wont lookup files listed there in
  srcdir; add a clean:: snippet to remove the pot file; LP: #188690.

[ Emilio Pozuelo Monfort ]
* Wrap build-deps and deps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
    res = done_a < done_b ? -1 : 1;
79
79
    goto done;
80
80
  }
81
 
  
 
81
 
82
82
  if (weight_a != weight_b) {
83
83
    res = weight_a < weight_b ? -1 : 1;
84
84
    goto done;
85
85
  }
86
 
  
 
86
 
87
87
  res = g_utf8_collate (summary_a ?: "", summary_b ?: "");
88
 
  
 
88
 
89
89
 done:
90
90
  g_free (summary_a);
91
91
  g_free (summary_b);
144
144
  g_assert (KOTO_IS_TASK_STORE (store));
145
145
  g_assert (ical);
146
146
  g_assert (iter);
147
 
  
 
147
 
148
148
  status = icalcomponent_get_status (ical);
149
149
  due_time = icalcomponent_get_due (ical);
150
150
  if (!icaltime_is_null_time (due_time)) {
153
153
                       icaltime_as_timet_with_zone (due_time,
154
154
                                                    icaltimezone_get_utc_timezone ()));
155
155
  }
156
 
  
 
156
 
157
157
  task = koto_task_new (icalcomponent_new_clone (ical));
158
158
 
159
159
  if (insert) {
177
177
                        COLUMN_URL, ical_util_get_url (ical),
178
178
                        -1);
179
179
  }
180
 
  
 
180
 
181
181
  if (due_date)
182
182
    g_date_free (due_date);
183
183
  koto_task_unref (task);
202
202
    g_hash_table_insert (priv->uid_hash,
203
203
                         g_strdup (icalcomponent_get_uid (ical)),
204
204
                         gtk_tree_iter_copy (&iter));
205
 
    
 
205
 
206
206
  }
207
207
}
208
208
 
314
314
  KotoTaskStorePrivate *priv = GET_PRIVATE (object);
315
315
 
316
316
  g_hash_table_destroy (priv->uid_hash);
317
 
  
 
317
 
318
318
  G_OBJECT_CLASS (koto_task_store_parent_class)->finalize (object);
319
319
}
320
320
 
402
402
    if (priv->sig_done)
403
403
      g_signal_handler_disconnect (priv->view, priv->sig_done);
404
404
    priv->sig_added = priv->sig_modified = priv->sig_removed = priv->sig_done = 0;
405
 
    
 
405
 
406
406
    g_object_unref (priv->view);
407
407
    g_object_unref (priv->cal);
408
408
    priv->view = NULL;
409
409
    priv->cal = NULL;
410
410
  }
411
 
  
 
411
 
412
412
  if (view) {
413
413
    priv->view = g_object_ref (view);
414
414
    priv->cal = g_object_get_data (G_OBJECT (view), "koto-ecal");
432
432
  g_return_if_fail (iter);
433
433
 
434
434
  priv = GET_PRIVATE (store);
435
 
  
 
435
 
436
436
  gtk_tree_model_get (GTK_TREE_MODEL (store), iter, COLUMN_TASK, &task, -1);
437
 
  
 
437
 
438
438
  old_comp = icalcomponent_new_clone (task->comp);
439
 
  
 
439
 
440
440
  icalcomponent_set_status (task->comp, done ? ICAL_STATUS_COMPLETED : ICAL_STATUS_NONE);
441
 
  
 
441
 
442
442
  gtk_list_store_set (GTK_LIST_STORE (store), iter, COLUMN_DONE, done, -1);
443
443
 
444
444
  koto_action_modify_task (priv->cal, task, old_comp, undo);