#include "main.h"
#include "prefs.h"
#include "prefs_account.h"
+#include "prefs_customheader.h"
#include "account.h"
#include "mainwindow.h"
#include "manage_window.h"
#endif /* USE_GPGME */
static void prefs_account_advanced_create (void);
+static void prefs_account_edit_custom_header (void);
+
+static gint prefs_account_deleted (GtkWidget *widget,
+ GdkEventAny *event,
+ gpointer data);
static void prefs_account_key_pressed (GtkWidget *widget,
GdkEventKey *event,
gpointer data);
static gint prefs_account_apply (void);
static void prefs_account_cancel (void);
-static void prefs_account_customhdr_edit (void);
#define VSPACING 12
#define VSPACING_NARROW 4
if (id < 0) g_warning("wrong account id: %d\n", id);
ac_prefs->account_id = id;
- prefs_headers_read_config(ac_prefs);
+ prefs_custom_header_read_config(ac_prefs);
}
void prefs_account_save_config(PrefsAccount *ac_prefs)
/* create dialog */
prefs_dialog_create(&dialog);
gtk_signal_connect(GTK_OBJECT(dialog.window), "delete_event",
- GTK_SIGNAL_FUNC(prefs_account_cancel), NULL);
+ 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_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
- /* gtk_widget_set_sensitive(hbox, FALSE); */
-
PACK_CHECK_BUTTON (hbox, customhdr_chkbtn,
_("Add user-defined header"));
gtk_widget_show (customhdr_edit_btn);
gtk_box_pack_start (GTK_BOX (hbox), customhdr_edit_btn,
FALSE, FALSE, 0);
+ gtk_signal_connect (GTK_OBJECT (customhdr_edit_btn), "clicked",
+ GTK_SIGNAL_FUNC (prefs_account_edit_custom_header),
+ NULL);
SET_TOGGLE_SENSITIVITY (customhdr_chkbtn, customhdr_edit_btn);
_("Authenticate with POP3 before sending"));
gtk_widget_set_sensitive(pop_bfr_smtp_chkbtn, FALSE);
- gtk_signal_connect(GTK_OBJECT(customhdr_edit_btn), "clicked",
- GTK_SIGNAL_FUNC(prefs_account_customhdr_edit),
- NULL);
-
send.date_chkbtn = date_chkbtn;
send.msgid_chkbtn = msgid_chkbtn;
send.customhdr_chkbtn = customhdr_chkbtn;
advanced.domain_entry = entry_domain;
}
+static gint prefs_account_deleted(GtkWidget *widget, GdkEventAny *event,
+ gpointer data)
+{
+ prefs_account_cancel();
+ return TRUE;
+}
+
static void prefs_account_key_pressed(GtkWidget *widget, GdkEventKey *event,
gpointer data)
{
gtk_main_quit();
}
-static void prefs_account_customhdr_edit(void)
+static void prefs_account_edit_custom_header(void)
{
- prefs_headers_open(&tmp_ac_prefs);
+ prefs_custom_header_open(&tmp_ac_prefs);
}
#if USE_GPGME