Changeset 48

Show
Ignore:
Timestamp:
11/07/07 23:00:16
Author:
pvanhoof
Message:
        • Copying folders in their own folder store, under a new name
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r47 r48  
    55        * The date-to-string function now takes into account today, and 
    66        displays just the time if we're trying to display a date/time of today. 
     7        * Copying folders in their own folder store, under a new name 
    78 
    892007-11-05  Philip Van Hoof  <pvanhoof@gnome.org> 
  • trunk/src/tmut-menu-view.c

    r41 r48  
    109109        if (into)  
    110110        { 
    111                 if (into != (TnyFolderStore *) info->from) 
     111                GtkWidget *dialog, *entry; 
     112                gint result; 
     113 
     114                dialog = gtk_dialog_new_with_buttons (_("Name target folder"), 
     115                                GTK_WINDOW (priv->shell), 
     116                                GTK_DIALOG_MODAL, 
     117                                GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, 
     118                                GTK_STOCK_CANCEL,GTK_RESPONSE_REJECT, 
     119                                NULL); 
     120                entry = gtk_entry_new (); 
     121                gtk_entry_set_text (GTK_ENTRY (entry), tny_folder_get_name (info->from)); 
     122                gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), entry); 
     123                gtk_widget_show (entry); 
     124 
     125                if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)  
     126                { 
     127 
     128                        const gchar *new_name = gtk_entry_get_text (GTK_ENTRY (entry)); 
     129 
    112130                        tny_folder_copy_async (info->from, into,  
    113                                 tny_folder_get_name (info->from),  
    114                                 info->del_originals, on_copy_done,  
     131                                new_name, info->del_originals, on_copy_done,  
    115132                                status_update, 
    116133                                g_object_ref (info->self)); 
     134                } 
     135 
     136                if (dialog) 
     137                        gtk_widget_destroy (dialog); 
    117138 
    118139                g_object_unref (into); 
  • trunk/src/tmut-msg-creator.c

    r47 r48  
    8181        } 
    8282 
    83  
    8483        g_object_unref (info->send_queue); 
    8584        g_object_unref (info->header); 
     
    172171                        TnyIterator *iter = tny_list_create_iterator (priv->attachments); 
    173172 
    174  
    175173                        tny_header_set_subject (header, gtk_entry_get_text (priv->subject_entry)); 
    176174                        tny_header_set_from (header, tny_account_get_name (account)); 
     
    213211                          "an account that is suitable for sending first.")); 
    214212                gtk_widget_show_all (dialog); 
    215         } 
     213        } else 
     214                tmut_shell_window_back (priv->shell); 
    216215 
    217216        return;