[gnote/tabbed: 7/19] Remove UI for saving template note size




commit 58d4bda75283a56e623933110eba631ea0c8911c
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Oct 24 17:18:59 2021 +0300

    Remove UI for saving template note size

 src/notewindow.cpp | 21 ++-------------------
 src/notewindow.hpp |  3 ---
 2 files changed, 2 insertions(+), 22 deletions(-)
---
diff --git a/src/notewindow.cpp b/src/notewindow.cpp
index 08a72221..f2b8c6bf 100644
--- a/src/notewindow.cpp
+++ b/src/notewindow.cpp
@@ -73,7 +73,6 @@ namespace gnote {
   {
     ITagManager & tag_manager = note.manager().tag_manager();
     m_template_tag = tag_manager.get_or_create_system_tag(ITagManager::TEMPLATE_NOTE_SYSTEM_TAG);
-    m_template_save_size_tag = 
tag_manager.get_or_create_system_tag(ITagManager::TEMPLATE_NOTE_SAVE_SIZE_SYSTEM_TAG);
     m_template_save_selection_tag = 
tag_manager.get_or_create_system_tag(ITagManager::TEMPLATE_NOTE_SAVE_SELECTION_SYSTEM_TAG);
     m_template_save_title_tag = 
tag_manager.get_or_create_system_tag(ITagManager::TEMPLATE_NOTE_SAVE_TITLE_SYSTEM_TAG);
 
@@ -384,10 +383,6 @@ namespace gnote {
     Gtk::Button * untemplateButton = manage(new Gtk::Button(_("Convert to regular note")));
     untemplateButton->signal_clicked().connect(sigc::mem_fun(*this, 
&NoteWindow::on_untemplate_button_click));
 
-    m_save_size_check_button = manage(new Gtk::CheckButton(_("Save Si_ze"), true));
-    m_save_size_check_button->set_active(m_note.contains_tag(m_template_save_size_tag));
-    m_save_size_check_button->signal_toggled().connect(sigc::mem_fun(*this, 
&NoteWindow::on_save_size_check_button_toggled));
-
     m_save_selection_check_button = manage(new Gtk::CheckButton(_("Save Se_lection"), true));
     m_save_selection_check_button->set_active(m_note.contains_tag(m_template_save_selection_tag));
     m_save_selection_check_button->signal_toggled().connect(sigc::mem_fun(*this, 
&NoteWindow::on_save_selection_check_button_toggled));
@@ -398,9 +393,8 @@ namespace gnote {
 
     bar->attach(*infoLabel, 0, 0, 1, 1);
     bar->attach(*untemplateButton, 0, 1, 1, 1);
-    bar->attach(*m_save_size_check_button, 0, 2, 1, 1);
-    bar->attach(*m_save_selection_check_button, 0, 3, 1, 1);
-    bar->attach(*m_save_title_check_button, 0, 4, 1, 1);
+    bar->attach(*m_save_selection_check_button, 0, 2, 1, 1);
+    bar->attach(*m_save_title_check_button, 0, 3, 1, 1);
 
     if(m_note.contains_tag(m_template_tag)) {
       bar->show_all();
@@ -419,17 +413,6 @@ namespace gnote {
   }
 
 
-  void NoteWindow::on_save_size_check_button_toggled()
-  {
-    if(m_save_size_check_button->get_active()) {
-      m_note.add_tag(m_template_save_size_tag);
-    }
-    else {
-      m_note.remove_tag(m_template_save_size_tag);
-    }
-  }
-
-
   void NoteWindow::on_save_selection_check_button_toggled()
   {
     if(m_save_selection_check_button->get_active()) {
diff --git a/src/notewindow.hpp b/src/notewindow.hpp
index 3e10a271..bd63ca74 100644
--- a/src/notewindow.hpp
+++ b/src/notewindow.hpp
@@ -188,7 +188,6 @@ private:
   Gtk::Grid *make_toolbar();
   Gtk::Grid * make_template_bar();
   void on_untemplate_button_click();
-  void on_save_size_check_button_toggled();
   void on_save_selection_check_button_toggled();
   void on_save_title_check_button_toggled();
   void on_note_tag_added(const NoteBase&, const Tag::Ptr&);
@@ -217,7 +216,6 @@ private:
   sigc::connection              m_delete_note_slot;
   sigc::connection              m_important_note_slot;
   Gtk::Grid                    *m_template_widget;
-  Gtk::CheckButton             *m_save_size_check_button;
   Gtk::CheckButton             *m_save_selection_check_button;
   Gtk::CheckButton             *m_save_title_check_button;
 
@@ -225,7 +223,6 @@ private:
   bool                         m_enabled;
 
   Tag::Ptr m_template_tag;
-  Tag::Ptr m_template_save_size_tag;
   Tag::Ptr m_template_save_selection_tag;
   Tag::Ptr m_template_save_title_tag;
 };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]