[vlc-commits] GTK: set time and volume slider increment sizes. This (partially) fixes an annoying interface glitch whereby clicking to the side of a slider made it jump to the end .
Cheng Sun
git at videolan.org
Mon Jan 23 19:28:38 CET 2012
npapi-vlc | branch: master | Cheng Sun <chengsun9 at gmail.com> | Sat Jan 21 23:09:53 2012 +0000| [6eae0ffb9cbaf8f6e04423de2ff38daabdf7cae3] | committer: Cheng Sun
GTK: set time and volume slider increment sizes. This (partially) fixes an annoying interface glitch whereby clicking to the side of a slider made it jump to the end.
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=6eae0ffb9cbaf8f6e04423de2ff38daabdf7cae3
---
npapi/vlcplugin_gtk.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/npapi/vlcplugin_gtk.cpp b/npapi/vlcplugin_gtk.cpp
index 0849a1e..c2808cf 100644
--- a/npapi/vlcplugin_gtk.cpp
+++ b/npapi/vlcplugin_gtk.cpp
@@ -480,6 +480,7 @@ bool VlcPluginGtk::create_windows()
toolitem = gtk_tool_item_new();
time_slider = gtk_hscale_new_with_range(0, 100, 10);
gtk_scale_set_draw_value(GTK_SCALE(time_slider), false);
+ gtk_range_set_increments(GTK_RANGE(time_slider), 2, 10);
g_signal_connect(G_OBJECT(time_slider), "change-value", G_CALLBACK(time_slider_handler), this);
gtk_container_add(GTK_CONTAINER(toolitem), time_slider);
gtk_tool_item_set_expand(toolitem, true);
@@ -488,6 +489,7 @@ bool VlcPluginGtk::create_windows()
/* volume slider */
toolitem = gtk_tool_item_new();
vol_slider = gtk_hscale_new_with_range(0, 200, 10);
+ gtk_range_set_increments(GTK_RANGE(vol_slider), 5, 20);
gtk_scale_set_draw_value(GTK_SCALE(vol_slider), false);
g_signal_connect(G_OBJECT(vol_slider), "change-value", G_CALLBACK(vol_slider_handler), this);
gtk_range_set_value(GTK_RANGE(vol_slider), 100);
More information about the vlc-commits
mailing list