src/gtkblist.c

changeset 10357
f5ad7a664200
parent 10354
997ffe337bad
child 10382
32e07712e224
equal deleted inserted replaced
10356:e081ca47d463 10357:f5ad7a664200
3042 N_("/Buddies/Add Chat..."), 3042 N_("/Buddies/Add Chat..."),
3043 N_("/Buddies/Add Group..."), 3043 N_("/Buddies/Add Group..."),
3044 N_("/Buddies/Log Out") 3044 N_("/Buddies/Log Out")
3045 }; 3045 };
3046 3046
3047 /* There's got to be a cleaner way to do this...? */ 3047 static const int require_connection_size = sizeof(require_connection)
3048 #define SIZEOF_REQUIRE_CONNECTION 7 3048 / sizeof(*require_connection);
3049 3049
3050 /** 3050 /**
3051 * Rebuild dynamic menus and make menu items sensitive/insensitive 3051 * Rebuild dynamic menus and make menu items sensitive/insensitive
3052 * where appropriate. 3052 * where appropriate.
3053 */ 3053 */
3063 gaim_gtk_blist_update_protocol_actions(); 3063 gaim_gtk_blist_update_protocol_actions();
3064 gaim_gtkpounce_menu_build(gtkblist->bpmenu); 3064 gaim_gtkpounce_menu_build(gtkblist->bpmenu);
3065 3065
3066 sensitive = (gaim_connections_get_all() != NULL); 3066 sensitive = (gaim_connections_get_all() != NULL);
3067 3067
3068 gtk_widget_set_sensitive(gtkblist->treeview, sensitive); 3068 for (i = 0; i < require_connection_size; i++)
3069
3070 for (i = 0; i < SIZEOF_REQUIRE_CONNECTION; i++)
3071 { 3069 {
3072 widget = gtk_item_factory_get_widget(gtkblist->ift, require_connection[i]); 3070 widget = gtk_item_factory_get_widget(gtkblist->ift, require_connection[i]);
3073 gtk_widget_set_sensitive(widget, sensitive); 3071 gtk_widget_set_sensitive(widget, sensitive);
3074 } 3072 }
3075 3073

mercurial