[gnome-sound-recorder/wip/jtojnar/es6: 5/5] Get rid of params.js
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder/wip/jtojnar/es6: 5/5] Get rid of params.js
- Date: Fri, 18 Jan 2019 05:54:47 +0000 (UTC)
commit 3e1f3e569a5cd2d30d9e3d5057bc12fd67470298
Author: Jan Tojnar <jtojnar gmail com>
Date: Fri Jan 18 06:51:07 2019 +0100
Get rid of params.js
Object.assign does basically the same thing as Params.fill.
src/mainWindow.js | 31 ++++---
src/org.gnome.SoundRecorder.src.gresource.xml | 1 -
src/params.js | 128 --------------------------
3 files changed, 16 insertions(+), 144 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index f3d0852..9f70c58 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -34,7 +34,6 @@ const AudioProfile = imports.audioProfile;
const FileUtil = imports.fileUtil;
const Info = imports.info;
const Listview = imports.listview;
-const Params = imports.params;
const Play = imports.play;
const Preferences = imports.preferences;
const Record = imports.record;
@@ -94,15 +93,16 @@ var MainWindow = GObject.registerClass(class MainWindow extends Gtk.ApplicationW
view = new MainView();
play = new Play.Play();
- params = Params.fill(params, { title: GLib.get_application_name(),
- default_height: 480,
- default_width: 780,
- height_request: 480,
- width_request: 640,
- hexpand: true,
- vexpand: true,
- icon_name: "org.gnome.SoundRecorder" });
- super._init(params);
+ super._init(Object.assign({
+ title: GLib.get_application_name(),
+ default_height: 480,
+ default_width: 780,
+ height_request: 480,
+ width_request: 640,
+ hexpand: true,
+ vexpand: true,
+ icon_name: "org.gnome.SoundRecorder"
+ }, params));
header = new Gtk.HeaderBar({ hexpand: true,
show_close_button: true });
@@ -134,11 +134,12 @@ var MainWindow = GObject.registerClass(class MainWindow extends Gtk.ApplicationW
const MainView = GObject.registerClass(class MainView extends Gtk.Stack {
_init(params) {
- params = Params.fill(params, { vexpand: true,
- transition_type: Gtk.StackTransitionType.CROSSFADE,
- transition_duration: 100,
- visible: true });
- super._init(params);
+ super._init(Object.assign({
+ vexpand: true,
+ transition_type: Gtk.StackTransitionType.CROSSFADE,
+ transition_duration: 100,
+ visible: true
+ }, params));
this._addListviewPage('listviewPage');
this.labelID = null;
diff --git a/src/org.gnome.SoundRecorder.src.gresource.xml b/src/org.gnome.SoundRecorder.src.gresource.xml
index 5ed3acc..c72fdd1 100644
--- a/src/org.gnome.SoundRecorder.src.gresource.xml
+++ b/src/org.gnome.SoundRecorder.src.gresource.xml
@@ -8,7 +8,6 @@
<file>listview.js</file>
<file>main.js</file>
<file>mainWindow.js</file>
- <file>params.js</file>
<file>play.js</file>
<file>preferences.js</file>
<file>record.js</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]