[gnote/tabbed] Ignore open in new window setting in search notes widget
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote/tabbed] Ignore open in new window setting in search notes widget
- Date: Sun, 21 Nov 2021 19:39:34 +0000 (UTC)
commit 531b36225fbb40299284f370653c432b0a60ae37
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Nov 21 21:27:10 2021 +0200
Ignore open in new window setting in search notes widget
src/searchnoteswidget.cpp | 20 +++-----------------
src/searchnoteswidget.hpp | 1 -
2 files changed, 3 insertions(+), 18 deletions(-)
---
diff --git a/src/searchnoteswidget.cpp b/src/searchnoteswidget.cpp
index 1cbf7a32..777fb066 100644
--- a/src/searchnoteswidget.cpp
+++ b/src/searchnoteswidget.cpp
@@ -110,7 +110,6 @@ SearchNotesWidget::SearchNotesWidget(IGnote & g, NoteManagerBase & m)
notebook_manager.signal_note_pin_status_changed
.connect(sigc::mem_fun(*this, &SearchNotesWidget::on_note_pin_status_changed));
- g.preferences().signal_open_notes_in_new_window_changed.connect(sigc::mem_fun(*this,
&SearchNotesWidget::on_settings_changed));
parse_sorting_setting(g.preferences().search_sorting());
g.preferences().signal_desktop_gnome_clock_format_changed.connect(sigc::mem_fun(*this,
&SearchNotesWidget::update_results));
}
@@ -1300,11 +1299,9 @@ Gtk::Menu *SearchNotesWidget::get_note_list_context_menu()
m_note_list_context_menu = new Gtk::Menu;
Gtk::MenuItem *item;
- if(!m_gnote.preferences().open_notes_in_new_window()) {
- m_open_note_menu_item = manage(new Gtk::MenuItem(_("_Open"), true));
- m_open_note_menu_item->signal_activate().connect(sigc::mem_fun(*this,
&SearchNotesWidget::on_open_note));
- m_note_list_context_menu->add(*m_open_note_menu_item);
- }
+ m_open_note_menu_item = manage(new Gtk::MenuItem(_("_Open"), true));
+ m_open_note_menu_item->signal_activate().connect(sigc::mem_fun(*this, &SearchNotesWidget::on_open_note));
+ m_note_list_context_menu->add(*m_open_note_menu_item);
m_open_note_new_window_menu_item = manage(new Gtk::MenuItem(_("Open In New _Window"), true));
m_open_note_new_window_menu_item->signal_activate()
@@ -1438,17 +1435,6 @@ void SearchNotesWidget::set_initial_focus()
}
}
-void SearchNotesWidget::on_settings_changed()
-{
- if(m_note_list_context_menu) {
- delete m_note_list_context_menu;
- m_note_list_context_menu = NULL;
- m_open_note_menu_item = nullptr;
- m_open_note_new_window_menu_item = nullptr;
- m_delete_note_menu_item = nullptr;
- }
-}
-
void SearchNotesWidget::on_sorting_changed()
{
// don't do anything if in search mode
diff --git a/src/searchnoteswidget.hpp b/src/searchnoteswidget.hpp
index ca2bb911..4fe4ec3a 100644
--- a/src/searchnoteswidget.hpp
+++ b/src/searchnoteswidget.hpp
@@ -119,7 +119,6 @@ private:
void on_open_notebook_template_note();
void on_new_notebook();
void on_delete_notebook();
- void on_settings_changed();
void on_sorting_changed();
void parse_sorting_setting(const Glib::ustring & sorting);
void on_rename_notebook();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]