Changes to the rcoabm popups (thanks to Melvin)
authorCarsten Schurig <Carsten.Schurig@web.de>
Fri, 14 Dec 2001 08:47:28 +0000 (08:47 +0000)
committerCarsten Schurig <Carsten.Schurig@web.de>
Fri, 14 Dec 2001 08:47:28 +0000 (08:47 +0000)
ChangeLog.claws
configure.in
src/mainwindow.c

index a02635e33e68c076a37dceaf1dce76029267a6ab..e8df63625e114ba0ef4063d4c35df81fceccea23 100644 (file)
@@ -1,3 +1,9 @@
+2001-12-14 [carsten]   0.6.5claws85
+       * src/mainwindow.c
+               following a suggestion of Melvin the rcoabm pops up
+               right under the button now and the button is reliefed
+               while the popup is open
+
 2001-12-14 [darko]     0.6.5claws84
 
        * src/compose.c
 2001-12-14 [darko]     0.6.5claws84
 
        * src/compose.c
index 4217c5ca2a5093646c8dc5b46c45a7f89ae6c396..8b52c59d634ee72cb7d59c05501c5f513b4bf46e 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws84
+EXTRA_VERSION=claws85
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index e9fd4c18199d2cd271630c13570817f91c56e4f0..31e6e37ebb85e4ad32a88109cf48fde5259a3a92 100644 (file)
@@ -127,21 +127,29 @@ static void toolbar_reply_cb              (GtkWidget      *widget,
 static void toolbar_reply_popup_cb     (GtkWidget      *widget,
                                         GdkEventButton *event,
                                         gpointer        data);
 static void toolbar_reply_popup_cb     (GtkWidget      *widget,
                                         GdkEventButton *event,
                                         gpointer        data);
+static void toolbar_reply_popup_closed_cb(GtkMenuShell *menu_shell,
+                                        gpointer        data);
 static void toolbar_reply_to_all_cb    (GtkWidget      *widget,
                                         gpointer        data);
 static void toolbar_reply_to_all_popup_cb(GtkWidget    *widget,
                                         GdkEventButton *event,
                                         gpointer        data);
 static void toolbar_reply_to_all_cb    (GtkWidget      *widget,
                                         gpointer        data);
 static void toolbar_reply_to_all_popup_cb(GtkWidget    *widget,
                                         GdkEventButton *event,
                                         gpointer        data);
+static void toolbar_reply_to_all_popup_closed_cb(GtkMenuShell  *menu_shell,
+                                        gpointer        data);
 static void toolbar_reply_to_sender_cb (GtkWidget      *widget,
                                         gpointer        data);
 static void toolbar_reply_to_sender_popup_cb(GtkWidget *widget,
                                         GdkEventButton *event,
                                         gpointer        data);
 static void toolbar_reply_to_sender_cb (GtkWidget      *widget,
                                         gpointer        data);
 static void toolbar_reply_to_sender_popup_cb(GtkWidget *widget,
                                         GdkEventButton *event,
                                         gpointer        data);
+static void toolbar_reply_to_sender_popup_closed_cb(GtkMenuShell       *menu_shell,
+                                        gpointer        data);
 static void toolbar_forward_cb         (GtkWidget      *widget,
                                         gpointer        data);
 static void toolbar_forward_popup_cb   (GtkWidget      *widget,
                                         GdkEventButton *event,
                                         gpointer        data);
 static void toolbar_forward_cb         (GtkWidget      *widget,
                                         gpointer        data);
 static void toolbar_forward_popup_cb   (GtkWidget      *widget,
                                         GdkEventButton *event,
                                         gpointer        data);
+static void toolbar_forward_popup_closed_cb(GtkMenuShell       *menu_shell,
+                                        gpointer        data);
 
 static void toolbar_delete_cb          (GtkWidget      *widget,
                                         gpointer        data);
 
 static void toolbar_delete_cb          (GtkWidget      *widget,
                                         gpointer        data);
@@ -736,20 +744,28 @@ MainWindow *main_window_create(SeparateType type)
                        sizeof(reply_popup_entries[0]);
        reply_popup = popupmenu_create(window, reply_popup_entries, n_menu_entries,
                                      "<ReplyPopup>", mainwin);
                        sizeof(reply_popup_entries[0]);
        reply_popup = popupmenu_create(window, reply_popup_entries, n_menu_entries,
                                      "<ReplyPopup>", mainwin);
+       gtk_signal_connect(GTK_OBJECT(reply_popup), "selection_done",
+                          GTK_SIGNAL_FUNC(toolbar_reply_popup_closed_cb), mainwin);
        n_menu_entries = sizeof(replyall_popup_entries) /
                        sizeof(replyall_popup_entries[0]);
        replyall_popup = popupmenu_create(window, replyall_popup_entries, n_menu_entries,
                                      "<ReplyAllPopup>", mainwin);
        n_menu_entries = sizeof(replyall_popup_entries) /
                        sizeof(replyall_popup_entries[0]);
        replyall_popup = popupmenu_create(window, replyall_popup_entries, n_menu_entries,
                                      "<ReplyAllPopup>", mainwin);
+       gtk_signal_connect(GTK_OBJECT(replyall_popup), "selection_done",
+                          GTK_SIGNAL_FUNC(toolbar_reply_to_all_popup_closed_cb), mainwin);
        n_menu_entries = sizeof(replysender_popup_entries) /
                        sizeof(replysender_popup_entries[0]);
        replysender_popup = popupmenu_create(window, replysender_popup_entries, n_menu_entries,
                                      "<ReplySenderPopup>", mainwin);
        n_menu_entries = sizeof(replysender_popup_entries) /
                        sizeof(replysender_popup_entries[0]);
        replysender_popup = popupmenu_create(window, replysender_popup_entries, n_menu_entries,
                                      "<ReplySenderPopup>", mainwin);
+       gtk_signal_connect(GTK_OBJECT(replysender_popup), "selection_done",
+                          GTK_SIGNAL_FUNC(toolbar_reply_to_sender_popup_closed_cb), mainwin);
        /* create the popup menu for the forward button */
        n_menu_entries = sizeof(fwd_popup_entries) /
                        sizeof(fwd_popup_entries[0]);
        fwd_popup = popupmenu_create(window, fwd_popup_entries, n_menu_entries,
                                      "<ForwardPopup>", mainwin);
        /* create the popup menu for the forward button */
        n_menu_entries = sizeof(fwd_popup_entries) /
                        sizeof(fwd_popup_entries[0]);
        fwd_popup = popupmenu_create(window, fwd_popup_entries, n_menu_entries,
                                      "<ForwardPopup>", mainwin);
-                                         
+       gtk_signal_connect(GTK_OBJECT(fwd_popup), "selection_done",
+                          GTK_SIGNAL_FUNC(toolbar_forward_popup_closed_cb), mainwin);
+                          
        main_window_toolbar_create(mainwin, handlebox);
 
        /* vbox that contains body */
        main_window_toolbar_create(mainwin, handlebox);
 
        /* vbox that contains body */
@@ -1958,8 +1974,20 @@ static void toolbar_reply_popup_cb(GtkWidget *widget, GdkEventButton *event, gpo
        
        if (!event) return;
 
        
        if (!event) return;
 
-       if (event->button == 3)
-               gtk_menu_popup(GTK_MENU(mainwindow->reply_popup), NULL, NULL, NULL,     NULL, 1, 0);
+       if (event->button == 3) {
+               gtk_button_set_relief(GTK_BUTTON(widget), GTK_RELIEF_NORMAL);
+               gtk_menu_popup(GTK_MENU(mainwindow->reply_popup), NULL, NULL,
+                      menu_button_position, widget,
+                      event->button, event->time);
+       }
+}
+
+static void toolbar_reply_popup_closed_cb(GtkMenuShell *menu_shell, gpointer data)
+{
+       MainWindow *mainwin = (MainWindow *)data;
+
+       gtk_button_set_relief(GTK_BUTTON(mainwin->reply_btn), GTK_RELIEF_NONE);
+       manage_window_focus_in(mainwin->window, NULL, NULL);
 }
 
 static void toolbar_reply_to_all_popup_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
 }
 
 static void toolbar_reply_to_all_popup_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
@@ -1968,8 +1996,20 @@ static void toolbar_reply_to_all_popup_cb(GtkWidget *widget, GdkEventButton *eve
        
        if (!event) return;
 
        
        if (!event) return;
 
-       if (event->button == 3)
-               gtk_menu_popup(GTK_MENU(mainwindow->replyall_popup), NULL, NULL, NULL,  NULL, 1, 0);
+       if (event->button == 3) {
+               gtk_button_set_relief(GTK_BUTTON(widget), GTK_RELIEF_NORMAL);
+               gtk_menu_popup(GTK_MENU(mainwindow->replyall_popup), NULL, NULL,
+                      menu_button_position, widget,
+                      event->button, event->time);
+       }
+}
+
+static void toolbar_reply_to_all_popup_closed_cb(GtkMenuShell *menu_shell, gpointer data)
+{
+       MainWindow *mainwin = (MainWindow *)data;
+
+       gtk_button_set_relief(GTK_BUTTON(mainwin->replyall_btn), GTK_RELIEF_NONE);
+       manage_window_focus_in(mainwin->window, NULL, NULL);
 }
 
 static void toolbar_reply_to_sender_popup_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
 }
 
 static void toolbar_reply_to_sender_popup_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
@@ -1979,8 +2019,20 @@ static void toolbar_reply_to_sender_popup_cb(GtkWidget *widget, GdkEventButton *
 
        if (!event) return;
 
 
        if (!event) return;
 
-       if (event->button == 3)
-               gtk_menu_popup(GTK_MENU(mainwindow->replysender_popup), NULL, NULL, NULL,       NULL, 1, 0);
+       if (event->button == 3) {
+               gtk_button_set_relief(GTK_BUTTON(widget), GTK_RELIEF_NORMAL);
+               gtk_menu_popup(GTK_MENU(mainwindow->replysender_popup), NULL, NULL,
+                      menu_button_position, widget,
+                      event->button, event->time);
+       }
+}
+
+static void toolbar_reply_to_sender_popup_closed_cb(GtkMenuShell *menu_shell, gpointer data)
+{
+       MainWindow *mainwin = (MainWindow *)data;
+
+       gtk_button_set_relief(GTK_BUTTON(mainwin->replysender_btn), GTK_RELIEF_NONE);
+       manage_window_focus_in(mainwin->window, NULL, NULL);
 }
 
 static void toolbar_forward_popup_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
 }
 
 static void toolbar_forward_popup_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
@@ -1989,8 +2041,20 @@ static void toolbar_forward_popup_cb(GtkWidget *widget, GdkEventButton *event, g
        
        if (!event) return;
 
        
        if (!event) return;
 
-       if (event->button == 3)
-               gtk_menu_popup(GTK_MENU(mainwindow->fwd_popup), NULL, NULL, NULL,       NULL, 1, 0);
+       if (event->button == 3) {
+               gtk_button_set_relief(GTK_BUTTON(widget), GTK_RELIEF_NORMAL);
+               gtk_menu_popup(GTK_MENU(mainwindow->fwd_popup), NULL, NULL,
+                      menu_button_position, widget,
+                      event->button, event->time);
+       }
+}
+
+static void toolbar_forward_popup_closed_cb(GtkMenuShell *menu_shell, gpointer data)
+{
+       MainWindow *mainwin = (MainWindow *)data;
+
+       gtk_button_set_relief(GTK_BUTTON(mainwin->fwd_btn), GTK_RELIEF_NONE);
+       manage_window_focus_in(mainwin->window, NULL, NULL);
 }
 
 static void toolbar_inc_cb     (GtkWidget      *widget,
 }
 
 static void toolbar_inc_cb     (GtkWidget      *widget,