Skip to content

Commit

Permalink
avoid deprecated 'gtk_dialog_get_action_area'
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0w authored and lukefromdc committed May 18, 2018
1 parent c31de77 commit 6841bd7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions libcaja-private/caja-autorun.c
Expand Up @@ -943,6 +943,7 @@ do_autorun_for_content_type (GMount *mount, const char *x_content_type, CajaAuto
GtkWidget *always_check_button;
GtkWidget *eject_button;
GtkWidget *image;
GtkWidget *action_area;
char *markup;
char *content_description;
char *mount_name;
Expand Down Expand Up @@ -1150,10 +1151,10 @@ do_autorun_for_content_type (GMount *mount, const char *x_content_type, CajaAuto
"process-stop",
GTK_RESPONSE_CANCEL);

eel_dialog_add_button (GTK_DIALOG (dialog),
_("_OK"),
"gtk-ok",
GTK_RESPONSE_OK);
action_area = gtk_widget_get_parent (eel_dialog_add_button (GTK_DIALOG (dialog),
_("_OK"),
"gtk-ok",
GTK_RESPONSE_OK));

gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);

Expand All @@ -1179,7 +1180,7 @@ do_autorun_for_content_type (GMount *mount, const char *x_content_type, CajaAuto
data->should_eject = FALSE;
}
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), eject_button, AUTORUN_DIALOG_RESPONSE_EJECT);
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), eject_button, TRUE);
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (action_area), eject_button, TRUE);

/* show the dialog */
gtk_widget_show_all (dialog);
Expand Down
11 changes: 6 additions & 5 deletions src/file-manager/fm-properties-window.c
Expand Up @@ -5079,6 +5079,7 @@ create_properties_window (StartupData *startup_data)
{
FMPropertiesWindow *window;
GList *l;
GtkWidget *action_area;

window = FM_PROPERTIES_WINDOW (gtk_widget_new (fm_properties_window_get_type (), NULL));

Expand Down Expand Up @@ -5177,14 +5178,14 @@ create_properties_window (StartupData *startup_data)
"help-browser",
GTK_RESPONSE_HELP);

eel_dialog_add_button (GTK_DIALOG (window),
_("_Close"),
"window-close",
GTK_RESPONSE_CLOSE);
action_area = gtk_widget_get_parent (eel_dialog_add_button (GTK_DIALOG (window),
_("_Close"),
"window-close",
GTK_RESPONSE_CLOSE));

/* FIXME - HIGificiation, should be done inside GTK+ */
gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (window))), 12);
gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (window))), 0);
gtk_container_set_border_width (GTK_CONTAINER (action_area), 0);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), 12);

/* Update from initial state */
Expand Down

0 comments on commit 6841bd7

Please sign in to comment.