[Github-comments] [geany/geany] Add features for sorting editor tabs (#1144)

konsolebox notifications at xxxxx
Wed Jul 20 13:19:28 UTC 2016


This PR is about adding features to make it possible to sort the tabs in the editor area.  It includes the following changes:

04eb16b Add capability to automatically sort editor tabs
138dd09 Add keybindings for sorting editor tabs
803d6a6 Add capability to sort editor tabs
a64749e Allow document_get_notebook_child() to be used globally

I chose to place them in one PR so everything can be discussed in one place.   Each update depends on the other update that comes earlier than it.  Which means, if the last update is wanted (`04eb16b`), all other updates that came before it should be included, but if only `803d6a6` is wanted, it would only require `a64749e`.

Here are the snapshots:

http://imgur.com/6uYVd72
http://imgur.com/G4Fi9iV
http://imgur.com/VNOJaVv
http://imgur.com/Pb00zIK

The first 2 updates (`803d6a6` and `138dd09`) made a fair amount of changes in the code, but the last update had to be a little aggressive since the only way to get it done properly is to alter the codes that call `document_open_file()`.  Modifying `document_open_file()` itself would mean that every file opened would cause the order of tabs in the notebook widget to be recalculated and rearranged.

This could cause significant slowdown during startup time especially when opening a lot of files.  That's why the only proper way to do it is to make changes on the calling functions instead, where we could only allow a function like `notebook_auto_sort_tabs()` to be called once after multiple files are opened.

We can also create a wrapper function like `document_open_file_and_auto_sort_tabs()` but it would only apply to calling functions that only open a file once everytime they are called.

It's unlikely for the last update to be merged because of that, but please also consider the first two (`803d6a6` and `138dd09`).  I can create another PR for those if wanted.

You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/1144

-- Commit Summary --

  * Allow document_get_notebook_child() to be used globally
  * Add capability to sort editor tabs
  * Add keybindings for sorting editor tabs
  * Add capability to automatically sort editor tabs

-- File Changes --

    M data/geany.glade (30)
    M src/callbacks.c (4)
    M src/document.c (16)
    M src/document.h (2)
    M src/keybindings.c (22)
    M src/keybindings.h (2)
    M src/keyfile.c (15)
    M src/libmain.c (2)
    M src/msgwindow.c (6)
    M src/notebook.c (110)
    M src/notebook.h (14)
    M src/osx.c (3)
    M src/prefs.c (40)
    M src/symbols.c (8)
    M src/ui_utils.c (7)
    M src/ui_utils.h (2)
    M src/win32.c (10)

-- Patch Links --

https://github.com/geany/geany/pull/1144.patch
https://github.com/geany/geany/pull/1144.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1144
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160720/785ea314/attachment.html>


More information about the Github-comments mailing list