+2002-08-15 [paul] 0.8.1claws64
+
+ * src/*.c
+ don't translate debug info
+
+ * src/matcher.[ch]
+ add copyright info
+
2002-08-15 [paul] 0.8.1claws63
* src/prefs_toolbar.c
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws63
+EXTRA_VERSION=claws64
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
gchar buf[PREFSBUFSIZE];
PrefsAccount *ac_prefs;
- debug_print(_("Reading all config for each account...\n"));
+ debug_print("Reading all config for each account...\n");
rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ACCOUNT_RC, NULL);
if ((fp = fopen(rcpath, "rb")) == NULL) {
strretchomp(buf);
memmove(buf, buf + 1, strlen(buf));
buf[strlen(buf) - 1] = '\0';
- debug_print(_("Found label: %s\n"), buf);
+ debug_print("Found label: %s\n", buf);
ac_label_list = g_slist_append(ac_label_list,
g_strdup(buf));
}
return;
}
- debug_print(_("Opening account edit window...\n"));
+ debug_print("Opening account edit window...\n");
if (!edit_account.window)
account_edit_create();
GtkWidget *hbbox;
GtkWidget *close_btn;
- debug_print(_("Creating account edit window...\n"));
+ debug_print("Creating account edit window...\n");
window = gtk_window_new (GTK_WINDOW_DIALOG);
gtk_widget_set_usize (window, 500, 320);
account_destroy(ac_prefs);
account_clist_set();
- debug_print(_("Removing deleted account references for all the folders...\n"));
+ debug_print("Removing deleted account references for all the folders...\n");
list = folder_get_list();
for (; list != NULL; list = list->next) {
folder = FOLDER(list->data);
const gchar *label2;
const gchar *label3;
- debug_print(_("Creating alert panel dialog...\n"));
+ debug_print("Creating alert panel dialog...\n");
dialog = gtk_dialog_new();
gtk_window_set_title(GTK_WINDOW(dialog), title);
gchar *cc_hdr;
gchar *to_hdr;
- debug_print(_("Writing redirect header\n"));
+ debug_print("Writing redirect header\n");
cc_hdr = prefs_common.trans_hdr ? _("Cc:") : "Cc:";
to_hdr = prefs_common.trans_hdr ? _("To:") : "To:";
static gboolean lock = FALSE;
PrefsAccount *mailac = NULL, *newsac = NULL;
- debug_print(_("queueing message...\n"));
+ debug_print("queueing message...\n");
g_return_val_if_fail(compose->account != NULL, -1);
g_return_val_if_fail(compose->orig_account != NULL, -1);
return 0;
}
- debug_print(_("Writing %s-header\n"), header);
+ debug_print("Writing %s-header\n", header);
header_w_colon = g_strconcat(header, ":", NULL);
trans_hdr = (prefs_common.trans_hdr ? gettext(header_w_colon) : header_w_colon);
case PRIORITY_LOWEST: fprintf(fp, "Importance: low\n"
"X-Priority: 5 (Lowest)\n");
break;
- default: debug_print(_("compose: priority unknown : %d\n"),
+ default: debug_print("compose: priority unknown : %d\n",
compose->priority);
}
lt->tm_min, lt->tm_sec,
(guint)random(), addr);
- debug_print(_("generated Message-ID: %s\n"), buf);
+ debug_print("generated Message-ID: %s\n", buf);
g_free(addr);
}
g_return_val_if_fail(account != NULL, NULL);
- debug_print(_("Creating compose window...\n"));
+ debug_print("Creating compose window...\n");
compose = g_new0(Compose, 1);
titles[COL_MIMETYPE] = _("MIME type");
GtkWidget *menuitem;
if (!gtkpspell_set_sug_mode(gtkpspell, prefs_common.pspell_sugmode)) {
- debug_print(_("Pspell: could not set suggestion mode %s\n"),
+ debug_print("Pspell: could not set suggestion mode %s\n",
gtkpspellcheckers->error_message);
gtkpspell_checkers_reset_error();
}
Compose *compose = (Compose *)data;
gint i = 0;
- debug_print(_("Compose: input from monitoring process\n"));
+ debug_print("Compose: input from monitoring process\n");
gdk_input_remove(compose->exteditor_tag);
if ((final && !applied) || !final) {
if (inbox != info->folder) {
if (folder_item_move_msg(inbox, info) == -1) {
- debug_print(_("*** Could not drop message in inbox; check .processing\n"));
+ debug_print("*** Could not drop message in inbox; check .processing\n");
return;
}
if (folder_table) {
{
g_return_if_fail(item != NULL);
- debug_print(_("Destroying folder item %s\n"), item->path);
+ debug_print("Destroying folder item %s\n", item->path);
if (item->folder != NULL) {
switch (item->folder->type) {
count.new = count.unread = count.total = 0;
- debug_print(_("Counting total number of messages...\n"));
+ debug_print("Counting total number of messages...\n");
folder_func_to_all_folders(folder_count_total_msgs_func, &count);
g_return_val_if_fail(folder != NULL, -1);
g_return_val_if_fail(folder->get_num_list != NULL, -1);
- debug_print(_("Scanning folder %s for cache changes.\n"), item->path);
+ debug_print("Scanning folder %s for cache changes.\n", item->path);
/* Get list of messages for folder and cache */
if(!folder->check_msgnum_validity ||
(num > cache_max)))
) {
new_list = g_slist_prepend(new_list, GINT_TO_POINTER(num));
- debug_print(_("Remembered message %d for fetching\n"), num);
+ debug_print("Remembered message %d for fetching\n", num);
}
/* Remove message from cache if not in folder and in cache */
if(!(folderscaninfo[i] & IN_FOLDER) &&
(folderscaninfo[i] & IN_CACHE)) {
msgcache_remove_msg(item->cache, i + min);
- debug_print(_("Removed message %d from cache.\n"), num);
+ debug_print("Removed message %d from cache.\n", num);
}
/* Check if msginfo needs update if in cache and in folder */
if((folderscaninfo[i] & IN_FOLDER) &&
unreadcnt++;
procmsg_msginfo_free(newmsginfo);
- debug_print(_("Updated msginfo for message %d.\n"), num);
+ debug_print("Updated msginfo for message %d.\n", num);
} else {
if(MSG_IS_NEW(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags))
newcnt++;
unreadcnt++;
totalcnt++;
procmsg_msginfo_free(msginfo);
- debug_print(_("Added newly found message %d to cache.\n"), num);
+ debug_print("Added newly found message %d to cache.\n", num);
}
}
folderview_update_item(item, FALSE);
difftime = (gint) (time(NULL) - msgcache_get_last_access_time(item->cache));
expiretime = prefs_common.cache_min_keep_time * 60;
- debug_print(_("Cache unused time: %d (Expire time: %d)\n"), difftime, expiretime);
+ debug_print("Cache unused time: %d (Expire time: %d)\n", difftime, expiretime);
if(difftime > expiretime) {
*folder_item_list = g_slist_insert_sorted(*folder_item_list, item, folder_cache_time_compare_func);
}
gint memusage = 0;
folder_func_to_all_folders(folder_count_total_cache_memusage, &memusage);
- debug_print(_("Total cache memory usage: %d\n"), memusage);
+ debug_print("Total cache memory usage: %d\n", memusage);
if(memusage > (prefs_common.cache_max_mem_usage * 1024)) {
GSList *folder_item_list = NULL, *listitem;
- debug_print(_("Trying to free cache memory\n"));
+ debug_print("Trying to free cache memory\n");
folder_func_to_all_folders(folder_find_expired_caches, &folder_item_list);
listitem = folder_item_list;
while((listitem != NULL) && (memusage > (prefs_common.cache_max_mem_usage * 1024))) {
FolderItem *item = (FolderItem *)(listitem->data);
- debug_print(_("Freeing cache memory for %s\n"), item->path);
+ debug_print("Freeing cache memory for %s\n", item->path);
memusage -= msgcache_get_memory_usage(item->cache);
folder_item_free_cache(item);
listitem = listitem->next;
return;
id = folder_item_get_identifier(item);
- debug_print(_("Save cache for folder %s\n"), id);
+ debug_print("Save cache for folder %s\n", id);
g_free(id);
cache_file = folder_item_get_cache_file(item);
gint n_entries;
gint i;
- debug_print(_("Creating folder view...\n"));
+ debug_print("Creating folder view...\n");
folderview = g_new0(FolderView, 1);
titles[COL_FOLDER] = _("Folder");
GtkCTree *ctree = GTK_CTREE(folderview->ctree);
MainWindow *mainwin = folderview->mainwin;
- debug_print(_("Setting folder info...\n"));
+ debug_print("Setting folder info...\n");
STATUSBAR_PUSH(mainwin, _("Setting folder info..."));
main_window_cursor_wait(mainwin);
COMPOSEBUTTON_NEWS : COMPOSEBUTTON_MAIL);
if (item->path)
- debug_print(_("Folder %s is selected\n"), item->path);
+ debug_print("Folder %s is selected\n", item->path);
if (!GTK_CTREE_ROW(row)->children)
gtk_ctree_expand(ctree, row);
folder_item_apply_processing(item);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
STATUSBAR_POP(folderview->mainwin);
main_window_cursor_normal(folderview->mainwin);
}
GtkWidget *subject_header_label;
GtkWidget *subject_body_label;
- debug_print(_("Creating header view...\n"));
+ debug_print("Creating header view...\n");
headerview = g_new0(HeaderView, 1);
hbox = gtk_hbox_new(FALSE, 0);
ImageView *imageview;
GtkWidget *scrolledwin;
- debug_print(_("Creating image view...\n"));
+ debug_print("Creating image view...\n");
imageview = g_new0(ImageView, 1);
scrolledwin = gtk_scrolled_window_new(NULL, NULL);
g_free(path);
if (is_file_exist(filename)) {
- debug_print(_("message %d has been already cached.\n"), uid);
+ debug_print("message %d has been already cached.\n", uid);
return filename;
}
return NULL;
}
- debug_print(_("getting message %d...\n"), uid);
+ debug_print("getting message %d...\n", uid);
ok = imap_cmd_fetch(SESSION(session)->sock, (guint32)uid, filename);
statusbar_pop_all();
destdir = imap_get_real_path(IMAP_FOLDER(folder), dest->path);
if (remove_source)
- debug_print(_("Moving message %s%c%d to %s ...\n"),
+ debug_print("Moving message %s%c%d to %s ...\n",
msginfo->folder->path, G_DIR_SEPARATOR,
msginfo->msgnum, destdir);
else
- debug_print(_("Copying message %s%c%d to %s ...\n"),
+ debug_print("Copying message %s%c%d to %s ...\n",
msginfo->folder->path, G_DIR_SEPARATOR,
msginfo->msgnum, destdir);
}
if (remove_source)
- debug_print(_("Moving message %s%c%d to %s ...\n"),
+ debug_print("Moving message %s%c%d to %s ...\n",
msginfo->folder->path, G_DIR_SEPARATOR,
msginfo->msgnum, destdir);
else
- debug_print(_("Copying message %s%c%d to %s ...\n"),
+ debug_print("Copying message %s%c%d to %s ...\n",
msginfo->folder->path, G_DIR_SEPARATOR,
msginfo->msgnum, destdir);
g_return_val_if_fail(item->folder != NULL, mlist);
g_return_val_if_fail(item->folder->type == F_IMAP, mlist);
- debug_print(_("Deleting cached messages %u - %u ... "),
+ debug_print("Deleting cached messages %u - %u ... ",
first_uid, last_uid);
dir = folder_item_get_path(item);
cur = next;
}
- debug_print(_("done.\n"));
+ debug_print("done.\n");
return mlist;
}
g_return_if_fail(item->folder != NULL);
g_return_if_fail(item->folder->type == F_IMAP);
- debug_print(_("Deleting all cached messages...\n"));
+ debug_print("Deleting all cached messages...\n");
dir = folder_item_get_path(item);
remove_all_numbered_files(dir);
g_free(dir);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
}
#if USE_SSL
pop3_logout_send , pop3_logout_recv
};
- debug_print(_("getting new messages of account %s...\n"),
+ debug_print("getting new messages of account %s...\n",
pop3_state->ac_prefs->account_name);
atm = automaton_create(N_POP3_PHASE);
g_return_val_if_fail(mbox != NULL, -1);
if (!is_file_exist(mbox) || (size = get_file_size(mbox)) == 0) {
- debug_print(_("no messages in local mailbox.\n"));
+ debug_print("no messages in local mailbox.\n");
return 0;
} else if (size < 0)
return -1;
return -1;
}
- debug_print(_("Getting new messages from %s into %s...\n"),
+ debug_print("Getting new messages from %s into %s...\n",
mbox, dest->path);
if (prefs_common.filter_on_inc)
guint point;
length = gtk_text_get_length (GTK_TEXT (text));
- debug_print(_("Log window length: %u\n"), length);
+ debug_print("Log window length: %u\n", length);
if (length > prefs_common.loglength) {
gchar *lf;
folder_item_apply_processing(item);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
STATUSBAR_POP(mainwin);
main_window_cursor_normal(mainwin);
}
/* remote command mode */
- debug_print(_("another Sylpheed is already running.\n"));
+ debug_print("another Sylpheed is already running.\n");
if (cmd.receive_all)
fd_write(uxsock, "receive_all\n", 12);
static GdkGeometry geometry;
- debug_print(_("Creating main window...\n"));
+ debug_print("Creating main window...\n");
mainwin = g_new0(MainWindow, 1);
/* main window */
g_warning(_("MainWindow: color allocation %d failed\n"), i);
}
- debug_print(_("done.\n"));
+ debug_print("done.\n");
messageview->visible = TRUE;
GtkWidget *summary_wid = GTK_WIDGET_PTR(mainwin->summaryview);
GtkWidget *message_wid = GTK_WIDGET_PTR(mainwin->messageview);
- debug_print(_("Changing window separation type from %d to %d\n"),
+ debug_print("Changing window separation type from %d to %d\n",
mainwin->type, type);
if (mainwin->type == type) return;
prefs_common.mainwin_x = x;
prefs_common.mainwin_y = y;
- debug_print(_("window position: x = %d, y = %d\n"), x, y);
+ debug_print("window position: x = %d, y = %d\n", x, y);
}
void main_window_empty_trash(MainWindow *mainwin, gboolean confirm)
GtkItemFactory *ifactory = mainwin->menu_factory;
GtkWidget *menuitem;
- debug_print(_("Setting widgets..."));
+ debug_print("Setting widgets...");
/* create separated window(s) if needed */
if (type & SEPARATE_FOLDER) {
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
((type & SEPARATE_MESSAGE) != 0));
- debug_print(_("done.\n"));
+ debug_print("done.\n");
}
#if 0
summary_redisplay_msg(mainwin->summaryview);
- debug_print(_("forced charset: %s\n"), str ? str : "Auto-Detect");
+ debug_print("forced charset: %s\n", str ? str : "Auto-Detect");
}
static void hide_read_messages (MainWindow *mainwin, guint action,
+/*
+ * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 2002 by the Sylpheed Claws Team and Hiroyuki Yamamoto
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
return FALSE;
retval = system(cmd);
- debug_print(_("Command exit code: %d\n"), retval);
+ debug_print("Command exit code: %d\n", retval);
return (retval == 0);
}
GSList *cur;
ScoringProp * prop;
- debug_print(_("Writing matcher configuration...\n"));
+ debug_print("Writing matcher configuration...\n");
rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
MATCHER_RC, NULL);
+/*
+ * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 2002 by the Sylpheed Claws Team and Hiroyuki Yamamoto
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
#ifndef MATCHER_H
#define MATCHER_H
g_return_val_if_fail(dest != NULL, -1);
g_return_val_if_fail(mbox != NULL, -1);
- debug_print(_("Getting messages from %s into %s...\n"), mbox, dest->path);
+ debug_print("Getting messages from %s into %s...\n", mbox, dest->path);
if ((mbox_fp = fopen(mbox, "rb")) == NULL) {
FILE_OP_ERROR(mbox, "fopen");
g_free(tmp_file);
fclose(mbox_fp);
- debug_print(_("%d messages found.\n"), msgs);
+ debug_print("%d messages found.\n", msgs);
return msgs;
}
g_return_val_if_fail(src->folder != NULL, -1);
g_return_val_if_fail(mbox != NULL, -1);
- debug_print(_("Exporting messages from %s into %s...\n"),
+ debug_print("Exporting messages from %s into %s...\n",
src->path, mbox);
if ((mbox_fp = fopen(mbox, "wb")) == NULL) {
mbox_cache_get_msginfo(filename, mf->msg_list);
- debug_print(_("read mbox - %s\n"), filename);
+ debug_print("read mbox - %s\n", filename);
return cache;
}
mbox_cache_get_msginfo_from_file(fp, mf->msg_list);
- debug_print(_("read mbox from file - %s\n"), filename);
+ debug_print("read mbox from file - %s\n", filename);
return cache;
}
item->total = total;
}
- debug_print(_("Last number in dir %s = %d\n"), mbox_path,
+ debug_print("Last number in dir %s = %d\n", mbox_path,
item->total);
item->last_num = n_msg;
g_free(mbox_path);
return FALSE;
if (!cache->modification) {
- debug_print(_("no modification - %s\n"), mbox);
+ debug_print("no modification - %s\n", mbox);
return FALSE;
}
- debug_print(_("save modification - %s\n"), mbox);
+ debug_print("save modification - %s\n", mbox);
mbox_fp = fopen(mbox, "rb+");
mbox_lockwrite_file(mbox_fp, mbox);
fclose(mbox_fp);
- debug_print(_("%i messages written - %s\n"), count, mbox);
+ debug_print("%i messages written - %s\n", count, mbox);
cache = mbox_cache_get_mbox(mbox);
}
if (!modification) {
- debug_print(_("no deleted messages - %s\n"), mbox);
+ debug_print("no deleted messages - %s\n", mbox);
return FALSE;
}
- debug_print(_("purge deleted messages - %s\n"), mbox);
+ debug_print("purge deleted messages - %s\n", mbox);
mbox_fp = fopen(mbox, "rb+");
mbox_lockwrite_file(mbox_fp, mbox);
fclose(mbox_fp);
- debug_print(_("%i messages written - %s\n"), count, mbox);
+ debug_print("%i messages written - %s\n", count, mbox);
mbox_cache_synchronize(mbox, FALSE);
widget = gtk_item_factory_get_item(ifactory, path);
if(widget == NULL) {
- debug_print(_("unknown menu entry %s\n"), path);
+ debug_print("unknown menu entry %s\n", path);
return;
}
gtk_widget_set_sensitive(widget, sensitive);
MimeView *mimeview;
NoticeView *noticeview;
- debug_print(_("Creating message view...\n"));
+ debug_print("Creating message view...\n");
messageview = g_new0(MessageView, 1);
messageview->type = MVIEW_TEXT;
gchar buf[BUFFSIZE];
gint num;
- debug_print(_("queueing message...\n"));
+ debug_print("queueing message...\n");
g_return_val_if_fail(account != NULL, -1);
tmp = g_strdup_printf("%s%cqueue.%d", g_get_tmp_dir(),
}
closedir(dp);
- debug_print(_("Last number in dir %s = %d\n"), item->path, max);
+ debug_print("Last number in dir %s = %d\n", item->path, max);
item->last_num = max;
}
destfile = mh_get_new_msg_filename(dest);
g_return_val_if_fail(destfile != NULL, -1);
- debug_print(_("Moving message %s%c%d to %s ...\n"),
+ debug_print("Moving message %s%c%d to %s ...\n",
msginfo->folder->path, G_DIR_SEPARATOR,
msginfo->msgnum, dest->path);
srcfile = procmsg_get_message_file(msginfo);
g_warning(_("the src folder is identical to the dest.\n"));
continue;
}
- debug_print(_("Moving message %s%c%d to %s ...\n"),
+ debug_print("Moving message %s%c%d to %s ...\n",
msginfo->folder->path, G_DIR_SEPARATOR,
msginfo->msgnum, dest->path);
destfile = mh_get_new_msg_filename(dest);
g_return_val_if_fail(destfile != NULL, -1);
- debug_print(_("Copying message %s%c%d to %s ...\n"),
+ debug_print("Copying message %s%c%d to %s ...\n",
msginfo->folder->path, G_DIR_SEPARATOR,
msginfo->msgnum, dest->path);
g_warning(_("the src folder is identical to the dest.\n"));
continue;
}
- debug_print(_("Copying message %s%c%d to %s ...\n"),
+ debug_print("Copying message %s%c%d to %s ...\n",
msginfo->folder->path, G_DIR_SEPARATOR,
msginfo->msgnum, dest->path);
item->total = n_msg;
}
*/
- debug_print(_("Last number in dir %s = %d\n"), item->path, max);
+ debug_print("Last number in dir %s = %d\n", item->path, max);
item->last_num = max;
return 0;
return NULL;
}
- debug_print(_("\tSearching uncached messages... "));
+ debug_print("\tSearching uncached messages... ");
if (msg_table) {
while ((d = readdir(dp)) != NULL) {
closedir(dp);
if (n_newmsg)
- debug_print(_("%d uncached message(s) found.\n"), n_newmsg);
+ debug_print("%d uncached message(s) found.\n", n_newmsg);
else
- debug_print(_("done.\n"));
+ debug_print("done.\n");
/* sort new messages in numerical order */
if (newlist) {
- debug_print(_("\tSorting uncached messages in numerical order... "));
+ debug_print("\tSorting uncached messages in numerical order... ");
newlist = g_slist_sort
(newlist, (GCompareFunc)procmsg_cmp_msgnum_for_sort);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
}
return newlist;
gint n_entries;
gint i;
- debug_print(_("Creating MIME view...\n"));
+ debug_print("Creating MIME view...\n");
mimeview = g_new0(MimeView, 1);
titles[COL_MIMETYPE] = _("MIME Type");
cache->memusage += procmsg_msginfo_memusage(msginfo);
cache->last_access = time(NULL);
- debug_print(_("Cache size: %d messages, %d byte\n"), g_hash_table_size(cache->msgnum_table), cache->memusage);
+ debug_print("Cache size: %d messages, %d byte\n", g_hash_table_size(cache->msgnum_table), cache->memusage);
}
void msgcache_remove_msg(MsgCache *cache, guint msgnum)
procmsg_msginfo_free(msginfo);
cache->last_access = time(NULL);
- debug_print(_("Cache size: %d messages, %d byte\n"), g_hash_table_size(cache->msgnum_table), cache->memusage);
+ debug_print("Cache size: %d messages, %d byte\n", g_hash_table_size(cache->msgnum_table), cache->memusage);
}
void msgcache_update_msg(MsgCache *cache, MsgInfo *msginfo)
cache->memusage += procmsg_msginfo_memusage(newmsginfo);
cache->last_access = time(NULL);
- debug_print(_("Cache size: %d messages, %d byte\n"), g_hash_table_size(cache->msgnum_table), cache->memusage);
+ debug_print("Cache size: %d messages, %d byte\n", g_hash_table_size(cache->msgnum_table), cache->memusage);
return;
}
g_return_val_if_fail(item != NULL, NULL);
if ((fp = fopen(cache_file, "rb")) == NULL) {
- debug_print(_("\tNo cache file\n"));
+ debug_print("\tNo cache file\n");
return NULL;
}
setvbuf(fp, file_buf, _IOFBF, sizeof(file_buf));
- debug_print(_("\tReading message cache from %s...\n"), cache_file);
+ debug_print("\tReading message cache from %s...\n", cache_file);
/* compare cache version */
if (fread(&ver, sizeof(ver), 1, fp) != 1 ||
CACHE_VERSION != ver) {
- debug_print(_("Cache version is different. Discarding it.\n"));
+ debug_print("Cache version is different. Discarding it.\n");
fclose(fp);
return NULL;
}
cache->last_access = time(NULL);
g_hash_table_thaw(cache->msgnum_table);
- debug_print(_("done. (%d items read)\n"), g_hash_table_size(cache->msgnum_table));
- debug_print(_("Cache size: %d messages, %d byte\n"), g_hash_table_size(cache->msgnum_table), cache->memusage);
+ debug_print("done. (%d items read)\n", g_hash_table_size(cache->msgnum_table));
+ debug_print("Cache size: %d messages, %d byte\n", g_hash_table_size(cache->msgnum_table), cache->memusage);
return cache;
}
guint num;
if ((fp = fopen(mark_file, "rb")) == NULL) {
- debug_print(_("Mark file not found.\n"));
+ debug_print("Mark file not found.\n");
return;
} else if (fread(&ver, sizeof(ver), 1, fp) != 1 || MARK_VERSION != ver) {
- debug_print(_("Mark version is different (%d != %d). "
- "Discarding it.\n"), ver, MARK_VERSION);
+ debug_print("Mark version is different (%d != %d). "
+ "Discarding it.\n", ver, MARK_VERSION);
} else {
- debug_print(_("\tReading message marks from %s...\n"), mark_file);
+ debug_print("\tReading message marks from %s...\n", mark_file);
while (fread(&num, sizeof(num), 1, fp) == 1) {
if (fread(&perm_flags, sizeof(perm_flags), 1, fp) != 1) break;
g_return_val_if_fail(mark_file != NULL, -1);
g_return_val_if_fail(cache != NULL, -1);
- debug_print(_("\tWriting message cache to %s and %s...\n"), cache_file, mark_file);
+ debug_print("\tWriting message cache to %s and %s...\n", cache_file, mark_file);
if ((fp = fopen(cache_file, "wb")) == NULL) {
FILE_OP_ERROR(cache_file, "fopen");
cache->last_access = time(NULL);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
return 0;
}
g_free(path);
if (is_file_exist(filename)) {
- debug_print(_("article %d has been already cached.\n"), num);
+ debug_print("article %d has been already cached.\n", num);
return filename;
}
return NULL;
}
- debug_print(_("getting article %d...\n"), num);
+ debug_print("getting article %d...\n", num);
ok = news_get_article(NNTP_SESSION(REMOTE_FOLDER(folder)->session),
num, filename);
statusbar_pop_all();
else if (last < cache_last)
begin = first;
else if (last == cache_last) {
- debug_print(_("no new articles.\n"));
+ debug_print("no new articles.\n");
return NULL;
} else
begin = cache_last + 1;
GtkWidget *text;
GtkWidget *widget;
- debug_print(_("Creating notice view...\n"));
+ debug_print("Creating notice view...\n");
noticeview = g_new0(NoticeView, 1);
vbox = gtk_vbox_new(FALSE, 4);
g_return_if_fail(label != NULL);
g_return_if_fail(rcfile != NULL);
- debug_print(_("Reading configuration...\n"));
+ debug_print("Reading configuration...\n");
prefs_set_default(param);
val = strncmp(buf, block_label, strlen(block_label));
if (val == 0) {
- debug_print(_("Found %s\n"), block_label);
+ debug_print("Found %s\n", block_label);
break;
}
}
prefs_config_parse_one_line(param, buf);
}
- debug_print(_("Finished reading configuration.\n"));
+ debug_print("Finished reading configuration.\n");
fclose(fp);
}
val = strncmp(buf, block_label, strlen(block_label));
if (val == 0) {
- debug_print(_("Found %s\n"), block_label);
+ debug_print("Found %s\n", block_label);
block_matched = TRUE;
break;
} else
g_warning(_("failed to write configuration to file\n"));
g_free(rcpath);
- debug_print(_("Configuration is saved.\n"));
+ debug_print("Configuration is saved.\n");
}
gint prefs_write_param(PrefParam *param, FILE *fp)
if (prefs_rc_is_readonly(ACCOUNT_RC))
return ac_prefs;
- debug_print(_("Opening account preferences window...\n"));
+ debug_print("Opening account preferences window...\n");
inc_lock();
{
gint page = 0;
- debug_print(_("Creating account preferences window...\n"));
+ debug_print("Creating account preferences window...\n");
/* create dialog */
prefs_dialog_create(&dialog);
{
gint page = 0;
- debug_print(_("Creating common preferences window...\n"));
+ debug_print("Creating common preferences window...\n");
prefs_dialog_create(&dialog);
gtk_window_set_title (GTK_WINDOW(dialog.window),
gchar *title[1];
- debug_print(_("Creating custom header setting window...\n"));
+ debug_print("Creating custom header setting window...\n");
window = gtk_window_new (GTK_WINDOW_DIALOG);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
gchar buf[PREFSBUFSIZE];
CustomHeader *ch;
- debug_print(_("Reading custom header configuration...\n"));
+ debug_print("Reading custom header configuration...\n");
rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
CUSTOM_HEADER_RC, NULL);
GSList *all_hdrs = NULL;
- debug_print(_("Writing custom header configuration...\n"));
+ debug_print("Writing custom header configuration...\n");
rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
CUSTOM_HEADER_RC, NULL);
gchar *title[1];
- debug_print(_("Creating display header setting window...\n"));
+ debug_print("Creating display header setting window...\n");
window = gtk_window_new (GTK_WINDOW_DIALOG);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
gchar buf[PREFSBUFSIZE];
DisplayHeaderProp *dp;
- debug_print(_("Reading configuration for displaying headers...\n"));
+ debug_print("Reading configuration for displaying headers...\n");
rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
DISPLAY_HEADER_RC, NULL);
PrefFile *pfile;
GSList *cur;
- debug_print(_("Writing configuration for displaying headers...\n"));
+ debug_print("Writing configuration for displaying headers...\n");
rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
DISPLAY_HEADER_RC, NULL);
gchar *title[1];
- debug_print(_("Creating filter setting window...\n"));
+ debug_print("Creating filter setting window...\n");
window = gtk_window_new (GTK_WINDOW_DIALOG);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
gchar buf[PREFSBUFSIZE];
Filter *flt;
- debug_print(_("Reading filter configuration...\n"));
+ debug_print("Reading filter configuration...\n");
rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, FILTER_RC, NULL);
if ((fp = fopen(rcpath, "rb")) == NULL) {
PrefFile *pfile;
GSList *cur;
- debug_print(_("Writing filter configuration...\n"));
+ debug_print("Writing filter configuration...\n");
rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, FILTER_RC, NULL);
if ((pfile = prefs_write_open(rcpath)) == NULL) {
gchar *title[1];
- debug_print(_("Creating filtering setting window...\n"));
+ debug_print("Creating filtering setting window...\n");
window = gtk_window_new (GTK_WINDOW_DIALOG);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
gchar *title[1];
- debug_print(_("Creating matcher setting window...\n"));
+ debug_print("Creating matcher setting window...\n");
window = gtk_window_new (GTK_WINDOW_DIALOG);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
gchar *title[1];
- debug_print(_("Creating scoring setting window...\n"));
+ debug_print("Creating scoring setting window...\n");
window = gtk_window_new (GTK_WINDOW_DIALOG);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
gchar *title[1];
- debug_print(_("Creating summary column setting window...\n"));
+ debug_print("Creating summary column setting window...\n");
window = gtk_window_new(GTK_WINDOW_DIALOG);
gtk_container_set_border_width(GTK_CONTAINER(window), 8);
}
cache_file = folder_item_get_cache_file(item);
if ((fp = fopen(cache_file, "rb")) == NULL) {
- debug_print(_("\tNo cache file\n"));
+ debug_print("\tNo cache file\n");
g_free(cache_file);
return NULL;
}
setvbuf(fp, file_buf, _IOFBF, sizeof(file_buf));
g_free(cache_file);
- debug_print(_("\tReading summary cache...\n"));
+ debug_print("\tReading summary cache...\n");
/* compare cache version */
if (fread(&ver, sizeof(ver), 1, fp) != 1 ||
CACHE_VERSION != ver) {
- debug_print(_("Cache version is different. Discarding it.\n"));
+ debug_print("Cache version is different. Discarding it.\n");
fclose(fp);
return NULL;
}
}
fclose(fp);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
return mlist;
}
g_return_if_fail(item != NULL);
g_return_if_fail(item->folder != NULL);
- debug_print(_("\tMarking the messages...\n"));
+ debug_print("\tMarking the messages...\n");
markdir = folder_item_get_path(item);
if (!is_dir_exist(markdir))
item->last_num = lastnum;
- debug_print(_("done.\n"));
+ debug_print("done.\n");
if (newmsg)
- debug_print(_("\t%d new message(s)\n"), newmsg);
+ debug_print("\t%d new message(s)\n", newmsg);
hash_free_value_mem(mark_table);
g_hash_table_destroy(mark_table);
markfile = g_strconcat(folder, G_DIR_SEPARATOR_S, MARK_FILE, NULL);
if ((fp = fopen(markfile, "rb")) == NULL)
- debug_print(_("Mark file not found.\n"));
+ debug_print("Mark file not found.\n");
else if (fread(&ver, sizeof(ver), 1, fp) != 1 || MARK_VERSION != ver) {
- debug_print(_("Mark version is different (%d != %d). "
- "Discarding it.\n"), ver, MARK_VERSION);
+ debug_print("Mark version is different (%d != %d). "
+ "Discarding it.\n", ver, MARK_VERSION);
fclose(fp);
fp = NULL;
}
fseek(fp, filepos, SEEK_SET);
if (to_list) {
- debug_print(_("Sending message by mail\n"));
+ debug_print("Sending message by mail\n");
if(!from) {
g_warning(_("Queued message header is broken.\n"));
mailval = -1;
fclose(tmpfp);
if(newsval == 0) {
- debug_print(_("Sending message by news\n"));
+ debug_print("Sending message by news\n");
folder = FOLDER(newsac->folder);
if (mailval == 0 && newsval == 0 && savecopyfolder) {
FolderItem *outbox;
- debug_print(_("saving sent message...\n"));
+ debug_print("saving sent message...\n");
outbox = folder_find_item_from_identifier(savecopyfolder);
if(!outbox)
gboolean changed = FALSE;
FolderItem *item = msginfo->folder;
- debug_print(_("Setting flags for message %d in folder %s\n"), msginfo->msgnum, item->path);
+ debug_print("Setting flags for message %d in folder %s\n", msginfo->msgnum, item->path);
/* if new flag is set */
if((perm_flags & MSG_NEW) && !MSG_IS_NEW(msginfo->flags) &&
gboolean changed = FALSE;
FolderItem *item = msginfo->folder;
- debug_print(_("Unsetting flags for message %d in folder %s\n"), msginfo->msgnum, item->path);
+ debug_print("Unsetting flags for message %d in folder %s\n", msginfo->msgnum, item->path);
/* if new flag is unset */
if((perm_flags & MSG_NEW) && MSG_IS_NEW(msginfo->flags) &&
text[1] = _("Account");
text[2] = _("Status");
- debug_print(_("Creating progress dialog...\n"));
+ debug_print("Creating progress dialog...\n");
progress = g_new0(ProgressDialog, 1);
window = gtk_window_new(GTK_WINDOW_DIALOG);
if ( matcherlist_match(prop->matchers, msginfo) ) {
if (prop->action->type == MATCHACTION_DELETE_ON_SERVER) {
- debug_print(_("action matched\n"));
+ debug_print("action matched\n");
return SD_CHECKED;
}
else {
- debug_print(_("action not matched\n"));
+ debug_print("action not matched\n");
return SD_UNCHECKED;
}
}
GtkWidget *scrolledwin;
GtkWidget *text;
- debug_print(_("Creating source window...\n"));
+ debug_print("Creating source window...\n");
sourcewin = g_new0(SourceWindow, 1);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
return;
}
- debug_print(_("Displaying the source of %s ...\n"), file);
+ debug_print("Displaying the source of %s ...\n", file);
title = g_strdup_printf(_("%s - Source"), file);
gtk_window_set_title(GTK_WINDOW(sourcewin->window), title);
ssl_ctx_SSLv23 = SSL_CTX_new(SSLv23_client_method());
if (ssl_ctx_SSLv23 == NULL) {
- debug_print(_("SSLv23 not available\n"));
+ debug_print("SSLv23 not available\n");
} else {
- debug_print(_("SSLv23 available\n"));
+ debug_print("SSLv23 available\n");
}
ssl_ctx_TLSv1 = SSL_CTX_new(TLSv1_client_method());
if (ssl_ctx_TLSv1 == NULL) {
- debug_print(_("TLSv1 not available\n"));
+ debug_print("TLSv1 not available\n");
} else {
- debug_print(_("TLSv1 available\n"));
+ debug_print("TLSv1 available\n");
}
}
GtkItemFactory *popupfactory;
gint n_entries;
- debug_print(_("Creating summary view...\n"));
+ debug_print("Creating summary view...\n");
summaryview = g_new0(SummaryView, 1);
vbox = gtk_vbox_new(FALSE, 2);
((buf = folder_item_get_path(item)) == NULL ||
change_dir(buf) < 0))) {
g_free(buf);
- debug_print(_("empty folder\n\n"));
+ debug_print("empty folder\n\n");
summary_set_hide_read_msgs_menu(summaryview, FALSE);
if (is_refresh)
messageview_clear(summaryview->messageview);
MsgInfo *src_msginfo, *dst_msginfo;
GHashTable *subject_table;
- debug_print(_("Attracting messages by subject..."));
+ debug_print("Attracting messages by subject...");
STATUSBAR_PUSH(summaryview->mainwin,
_("Attracting messages by subject..."));
gtk_clist_thaw(clist);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
STATUSBAR_POP(summaryview->mainwin);
main_window_cursor_normal(summaryview->mainwin);
return;
}
- debug_print(_("Sorting summary..."));
+ debug_print("Sorting summary...");
STATUSBAR_PUSH(summaryview->mainwin, _("Sorting summary..."));
main_window_cursor_wait(summaryview->mainwin);
gtk_ctree_node_moveto(ctree, summaryview->selected, -1, 0.5, 0);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
STATUSBAR_POP(summaryview->mainwin);
main_window_cursor_normal(summaryview->mainwin);
if (!mlist) return;
- debug_print(_("\tSetting summary from message data..."));
+ debug_print("\tSetting summary from message data...");
STATUSBAR_PUSH(summaryview->mainwin,
_("Setting summary from message data..."));
gdk_flush();
if (prefs_common.use_addr_book)
end_address_completion();
- debug_print(_("done.\n"));
+ debug_print("done.\n");
STATUSBAR_POP(summaryview->mainwin);
if (debug_mode) {
debug_print("\tmsgid hash table size = %d\n",
procmsg_msginfo_unset_flags(msginfo, MSG_DELETED, MSG_MOVE | MSG_COPY);
procmsg_msginfo_set_flags(msginfo, MSG_MARKED, 0);
summary_set_row_marks(summaryview, row);
- debug_print(_("Message %s/%d is marked\n"), msginfo->folder->path, msginfo->msgnum);
+ debug_print("Message %s/%d is marked\n", msginfo->folder->path, msginfo->msgnum);
}
static void summary_lock_row(SummaryView *summaryview, GtkCTreeNode *row)
procmsg_msginfo_unset_flags(msginfo, MSG_DELETED, MSG_MOVE | MSG_COPY);
procmsg_msginfo_set_flags(msginfo, MSG_LOCKED, 0);
summary_set_row_marks(summaryview, row);
- debug_print(_("Message %d is locked\n"), msginfo->msgnum);
+ debug_print("Message %d is locked\n", msginfo->msgnum);
}
void summary_mark(SummaryView *summaryview)
procmsg_msginfo_unset_flags(msginfo, MSG_NEW | MSG_UNREAD, 0);
summary_set_row_marks(summaryview, row);
- debug_print(_("Message %d is marked as read\n"),
+ debug_print("Message %d is marked as read\n",
msginfo->msgnum);
}
procmsg_msginfo_unset_flags(msginfo, MSG_REPLIED | MSG_FORWARDED, 0);
procmsg_msginfo_set_flags(msginfo, MSG_UNREAD, 0);
- debug_print(_("Message %d is marked as unread\n"),
+ debug_print("Message %d is marked as unread\n",
msginfo->msgnum);
summary_set_row_marks(summaryview, row);
summaryview->folder_item->stype != F_TRASH)
summary_set_row_marks(summaryview, row);
- debug_print(_("Message %s/%d is set to delete\n"),
+ debug_print("Message %s/%d is set to delete\n",
msginfo->folder->path, msginfo->msgnum);
}
if (summaryview->folder_item->stype == F_TRASH) return;
main_window_cursor_wait(summaryview->mainwin);
- debug_print(_("Deleting duplicated messages..."));
+ debug_print("Deleting duplicated messages...");
STATUSBAR_PUSH(summaryview->mainwin,
_("Deleting duplicated messages..."));
else
summary_status_show(summaryview);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
STATUSBAR_POP(summaryview->mainwin);
main_window_cursor_normal(summaryview->mainwin);
}
procmsg_msginfo_unset_flags(msginfo, MSG_MARKED | MSG_DELETED, MSG_MOVE | MSG_COPY);
summary_set_row_marks(summaryview, row);
- debug_print(_("Message %s/%d is unmarked\n"),
+ debug_print("Message %s/%d is unmarked\n",
msginfo->folder->path, msginfo->msgnum);
}
}
}
- debug_print(_("Message %d is set to move to %s\n"),
+ debug_print("Message %d is set to move to %s\n",
msginfo->msgnum, to_folder->path);
}
}
}
- debug_print(_("Message %d is set to copy to %s\n"),
+ debug_print("Message %d is set to copy to %s\n",
msginfo->msgnum, to_folder->path);
}
summary_lock(summaryview);
- debug_print(_("Building threads..."));
+ debug_print("Building threads...");
STATUSBAR_PUSH(summaryview->mainwin, _("Building threads..."));
main_window_cursor_wait(summaryview->mainwin);
gtk_signal_handler_unblock_by_func(GTK_OBJECT(ctree),
summary_tree_expanded, summaryview);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
STATUSBAR_POP(summaryview->mainwin);
main_window_cursor_normal(summaryview->mainwin);
summary_lock(summaryview);
- debug_print(_("Unthreading..."));
+ debug_print("Unthreading...");
STATUSBAR_PUSH(summaryview->mainwin, _("Unthreading..."));
main_window_cursor_wait(summaryview->mainwin);
gtk_signal_handler_unblock_by_func(GTK_OBJECT(ctree),
summary_tree_collapsed, summaryview);
- debug_print(_("done.\n"));
+ debug_print("done.\n");
STATUSBAR_POP(summaryview->mainwin);
main_window_cursor_normal(summaryview->mainwin);
summary_lock(summaryview);
- debug_print(_("Unthreading for execution..."));
+ debug_print("Unthreading for execution...");
gtk_clist_freeze(GTK_CLIST(ctree));
gtk_clist_thaw(GTK_CLIST(ctree));
- debug_print(_("done.\n"));
+ debug_print("done.\n");
summary_unlock(summaryview);
}
summary_lock(summaryview);
- debug_print(_("filtering..."));
+ debug_print("filtering...");
STATUSBAR_PUSH(summaryview->mainwin, _("Filtering..."));
main_window_cursor_wait(summaryview->mainwin);
summaryview->folder_table = NULL;
}
- debug_print(_("done.\n"));
+ debug_print("done.\n");
STATUSBAR_POP(summaryview->mainwin);
main_window_cursor_normal(summaryview->mainwin);
if (mff->account->mark_crosspost_read && MSG_IS_NEWS(msginfo->flags)) {
line = g_string_sized_new(128);
g_string_sprintf(line, "%s:%d", msginfo->folder->path, msginfo->msgnum);
- debug_print(_("nfcp: checking <%s>"), line->str);
+ debug_print("nfcp: checking <%s>", line->str);
if (mff->newsart &&
g_hash_table_lookup_extended(mff->newsart, line->str, &key, &value)) {
- debug_print(_(" <%s>"), (gchar *)value);
+ debug_print(" <%s>", (gchar *)value);
if (MSG_IS_NEW(msginfo->flags) || MSG_IS_UNREAD(msginfo->flags)) {
procmsg_msginfo_unset_flags(msginfo, MSG_NEW | MSG_UNREAD, 0);
procmsg_msginfo_set_flags(msginfo, mff->account->crosspost_col, 0);
g_free(key);
}
g_string_free(line, TRUE);
- debug_print(_("\n"));
+ debug_print("\n");
}
}
msginfo = gtk_ctree_node_get_row_data(ctree, row);
gtk_ctree_select(GTK_CTREE(ctree), row);
- debug_print(_("Message %d selected\n"), msginfo->msgnum);
+ debug_print("Message %d selected\n", msginfo->msgnum);
}
/* select current thread */
procmsg_msginfo_set_flags(msginfo, MSG_IGNORE_THREAD, 0);
summary_set_row_marks(summaryview, row);
- debug_print(_("Message %d is marked as ignore thread\n"),
+ debug_print("Message %d is marked as ignore thread\n",
msginfo->msgnum);
}
procmsg_msginfo_unset_flags(msginfo, MSG_IGNORE_THREAD, 0);
summary_set_row_marks(summaryview, row);
- debug_print(_("Message %d is marked as unignore thread\n"),
+ debug_print("Message %d is marked as unignore thread\n",
msginfo->msgnum);
}
GtkWidget *text_sb;
GtkWidget *text_mb;
- debug_print(_("Creating text view...\n"));
+ debug_print("Creating text view...\n");
textview = g_new0(TextView, 1);
scrolledwin_sb = gtk_scrolled_window_new(NULL, NULL);