comparison src/gtkblist.c @ 12473:d180bb2953e7

[gaim-migrate @ 14784] Sadrul's patch to enable formatting key shortcuts in the statusbox uses a function that was introduced in GTK+ 2.4.0. This will keep things building on older versions, but ideally, we'd find some other way to provide the same functionality that would work on all versions of GTK+ 2. I'm away from my normal Internet connections. I realized I forgot to commit this before I left, and I just had some downtime so I figured I'd take care of it. The modem on my laptop isn't playing nicely today, so I retyped these changes onto another computer (thankfully MacOS X has an SSH client). If it's broken, please accept my apologies. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 13 Dec 2005 00:49:56 +0000
parents 6faefbebcd24
children 24beec3e42ad
comparison
equal deleted inserted replaced
12472:065005e5f536 12473:d180bb2953e7
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)
3442 static gboolean 3443 static gboolean
3443 gtk_blist_window_key_press_cb(GtkWidget *w, GdkEventKey *event, GaimGtkBuddyList *gtkblist) 3444 gtk_blist_window_key_press_cb(GtkWidget *w, GdkEventKey *event, GaimGtkBuddyList *gtkblist)
3444 { 3445 {
3445 GtkWidget *imhtml; 3446 GtkWidget *imhtml;
3446 3447
3451 3452
3452 if (GTK_IS_IMHTML(imhtml) && gtk_bindings_activate_event(GTK_OBJECT(imhtml), event)) 3453 if (GTK_IS_IMHTML(imhtml) && gtk_bindings_activate_event(GTK_OBJECT(imhtml), event))
3453 return TRUE; 3454 return TRUE;
3454 return FALSE; 3455 return FALSE;
3455 } 3456 }
3457 #endif
3456 3458
3457 static void gaim_gtk_blist_show(GaimBuddyList *list) 3459 static void gaim_gtk_blist_show(GaimBuddyList *list)
3458 { 3460 {
3459 void *handle; 3461 void *handle;
3460 GtkCellRenderer *rend; 3462 GtkCellRenderer *rend;
3490 3492
3491 g_signal_connect(G_OBJECT(gtkblist->window), "delete_event", G_CALLBACK(gtk_blist_delete_cb), NULL); 3493 g_signal_connect(G_OBJECT(gtkblist->window), "delete_event", G_CALLBACK(gtk_blist_delete_cb), NULL);
3492 g_signal_connect(G_OBJECT(gtkblist->window), "configure_event", G_CALLBACK(gtk_blist_configure_cb), NULL); 3494 g_signal_connect(G_OBJECT(gtkblist->window), "configure_event", G_CALLBACK(gtk_blist_configure_cb), NULL);
3493 g_signal_connect(G_OBJECT(gtkblist->window), "visibility_notify_event", G_CALLBACK(gtk_blist_visibility_cb), NULL); 3495 g_signal_connect(G_OBJECT(gtkblist->window), "visibility_notify_event", G_CALLBACK(gtk_blist_visibility_cb), NULL);
3494 g_signal_connect(G_OBJECT(gtkblist->window), "window_state_event", G_CALLBACK(gtk_blist_window_state_cb), NULL); 3496 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)
3495 g_signal_connect(G_OBJECT(gtkblist->window), "key_press_event", G_CALLBACK(gtk_blist_window_key_press_cb), gtkblist); 3498 g_signal_connect(G_OBJECT(gtkblist->window), "key_press_event", G_CALLBACK(gtk_blist_window_key_press_cb), gtkblist);
3499 #endif
3496 gtk_widget_add_events(gtkblist->window, GDK_VISIBILITY_NOTIFY_MASK); 3500 gtk_widget_add_events(gtkblist->window, GDK_VISIBILITY_NOTIFY_MASK);
3497 3501
3498 /******************************* Menu bar *************************************/ 3502 /******************************* Menu bar *************************************/
3499 accel_group = gtk_accel_group_new(); 3503 accel_group = gtk_accel_group_new();
3500 gtk_window_add_accel_group(GTK_WINDOW (gtkblist->window), accel_group); 3504 gtk_window_add_accel_group(GTK_WINDOW (gtkblist->window), accel_group);