comparison src/bar.c @ 1778:e82401bf20c8

Fix contextual menus in lateral bars. Use button_release_event instead of button_press_event, this makes contextual menus persistent until an option is selected or the menu is closed.
author zas_
date Thu, 10 Dec 2009 17:44:31 +0000
parents 6e0f6d5e4c25
children 956aab097ea7
comparison
equal deleted inserted replaced
1777:56c019ed8746 1778:e82401bf20c8
515 gtk_widget_show(pd->title); 515 gtk_widget_show(pd->title);
516 } 516 }
517 517
518 gtk_box_pack_start(GTK_BOX(bd->vbox), expander, FALSE, TRUE, 0); 518 gtk_box_pack_start(GTK_BOX(bd->vbox), expander, FALSE, TRUE, 0);
519 519
520 g_signal_connect(expander, "button_press_event", G_CALLBACK(bar_menu_cb), bd); 520 g_signal_connect(expander, "button_release_event", G_CALLBACK(bar_menu_cb), bd);
521 521
522 gtk_container_add(GTK_CONTAINER(expander), pane); 522 gtk_container_add(GTK_CONTAINER(expander), pane);
523 523
524 gtk_expander_set_expanded(GTK_EXPANDER(expander), pd->expanded); 524 gtk_expander_set_expanded(GTK_EXPANDER(expander), pd->expanded);
525 525
608 G_CALLBACK(bar_destroy), bd); 608 G_CALLBACK(bar_destroy), bd);
609 609
610 g_signal_connect(G_OBJECT(bd->widget), "size-allocate", 610 g_signal_connect(G_OBJECT(bd->widget), "size-allocate",
611 G_CALLBACK(bar_size_allocate), bd); 611 G_CALLBACK(bar_size_allocate), bd);
612 612
613 g_signal_connect(G_OBJECT(bd->widget), "button_press_event", G_CALLBACK(bar_menu_cb), bd); 613 g_signal_connect(G_OBJECT(bd->widget), "button_release_event", G_CALLBACK(bar_menu_cb), bd);
614 614
615 bd->width = SIDEBAR_DEFAULT_WIDTH; 615 bd->width = SIDEBAR_DEFAULT_WIDTH;
616 gtk_widget_set_size_request(bd->widget, bd->width, -1); 616 gtk_widget_set_size_request(bd->widget, bd->width, -1);
617 617
618 box = gtk_hbox_new(FALSE, 0); 618 box = gtk_hbox_new(FALSE, 0);