@@ -169,7 +169,8 @@ public class Mail.MessageListItem : Gtk.ListBoxRow {
169169 small_fields_grid. attach (small_from_label, 0 , 0 , 1 , 1 );
170170
171171 header_stack = new Gtk .Stack () {
172- homogeneous = false ,
172+ hhomogeneous = false ,
173+ vhomogeneous = false ,
173174 transition_type = CROSSFADE
174175 };
175176 header_stack. add_named (fields_grid, " large" );
@@ -290,12 +291,12 @@ public class Mail.MessageListItem : Gtk.ListBoxRow {
290291 margin_bottom = 12 ,
291292 margin_start = 12 ,
292293 margin_end = 12 ,
293- message_type = WARNING
294+ message_type = WARNING ,
295+ revealed = false
294296 };
295297 blocked_images_infobar.add_button (_ ("Show Images "), 1);
296298 blocked_images_infobar.add_button (_ ("Always Show from Sender "), 2);
297299 blocked_images_infobar.get_style_context ().add_class (Gtk .STYLE_CLASS_FRAME );
298- blocked_images_infobar. no_show_all = true ;
299300
300301 var infobar_content = blocked_images_infobar.get_content_area ();
301302 infobar_content.add (new Gtk .Label (_ ("This message contains remote images .")));
@@ -323,9 +324,9 @@ public class Mail.MessageListItem : Gtk.ListBoxRow {
323324 secondary_box.add (web_view );
324325
325326 secondary_revealer = new Gtk .Revealer () {
327+ child = secondary_box,
326328 transition_type = SLIDE_UP
327329 };
328- secondary_revealer.add (secondary_box );
329330
330331 var base_box = new Gtk .Box (VERTICAL , 0 ) {
331332 hexpand = true ,
@@ -349,7 +350,7 @@ public class Mail.MessageListItem : Gtk.ListBoxRow {
349350 secondary_box. add (attachment_bar);
350351 }
351352
352- add ( base_box ) ;
353+ child = base_box;
353354 expanded = false ;
354355 show_all ();
355356
@@ -360,13 +361,6 @@ public class Mail.MessageListItem : Gtk.ListBoxRow {
360361 });
361362 }
362363
363- /* Override default handler to stop event propagation. Otherwise clicking the menu will
364- expand or collapse the MessageListItem. */
365- actions_menu_button.button_release_event.connect ((event ) => {
366- actions_menu_button. set_active (true );
367- return Gdk . EVENT_STOP ;
368- });
369-
370364 header_event_box.enter_notify_event.connect ((event ) => {
371365 if (event. detail != Gdk . NotifyType . INFERIOR ) {
372366 var window = header_event_box. get_window ();
@@ -381,17 +375,18 @@ public class Mail.MessageListItem : Gtk.ListBoxRow {
381375 }
382376 });
383377
384- header_event_box.button_release_event.connect ((event ) => {
378+ var click_gesture = new Gtk .GestureMultiPress (header_event_box);
379+
380+ click_gesture.released.connect (() => {
385381 expanded = ! expanded;
386- return Gdk . EVENT_STOP ;
382+ click_gesture . set_state ( CLAIMED ) ;
387383 });
388384
389385 destroy.connect (() => {
390386 loading_cancellable. cancel ();
391387 });
392388
393- /* Connecting to clicked () doesn't allow us to prevent the event from propagating to header_event_box */
394- starred_button.button_release_event.connect (() => {
389+ starred_button.clicked.connect (() => {
395390 if (Camel . MessageFlags . FLAGGED in (int ) message_info. flags) {
396391 message_info. set_flags (Camel . MessageFlags . FLAGGED , 0 );
397392 starred_icon. icon_name = " non-starred-symbolic" ;
@@ -401,12 +396,10 @@ public class Mail.MessageListItem : Gtk.ListBoxRow {
401396 starred_icon. icon_name = " starred-symbolic" ;
402397 starred_icon. tooltip_text = _(" Unstar message" );
403398 }
404-
405- return Gdk . EVENT_STOP ;
406399 });
407400
408401 web_view.image_load_blocked.connect (() => {
409- blocked_images_infobar. show () ;
402+ blocked_images_infobar. revealed = true ;
410403 });
411404 web_view.link_activated.connect ((uri ) => {
412405 try {
@@ -550,7 +543,7 @@ public class Mail.MessageListItem : Gtk.ListBoxRow {
550543 }
551544
552545 web_view. load_images ();
553- blocked_images_infobar. destroy () ;
546+ blocked_images_infobar. revealed = false ;
554547 });
555548 }
556549
0 commit comments