roundabout,
created on Monday, 23 June 2025, 20:50:51 (1750711851),
received on Monday, 23 June 2025, 20:50:54 (1750711854)
Author identity: vlad <vlad.muntoiu@gmail.com>
e6d2d090e00d3901749436900b4bf2356d8b0351
CMakeLists.txt
@@ -29,5 +29,9 @@ include_directories(${WebKit_INCLUDE_DIRS})
add_definitions(${GTKMM_CFLAGS_OTHER}) target_link_libraries(gpanthera ${GTKMM_LIBRARIES}) if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/locales") message(FATAL_ERROR "locales directory not found in source tree") endif() file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/locales) file(COPY locales DESTINATION ${CMAKE_BINARY_DIR})
panthera-www.cc
@@ -16,6 +16,7 @@
#include <dlfcn.h> #include "external/sqlite_orm/sqlite_orm.h" #include "plugin_api.h" #define _(STRING) gettext(STRING)using plugin_entrypoint_type = void(*)(void);
@@ -320,9 +321,9 @@ public:
this->set_default_size(800, 600); layout_manager = std::make_shared<gPanthera::LayoutManager>(); auto dock_stack_1 = Gtk::make_managed<gPanthera::DockStack>(layout_manager, "One", "one");auto dock_stack_1 = Gtk::make_managed<gPanthera::DockStack>(layout_manager, _("One"), "one");auto switcher_1 = Gtk::make_managed<gPanthera::DockStackSwitcher>(dock_stack_1, Gtk::Orientation::HORIZONTAL); auto dock_stack_2 = Gtk::make_managed<gPanthera::DockStack>(layout_manager, "Two", "two");auto dock_stack_2 = Gtk::make_managed<gPanthera::DockStack>(layout_manager, _("Two"), "two");auto switcher_2 = Gtk::make_managed<gPanthera::DockStackSwitcher>(dock_stack_2, Gtk::Orientation::VERTICAL); auto pane_1_content = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::VERTICAL, 0); auto debug_button = Gtk::make_managed<Gtk::Button>("Debug");
@@ -337,7 +338,7 @@ public:
pane_1_content->append(*debug_button); pane_1_content->append(*print_history_button); auto pane_1_icon = Gtk::make_managed<Gtk::Image>(Gio::Icon::create("help-about-symbolic")); auto pane_1 = Gtk::make_managed<gPanthera::DockablePane>(layout_manager, *pane_1_content, "debug", "Debugging options", pane_1_icon);auto pane_1 = Gtk::make_managed<gPanthera::DockablePane>(layout_manager, *pane_1_content, "debug", _("Debugging options"), pane_1_icon);dock_stack_1->set_transition_type(Gtk::StackTransitionType::SLIDE_LEFT_RIGHT); dock_stack_1->set_transition_duration(125);
@@ -393,7 +394,7 @@ public:
auto main_toolbar = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::HORIZONTAL, 8); // URL bar url_bar = Gtk::make_managed<Gtk::Entry>(); url_bar->set_placeholder_text("Enter URL");url_bar->set_placeholder_text(_("Enter URL"));url_bar->set_hexpand(true); auto load_url_callback = [this, panthera]() { bool has_protocol = url_bar->get_text().find("://") != std::string::npos;
@@ -472,11 +473,11 @@ public:
// Search bar // TODO: provide history, provide a menu button with the other engines auto search_bar = Gtk::make_managed<Gtk::Entry>(); search_bar->set_placeholder_text("Search");search_bar->set_placeholder_text(_("Search"));search_bar->set_hexpand(true); if(panthera->search_engines.empty()) { search_bar->set_sensitive(false); search_bar->set_placeholder_text("No search");search_bar->set_placeholder_text(_("No search"));} auto search_callback = [this, search_bar, content_stack, panthera]() { // Create a new tab with the search results
@@ -571,7 +572,7 @@ void PantheraWww::notify_callback(GObject *object, GParamSpec *pspec, gpointer d
if(g_strcmp0(pspec->name, "title") == 0) { if(auto label = dynamic_cast<Gtk::Label*>(page->tab_widget->get_last_child())) { if(strlen(webkit_web_view_get_title(WEBKIT_WEB_VIEW(object))) == 0) { label->set_label("Untitled");label->set_label(_("Untitled"));} else { label->set_label(webkit_web_view_get_title(WEBKIT_WEB_VIEW(object))); }
@@ -703,6 +704,8 @@ PantheraWindow *PantheraWww::make_window() {
} void PantheraWww::on_startup() { bindtextdomain("panthera-www", "./locales"); textdomain("panthera-www");Gtk::Application::on_startup(); // Get search engines std::ifstream search_engines_file_in("search_engines.json");
@@ -716,6 +719,7 @@ void PantheraWww::on_startup() {
std::ofstream search_engines_file_out("search_engines.json"); search_engines_file_out << empty_json.dump(4); } // Load settings new_tab_page = "about:blank"; std::ifstream settings_file_in("settings.json");
@@ -768,7 +772,7 @@ void PantheraWww::on_startup() {
}); add_action(new_tab_action); set_accels_for_action("app.new_tab", {"<Primary>T"}); file_menu->append("New tab", "app.new_tab");file_menu->append(_("New tab"), "app.new_tab");// Close tab auto close_tab_action = Gio::SimpleAction::create("close_tab"); close_tab_action->signal_activate().connect([this](const Glib::VariantBase&) {
@@ -779,7 +783,7 @@ void PantheraWww::on_startup() {
}); add_action(close_tab_action); set_accels_for_action("app.close_tab", {"<Primary>W"}); file_menu->append("Close tab", "app.close_tab");file_menu->append(_("Close tab"), "app.close_tab");// New window auto new_window_action = Gio::SimpleAction::create("new_window"); new_window_action->signal_activate().connect([this](const Glib::VariantBase&) {
@@ -788,9 +792,9 @@ void PantheraWww::on_startup() {
}); add_action(new_window_action); set_accels_for_action("app.new_window", {"<Primary>N"}); file_menu->append("New window", "app.new_window");file_menu->append(_("New window"), "app.new_window");main_menu->append_submenu("File", file_menu);main_menu->append_submenu(_("File"), file_menu);set_menubar(main_menu); }
@@ -820,7 +824,7 @@ void PantheraWww::set_search_engines_from_json(const std::string &json_string) {
} } PantheraWww::PantheraWww() : Gtk::Application("com.roundabout_host.roundabout.panthera_www", Gio::Application::Flags::NONE) {PantheraWww::PantheraWww() : Gtk::Application("com.roundabout_host.roundabout.PantheraWww", Gio::Application::Flags::NONE) {} Glib::RefPtr<PantheraWww> PantheraWww::create() {
po/ro.po
@@ -1,44 +0,0 @@
# Romanian translations for PACKAGE package.# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER# This file is distributed under the same license as the PACKAGE package.# Vlad <vlad@roundabout-host.com>, 2025.#msgid ""msgstr """Project-Id-Version: \n""Report-Msgid-Bugs-To: \n""POT-Creation-Date: 2025-04-26 22:52+0300\n""PO-Revision-Date: 2025-04-26 22:54+0300\n""Last-Translator: roundabout <root@roundabout-host.com>\n""Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n""Language: ro\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n""Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < ""20)) ? 1 : 2;\n""X-Generator: Poedit 3.4.4\n"#: gpanthera.cc:108 gpanthera.cc:859msgid "Close"msgstr "Închide"#: gpanthera.cc:118msgid "Pop out"msgstr "Scoate"#: gpanthera.cc:133msgid "Move"msgstr "Mută"#: gpanthera.cc:872msgid "Close all"msgstr "Închide tot"#: gpanthera.cc:885msgid "Close others"msgstr "Închide celelalte"#: gpanthera.cc:893msgid "New window"msgstr "Fereastră nouă"
po/ro/gpanthera.po
@@ -0,0 +1,44 @@
# Romanian translations for PACKAGE package. # Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # Vlad <vlad@roundabout-host.com>, 2025. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-04-26 22:52+0300\n" "PO-Revision-Date: 2025-04-26 22:54+0300\n" "Last-Translator: roundabout <root@roundabout-host.com>\n" "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n" "Language: ro\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " "20)) ? 1 : 2;\n" "X-Generator: Poedit 3.4.4\n" #: gpanthera.cc:108 gpanthera.cc:859 msgid "Close" msgstr "Închide" #: gpanthera.cc:118 msgid "Pop out" msgstr "Scoate" #: gpanthera.cc:133 msgid "Move" msgstr "Mută" #: gpanthera.cc:872 msgid "Close all" msgstr "Închide tot" #: gpanthera.cc:885 msgid "Close others" msgstr "Închide celelalte" #: gpanthera.cc:893 msgid "New window" msgstr "Fereastră nouă"