Re: [evolution-patches] Overwriting files warnings in save-attachments and save-calendar plugins
- From: Not Zed <notzed ximian com>
- To: Rodrigo Moya <rodrigo novell com>
- Cc: spamfrommailing freax org, patches <evolution-patches lists ximian com>, JP Rosevear <jpr novell com>
- Subject: Re: [evolution-patches] Overwriting files warnings in save-attachments and save-calendar plugins
- Date: Tue, 04 Jan 2005 11:28:57 +0800
Except it should be using e-error for all of these windows. We do/should not use gtk message dialogues at all. We also include no markup in error message strings to simplify translation.
Infact we already have a 'system' e-error for this purpose.
You simply need to do:
#include "widgets/misc/e-error.h"
if (e_error_run(parent, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, path, NULL) == GTK_RESPONSE_OK)
.. overwrite is ok ...
else
.. cancelled ...
where:
parent == the parent window, NULL if not known (it will use a system wide one if this is the case)
path == the filename
On Mon, 2005-01-03 at 13:30 +0100, Rodrigo Moya wrote:
On Mon, 2004-12-27 at 23:57 +0100, Philip Van Hoof wrote:
> Oeps
>
> Some small code-style fixes
>
>
looks good, only this:
> + if (access (save, F_OK)) {
> + GtkWidget *warning =
> + gtk_message_dialog_new_with_markup (NULL,
> + GTK_DIALOG_DESTROY_WITH_PARENT,
> + GTK_MESSAGE_WARNING,
> + GTK_BUTTONS_NONE,
> + _("<b>A file %s already exists.</b>\n"
> + "If you choose to overwrite this
> file, "
> + "the contents will be lost."),
> save);
>
it would be better to use here the same string than the mail is using
->
"File exists "%s".
Do you wish to overwrite it?"
The rest looks ok, so please just change that string and commit.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]