[gnome-sound-recorder/wip/cdavis/gtk4] remove uneeded show calls
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder/wip/cdavis/gtk4] remove uneeded show calls
- Date: Thu, 18 Nov 2021 21:27:00 +0000 (UTC)
commit 7ebfef27d07f3040c5db253d343a962e1c29d6e3
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Thu Nov 18 22:18:11 2021 +0100
remove uneeded show calls
src/waveform.js | 4 +---
src/window.js | 11 +++++------
2 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/waveform.js b/src/waveform.js
index 3737bd0..ad30fff 100644
--- a/src/waveform.js
+++ b/src/waveform.js
@@ -76,8 +76,6 @@ var WaveForm = GObject.registerClass({
}
this.set_draw_func(this.drawFunc);
-
- this.show();
}
gesturePressed(nPress, x) {
@@ -95,7 +93,7 @@ var WaveForm = GObject.registerClass({
this.emit('position-changed', this.position);
}
- drawFunc(da, ctx, width, height) {
+ drawFunc(da, ctx) {
const maxHeight = da.get_allocated_height();
const vertiCenter = maxHeight / 2;
const horizCenter = da.get_allocated_width() / 2;
diff --git a/src/window.js b/src/window.js
index 472947b..8d2d054 100644
--- a/src/window.js
+++ b/src/window.js
@@ -34,7 +34,7 @@ var WindowState = {
var Window = GObject.registerClass({
Template: 'resource:///org/gnome/SoundRecorder/ui/window.ui',
InternalChildren: [
- 'mainStack', 'emptyPage', 'column', 'headerRevealer', 'toastOverlay'
+ 'mainStack', 'emptyPage', 'column', 'headerRevealer', 'toastOverlay',
],
}, class Window extends Adw.ApplicationWindow {
@@ -66,7 +66,7 @@ var Window = GObject.registerClass({
this._recordingListWidget.connect('row-deleted', (_listBox, recording, index) => {
this._recordingList.remove(index);
- this.sendNotification(_('"%s" deleted').format(recording.name), recording, index);0
+ this.sendNotification(_('"%s" deleted').format(recording.name), recording, index);
});
const builder = Gtk.Builder.new_from_resource('/org/gnome/SoundRecorder/gtk/help-overlay.ui');
@@ -91,7 +91,6 @@ var Window = GObject.registerClass({
this.recorderWidget.connect('stopped', this.onRecorderStopped.bind(this));
this.insert_action_group('recorder', this.recorderWidget.actionsGroup);
this._emptyPage.icon_name = `${pkg.name}-symbolic`;
- this.show();
}
vfunc_close_request() {
@@ -135,9 +134,9 @@ var Window = GObject.registerClass({
sendNotification(message, recording, index) {
const toast = Adw.Toast.new(message);
toast.connect('dismissed', () => {
- if (!this.toastUndo) {
+ if (!this.toastUndo)
recording.delete();
- }
+
this.toastUndo = false;
});
@@ -149,7 +148,7 @@ var Window = GObject.registerClass({
this.toastUndo = true;
});
- toast.set_action_name("win.undo");
+ toast.set_action_name('win.undo');
toast.set_button_label(_('Undo'));
this._toastOverlay.add_toast(toast);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]