Skip to content

Commit

Permalink
Rename unpause pref to 'ended-resume'
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Apr 8, 2022
1 parent fa8f2ad commit 4f1e0d7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion data/org.gnome.Shell.Extensions.GSConnect.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
<key name="talking-pause" type="b">
<default>true</default>
</key>
<key name="after-unpause" type="b">
<key name="ended-resume" type="b">
<default>true</default>
</key>
</schema>
Expand Down
22 changes: 11 additions & 11 deletions data/ui/preferences-device-panel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1764,12 +1764,12 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="after-list-label">
<object class="GtkLabel" id="ended-list-label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="margin-bottom">12</property>
<property name="label" translatable="yes">After Calls</property>
<property name="label" translatable="yes">Call Ended</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
Expand All @@ -1786,15 +1786,15 @@
<property name="can-focus">False</property>
<property name="label-xalign">0</property>
<child>
<object class="GtkListBox" id="after-list">
<object class="GtkListBox" id="ended-list">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selection-mode">none</property>
<signal name="keynav-failed" handler="_onKeynavFailed" swapped="no"/>
<signal name="row-activated" handler="_onToggleRowActivated" swapped="no"/>
<child>
<object class="GtkListBoxRow" id="after-unpause-row">
<object class="GtkListBoxRow" id="ended-resume-row">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="height-request">56</property>
Expand All @@ -1807,7 +1807,7 @@
<property name="margin-end">12</property>
<property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="after-unpause-label">
<object class="GtkLabel" id="ended-resume-label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
Expand All @@ -1816,8 +1816,8 @@
<property name="vexpand">True</property>
<property name="label" translatable="yes">Resume Paused Media</property>
<accessibility>
<relation type="label-for" target="after-unpause-row"/>
<relation type="label-for" target="after-unpause"/>
<relation type="label-for" target="ended-resume-row"/>
<relation type="label-for" target="ended-resume"/>
</accessibility>
</object>
<packing>
Expand All @@ -1826,14 +1826,14 @@
</packing>
</child>
<child>
<object class="GtkSwitch" id="after-unpause">
<object class="GtkSwitch" id="ended-resume">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="action-name">settings.after-unpause</property>
<property name="action-name">settings.ended-resume</property>
<accessibility>
<relation type="controlled-by" target="after-unpause-row"/>
<relation type="labelled-by" target="after-unpause-label"/>
<relation type="controlled-by" target="ended-resume-row"/>
<relation type="labelled-by" target="ended-resume-label"/>
</accessibility>
</object>
<packing>
Expand Down
10 changes: 5 additions & 5 deletions src/preferences/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ var Panel = GObject.registerClass({
// Telephony
'telephony', 'telephony-page',
'ringing-list', 'ringing-volume', 'talking-list', 'talking-volume',
'after-list',
'ended-list',

// Shortcuts
'shortcuts-page',
Expand Down Expand Up @@ -481,7 +481,7 @@ var Panel = GObject.registerClass({
this.actions.add_action(settings.create_action('talking-volume'));
this.actions.add_action(settings.create_action('talking-pause'));
this.actions.add_action(settings.create_action('talking-microphone'));
this.actions.add_action(settings.create_action('after-unpause'));
this.actions.add_action(settings.create_action('ended-resume'));

// Pair Actions
const encryption_info = new Gio.SimpleAction({name: 'encryption-info'});
Expand Down Expand Up @@ -901,12 +901,12 @@ var Panel = GObject.registerClass({
this.ringing_list.next = this.talking_list;
this.talking_list.prev = this.ringing_list;

this.talking_list.next = this.after_list;
this.after_list.prev = this.talking_list;
this.talking_list.next = this.ended_list;
this.ended_list.prev = this.talking_list;

this.ringing_list.set_header_func(rowSeparators);
this.talking_list.set_header_func(rowSeparators);
this.after_list.set_header_func(rowSeparators);
this.ended_list.set_header_func(rowSeparators);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/service/plugins/telephony.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ var Plugin = GObject.registerClass({
* Restore volume and microphone, plus media player state
* (if we changed it and restore is enabled).
*
* If we're going to auto-unpause, make sure to do that first
* If we're going to auto-resume, make sure to do that first
* before raising volume.
* Otherwise, still raise the volume (so the user can unpause).
*
Expand All @@ -105,10 +105,10 @@ var Plugin = GObject.registerClass({
_restoreMediaState() {
// Media Playback
if (this._mpris) {
if (this.settings.get_boolean('after-unpause')) {
if (this.settings.get_boolean('ended-resume')) {
this._mpris.unpauseAll();
} else {
/* Even if unpause is disabled, we still need to clear
/* Even if resume is disabled, we still need to clear
* the list of which players we're holding paused
*
* TODO: This potentially worsens the multi-device
Expand Down

0 comments on commit 4f1e0d7

Please sign in to comment.