You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.4 KiB
38 lines
1.4 KiB
#ifndef MY_PLUG_H
|
|
#define MY_PLUG_H
|
|
|
|
#include "my_plug.h"
|
|
#include "ubl-settings-quotas.h"
|
|
|
|
CmdArgParser::CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help)
|
|
: Glib::OptionGroup{p_name, p_description, p_help} {
|
|
Glib::OptionEntry socketIDArg;
|
|
socketIDArg.set_long_name("socket-id");
|
|
socketIDArg.set_flags(Glib::OptionEntry::FLAG_IN_MAIN);
|
|
socketIDArg.set_description("Settings manager socket");
|
|
Glib::OptionEntry socketExtId;
|
|
socketExtId.set_long_name("socket-ext-id");
|
|
socketExtId.set_flags(Glib::OptionEntry::FLAG_IN_MAIN);
|
|
socketExtId.set_description("Settings manager secondary socket");
|
|
Glib::OptionEntry socketTrdId;
|
|
socketTrdId.set_long_name("socket-trd-id");
|
|
socketTrdId.set_flags(Glib::OptionEntry::FLAG_IN_MAIN);
|
|
socketTrdId.set_description("Settings manager secondary socket");
|
|
add_entry(socketIDArg, m_socketID);
|
|
add_entry(socketExtId, socket_ext_id_I);
|
|
add_entry(socketTrdId, socket_trd_id_I);
|
|
}
|
|
::Window CmdArgParser::GetSocketID() const{
|
|
return m_socketID;
|
|
}
|
|
|
|
SettingsPlug::SettingsPlug(::Window p_socketID, Glib::RefPtr<Gtk::Builder> builder)
|
|
:Gtk::Plug{p_socketID} {
|
|
MainWindow* wnd = nullptr;
|
|
builder->get_widget_derived("window", wnd);
|
|
builder->get_widget("plugBox", plugBox);
|
|
plugBox->get_parent()->remove(*plugBox);
|
|
add(*plugBox);
|
|
show_all_children();
|
|
}
|
|
#endif |