GNOME Bugzilla – Bug 687327
Support showing open documents in a combobox instead of in tabs.
Last modified: 2012-11-18 09:53:15 UTC
I find showing the open documents in tabs to be quite bad for a number of reasons. 1) In many projects multiple files have the same name so it's impossible to distinguish which tab corresponds to the correct file. 2) It's hard to visually scan over a large number of tabs. The following patches add support for showing the open documents in a drop-down list. The documents is shown using their path relative to the project root. e5e95de document-manager: Fix various compile warnings. b8d6930 document-manager: Support showing open documents in a combobox. 5766c63 document-manager: Remove obsolete code for tabbing between documents.
Created attachment 227784 [details] [review] document-manager: Fix various compile warnings. Remove some instances of unused variables and usage of deprecated functions. Completely remove the custom styling of the tab close button since it looks good without it anyway.
Created attachment 227785 [details] [review] document-manager: Support showing open documents in a combobox.
Created attachment 227786 [details] [review] document-manager: Remove obsolete code for tabbing between documents. The code was never used since we didn't set any keybindings for the next and previous buffers. It also relied on AnjutaDocman being a GtkNoteBook which is no longer the case.
Review of attachment 227785 [details] [review]: Thanks for your work, but I think there are a few memory leaks. * in on_combo_changed in anjuta-docman.c I think gtk_tree_model_get increase the reference count of the object so you need to call g_object_unref. * in combo_sort_func in anjuta-docman.c In a similar way, I think gtk_tree_model_get return a newly allocated string, so you have to free it when you don't need it anymore. * in anjuta_docman_add_document_to_combo in anjuta-docman.c Instead of '/', it's a bit better to use G_DIR_SEPARATOR. * in anjuta_docman_get_iter_for_document in anjuta-docman.c I think gtk_tree_model_get increase the reference count of the object so you need to call g_object_unref.
Review of attachment 227784 [details] [review]: Thank for your patch. I have just committed it without changes.
Created attachment 228728 [details] [review] anjuta-window: Don't call gtk_widget_show_all when setting up widget. Just call gtk_widget_show instead. Calling gtk_widget_show_all breaks widgets that not always want to show all children. Also fixup the document-manager, git and snippets-manager plugins which relied on gtk_widget_show_all to be called by anjuta-window.c.
Created attachment 228729 [details] [review] document-manager: Support showing open documents in a combobox.
Created attachment 228730 [details] [review] document-manager: Remove obsolete code for tabbing between documents. The code was never used since we didn't set any keybindings for the next and previous buffers. It also relied on AnjutaDocman being a GtkNoteBook which is no longer the case.
Review of attachment 228728 [details] [review]: Thank for you patch. It looks fine, I have comitted it.
Review of attachment 228729 [details] [review]: Thank for this patch. I think it's fine now, I have committed it. I have just fixed some whitespace errors reported by git. I have only a small remark. The combo box is at the top of the document near the top of the screen. Quite often it doesn't fit on the screen and Gtk moves it below but it doesn't move its content. Have you seen it too? Do you know if it's possible to fix it in Anjuta?
Review of attachment 228730 [details] [review]: Thank for your patch. I have committed it.