Kaydet (Commit) 4fa9eb2e authored tarafından Nick Treleaven's avatar Nick Treleaven

Don't select the current document when reordering tabs (fixes

#1632708).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1175 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst f7b31cac
......@@ -5,6 +5,9 @@
syntax, and C++ .h headers use correct syntax).
Add symbols_get_context_separator() and use for calltips and the
symbol list.
* src/treeviews.c, src/document.c:
Don't select the current document when reordering tabs (fixes
#1632708).
2007-01-11 Nick Treleaven <nick.treleaven@btinternet.com>
......
......@@ -281,9 +281,9 @@ static gint document_create_new_sci(const gchar *filename)
sci_set_lines_wrapped(sci, app->pref_editor_line_breaking);
// signal for insert-key(works without too, but to update the right status bar)
/* g_signal_connect((GtkWidget*) sci, "key-press-event",
G_CALLBACK(keybindings_got_event), GINT_TO_POINTER(new_idx));
*/ // signal for the popup menu
//g_signal_connect((GtkWidget*) sci, "key-press-event",
//G_CALLBACK(keybindings_got_event), GINT_TO_POINTER(new_idx));
// signal for the popup menu
g_signal_connect((GtkWidget*) sci, "button-press-event",
G_CALLBACK(on_editor_button_press_event), GINT_TO_POINTER(new_idx));
......@@ -316,6 +316,14 @@ static gint document_create_new_sci(const gchar *filename)
tabnum = notebook_new_tab(new_idx);
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), tabnum);
// select document in sidebar
{
GtkTreeSelection *sel;
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv.tree_openfiles));
gtk_tree_selection_select_iter(sel, &this->iter);
}
ui_close_buttons_toggle();
this->is_valid = TRUE; // do this last to prevent UI updating with NULL items.
......
......@@ -325,18 +325,14 @@ void treeviews_prepare_openfiles()
}
// Also sets doc_list[idx].iter.
/* Also sets doc_list[idx].iter.
* This is called recursively in treeviews_openfiles_update_all(). */
void treeviews_openfiles_add(gint idx)
{
GtkTreeIter *iter = &doc_list[idx].iter;
GtkTreeSelection *sel;
gtk_list_store_append(tv.store_openfiles, iter);
treeviews_openfiles_update(idx);
// select opened file
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv.tree_openfiles));
gtk_tree_selection_select_iter(sel, iter);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment