#include "version.h"
#include "selective_download.h"
#include "ssl_manager.h"
+#include "sslcertwindow.h"
#define AC_LABEL_WIDTH 240
static void prefs_filtering_open_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
-#ifdef USE_SSL
+#ifdef USE_OPENSSL
static void ssl_manager_open_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
FolderItem *item,
gpointer data);
-static void key_pressed (GtkWidget *widget,
- GdkEventKey *event,
- gpointer data);
-
static void toggle_work_offline_cb(MainWindow *mainwin, guint action, GtkWidget *widget);
static void addr_harvest_cb ( MainWindow *mainwin,
NULL, delete_duplicated_cb, 0, NULL},
{N_("/_Tools/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_Tools/E_xecute"), "X", execute_summary_cb, 0, NULL},
-#ifdef USE_SSL
+#ifdef USE_OPENSSL
{N_("/_Tools/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_Tools/SSL certi_ficates..."),
NULL, ssl_manager_open_cb, 0, NULL},
GTK_SIGNAL_FUNC(main_window_close_cb), mainwin);
MANAGE_WINDOW_SIGNALS_CONNECT(window);
gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
- GTK_SIGNAL_FUNC(key_pressed), mainwin);
+ GTK_SIGNAL_FUNC(mainwindow_key_pressed), mainwin);
gtk_widget_realize(window);
gtk_widget_add_events(window, GDK_KEY_PRESS_MASK|GDK_KEY_RELEASE_MASK);
gdk_colormap_alloc_colors(colormap, color, 4, FALSE, TRUE, success);
for (i = 0; i < 4; i++) {
if (success[i] == FALSE)
- g_warning(_("MainWindow: color allocation %d failed\n"), i);
+ g_warning("MainWindow: color allocation %d failed\n", i);
}
debug_print("done.\n");
summary_init(summaryview);
messageview_init(messageview);
log_window_init(mainwin->logwin);
-
+#ifdef USE_OPENSSL
+ sslcertwindow_register_hook();
+#endif
mainwin->lock_count = 0;
mainwin->menu_lock_count = 0;
mainwin->cursor_count = 0;
void main_window_popup(MainWindow *mainwin)
{
- gint x, y;
- gint sx, sy;
- GtkWidget *widget;
-
- gdk_window_get_origin(mainwin->window->window, &x, &y);
- sx = gdk_screen_width();
- sy = gdk_screen_height();
- x %= sx; if (x < 0) x = 0;
- y %= sy; if (y < 0) y = 0;
- gdk_window_move(mainwin->window->window, x, y);
- gdk_window_raise(mainwin->window->window);
- gdk_window_show(mainwin->window->window);
-
- debug_print("window position: x = %d, y = %d\n", x, y);
+ gtkut_window_popup(mainwin->window);
switch (mainwin->type) {
case SEPARATE_FOLDER:
- widget = mainwin->win.sep_folder.folderwin;
- gdk_window_get_origin(widget->window, &x, &y);
- x %= sx; if (x < 0) x = 0;
- y %= sy; if (y < 0) y = 0;
- gdk_window_move(widget->window, x, y);
- gdk_window_raise(widget->window);
+ gtkut_window_popup(mainwin->win.sep_folder.folderwin);
break;
case SEPARATE_MESSAGE:
- widget = mainwin->win.sep_message.messagewin;
- gdk_window_get_origin(widget->window, &x, &y);
- x %= sx; if (x < 0) x = 0;
- y %= sy; if (y < 0) y = 0;
- gdk_window_move(widget->window, x, y);
- gdk_window_raise(widget->window);
+ gtkut_window_popup(mainwin->win.sep_message.messagewin);
break;
case SEPARATE_BOTH:
- widget = mainwin->win.sep_both.folderwin;
- gdk_window_get_origin(widget->window, &x, &y);
- x %= sx; if (x < 0) x = 0;
- y %= sy; if (y < 0) y = 0;
- gdk_window_move(widget->window, x, y);
- gdk_window_raise(widget->window);
- widget = mainwin->win.sep_both.messagewin;
- gdk_window_get_origin(widget->window, &x, &y);
- x %= sx; if (x < 0) x = 0;
- y %= sy; if (y < 0) y = 0;
- gdk_window_move(widget->window, x, y);
- gdk_window_raise(widget->window);
+ gtkut_window_popup(mainwin->win.sep_both.folderwin);
+ gtkut_window_popup(mainwin->win.sep_both.messagewin);
break;
default:
break;
if (procmsg_send_queue
(folder->queue, prefs_common.savemsg) < 0)
alertpanel_error(_("Some errors occurred while sending queued messages."));
- statusbar_pop_all();
folder_item_scan(folder->queue);
folder_update_item(folder->queue, TRUE);
}
{
prefs_actions_open(mainwin);
}
-#ifdef USE_SSL
+#ifdef USE_OPENSSL
static void ssl_manager_open_cb(MainWindow *mainwin, guint action,
GtkWidget *widget)
{
#define BREAK_ON_MODIFIER_KEY() \
if ((event->state & (GDK_MOD1_MASK|GDK_CONTROL_MASK)) != 0) break
-static void key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer data)
+void mainwindow_key_pressed (GtkWidget *widget, GdkEventKey *event,
+ gpointer data)
{
MainWindow *mainwin = (MainWindow*) data;