Toolbar and Navigator reorganization

Maybe under a specific “bugbot” forum category

1 Like

Yeah. An ‘opt in’ would alleviate the SPAM aspect.

However, I wouldn’t opt in despite really wanting to help the project. (On the other hand, my view on punishing SPAMmers & malware instigators is rather… extreme.)

Would anyone else opt in?

Now I use this :

This could simplify configuration settings: hide / unhide and positions of the left, middle,and right blocks in the toolbar.

Best regrards.

3 Likes

Very cool. Is it possible to use it too?

1 Like

I don’t have any shareable stuff just now because I’m tinkering with the Gramps interface for now.
But I think you are also coding so the principle is, in grampsui.py, to move the <child> and <placeholder> tags from <object class = “GtkToolbar” id = “ToolBar”> in the order you want and to replace class separators “GtkSeparatorToolItem” by:

<! -- ___________________SEPARATOR____________START_____ -->
     <child>
       <object class = "GtkToolButton">
         <property name = "sensitive"> False </property>
       </object>
       <packing>
         <property name = "expand"> True </property>
       </packing>
     </child>
<! -- ___________________SEPARATOR____________END______ -->

(the two spaces in the toolbar screenshot toolbar are these separators).

Best regards.

2 Likes

(GrampsAIO64-5.1.3-2, Windows 10, Adwaita dark theme)
Edited december 22 2020

And to test the horizontal navigator and reorganized toolbar here is the hack:

1 - Backup categorysidebar.py, navigator.py, viewmanager.py, grampsgui.py and config.py
2 - Before replacing the following files display the Navigator and select Category as view.
3 - Get the 7 modified files and replace them in your Gramps installation.
(you can see modifications by performing a text search on “###” in these files)
4 - Run Gramps
5 - Take in place your original files after test.

The 7 modified files are in the zip file here :

Install icons for Plugin manager and Preferences available here (only svg files are required) :

[EDIT : new version : december 22 2020]
This version allows you to modify categories’s buttons order, separators and colors used (see the first change in file categorysidebar.py).

  • Toolbar and horizontal categories’s bar positions are inverted.
  • A button to show/hide menu bar and another one to show some tools are added to the toolbar.
  • Popup menus replaced with popover menus
  • Combined tree managment button and recent trees list menu
  • Opened tree name removed from the recent trees list
  • Add a Dynamic Navigator mode for smalls screens : to test it :
    1 - select : “Show text label beside Navigator buttons” in Preferences’s Display tab
    2 - in categorysidebar.py replace “False” by “True” in the line
    self.use_dyna_nav = False and use_text
    to read
    self.use_dyna_nav = True and use_text
  • Navigator mode configuration context menu (icons only, text only, icons and text, dynamic navigator +
    big or small icons).
    To access menu right click a button inside the Navigator.
    Do your choices and restart Gramps after.(now no restart is needed).

Best regards.

2 Likes

Not a comment on the horizontal Navigator Bar (which appeals to me greatly) but …

does anyone else have problems with the toolbar failing to update the contextually revealed icons? Particularly when switching to the Relationships view?

I sometimes have to switch to another View & back to gain access to the add Spouse button.

I have just try and apparently don’t have the problem.
Perhaps this is linked to operating system in use (i have tested on Windows10).

Best regards.

1 Like

I am also using Windows.

This is a latency problem that grows worse as the session stretches into hours of use. (And my Tree has over 30k people.)

At some point after the latency becomes pronounced, I click the Relationships navigator button and the Navigator buttons for People AND Relationships remain highlighted. From this point forward the View switching is highly unreliable and I have to close & re-open Gramps.

Thank you for the zip file!

Do you know where does the difference between your small buttons and mine very large come from?

Be sure to have well replaced all the three files and to have the good new files (i had first posted a link that didn’t contained good version of transformed files).
[EDIT] From where comes the bar “nom contient” in you screenshot ?

Best regards.

Interesting.
It is true that more testing should be done at this level.
I’m not there, but just an idea: if it is possible to easily disable relationships give it a try by disabling it.
Also see if there are any problems with other views.
And obviously be sure this doesn’t occurs with original files.

Best regards.

The only way to disable any view is through a manual edit of the gramps.ini file. And to do this Gramps must be closed and then restarted. And that would defeat any latency issue.

1 Like

A new version of horizonatl navigator is here :
Toolbar reorganization

This propose a new organization of categories’s buttons :

Best regards.

1 Like

How do you manage the category/Drop-down/Expander of the navigation ?
This is not the only way to show the views.

For a test, I installed the modifications. I use the Drop-Down side bar as my only option and the result was that nothing was displayed.

I have my Gramps using only the Drop-Down hiding the other two options (Category and Expander). That with removing the ‘Show text label beside Navigator buttons’ (Preferences General tab) leaves just the View icons down the left-hand side.

And yes, I have tweaked the order of the icons by manually editing gramps.ini.

This selector is not supported here (it is removed from navigator.py).
I took categorysidebar.py as a base to get the horizontal selection of categories as I wanted for my personal use.
As stated the “hack” can only work correctly if Category mode was selected before replacing the files.

At first glance, I think the options for this selector (Navigator’s display modes) could end up in Gramps preferences (which would avoid wasting space in the horizontal display to display this selector).
And a second ToolBar to put the categories’s buttons in a horizontal bar would seem preferable to me too.

That said really “at first glance” as I discover the code (20 years soon :slight_smile: if I read correctly) of Gramps, Gtk, Python and even Gramps itself.
This is to say that after testing I wouldn’t say no to horizontal categories display (I think there might even be a way to think about a solution for 800x600 display when button text is displayed).

Best regards.

Do you think you could do something with the Navigator mode selector?

When you set Display Preferences have labels enabled for the Navigator, the Labels for the selector keeps the width of the Navigator sidebar split too wide.

Maybe it could be iconified too when labels are off?

The Category selector goes away when you Hide the other two sidebar options in Plugin Manager. If there is only one option, there is nothing else to select.

Here are all three options where the other two options are hidden using Plugin Manager and the ‘Show text label beside Navigator buttons’ is unchecked.

2 Likes

It that part of the hack? The selector never goes away using 5.1.3-2 on my Win10 box. The extra space lost to the Navigator has been a niggling annoyance for years.