[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-333-g8b228c1c3

paul at claws-mail.org paul at claws-mail.org
Mon Oct 11 10:03:37 CET 2021


The branch, gtk3 has been updated
       via  8b228c1c3484913037463a23b63f94180cdf1390 (commit)
      from  f9e10f155c38e40be08bc936e46d66a9b1485304 (commit)

Summary of changes:
 src/action.c             | 15 ++++++---------
 src/grouplistdialog.c    | 20 +++++++++-----------
 src/gtk/gtkaspell.c      | 15 ++++-----------
 src/gtk/inputdialog.c    | 15 +++++----------
 src/gtk/progressdialog.c |  7 +++----
 src/password_gtk.c       | 15 ++++-----------
 6 files changed, 31 insertions(+), 56 deletions(-)


- Log -----------------------------------------------------------------
commit 8b228c1c3484913037463a23b63f94180cdf1390
Author: paul <paul at claws-mail.org>
Date:   Mon Oct 11 11:03:34 2021 +0100

    replace deprecated gtk_dialog_get_action_area()

diff --git a/src/action.c b/src/action.c
index 9335474be..346b8806e 100644
--- a/src/action.c
+++ b/src/action.c
@@ -1295,7 +1295,6 @@ static void create_io_dialog(Children *children)
 	GtkWidget *label;
 	GtkWidget *text;
 	GtkWidget *scrolledwin;
-	GtkWidget *hbox;
 	GtkWidget *progress_bar = NULL;
 	GtkWidget *abort_button;
 	GtkWidget *close_button;
@@ -1304,8 +1303,7 @@ static void create_io_dialog(Children *children)
 	debug_print("Creating action IO dialog\n");
 
 	dialog = gtk_dialog_new();
-	gtk_container_set_border_width
-		(GTK_CONTAINER(gtk_dialog_get_action_area(GTK_DIALOG(dialog))), 5);
+	gtk_container_set_border_width(GTK_CONTAINER(dialog), 5);
 	gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
 	gtk_window_set_title(GTK_WINDOW(dialog), _("Action's input/output"));
 	gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
@@ -1406,20 +1404,19 @@ static void create_io_dialog(Children *children)
 		gtk_widget_show(progress_bar);
 	}
 
-	gtkut_stock_button_set_create(&hbox, &abort_button, _("_Stop"),
-				      &close_button, _("_Close"), NULL, NULL);
+	abort_button = gtk_dialog_add_button(GTK_DIALOG(dialog), _("_Stop"),
+					     GTK_RESPONSE_NONE);
+	close_button = gtk_dialog_add_button(GTK_DIALOG(dialog),_("_Close"),
+					     GTK_RESPONSE_NONE);
+	gtk_widget_grab_default(close_button);
 	g_signal_connect(G_OBJECT(abort_button), "clicked",
 			 G_CALLBACK(kill_children_cb), children);
 	g_signal_connect(G_OBJECT(close_button), "clicked",
 			 G_CALLBACK(hide_io_dialog_cb), children);
-	gtk_widget_show(hbox);
 
 	if (children->nb)
 		gtk_widget_set_sensitive(close_button, FALSE);
 
-	gtk_container_add(GTK_CONTAINER(
-			gtk_dialog_get_action_area(GTK_DIALOG(dialog))), hbox);
-
 	if (!geometry.min_height) {
 		geometry.min_width = 582;
 		geometry.min_height = 310;
diff --git a/src/grouplistdialog.c b/src/grouplistdialog.c
index cb0521b2b..5f1a73735 100644
--- a/src/grouplistdialog.c
+++ b/src/grouplistdialog.c
@@ -1,6 +1,6 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2019 the Claws Mail team and Hiroyuki Yamamoto
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2021 the Claws Mail team and Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -145,7 +145,6 @@ static void grouplist_dialog_create(void)
 	GtkWidget *hgrid;
 	GtkWidget *msg_label;
 	GtkWidget *search_button;
-	GtkWidget *confirm_area;
 	GtkWidget *cancel_button;	
 	GtkWidget *refresh_button;	
 	GtkWidget *scrolledwin;
@@ -155,8 +154,7 @@ static void grouplist_dialog_create(void)
 
 	dialog = gtk_dialog_new();
 	gtk_window_set_resizable(GTK_WINDOW(dialog), TRUE);
-	gtk_container_set_border_width
-		(GTK_CONTAINER(gtk_dialog_get_action_area(GTK_DIALOG(dialog))), 5);
+	gtk_container_set_border_width(GTK_CONTAINER(dialog), 5);
 	gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
 	gtk_window_set_title(GTK_WINDOW(dialog), _("Newsgroup subscription"));
 	g_signal_connect(G_OBJECT(dialog), "delete_event",
@@ -236,12 +234,12 @@ static void grouplist_dialog_create(void)
 	gtk_widget_set_halign(status_label, GTK_ALIGN_START);
 	gtk_container_add(GTK_CONTAINER(grid), status_label);
 
-	gtkut_stock_button_set_create(&confirm_area,
-				      &refresh_button, "view-refresh",
-				      &cancel_button, _("_Cancel"),
-				      &ok_button, _("_OK"));
-	gtk_container_add(GTK_CONTAINER(gtk_dialog_get_action_area(GTK_DIALOG(dialog))),
-			  confirm_area);
+	refresh_button = gtk_dialog_add_button(GTK_DIALOG(dialog), _("_Refresh"),
+					       GTK_RESPONSE_NONE);
+	cancel_button = gtk_dialog_add_button(GTK_DIALOG(dialog),_("_Cancel"),
+					      GTK_RESPONSE_NONE);
+	ok_button = gtk_dialog_add_button(GTK_DIALOG(dialog),_("_OK"),
+					  GTK_RESPONSE_NONE);
 	gtk_widget_grab_default(ok_button);
 
 	g_signal_connect(G_OBJECT(ok_button), "clicked",
diff --git a/src/gtk/gtkaspell.c b/src/gtk/gtkaspell.c
index 41ff738c7..3d306efd5 100644
--- a/src/gtk/gtkaspell.c
+++ b/src/gtk/gtkaspell.c
@@ -1421,11 +1421,9 @@ static void replace_with_create_dialog_cb(GtkWidget *w, gpointer data)
 	GtkWidget *entry;
 	GtkWidget *ok_button;
 	GtkWidget *cancel_button;
-	GtkWidget *confirm_area;
 	GtkWidget *icon;
 	GtkWidget *parent_window;
 	GtkWidget *content_area;
-	GtkWidget *action_area;
 	gchar *utf8buf, *thelabel, *format;
 	gint xx, yy;
 	GtkAspell *gtkaspell = (GtkAspell *) data;
@@ -1439,7 +1437,6 @@ static void replace_with_create_dialog_cb(GtkWidget *w, gpointer data)
 
 	dialog = gtk_dialog_new();
 	content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
-	action_area = gtk_dialog_get_action_area(GTK_DIALOG(dialog));
 
 	gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
 	gtk_window_set_title(GTK_WINDOW(dialog),_("Replace unknown word"));
@@ -1510,14 +1507,10 @@ static void replace_with_create_dialog_cb(GtkWidget *w, gpointer data)
 	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
 	gtk_widget_show(label);
 
-	gtkut_stock_button_set_create(&confirm_area,
-				      &cancel_button, _("_Cancel"),
-				      &ok_button, _("_OK"),
-				      NULL, NULL);
-
-	gtk_box_pack_end(GTK_BOX(action_area), confirm_area, FALSE, FALSE, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(confirm_area), 5);
-
+	cancel_button = gtk_dialog_add_button(GTK_DIALOG(dialog), _("_Cancel"),
+					     GTK_RESPONSE_NONE);
+	ok_button = gtk_dialog_add_button(GTK_DIALOG(dialog),_("_OK"),
+					     GTK_RESPONSE_NONE);
 	g_signal_connect(G_OBJECT(ok_button), "clicked",
 			 G_CALLBACK(replace_with_supplied_word_cb), 
 			 gtkaspell);
diff --git a/src/gtk/inputdialog.c b/src/gtk/inputdialog.c
index 2620cba53..bf5b97123 100644
--- a/src/gtk/inputdialog.c
+++ b/src/gtk/inputdialog.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2019 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2021 the Claws Mail team and Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -287,7 +287,6 @@ static void input_dialog_create(gboolean is_password)
 	GtkWidget *hbox;
 	GtkWidget *vbox;
 	GtkWidget *cancel_button;
-	GtkWidget *confirm_area;
 
 	dialog = gtk_dialog_new();
 
@@ -364,14 +363,10 @@ static void input_dialog_create(gboolean is_password)
 	remember_checkbtn = gtk_check_button_new_with_label(_("Remember this"));
 	gtk_box_pack_start(GTK_BOX(vbox), remember_checkbtn, FALSE, FALSE, 0);
 
-	gtkut_stock_button_set_create(&confirm_area,
-				      &cancel_button, _("_Cancel"),
-				      &ok_button, _("_OK"),
-				      NULL, NULL);
-
-	gtk_box_pack_end(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(dialog))),
-			 confirm_area, FALSE, FALSE, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(confirm_area), 5);
+	cancel_button = gtk_dialog_add_button(GTK_DIALOG(dialog), _("_Cancel"),
+					      GTK_RESPONSE_NONE);
+	ok_button = gtk_dialog_add_button(GTK_DIALOG(dialog),_("_OK"),
+					  GTK_RESPONSE_NONE);
 
 	gtk_widget_show_all(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
 	
diff --git a/src/gtk/progressdialog.c b/src/gtk/progressdialog.c
index 6b34f9fc6..ff48df052 100644
--- a/src/gtk/progressdialog.c
+++ b/src/gtk/progressdialog.c
@@ -1,6 +1,6 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2019 the Claws Mail team and Hiroyuki Yamamoto
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2021 the Claws Mail team and Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -73,8 +73,7 @@ ProgressDialog *progress_dialog_create(void)
 	gtk_window_set_resizable(GTK_WINDOW(dialog), TRUE);
 	gtk_widget_realize(dialog);
 
-	gtk_container_set_border_width
-		(GTK_CONTAINER(gtk_dialog_get_action_area(GTK_DIALOG(dialog))), 0);
+	gtk_container_set_border_width(GTK_CONTAINER(dialog), 0);
 	vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
 	gtk_box_set_spacing(GTK_BOX(vbox), 8);
 
diff --git a/src/password_gtk.c b/src/password_gtk.c
index 550a18e84..e839eb116 100644
--- a/src/password_gtk.c
+++ b/src/password_gtk.c
@@ -112,7 +112,6 @@ void primary_passphrase_change_dialog()
 	GtkWidget *icon, *table, *label;
 	GtkWidget *msg_title;
 	GtkWidget *entry_old, *entry_new1, *entry_new2;
-	GtkWidget *confirm_area;
 	GtkWidget *ok_button, *cancel_button;
 	struct _ctx *ctx;
 
@@ -209,16 +208,10 @@ void primary_passphrase_change_dialog()
 
 	gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
 
-	/* Dialog buttons */
-	gtkut_stock_button_set_create(&confirm_area,
-			&cancel_button, _("_Cancel"),
-			&ok_button, _("_OK"),
-			NULL, NULL);
-
-	gtk_box_pack_end(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(dialog))),
-			confirm_area, FALSE, FALSE, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(confirm_area), 5);
-
+	cancel_button = gtk_dialog_add_button(GTK_DIALOG(dialog), _("_Cancel"),
+					      GTK_RESPONSE_NONE);
+	ok_button = gtk_dialog_add_button(GTK_DIALOG(dialog),_("_OK"),
+					  GTK_RESPONSE_NONE);
 	gtk_widget_grab_default(ok_button);
 
 	/* If no primary passphrase is set, disable the "old passphrase" entry */

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list