[gnome-latex: 100/205] Show a warning message with GtkMessageDialog



commit 7ac8a40a5c17bd2bca2001a0b221a2d3090edfab
Author: Sébastien Wilmet <sebastien wilmet gmail com>
Date:   Thu Oct 15 18:45:01 2009 +0200

    Show a warning message with GtkMessageDialog
    
    Before the message appeared only in the terminal (with print_warning ())

 po/fr.po        | 21 +++++++++++++--------
 po/latexila.pot | 17 +++++++++++------
 src/callbacks.c | 12 ++++++++++++
 3 files changed, 36 insertions(+), 14 deletions(-)
---
diff --git a/po/fr.po b/po/fr.po
index 79b7f09..bfaa286 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: latexila\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-15 18:06+0200\n"
-"PO-Revision-Date: 2009-10-15 18:15+0100\n"
+"POT-Creation-Date: 2009-10-15 18:41+0200\n"
+"PO-Revision-Date: 2009-10-15 18:42+0100\n"
 "Last-Translator: Sébastien Wilmet <sebastien wilmet gmail com>\n"
 "Language-Team: French\n"
 "MIME-Version: 1.0\n"
@@ -22,7 +22,7 @@ msgstr ""
 msgid "%s does not exist. If this is not already made, compile the document with the right command."
 msgstr "%s n'existe pas. Si ce n'est pas déjà fait, compilez le document avec la bonne commande."
 
-#: src/callbacks.c:1006
+#: src/callbacks.c:1017
 #, c-format
 msgid "A file named \"%s\" already exists. Do you want to replace it?"
 msgstr "Un fichier nommé \"%s\" existe déjà. Voulez-vous le remplacer ?"
@@ -267,6 +267,11 @@ msgstr "Grec"
 msgid "Help"
 msgstr "Aide"
 
+#: src/callbacks.c:796
+#, c-format
+msgid "Impossible to open the file \"%s\"."
+msgstr "Impossible d'ouvrir le fichier \"%s\"."
+
 #: src/ui.c:247
 #: src/ui.c:248
 msgid "Italic - \\itshape"
@@ -313,8 +318,8 @@ msgid "New"
 msgstr "Nouveau"
 
 #: src/callbacks.c:61
-#: src/callbacks.c:932
-#: src/callbacks.c:1110
+#: src/callbacks.c:943
+#: src/callbacks.c:1121
 msgid "New document"
 msgstr "Nouveau document"
 
@@ -414,7 +419,7 @@ msgstr "Relations"
 
 #: src/callbacks.c:371
 #: src/callbacks.c:379
-#: src/callbacks.c:1014
+#: src/callbacks.c:1025
 msgid "Replace"
 msgstr "Remplacer"
 
@@ -448,7 +453,7 @@ msgstr "Romains - \\rmfamily"
 msgid "Sans Serif - \\sffamily"
 msgstr "Linéaux (sans serif) - \\sffamily"
 
-#: src/callbacks.c:987
+#: src/callbacks.c:998
 msgid "Save File"
 msgstr "Enregistre le fichier"
 
@@ -456,7 +461,7 @@ msgstr "Enregistre le fichier"
 msgid "Save as..."
 msgstr "Enregistrer sous..."
 
-#: src/callbacks.c:941
+#: src/callbacks.c:952
 #, c-format
 msgid "Save changes to \"%s\" before closing?"
 msgstr "Enregistrer les changements de \"%s\" avant de le fermer ?"
diff --git a/po/latexila.pot b/po/latexila.pot
index 5a84b5f..7b00f81 100644
--- a/po/latexila.pot
+++ b/po/latexila.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-15 18:06+0200\n"
+"POT-Creation-Date: 2009-10-15 18:41+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL li org>\n"
@@ -23,7 +23,7 @@ msgid ""
 "the right command."
 msgstr ""
 
-#: src/callbacks.c:1006
+#: src/callbacks.c:1017
 #, c-format
 msgid "A file named \"%s\" already exists. Do you want to replace it?"
 msgstr ""
@@ -253,6 +253,11 @@ msgstr ""
 msgid "Help"
 msgstr ""
 
+#: src/callbacks.c:796
+#, c-format
+msgid "Impossible to open the file \"%s\"."
+msgstr ""
+
 #: src/ui.c:247 src/ui.c:248
 msgid "Italic - \\itshape"
 msgstr ""
@@ -293,7 +298,7 @@ msgstr ""
 msgid "New"
 msgstr ""
 
-#: src/callbacks.c:61 src/callbacks.c:932 src/callbacks.c:1110
+#: src/callbacks.c:61 src/callbacks.c:943 src/callbacks.c:1121
 msgid "New document"
 msgstr ""
 
@@ -385,7 +390,7 @@ msgstr ""
 msgid "Relations"
 msgstr ""
 
-#: src/callbacks.c:371 src/callbacks.c:379 src/callbacks.c:1014
+#: src/callbacks.c:371 src/callbacks.c:379 src/callbacks.c:1025
 msgid "Replace"
 msgstr ""
 
@@ -417,7 +422,7 @@ msgstr ""
 msgid "Sans Serif - \\sffamily"
 msgstr ""
 
-#: src/callbacks.c:987
+#: src/callbacks.c:998
 msgid "Save File"
 msgstr ""
 
@@ -425,7 +430,7 @@ msgstr ""
 msgid "Save as..."
 msgstr ""
 
-#: src/callbacks.c:941
+#: src/callbacks.c:952
 #, c-format
 msgid "Save changes to \"%s\" before closing?"
 msgstr ""
diff --git a/src/callbacks.c b/src/callbacks.c
index ec1cb77..28cf376 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -784,8 +784,20 @@ open_new_document (const gchar *filename, const gchar *uri)
                g_free (contents);
                g_free (text_utf8);
        }
+
        else
+       {
                print_warning ("impossible to open the file \"%s\"", filename);
+
+               GtkWidget *dialog = gtk_message_dialog_new (
+                               latexila.main_window,
+                               GTK_DIALOG_MODAL,
+                               GTK_MESSAGE_WARNING,
+                               GTK_BUTTONS_CLOSE,
+                               _("Impossible to open the file \"%s\"."), filename);
+               gtk_dialog_run (GTK_DIALOG (dialog));
+               gtk_widget_destroy (dialog);
+       }
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]