summaryrefslogtreecommitdiff
path: root/packages/gtk+/gtk+-2.6.4-1.osso7/gtkspinbutton.c.diff
blob: 13f8c330f59456a31880b3f4d00dc5e8047bf5ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--- gtk+-2.6.4/gtk/gtkspinbutton.c	2004-11-14 03:25:35.000000000 +0200
+++ gtk+-2.6.4/gtk/gtkspinbutton.c	2005-04-06 16:19:37.945769728 +0300
@@ -1041,15 +1041,21 @@
 		GtkArrowType   click_child,
 		gdouble        step)
 {
+  GtkSettings *settings;
+  guint timeout;
+
   g_return_if_fail (click_child == GTK_ARROW_UP || click_child == GTK_ARROW_DOWN);
-  
+
+  settings = gtk_settings_get_default ();
+  g_object_get (settings, "gtk-initial-timeout", &timeout, NULL); 
+
   spin->click_child = click_child;
   
   if (!spin->timer)
     {
       spin->timer_step = step;
       spin->need_timer = TRUE;
-      spin->timer = g_timeout_add (SPIN_BUTTON_INITIAL_TIMER_DELAY, 
+      spin->timer = g_timeout_add (/*SPIN_BUTTON_INITIAL_TIMER_DELAY*/timeout, 
 				   (GSourceFunc) gtk_spin_button_timer, 
 				   (gpointer) spin);
     }
@@ -1188,9 +1194,14 @@
 gtk_spin_button_timer (GtkSpinButton *spin_button)
 {
   gboolean retval = FALSE;
+  GtkSettings *settings;
+  guint timeout;
   
   GDK_THREADS_ENTER ();
 
+  settings = gtk_settings_get_default ();
+  g_object_get (settings, "gtk-update-timeout", &timeout, NULL);
+
   if (spin_button->timer)
     {
       if (spin_button->click_child == GTK_ARROW_UP)
@@ -1201,7 +1212,7 @@
       if (spin_button->need_timer)
 	{
 	  spin_button->need_timer = FALSE;
-	  spin_button->timer = g_timeout_add (SPIN_BUTTON_TIMER_DELAY, 
+	  spin_button->timer = g_timeout_add (/*SPIN_BUTTON_TIMER_DELAY*/timeout, 
 					      (GSourceFunc) gtk_spin_button_timer, 
 					      (gpointer) spin_button);
 	}