Commit abe29dd1 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Update all internal users of gtk_dialog_get_action_area

Some of these should be revisited and fixed. For now,
just avoid the deprecation warnings.
parent 32a29012
......@@ -435,7 +435,9 @@ ensure_software_button (GtkAppChooserDialog *self)
{
GtkWidget *action_area;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
action_area = gtk_dialog_get_action_area (GTK_DIALOG (self));
G_GNUC_END_IGNORE_DEPRECATIONS
self->priv->software_button = gtk_button_new_with_mnemonic (_("Software"));
gtk_button_set_always_show_image (GTK_BUTTON (self->priv->software_button), TRUE);
gtk_button_set_image (GTK_BUTTON (self->priv->software_button), gtk_image_new_from_icon_name ("gnome-software", GTK_ICON_SIZE_BUTTON));
......
......@@ -1015,7 +1015,9 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
GtkStyleContext *context;
content_area = gtk_dialog_get_content_area (cpu_dialog);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
action_area = gtk_dialog_get_action_area (cpu_dialog);
G_GNUC_END_IGNORE_DEPRECATIONS
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
......
......@@ -291,7 +291,9 @@ file_chooser_widget_file_activated (GtkFileChooser *chooser,
/* There probably isn't a default widget, so make things easier for the
* programmer by looking for a reasonable button on our own.
*/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
action_area = gtk_dialog_get_action_area (fc_dialog);
G_GNUC_END_IGNORE_DEPRECATIONS
children = gtk_container_get_children (GTK_CONTAINER (action_area));
for (l = children; l; l = l->next)
......@@ -393,7 +395,9 @@ file_chooser_widget_response_requested (GtkWidget *widget,
/* There probably isn't a default widget, so make things easier for the
* programmer by looking for a reasonable button on our own.
*/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
action_area = gtk_dialog_get_action_area (fc_dialog);
G_GNUC_END_IGNORE_DEPRECATIONS
children = gtk_container_get_children (GTK_CONTAINER (action_area));
for (l = children; l; l = l->next)
......@@ -466,7 +470,9 @@ ensure_default_response (GtkFileChooserDialog *dialog)
{
GtkWidget *action_area;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
G_GNUC_END_IGNORE_DEPRECATIONS
gtk_container_foreach (GTK_CONTAINER (action_area),
foreach_ensure_default_response_cb,
dialog);
......
......@@ -513,7 +513,9 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
priv->dialog = dialog;
content_area = gtk_dialog_get_content_area (dialog);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
action_area = gtk_dialog_get_action_area (dialog);
G_GNUC_END_IGNORE_DEPRECATIONS
/* Set the dialog up with HIG properties */
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
......
......@@ -129,7 +129,9 @@ gtk_recent_chooser_dialog_init (GtkRecentChooserDialog *dialog)
dialog->priv = priv;
content_area = gtk_dialog_get_content_area (rc_dialog);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
action_area = gtk_dialog_get_action_area (rc_dialog);
G_GNUC_END_IGNORE_DEPRECATIONS
gtk_container_set_border_width (GTK_CONTAINER (rc_dialog), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
......@@ -155,7 +157,9 @@ gtk_recent_chooser_item_activated_cb (GtkRecentChooser *chooser,
if (gtk_window_activate_default (GTK_WINDOW (dialog)))
return;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
action_area = gtk_dialog_get_action_area (rc_dialog);
G_GNUC_END_IGNORE_DEPRECATIONS
children = gtk_container_get_children (GTK_CONTAINER (action_area));
for (l = children; l; l = l->next)
......
......@@ -1041,7 +1041,9 @@ test_children (void)
g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (content_area)), "dialog1-vbox") == 0);
action_area = gtk_builder_get_object (builder, "dialog1-action_area");
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
dialog_action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
G_GNUC_END_IGNORE_DEPRECATIONS
g_assert (action_area != NULL);
g_assert (GTK_IS_BUTTON_BOX (action_area));
g_assert (gtk_orientable_get_orientation (GTK_ORIENTABLE (action_area)) == GTK_ORIENTATION_HORIZONTAL);
......
......@@ -37,7 +37,9 @@ test_dialog_basic (void)
dialog = gtk_dialog_new();
g_assert (GTK_IS_DIALOG (dialog));
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_assert (gtk_dialog_get_action_area (GTK_DIALOG (dialog)) != NULL);
G_GNUC_END_IGNORE_DEPRECATIONS
g_assert (gtk_dialog_get_content_area (GTK_DIALOG (dialog)) != NULL);
gtk_widget_destroy (dialog);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment