delete entrys

This commit is contained in:
daleclack 2024-01-18 11:35:20 +08:00
parent 264fa5f0b2
commit 8a0af99d2a
3 changed files with 1 additions and 79 deletions

View File

@ -18,42 +18,6 @@
<object class="GtkGrid">
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkLabel" id="label_lts">
<property name="halign">end</property>
<property name="label">LongTerm:</property>
<layout>
<property name="column">0</property>
<property name="column-span">1</property>
<property name="row">0</property>
<property name="row-span">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="label_stable">
<property name="halign">end</property>
<property name="label">Stable:</property>
<layout>
<property name="column">0</property>
<property name="column-span">1</property>
<property name="row">1</property>
<property name="row-span">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="label_dev">
<property name="halign">end</property>
<property name="label">Development:</property>
<layout>
<property name="column">0</property>
<property name="column-span">1</property>
<property name="row">2</property>
<property name="row-span">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="halign">end</property>
@ -66,39 +30,6 @@
</layout>
</object>
</child>
<child>
<object class="GtkEntry" id="entry_lts">
<property name="text">default config</property>
<layout>
<property name="column">1</property>
<property name="column-span">1</property>
<property name="row">0</property>
<property name="row-span">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkEntry" id="entry_stable">
<property name="text">default config</property>
<layout>
<property name="column">1</property>
<property name="column-span">1</property>
<property name="row">1</property>
<property name="row-span">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkEntry" id="entry_dev">
<property name="text">default config</property>
<layout>
<property name="column">1</property>
<property name="column-span">1</property>
<property name="row">2</property>
<property name="row-span">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkEntry" id="entry_path">
<property name="text">./</property>

View File

@ -5,9 +5,6 @@ MyPrefs::MyPrefs(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &ref_
ref_Glade(ref_builder)
{
// Get Widgets
entry_lts = ref_builder->get_widget<Gtk::Entry>("entry_lts");
entry_stable = ref_builder->get_widget<Gtk::Entry>("entry_stable");
entry_dev = ref_builder->get_widget<Gtk::Entry>("entry_dev");
entry_path = ref_builder->get_widget<Gtk::Entry>("entry_path");
btnpath = ref_builder->get_widget<Gtk::Button>("btnpath");
btnok = ref_builder->get_widget<Gtk::Button>("btn_ok");
@ -82,9 +79,6 @@ void MyPrefs::btnok_clicked()
)");
// Load config to json file
out_data["Longterm"] = entry_lts->get_text();
out_data["Stable"] = entry_stable->get_text();
out_data["Develop"] = entry_dev->get_text();
out_data["Release_Path_Unix"] = config_unix;
out_data["Release_Path_Win32"] = config_win32;
out_data["Release_Path_Darwin"] = config_darwin;
@ -141,9 +135,6 @@ void MyPrefs::reset_entries()
background_id = data["background"];
// Set text from json file data
entry_lts->set_text(config_longterm);
entry_stable->set_text(config_stable);
entry_dev->set_text(config_devel);
// Use different path for Linux filesystem and Windows
switch (get_os_type())

View File

@ -43,7 +43,7 @@ private:
Gtk::Window *parent_win;
// Child widgets
Gtk::Entry *entry_lts, *entry_stable, *entry_dev, *entry_path;
Gtk::Entry *entry_path;
Gtk::Button *btnpath, *btnok, *btncancel;
bool dark_mode;