diff options
author | Gary Kramlich <grim@reaperworld.com> | 2021-01-14 20:32:50 -0600 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2021-01-14 20:32:50 -0600 |
commit | f44a4f8ec1b4e8911a0e72ddc90c98a188fd5e8c (patch) | |
tree | 240635bc227abba4bba9c1e75a23b923d11619ba /pidgin/gtkutils.c | |
parent | be1fc5323db1df8886b499df32b837005b40ff5e (diff) | |
download | pidgin-f44a4f8ec1b4e8911a0e72ddc90c98a188fd5e8c.tar.gz |
Remove pidgin_pixbuf_button_from_stock as it is barely used and uses deprecated API
Testing Done:
Compiled and tested locally.
Reviewed at https://reviews.imfreedom.org/r/419/
Diffstat (limited to 'pidgin/gtkutils.c')
-rw-r--r-- | pidgin/gtkutils.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c index 896296a402..a28e24c5d9 100644 --- a/pidgin/gtkutils.c +++ b/pidgin/gtkutils.c @@ -188,52 +188,6 @@ GtkWidget *pidgin_new_check_item(GtkWidget *menu, const char *str, return menuitem; } -GtkWidget * -pidgin_pixbuf_button_from_stock(const char *text, const char *icon, - PidginButtonOrientation style) -{ - GtkWidget *button, *image, *bbox, *ibox, *lbox = NULL; - - button = gtk_button_new(); - - if (style == PIDGIN_BUTTON_HORIZONTAL) { - bbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - ibox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - if (text) - lbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - } else { - bbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - ibox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - if (text) - lbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - } - - gtk_container_add(GTK_CONTAINER(button), bbox); - - if (icon) { - gtk_box_pack_start(GTK_BOX(bbox), ibox, TRUE, TRUE, 0); - image = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_BUTTON); - gtk_box_pack_end(GTK_BOX(ibox), image, FALSE, TRUE, 0); - } - - if (text) { - GtkLabel *label; - - gtk_box_pack_start(GTK_BOX(bbox), lbox, TRUE, TRUE, 0); - label = GTK_LABEL(gtk_label_new(NULL)); - gtk_label_set_text_with_mnemonic(label, text); - gtk_label_set_mnemonic_widget(label, button); - gtk_box_pack_start(GTK_BOX(lbox), GTK_WIDGET(label), - FALSE, TRUE, 0); - pidgin_set_accessible_label(button, label); - } - - gtk_widget_show_all(bbox); - - return button; -} - - GtkWidget *pidgin_new_menu_item(GtkWidget *menu, const char *mnemonic, const char *icon, GCallback cb, gpointer data) { |