@elextr commented on this pull request.
> @@ -950,6 +1005,23 @@ gwh_browser_set_uri (GwhBrowser *self,
g_free (real_uri);
}
+gboolean
+gwh_browser_set_uri_from_document (GwhBrowser *self,
+ GeanyDocument *doc)
+{
+ gchar *uri;
+
+ /* document must exist on disk */
+ if (! doc || ! doc->real_path)
+ return FALSE;
+
+ uri = g_strconcat ("file://", doc->file_name, NULL);
Ok, I forgot the inconsistency that sometimes paths are called paths and
sometimes filenames in C land, ... sigh @elextr goes back to his nice
consistent C++ `std::path` :grin:
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1295#discussion_r1581662031
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany-plugins/pull/1295/review/[email protected]>