* src/mainwindow.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 29 Dec 2002 16:11:53 +0000 (16:11 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 29 Dec 2002 16:11:53 +0000 (16:11 +0000)
when moving focus from a message view to the main
window, don't forget to select the summary node
of the displayed message. should fix "[ 659103 ]
focus-follows-mouse confuses sylpheed"

ChangeLog.claws
configure.in
src/mainwindow.c

index b340c1e0f48945420e165d631551b61c2a12ebcc..c12bd583fd4345cf0509c1d75a716185c684b650 100644 (file)
@@ -1,3 +1,11 @@
+2002-12-29 [alfons]    0.8.8claws25
+
+       * src/mainwindow.c
+               when moving focus from a message view to the main 
+               window, don't forget to select the summary node
+               of the displayed message. should fix "[ 659103 ] 
+               focus-follows-mouse confuses sylpheed"
+
 2002-12-29 [christoph] 0.8.8claws24
 
        * src/Makefile.am
index 922c4c568dbb6a85f8f9d51e3a8b215deb85d5ca..78e8268ae9ebcc778e9953c1517171f9eaf3dccd 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws24
+EXTRA_VERSION=claws25
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index d56630f4291ce867e5c6dc842555973685e26484..4f2297b5e9da0a4e5ffa85d1bf4887574086a6af 100644 (file)
@@ -392,6 +392,10 @@ static void addr_harvest_msg_cb     ( MainWindow  *mainwin,
                                   guint       action,
                                   GtkWidget   *widget );
 
+static gboolean mainwindow_focus_in_event      (GtkWidget      *widget, 
+                                                GdkEventFocus  *focus,
+                                                gpointer        data);
+
 #define  SEPARATE_ACTION 500 
 
 static GtkItemFactoryEntry mainwin_entries[] =
@@ -752,6 +756,9 @@ MainWindow *main_window_create(SeparateType type)
        gtk_signal_connect(GTK_OBJECT(window), "delete_event",
                           GTK_SIGNAL_FUNC(main_window_close_cb), mainwin);
        MANAGE_WINDOW_SIGNALS_CONNECT(window);
+       gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
+                          GTK_SIGNAL_FUNC(mainwindow_focus_in_event),
+                          mainwin);
        gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
                                GTK_SIGNAL_FUNC(mainwindow_key_pressed), mainwin);
 
@@ -2615,6 +2622,19 @@ static void scan_tree_func(Folder *folder, FolderItem *item, gpointer data)
        g_free(str);
 }
 
+static gboolean mainwindow_focus_in_event(GtkWidget *widget, GdkEventFocus *focus,
+                                         gpointer data)
+{
+       SummaryView *summary;
+
+       g_return_val_if_fail(data, FALSE);
+       summary = ((MainWindow *)data)->summaryview;
+       g_return_val_if_fail(summary, FALSE);
+       if (summary->selected != summary->displayed)
+               summary_select_node(summary, summary->displayed, FALSE, TRUE);
+       return FALSE;
+}
+
 #define BREAK_ON_MODIFIER_KEY() \
        if ((event->state & (GDK_MOD1_MASK|GDK_CONTROL_MASK)) != 0) break