Skip to content

Commit

Permalink
Drop eom_close_confirmation_dialog_set_sensitive
Browse files Browse the repository at this point in the history
This internal function is only used at one place.
No need to set the dialog buttons insensitive after
save-image is executed.

As result we don't use deprecated gtk_dialog_get_action_area

inspired by comment from
https://gitlab.gnome.org/GNOME/eog/commit/a48af02
  • Loading branch information
raveit65 committed Jul 23, 2018
1 parent 704107b commit 9593351
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
14 changes: 0 additions & 14 deletions src/eom-close-confirmation-dialog.c
Expand Up @@ -676,17 +676,3 @@ eom_close_confirmation_dialog_get_unsaved_images (EomCloseConfirmationDialog *dl
return dlg->priv->unsaved_images;
}

void
eom_close_confirmation_dialog_set_sensitive (EomCloseConfirmationDialog *dlg,
gboolean value)
{
GtkWidget *action_area;

g_return_if_fail (EOM_IS_CLOSE_CONFIRMATION_DIALOG (dlg));

action_area = gtk_dialog_get_action_area (GTK_DIALOG (dlg));
gtk_widget_set_sensitive (action_area, value);

if (dlg->priv->toggle_renderer)
gtk_cell_renderer_toggle_set_activatable (GTK_CELL_RENDERER_TOGGLE (dlg->priv->toggle_renderer), value);
}
3 changes: 0 additions & 3 deletions src/eom-close-confirmation-dialog.h
Expand Up @@ -72,8 +72,5 @@ const GList *eom_close_confirmation_dialog_get_unsaved_images (EomCloseConfirmat
G_GNUC_INTERNAL
GList *eom_close_confirmation_dialog_get_selected_images (EomCloseConfirmationDialog *dlg);

G_GNUC_INTERNAL
void eom_close_confirmation_dialog_set_sensitive (EomCloseConfirmationDialog *dlg, gboolean value);

#endif /* __EOM_CLOSE_CONFIRMATION_DIALOG_H__ */

1 change: 0 additions & 1 deletion src/eom-window.c
Expand Up @@ -2300,7 +2300,6 @@ close_confirmation_dialog_response_handler (EomCloseConfirmationDialog *dlg,
case GTK_RESPONSE_YES:
/* save selected images */
selected_images = eom_close_confirmation_dialog_get_selected_images (dlg);
eom_close_confirmation_dialog_set_sensitive (dlg, FALSE);
if (eom_window_save_images (window, selected_images)) {
g_signal_connect (priv->save_job,
"finished",
Expand Down

0 comments on commit 9593351

Please sign in to comment.