0.8.6claws75
[claws.git] / src / mainwindow.c
index fa64f2d5182e625cd13fc9e1e5187a7646e6d3b0..d6fb53558f3e343088d8f9dadd370bcccdd6586f 100644 (file)
@@ -246,9 +246,6 @@ static void toolbar_reply_to_sender_cb      (GtkWidget      *widget,
 static void toolbar_forward_cb         (GtkWidget      *widget,
                                         gpointer        data);
 
-static void toolbar_delete_cb          (GtkWidget      *widget,
-                                        gpointer        data);
-
 static void toolbar_exec_cb            (GtkWidget      *widget,
                                         gpointer        data);
 
@@ -467,7 +464,7 @@ static void prefs_scoring_open_cb   (MainWindow     *mainwin,
 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);
@@ -765,7 +762,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
                                                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},
@@ -782,7 +779,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
                                                NULL, prefs_toolbar_cb, TOOLBAR_MAIN, NULL},
        {N_("/_Configuration/C_ustomize toolbars/_Compose window..."),
                                                NULL, prefs_toolbar_cb, TOOLBAR_COMPOSE, NULL},
-       {N_("/_Configuration/C_ustomize toolbars/M_essageView ..."),
+       {N_("/_Configuration/C_ustomize toolbars/M_essage view..."),
                                                NULL, prefs_toolbar_cb, TOOLBAR_MSGVIEW, NULL},
        {N_("/_Configuration/_Scoring..."),
                                                NULL, prefs_scoring_open_cb, 0, NULL},
@@ -1779,51 +1776,18 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
 
 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;
@@ -2379,14 +2343,6 @@ static void toolbar_forward_cb(GtkWidget *widget,
                reply_cb(mainwin, COMPOSE_FORWARD, NULL);
 }
 
-static void toolbar_delete_cb(GtkWidget          *widget,
-                             gpointer     data)
-{
-       MainWindow *mainwin = (MainWindow *)data;
-
-       summary_delete(mainwin->summaryview);
-}
-
 static void toolbar_exec_cb(GtkWidget  *widget,
                            gpointer     data)
 {
@@ -3491,7 +3447,7 @@ static void prefs_actions_open_cb(MainWindow *mainwin, guint action,
 {
        prefs_actions_open(mainwin);
 }
-#ifdef USE_SSL
+#ifdef USE_OPENSSL
 static void ssl_manager_open_cb(MainWindow *mainwin, guint action,
                                  GtkWidget *widget)
 {