[Commits] [SCM] claws branch, master, updated. 3.17.2-13-g64f270d
wwp at claws-mail.org
wwp at claws-mail.org
Tue Dec 18 10:36:56 CET 2018
The branch, master has been updated
via 64f270d96795523d3e3b8d17164d4ba89648a1de (commit)
from 1667909b4ae283db453a8348e0ec560b4415d56e (commit)
Summary of changes:
src/prefs_common.c | 5 +++++
src/prefs_common.h | 2 ++
src/ssl_manager.c | 26 ++++++++++++++++++++++++++
3 files changed, 33 insertions(+)
- Log -----------------------------------------------------------------
commit 64f270d96795523d3e3b8d17164d4ba89648a1de
Author: wwp <subscript at free.fr>
Date: Tue Dec 18 10:36:26 2018 +0100
Remember the size of the SSL manager window.
diff --git a/src/prefs_common.c b/src/prefs_common.c
index aacb721..1f0fbce 100644
--- a/src/prefs_common.c
+++ b/src/prefs_common.c
@@ -1057,6 +1057,11 @@ static PrefParam param[] = {
{"tagswin_height", "-1", &prefs_common.tagswin_height, P_INT,
NULL, NULL, NULL},
+ {"sslmanwin_width", "486", &prefs_common.sslmanwin_width, P_INT,
+ NULL, NULL, NULL},
+ {"sslmanwin_height", "-1", &prefs_common.sslmanwin_height, P_INT,
+ NULL, NULL, NULL},
+
{"addressbookwin_width", "520", &prefs_common.addressbookwin_width, P_INT,
NULL, NULL, NULL},
{"addressbookwin_height", "-1", &prefs_common.addressbookwin_height, P_INT,
diff --git a/src/prefs_common.h b/src/prefs_common.h
index edc55f2..0563080 100644
--- a/src/prefs_common.h
+++ b/src/prefs_common.h
@@ -496,6 +496,8 @@ struct _PrefsCommon
gint actionsiodialog_height;
gint tagswin_width;
gint tagswin_height;
+ gint sslmanwin_width;
+ gint sslmanwin_height;
gint addressbookwin_width;
gint addressbookwin_height;
gint addressbookeditpersonwin_width;
diff --git a/src/ssl_manager.c b/src/ssl_manager.c
index f51ca33..0735b2d 100644
--- a/src/ssl_manager.c
+++ b/src/ssl_manager.c
@@ -166,6 +166,18 @@ static GtkWidget *ssl_manager_list_view_create (void)
return GTK_WIDGET(list_view);
}
+/*!
+ *\brief Save Gtk object size to prefs dataset
+ */
+static void ssl_manager_size_allocate_cb(GtkWidget *widget,
+ GtkAllocation *allocation)
+{
+ cm_return_if_fail(allocation != NULL);
+
+ prefs_common.sslmanwin_width = allocation->width;
+ prefs_common.sslmanwin_height = allocation->height;
+}
+
void ssl_manager_create(void)
{
GtkWidget *window;
@@ -176,6 +188,7 @@ void ssl_manager_create(void)
GtkWidget *view_btn;
GtkWidget *delete_btn;
GtkWidget *close_btn;
+ static GdkGeometry geometry;
window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "ssl_manager");
gtk_window_set_title (GTK_WINDOW(window),
@@ -186,6 +199,8 @@ void ssl_manager_create(void)
gtk_window_set_resizable(GTK_WINDOW (window), TRUE);
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(ssl_manager_close_cb), NULL);
+ g_signal_connect(G_OBJECT(window), "size_allocate",
+ G_CALLBACK(ssl_manager_size_allocate_cb), NULL);
g_signal_connect(G_OBJECT(window), "key_press_event",
G_CALLBACK(key_pressed), NULL);
MANAGE_WINDOW_SIGNALS_CONNECT (window);
@@ -211,6 +226,7 @@ void ssl_manager_create(void)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
+
gtk_container_add(GTK_CONTAINER (scroll), certlist);
gtk_box_pack_start(GTK_BOX(hbox1), scroll, TRUE, TRUE, 0);
@@ -219,6 +235,16 @@ void ssl_manager_create(void)
gtk_box_pack_start(GTK_BOX(vbox1), delete_btn, FALSE, FALSE, 4);
gtk_box_pack_end(GTK_BOX(vbox1), close_btn, FALSE, FALSE, 4);
+ if (!geometry.min_height) {
+ geometry.min_width = 700;
+ geometry.min_height = 250;
+ }
+
+ gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
+ GDK_HINT_MIN_SIZE);
+ gtk_widget_set_size_request(window, prefs_common.sslmanwin_width,
+ prefs_common.sslmanwin_height);
+
gtk_widget_show(certlist);
gtk_widget_show(scroll);
gtk_widget_show(hbox1);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list