[gnome-sound-recorder] Remove cruft
- From: Margaret Ford <megford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder] Remove cruft
- Date: Fri, 10 Mar 2017 14:16:45 +0000 (UTC)
commit c7c245a57cd5a3b98c354154c610b530cd3b5924
Author: Meg Ford <megford gnome org>
Date: Fri Mar 10 08:15:39 2017 -0600
Remove cruft
src/application.js | 42 +++++++++++++++++++++---------------------
src/audioProfile.js | 5 ++---
src/mainWindow.js | 2 +-
3 files changed, 24 insertions(+), 25 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index bef64bc..671b085 100644
--- a/src/application.js
+++ b/src/application.js
@@ -39,10 +39,10 @@ const Application = new Lang.Class({
Extends: Gtk.Application,
_init: function() {
- this.parent({ application_id: pkg.name });
- GLib.set_application_name(_("SoundRecorder"));
+ this.parent({ application_id: pkg.name });
+ GLib.set_application_name(_("SoundRecorder"));
},
-
+
_initAppMenu: function() {
let menu = new Gio.Menu();
let section = new Gio.Menu();
@@ -59,14 +59,14 @@ const Application = new Lang.Class({
this._showPreferences();
}));
this.add_action(preferences);
-
+
let aboutAction = new Gio.SimpleAction({ name: 'about' });
- aboutAction.connect('activate', Lang.bind(this,
+ aboutAction.connect('activate', Lang.bind(this,
function() {
this._showAbout();
}));
this.add_action(aboutAction);
-
+
let quitAction = new Gio.SimpleAction({ name: 'quit' });
quitAction.connect('activate', Lang.bind(this,
function() {
@@ -87,7 +87,7 @@ const Application = new Lang.Class({
settings = new Gio.Settings({ schema: 'org.gnome.gnome-sound-recorder' });
this.ensure_directory();
},
-
+
ensure_directory: function() {
/* Translators: "Recordings" here refers to the name of the directory where the application places
files */
let path = GLib.build_filenamev([GLib.get_home_dir(), _("Recordings")]);
@@ -100,17 +100,17 @@ const Application = new Lang.Class({
vfunc_activate: function() {
(this.window = new MainWindow.MainWindow({ application: this })).show();
},
-
+
onWindowDestroy: function() {
if (MainWindow.wave.pipeline)
MainWindow.wave.pipeline.set_state(Gst.State.NULL);
- if (MainWindow._record.pipeline)
+ if (MainWindow._record.pipeline)
MainWindow._record.pipeline.set_state(Gst.State.NULL);
-
- if (MainWindow.play.play)
- MainWindow.play.play.set_state(Gst.State.NULL);
+
+ if (MainWindow.play.play)
+ MainWindow.play.play.set_state(Gst.State.NULL);
},
-
+
_showPreferences: function() {
let preferencesDialog = new Preferences.Preferences();
@@ -118,13 +118,13 @@ const Application = new Lang.Class({
function(widget, response) {
preferencesDialog.widget.destroy();
}));
- },
-
+ },
+
getPreferences: function() {
let set = settings.get_int("media-type-preset");
return set;
},
-
+
setPreferences: function(profileName) {
settings.set_int("media-type-preset", profileName);
},
@@ -137,25 +137,25 @@ const Application = new Lang.Class({
setChannelsPreferences: function(channel) {
settings.set_int("channel", channel);
},
-
+
getMicVolume: function() {
let micVolLevel = settings.get_double("mic-volume");
return micVolLevel;
},
-
+
setMicVolume: function(level) {
settings.set_double("mic-volume", level);
},
-
+
getSpeakerVolume: function() {
let speakerVolLevel = settings.get_double("speaker-volume");
return speakerVolLevel;
},
-
+
setSpeakerVolume: function(level) {
settings.set_double("speaker-volume", level);
},
-
+
_showAbout: function() {
let aboutDialog = new Gtk.AboutDialog();
aboutDialog.artists = [ 'Reda Lazri <the red shortcut gmail com>',
diff --git a/src/audioProfile.js b/src/audioProfile.js
index 48a8aae..5143701 100644
--- a/src/audioProfile.js
+++ b/src/audioProfile.js
@@ -36,7 +36,7 @@ const comboBoxMap = {
};
const containerProfileMap = {
- OGG: "application/ogg",
+ OGG: "application/ogg",
ID3: "application/x-id3",
MP4: "video/quicktime,variant=(string)iso",
AUDIO_OGG: "application/ogg;audio/ogg;video/ogg"
@@ -98,7 +98,7 @@ const AudioProfile = new Lang.Class({
this.encodingProfile = GstPbutils.EncodingAudioProfile.new(audioCaps, null, null, 1);
this._containerProfile.add_profile(this.encodingProfile);
return this._containerProfile;
- } else if (!this._values[idx].container && this._values.audio) {
+ } else if (!this._values.container && this._values.audio) {
audioCaps = Gst.Caps.from_string(this._values.audio);
this.encodingProfile = GstPbutils.EncodingAudioProfile.new(audioCaps, null, null, 1);
return this.encodingProfile;
@@ -108,7 +108,6 @@ const AudioProfile = new Lang.Class({
},
fileExtensionReturner: function() {
- let idx = 0;
let suffixName;
if (this._values.audio) {
diff --git a/src/mainWindow.js b/src/mainWindow.js
index ac8c5ab..ff494c3 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -347,8 +347,8 @@ const MainView = new Lang.Class({
this._scrolledWin.show();
let sounds = list.getItemCount();
let title;
+ // Translators: This is the title in the headerbar
if (sounds > 0) {
- // Translators: This is the title in the headerbar
title = Gettext.ngettext("%d Recorded Sound",
"%d Recorded Sounds",
sounds).format(sounds);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]