summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/airpcap_dlg.c4
-rw-r--r--gtk/color_dlg.c4
-rw-r--r--gtk/filter_dlg.c4
-rw-r--r--gtk/follow_stream.c4
-rw-r--r--gtk/follow_tcp.c10
-rw-r--r--gtk/funnel_stat.c2
-rw-r--r--gtk/main.c36
-rw-r--r--gtk/prefs_dlg.c4
-rw-r--r--gtk/print_dlg.c2
-rw-r--r--gtk/profile_dlg.c18
-rw-r--r--gtk/proto_dlg.c4
-rw-r--r--gtk/recent.c8
-rw-r--r--gtk/simple_dialog.c7
-rw-r--r--gtk/text_page_utils.c4
14 files changed, 51 insertions, 60 deletions
diff --git a/gtk/airpcap_dlg.c b/gtk/airpcap_dlg.c
index fbea665ece..0a16948120 100644
--- a/gtk/airpcap_dlg.c
+++ b/gtk/airpcap_dlg.c
@@ -84,7 +84,7 @@ write_prefs_to_file(void)
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor preferences file: %s.", pf_dir_path,
- strerror(errno));
+ g_strerror(errno));
g_free(pf_dir_path);
} else {
/* Write the preferencs out. */
@@ -92,7 +92,7 @@ write_prefs_to_file(void)
if (err != 0) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't open preferences file\n\"%s\": %s.", pf_path,
- strerror(err));
+ g_strerror(err));
g_free(pf_path);
}
}
diff --git a/gtk/color_dlg.c b/gtk/color_dlg.c
index c42694c75a..f0a07ae8ce 100644
--- a/gtk/color_dlg.c
+++ b/gtk/color_dlg.c
@@ -1080,7 +1080,7 @@ color_apply_cb(GtkButton *button _U_, gpointer user_data _U_)
if (!prefs.gui_use_pref_save) {
if (!color_filters_write(color_filter_edit_list))
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "Could not open filter file: %s", strerror(errno));
+ "Could not open filter file: %s", g_strerror(errno));
}
/* Apply the coloring rules, both the temporary ones in
@@ -1100,7 +1100,7 @@ color_save_cb(GtkButton *button _U_, gpointer user_data _U_)
if (!color_filters_write(color_filter_edit_list))
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "Could not open filter file: %s", strerror(errno));
+ "Could not open filter file: %s", g_strerror(errno));
}
/* User pressed "Cancel" button (or "ESC" or the 'X'):
diff --git a/gtk/filter_dlg.c b/gtk/filter_dlg.c
index c641257f01..ae6d5880b7 100644
--- a/gtk/filter_dlg.c
+++ b/gtk/filter_dlg.c
@@ -837,7 +837,7 @@ filter_dlg_save(filter_list_type_t list_type)
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor filter files: %s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
return;
}
@@ -847,7 +847,7 @@ filter_dlg_save(filter_list_type_t list_type)
/* We had an error saving the filter. */
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not save to your %s filter file\n\"%s\": %s.",
- filter_type, f_path, strerror(f_save_errno));
+ filter_type, f_path, g_strerror(f_save_errno));
g_free(f_path);
}
}
diff --git a/gtk/follow_stream.c b/gtk/follow_stream.c
index cbc672dbe8..15a454184e 100644
--- a/gtk/follow_stream.c
+++ b/gtk/follow_stream.c
@@ -503,7 +503,7 @@ follow_print_stream(GtkWidget * w _U_, gpointer data)
} else {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Error writing to print command: %s",
- strerror(errno));
+ g_strerror(errno));
}
/* XXX - cancel printing? */
destroy_print_stream(stream);
@@ -941,7 +941,7 @@ follow_destroy_cb(GtkWidget *w, gpointer data _U_)
case FOLLOW_TCP :
i = ws_unlink(follow_info->data_out_filename);
if(i != 0) {
- g_warning("Follow: Couldn't remove temporary file: \"%s\", errno: %s (%u)", follow_info->data_out_filename, strerror(errno), errno);
+ g_warning("Follow: Couldn't remove temporary file: \"%s\", errno: %s (%u)", follow_info->data_out_filename, g_strerror(errno), errno);
}
break;
diff --git a/gtk/follow_tcp.c b/gtk/follow_tcp.c
index 861aa79fc9..d23f00aa31 100644
--- a/gtk/follow_tcp.c
+++ b/gtk/follow_tcp.c
@@ -145,7 +145,7 @@ follow_tcp_stream_cb(GtkWidget * w _U_, gpointer data _U_)
if (tmp_fd == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not create temporary file %s: %s",
- follow_info->data_out_filename, strerror(errno));
+ follow_info->data_out_filename, g_strerror(errno));
g_free(follow_info->data_out_filename);
g_free(follow_info);
g_free(follow_filter);
@@ -156,7 +156,7 @@ follow_tcp_stream_cb(GtkWidget * w _U_, gpointer data _U_)
if (data_out_file == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not create temporary file %s: %s",
- follow_info->data_out_filename, strerror(errno));
+ follow_info->data_out_filename, g_strerror(errno));
ws_close(tmp_fd);
ws_unlink(follow_info->data_out_filename);
g_free(follow_info->data_out_filename);
@@ -227,7 +227,7 @@ follow_tcp_stream_cb(GtkWidget * w _U_, gpointer data _U_)
if (ferror(data_out_file)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not read from temporary file %s: %s",
- follow_info->data_out_filename, strerror(errno));
+ follow_info->data_out_filename, g_strerror(errno));
} else {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Short read from temporary file %s: expected %lu, got %lu",
@@ -358,7 +358,7 @@ follow_read_tcp_stream(follow_info_t *follow_info,
if (data_out_file == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not open temporary file %s: %s", follow_info->data_out_filename,
- strerror(errno));
+ g_strerror(errno));
return FRS_OPEN_ERROR;
}
@@ -421,7 +421,7 @@ follow_read_tcp_stream(follow_info_t *follow_info,
if (ferror(data_out_file)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Error reading temporary file %s: %s", follow_info->data_out_filename,
- strerror(errno));
+ g_strerror(errno));
fclose(data_out_file);
data_out_file = NULL;
return FRS_READ_ERROR;
diff --git a/gtk/funnel_stat.c b/gtk/funnel_stat.c
index 25d3ad5be2..e04932267b 100644
--- a/gtk/funnel_stat.c
+++ b/gtk/funnel_stat.c
@@ -510,7 +510,7 @@ static gboolean funnel_open_file(const char* fname, const char* filter, const ch
if (cf_open(&cfile, fname, FALSE, &err) != CF_OK) {
- *err_str = strerror(err);
+ *err_str = g_strerror(err);
if (rfcode != NULL) dfilter_free(rfcode);
return FALSE;
}
diff --git a/gtk/main.c b/gtk/main.c
index faff151a83..f4213486ed 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -45,10 +45,6 @@
#include <unistd.h>
#endif
-#ifdef NEED_STRERROR_H
-#include "wsutil/strerror.h"
-#endif
-
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
@@ -1871,24 +1867,24 @@ read_configuration_files(char **gdp_path, char **dp_path)
if (gpf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open global preferences file\n\"%s\": %s.", gpf_path,
- strerror(gpf_open_errno));
+ g_strerror(gpf_open_errno));
}
if (gpf_read_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"I/O error reading global preferences file\n\"%s\": %s.", gpf_path,
- strerror(gpf_read_errno));
+ g_strerror(gpf_read_errno));
}
}
if (pf_path != NULL) {
if (pf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open your preferences file\n\"%s\": %s.", pf_path,
- strerror(pf_open_errno));
+ g_strerror(pf_open_errno));
}
if (pf_read_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"I/O error reading your preferences file\n\"%s\": %s.", pf_path,
- strerror(pf_read_errno));
+ g_strerror(pf_read_errno));
}
g_free(pf_path);
pf_path = NULL;
@@ -1906,7 +1902,7 @@ read_configuration_files(char **gdp_path, char **dp_path)
if (cf_path != NULL) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open your capture filter file\n\"%s\": %s.", cf_path,
- strerror(cf_open_errno));
+ g_strerror(cf_open_errno));
g_free(cf_path);
}
@@ -1915,7 +1911,7 @@ read_configuration_files(char **gdp_path, char **dp_path)
if (df_path != NULL) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open your display filter file\n\"%s\": %s.", df_path,
- strerror(df_open_errno));
+ g_strerror(df_open_errno));
g_free(df_path);
}
@@ -1926,12 +1922,12 @@ read_configuration_files(char **gdp_path, char **dp_path)
if (gdp_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open global disabled protocols file\n\"%s\": %s.",
- *gdp_path, strerror(gdp_open_errno));
+ *gdp_path, g_strerror(gdp_open_errno));
}
if (gdp_read_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"I/O error reading global disabled protocols file\n\"%s\": %s.",
- *gdp_path, strerror(gdp_read_errno));
+ *gdp_path, g_strerror(gdp_read_errno));
}
g_free(*gdp_path);
*gdp_path = NULL;
@@ -1940,12 +1936,12 @@ read_configuration_files(char **gdp_path, char **dp_path)
if (dp_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open your disabled protocols file\n\"%s\": %s.", *dp_path,
- strerror(dp_open_errno));
+ g_strerror(dp_open_errno));
}
if (dp_read_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"I/O error reading your disabled protocols file\n\"%s\": %s.", *dp_path,
- strerror(dp_read_errno));
+ g_strerror(dp_read_errno));
}
g_free(*dp_path);
*dp_path = NULL;
@@ -2159,7 +2155,7 @@ main(int argc, char *argv[])
if (rf_path != NULL && rf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open common recent file\n\"%s\": %s.",
- rf_path, strerror(rf_open_errno));
+ rf_path, g_strerror(rf_open_errno));
}
/* "pre-scan" the command line parameters, if we have "console only"
@@ -2254,7 +2250,7 @@ main(int argc, char *argv[])
if (rf_path != NULL && rf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open recent file\n\"%s\": %s.",
- rf_path, strerror(rf_open_errno));
+ rf_path, g_strerror(rf_open_errno));
}
if (recent.gui_fileopen_remembered_dir &&
@@ -2789,7 +2785,7 @@ main(int argc, char *argv[])
if (rf_path != NULL && rf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open recent file\n\"%s\": %s.",
- rf_path, strerror(rf_open_errno));
+ rf_path, g_strerror(rf_open_errno));
}
color_filters_enable(recent.packet_list_colorize);
@@ -3656,7 +3652,7 @@ static void copy_global_profile (const gchar *profile_name)
if (create_persconffile_profile(profile_name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
}
@@ -3665,7 +3661,7 @@ static void copy_global_profile (const gchar *profile_name)
&pf_dir_path, &pf_dir_path2) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't copy file \"%s\" in directory\n\"%s\" to\n\"%s\":\n%s.",
- pf_filename, pf_dir_path2, pf_dir_path, strerror(errno));
+ pf_filename, pf_dir_path2, pf_dir_path, g_strerror(errno));
g_free(pf_filename);
g_free(pf_dir_path);
@@ -3718,7 +3714,7 @@ void change_configuration_profile (const gchar *profile_name)
if (rf_path != NULL && rf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open common recent file\n\"%s\": %s.",
- rf_path, strerror(rf_open_errno));
+ rf_path, g_strerror(rf_open_errno));
}
if (recent.gui_fileopen_remembered_dir &&
test_for_directory(recent.gui_fileopen_remembered_dir) == EISDIR) {
diff --git a/gtk/prefs_dlg.c b/gtk/prefs_dlg.c
index 6425697c19..1ff83198df 100644
--- a/gtk/prefs_dlg.c
+++ b/gtk/prefs_dlg.c
@@ -1431,7 +1431,7 @@ prefs_main_write(void)
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor preferences file: %s.", pf_dir_path,
- strerror(errno));
+ g_strerror(errno));
g_free(pf_dir_path);
} else {
/* Write the preferencs out. */
@@ -1439,7 +1439,7 @@ prefs_main_write(void)
if (err != 0) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't open preferences file\n\"%s\": %s.", pf_path,
- strerror(err));
+ g_strerror(err));
g_free(pf_path);
}
}
diff --git a/gtk/print_dlg.c b/gtk/print_dlg.c
index c5399ec0cf..1a9d486c21 100644
--- a/gtk/print_dlg.c
+++ b/gtk/print_dlg.c
@@ -1107,7 +1107,7 @@ print_ok_cb(GtkWidget *ok_bt, gpointer parent_w)
write_failure_alert_box(args->file, errno);
else
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "Error writing to print command: %s", strerror(errno));
+ "Error writing to print command: %s", g_strerror(errno));
break;
}
diff --git a/gtk/profile_dlg.c b/gtk/profile_dlg.c
index e496ad61c5..9d8d88cdd7 100644
--- a/gtk/profile_dlg.c
+++ b/gtk/profile_dlg.c
@@ -383,7 +383,7 @@ profile_apply(GtkWidget *main_w, GtkTreeView *profile_l, gboolean destroy)
if (create_persconffile_profile(profile1->name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
}
@@ -394,7 +394,7 @@ profile_apply(GtkWidget *main_w, GtkTreeView *profile_l, gboolean destroy)
&pf_filename, &pf_dir_path, &pf_dir_path2) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't copy file \"%s\" in directory\n\"%s\" to\n\"%s\":\n%s.",
- pf_filename, pf_dir_path2, pf_dir_path, strerror(errno));
+ pf_filename, pf_dir_path2, pf_dir_path, g_strerror(errno));
g_free(pf_filename);
g_free(pf_dir_path);
@@ -420,7 +420,7 @@ profile_apply(GtkWidget *main_w, GtkTreeView *profile_l, gboolean destroy)
if (create_persconffile_profile(profile1->name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
}
@@ -436,7 +436,7 @@ profile_apply(GtkWidget *main_w, GtkTreeView *profile_l, gboolean destroy)
&pf_dir_path, &pf_dir_path2) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't rename directory\n\"%s\" to\n\"%s\":\n%s.",
- pf_dir_path, pf_dir_path2, strerror(errno));
+ pf_dir_path, pf_dir_path2, g_strerror(errno));
g_free(pf_dir_path);
g_free(pf_dir_path2);
@@ -473,7 +473,7 @@ profile_apply(GtkWidget *main_w, GtkTreeView *profile_l, gboolean destroy)
if (delete_persconffile_profile(profile1->name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't delete profile directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
}
@@ -1143,7 +1143,7 @@ profile_name_edit_ok (GtkWidget *w _U_, gpointer parent_w)
if (create_persconffile_profile(new_name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
} else if (strlen (profile_name) &&
@@ -1152,7 +1152,7 @@ profile_name_edit_ok (GtkWidget *w _U_, gpointer parent_w)
{
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't copy file \"%s\" in directory\n\"%s\" to\n\"%s\":\n%s.",
- pf_filename, pf_dir_path2, pf_dir_path, strerror(errno));
+ pf_filename, pf_dir_path2, pf_dir_path, g_strerror(errno));
g_free(pf_filename);
g_free(pf_dir_path);
@@ -1166,7 +1166,7 @@ profile_name_edit_ok (GtkWidget *w _U_, gpointer parent_w)
&pf_dir_path, &pf_dir_path2) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't rename directory\n\"%s\" to\n\"%s\":\n%s.",
- pf_dir_path, pf_dir_path2, strerror(errno));
+ pf_dir_path, pf_dir_path2, g_strerror(errno));
g_free(pf_dir_path);
g_free(pf_dir_path2);
@@ -1347,7 +1347,7 @@ profile_delete_cb (GtkWidget *w _U_, gpointer data _U_)
if (delete_persconffile_profile(name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't delete profile directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
}
diff --git a/gtk/proto_dlg.c b/gtk/proto_dlg.c
index dd0e7ada0d..4c9d4e64f4 100644
--- a/gtk/proto_dlg.c
+++ b/gtk/proto_dlg.c
@@ -372,14 +372,14 @@ proto_write(gpointer parent_w _U_)
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor disabled protocols file: %s.", pf_dir_path,
- strerror(errno));
+ g_strerror(errno));
g_free(pf_dir_path);
} else {
save_disabled_protos_list(&pf_path, &pf_save_errno);
if (pf_path != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not save to your disabled protocols file\n\"%s\": %s.",
- pf_path, strerror(pf_save_errno));
+ pf_path, g_strerror(pf_save_errno));
g_free(pf_path);
}
}
diff --git a/gtk/recent.c b/gtk/recent.c
index 98857ff79d..e49543e2fe 100644
--- a/gtk/recent.c
+++ b/gtk/recent.c
@@ -154,7 +154,7 @@ write_recent(void)
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor recent file: %s.", pf_dir_path,
- strerror(errno));
+ g_strerror(errno));
g_free(pf_dir_path);
return FALSE;
}
@@ -163,7 +163,7 @@ write_recent(void)
if ((rf = ws_fopen(rf_path, "w")) == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't open recent file\n\"%s\": %s.", rf_path,
- strerror(errno));
+ g_strerror(errno));
g_free(rf_path);
return FALSE;
}
@@ -277,7 +277,7 @@ write_profile_recent(void)
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor recent file: %s.", pf_dir_path,
- strerror(errno));
+ g_strerror(errno));
g_free(pf_dir_path);
return FALSE;
}
@@ -286,7 +286,7 @@ write_profile_recent(void)
if ((rf = ws_fopen(rf_path, "w")) == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't open recent file\n\"%s\": %s.", rf_path,
- strerror(errno));
+ g_strerror(errno));
g_free(rf_path);
return FALSE;
}
diff --git a/gtk/simple_dialog.c b/gtk/simple_dialog.c
index ff7d28343a..11a4f7dc99 100644
--- a/gtk/simple_dialog.c
+++ b/gtk/simple_dialog.c
@@ -299,18 +299,13 @@ display_queued_messages(void)
gpointer
vsimple_dialog(ESD_TYPE_E type, gint btn_mask, const gchar *msg_format, va_list ap)
{
- gchar *vmessage;
gchar *message;
queued_message_t *queued_message;
GtkWidget *win;
GdkWindowState state = 0;
/* Format the message. */
- vmessage = g_strdup_vprintf(msg_format, ap);
-
- /* convert character encoding from locale to UTF8 (using iconv) */
- message = g_locale_to_utf8(vmessage, -1, NULL, NULL, NULL);
- g_free(vmessage);
+ message = g_strdup_vprintf(msg_format, ap);
if (top_level != NULL) {
state = gdk_window_get_state(top_level->window);
diff --git a/gtk/text_page_utils.c b/gtk/text_page_utils.c
index b2769cc881..44c9422758 100644
--- a/gtk/text_page_utils.c
+++ b/gtk/text_page_utils.c
@@ -120,12 +120,12 @@ static void text_page_set_text(GtkWidget *page, const char *absolute_path)
}
if(ferror(text_file)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Error reading file \"%s\": %s",
- absolute_path, strerror(errno));
+ absolute_path, g_strerror(errno));
}
fclose(text_file);
} else {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Could not open file \"%s\": %s",
- absolute_path, strerror(errno));
+ absolute_path, g_strerror(errno));
}
}