Final Report

Overview

I was selected as a contributor for the Google Summer of Code for the GNOME Foundation and worked on the project Revamp New Documents Submenu in the nautilus (Files) app.
The goal of the project was to solve the long-standing issues with the New Document creation feature by creating a new composite GTK widget for it.

Mentor

A big thanks to my mentor, António Fernandes @antoniof. Without their help, this would have not been possible. They helped me in each and every way to tackle the problems faced during the project.

Code: Link

My work has been merged into a feature branch in the official GNOME/nautilus git repository! 

Work Report

During the first few weeks, there was some trial and error exploration as to what is the best widget to solve all the issues of the template creation feature. 

The first implementation was a GtkListBox, which took the GtkExpander and GtkBox widgets as its children, making the whole list of templates visible in a single view.

But since this custom widget was the child of the GtkPopoverMenu, there were a few flaws with this:

  • Searching for templates was not working well in this format.
  • The new document creation feature is accessible from the context menu as well as the path bar menu. But it proved difficult to use the same widget in the path bar menu.
So, we scrapped this idea and decided to use a dialog box for the templates submenu. This pretty much solved all the issues I was facing. The custom widget is the same, the only difference is that instead of it being a child of the GtkPopoverMenu, it is now implemented in a dialog box!

This is the first dialog box implementation of the new documents submenu, and it looks better straightaway!


After a few tweaks and improving the visuals, this is the final result:

Visual changes


As shown in the above comparison, the font and icon size are increased, making it even easier to read and recognize the type of files. Also, the size of the row is increased, to make the overall GtkListBox look cleaner. The padding between the search bar and the list box; and the padding between the list box and import button is made equal as well!

Search

Searching for templates is as easy as ever! Just type in the template name in the search bar, and it will find it for you :D



The cpp_file.cpp is in the coding directory and is not visible without expanding the directory, but with the help of a search, it's extremely straightforward to find it. 

Template creation

The most important feature of all, obviously, is the creation of templates. The create button is used to create new templates through the dialog box. 


A text_file template is selected, the create button is clicked, and the template is created 🎉

Blogs



Comments