comparison plugins/gestures/stroke-draw.c @ 8555:e0535ba0d667

[gaim-migrate @ 9298] finally get to clean my tree out some committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 02 Apr 2004 03:25:48 +0000
parents ea2d07ad05a9
children 19fd43d52d18
comparison
equal deleted inserted replaced
8554:5c3542e63997 8555:e0535ba0d667
123 cursor = gdk_cursor_new(GDK_PENCIL); 123 cursor = gdk_cursor_new(GDK_PENCIL);
124 124
125 gdk_pointer_grab (widget->window, FALSE, 125 gdk_pointer_grab (widget->window, FALSE,
126 GDK_BUTTON_RELEASE_MASK, NULL, cursor, 126 GDK_BUTTON_RELEASE_MASK, NULL, cursor,
127 event->button.time); 127 event->button.time);
128 timer_id = gtk_timeout_add (GSTROKE_TIMEOUT_DURATION, 128 timer_id = g_timeout_add (GSTROKE_TIMEOUT_DURATION,
129 gstroke_timeout, widget); 129 gstroke_timeout, widget);
130 return TRUE; 130 return TRUE;
131 131
132 case GDK_BUTTON_RELEASE: 132 case GDK_BUTTON_RELEASE:
133 if ((event->button.button != gstroke_get_mouse_button()) 133 if ((event->button.button != gstroke_get_mouse_button())
137 /* We'll just cancel the gesture instead. */ 137 /* We'll just cancel the gesture instead. */
138 last_mouse_position.invalid = TRUE; 138 last_mouse_position.invalid = TRUE;
139 original_widget = NULL; 139 original_widget = NULL;
140 140
141 if (timer_id > 0) 141 if (timer_id > 0)
142 gtk_timeout_remove (timer_id); 142 g_source_remove (timer_id);
143 143
144 gdk_pointer_ungrab (event->button.time); 144 gdk_pointer_ungrab (event->button.time);
145 timer_id = 0; 145 timer_id = 0;
146 146
147 if (gstroke_draw_strokes() && gstroke_disp != NULL) { 147 if (gstroke_draw_strokes() && gstroke_disp != NULL) {
154 154
155 } 155 }
156 156
157 last_mouse_position.invalid = TRUE; 157 last_mouse_position.invalid = TRUE;
158 original_widget = NULL; 158 original_widget = NULL;
159 gtk_timeout_remove (timer_id); 159 g_source_remove (timer_id);
160 gdk_pointer_ungrab (event->button.time); 160 gdk_pointer_ungrab (event->button.time);
161 timer_id = 0; 161 timer_id = 0;
162 162
163 { 163 {
164 char result[GSTROKE_MAX_SEQUENCE]; 164 char result[GSTROKE_MAX_SEQUENCE];