+2002-02-22
+
+ * src/manage_window.[ch]: fixed a bug that caused crash when
+ the main window was hidden.
+ MANAGE_WINDOW_SIGNALS_CONNECT(): new macro.
+ Monitor "unmap_event", "destroy" events.
+ * src/account.c;
+ src/addressbook.c
+ src/compose.c
+ src/export.c
+ src/filesel.c
+ src/foldersel.c
+ src/grouplistdialog.c
+ src/import.c
+ src/inputdialog.c
+ src/mainwindow.c
+ src/message_search.c
+ src/passphrase.c
+ src/prefs_account.c
+ src/prefs_common.c
+ src/prefs_customheader.c
+ src/prefs_display_header.c
+ src/prefs_filter.c
+ src/prefs_template.c
+ src/summary_search.c
+ src/summaryview.c: use MANAGE_WINDO_SIGNALS_CONNECT() macro to
+ connect signals for window management.
+
2002-02-21
* src/prefs_account.[ch]: added receive size limit option.
+2002-02-23 [paul] 0.7.2claws8
+
+ * sync with sylpheed 0.7.2cvs14
+ see ChangeLog entries 2002-02-22 and 2002-02-23
+
2002-02-22 [christoph] 0.7.2claws7
* src/quote_fmt.c
+2002-02-22
+
+ * src/manage_window.[ch]: ¥á¥¤¥ó¥¦¥£¥ó¥É¥¦¤ò±£¤·¤Æ¤¤¤ë¤È¤¤Ë
+ ¥¯¥é¥Ã¥·¥å¤¹¤ë¥Ð¥°¤ò½¤Àµ¡£
+ MANAGE_WINDOW_SIGNALS_CONNECT(): ¿·µ¬¥Þ¥¯¥í¡£
+ "unmap_event", "destroy" ¥¤¥Ù¥ó¥È¤ò´Æ»ë¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+ * src/account.c;
+ src/addressbook.c
+ src/compose.c
+ src/export.c
+ src/filesel.c
+ src/foldersel.c
+ src/grouplistdialog.c
+ src/import.c
+ src/inputdialog.c
+ src/mainwindow.c
+ src/message_search.c
+ src/passphrase.c
+ src/prefs_account.c
+ src/prefs_common.c
+ src/prefs_customheader.c
+ src/prefs_display_header.c
+ src/prefs_filter.c
+ src/prefs_template.c
+ src/summary_search.c
+ src/summaryview.c: ¥¦¥£¥ó¥É¥¦´ÉÍý¤Î¤¿¤á¤Ë¥·¥°¥Ê¥ë¤òÀܳ¤¹¤ë¤Î¤Ë
+ MANAGE_WINDO_SIGNALS_CONNECT() ¥Þ¥¯¥í¤ò»ÈÍѤ¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
2002-02-21
* src/prefs_account.[ch]: ¼õ¿®¥µ¥¤¥ºÀ©¸Â¤Î¥ª¥×¥·¥ç¥ó¤òÄɲá£
MICRO_VERSION=2
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws7
+EXTRA_VERSION=claws8
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
GTK_SIGNAL_FUNC (account_delete_event), NULL);
gtk_signal_connect (GTK_OBJECT (window), "key_press_event",
GTK_SIGNAL_FUNC (account_key_pressed), NULL);
- gtk_signal_connect (GTK_OBJECT (window), "focus_in_event",
- GTK_SIGNAL_FUNC (manage_window_focus_in), NULL);
- gtk_signal_connect (GTK_OBJECT (window), "focus_out_event",
- GTK_SIGNAL_FUNC (manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT (window);
gtk_widget_realize(window);
vbox = gtk_vbox_new (FALSE, 10);
GTK_SIGNAL_FUNC(addressbook_close), NULL);
gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(key_pressed), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
vbox = gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(window), vbox);
GTK_SIGNAL_FUNC(compose_delete_cb), compose);
gtk_signal_connect(GTK_OBJECT(window), "destroy",
GTK_SIGNAL_FUNC(compose_destroy_cb), compose);
- gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
gtk_widget_realize(window);
gtkut_widget_set_composer_icon(window);
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
GTK_SIGNAL_FUNC(delete_event), NULL);
gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(key_pressed), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
vbox = gtk_vbox_new(FALSE, 4);
gtk_container_add(GTK_CONTAINER(window), vbox);
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
GTK_SIGNAL_FUNC(delete_event), NULL);
gtk_signal_connect(GTK_OBJECT(filesel), "key_press_event",
GTK_SIGNAL_FUNC(key_pressed), NULL);
- gtk_signal_connect(GTK_OBJECT(filesel), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(filesel), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(filesel);
gtk_window_set_modal(GTK_WINDOW(filesel), TRUE);
GTK_SIGNAL_FUNC(delete_event), NULL);
gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(key_pressed), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
vbox = gtk_vbox_new(FALSE, 4);
gtk_container_add(GTK_CONTAINER(window), vbox);
gboolean refresh);
static void grouplist_search (void);
static void grouplist_clear (void);
-static void grouplist_recv_func (SockInfo *sock,
+static gboolean grouplist_recv_func (SockInfo *sock,
gint count,
gint read_bytes,
gpointer data);
grouplist_dialog_set_list(NULL, TRUE);
- gtk_main();
+ if (ack) gtk_main();
manage_window_focus_out(dialog, NULL, NULL);
gtk_widget_hide(dialog);
GTK_SIGNAL_FUNC(cancel_clicked), NULL);
gtk_signal_connect(GTK_OBJECT(dialog), "key_press_event",
GTK_SIGNAL_FUNC(key_pressed), NULL);
- gtk_signal_connect(GTK_OBJECT(dialog), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(dialog), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(dialog);
gtk_widget_realize(dialog);
pattern = "*";
if (refresh) {
+ ack = TRUE;
grouplist_clear();
recv_set_ui_func(grouplist_recv_func, NULL);
group_list = news_get_group_list(news_folder);
group_list = g_slist_reverse(group_list);
recv_set_ui_func(NULL, NULL);
- if (group_list == NULL) {
+ if (group_list == NULL && ack == TRUE) {
alertpanel_error(_("Can't retrieve newsgroup list."));
locked = FALSE;
return;
NULL);
}
-static void grouplist_recv_func(SockInfo *sock, gint count, gint read_bytes,
- gpointer data)
+static gboolean grouplist_recv_func(SockInfo *sock, gint count, gint read_bytes,
+ gpointer data)
{
gchar buf[BUFFSIZE];
count, to_human_readable(read_bytes));
gtk_label_set_text(GTK_LABEL(status_label), buf);
GTK_EVENTS_FLUSH();
+ if (ack == FALSE)
+ return FALSE;
+ else
+ return TRUE;
}
static void ok_clicked(GtkWidget *widget, gpointer data)
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
GTK_SIGNAL_FUNC(delete_event), NULL);
gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(key_pressed), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
vbox = gtk_vbox_new(FALSE, 4);
gtk_container_add(GTK_CONTAINER(window), vbox);
static GHashTable *inc_get_uidl_table (PrefsAccount *ac_prefs);
static void inc_write_uidl_list (Pop3State *state);
-static void inc_pop3_recv_func (SockInfo *sock,
+static gboolean inc_pop3_recv_func (SockInfo *sock,
gint count,
gint read_bytes,
gpointer data);
g_free(path);
}
-static void inc_pop3_recv_func(SockInfo *sock, gint count, gint read_bytes,
- gpointer data)
+static gboolean inc_pop3_recv_func(SockInfo *sock, gint count, gint read_bytes,
+ gpointer data)
{
gchar buf[MSGBUFSIZE];
IncSession *session = (IncSession *)data;
if (cur_total > state->total_bytes)
cur_total = state->total_bytes;
- Xstrdup_a(total_size, to_human_readable(state->total_bytes), return);
+ Xstrdup_a(total_size, to_human_readable(state->total_bytes),
+ return FALSE);
g_snprintf(buf, sizeof(buf),
_("Retrieving message (%d / %d) (%s / %s)"),
state->cur_msg, state->count,
(GTK_PROGRESS_BAR(inc_dialog->mainwin->progressbar),
(gfloat)cur_total / (gfloat)state->total_bytes);
GTK_EVENTS_FLUSH();
+
+ if (state->inc_state == INC_CANCEL)
+ return FALSE;
+ else
+ return TRUE;
}
void inc_progress_update(Pop3State *state, Pop3Phase phase)
GTK_SIGNAL_FUNC(delete_event), NULL);
gtk_signal_connect(GTK_OBJECT(dialog), "key_press_event",
GTK_SIGNAL_FUNC(key_pressed), NULL);
- gtk_signal_connect(GTK_OBJECT(dialog), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(dialog), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(dialog);
gtk_widget_realize(dialog);
gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, FALSE);
gtk_signal_connect(GTK_OBJECT(window), "delete_event",
GTK_SIGNAL_FUNC(main_window_close_cb), mainwin);
- gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(key_pressed), mainwin);
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
gint manage_window_focus_in(GtkWidget *widget, GdkEventFocus *event,
gpointer data)
{
- /* debug_print("Focus in event: window: %08x\n", (guint)widget); */
+ /* debug_print("Focus in event: window: %p\n", widget); */
focus_window = widget;
- return TRUE;
+ return FALSE;
}
gint manage_window_focus_out(GtkWidget *widget, GdkEventFocus *event,
gpointer data)
{
- /* debug_print("Focused window: %08x\n", (guint)focus_window); */
- /* debug_print("Focus out event: window: %08x\n", (guint)widget); */
+ /* debug_print("Focused window: %p\n", focus_window); */
+ /* debug_print("Focus out event: window: %p\n", widget); */
if (focus_window == widget)
focus_window = NULL;
- return TRUE;
+ return FALSE;
+}
+
+gint manage_window_unmap(GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+ /* debug_print("unmap event: %p\n", widget); */
+
+ if (focus_window == widget)
+ focus_window = NULL;
+
+ return FALSE;
+}
+
+gint manage_window_delete(GtkWidget *widget, GdkEventAny *event,
+ gpointer data)
+{
+ /* debug_print("delete event: %p\n", widget); */
+
+ if (focus_window == widget)
+ focus_window = NULL;
+
+ return FALSE;
+}
+
+void manage_window_destroy(GtkWidget *widget, gpointer data)
+{
+ /* debug_print("destroy event: %p\n", widget); */
+
+ if (focus_window == widget)
+ focus_window = NULL;
}
void manage_window_set_transient(GtkWindow *window)
{
- /* debug_print("window = %08x, focus_window = %08x\n",
- (guint)window, (guint)focus_window); */
+ /* debug_print("manage_window_set_transient(): window = %p, focus_window = %p\n",
+ window, focus_window); */
if (window && focus_window)
gtk_window_set_transient_for(window, GTK_WINDOW(focus_window));
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
#include <gtk/gtkwidget.h>
#include <gtk/gtkwindow.h>
+#define MANAGE_WINDOW_SIGNALS_CONNECT(window) \
+{ \
+ gtk_signal_connect(GTK_OBJECT(window), "focus_in_event", \
+ GTK_SIGNAL_FUNC(manage_window_focus_in), NULL); \
+ gtk_signal_connect(GTK_OBJECT(window), "focus_out_event", \
+ GTK_SIGNAL_FUNC(manage_window_focus_out), NULL); \
+ gtk_signal_connect(GTK_OBJECT(window), "unmap_event", \
+ GTK_SIGNAL_FUNC(manage_window_unmap), NULL); \
+ gtk_signal_connect(GTK_OBJECT(window), "destroy", \
+ GTK_SIGNAL_FUNC(manage_window_destroy), NULL); \
+}
+
gint manage_window_focus_in (GtkWidget *widget,
GdkEventFocus *event,
gpointer data);
gint manage_window_focus_out (GtkWidget *widget,
GdkEventFocus *event,
gpointer data);
+gint manage_window_unmap (GtkWidget *widget,
+ GdkEventAny *event,
+ gpointer data);
+gint manage_window_delete (GtkWidget *widget,
+ GdkEventAny *event,
+ gpointer data);
+void manage_window_destroy (GtkWidget *widget,
+ gpointer data);
void manage_window_set_transient (GtkWindow *window);
GtkWidget *manage_window_get_focus_window (void);
-
#endif /* __MANAGE_WINDOW_H__ */
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
GTK_SIGNAL_FUNC(gtk_widget_hide_on_delete), NULL);
gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(key_pressed), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox1);
statusbar_pop_all();
if (recv_write_to_file(SESSION(session)->sock, filename) < 0) {
log_warning(_("can't retrieve newsgroup list\n"));
+ session_destroy(SESSION(session));
+ REMOTE_FOLDER(folder)->session = NULL;
g_free(filename);
return NULL;
}
GTK_SIGNAL_FUNC(passphrase_deleted), NULL);
gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(passphrase_key_pressed), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
manage_window_set_transient(GTK_WINDOW(window));
vbox = gtk_vbox_new(FALSE, 8);
if ((ok = pop3_ok(sock, NULL)) == PS_SUCCESS) {
if (recv_write_to_file(sock, (file = get_tmp_file())) < 0) {
- state->inc_state = INC_NOSPACE;
+ if (state->inc_state == INC_SUCCESS)
+ state->inc_state = INC_NOSPACE;
return -1;
}
GTK_SIGNAL_FUNC(prefs_account_deleted), NULL);
gtk_signal_connect(GTK_OBJECT(dialog.window), "key_press_event",
GTK_SIGNAL_FUNC(prefs_account_key_pressed), NULL);
- gtk_signal_connect(GTK_OBJECT(dialog.window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(dialog.window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(dialog.window);
+
gtk_signal_connect(GTK_OBJECT(dialog.ok_btn), "clicked",
GTK_SIGNAL_FUNC(prefs_account_ok), NULL);
gtk_signal_connect(GTK_OBJECT(dialog.apply_btn), "clicked",
GTK_SIGNAL_FUNC(prefs_actions_deleted), NULL);
gtk_signal_connect (GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(prefs_actions_key_pressed), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT (window);
gtk_signal_connect (GTK_OBJECT(ok_btn), "clicked",
GTK_SIGNAL_FUNC(prefs_actions_ok), mainwin);
gtk_signal_connect (GTK_OBJECT(cancel_btn), "clicked",
GTK_SIGNAL_FUNC(prefs_common_deleted), NULL);
gtk_signal_connect (GTK_OBJECT(dialog.window), "key_press_event",
GTK_SIGNAL_FUNC(prefs_common_key_pressed), NULL);
- gtk_signal_connect (GTK_OBJECT(dialog.window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect (GTK_OBJECT(dialog.window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(dialog.window);
+
gtk_signal_connect (GTK_OBJECT(dialog.ok_btn), "clicked",
GTK_SIGNAL_FUNC(prefs_common_ok), NULL);
gtk_signal_connect (GTK_OBJECT(dialog.apply_btn), "clicked",
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);
- gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
gtk_signal_connect(GTK_OBJECT(window), "delete_event",
GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
gtk_box_pack_end (GTK_BOX (hbox1), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default (ok_btn);
- gtk_signal_connect (GTK_OBJECT (window), "focus_in_event",
- GTK_SIGNAL_FUNC (manage_window_focus_in), NULL);
- gtk_signal_connect (GTK_OBJECT (window), "focus_out_event",
- GTK_SIGNAL_FUNC (manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (prefs_keybind_deleted), NULL);
gtk_signal_connect (GTK_OBJECT (window), "key_press_event",
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
gtk_widget_grab_default (ok_btn);
gtk_window_set_title (GTK_WINDOW(window), _("Custom header setting"));
- gtk_signal_connect (GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT (window);
gtk_signal_connect (GTK_OBJECT(window), "delete_event",
GTK_SIGNAL_FUNC(prefs_custom_header_deleted),
NULL);
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
gtk_window_set_title (GTK_WINDOW(window),
_("Display header setting"));
- gtk_signal_connect (GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
gtk_signal_connect (GTK_OBJECT(window), "delete_event",
GTK_SIGNAL_FUNC(prefs_display_header_deleted),
NULL);
GTK_SIGNAL_FUNC(prefs_filter_deleted), NULL);
gtk_signal_connect (GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(prefs_filter_key_pressed), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT (window);
gtk_signal_connect (GTK_OBJECT(ok_btn), "clicked",
GTK_SIGNAL_FUNC(prefs_filter_ok), NULL);
gtk_signal_connect (GTK_OBJECT(cancel_btn), "clicked",
gchar *dest_path;
gint oldpathlen;
+ g_return_if_fail(old_path != NULL);
+ g_return_if_fail(new_path != NULL);
+
for (cur = prefs_common.fltlist; cur != NULL; cur = cur->next) {
Filter *flt = (Filter *)cur->data;
oldpathlen = strlen(old_path);
- if (!strncmp(old_path, (gchar *)flt->dest, oldpathlen)) {
- base = (gchar *)flt->dest + oldpathlen;
+ if (flt->dest && !strncmp(old_path, flt->dest, oldpathlen)) {
+ base = flt->dest + oldpathlen;
while (*base == G_DIR_SEPARATOR) base++;
if (*base == '\0')
dest_path = g_strdup(new_path);
{
GSList *cur;
GSList *next;
- gint len;
+
+ g_return_if_fail(path != NULL);
for (cur = prefs_common.fltlist; cur != NULL; cur = next) {
Filter *flt = (Filter *)cur->data;
next = cur->next;
- len = strlen(path);
- if (!strncmp(path, flt->dest, len)) {
+ if (flt->dest && !strncmp(path, flt->dest, strlen(path))) {
filter_free(flt);
prefs_common.fltlist =
g_slist_remove(prefs_common.fltlist, flt);
GTK_SIGNAL_FUNC(prefs_filtering_deleted), NULL);
gtk_signal_connect (GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(prefs_filtering_key_pressed), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT (window);
gtk_signal_connect (GTK_OBJECT(ok_btn), "clicked",
GTK_SIGNAL_FUNC(prefs_filtering_ok), NULL);
gtk_signal_connect (GTK_OBJECT(cancel_btn), "clicked",
gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE);
gtk_signal_connect (GTK_OBJECT(window), "delete_event",
GTK_SIGNAL_FUNC(prefs_folder_item_delete_cb), dialog);
- gtk_signal_connect (GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT (window);
/* Table */
table = gtk_table_new(4, 2, FALSE);
GTK_SIGNAL_FUNC(prefs_matcher_deleted), NULL);
gtk_signal_connect (GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(prefs_matcher_key_pressed), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT (window);
gtk_signal_connect (GTK_OBJECT(ok_btn), "clicked",
GTK_SIGNAL_FUNC(prefs_matcher_ok), NULL);
gtk_signal_connect (GTK_OBJECT(cancel_btn), "clicked",
GTK_SIGNAL_FUNC(prefs_scoring_deleted), NULL);
gtk_signal_connect (GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(prefs_scoring_key_pressed), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect (GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT (window);
gtk_signal_connect (GTK_OBJECT(ok_btn), "clicked",
GTK_SIGNAL_FUNC(prefs_scoring_ok), NULL);
gtk_signal_connect (GTK_OBJECT(cancel_btn), "clicked",
/*
* Sylpheed templates subsystem
* Copyright (C) 2001 Alexander Barinov
- * Copyright (C) 2001 Hiroyuki Yamamoto
+ * Copyright (C) 2001-2002 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
GTK_SIGNAL_FUNC(prefs_template_deleted_cb), NULL);
gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(prefs_template_key_pressed_cb), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
gtk_signal_connect(GTK_OBJECT(ok_btn), "clicked",
GTK_SIGNAL_FUNC(prefs_template_ok_cb), NULL);
gtk_signal_connect(GTK_OBJECT(cancel_btn), "clicked",
than 50msec, update UI */
if (tv_cur.tv_sec - tv_prev.tv_sec > 0 ||
tv_cur.tv_usec - tv_prev.tv_usec > UI_REFRESH_INTERVAL) {
- recv_ui_func(sock, count, bytes,
- recv_ui_func_data);
+ gboolean ret;
+ ret = recv_ui_func(sock, count, bytes,
+ recv_ui_func_data);
+ if (ret == FALSE) return -1;
gettimeofday(&tv_prev, NULL);
}
}
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
#include "socket.h"
-typedef void (*RecvUIFunc) (SockInfo *sock,
+typedef gboolean (*RecvUIFunc) (SockInfo *sock,
gint count,
gint read_bytes,
gpointer data);
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
GTK_SIGNAL_FUNC(gtk_widget_hide_on_delete), NULL);
gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
GTK_SIGNAL_FUNC(key_pressed), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
- GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
- gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
- GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+ MANAGE_WINDOW_SIGNALS_CONNECT(window);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox1);
#include "gtkutils.h"
#include "stock_pixmap.h"
#include "filesel.h"
-#include "manage_window.h"
#include "alertpanel.h"
#include "inputdialog.h"
#include "statusbar.h"