[gnome-utils] gsearchtool: Use gtk_widget_set_can_default()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-utils] gsearchtool: Use gtk_widget_set_can_default()
- Date: Wed, 1 Sep 2010 12:57:44 +0000 (UTC)
commit 653e571312ea1c3250d59ee3f5c4ca8d990ab6e4
Author: Benjamin Otte <otte redhat com>
Date: Wed Sep 1 13:54:15 2010 +0200
gsearchtool: Use gtk_widget_set_can_default()
Replaces previous usage of GTK_WIDGET_SET_FLAGS() and makes code
sealing-safe.
https://bugzilla.gnome.org/show_bug.cgi?id=628499
gsearchtool/gsearchtool-callbacks.c | 6 +++---
gsearchtool/gsearchtool.c | 14 +++++++-------
2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gsearchtool/gsearchtool-callbacks.c b/gsearchtool/gsearchtool-callbacks.c
index 8efd629..a9b55a1 100644
--- a/gsearchtool/gsearchtool-callbacks.c
+++ b/gsearchtool/gsearchtool-callbacks.c
@@ -365,7 +365,7 @@ display_dialog_file_open_limit (GtkWidget * window,
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
button = gtk_button_new_from_stock ("gtk-open");
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK);
@@ -562,7 +562,7 @@ display_dialog_folder_open_limit (GtkWidget * window,
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
button = gtk_button_new_from_stock ("gtk-open");
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK);
@@ -742,7 +742,7 @@ display_dialog_delete_permanently (GtkWidget * window,
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
button = gtk_button_new_from_stock ("gtk-delete");
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK);
diff --git a/gsearchtool/gsearchtool.c b/gsearchtool/gsearchtool.c
index d7bcf16..44f970e 100644
--- a/gsearchtool/gsearchtool.c
+++ b/gsearchtool/gsearchtool.c
@@ -1780,7 +1780,7 @@ handle_search_command_stderr_io (GIOChannel * ioc,
gtk_widget_show_all (hbox);
button = gsearchtool_button_new_with_stock_icon (_("Disable _Quick Search"), GTK_STOCK_OK);
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK);
@@ -2031,7 +2031,7 @@ create_constraint_box (GSearchWindow * gsearch,
}
button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
- GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, FALSE);
{
GList * list = NULL;
@@ -2177,7 +2177,7 @@ create_additional_constraint_section (GSearchWindow * gsearch)
}
gsearch->available_options_add_button = gtk_button_new_from_stock (GTK_STOCK_ADD);
- GTK_WIDGET_UNSET_FLAGS (gsearch->available_options_add_button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (gsearch->available_options_add_button, FALSE);
gsearch->available_options_button_size_group = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);
gtk_size_group_add_widget (gsearch->available_options_button_size_group, gsearch->available_options_add_button);
@@ -2837,7 +2837,7 @@ gsearch_app_create (GSearchWindow * gsearch)
gtk_box_set_spacing (GTK_BOX (hbox), 6);
button = gtk_button_new_from_stock (GTK_STOCK_HELP);
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (hbox), button, TRUE);
g_signal_connect (G_OBJECT (button), "clicked",
@@ -2847,7 +2847,7 @@ gsearch_app_create (GSearchWindow * gsearch)
}
button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (click_close_cb), (gpointer) gsearch);
if (gsearch->is_window_accessible) {
@@ -2860,8 +2860,8 @@ gsearch_app_create (GSearchWindow * gsearch)
gsearch->find_button = gtk_button_new_from_stock (GTK_STOCK_FIND);
gsearch->stop_button = gtk_button_new_from_stock (GTK_STOCK_STOP);
- GTK_WIDGET_SET_FLAGS (gsearch->find_button, GTK_CAN_DEFAULT);
- GTK_WIDGET_SET_FLAGS (gsearch->stop_button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (gsearch->find_button, TRUE);
+ gtk_widget_set_can_default (gsearch->stop_button, TRUE);
gtk_box_pack_end (GTK_BOX (hbox), gsearch->stop_button, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (hbox), gsearch->find_button, FALSE, FALSE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]