parent
43a295cf22
commit
7b57b7d514
@ -0,0 +1,41 @@
|
|||||||
|
#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
|
@ -0,0 +1,20 @@
|
|||||||
|
#include "project_lib.h"
|
||||||
|
|
||||||
|
|
||||||
|
class CmdArgParser : public Glib::OptionGroup {
|
||||||
|
public:
|
||||||
|
CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help);
|
||||||
|
::Window GetSocketID() const;
|
||||||
|
private:
|
||||||
|
int m_socketID = 0;
|
||||||
|
|
||||||
|
};
|
||||||
|
class SettingsPlug : public Gtk::Plug{
|
||||||
|
public:
|
||||||
|
Gtk::Window *window;
|
||||||
|
SettingsPlug(::Window p_socketID, Glib::RefPtr<Gtk::Builder> builder);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Gtk::Widget *plugBox;
|
||||||
|
Gtk::Widget *parent;
|
||||||
|
};
|
@ -1,11 +1,28 @@
|
|||||||
#ifndef MY_TYPE_H
|
#ifndef MY_TYPE_H
|
||||||
#define MY_TYPE_H
|
#define MY_TYPE_H
|
||||||
|
|
||||||
#include <typle>
|
#include "project_lib.h"
|
||||||
#include <string>
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
typedef unsigned long max_num_T;
|
typedef unsigned long max_num_T;
|
||||||
|
|
||||||
tuple <string, bool, max_num_T, max_num_T, max_num_T, max_num_T,
|
struct users_grups{
|
||||||
max_num_T, max_num_T, max_num_T, max_num_T, max_num_T, max_num_T> tuple_user_grups;
|
string name;
|
||||||
|
bool state;
|
||||||
|
max_num_T size_data;
|
||||||
|
max_num_T soft_limit_size;
|
||||||
|
max_num_T severe_restriction_size;
|
||||||
|
max_num_T postponement_size_brat;
|
||||||
|
max_num_T hard_limit_activation_time_size;
|
||||||
|
max_num_T file;
|
||||||
|
max_num_T soft_file_limitation;
|
||||||
|
max_num_T hard_file_restriction;
|
||||||
|
max_num_T postponement_hard_file_restriction;
|
||||||
|
max_num_T hard_limit_activation_time;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct users_grups USER_GRUPS;
|
||||||
|
typedef map <string, string> map_str_str;
|
||||||
|
typedef map <string, string>* map_s_s_ptr;
|
||||||
#endif
|
#endif
|
Loading…
Reference in new issue