diff --git a/pulsecaster/ui.py b/pulsecaster/ui.py index 391c5d6..3c17bbb 100644 --- a/pulsecaster/ui.py +++ b/pulsecaster/ui.py @@ -145,6 +145,7 @@ def on_activate(self, app): self.close.connect('clicked', self.on_close) self.record = self.builder.get_object('record_button') self.record_id = self.record.connect('clicked', self.on_record) + self.record.get_style_context().add_class("suggested-action") self.record.set_sensitive(True) self.main_logo = self.builder.get_object('logo') self.main_logo.set_from_icon_name('pulsecaster', Gtk.IconSize.DIALOG) @@ -334,6 +335,8 @@ def on_record(self, *args): # FIXME: Dim elements other than the 'record' widget self.record.set_label(Gtk.STOCK_MEDIA_STOP) + self.record.get_style_context().remove_class("suggested-action") + self.record.get_style_context().add_class("destructive-action") self.record.disconnect(self.record_id) self.stop_id = self.record.connect('clicked', self.on_stop) self.record.show() @@ -348,6 +351,8 @@ def on_stop(self, *args): self.combiner.set_state(Gst.State.NULL) self.showFileChooser() self.record.set_label(Gtk.STOCK_MEDIA_RECORD) + self.record.get_style_context().remove_class("destructive-action") + self.record.get_style_context().add_class("suggested-action") self.record.disconnect(self.stop_id) self.record_id = self.record.connect('clicked', self.on_record) self.user_vox.cbox.set_sensitive(True) @@ -404,6 +409,8 @@ def showFileChooser(self, *args): Gtk.STOCK_OK, Gtk.ResponseType.OK)) self.file_chooser.set_local_only(True) + self.file_chooser.set_transient_for(self.main) + self.file_chooser.set_modal(True) response = self.file_chooser.run() if response == Gtk.ResponseType.OK: self.updateFileSinkPath() @@ -425,6 +432,9 @@ def hideFileChooser(self, *args): erase_message, Gtk.ResponseType.YES), message_format=confirm_message) + + confirm.set_transient_for(self.file_chooser) + confirm.set_modal(True) response = confirm.run() confirm.destroy() if response == Gtk.ResponseType.YES: