Skip to content
  1. Mar 15, 2024
  2. Mar 01, 2024
  3. Feb 19, 2024
  4. Feb 09, 2024
  5. Feb 07, 2024
  6. Jan 15, 2024
    • Ondrej Holy's avatar
      udisks2: Quote mount paths with g_shell_quote when unmounting · 3cdb5a83
      Ondrej Holy authored
      Currently, the unmount operation fails for mount paths that are not
      propagated from udisks (e.g. FUSE) and contain non-ASCII characters.
      This is because the mount path is escaped by the `g_strescape` function
      that drops non-ASCII characters among others. It is not clear why this
      function was used here, but it seems right to use the `g_shell_quote`
      function instead. Let's do so to fix unmounting in the mentioned cases.
      
      Fixes: #706
      3cdb5a83
  7. Jan 05, 2024
  8. Dec 15, 2023
    • Ondrej Holy's avatar
      wsdd: Add resolver to lookup hostnames of devices · 17e93d56
      Ondrej Holy authored
      Currently, the WSDD backend uses target URIs based on IP addresses.
      This is not ideal also because display names are not propagated to
      the SMB backend and mount prompts show just IP addresses. Let's try
      to lookup hostnames based on device names.
      
      Related: #506
      17e93d56
    • Ondrej Holy's avatar
      network: Display also files from the wsdd backend · 15d6b67e
      Ondrej Holy authored
      After the NT1 protocol deperecation, the "Other Locations" view (ie.
      network backend) doesn't contain Windows devices in the most cases.
      Let's display files from the wsdd backend to make the Windows devices
      available again.
      15d6b67e
    • Ondrej Holy's avatar
      wsdd: Invalidate results during network changes · 4d6e6dac
      Ondrej Holy authored
      The wsdd project seemingly doesn't invalidate already discovered devices.
      Consequently, the backend may list unavailable devices. This is especially
      problem during network changes. Let's force the wsdd project to invalidate
      the results when network change is detected. Once this is fixed on the wsdd
      side, this commit can be reverted.
      
      Related: #506
      4d6e6dac
    • Ondrej Holy's avatar
      daemon: Add WS-Discovery backend · 26e35004
      Ondrej Holy authored
      This backend implements Web Service Device Discovery protocol support to
      list (not only) Windows devices. It uses the wsdd project
      (https://github.com/christgau/wsdd) and requires wsdd binary to be available
      in `$PATH`.
      
      Fixes: #506
      26e35004
    • Ondrej Holy's avatar
      network: Hide duplicated entries · 853dbf27
      Ondrej Holy authored
      The network backend shows results from other backends. So the same service
      may be propagated by different backends. This become bigger problem with
      the merged SMB results and with the upcoming WSDD support. The problem is
      that each backend uses different URIs (e.g. "smb://foo.local:445",
      "smb://foo", "smb://127.0.0.1"), so it can't be easily compared. Resolving
      URIs just for their comparison doesn't sound like a good idea. Let's make
      an assumption that the files with the same display name and scheme point
      to the same service and just keep the first one. This approach should work
      fine in most cases.
      853dbf27
    • Ondrej Holy's avatar
      network: Show SMB servers merged by default · e06b3ff3
      Ondrej Holy authored
      The "Windows Network" folder is always shown despite the fact that
      it is empty in most cases given the NT1 protocol deprecation. Let's
      directly list available devices if they are any instead of showing
      that folder. The same is done by default for DNS-SD services already.
      
      Fixes: #679
      Related: nautilus#2785
      e06b3ff3
    • Ondrej Holy's avatar
      network: Add support to display SMB files merged · 0206780a
      Ondrej Holy authored
      The files provided by the dns-sd backend are displayed merged by default.
      The services from the smb browse backend are hidden in the "Windows Network"
      folder except those from the default domain (which hasn't worked reliably so
      far). Let's add a possiblity to show the "Windows Network" content merged
      similar to what is done with the dns-sd files. As a part of this change,
      let's don't show the default domain results merged when the "Windows Network"
      folder is shown to simplify handling a bit.
      
      Related: #307
      0206780a
    • Ondrej Holy's avatar
      network: Rename GDnsSdDisplayMode to GVfsBackendNetworkDisplayMode · 26c4ca41
      Ondrej Holy authored
      As a preparation for the follow up changes, let's rename the `GDnsSdDisplayMode`
      enum to `GVfsBackendNetworkDisplayMode`. This enum is anyway used by the network
      backend only.
      26c4ca41
    • Ondrej Holy's avatar
      network: Add helper function to add files from directory · 81031633
      Ondrej Holy authored
      There is a lot of duplicated code currently. Let's add a helper function
      to add network backend files from a certain directory to simplify the
      code a bit. This is a preparation for the follow up changes.
      81031633
    • Ondrej Holy's avatar
      network: Compare also target uris in network_file_equal function · 4bf99eb1
      Ondrej Holy authored
      The `target_uri` strings are not compared currently by the
      `network_file_equal` function. I'm not sure whether this is a problem
      currently, but it might be in the future. Let's compare those string
      as well for sure.
      4bf99eb1
    • Ondrej Holy's avatar
      network: Simplify display name comparison · 18fc533b
      Ondrej Holy authored
      The display name comparison in the `network_file_equal` function is
      overcomplicated currently. Let's use `g_strcmp0` to simplify the code
      a bit.
      18fc533b
    • Ondrej Holy's avatar
      network: Fix filename prefix for DNS-SD servers · 4576d8c2
      Ondrej Holy authored
      The filename prefix for DNS-SD results is currently: `dnssd-domain-`.
      Let't change that to `dnssd-server-` to be in line with the SMB files.
      4576d8c2
    • Ondrej Holy's avatar
      network: Use target-uri attribute instead of string concatenation · c53a9b83
      Ondrej Holy authored
      The link URI for SMB servers is created over string concatenation.
      Although this works currently, it may not work	in the future. Let's
      instead use  the G_FILE_ATTRIBUTE_STANDARD_TARGET_URI attribute that
      is dedicated to this purpose.
      c53a9b83
    • Ondrej Holy's avatar
      network: Add helper function to recompute files on idle · a22cdaa3
      Ondrej Holy authored
      The `g_idle_add` function is called from various places to start the
      `recompute_files` on idle. Let's add a helper function to simplify the
      code a bit.
      a22cdaa3
    • Ondrej Holy's avatar
      network: Drop redundant error handling when mounting · a05f468f
      Ondrej Holy authored
      The error variable is passed to the `g_file_mount_enclosing_volume_finish`
      function and freed immediately after that. Let's drop this redundant error
      handling.
      a05f468f
    • Ondrej Holy's avatar
      network: Don't recompute files when it's already scheduled · 0ba06098
      Ondrej Holy authored
      When smb-related gsettings keys are changed, the `recompute_files`
      function is called directly regardless of the fact that it might be
      already scheduled. It is not a big deal as the gesttings keys are not
      meant to be changed often, though the rest of the code uses a better
      approach. It schedules the `recompute_files` function execution only
      if it is not already. Let's use that approach in this case as well.
      0ba06098
    • Ondrej Holy's avatar
      network: Always reload files before enumeration · 80d423cb
      Ondrej Holy authored
      The network backend files are reloaded only with file monitor events.
      However, the smb browse backend doesn't support monitoring and thus
      some files may not be present or may be invalid. For this reason,
      always reload the network backend files before enumerating.
      80d423cb
    • Ondrej Holy's avatar
      network: Remove SMB monitoring code · c5b0ed8e
      Ondrej Holy authored
      The smb browse backend doesn't have monitor support, but the network
      backend creates directory monitos for SMB locations anyway. Let's get rid
      of this dead code in preparation for future changes.
      c5b0ed8e
    • Ondrej Holy's avatar
      network: Handle G_DNS_SD_DISPLAY_MODE_DISABLED value · 79b529f2
      Ondrej Holy authored
      Although, the `G_DNS_SD_DISPLAY_MODE_DISABLED` enum value is valid
      for the `display-local` gsettings key, it is not handled by the network
      backend currently. Let's hide the DNS-SD services when this option
      is used.
      79b529f2
    • Ondrej Holy's avatar
      dnssd: Improve description of display-local key · 33982424
      Ondrej Holy authored
      It is not obvious that the display-local gsettings key affect the
      network:/// output and what the concrete options do. Let's try to
      make this a bit clearer.
      33982424
  9. Nov 15, 2023