Revision: 3492 http://geany.svn.sourceforge.net/geany/?rev=3492&view=rev Author: ntrel Date: 2009-01-20 16:46:15 +0000 (Tue, 20 Jan 2009)
Log Message: ----------- Fix focusing the editor after clicking on a notebook tab.
Modified Paths: -------------- trunk/ChangeLog trunk/src/notebook.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-01-20 16:34:11 UTC (rev 3491) +++ trunk/ChangeLog 2009-01-20 16:46:15 UTC (rev 3492) @@ -4,6 +4,8 @@ Disable documents popup menu items when invalid. Make close, save menu items work for all children when a parent row is selected. + * src/notebook.c: + Fix focusing the editor after clicking on a notebook tab.
2009-01-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/notebook.c =================================================================== --- trunk/src/notebook.c 2009-01-20 16:34:11 UTC (rev 3491) +++ trunk/src/notebook.c 2009-01-20 16:46:15 UTC (rev 3492) @@ -82,7 +82,7 @@ { GeanyDocument *doc = document_get_current();
- if (doc != NULL) + if (doc != NULL && event->button == 1) gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci));
return FALSE; @@ -221,10 +221,6 @@ g_signal_connect_after(main_widgets.notebook, "button-press-event", G_CALLBACK(notebook_tab_bar_click_cb), NULL);
- /* focus the current document after clicking on a tab */ - g_signal_connect_after(main_widgets.notebook, "button-release-event", - G_CALLBACK(focus_sci), NULL); - g_signal_connect(main_widgets.notebook, "drag-data-received", G_CALLBACK(on_window_drag_data_received), NULL);
@@ -478,6 +474,9 @@ ebox = gtk_event_box_new(); GTK_WIDGET_SET_FLAGS(ebox, GTK_NO_WINDOW); g_signal_connect(ebox, "button-press-event", G_CALLBACK(notebook_tab_click), page); + /* focus the current document after clicking on a tab */ + g_signal_connect_after(ebox, "button-release-event", + G_CALLBACK(focus_sci), NULL);
hbox = gtk_hbox_new(FALSE, 2); gtk_box_pack_start(GTK_BOX(hbox), this->priv->tab_label, FALSE, FALSE, 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.