Changeset 3658
- Timestamp:
- 12/17/07 13:11:35 (5 years ago)
- Location:
- trunk/src/target/OM-2007.2/applications/openmoko-messages2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
r3653 r3658 1 2007-12-17 Chris Lord <chris@openedhand.com> 2 3 * src/sms-contacts.c: (delete_all_added_cb), 4 (delete_all_progress_cb), (delete_all_clicked_cb): 5 Implement delete-all functionality in the contacts view 6 7 * src/sms.h: 8 Remove unused variable 9 1 10 2007-12-14 Chris Lord <chris@openedhand.com> 2 11 -
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-contacts.c
r3653 r3658 254 254 255 255 static void 256 delete_all_added_cb (JanaStoreView *store_view, GList *components, 257 SmsData *data) 258 { 259 for (; components; components = components->next) { 260 JanaComponent *comp = JANA_COMPONENT (components->data); 261 jana_store_remove_component ( 262 jana_store_view_get_store (store_view), comp); 263 } 264 } 265 266 static void 267 delete_all_progress_cb (JanaStoreView *store_view, gint percent, 268 SmsData *data) 269 { 270 if (percent == 100) g_object_unref (store_view); 271 } 272 273 static void 256 274 delete_all_clicked_cb (GtkToolButton *button, SmsData *data) 257 275 { 276 JanaStoreView *notes_view; 277 GtkWidget *dialog; 278 gint response; 279 258 280 if (hidden) return; 281 282 dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (data->window), 283 GTK_DIALOG_MODAL, 284 GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, 285 "Delete <b>all</b> messages?"); 286 gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, 287 GTK_RESPONSE_CANCEL, GTK_STOCK_DELETE, GTK_RESPONSE_YES, NULL); 288 289 response = gtk_dialog_run (GTK_DIALOG (dialog)); 290 gtk_widget_destroy (dialog); 291 if (response != GTK_RESPONSE_YES) return; 292 293 /* Delete all messages */ 294 notes_view = jana_store_get_view (data->notes); 295 g_signal_connect (notes_view, "added", 296 G_CALLBACK (delete_all_added_cb), data); 297 g_signal_connect (notes_view, "progress", 298 G_CALLBACK (delete_all_progress_cb), data); 299 jana_store_view_start (notes_view); 259 300 } 260 301 -
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms.h
r3650 r3658 36 36 typedef struct { 37 37 JanaStore *notes; 38 JanaStoreView *notes_view;39 38 GtkTreeModel *note_store; 40 39 GtkTreeModel *note_filter;
Note: See TracChangeset
for help on using the changeset viewer.
