cxw42/TabFern

Add tab count

UNIVAC-Colonel-Panic opened this issue · 1 comments

At the top level tree node for each window -- where it normally shows "Unsaved" or "Recovered tabs" or a customized label -- can you show the number of open tabs?

Here's why this would be helpful: When I'm researching something on the web, I don't always stop after opening the first tab, switch to TF and put in a custom label. When something causes Chrome to crash, or to be restarted (thank you Windows Update!), I usually go to Chrome Menu->HIstory->Recently closed. It lists the tab count by each recently closed window, Having TF show its tab count by window would make it easier to match up against the tab count Chrome shows, making it quicker to have TF restore a window I'm interested in.

cxw42 commented

@SamHasler Following up on my #35 (comment), I think this can be done entirely in app/win/model.js (possibly plus tests).

In getWinOpenChildCount():

  • Modify to return both the number open and the total. This function isn't currently used, so nothing should break :) .

In get_html_label():

  • Get the node_id from vn_by_vorny
  • Check if val.ty === K.IT_WIN. If so:
    • Call getWinOpenChildCount(node_id)
    • Add an indication of the total and number open to retval. Put this first, before the isPinned check.