Commit e521262e authored by Paolo Borelli's avatar Paolo Borelli Committed by Paolo Borelli

Split error dialogs for io operations in a separate file.

2004-12-02  Paolo Borelli  <pborelli@katamail.com>

	* gedit-io-error-dialogs.[ch]:
	* gedit-utils.[ch]:
	* gedit-file.c:
	* Makefile.am:

	Split error dialogs for io operations in a separate file.
parent 017295ac
2004-12-02 Paolo Borelli <pborelli@katamail.com>
* gedit-io-error-dialogs.[ch]:
* gedit-utils.[ch]:
* gedit-file.c:
* Makefile.am:
Split error dialogs for io operations in a separate file.
2004-12-02 Paolo Borelli <pborelli@katamail.com>
* gedit-mdi.c: delay the recent view creation for the toolbar
......
......@@ -44,6 +44,7 @@ NON_INST_H_FILS = \
bonobo-mdi-session.h \
gedit-commands.h \
gedit-file-selector-util.h \
gedit-io-error-dialogs.h \
gedit-plugins-engine.h \
gedit-session.h \
gedit-languages-manager.h \
......@@ -99,6 +100,7 @@ gedit_SOURCES = \
bonobo-mdi-child.c \
bonobo-mdi-session.c \
gedit-file-selector-util.c \
gedit-io-error-dialogs.c \
gedit-plugins-engine.c \
gedit-plugin.c \
gedit-prefs-manager-app.c \
......
......@@ -44,6 +44,7 @@
#include "gedit-mdi.h"
#include "gedit-recent.h"
#include "gedit-file-selector-util.h"
#include "gedit-io-error-dialogs.h"
#include "gedit-plugins-engine.h"
#include "recent-files/egg-recent-model.h"
#include "gedit-prefs-manager-app.h"
......@@ -266,8 +267,9 @@ gedit_file_save (GeditMDIChild* child, gboolean force)
bonobo_mdi_set_active_view (BONOBO_MDI (gedit_mdi), view);
}
gedit_utils_error_reporting_saving_file (uri, error,
GTK_WINDOW (gedit_get_active_window ()));
gedit_error_reporting_saving_file (uri,
error,
GTK_WINDOW (gedit_get_active_window ()));
g_error_free (error);
......@@ -395,8 +397,9 @@ gedit_file_save_as (GeditMDIChild *child)
{
g_return_val_if_fail (error != NULL, FALSE);
gedit_utils_error_reporting_saving_file (uri, error,
GTK_WINDOW (gedit_get_active_window ()));
gedit_error_reporting_saving_file (uri,
error,
GTK_WINDOW (gedit_get_active_window ()));
g_error_free (error);
......@@ -659,8 +662,9 @@ document_reverted_cb (GeditDocument *document,
gedit_debug (DEBUG_DOCUMENT, "Error reverting file %s", uri_to_display);
gedit_utils_error_reporting_reverting_file (raw_uri, error,
GTK_WINDOW (gedit_get_active_window ()));
gedit_error_reporting_reverting_file (raw_uri,
error,
GTK_WINDOW (gedit_get_active_window ()));
gedit_utils_flash_va (_("The document \"%s\" has not been reverted."), uri_to_display);
}
......@@ -1090,13 +1094,13 @@ document_loaded_cb (GeditDocument *document,
gedit_recent_remove (uri);
gedit_utils_error_reporting_loading_file (uri, encoding_to_use, (GError *)error,
GTK_WINDOW (gedit_get_active_window ()));
gedit_error_reporting_loading_file (uri,
encoding_to_use,
(GError *)error,
GTK_WINDOW (gedit_get_active_window ()));
if (new_child != NULL)
{
children_to_unref = g_slist_prepend (children_to_unref, new_child);
}
gedit_debug (DEBUG_DOCUMENT, "Returning %s", uri_to_display);
}
......@@ -1301,8 +1305,10 @@ open_files ()
if (new_child == NULL)
{
/* FIXME: this is a too generic error message - Paolo */
gedit_utils_error_reporting_loading_file (uri, encoding_to_use, NULL,
GTK_WINDOW (gedit_get_active_window ()));
gedit_error_reporting_loading_file (uri,
encoding_to_use,
NULL,
GTK_WINDOW (gedit_get_active_window ()));
gedit_utils_flash_va (_("Error loading file \"%s\""), uri_to_display);
......
This diff is collapsed.
......@@ -62,20 +62,6 @@ GtkWidget *gedit_dialog_add_button (GtkDialog *dialog,
gchar *gedit_utils_str_middle_truncate (const gchar *string,
guint truncate_length);
void gedit_utils_error_reporting_loading_file (const gchar *uri,
const GeditEncoding *encoding,
GError *error,
GtkWindow *parent);
void gedit_utils_error_reporting_saving_file (const gchar *uri,
GError *error,
GtkWindow *parent);
void gedit_utils_error_reporting_reverting_file (const gchar *uri,
const GError *error,
GtkWindow *parent);
void gedit_utils_error_reporting_creating_file (const gchar *uri,
gint error_code,
GtkWindow *parent);
gboolean g_utf8_caselessnmatch (const char *s1, const char *s2, gssize n1, gssize n2);
void gedit_utils_set_atk_name_description (GtkWidget *widget, const gchar *name,
......
2004-12-05 Paolo Borelli <pborelli@katamail.com>
* POTFILES.in: add gedit-io-error-dialogs.
2004-12-05 Takeshi AIHANA <aihana@gnome.gr.jp>
* ja.po: Updated Japanese translation.
......
......@@ -31,6 +31,7 @@ gedit/gedit-encodings-option-menu.c
gedit/gedit-encodings.c
gedit/gedit-file-selector-util.c
gedit/gedit-file.c
gedit/gedit-io-error-dialogs.c
gedit/gedit-mdi-child.c
gedit/gedit-mdi.c
gedit/gedit-menus.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment