Browse Source

rename tab elements namespace

CPP-GTK4
yggverse 3 months ago
parent
commit
2986a475c1
  1. 20
      Makefile
  2. 20
      po/POTFILES.in
  3. 12
      src/app/browser/main/tab.cpp
  4. 18
      src/app/browser/main/tab/data/content.hpp
  5. 19
      src/app/browser/main/tab/data/navbar/base.hpp
  6. 19
      src/app/browser/main/tab/data/navbar/bookmark.hpp
  7. 19
      src/app/browser/main/tab/data/navbar/history/back.hpp
  8. 19
      src/app/browser/main/tab/data/navbar/history/forward.hpp
  9. 19
      src/app/browser/main/tab/data/navbar/update.hpp
  10. 20
      src/app/browser/main/tab/page.cpp
  11. 18
      src/app/browser/main/tab/page.hpp
  12. 2
      src/app/browser/main/tab/page/content.cpp
  13. 18
      src/app/browser/main/tab/page/content.hpp
  14. 2
      src/app/browser/main/tab/page/navbar.cpp
  15. 8
      src/app/browser/main/tab/page/navbar.hpp
  16. 2
      src/app/browser/main/tab/page/navbar/base.cpp
  17. 19
      src/app/browser/main/tab/page/navbar/base.hpp
  18. 2
      src/app/browser/main/tab/page/navbar/bookmark.cpp
  19. 19
      src/app/browser/main/tab/page/navbar/bookmark.hpp
  20. 2
      src/app/browser/main/tab/page/navbar/history.cpp
  21. 8
      src/app/browser/main/tab/page/navbar/history.hpp
  22. 2
      src/app/browser/main/tab/page/navbar/history/back.cpp
  23. 19
      src/app/browser/main/tab/page/navbar/history/back.hpp
  24. 2
      src/app/browser/main/tab/page/navbar/history/forward.cpp
  25. 19
      src/app/browser/main/tab/page/navbar/history/forward.hpp
  26. 4
      src/app/browser/main/tab/page/navbar/request.cpp
  27. 8
      src/app/browser/main/tab/page/navbar/request.hpp
  28. 4
      src/app/browser/main/tab/page/navbar/update.cpp
  29. 19
      src/app/browser/main/tab/page/navbar/update.hpp

20
Makefile

@ -12,16 +12,16 @@ SRCS = src/main.cpp\ @@ -12,16 +12,16 @@ SRCS = src/main.cpp\
src/app/browser/header/tab.cpp\
src/app/browser/main.cpp\
src/app/browser/main/tab.cpp\
src/app/browser/main/tab/data.cpp\
src/app/browser/main/tab/data/content.cpp\
src/app/browser/main/tab/data/navbar.cpp\
src/app/browser/main/tab/data/navbar/base.cpp\
src/app/browser/main/tab/data/navbar/bookmark.cpp\
src/app/browser/main/tab/data/navbar/history.cpp\
src/app/browser/main/tab/data/navbar/history/back.cpp\
src/app/browser/main/tab/data/navbar/history/forward.cpp\
src/app/browser/main/tab/data/navbar/request.cpp\
src/app/browser/main/tab/data/navbar/update.cpp\
src/app/browser/main/tab/page.cpp\
src/app/browser/main/tab/page/content.cpp\
src/app/browser/main/tab/page/navbar.cpp\
src/app/browser/main/tab/page/navbar/base.cpp\
src/app/browser/main/tab/page/navbar/bookmark.cpp\
src/app/browser/main/tab/page/navbar/history.cpp\
src/app/browser/main/tab/page/navbar/history/back.cpp\
src/app/browser/main/tab/page/navbar/history/forward.cpp\
src/app/browser/main/tab/page/navbar/request.cpp\
src/app/browser/main/tab/page/navbar/update.cpp\
src/app/browser/main/tab/label.cpp\
src/lib/database.cpp\
src/lib/database/session.cpp

20
po/POTFILES.in

@ -4,16 +4,16 @@ src/app/browser/header/menu.cpp @@ -4,16 +4,16 @@ src/app/browser/header/menu.cpp
src/app/browser/header/tab.cpp
src/app/browser/main.cpp
src/app/browser/main/tab.cpp
src/app/browser/main/tab/data.cpp
src/app/browser/main/tab/data/content.cpp
src/app/browser/main/tab/data/navbar.cpp
src/app/browser/main/tab/data/navbar/base.cpp
src/app/browser/main/tab/data/navbar/bookmark.cpp
src/app/browser/main/tab/data/navbar/history.cpp
src/app/browser/main/tab/data/navbar/history/back.cpp
src/app/browser/main/tab/data/navbar/history/forward.cpp
src/app/browser/main/tab/data/navbar/request.cpp
src/app/browser/main/tab/data/navbar/update.cpp
src/app/browser/main/tab/page.cpp
src/app/browser/main/tab/page/content.cpp
src/app/browser/main/tab/page/navbar.cpp
src/app/browser/main/tab/page/navbar/base.cpp
src/app/browser/main/tab/page/navbar/bookmark.cpp
src/app/browser/main/tab/page/navbar/history.cpp
src/app/browser/main/tab/page/navbar/history/back.cpp
src/app/browser/main/tab/page/navbar/history/forward.cpp
src/app/browser/main/tab/page/navbar/request.cpp
src/app/browser/main/tab/page/navbar/update.cpp
src/app/browser/main/tab/label.cpp
src/lib/database.cpp
src/lib/database/session.cpp

12
src/app/browser/main/tab.cpp

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#include "tab.hpp"
#include "tab/data.hpp"
#include "tab/label.hpp"
#include "tab/page.hpp"
using namespace app::browser::main;
@ -29,15 +29,15 @@ void Tab::append( @@ -29,15 +29,15 @@ void Tab::append(
bool focus
) {
auto label = new tab::Label();
auto data = new tab::Data();
auto page = new tab::Page();
append_page(
* data,
* page,
* label
);
set_tab_reorderable(
* data,
* page,
true
);
@ -45,7 +45,7 @@ void Tab::append( @@ -45,7 +45,7 @@ void Tab::append(
{
set_current_page(
page_num(
* data
* page
)
);
}
@ -86,7 +86,7 @@ void Tab::update( @@ -86,7 +86,7 @@ void Tab::update(
);
page->activate_action(
"data.update"
"page.update"
);
} // @TODO

18
src/app/browser/main/tab/data/content.hpp

@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
#ifndef APP_BROWSER_MAIN_TAB_DATA_CONTENT_HPP
#define APP_BROWSER_MAIN_TAB_DATA_CONTENT_HPP
#include <gtkmm/box.h>
namespace app::browser::main::tab::data
{
class Content : public Gtk::Box
{
public:
Content();
~Content();
};
}
#endif // APP_BROWSER_MAIN_TAB_DATA_CONTENT_HPP

19
src/app/browser/main/tab/data/navbar/base.hpp

@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_BASE_HPP
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_BASE_HPP
#include <glibmm/i18n.h>
#include <gtkmm/button.h>
namespace app::browser::main::tab::data::navbar
{
class Base : public Gtk::Button
{
public:
Base();
~Base();
};
}
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_BASE_HPP

19
src/app/browser/main/tab/data/navbar/bookmark.hpp

@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_BOOKMARK_HPP
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_BOOKMARK_HPP
#include <glibmm/i18n.h>
#include <gtkmm/button.h>
namespace app::browser::main::tab::data::navbar
{
class Bookmark : public Gtk::Button
{
public:
Bookmark();
~Bookmark();
};
}
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_BOOKMARK_HPP

19
src/app/browser/main/tab/data/navbar/history/back.hpp

@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_BACK_HPP
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_BACK_HPP
#include <glibmm/i18n.h>
#include <gtkmm/button.h>
namespace app::browser::main::tab::data::navbar::history
{
class Back : public Gtk::Button
{
public:
Back();
~Back();
};
}
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_BACK_HPP

19
src/app/browser/main/tab/data/navbar/history/forward.hpp

@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_FORWARD_HPP
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_FORWARD_HPP
#include <glibmm/i18n.h>
#include <gtkmm/button.h>
namespace app::browser::main::tab::data::navbar::history
{
class Forward : public Gtk::Button
{
public:
Forward();
~Forward();
};
}
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_FORWARD_HPP

19
src/app/browser/main/tab/data/navbar/update.hpp

@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_UPDATE_HPP
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_UPDATE_HPP
#include <glibmm/i18n.h>
#include <gtkmm/button.h>
namespace app::browser::main::tab::data::navbar
{
class Update : public Gtk::Button
{
public:
Update();
~Update();
};
}
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_UPDATE_HPP

20
src/app/browser/main/tab/data.cpp → src/app/browser/main/tab/page.cpp

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
#include "data.hpp"
#include "data/navbar.hpp"
#include "data/content.hpp"
#include "page.hpp"
#include "page/navbar.hpp"
#include "page/content.hpp"
using namespace app::browser::main::tab;
Data::Data()
Page::Page()
{
// Init container
set_orientation(
@ -19,17 +19,17 @@ Data::Data() @@ -19,17 +19,17 @@ Data::Data()
"update",
sigc::mem_fun(
* this,
& Data::update
& Page::update
)
);
insert_action_group(
"data",
"page",
action_group
);
// Init components
navbar = new data::Navbar();
navbar = new page::Navbar();
append(
* navbar
@ -39,17 +39,17 @@ Data::Data() @@ -39,17 +39,17 @@ Data::Data()
// because of insert_action_group + append here @TODO
navbar->refresh();
content = new data::Content();
content = new page::Content();
append(
* content
);
}
Data::~Data() = default;
Page::~Page() = default;
// Actions
void Data::update()
void Page::update()
{
// navbar->get_request_value() @TODO
}

18
src/app/browser/main/tab/data.hpp → src/app/browser/main/tab/page.hpp

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
#ifndef APP_BROWSER_MAIN_TAB_DATA_HPP
#define APP_BROWSER_MAIN_TAB_DATA_HPP
#ifndef APP_BROWSER_MAIN_TAB_PAGE_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_HPP
#include <giomm/simpleactiongroup.h>
#include <glibmm/refptr.h>
@ -8,28 +8,28 @@ @@ -8,28 +8,28 @@
namespace app::browser::main::tab
{
namespace data
namespace page
{
class Navbar;
class Content;
}
class Data : public Gtk::Box
class Page : public Gtk::Box
{
private:
Glib::RefPtr<Gio::SimpleActionGroup> action_group;
data::Navbar * navbar;
data::Content * content;
page::Navbar * navbar;
page::Content * content;
public:
Data();
~Data();
Page();
~Page();
void update();
};
}
#endif // APP_BROWSER_MAIN_TAB_DATA_HPP
#endif // APP_BROWSER_MAIN_TAB_PAGE_HPP

2
src/app/browser/main/tab/data/content.cpp → src/app/browser/main/tab/page/content.cpp

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#include "content.hpp"
using namespace app::browser::main::tab::data;
using namespace app::browser::main::tab::page;
Content::Content()
{

18
src/app/browser/main/tab/page/content.hpp

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
#ifndef APP_BROWSER_MAIN_TAB_PAGE_CONTENT_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_CONTENT_HPP
#include <gtkmm/box.h>
namespace app::browser::main::tab::page
{
class Content : public Gtk::Box
{
public:
Content();
~Content();
};
}
#endif // APP_BROWSER_MAIN_TAB_PAGE_CONTENT_HPP

2
src/app/browser/main/tab/data/navbar.cpp → src/app/browser/main/tab/page/navbar.cpp

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
#include "navbar/request.hpp"
#include "navbar/update.hpp"
using namespace app::browser::main::tab::data;
using namespace app::browser::main::tab::page;
Navbar::Navbar()
{

8
src/app/browser/main/tab/data/navbar.hpp → src/app/browser/main/tab/page/navbar.hpp

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HPP
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HPP
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HPP
#include <giomm/simpleactiongroup.h>
#include <glibmm/refptr.h>
@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
#include <gtkmm/box.h>
#include <sigc++/functors/mem_fun.h>
namespace app::browser::main::tab::data
namespace app::browser::main::tab::page
{
namespace navbar
{
@ -49,4 +49,4 @@ namespace app::browser::main::tab::data @@ -49,4 +49,4 @@ namespace app::browser::main::tab::data
};
}
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HPP
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HPP

2
src/app/browser/main/tab/data/navbar/base.cpp → src/app/browser/main/tab/page/navbar/base.cpp

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#include "base.hpp"
using namespace app::browser::main::tab::data::navbar;
using namespace app::browser::main::tab::page::navbar;
Base::Base()
{

19
src/app/browser/main/tab/page/navbar/base.hpp

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BASE_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BASE_HPP
#include <glibmm/i18n.h>
#include <gtkmm/button.h>
namespace app::browser::main::tab::page::navbar
{
class Base : public Gtk::Button
{
public:
Base();
~Base();
};
}
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BASE_HPP

2
src/app/browser/main/tab/data/navbar/bookmark.cpp → src/app/browser/main/tab/page/navbar/bookmark.cpp

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#include "bookmark.hpp"
using namespace app::browser::main::tab::data::navbar;
using namespace app::browser::main::tab::page::navbar;
Bookmark::Bookmark()
{

19
src/app/browser/main/tab/page/navbar/bookmark.hpp

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BOOKMARK_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BOOKMARK_HPP
#include <glibmm/i18n.h>
#include <gtkmm/button.h>
namespace app::browser::main::tab::page::navbar
{
class Bookmark : public Gtk::Button
{
public:
Bookmark();
~Bookmark();
};
}
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BOOKMARK_HPP

2
src/app/browser/main/tab/data/navbar/history.cpp → src/app/browser/main/tab/page/navbar/history.cpp

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#include "history/back.hpp"
#include "history/forward.hpp"
using namespace app::browser::main::tab::data::navbar;
using namespace app::browser::main::tab::page::navbar;
History::History()
{

8
src/app/browser/main/tab/data/navbar/history.hpp → src/app/browser/main/tab/page/navbar/history.hpp

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_HPP
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_HPP
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_HPP
#include <glibmm/i18n.h>
#include <gtkmm/box.h>
namespace app::browser::main::tab::data::navbar
namespace app::browser::main::tab::page::navbar
{
namespace history
{
@ -27,4 +27,4 @@ namespace app::browser::main::tab::data::navbar @@ -27,4 +27,4 @@ namespace app::browser::main::tab::data::navbar
};
}
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_HPP
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_HPP

2
src/app/browser/main/tab/data/navbar/history/back.cpp → src/app/browser/main/tab/page/navbar/history/back.cpp

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#include "back.hpp"
using namespace app::browser::main::tab::data::navbar::history;
using namespace app::browser::main::tab::page::navbar::history;
Back::Back()
{

19
src/app/browser/main/tab/page/navbar/history/back.hpp

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_BACK_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_BACK_HPP
#include <glibmm/i18n.h>
#include <gtkmm/button.h>
namespace app::browser::main::tab::page::navbar::history
{
class Back : public Gtk::Button
{
public:
Back();
~Back();
};
}
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_BACK_HPP

2
src/app/browser/main/tab/data/navbar/history/forward.cpp → src/app/browser/main/tab/page/navbar/history/forward.cpp

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#include "forward.hpp"
using namespace app::browser::main::tab::data::navbar::history;
using namespace app::browser::main::tab::page::navbar::history;
Forward::Forward()
{

19
src/app/browser/main/tab/page/navbar/history/forward.hpp

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_FORWARD_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_FORWARD_HPP
#include <glibmm/i18n.h>
#include <gtkmm/button.h>
namespace app::browser::main::tab::page::navbar::history
{
class Forward : public Gtk::Button
{
public:
Forward();
~Forward();
};
}
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_FORWARD_HPP

4
src/app/browser/main/tab/data/navbar/request.cpp → src/app/browser/main/tab/page/navbar/request.cpp

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#include "request.hpp"
using namespace app::browser::main::tab::data::navbar;
using namespace app::browser::main::tab::page::navbar;
using namespace std;
// Construct
@ -33,7 +33,7 @@ Request::Request() @@ -33,7 +33,7 @@ Request::Request()
parse();
activate_action(
"data.update"
"page.update"
);
}
);

8
src/app/browser/main/tab/data/navbar/request.hpp → src/app/browser/main/tab/page/navbar/request.hpp

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_REQUEST_HPP
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_REQUEST_HPP
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_REQUEST_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_REQUEST_HPP
#include <glibmm/i18n.h>
#include <gtkmm/entry.h>
@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
#include <regex>
#include <string>
namespace app::browser::main::tab::data::navbar
namespace app::browser::main::tab::page::navbar
{
class Request : public Gtk::Entry
{
@ -36,4 +36,4 @@ namespace app::browser::main::tab::data::navbar @@ -36,4 +36,4 @@ namespace app::browser::main::tab::data::navbar
};
}
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_REQUEST_HPP
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_REQUEST_HPP

4
src/app/browser/main/tab/data/navbar/update.cpp → src/app/browser/main/tab/page/navbar/update.cpp

@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
#include "update.hpp"
using namespace app::browser::main::tab::data::navbar;
using namespace app::browser::main::tab::page::navbar;
Update::Update()
{
set_action_name(
"data.update"
"page.update"
);
set_icon_name(

19
src/app/browser/main/tab/page/navbar/update.hpp

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_UPDATE_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_UPDATE_HPP
#include <glibmm/i18n.h>
#include <gtkmm/button.h>
namespace app::browser::main::tab::page::navbar
{
class Update : public Gtk::Button
{
public:
Update();
~Update();
};
}
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_UPDATE_HPP
Loading…
Cancel
Save