Adium

Ticket #1088 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

Volume icons in General tab of Preferences should be 'active'

Reported by: wootest Owned by: wootest
Milestone: Adium X 0.84 Component: Adium UI
Version: 0.83b Severity: minor
Keywords: volume Cc: wootest+adium@…
Patch Status:

Description

When you click the respective "quiet" and "full" volume icons in the General tab of Preferences, the slider should snap to the level the icon indicates. iTunes does this, and the icons look big and clickable.

Attachments

volumepatch.zip (26.5 KB) - added by wootest 4 years ago.
Patch (diff and zipped nib with changes - turning volume icon NSImageViews to NSButtons) - try 2, now with less code and more outlets!

Change History

Changed 4 years ago by wootest

  • cc wootest+adium@… added

Changed 4 years ago by wootest

Implemented on my part and awaiting decision from Evan. However, the following was raised in #adium: [11:07pm] <zacw> the slider in the sound preferences doesn't behave that way and it's the same as the adium preference

I guess we'll see if this lands at all.

Changed 4 years ago by evands

Go ahead and attach your patch to the ticket in any case :)

Changed 4 years ago by wootest

I emailed it to you - do you want me to attach it here instead?

Changed 4 years ago by wootest

Patch added - aside from diff, a nib modification is needed - basically replacing the NSImageViews containing the icons with icon-only momentary change borderless NSButtons positioned and sized the same, and connecting to File's Owner (ESGeneralPreferences)' selectVolume: action.

Changed 4 years ago by evands

Why 1000 for min and 2000 for max? The slider goes from 0.0 to 1.0 so far as I can tell.

It'd be better not to do a class comparison but instead hook the two new buttons - the minimum and maximum buttons - to IBOutlets in the nib file, then do a check against sender like:

if (sender == slider_volume) {
  volume = [slider_volume floatValue];
} else if (sender == button_minVolume) {
  volume = 0.0;
  [slider_volume setDoubleValue:0.0];
} else if (sender == button_maxVolume) {
  volume = 1.0;
  [slider_volume setDoubleValue:1.0];
}

Changed 4 years ago by wootest

Patch (diff and zipped nib with changes - turning volume icon NSImageViews to NSButtons) - try 2, now with less code and more outlets!

Changed 4 years ago by wootest

Good point. Changed patch accordingly.

Changed 4 years ago by evands

  • status changed from new to closed
  • resolution set to fixed

(In [13042]) Patch from wootest, who writes: "When you click the respective 'quiet' and 'full' volume icons in the General tab of Preferences, the slider should snap to the level the icon indicates. iTunes does this, and the icons look big and clickable."

Closes #1088

Changed 4 years ago by wootest

It should be noted that this change requires changes in the nib. If there's a way to alert translators of this fact, it should probably be done.

Note: See TracTickets for help on using tickets.