Mercurial > pidgin.yaz
comparison src/util.c @ 967:17ff662183b2
[gaim-migrate @ 977]
small code clean-ups
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 10 Oct 2000 10:48:23 +0000 |
parents | c1fb7afe4fd7 |
children | 9eb07b383df4 |
comparison
equal
deleted
inserted
replaced
966:f7886476f9d9 | 967:17ff662183b2 |
---|---|
915 | 915 |
916 if (text) | 916 if (text) |
917 { | 917 { |
918 label = gtk_label_new(text); | 918 label = gtk_label_new(text); |
919 gtk_box_pack_start(GTK_BOX(button_box_3), label, FALSE, FALSE, 2); | 919 gtk_box_pack_start(GTK_BOX(button_box_3), label, FALSE, FALSE, 2); |
920 gtk_widget_show(label); | |
920 } | 921 } |
921 | 922 |
922 gtk_widget_show(pixmap); | 923 gtk_widget_show(pixmap); |
923 if (text) | |
924 { | |
925 gtk_widget_show(label); | |
926 } | |
927 gtk_widget_show(button_box_2); | 924 gtk_widget_show(button_box_2); |
928 gtk_widget_show(button_box_3); | 925 gtk_widget_show(button_box_3); |
929 gtk_widget_show(button_box); | 926 gtk_widget_show(button_box); |
930 | 927 |
931 /* this causes clipping on lots of buttons with long text */ | 928 /* this causes clipping on lots of buttons with long text */ |
956 gtk_container_add(GTK_CONTAINER(button), button_box); | 953 gtk_container_add(GTK_CONTAINER(button), button_box); |
957 | 954 |
958 button_box_2 = gtk_vbox_new(FALSE, 0); | 955 button_box_2 = gtk_vbox_new(FALSE, 0); |
959 | 956 |
960 gtk_box_pack_start(GTK_BOX(button_box), button_box_2, TRUE, TRUE, 0); | 957 gtk_box_pack_start(GTK_BOX(button_box), button_box_2, TRUE, TRUE, 0); |
958 gtk_widget_show(button_box_2); | |
959 gtk_widget_show(button_box); | |
961 if (dispstyle == 2 || dispstyle == 0) { | 960 if (dispstyle == 2 || dispstyle == 0) { |
962 pm = gdk_pixmap_create_from_xpm_d(window->window, &mask, NULL, xpm); | 961 pm = gdk_pixmap_create_from_xpm_d(window->window, &mask, NULL, xpm); |
963 pixmap = gtk_pixmap_new(pm, mask); | 962 pixmap = gtk_pixmap_new(pm, mask); |
964 gtk_box_pack_start(GTK_BOX(button_box_2), pixmap, FALSE, FALSE, 0); | 963 gtk_box_pack_start(GTK_BOX(button_box_2), pixmap, FALSE, FALSE, 0); |
965 | 964 |
966 gtk_widget_show(pixmap); | 965 gtk_widget_show(pixmap); |
967 | 966 |
967 gdk_pixmap_unref(pm); | |
968 gdk_bitmap_unref(mask); | |
968 } | 969 } |
969 | 970 |
970 if (dispstyle == 2 || dispstyle == 1) | 971 if (dispstyle == 2 || dispstyle == 1) |
971 { | 972 { |
972 label = gtk_label_new(text); | 973 label = gtk_label_new(text); |
973 gtk_widget_show(label); | 974 gtk_widget_show(label); |
974 gtk_box_pack_end(GTK_BOX(button_box_2), label, FALSE, FALSE, 0); | 975 gtk_box_pack_end(GTK_BOX(button_box_2), label, FALSE, FALSE, 0); |
975 } | 976 } |
976 | 977 |
977 gtk_widget_show(button_box_2); | 978 gtk_tooltips_set_tip(tips, button, text, "Gaim"); |
978 gtk_widget_show(button_box); | |
979 gtk_widget_show(button); | 979 gtk_widget_show(button); |
980 if (dispstyle == 2 || dispstyle == 0) { | |
981 gdk_pixmap_unref(pm); | |
982 gdk_bitmap_unref(mask); | |
983 } | |
984 | |
985 gtk_tooltips_set_tip(tips, button, text, "Gaim"); | |
986 return button; | 980 return button; |
987 } | 981 } |
988 | 982 |
989 | 983 |
990 /* remove leading whitespace from a string */ | 984 /* remove leading whitespace from a string */ |