diff thunar/thunar/thunar-standard-view.c my-thunar/thunar/thunar-standard-view.c 4220,4221c4220,4221 < g_signal_connect (G_OBJECT (view), "button-release-event", G_CALLBACK (thunar_standard_view_button_release_event), standard_view); < g_signal_connect (G_OBJECT (view), "motion-notify-event", G_CALLBACK (thunar_standard_view_motion_notify_event), standard_view); --- > g_signal_connect_after (G_OBJECT (view), "button-release-event", G_CALLBACK (thunar_standard_view_button_release_event), standard_view); > g_signal_connect_after (G_OBJECT (view), "motion-notify-event", G_CALLBACK (thunar_standard_view_motion_notify_event), standard_view); diff thunar/thunar/thunar-window.c my-thunar/thunar/thunar-window.c 68d67 < 82a82 > PANE_WINDOW, 105a106 > static gboolean thunar_window_pane_window (ThunarWindow *window); 249a251,253 > static gboolean thunar_window_notebook_select (GtkWidget *notebook, > GdkEvent *event, > ThunarWindow *window); 258a263 > gboolean (*pane_window) (ThunarWindow *window); 310a316 > GtkWidget *panes; 313a320,321 > GtkWidget *notebook1; > GtkWidget *notebook2; 419a428 > klass->pane_window = thunar_window_pane_window; 502a512,528 > * ThunarWindow::pane-window: > * @window : a #ThunarWindow instance. > * > * Emitted whenever the user requests to pane the window > * of the currently displayed folder. This is an internal > * signal used to bind the action to keys. > **/ > window_signals[PANE_WINDOW] = > g_signal_new (I_("pane-window"), > G_TYPE_FROM_CLASS (klass), > G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, > G_STRUCT_OFFSET (ThunarWindowClass, pane_window), > g_signal_accumulator_true_handled, NULL, > _thunar_marshal_BOOLEAN__VOID, > G_TYPE_BOOLEAN, 0); > > /** 621a648 > gtk_binding_entry_add_signal (binding_set, GDK_F3, 0, "pane-window", 0); 860c887 < gtk_paned_pack2 (GTK_PANED (window->paned), window->view_box, TRUE, FALSE); --- > gtk_paned_add2 (GTK_PANED (window->paned), window->view_box); 862a890,895 > /* Create panes when the notebook will be */ > window->panes = gtk_hpaned_new (); > gtk_widget_add_events (window->panes, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK); > gtk_table_attach (GTK_TABLE (window->view_box), window->panes, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); > gtk_widget_show (window->panes); > 864,877c897,911 < window->notebook = gtk_notebook_new (); < gtk_table_attach (GTK_TABLE (window->view_box), window->notebook, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); < g_signal_connect (G_OBJECT (window->notebook), "switch-page", G_CALLBACK (thunar_window_notebook_switch_page), window); < g_signal_connect (G_OBJECT (window->notebook), "page-added", G_CALLBACK (thunar_window_notebook_page_added), window); < g_signal_connect (G_OBJECT (window->notebook), "page-removed", G_CALLBACK (thunar_window_notebook_page_removed), window); < g_signal_connect_after (G_OBJECT (window->notebook), "button-press-event", G_CALLBACK (thunar_window_notebook_button_press_event), window); < g_signal_connect (G_OBJECT (window->notebook), "popup-menu", G_CALLBACK (thunar_window_notebook_popup_menu), window); < g_signal_connect (G_OBJECT (window->notebook), "create-window", G_CALLBACK (thunar_window_notebook_create_window), window); < gtk_notebook_set_show_border (GTK_NOTEBOOK (window->notebook), FALSE); < gtk_notebook_set_homogeneous_tabs (GTK_NOTEBOOK (window->notebook), TRUE); < gtk_notebook_set_scrollable (GTK_NOTEBOOK (window->notebook), TRUE); < gtk_container_set_border_width (GTK_CONTAINER (window->notebook), 0); < gtk_notebook_set_group_name (GTK_NOTEBOOK (window->notebook), "thunar-tabs"); < gtk_widget_show (window->notebook); --- > // notebook1 > window->notebook1 = gtk_notebook_new (); > gtk_paned_pack1 (GTK_PANED (window->panes), window->notebook1, TRUE, FALSE); > g_signal_connect (G_OBJECT (window->notebook1), "switch-page", G_CALLBACK (thunar_window_notebook_switch_page), window); > g_signal_connect (G_OBJECT (window->notebook1), "page-added", G_CALLBACK (thunar_window_notebook_page_added), window); > g_signal_connect (G_OBJECT (window->notebook1), "page-removed", G_CALLBACK (thunar_window_notebook_page_removed), window); > g_signal_connect_after (G_OBJECT (window->notebook1), "button-press-event", G_CALLBACK (thunar_window_notebook_button_press_event), window); > g_signal_connect (G_OBJECT (window->notebook1), "popup-menu", G_CALLBACK (thunar_window_notebook_popup_menu), window); > g_signal_connect (G_OBJECT (window->notebook1), "create-window", G_CALLBACK (thunar_window_notebook_create_window), window); > gtk_notebook_set_show_border (GTK_NOTEBOOK (window->notebook1), FALSE); > gtk_notebook_set_homogeneous_tabs (GTK_NOTEBOOK (window->notebook1), TRUE); > gtk_notebook_set_scrollable (GTK_NOTEBOOK (window->notebook1), TRUE); > gtk_container_set_border_width (GTK_CONTAINER (window->notebook1), 0); > gtk_notebook_set_group_name (GTK_NOTEBOOK (window->notebook1), "thunar-tabs"); > gtk_widget_show (window->notebook1); 882c916 < gtk_widget_modify_style (window->notebook, style); --- > gtk_widget_modify_style (window->notebook1, style); 884a919,924 > // notebook2 > window->notebook2 = NULL; > > /* The notebook selected and actived */ > window->notebook = window->notebook1; > 917c957 < gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), last_statusbar_visible); --- > gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), last_statusbar_visible); 1389a1430,1553 > static gboolean > thunar_window_pane_window (ThunarWindow *window) > { > ThunarFile *directory; > GtkRcStyle *style; > > _thunar_return_val_if_fail (THUNAR_IS_WINDOW (window), FALSE); > _thunar_return_val_if_fail (window->view_type != G_TYPE_NONE, FALSE); > > /* if two panes are showed then remove not selected one */ > if (window->notebook1 != NULL && window->notebook2 != NULL) > { > /* notebook1 is the selected notebook so it destroys notebook2 */ > if (window->notebook == window->notebook1) > { > gtk_widget_destroy (window->notebook2); > window->notebook2 = NULL; > } > /* notebook2 is the selected notebook so it destroys notebook1 */ > else > { > gtk_widget_destroy (window->notebook1); > window->notebook1 = NULL; > } > } > /* notebook1 is null so it crates it */ > else if (window->notebook1 == NULL) > { > /* create the notebook1 */ > window->notebook1 = gtk_notebook_new (); > gtk_paned_pack1 (GTK_PANED (window->panes), window->notebook1, TRUE, FALSE); > g_signal_connect (G_OBJECT (window->notebook1), "switch-page", G_CALLBACK (thunar_window_notebook_switch_page), window); > g_signal_connect (G_OBJECT (window->notebook1), "page-added", G_CALLBACK (thunar_window_notebook_page_added), window); > g_signal_connect (G_OBJECT (window->notebook1), "page-removed", G_CALLBACK (thunar_window_notebook_page_removed), window); > g_signal_connect_after (G_OBJECT (window->notebook1), "button-press-event", G_CALLBACK (thunar_window_notebook_button_press_event), window); > g_signal_connect (G_OBJECT (window->notebook1), "popup-menu", G_CALLBACK (thunar_window_notebook_popup_menu), window); > g_signal_connect (G_OBJECT (window->notebook1), "create-window", G_CALLBACK (thunar_window_notebook_create_window), window); > gtk_notebook_set_show_border (GTK_NOTEBOOK (window->notebook1), FALSE); > gtk_notebook_set_homogeneous_tabs (GTK_NOTEBOOK (window->notebook1), TRUE); > gtk_notebook_set_scrollable (GTK_NOTEBOOK (window->notebook1), TRUE); > gtk_container_set_border_width (GTK_CONTAINER (window->notebook1), 0); > gtk_notebook_set_group_name (GTK_NOTEBOOK (window->notebook1), "thunar-tabs"); > gtk_widget_show (window->notebook1); > > /* drop the notebook borders */ > style = gtk_rc_style_new (); > style->xthickness = style->ythickness = 0; > gtk_widget_modify_style (window->notebook1, style); > g_object_unref (G_OBJECT (style)); > > /* set notebook2 to selected notebook */ > window->notebook = window->notebook1; > directory = thunar_window_get_current_directory (window); > thunar_window_notebook_insert (window, directory); > } > /* Otherwise notebook2 is null so it creates it */ > else > { > /* create the notebook2 */ > window->notebook2 = gtk_notebook_new (); > gtk_paned_pack2 (GTK_PANED (window->panes), window->notebook2, TRUE, FALSE); > g_signal_connect (G_OBJECT (window->notebook2), "switch-page", G_CALLBACK (thunar_window_notebook_switch_page), window); > g_signal_connect (G_OBJECT (window->notebook2), "page-added", G_CALLBACK (thunar_window_notebook_page_added), window); > g_signal_connect (G_OBJECT (window->notebook2), "page-removed", G_CALLBACK (thunar_window_notebook_page_removed), window); > g_signal_connect_after (G_OBJECT (window->notebook2), "button-press-event", G_CALLBACK (thunar_window_notebook_button_press_event), window); > g_signal_connect (G_OBJECT (window->notebook2), "popup-menu", G_CALLBACK (thunar_window_notebook_popup_menu), window); > g_signal_connect (G_OBJECT (window->notebook2), "create-window", G_CALLBACK (thunar_window_notebook_create_window), window); > gtk_notebook_set_show_border (GTK_NOTEBOOK (window->notebook2), FALSE); > gtk_notebook_set_homogeneous_tabs (GTK_NOTEBOOK (window->notebook2), TRUE); > gtk_notebook_set_scrollable (GTK_NOTEBOOK (window->notebook2), TRUE); > gtk_container_set_border_width (GTK_CONTAINER (window->notebook2), 0); > gtk_notebook_set_group_name (GTK_NOTEBOOK (window->notebook2), "thunar-tabs"); > gtk_widget_show (window->notebook2); > > /* drop the notebook borders */ > style = gtk_rc_style_new (); > style->xthickness = style->ythickness = 0; > gtk_widget_modify_style (window->notebook2, style); > g_object_unref (G_OBJECT (style)); > > /* set notebook2 to selected notebook */ > window->notebook = window->notebook2; > directory = thunar_window_get_current_directory (window); > thunar_window_notebook_insert (window, directory); > } > > return TRUE; > } > > > > static gboolean > thunar_window_notebook_select (GtkWidget *view, > GdkEvent *event, > ThunarWindow *window) > { > GtkWidget *selected_notebook; > gint current_page_n; > GtkWidget *current_page; > > /* if there is not two panes (notebook2 == NULL) nothing to do */ > if (window->notebook2 == NULL) > return FALSE; > > /* notebook selected */ > selected_notebook = gtk_widget_get_ancestor (view, GTK_TYPE_NOTEBOOK); > > /* if the notebook selected is the same than the current notebook selected nothing to do */ > if (selected_notebook == window->notebook) > return FALSE; > > /* select and activate selected notebook */ > window->notebook = selected_notebook; > current_page_n = gtk_notebook_get_current_page (GTK_NOTEBOOK (window->notebook)); > current_page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (window->notebook), current_page_n); > thunar_component_set_ui_manager (THUNAR_COMPONENT (window->view), NULL); > window->view = NULL; > thunar_window_notebook_switch_page (window->notebook, current_page, current_page_n, window); > > return FALSE; > } > > > 1542c1706,1707 < _thunar_return_if_fail (window->notebook == notebook); --- > _thunar_return_if_fail (window->notebook1 == notebook || > window->notebook2 == notebook); 1551c1716 < if (n_pages == 0) --- > if (n_pages == 0 && window->notebook2 == NULL) 1771a1937,1941 > > /* connect signal view */ > gtk_widget_add_events (GTK_WIDGET (view), GDK_BUTTON_PRESS_MASK); > g_signal_connect (G_OBJECT (GTK_BIN (view)->child), "button-press-event", G_CALLBACK (thunar_window_notebook_select), window); > g_signal_connect (G_OBJECT (GTK_BIN (view)->child), "button-release-event", G_CALLBACK (thunar_window_notebook_select), window);