[hyena] Gui: avoid spinbuttons rendering out-of-screen (bgo#723811)
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena] Gui: avoid spinbuttons rendering out-of-screen (bgo#723811)
- Date: Sat, 29 Mar 2014 15:11:40 +0000 (UTC)
commit 8ba43709ae757a44fca45e94492495ecaf58dccf
Author: Nicholas Little <arealityfarbetween googlemail com>
Date: Sat Mar 29 16:09:29 2014 +0100
Gui: avoid spinbuttons rendering out-of-screen (bgo#723811)
gtk3 has a bug (or a feature?) about rendering spinbuttons with
a very high maximum (i.e., Double.Max in .NET is 1.79769313486232E+308)
out of screen (instead of being horizontally-scrollable with the
keyboard like in gtk2). This has been reported as bgo#727294, but
using a workaround here is not a big deal for most usages (i.e not
a big deal that Banshee's Smart Playlists max limit are lowered to
a ceiling of 2,147,483,647 tracks).
Signed-off-by: Andrés G. Aragoneses <knocte gmail com>
Hyena.Gui/Hyena.Query.Gui/QueryLimitBox.cs | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Query.Gui/QueryLimitBox.cs b/Hyena.Gui/Hyena.Query.Gui/QueryLimitBox.cs
index b40da65..d2e9730 100644
--- a/Hyena.Gui/Hyena.Query.Gui/QueryLimitBox.cs
+++ b/Hyena.Gui/Hyena.Query.Gui/QueryLimitBox.cs
@@ -28,12 +28,10 @@
//
using System;
-using System.Text;
using Mono.Unix;
using Gtk;
-using Hyena;
using Hyena.Query;
namespace Hyena.Query.Gui
@@ -58,7 +56,10 @@ namespace Hyena.Query.Gui
enabled_checkbox = new CheckButton (Catalog.GetString ("_Limit to"));
enabled_checkbox.Toggled += OnEnabledToggled;
- count_spin = new SpinButton (0, Double.MaxValue, 1);
+ // workaround for bgo#727294, we doubt anyway that it's very useful to have a max higher than
2147483647
+ const double max = int.MaxValue;
+
+ count_spin = new SpinButton (0, max, 1);
count_spin.Numeric = true;
count_spin.Digits = 0;
count_spin.Value = 25;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]