Skip to content
Permalink
Browse files

avoid deprecated 'gtk_dialog_get_action_area'

  • Loading branch information...
sc0w authored and lukefromdc committed May 13, 2018
1 parent c31de77 commit 6841bd73832a0f2373f38c3a99e341a9bcdc5db4
Showing with 12 additions and 10 deletions.
  1. +6 −5 libcaja-private/caja-autorun.c
  2. +6 −5 src/file-manager/fm-properties-window.c
@@ -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;
@@ -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);

@@ -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);
@@ -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));

@@ -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 */

0 comments on commit 6841bd7

Please sign in to comment.
You can’t perform that action at this time.