[pitivi] project: Marked Ignore Backup button as destructive
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] project: Marked Ignore Backup button as destructive
- Date: Sun, 15 Mar 2020 21:35:37 +0000 (UTC)
commit 08505fb1718dbd39dc46a41ceb0758a76a1f1dfa
Author: MD Ruhulamin Khan <skipperuzumaki gmail com>
Date: Sun Mar 15 06:42:32 2020 +0000
project: Marked Ignore Backup button as destructive
Fixes #2418
pitivi/project.py | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/pitivi/project.py b/pitivi/project.py
index d5008be4..bd629d24 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -283,15 +283,11 @@ class ProjectManager(GObject.Object, Loggable):
Args:
time_diff (int): The difference, in seconds, between file mtimes.
"""
- dialog = Gtk.Dialog(title="", transient_for=None)
- dialog.add_buttons(_("Ignore backup"), Gtk.ResponseType.REJECT,
- _("Restore from backup"), Gtk.ResponseType.YES)
- # Even though we set the title to an empty string when creating dialog,
- # seems we really have to do it once more so it doesn't show
- # "pitivi"...
- dialog.set_title("")
+ dialog = Gtk.Dialog(title="", transient_for=self.app.gui)
+ ignore_backup_btn = dialog.add_button(_("Ignore backup"), Gtk.ResponseType.REJECT)
+ ignore_backup_btn.get_style_context().add_class("destructive-action")
+ dialog.add_button(_("Restore from backup"), Gtk.ResponseType.YES)
dialog.set_icon_name("pitivi")
- dialog.set_transient_for(self.app.gui)
dialog.set_modal(True)
dialog.set_default_response(Gtk.ResponseType.YES)
dialog.get_accessible().set_name("restore from backup dialog")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]