Changeset 2020


Ignore:
Timestamp:
05/18/07 18:42:12 (6 years ago)
Author:
thomas
Message:

Patch by: Neil J Patel <njp@…>

  • src/contacts-callbacks-ui.c: (contacts_delete_cb):
  • src/contacts-history.c: (contacts_history_refresh_ui):
  • Replaces GtkDialog? with MokoMessageDialog?.
  • Shows 'No communication history', when there is no communication history.
Location:
trunk/src/target/OM-2007/applications/openmoko-contacts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog

    r2014 r2020  
     12007-05-18  Thomas Wood  <thomas@openedhand.com> 
     2 
     3        Patch by: Neil J Patel <njp@o-hand.com> 
     4 
     5        * src/contacts-callbacks-ui.c: (contacts_delete_cb): 
     6        * src/contacts-history.c: (contacts_history_refresh_ui): 
     7        - Replaces GtkDialog with MokoMessageDialog. 
     8        - Shows 'No communication history', when there is no 
     9          communication history. 
     10 
     11 
     12 
    1132007-05-18  Thomas Wood  <thomas@openedhand.com> 
    214 
  • trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ui.c

    r2014 r2020  
    3535#include "contacts-main.h" 
    3636#include "contacts-history-view.h" 
     37#include "contacts-omoko.h" 
    3738 
    3839void 
     
    196197        gint result, count_selected; 
    197198        EContact *contact; 
    198         GList *widgets, *selected_paths, *current_path; 
     199        GList *selected_paths, *current_path; 
    199200        GList *contact_list = NULL; 
    200201        const gchar *name; 
     
    242243 
    243244        main_window = data->ui->main_window; 
    244         dialog = gtk_message_dialog_new (GTK_WINDOW (main_window), 
    245                                          0, GTK_MESSAGE_QUESTION, 
    246                                          GTK_BUTTONS_CANCEL, 
    247                                          message); 
    248         gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_DELETE, 
    249                 GTK_RESPONSE_YES, NULL); 
    250  
    251         widgets = contacts_set_widgets_desensitive (main_window); 
     245        main_window = data->ui->main_window; 
     246        dialog = moko_message_dialog_new (); 
     247         
     248        moko_message_dialog_set_message (MOKO_MESSAGE_DIALOG (dialog), 
     249                                         "%s", message); 
     250        moko_message_dialog_set_image_from_stock (MOKO_MESSAGE_DIALOG (dialog), 
     251                                                  GTK_STOCK_DIALOG_QUESTION); 
     252         
     253        gtk_dialog_add_buttons (GTK_DIALOG (dialog),  
     254                                GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,   
     255                                GTK_STOCK_DELETE, GTK_RESPONSE_YES, 
     256                                NULL); 
     257 
    252258        result = gtk_dialog_run (GTK_DIALOG (dialog)); 
    253259        switch (result) { 
     
    262268        g_list_free (contact_list); 
    263269        gtk_widget_destroy (dialog); 
    264         contacts_set_widgets_sensitive (widgets); 
    265         g_list_free (widgets); 
    266270} 
    267271 
  • trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-history.c

    r2018 r2020  
    492492     FIXME : MokoJournal should have a special function for this.  
    493493  */ 
    494   g_print ("%s\n", priv->uid); 
    495494  gint len = moko_journal_get_nb_entries (priv->journal); 
    496495  gint i; 
     
    508507  children = g_list_sort (children, (GCompareFunc)_sort_by_date); 
    509508   
     509  if (!children) { 
     510    GtkWidget *label = gtk_label_new ("No communication history"); 
     511    gtk_box_pack_start (GTK_BOX (history), label, TRUE, TRUE, 0); 
     512    gtk_widget_show_all (GTK_WIDGET (history)); 
     513    return; 
     514  } 
     515     
    510516  /* Finally, go through the sorted list creating the widgets and adding them */ 
    511517  for (c = children; c != NULL; c = c->next) { 
Note: See TracChangeset for help on using the changeset viewer.