1. 02 Aug, 2020 28 commits
    • António Fernandes's avatar
      properties-window: Center permissions horizontally · b750e226
      António Fernandes authored
      If the window grows larger, the permissions look pushed to the left.
      Same problem with the "Change permissions..." dialog, which is wider
      by default due to a long window title.
      So, in both cases, let's center the contents.
    • António Fernandes's avatar
      properties-window: Reduce Open With natural width · fd3d2f5b
      António Fernandes authored
      The Open With tab makes the whole dialog wider than it needs to be,
      making other labs look stretched.
      This is because the label has a very high natural width, in spite of
      wrapping, which is attributable to the max-width-chars property.
      So, halve the value of that propert to give the Properties window a
      more fitting natural width.
    • APOORV SACHAN's avatar
      properties-window: use top-widget margins for spacing between widget groups · fd771702
      APOORV SACHAN authored
      It is recommended that widget margins should be used to apply
      spacing between widget groups instead of empty labels.
      properties-window: Follow HIG layout advice
      The GNOME Human Interface Guidelines include spacing rules for widgets
      laid out in a grid, and spacing from window edges:
      For vertical spacing between groups of controls, we have been using
      empty label widgets. This doesn't give us the control over the heigh
      that we need, so shall use margins instead. In case of the Basic page,
      due to the conditionality of the first widget in a group, instead of
      propper margins we use an empty box with a set heigh as a spacer.
      Also, prefer the GtkBox:spacing property over the padding child prop.
    • APOORV SACHAN's avatar
      properties-window: Reposition icon above basic grid · 4bdea83a
      APOORV SACHAN authored
      With the title labels aligned to the right, the icon widget is isolated
      at the left side, pushed to the edge and disconnected.
      Center the icon horizontally, at the top of the page, for better visual
      balance. Also, make it slightly larger, using standard icon size.
    • APOORV SACHAN's avatar
      properties-window: Set style with better text contrast · 821f3486
      APOORV SACHAN authored
      the outermost GtkBox is set to use 'view'
      style class for a better contrast between
      background and the dimmed title lables.
    • APOORV SACHAN's avatar
      properties-window: HIG Complaince styling · 593b6786
      APOORV SACHAN authored
      * All the title labels are right Aligned
      * All labels appear in a lighter shade - dim-label styling
      * ':' symbol has been removed which succeeds the title labels
    • APOORV SACHAN's avatar
      properties-window: set Contents title lable's valign property · e2a69b06
      APOORV SACHAN authored
      When the Contents field displays a multi line message
      the Contents label needs to be aligned to the first line.
      Traditional implementation achieved this by conditionally
      appending a newline character, however now that valign
      property could be used to achieve the same, by setting it
      to "Start"
    • APOORV SACHAN's avatar
    • APOORV SACHAN's avatar
      properties-window: Stop setting "use_original" data · ab9ef978
      APOORV SACHAN authored
      now, value_field_update() and value_field_update_internal()
      are merged into value_filed_update()
    • APOORV SACHAN's avatar
      properties-window: Stop setting "inconsistent_string" data · 556d3695
      APOORV SACHAN authored
      This is always the same for all labels, so there is no point.
    • APOORV SACHAN's avatar
      properties-window: removing dead functions · 2aee0355
      APOORV SACHAN authored
    • António Fernandes's avatar
      properties-window: Clear list of dangling pointers · 87d62fe5
      António Fernandes authored
      The window->change_permission_combos list is populated each time the
      "Change Permissions of Enclosed Files" button is clicked.
      This list is cleared when the Properties window is destroyed, but
      not when the "Change Permissions of Enclosed Files" dialog is. As a
      result, if the button is clicked again, new combos are prepended to
      the list but the previous (now-dangling) pointers are still there.
      If GLib is built without -DG_DISABLE_CAST_CHECKS, then trying to use
      this dialog a second time to change permissions of enclosed files will
      result in a crash due to the dangling pointers failing a cast check.
      But even though production code will not crash this way, leaving
      dangling pointers in the list is a bad idea.
      Before this dialog was ported to a GtkBuilder UI definition, this bug
      was masked by a leak of floating references.
      To properly manage the lifecycle of this list, let's clear it whenever
      the dialog is destroyed.
    • APOORV SACHAN's avatar
      mime-application-chooser: Remove the whole class · eef67a5e
      APOORV SACHAN authored
      Until the previous commit, its single user was the Properties window.
      Now it's unused, so we can remove the its source files completely.
    • APOORV SACHAN's avatar
      properties-window: Stop using NautilusMimeApplicationChooser class · c91178ee
      APOORV SACHAN authored
      The template UI definition has the Open With tab empty. This is
      because its contents come from the NautilusMimeApplicationChooser
      But a separate abstraction for choosing appications based on MIME
      types isn't required as GTK provides GtkAppChooser.
      The other widgets can be neatly tucked away in the UI built using
      XML templates to achieve the same results, and at the same time
      allowing the open-with page to be customizable in Glade.
      Some functions are adapted from mime-application-chooser.c, but
      modified to remove any dependency on that class.
    • APOORV SACHAN's avatar
      properties-window: Add "Open With" tab to template · 202025e0
      APOORV SACHAN authored
      This commit only creates outer container of the Open With tab.
      Inner widgets are ported in the next commit.
    • APOORV SACHAN's avatar
      properties-window: Port "Change Permissions..." dialog to GtkBuilder · fe446aee
      APOORV SACHAN authored
      "Change Permissions of Enclosed Files" dialog is now built using XML
      UI definition. This is present as a seperate .ui file apart from
      nautilus-properties-window.ui because a .ui file file containing a
      widget declared as a template cannot have other external widgets to
      be built independently from the template.
      This .ui file is not produced or editable usingg Glade as it doesn't
      recognize "action" type children as found in GtkDialog. This issue is
      already reported in glade#392
    • APOORV SACHAN's avatar
      properties-window: Populate remaining grid rows from template · f726e681
      APOORV SACHAN authored
      The dialog the "Change Permissions for Enclosed Files…" button opens is
      going to be ported in a future commit.
    • APOORV SACHAN's avatar
      properties-window: Populate Owner, Group and Others rows from template · b20278c9
      APOORV SACHAN authored
      Combo boxes are defined, but their models and renderers are still built
      programatically. These shall be ported at a later time.
    • APOORV SACHAN's avatar
      properties-window: Add conditional prompt labels to the template · d008abcf
      APOORV SACHAN authored
      Also document the code generating label text containing file names.
    • APOORV SACHAN's avatar
      properties-window: Add Permissions tab outer containers to template · 431eb34b
      APOORV SACHAN authored
      Internal widgets will be populated from template in the next commits.
    • APOORV SACHAN's avatar
      properties-window: Add volume usage grid to template · 6e3f5518
      APOORV SACHAN authored
      The skeleton, layouting of grid cells, and styling of widgets
      inside the volume usage widget is done in the template. Only the
      GtkDrawing areas are drawn using code, in callbacks for ::draw.
    • APOORV SACHAN's avatar
      properties-window: Populate all rows in template · a058e7cd
      APOORV SACHAN authored
      Exception: the usage widget continues to be constructed in our own code.
    • APOORV SACHAN's avatar
      properties-window: Populate Name row from template · 95b2b165
      APOORV SACHAN authored
      We have been creating either an entry or a label for the name field,
      depending on whether we were able to edit the name or not.
      In GtkBuilder UI definitions we cannot do this anymore, as we have
      to define and build both the entry and the label.
      So, in order to only show the one we want on each situation, we are
      introducing a GtkStack to contain both.
    • APOORV SACHAN's avatar
      properties-window: Define icon widget in template · d1774e84
      APOORV SACHAN authored
      The GtkImage that displays the window icon may or may not be contained
      by a GtkButton, depending on whether we were able to set a custom icon.
      In GtkBuilder UI definitions we cannot do this anymore, as we have to
      set a parent for the image widget from the start.
      So, define both a simple image and a button with an image, and pack
      them in a GtkStack to only show the button when appropriate.
    • APOORV SACHAN's avatar
      properties-window: Add Basic tab containers to template · a8954d40
      APOORV SACHAN authored
      This commit obtains the outer containers of the Basic page from the
      widget template UI definition.
      A new GtkBox to pack the icon widget is included.
      The inner widgets are ported to the UI definition in the next commits.
    • APOORV SACHAN's avatar
      properties-window: Add composite widget template · 6c3977ca
      APOORV SACHAN authored
      For now, only the outermost containers, GtkWindow down to GtkNotebook,
      have been defined in the GtkBuilder UI file.
      The Basic, Permissions, and Open With tabs, along with their content,
      are still built and inserted programaically. They are going to be
      ported in the next few commits.
    • APOORV SACHAN's avatar
      properties-window: Restore close on press 'Esc' functionality · 8a75d84b
      APOORV SACHAN authored
      NautilusPropertiesWindow usec to be a GtkDialog subclass, inheriting
      the "close" signal, which was leveraged to implement close on Esc.
      However as GtkWindow doesn't feature a "close" signal natively, and
      NautilusPropertiesWindow now subclasses GtkWindow, it needs to be
      seperately defined and attached to a signal handler to restore the
    • APOORV SACHAN's avatar
      properties-window: Inherit from GtkWindow instead of GtkDialog · 0e8ad8dd
      APOORV SACHAN authored
      The properties window has been subclassing GtkDialog since long ago.
      GtkDialog features an action area where, historically, the properties
      window added Help and Close action buttons.
      These action were dropped when a headerbar was adopted.[1] Moreover, we
      want to port the Properties window to a GtkBuilder UI definition, which
      GtkDialog makes harder to achive.
      Subclassing GtkWindow fits this use case much better.
      [1] d8a8ab3b
  2. 29 Jul, 2020 1 commit
  3. 25 Jul, 2020 1 commit
  4. 24 Jul, 2020 1 commit
  5. 23 Jul, 2020 1 commit
  6. 21 Jul, 2020 1 commit
  7. 13 Jul, 2020 2 commits
    • ignapk's avatar
      file-operations: don't auto-escape semicolon · d771158b
      ignapk authored
      Nowadays fat filesystems are usually mounted with vfat driver that
      supports long filenames, which allow semicolon.
      Since there is no easy way to determine which driver was used
      and msdos is a corner case, make the assumption so the character
      is not auto-escaped when not necessary.
    • ignapk's avatar
      file-operations: auto-escape filenames on fuseblk mounts · c028e48e
      ignapk authored
      Currently when copying files that have reserved characters in their
      names to NTFS or exFAT filesystems mounted using FUSE, the process will fail.
      The fuseblk filesystem type could be of any type in theory, but in
      practice is usually NTFS or exFAT, so make the assumption in pragmatic
      way to solve this issue.
      Closes #1343
  8. 12 Jul, 2020 5 commits