[gnote] Fix deprecations in webdav sync plugin
- From: Aurimas ÄŒernius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Fix deprecations in webdav sync plugin
- Date: Sun, 23 May 2021 18:35:46 +0000 (UTC)
commit f25872b8eadbc34b8a08b1fe38dc602e8b03ecac
Author: Aurimas ÄŒernius <aurisc4 gmail com>
Date: Sun May 23 21:33:02 2021 +0300
Fix deprecations in webdav sync plugin
.../webdavsyncservice/webdavsyncserviceaddin.cpp | 18 ++++++------------
.../webdavsyncservice/webdavsyncserviceaddin.hpp | 3 +--
2 files changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/src/plugins/webdavsyncservice/webdavsyncserviceaddin.cpp
b/src/plugins/webdavsyncservice/webdavsyncserviceaddin.cpp
index a3b9ba93..52ead9c1 100644
--- a/src/plugins/webdavsyncservice/webdavsyncserviceaddin.cpp
+++ b/src/plugins/webdavsyncservice/webdavsyncserviceaddin.cpp
@@ -93,9 +93,9 @@ WebDavSyncServiceAddin * WebDavSyncServiceAddin::create()
Gtk::Widget *WebDavSyncServiceAddin::create_preferences_control(EventHandler requiredPrefChanged)
{
- Gtk::Table *table = new Gtk::Table(3, 2, false);
- table->set_row_spacings(5);
- table->set_col_spacings(10);
+ auto table = new Gtk::Grid;
+ table->set_row_spacing(5);
+ table->set_column_spacing(10);
// Read settings out of gconf
Glib::ustring url, username, password;
@@ -301,22 +301,16 @@ bool WebDavSyncServiceAddin::accept_ssl_cert()
}
}
-void WebDavSyncServiceAddin::add_row(Gtk::Table *table, Gtk::Widget *widget, const Glib::ustring &
labelText, uint row)
+void WebDavSyncServiceAddin::add_row(Gtk::Grid *table, Gtk::Widget *widget, const Glib::ustring & labelText,
uint row)
{
Gtk::Label *l = new Gtk::Label(labelText);
l->set_use_underline(true);
l->property_xalign() = 0.0f;
l->show();
- table->attach(*l, 0, 1, row, row + 1,
- Gtk::FILL,
- Gtk::EXPAND | Gtk::FILL,
- 0, 0);
+ table->attach(*l, 0, row);
widget->show();
- table->attach(*widget, 1, 2, row, row + 1,
- Gtk::EXPAND | Gtk::FILL,
- Gtk::EXPAND | Gtk::FILL,
- 0, 0);
+ table->attach(*widget, 1, row);
l->set_mnemonic_widget(*widget);
diff --git a/src/plugins/webdavsyncservice/webdavsyncserviceaddin.hpp
b/src/plugins/webdavsyncservice/webdavsyncserviceaddin.hpp
index 48d4a22b..b9e63f94 100644
--- a/src/plugins/webdavsyncservice/webdavsyncserviceaddin.hpp
+++ b/src/plugins/webdavsyncservice/webdavsyncserviceaddin.hpp
@@ -23,7 +23,6 @@
#include <gtkmm/entry.h>
-#include <gtkmm/table.h>
#include "sharp/dynamicmodule.hpp"
#include "synchronization/gvfssyncservice.hpp"
@@ -88,7 +87,7 @@ private:
void save_config_settings(const Glib::ustring & url, const Glib::ustring & username, const Glib::ustring &
password);
bool get_pref_widget_settings(Glib::ustring & url, Glib::ustring & username, Glib::ustring & password);
bool accept_ssl_cert();
- void add_row(Gtk::Table *table, Gtk::Widget *widget, const Glib::ustring & labelText, uint row);
+ void add_row(Gtk::Grid *table, Gtk::Widget *widget, const Glib::ustring & labelText, uint row);
Gtk::Entry *m_url_entry;
Gtk::Entry *m_username_entry;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]