more sync with 0.4.99cvs2.

This commit is contained in:
Hiroyuki Yamamoto 2001-05-23 03:04:46 +00:00
parent 1cee1f3b1a
commit 03484d286e
14 changed files with 52 additions and 67 deletions

View file

@ -1,3 +1,18 @@
2001-05-23 [hiroyuki]
* src/headerwindow.c
src/inc.c
src/main.c
src/mh.c
src/nntp.c
src/procmsg.h
src/session.h
src/socket.[ch]
src/summaryview.c
src/textview.c
src/automaton.c
src/folderview.c: more sync with 0.4.99cvs2.
2001-05-22 [paul]
0.4.99claws2

View file

@ -45,17 +45,17 @@ void automaton_destroy(Automaton *atm)
}
void automaton_input_cb(gpointer data, gint dummy_source,
GdkInputCondition condition)
GdkInputCondition condition)
{
Automaton *atm = (Automaton *)data;
SockInfo *sock;
gint next;
/* We get out sockinfo from the atm context and not from the
* passed file descriptor because we can't map that one back
* to the sockinfo */
sock = atm->help_sock;
g_assert (sock->sock == dummy_source);
g_assert(sock->sock == dummy_source);
if (atm->timeout_tag > 0) {
gtk_timeout_remove(atm->timeout_tag);
@ -64,20 +64,19 @@ void automaton_input_cb(gpointer data, gint dummy_source,
}
gdk_input_remove(atm->tag);
atm->tag = 0;
next = atm->state[atm->num].handler(sock, atm->data);
if (atm->terminated)
return;
if (next >= 0 && next <= atm->max && next != atm->num) {
atm->num = next;
atm->tag = sock_gdk_input_add(sock,
atm->state[atm->num].condition,
automaton_input_cb,
data);
data);
} else {
atm->terminate(sock, data);
}
}

View file

@ -327,7 +327,7 @@ FolderView *folderview_create(void)
GTK_SIGNAL_FUNC(folderview_tree_collapsed),
folderview);
gtk_signal_connect(GTK_OBJECT(ctree), "resize_column",
gtk_signal_connect(GTK_OBJECT(ctree), "resize_column",
GTK_SIGNAL_FUNC(folderview_col_resized),
folderview);
@ -695,11 +695,11 @@ static gboolean folderview_have_unread_children(FolderView *folderview,
return FALSE;
}
static void folderview_update_node(FolderView *folderview, GtkCTreeNode *node)
{
GtkCTree *ctree = GTK_CTREE(folderview->ctree);
GtkStyle *style, *prev_style, *ctree_style;
GtkCTreeNode *parent;
FolderItem *item;
GdkPixmap *xpm, *openxpm;
GdkBitmap *mask, *openmask;
@ -841,13 +841,10 @@ static void folderview_update_node(FolderView *folderview, GtkCTreeNode *node)
gtk_ctree_node_set_row_style(ctree, node, style);
if (use_bold) {
GtkCTreeNode *parent;
parent = gtkut_ctree_find_collapsed_parent(ctree, node);
if (parent)
folderview_update_node(folderview, parent);
}
parent = node;
while ((parent = gtkut_ctree_find_collapsed_parent(ctree, parent))
!= NULL)
folderview_update_node(folderview, parent);
}
void folderview_update_item(FolderItem *item, gboolean update_summary)

View file

@ -38,7 +38,6 @@
#include "procmsg.h"
#include "codeconv.h"
#include "utils.h"
#include "prefs_common.h"
static GdkFont *normalfont;
static GdkFont *boldfont;

View file

@ -143,7 +143,7 @@ void inc_mail(MainWindow *mainwin)
/* external incorporating program */
if ((pid = fork()) < 0) {
perror("fork");
inc_autocheck_timer_set();
inc_autocheck_timer_set();
return;
}
@ -170,7 +170,7 @@ void inc_mail(MainWindow *mainwin)
}
inc_finished(mainwin);
inc_autocheck_timer_set();
inc_autocheck_timer_set();
}
static void inc_account_mail(PrefsAccount *account, MainWindow *mainwin)
@ -209,7 +209,7 @@ void inc_all_account_mail(MainWindow *mainwin)
if (!list) {
inc_autocheck_timer_set();
return;
}
}
for (; list != NULL; list = list->next) {
IncSession *session;
@ -225,7 +225,7 @@ void inc_all_account_mail(MainWindow *mainwin)
if (!queue_list) {
inc_autocheck_timer_set();
return;
}
}
inc_dialog = inc_progress_dialog_create();
inc_dialog->queue_list = queue_list;
@ -721,7 +721,7 @@ void inc_progress_update(Pop3State *state, Pop3Phase phase)
case POP3_GETAUTH_PASS_RECV:
case POP3_GETAUTH_APOP_SEND:
case POP3_GETAUTH_APOP_RECV:
progress_dialog_set_label(dialog, _("Authorizing..."));
progress_dialog_set_label(dialog, _("Authorizing..."));
break;
case POP3_GETRANGE_STAT_SEND:
case POP3_GETRANGE_STAT_RECV:
@ -785,7 +785,6 @@ gint inc_drop_message(const gchar *file, Pop3State *state)
return -1;
}
if (prefs_filtering == NULL) {
/* old filtering */
if (state->ac_prefs->filter_on_recv) {
@ -798,8 +797,7 @@ gint inc_drop_message(const gchar *file, Pop3State *state)
}
} else
dropfolder = inbox;
}
else {
} else {
/* new filtering */
dropfolder = inbox;
}

View file

@ -178,8 +178,6 @@ int main(int argc, char *argv[])
prog_version = PROG_VERSION;
startup_dir = g_get_current_dir();
/* parse_cmd_opt(argc, argv); */
CHDIR_RETURN_VAL_IF_FAIL(get_home_dir(), 1);
/* check and create unix domain socket */
@ -301,7 +299,8 @@ static void parse_cmd_opt(int argc, char *argv[])
puts("Sylpheed version " VERSION);
exit(0);
} else if (!strncmp(argv[i], "--help", 6)) {
g_print(_("Usage: %s [OPTION]...\n"), g_get_prgname());
g_print(_("Usage: %s [OPTION]...\n"),
g_basename(argv[0]));
puts(_(" --compose [address] open composition window"));
puts(_(" --receive receive new messages"));
@ -474,4 +473,3 @@ static void open_compose_new_with_recipient(const gchar *address)
else
compose_new(NULL);
}

View file

@ -69,7 +69,6 @@ GSList *mh_get_msg_list(Folder *folder, FolderItem *item, gboolean use_cache)
g_return_val_if_fail(item != NULL, NULL);
path = folder_item_get_path(item);
if (stat(path, &s) < 0) {
FILE_OP_ERROR(path, "stat");
} else {
@ -121,7 +120,6 @@ gchar *mh_fetch_msg(Folder *folder, FolderItem *item, gint num)
g_return_val_if_fail(num > 0 && num <= item->last_num, NULL);
path = folder_item_get_path(item);
file = g_strconcat(path, G_DIR_SEPARATOR_S, itos(num), NULL);
g_free(path);
if (!is_file_exist(file)) {

View file

@ -301,7 +301,7 @@ static void nntp_gen_send(NNTPSockInfo *sock, const gchar *format, ...)
if (verbose) {
if (!g_strncasecmp(buf, "AUTHINFO PASS", 13))
log_print("NNTP> AUTHINFO PASS ***\n");
log_print("NNTP> AUTHINFO PASS ********\n");
else
log_print("NNTP> %s\n", buf);
}

View file

@ -111,11 +111,11 @@ struct _MsgInfo
gchar *date;
gchar *from;
gchar *to;
gchar *cc;
gchar *newsgroups;
gchar *subject;
gchar *msgid;
gchar *inreplyto;
gchar *cc;
FolderItem *folder;
FolderItem *to_folder;

View file

@ -21,6 +21,7 @@
#define __SESSION_H__
#include <glib.h>
#include "socket.h"
typedef struct _Session Session;

View file

@ -490,6 +490,7 @@ gint sock_close(SockInfo *sock)
ret = fd_close(sock->sock);
g_free(sock->hostname);
g_free(sock);
return ret;
}

View file

@ -74,7 +74,7 @@ SockInfo *sock_connect_with_thread (const gchar *hostname, gushort port);
gint sock_printf (SockInfo *sock, const gchar *format, ...)
G_GNUC_PRINTF(2, 3);
gint sock_read (SockInfo *sock, gchar *buf, gint len);
gint sock_read (SockInfo *sock, gchar *buf, gint len);
gint sock_write (SockInfo *sock, const gchar *buf, gint len);
gint sock_gets (SockInfo *sock, gchar *buf, gint len);
gint sock_puts (SockInfo *sock, const gchar *buf);
@ -98,4 +98,3 @@ gint fd_gets (gint sock, gchar *buf, gint len);
gint fd_close (gint sock);
#endif /* __SOCKET_H__ */

View file

@ -21,7 +21,6 @@
#include <glib.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtkbindings.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkwidget.h>
#include <gtk/gtkpixmap.h>
@ -351,7 +350,6 @@ SummaryView *summary_create(void)
GtkWidget *toggle_arrow;
GtkWidget *popupmenu;
GtkItemFactory *popupfactory;
GtkBindingSet *binding_set;
gint n_entries;
gint i;
@ -493,20 +491,6 @@ SummaryView *summary_create(void)
"<SummaryView>", &popupfactory,
summaryview);
/* bind keys */
binding_set = gtk_binding_set_by_class
(GTK_CLIST_CLASS(GTK_OBJECT(ctree)->klass));
gtk_binding_entry_add_signal(binding_set, GDK_n, GDK_CONTROL_MASK,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal(binding_set, GDK_p, GDK_CONTROL_MASK,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_clear(binding_set, GDK_space, 0);
/* connect signals */
gtk_signal_connect(GTK_OBJECT(ctree), "tree_select_row",
GTK_SIGNAL_FUNC(summary_selected), summaryview);

View file

@ -331,7 +331,7 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
if (headers) {
textview_show_header(textview, headers);
procheader_header_array_destroy(headers);
procheader_header_array_destroy(headers);
}
tmpfp = procmime_decode_content(NULL, fp, mimeinfo);
@ -618,7 +618,7 @@ static gchar *make_email_string(const gchar *bp, const gchar *ep)
/* textview_make_clickable_parts() - colorizes clickable parts */
static void textview_make_clickable_parts(TextView *textview,
GdkFont *font,
GdkFont *font,
GdkColor *fg_color,
GdkColor *uri_color,
const gchar *linebuf)
@ -707,7 +707,7 @@ static void textview_make_clickable_parts(TextView *textview,
normal_text,
last->bp - normal_text);
uri->uri = parser[last->pti].build_uri(last->bp,
last->ep);
last->ep);
uri->start = gtk_text_get_point(text);
gtk_text_insert(text, font, uri_color,
NULL, last->bp, last->ep - last->bp);
@ -970,6 +970,7 @@ static GPtrArray *textview_scan_header(TextView *textview, FILE *fp)
}
g_ptr_array_free(headers, TRUE);
return sorted_headers;
}
@ -1197,8 +1198,6 @@ static void textview_key_pressed(GtkWidget *widget, GdkEventKey *event,
{
SummaryView *summaryview = NULL;
widget = widget;
if (!event) return;
if (textview->messageview->mainwin)
summaryview = textview->messageview->mainwin->summaryview;
@ -1240,11 +1239,9 @@ static void textview_key_pressed(GtkWidget *widget, GdkEventKey *event,
static void textview_button_pressed(GtkWidget *widget, GdkEventButton *event,
TextView *textview)
{
widget = widget;
if (event &&
((event->button == 1 && event->type == GDK_2BUTTON_PRESS)
|| event->button == 2
|| event->button == 3)) {
((event->button == 1 && event->type == GDK_2BUTTON_PRESS)
|| event->button == 2 || event->button == 3)) {
GSList *cur;
guint current_pos;
@ -1267,16 +1264,15 @@ static void textview_button_pressed(GtkWidget *widget, GdkEventButton *event,
addressbook_add_contact_by_menu(NULL, fromname, fromaddress, NULL);
g_free(fromaddress);
g_free(fromname);
}
else {
} else {
compose_new_with_recipient
(NULL, uri->uri + 7);
}
}
else
}
} else {
open_uri(uri->uri,
prefs_common.uri_cmd);
}
}
}
}
}
}