[gnote] Cleanup using signal_desktop_gnome_clock_format_changed
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Cleanup using signal_desktop_gnome_clock_format_changed
- Date: Sun, 13 Dec 2020 11:56:55 +0000 (UTC)
commit 9b332ffdf7ac7e3640a31b991557ca91e4d46904
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Dec 13 13:12:40 2020 +0200
Cleanup using signal_desktop_gnome_clock_format_changed
src/searchnoteswidget.cpp | 9 +--------
src/searchnoteswidget.hpp | 1 -
2 files changed, 1 insertion(+), 9 deletions(-)
---
diff --git a/src/searchnoteswidget.cpp b/src/searchnoteswidget.cpp
index 6942f4b4..332a3737 100644
--- a/src/searchnoteswidget.cpp
+++ b/src/searchnoteswidget.cpp
@@ -109,9 +109,7 @@ SearchNotesWidget::SearchNotesWidget(IGnote & g, NoteManagerBase & m)
Glib::RefPtr<Gio::Settings> settings = g.preferences().get_schema_settings(Preferences::SCHEMA_GNOTE);
settings->signal_changed().connect(sigc::mem_fun(*this, &SearchNotesWidget::on_settings_changed));
parse_sorting_setting(settings->get_string(Preferences::SEARCH_SORTING));
- g.preferences().schema_gnome_interface()->signal_changed(Preferences::DESKTOP_GNOME_CLOCK_FORMAT)
- .connect(sigc::mem_fun(*this, &SearchNotesWidget::on_gnome_clock_format_changed));
- g.preferences().schema_gnome_interface()->get_string(Preferences::DESKTOP_GNOME_CLOCK_FORMAT); // query so
the signal is emmitted
+ g.preferences().signal_desktop_gnome_clock_format_changed.connect(sigc::mem_fun(*this,
&SearchNotesWidget::update_results));
}
SearchNotesWidget::~SearchNotesWidget()
@@ -1443,11 +1441,6 @@ void SearchNotesWidget::on_settings_changed(const Glib::ustring & key)
}
}
-void SearchNotesWidget::on_gnome_clock_format_changed(const Glib::ustring & /*key*/)
-{
- update_results();
-}
-
void SearchNotesWidget::on_sorting_changed()
{
// don't do anything if in search mode
diff --git a/src/searchnoteswidget.hpp b/src/searchnoteswidget.hpp
index 6e09b86e..d58e1ebd 100644
--- a/src/searchnoteswidget.hpp
+++ b/src/searchnoteswidget.hpp
@@ -124,7 +124,6 @@ private:
void on_new_notebook();
void on_delete_notebook();
void on_settings_changed(const Glib::ustring & key);
- void on_gnome_clock_format_changed(const Glib::ustring & key);
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]