Mercurial > pidgin
comparison src/gtkblist.c @ 12474:24beec3e42ad
[gaim-migrate @ 14785]
(20:03:10) sadrul: http://sadrul.no-ip.org:1337/~sadrul/gaim/patch.patch
<-- this fixes the format-shortcuts work in the statusbox for gtk+ < 2.4
-- it'd be great if i didn't have to submit it in the tracker
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 13 Dec 2005 01:09:42 +0000 |
parents | d180bb2953e7 |
children | 8489040cf97b |
comparison
equal
deleted
inserted
replaced
12473:d180bb2953e7 | 12474:24beec3e42ad |
---|---|
3437 gtk_paned_get_position(paned)); | 3437 gtk_paned_get_position(paned)); |
3438 | 3438 |
3439 return FALSE; | 3439 return FALSE; |
3440 } | 3440 } |
3441 | 3441 |
3442 #if GTK_CHECK_VERSION(2,4,0) | |
3443 static gboolean | 3442 static gboolean |
3444 gtk_blist_window_key_press_cb(GtkWidget *w, GdkEventKey *event, GaimGtkBuddyList *gtkblist) | 3443 gtk_blist_window_key_press_cb(GtkWidget *w, GdkEventKey *event, GaimGtkBuddyList *gtkblist) |
3445 { | 3444 { |
3446 GtkWidget *imhtml; | 3445 GtkWidget *imhtml; |
3447 | 3446 |
3448 if (!gtkblist) | 3447 if (!gtkblist) |
3449 return FALSE; | 3448 return FALSE; |
3450 | 3449 |
3451 imhtml = gtk_window_get_focus(GTK_WINDOW(gtkblist->window)); | 3450 imhtml = gtk_window_get_focus(GTK_WINDOW(gtkblist->window)); |
3452 | 3451 |
3453 if (GTK_IS_IMHTML(imhtml) && gtk_bindings_activate_event(GTK_OBJECT(imhtml), event)) | 3452 if (GTK_IS_IMHTML(imhtml) && gtk_bindings_activate(GTK_OBJECT(imhtml), event->keyval, event->state)) |
3454 return TRUE; | 3453 return TRUE; |
3455 return FALSE; | 3454 return FALSE; |
3456 } | 3455 } |
3457 #endif | |
3458 | 3456 |
3459 static void gaim_gtk_blist_show(GaimBuddyList *list) | 3457 static void gaim_gtk_blist_show(GaimBuddyList *list) |
3460 { | 3458 { |
3461 void *handle; | 3459 void *handle; |
3462 GtkCellRenderer *rend; | 3460 GtkCellRenderer *rend; |
3492 | 3490 |
3493 g_signal_connect(G_OBJECT(gtkblist->window), "delete_event", G_CALLBACK(gtk_blist_delete_cb), NULL); | 3491 g_signal_connect(G_OBJECT(gtkblist->window), "delete_event", G_CALLBACK(gtk_blist_delete_cb), NULL); |
3494 g_signal_connect(G_OBJECT(gtkblist->window), "configure_event", G_CALLBACK(gtk_blist_configure_cb), NULL); | 3492 g_signal_connect(G_OBJECT(gtkblist->window), "configure_event", G_CALLBACK(gtk_blist_configure_cb), NULL); |
3495 g_signal_connect(G_OBJECT(gtkblist->window), "visibility_notify_event", G_CALLBACK(gtk_blist_visibility_cb), NULL); | 3493 g_signal_connect(G_OBJECT(gtkblist->window), "visibility_notify_event", G_CALLBACK(gtk_blist_visibility_cb), NULL); |
3496 g_signal_connect(G_OBJECT(gtkblist->window), "window_state_event", G_CALLBACK(gtk_blist_window_state_cb), NULL); | 3494 g_signal_connect(G_OBJECT(gtkblist->window), "window_state_event", G_CALLBACK(gtk_blist_window_state_cb), NULL); |
3497 #if GTK_CHECK_VERSION(2,4,0) | |
3498 g_signal_connect(G_OBJECT(gtkblist->window), "key_press_event", G_CALLBACK(gtk_blist_window_key_press_cb), gtkblist); | 3495 g_signal_connect(G_OBJECT(gtkblist->window), "key_press_event", G_CALLBACK(gtk_blist_window_key_press_cb), gtkblist); |
3499 #endif | |
3500 gtk_widget_add_events(gtkblist->window, GDK_VISIBILITY_NOTIFY_MASK); | 3496 gtk_widget_add_events(gtkblist->window, GDK_VISIBILITY_NOTIFY_MASK); |
3501 | 3497 |
3502 /******************************* Menu bar *************************************/ | 3498 /******************************* Menu bar *************************************/ |
3503 accel_group = gtk_accel_group_new(); | 3499 accel_group = gtk_accel_group_new(); |
3504 gtk_window_add_accel_group(GTK_WINDOW (gtkblist->window), accel_group); | 3500 gtk_window_add_accel_group(GTK_WINDOW (gtkblist->window), accel_group); |