From a67bcb785280ccb87f41fb929d46fdba481bb755 Mon Sep 17 00:00:00 2001 From: Melvin Hadasht Date: Wed, 14 Aug 2002 13:15:46 +0000 Subject: [PATCH] Made some debug info not translatable and few code cleanups --- ChangeLog.claws | 18 ++++++++++++++++++ configure.in | 2 +- src/crash.c | 2 +- src/exporthtml.c | 2 +- src/foldersel.c | 2 +- src/gtkspell.c | 38 +++++++++++++++++++------------------- src/mutt.c | 2 ++ src/prefs_actions.c | 28 ++++++++++++++-------------- src/prefs_common.c | 2 +- src/prefs_toolbar.c | 2 +- src/quote_fmt.c | 2 ++ 11 files changed, 61 insertions(+), 39 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 94f2fda79..5cd60c187 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,21 @@ +2002-08-14 [melvin] 0.8.1claws59 + + * src/crash.c + Made bug report not translatable + * src/exporthtml.c + Fixed exporthtml_build_filespec() return value + * src/foldersel.c + Fixed incorrect include file + * src/gtkspell.c + * src/prefs_actions.c + * src/prefs_toolbar.c + Made debug info not translatable + * src/mutt.c + * src/quote_fmt.c + Added missing includes + * src/prefs_common.c + Fixed typo + 2002-08-14 [paul] 0.8.1claws58 * faq/es/sylpheed-faq.html diff --git a/configure.in b/configure.in index 6a2d5cfd2..e6b3fc4d7 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws58 +EXTRA_VERSION=claws59 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/crash.c b/src/crash.c index c1f51e37b..31b64901f 100644 --- a/src/crash.c +++ b/src/crash.c @@ -144,7 +144,7 @@ static GtkWidget *crash_dialog_new(const gchar *text, const gchar *debug_output) gtk_container_add(GTK_CONTAINER(scrolledwindow1), text1); crash_report = g_strdup_printf( - _("Sylpheed version %s\nGTK+ version %d.%d.%d\nFeatures:%s\nOperating system: %s\nC Library: %s\n--\n%s"), + "Sylpheed version %s\nGTK+ version %d.%d.%d\nFeatures:%s\nOperating system: %s\nC Library: %s\n--\n%s", VERSION, gtk_major_version, gtk_minor_version, gtk_micro_version, get_compiled_in_features(), diff --git a/src/exporthtml.c b/src/exporthtml.c index 78a01b020..7f7a1066d 100644 --- a/src/exporthtml.c +++ b/src/exporthtml.c @@ -1036,7 +1036,7 @@ void exporthtml_process( * Build full export file specification. * Enter: ctl Export control data. */ -static void *exporthtml_build_filespec( ExportHtmlCtl *ctl ) { +static void exporthtml_build_filespec( ExportHtmlCtl *ctl ) { gchar *fileSpec; fileSpec = g_strconcat( diff --git a/src/foldersel.c b/src/foldersel.c index c9d197f95..6ed0c0ddc 100644 --- a/src/foldersel.c +++ b/src/foldersel.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -42,6 +41,7 @@ #include "main.h" #include "utils.h" #include "gtkutils.h" +#include "gtksctree.h" #include "stock_pixmap.h" #include "foldersel.h" #include "alertpanel.h" diff --git a/src/gtkspell.c b/src/gtkspell.c index 9e032f149..50b845e6d 100644 --- a/src/gtkspell.c +++ b/src/gtkspell.c @@ -210,7 +210,7 @@ GtkPspellCheckers *gtkpspell_checkers_delete() return NULL; if ((checkers = gtkpspellcheckers->checkers) != NULL) { - debug_print(_("Pspell: number of running checkers to delete %d\n"), + debug_print("Pspell: number of running checkers to delete %d\n", g_slist_length(checkers)); g_slist_foreach(checkers, free_checkers, NULL); @@ -218,7 +218,7 @@ GtkPspellCheckers *gtkpspell_checkers_delete() } if ((dict_list = gtkpspellcheckers->dictionary_list) != NULL) { - debug_print(_("Pspell: number of dictionaries to delete %d\n"), + debug_print("Pspell: number of dictionaries to delete %d\n", g_slist_length(dict_list)); gtkpspell_free_dictionary_list(dict_list); @@ -505,22 +505,22 @@ static GtkPspeller *gtkpspeller_new(Dictionary *dictionary) gtkpspeller = (GtkPspeller *) exist->data; dictionary_delete(dict); - debug_print(_("Pspell: Using existing ispell checker %0x\n"), + debug_print("Pspell: Using existing ispell checker %0x\n", (gint) gtkpspeller); } else { if ((gtkpspeller = gtkpspeller_real_new(dict)) != NULL) { gtkpspellcheckers->checkers = g_slist_append(gtkpspellcheckers->checkers, gtkpspeller); - debug_print(_("Pspell: Created a new gtkpspeller %0x\n"), + debug_print("Pspell: Created a new gtkpspeller %0x\n", (gint) gtkpspeller); } else { dictionary_delete(dict); - debug_print(_("Pspell: Could not create spell checker.\n")); + debug_print("Pspell: Could not create spell checker.\n"); } } - debug_print(_("Pspell: number of existing checkers %d\n"), + debug_print("Pspell: number of existing checkers %d\n", g_slist_length(gtkpspellcheckers->checkers)); return gtkpspeller; @@ -568,20 +568,20 @@ static GtkPspeller *gtkpspeller_delete(GtkPspeller *gtkpspeller) g_return_val_if_fail(gtkpspellcheckers, NULL); if (gtkpspeller->ispell) - debug_print(_("Pspell: Won't remove existing ispell checker %0x.\n"), + debug_print("Pspell: Won't remove existing ispell checker %0x.\n", (gint) gtkpspeller); else { gtkpspellcheckers->checkers = g_slist_remove(gtkpspellcheckers->checkers, gtkpspeller); - debug_print(_("Pspell: Deleting gtkpspeller %0x.\n"), + debug_print("Pspell: Deleting gtkpspeller %0x.\n", (gint) gtkpspeller); gtkpspeller_real_delete(gtkpspeller); } - debug_print(_("Pspell: number of existing checkers %d\n"), + debug_print("Pspell: number of existing checkers %d\n", g_slist_length(gtkpspellcheckers->checkers)); return gtkpspeller; @@ -598,7 +598,7 @@ static GtkPspeller *gtkpspeller_real_delete(GtkPspeller *gtkpspeller) dictionary_delete(gtkpspeller->dictionary); - debug_print(_("Pspell: gtkpspeller %0x deleted.\n"), + debug_print("Pspell: gtkpspeller %0x deleted.\n", (gint) gtkpspeller); g_free(gtkpspeller); @@ -627,10 +627,10 @@ static gboolean set_dictionary(PspellConfig *config, Dictionary *dict) buf[dict->dictname - dict->fullname] = 0x00; CONFIG_REPLACE_RETURN_FALSE_IF_FAIL("rem-all-word-list-path", ""); - debug_print(_("Pspell: removed all paths.\n")); + debug_print("Pspell: removed all paths.\n"); CONFIG_REPLACE_RETURN_FALSE_IF_FAIL("add-word-list-path", buf); - debug_print(_("Pspell: added path %s.\n"), buf); + debug_print("Pspell: added path %s.\n", buf); strncpy(buf, dict->dictname, BUFSIZE-1); language = buf; @@ -658,7 +658,7 @@ static gboolean set_dictionary(PspellConfig *config, Dictionary *dict) else spelling = NULL; - debug_print(_("Pspell: Language: %s, spelling: %s, jargon: %s, module: %s\n"), + debug_print("Pspell: Language: %s, spelling: %s, jargon: %s, module: %s\n", language, spelling, jargon, module); if (language) @@ -743,7 +743,7 @@ static void set_real_sug_mode(GtkPspell *gtkpspell, const char *themode) result = gtkpspell_set_sug_mode(gtkpspell, mode); if(!result) { - debug_print(_("Pspell: error while changing suggestion mode:%s\n"), + debug_print("Pspell: error while changing suggestion mode:%s\n", gtkpspellcheckers->error_message); gtkpspell_checkers_reset_error(); } @@ -1497,7 +1497,7 @@ GSList *gtkpspell_get_dictionary_list(const gchar *pspell_path, gint refresh) dict_path = g_strdup(pspell_path); prevdir = g_get_current_dir(); if (chdir(dict_path) <0) { - debug_print(_("Pspell: error when searching for dictionaries:\n%s\n"), + debug_print("Pspell: error when searching for dictionaries:\n%s\n", g_strerror(errno)); g_free(prevdir); g_free(dict_path); @@ -1507,7 +1507,7 @@ GSList *gtkpspell_get_dictionary_list(const gchar *pspell_path, gint refresh) return gtkpspellcheckers->dictionary_list; } - debug_print(_("Pspell: checking for dictionaries in %s\n"), dict_path); + debug_print("Pspell: checking for dictionaries in %s\n", dict_path); if (NULL != (dir = opendir("."))) { while (NULL != (ent = readdir(dir))) { @@ -1525,7 +1525,7 @@ GSList *gtkpspell_get_dictionary_list(const gchar *pspell_path, gint refresh) dict->dictname = strrchr(dict->fullname, G_DIR_SEPARATOR) + 1; dict->encoding = NULL; - debug_print(_("Pspell: found dictionary %s %s\n"), + debug_print("Pspell: found dictionary %s %s\n", dict->fullname, dict->dictname); list = g_slist_insert_sorted(list, dict, (GCompareFunc) compare_dict); @@ -1534,13 +1534,13 @@ GSList *gtkpspell_get_dictionary_list(const gchar *pspell_path, gint refresh) closedir(dir); } else { - debug_print(_("Pspell: error when searching for dictionaries.\nNo dictionary found.\n(%s)"), + debug_print("Pspell: error when searching for dictionaries.\nNo dictionary found.\n(%s)", g_strerror(errno)); list = create_empty_dictionary_list(); } if(list==NULL){ - debug_print(_("Pspell: error when searching for dictionaries.\nNo dictionary found.\n")); + debug_print("Pspell: error when searching for dictionaries.\nNo dictionary found.\n"); list = create_empty_dictionary_list(); } diff --git a/src/mutt.c b/src/mutt.c index c4fed7606..a49203af4 100644 --- a/src/mutt.c +++ b/src/mutt.c @@ -22,6 +22,8 @@ */ #include +#include +#include #include #include "mgutils.h" diff --git a/src/prefs_actions.c b/src/prefs_actions.c index a37d10191..c23e43a60 100644 --- a/src/prefs_actions.c +++ b/src/prefs_actions.c @@ -264,7 +264,7 @@ static void prefs_actions_create(MainWindow *mainwin) gchar *title[1]; - debug_print(_("Creating actions setting window...\n")); + debug_print("Creating actions setting window...\n"); window = gtk_window_new (GTK_WINDOW_DIALOG); @@ -456,7 +456,7 @@ void prefs_actions_read_config(void) gchar buf[PREFSBUFSIZE]; gchar *act; - debug_print(_("Reading actions configurations...\n")); + debug_print("Reading actions configurations...\n"); rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ACTIONS_RC, NULL); if ((fp = fopen(rcpath, "rb")) == NULL) { @@ -491,7 +491,7 @@ void prefs_actions_write_config(void) PrefFile *pfile; GSList *cur; - debug_print(_("Writing actions configuration...\n")); + debug_print("Writing actions configuration...\n"); rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ACTIONS_RC, NULL); if ((pfile= prefs_write_open(rcpath)) == NULL) { @@ -1168,7 +1168,7 @@ static gboolean execute_actions(gchar *action, GtkWidget *window, cmd = parse_action_cmd(action, msginfo, ctree, mimeview); if (!cmd) { - debug_print(_("Action command error\n")); + debug_print("Action command error\n"); is_ok = FALSE; /* ERR: incorrect command */ break; } @@ -1260,7 +1260,7 @@ ChildInfo *fork_child(gchar *cmd, gint action_type, GtkWidget *text, } } - debug_print(_("Forking child and grandchild.\n")); + debug_print("Forking child and grandchild.\n"); pid = fork(); if (pid == 0) { /* Child */ @@ -1320,9 +1320,9 @@ ChildInfo *fork_child(gchar *cmd, gint action_type, GtkWidget *text, close(chld_status[0]); } - debug_print(_("Child: Waiting for grandchild\n")); + debug_print("Child: Waiting for grandchild\n"); waitpid(gch_pid, NULL, 0); - debug_print(_("Child: grandchild ended\n")); + debug_print("Child: grandchild ended\n"); if (sync) { write(chld_status[1], "0\n", 2); close(chld_status[1]); @@ -1424,7 +1424,7 @@ static void kill_children_cb(GtkWidget *widget, gpointer data) for (cur = children->list; cur; cur = cur->next) { child_info = (ChildInfo *)(cur->data); - debug_print(_("Killing child group id %d\n"), child_info->pid); + debug_print("Killing child group id %d\n", child_info->pid); if (child_info->pid && kill(-child_info->pid, SIGTERM) < 0) perror("kill"); } @@ -1516,7 +1516,7 @@ static void free_children(Children *children) GSList *cur; ChildInfo *child_info; - debug_print(_("Freeing children data %p\n"), children); + debug_print("Freeing children data %p\n", children); g_free(children->action); for (cur = children->list; cur;) { @@ -1534,7 +1534,7 @@ static void update_io_dialog(Children *children) { GSList *cur; - debug_print(_("Updating actions input/output dialog.\n")); + debug_print("Updating actions input/output dialog.\n"); if (!children->nb) { gtk_widget_set_sensitive(children->abort_btn, FALSE); @@ -1685,7 +1685,7 @@ static void catch_status(gpointer data, gint source, GdkInputCondition cond) gdk_input_remove(child_info->tag_status); c = read(source, &buf, 1); - debug_print(_("Child returned %c\n"), buf); + debug_print("Child returned %c\n", buf); waitpid(-child_info->pid, NULL, 0); childinfo_close_pipes(child_info); @@ -1701,7 +1701,7 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond) gchar *input; gint c; - debug_print(_("Sending input to grand child.\n")); + debug_print("Sending input to grand child.\n"); if (!(cond && GDK_INPUT_WRITE)) return; @@ -1718,7 +1718,7 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond) gtk_entry_set_text(GTK_ENTRY(children->input_entry), ""); gtk_widget_set_sensitive(children->input_hbox, TRUE); - debug_print(_("Input to grand child sent.\n")); + debug_print("Input to grand child sent.\n"); } static void catch_output(gpointer data, gint source, GdkInputCondition cond) @@ -1727,7 +1727,7 @@ static void catch_output(gpointer data, gint source, GdkInputCondition cond) gint c, i; gchar buf[PREFSBUFSIZE]; - debug_print(_("Catching grand child's output.\n")); + debug_print("Catching grand child's output.\n"); if (child_info->type & ACTION_PIPE_OUT && source == child_info->chld_out) { gboolean is_selection = FALSE; diff --git a/src/prefs_common.c b/src/prefs_common.c index 50132f7e4..e91ca172b 100644 --- a/src/prefs_common.c +++ b/src/prefs_common.c @@ -1165,7 +1165,7 @@ static void prefs_receive_create(void) gtk_box_pack_start (GTK_BOX (vbox2), hbox_newmail_notify, FALSE, FALSE, 0); - label_newmail_notify_cmd = gtk_label_new (_("Command to execute:\n" + label_newmail_notify_cmd = gtk_label_new (_("Command to execute:\n" "(use %d as number of new " "mails)")); gtk_label_set_justify(GTK_LABEL(label_newmail_notify_cmd), diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c index fa7b74729..638a8e456 100644 --- a/src/prefs_toolbar.c +++ b/src/prefs_toolbar.c @@ -652,7 +652,7 @@ static void prefs_toolbar_create(void) gchar *titles[N_DISPLAYED_ITEMS_COLS]; - debug_print(_("Creating custom toolbar window...\n")); + debug_print("Creating custom toolbar window...\n"); window = gtk_window_new (GTK_WINDOW_DIALOG); gtk_widget_set_usize (window, 450, -1); diff --git a/src/quote_fmt.c b/src/quote_fmt.c index 01478dd67..ee7b6c7a9 100644 --- a/src/quote_fmt.c +++ b/src/quote_fmt.c @@ -26,6 +26,8 @@ #include #include "intl.h" +#include "manage_window.h" +#include "gtkutils.h" static GtkWidget *quote_desc_win; -- 2.25.1