Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Files Files
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 538
    • Issues 538
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 46
    • Merge requests 46
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • FilesFiles
  • Issues
  • #1207

Closed
Open
Created Aug 30, 2019 by António Fernandes@antoniof🐚Maintainer15 of 15 tasks completed15/15 tasks

Use GtkBuilder to construct the Properties window

Problem definition

The Properties dialog is an fundamental feature of Files. It exposes information that wouldn't fit in the main views and allows to edit some attributes and permissions. Secondarily, it acts as an extension point.

Despite that, its design is showing its age. It doesn't make use of modern design patterns nor applies the layout best practices from the HIG.

Captura_de_ecrã_de_2019-08-30_17-43-41

The Properties dialog's UI is 100% constructed from the C source code in src/nautilus-properties-window.c, intertwined with business logic. This makes it very cumbersome to modify the UI and, therefore, to apply design improvements.

Proposed solution

Quoting from https://developer.gnome.org/gtk3/stable/ch01s03.html

GTK+ supports the separation of user interface layout from your business logic, by using UI descriptions in an XML format that can be parsed by the GtkBuilder class.

UI definitions are already used in other parts of this application. They can be edited with GNOME/glade> and even from GNOME/gnome-builder> .

Scope and constraints

The porting to GtkBuilder UI definitions can be done by parts, or all at once.

Major UI redesign is not in scope of this issue, since we don't have mockups yet.

Minor UI design changes (such as paddings, alignments, etc.) are okay, particularly if they improve compliance with the HIG.

Extensions can provide custom tabs in Properties that we are still going to add programmatically. See libnautilus-extension/nautilus-property-page[-provider].{c,h}

We also need to keep in mind that we may change how these extension tabs are created: !248


Related tasks

Cleanup

  • Remove now-dead code.
  • Stop setting "inconsistent_string" data; use the macro instead of getting the data.
  • Stop setting "use_original" data; refactor and merge value_field_update() with value_field_update_internal() to assume FALSE for all except the "where" attribute.
  • Stop setting the "help-uri" data.
  • Remove struct members set by gtk_widget_class_bind_template_child() which are not used.
  • Remove unused macros.
  • ...

Modernization

  • Use modern GLib macros (g_autofree, g_autoptr(), g_autolist(), g_steal_pointer(), g_clear_pointer(), g_clear_object(), g_set_object(),...) whenever it simplifies the code.
  • Use self as symbol name for the NautilusPropertiesWindow * parameter of every method found inside properties-window.c and .h.
  • ...

HIG compliance tasks

  • Apply the HIG's advice on visual layout
    • "Label alignment" section for grid labels
    • 6px─12px─18px rule for grids.
    • 18px general padding between content and window borders
  • Set dim-label style class on title labels.
  • Drop colons (:) from the title labels.
  • ...

Bugfix tasks

  • Allow closing the Properties window using Esc.
  • ...
Edited Aug 08, 2020 by APOORV SACHAN
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking