diff --git a/src/app/browser/main/tab/page.cpp b/src/app/browser/main/tab/page.cpp index 8ceb78c0..4bd86f9e 100644 --- a/src/app/browser/main/tab/page.cpp +++ b/src/app/browser/main/tab/page.cpp @@ -351,8 +351,8 @@ void Page::navigation_reload( // Set content driver pageContent->update( page::Content::TEXT_GEMINI, - pageNavigation->get_request_text(), // @TODO use current page URI parsed instead of request able to change after - buffer + buffer, + uri ); // Update title on detected by document provider diff --git a/src/app/browser/main/tab/page/content.cpp b/src/app/browser/main/tab/page/content.cpp index 7281b8d1..78b9b237 100644 --- a/src/app/browser/main/tab/page/content.cpp +++ b/src/app/browser/main/tab/page/content.cpp @@ -40,8 +40,8 @@ Glib::ustring Content::get_title() // Setters void Content::update( const MIME & MIME, - const Glib::ustring & REQUEST, - const Glib::ustring & SOURCE + const Glib::ustring & SOURCE, + GUri * uri ) { // Cleanup, free memory if (contentText != nullptr) @@ -64,8 +64,8 @@ void Content::update( contentText = new content::Text( content::Text::Type::GEMINI, - REQUEST, - SOURCE + SOURCE, + uri ); title = contentText->get_title(); diff --git a/src/app/browser/main/tab/page/content.hpp b/src/app/browser/main/tab/page/content.hpp index e9185ff4..8acdcad6 100644 --- a/src/app/browser/main/tab/page/content.hpp +++ b/src/app/browser/main/tab/page/content.hpp @@ -42,8 +42,8 @@ namespace app::browser::main::tab::page // Actions void update( const MIME & MIME, - const Glib::ustring & REQUEST, - const Glib::ustring & SOURCE + const Glib::ustring & SOURCE, + GUri * uri ); // Getters diff --git a/src/app/browser/main/tab/page/content/text.cpp b/src/app/browser/main/tab/page/content/text.cpp index 64ec1dd7..2ded775b 100644 --- a/src/app/browser/main/tab/page/content/text.cpp +++ b/src/app/browser/main/tab/page/content/text.cpp @@ -6,8 +6,8 @@ using namespace app::browser::main::tab::page::content; Text::Text( const Type & TYPE, - const Glib::ustring & REQUEST, - const Glib::ustring & SOURCE + const Glib::ustring & SOURCE, + GUri * uri ) { switch (TYPE) { @@ -15,9 +15,9 @@ Text::Text( set_child( * Gtk::make_managed( - REQUEST, SOURCE, - title + title, + uri ) ); diff --git a/src/app/browser/main/tab/page/content/text.hpp b/src/app/browser/main/tab/page/content/text.hpp index 9eb0563f..a0cf2c82 100644 --- a/src/app/browser/main/tab/page/content/text.hpp +++ b/src/app/browser/main/tab/page/content/text.hpp @@ -30,8 +30,8 @@ namespace app::browser::main::tab::page::content */ Text( const Type & TYPE, - const Glib::ustring & REQUEST, - const Glib::ustring & SOURCE + const Glib::ustring & SOURCE, + GUri * uri ); // Getters diff --git a/src/app/browser/main/tab/page/content/text/gemini.cpp b/src/app/browser/main/tab/page/content/text/gemini.cpp index 2f851620..ce0397ac 100644 --- a/src/app/browser/main/tab/page/content/text/gemini.cpp +++ b/src/app/browser/main/tab/page/content/text/gemini.cpp @@ -4,9 +4,9 @@ using namespace app::browser::main::tab::page::content::text; Gemini::Gemini( - const Glib::ustring & REQUEST, const Glib::ustring & GEMTEXT, - Glib::ustring & title + Glib::ustring & title, + GUri * uri ) : Gtk::Viewport( // add scrolled window features to childs NULL, NULL @@ -18,9 +18,9 @@ Gemini::Gemini( set_child( * Gtk::make_managed( - REQUEST, GEMTEXT, - title + title, + uri ) ); } \ No newline at end of file diff --git a/src/app/browser/main/tab/page/content/text/gemini.hpp b/src/app/browser/main/tab/page/content/text/gemini.hpp index 48008345..d3226478 100644 --- a/src/app/browser/main/tab/page/content/text/gemini.hpp +++ b/src/app/browser/main/tab/page/content/text/gemini.hpp @@ -14,9 +14,9 @@ namespace app::browser::main::tab::page::content::text public: Gemini( - const Glib::ustring & REQUEST, const Glib::ustring & GEMTEXT, - Glib::ustring & title + Glib::ustring & title, + GUri * uri ); }; } diff --git a/src/app/browser/main/tab/page/content/text/gemini/reader.cpp b/src/app/browser/main/tab/page/content/text/gemini/reader.cpp index fa678d2a..9b3fdc73 100644 --- a/src/app/browser/main/tab/page/content/text/gemini/reader.cpp +++ b/src/app/browser/main/tab/page/content/text/gemini/reader.cpp @@ -3,9 +3,9 @@ using namespace app::browser::main::tab::page::content::text::gemini; Reader::Reader( - const Glib::ustring & REQUEST, const Glib::ustring & GEMTEXT, - Glib::ustring & title + Glib::ustring & title, + GUri * base ) { // Build markup Glib::ustring markup; @@ -48,7 +48,9 @@ Reader::Reader( { markup.append( Make::link( - REQUEST, + g_uri_to_string( + base + ), address, date, alt diff --git a/src/app/browser/main/tab/page/content/text/gemini/reader.hpp b/src/app/browser/main/tab/page/content/text/gemini/reader.hpp index 3251abf5..9dbbf544 100644 --- a/src/app/browser/main/tab/page/content/text/gemini/reader.hpp +++ b/src/app/browser/main/tab/page/content/text/gemini/reader.hpp @@ -48,7 +48,7 @@ namespace app::browser::main::tab::page::content::text::gemini ); static Glib::ustring link( - const Glib::ustring & REQUEST, + const Glib::ustring & BASE, const Glib::ustring & ADDRESS, const Glib::ustring & DATE, const Glib::ustring & ALT @@ -69,9 +69,9 @@ namespace app::browser::main::tab::page::content::text::gemini public: Reader( - const Glib::ustring & REQUEST, const Glib::ustring & GEMTEXT, - Glib::ustring & title + Glib::ustring & title, + GUri * uri ); }; }