Mercurial > pidgin
comparison src/gtkconv.c @ 4803:6f04901ef729
[gaim-migrate @ 5123]
Fixed the arrow buttons on the conversation notebook. Also fixed other
possible minor bugs.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 17 Mar 2003 01:57:37 +0000 |
parents | 677d3cb193a1 |
children | 3b0b7c8470ec |
comparison
equal
deleted
inserted
replaced
4802:5b24e8e52e4a | 4803:6f04901ef729 |
---|---|
314 { | 314 { |
315 struct gaim_window *win = (struct gaim_window *)data; | 315 struct gaim_window *win = (struct gaim_window *)data; |
316 struct gaim_conversation *conv; | 316 struct gaim_conversation *conv; |
317 struct gaim_gtk_conversation *gtkconv; | 317 struct gaim_gtk_conversation *gtkconv; |
318 | 318 |
319 conv = gaim_window_get_active_conversation(win); | 319 conv = gaim_window_get_active_conversation(win); |
320 | 320 |
321 if(!conv) | 321 if (!conv) |
322 return; | 322 return; |
323 | 323 |
324 gtkconv = GAIM_GTK_CONVERSATION(conv); | 324 gtkconv = GAIM_GTK_CONVERSATION(conv); |
325 | 325 |
326 gtkconv->make_sound = !gtkconv->make_sound; | 326 gtkconv->make_sound = !gtkconv->make_sound; |
1311 if (cursor == NULL) | 1311 if (cursor == NULL) |
1312 cursor = gdk_cursor_new(GDK_FLEUR); | 1312 cursor = gdk_cursor_new(GDK_FLEUR); |
1313 | 1313 |
1314 /* Grab the pointer */ | 1314 /* Grab the pointer */ |
1315 gtk_grab_add(gtkwin->notebook); | 1315 gtk_grab_add(gtkwin->notebook); |
1316 gdk_pointer_grab(gtkwin->notebook->window, FALSE, | 1316 |
1317 GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, | 1317 if (!gdk_pointer_is_grabbed()) |
1318 NULL, cursor, GDK_CURRENT_TIME); | 1318 gdk_pointer_grab(gtkwin->notebook->window, FALSE, |
1319 GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, | |
1320 NULL, cursor, GDK_CURRENT_TIME); | |
1319 } | 1321 } |
1320 | 1322 |
1321 static gboolean | 1323 static gboolean |
1322 notebook_motion_cb(GtkWidget *widget, GdkEventButton *e, | 1324 notebook_motion_cb(GtkWidget *widget, GdkEventButton *e, |
1323 struct gaim_window *win) | 1325 struct gaim_window *win) |
1493 | 1495 |
1494 gtkwin = GAIM_GTK_WINDOW(win); | 1496 gtkwin = GAIM_GTK_WINDOW(win); |
1495 | 1497 |
1496 if (gtkwin->in_drag) { | 1498 if (gtkwin->in_drag) { |
1497 debug_printf("Already in the middle of a window " | 1499 debug_printf("Already in the middle of a window " |
1498 "drag at tab_press_cb\n"); | 1500 "drag at tab_press_cb\n"); |
1499 return FALSE; | 1501 return TRUE; |
1500 } | 1502 } |
1501 | 1503 |
1502 /* | 1504 /* |
1503 * Make sure a tab was actually clicked. The arrow buttons | 1505 * Make sure a tab was actually clicked. The arrow buttons |
1504 * mess things up. | 1506 * mess things up. |
1588 gtk_grab_remove(widget); | 1590 gtk_grab_remove(widget); |
1589 } | 1591 } |
1590 | 1592 |
1591 gtkwin = GAIM_GTK_WINDOW(win); | 1593 gtkwin = GAIM_GTK_WINDOW(win); |
1592 | 1594 |
1593 if (!gtkwin->in_predrag && !gtkwin->in_drag) { | 1595 if (!gtkwin->in_predrag && !gtkwin->in_drag) |
1594 return TRUE; | 1596 return FALSE; |
1595 } | |
1596 | 1597 |
1597 /* Disconnect the motion signal. */ | 1598 /* Disconnect the motion signal. */ |
1598 if (gtkwin->drag_motion_signal) { | 1599 if (gtkwin->drag_motion_signal) { |
1599 g_signal_handler_disconnect(G_OBJECT(widget), | 1600 g_signal_handler_disconnect(G_OBJECT(widget), |
1600 gtkwin->drag_motion_signal); | 1601 gtkwin->drag_motion_signal); |
1617 } | 1618 } |
1618 } | 1619 } |
1619 | 1620 |
1620 /* If we're not in drag... */ | 1621 /* If we're not in drag... */ |
1621 /* We're perfectly normal people! */ | 1622 /* We're perfectly normal people! */ |
1622 if (!gtkwin->in_drag) { | 1623 if (!gtkwin->in_drag) |
1623 return FALSE; | 1624 return FALSE; |
1624 } | |
1625 | 1625 |
1626 gtkwin->in_drag = FALSE; | 1626 gtkwin->in_drag = FALSE; |
1627 | 1627 |
1628 dnd_hints_hide_all(); | 1628 dnd_hints_hide_all(); |
1629 | 1629 |