Browse Source

init request entry class

CPP-GTK4
yggverse 3 months ago
parent
commit
86f4313a1d
  1. 1
      Makefile
  2. 1
      po/POTFILES.in
  3. 7
      src/app/browser/main/tab/data/navbar.cpp
  4. 2
      src/app/browser/main/tab/data/navbar.hpp
  5. 16
      src/app/browser/main/tab/data/navbar/request.cpp
  6. 19
      src/app/browser/main/tab/data/navbar/request.hpp

1
Makefile

@ -19,6 +19,7 @@ SRCS = src/main.cpp\ @@ -19,6 +19,7 @@ SRCS = src/main.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/label.cpp\
src/lib/database.cpp\

1
po/POTFILES.in

@ -11,6 +11,7 @@ src/app/browser/main/tab/data/navbar/bookmark.cpp @@ -11,6 +11,7 @@ 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/label.cpp
src/lib/database.cpp

7
src/app/browser/main/tab/data/navbar.cpp

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
#include "navbar/base.hpp"
#include "navbar/bookmark.hpp"
#include "navbar/history.hpp"
#include "navbar/request.hpp"
#include "navbar/update.hpp"
using namespace app::browser::main::tab::data;
@ -52,6 +53,12 @@ Navbar::Navbar() @@ -52,6 +53,12 @@ Navbar::Navbar()
* update
);
request = new navbar::Request();
append(
* request
);
bookmark = new navbar::Bookmark();
append(

2
src/app/browser/main/tab/data/navbar.hpp

@ -11,6 +11,7 @@ namespace app::browser::main::tab::data @@ -11,6 +11,7 @@ namespace app::browser::main::tab::data
class Bookmark;
class History;
class Update;
class Request;
}
class Navbar : public Gtk::Box
@ -25,6 +26,7 @@ namespace app::browser::main::tab::data @@ -25,6 +26,7 @@ namespace app::browser::main::tab::data
navbar::Base * base;
navbar::Bookmark * bookmark;
navbar::History * history;
navbar::Request * request;
navbar::Update * update;
public:

16
src/app/browser/main/tab/data/navbar/request.cpp

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
#include "request.hpp"
using namespace app::browser::main::tab::data::navbar;
Request::Request()
{
set_placeholder_text(
_("URL or search term...")
);
set_hexpand(
true
);
}
Request::~Request() = default;

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

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