<p>Based on the discussion here <a href="https://github.com/geany/geany/issues/921" class="issue-link js-issue-link" data-url="https://github.com/geany/geany/issues/921" data-id="137006239" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#921</a> I tried what is still missing to support opening remote files without gvfs-fuse. As I suspected, there wasn't much missing - mostly some g_file_test() calls which didn't work remotely, file name validation which didn't allow URIs, getting filenames instead of URIs from file dialogs etc.</p>

<p>What works after these patches:</p>

<ul>
<li>opening links like <a href="https://developer.gnome.org/gio/stable/GFile.html">https://developer.gnome.org/gio/stable/GFile.html</a> both from command-line and file open dialog</li>
<li>browsing remote locations in file browser</li>
<li>opening/saving ftp/ssh/etc. locations when mounted - I guess they need to be mounted to work - even gedit needs them mounted (it would probably be possible to use g_file_mount_enclosing_volume () to pop up dialog to make user mount them, not sure if we want it or not)</li>
<li>opening/saving remote projects</li>
</ul>

<p>What doesn't work:</p>

<ul>
<li>TM parsing - the only reason here's the g_stat() in tm_source_file_init(), after commenting it out it works but TM at the moment doesn't know about Geany's file operation method used so it's not possible to implement this properly (I plan moving the TM - without ctags - into src making it effectively part of Geany after which it will have access to Geany's definitions)</li>
<li>File->Properties - I simply have been lazy to implement it</li>
<li>of course things like find in files, build commands etc. which we cannot run remotely</li>
</ul>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/963'>https://github.com/geany/geany/pull/963</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Add wrappers around g_file_test() and use them everywhere</li>
  <li>Update utils_get_path_from_uri() to return URI when using GIO</li>
  <li>Fix warning in utils_tidy_path()</li>
  <li>Use g_file_new_for_uri() when needed</li>
  <li>Preserve URIs in tm_get_real_path()</li>
  <li>Merge implementations of write_data_to_disk() and utils_write_file()</li>
  <li>Use gtk_file_chooser_get_uris() in file opening/saving dialogs</li>
  <li>Add GIO version of document_rename_file()</li>
  <li>Add GIO implementation to utils_get_file_list_full()</li>
  <li>Add file reading utils function</li>
  <li>Load project config files using the new utility function</li>
  <li>Allow opening projects using URI</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-0">plugins/export.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-1">plugins/filebrowser.c</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-2">plugins/htmlchars.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-3">plugins/saveactions.c</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-4">src/build.c</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-5">src/callbacks.c</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-6">src/dialogs.c</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-7">src/document.c</a>
    (131)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-8">src/editor.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-9">src/highlighting.c</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-10">src/keybindings.c</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-11">src/keyfile.c</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-12">src/libmain.c</a>
    (24)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-13">src/msgwindow.c</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-14">src/plugins.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-15">src/project.c</a>
    (57)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-16">src/symbols.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-17">src/templates.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-18">src/ui_utils.c</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-19">src/utils.c</a>
    (322)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-20">src/utils.h</a>
    (16)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-21">src/vte.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-22">src/win32.c</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/963/files#diff-23">tagmanager/src/tm_source_file.c</a>
    (16)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/963.patch'>https://github.com/geany/geany/pull/963.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/963.diff'>https://github.com/geany/geany/pull/963.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/963">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ0OUBFm5PgA1cUwKOxrcYBf7az6Eks5ptJYbgaJpZM4HvqFb.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/963"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>