| 1699 { |
1699 { |
| 1700 GtkIconSize icon_size = gtk_icon_size_from_name(size); |
1700 GtkIconSize icon_size = gtk_icon_size_from_name(size); |
| 1701 GdkPixbuf *pixbuf = NULL; |
1701 GdkPixbuf *pixbuf = NULL; |
| 1702 |
1702 |
| 1703 if (prim == PURPLE_STATUS_UNAVAILABLE) |
1703 if (prim == PURPLE_STATUS_UNAVAILABLE) |
| 1704 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_BUSY, |
1704 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_BUSY, |
| 1705 icon_size, "GtkWidget"); |
1705 icon_size, "GtkWidget"); |
| 1706 else if (prim == PURPLE_STATUS_AWAY) |
1706 else if (prim == PURPLE_STATUS_AWAY) |
| 1707 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_AWAY, |
1707 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_AWAY, |
| 1708 icon_size, "GtkWidget"); |
1708 icon_size, "GtkWidget"); |
| 1709 else if (prim == PURPLE_STATUS_EXTENDED_AWAY) |
1709 else if (prim == PURPLE_STATUS_EXTENDED_AWAY) |
| 1710 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_XA, |
1710 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_XA, |
| 1711 icon_size, "GtkWidget"); |
1711 icon_size, "GtkWidget"); |
| 1712 else if (prim == PURPLE_STATUS_INVISIBLE) |
1712 else if (prim == PURPLE_STATUS_INVISIBLE) |
| 1713 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_INVISIBLE, |
1713 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_INVISIBLE, |
| 1714 icon_size, "GtkWidget"); |
1714 icon_size, "GtkWidget"); |
| 1715 else if (prim == PURPLE_STATUS_OFFLINE) |
1715 else if (prim == PURPLE_STATUS_OFFLINE) |
| 1716 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_OFFLINE, |
1716 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_OFFLINE, |
| 1717 icon_size, "GtkWidget"); |
1717 icon_size, "GtkWidget"); |
| 1718 else |
1718 else |
| 1719 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_AVAILABLE, |
1719 pixbuf = gtk_widget_render_icon (w, PIDGIN_STOCK_STATUS_AVAILABLE, |
| 1720 icon_size, "GtkWidget"); |
1720 icon_size, "GtkWidget"); |
| 1721 return pixbuf; |
1721 return pixbuf; |
| 1722 |
1722 |
| 1723 } |
1723 } |
| 1724 |
1724 |
| 1725 |
1725 |
| 3319 void pidgin_text_combo_box_entry_set_text(GtkWidget *widget, const char *text) |
3319 void pidgin_text_combo_box_entry_set_text(GtkWidget *widget, const char *text) |
| 3320 { |
3320 { |
| 3321 gtk_entry_set_text(GTK_ENTRY(GTK_BIN((widget))->child), (text)); |
3321 gtk_entry_set_text(GTK_ENTRY(GTK_BIN((widget))->child), (text)); |
| 3322 } |
3322 } |
| 3323 |
3323 |
| |
3324 GtkWidget * |
| |
3325 pidgin_add_widget_to_vbox(GtkBox *vbox, const char *widget_label, GtkSizeGroup *sg, GtkWidget *widget, gboolean expand, GtkWidget **p_label) |
| |
3326 { |
| |
3327 GtkWidget *hbox; |
| |
3328 GtkWidget *label = NULL; |
| |
3329 |
| |
3330 if (widget_label) { |
| |
3331 hbox = gtk_hbox_new(FALSE, 5); |
| |
3332 gtk_widget_show(hbox); |
| |
3333 gtk_box_pack_start(vbox, hbox, FALSE, FALSE, 0); |
| |
3334 |
| |
3335 label = gtk_label_new_with_mnemonic(widget_label); |
| |
3336 gtk_widget_show(label); |
| |
3337 if (sg) { |
| |
3338 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
| |
3339 gtk_size_group_add_widget(sg, label); |
| |
3340 } |
| |
3341 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
| |
3342 } else { |
| |
3343 hbox = GTK_WIDGET(vbox); |
| |
3344 } |
| |
3345 |
| |
3346 gtk_widget_show(widget); |
| |
3347 gtk_box_pack_start(GTK_BOX(hbox), widget, expand, TRUE, 0); |
| |
3348 if (label) { |
| |
3349 gtk_label_set_mnemonic_widget(GTK_LABEL(label), widget); |
| |
3350 pidgin_set_accessible_label (widget, label); |
| |
3351 } |
| |
3352 |
| |
3353 if (p_label) |
| |
3354 (*p_label) = label; |
| |
3355 return hbox; |
| |
3356 } |
| |
3357 |
| 3324 gboolean pidgin_auto_parent_window(GtkWidget *widget) |
3358 gboolean pidgin_auto_parent_window(GtkWidget *widget) |
| 3325 { |
3359 { |
| 3326 #if 0 |
3360 #if 0 |
| 3327 /* This looks at the most recent window that received focus, and makes |
3361 /* This looks at the most recent window that received focus, and makes |
| 3328 * that the parent window. */ |
3362 * that the parent window. */ |