comparison src/dialogs.c @ 486:1045f51bcae7

[gaim-migrate @ 496] I dont know what this is. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Tue, 11 Jul 2000 19:02:03 +0000
parents a15d87ea1d4c
children e1021544e257
comparison
equal deleted inserted replaced
485:a15d87ea1d4c 486:1045f51bcae7
1988 GtkWidget *bbox; 1988 GtkWidget *bbox;
1989 GtkWidget *vbox; 1989 GtkWidget *vbox;
1990 GtkWidget *rbox; 1990 GtkWidget *rbox;
1991 GtkWidget *topbox; 1991 GtkWidget *topbox;
1992 GtkWidget *which; 1992 GtkWidget *which;
1993 struct addperm *p = g_new0(struct addperm, 1); 1993 GdkBitmap *mask;
1994 GdkPixmap *icon;
1995 GtkWidget *icon_i;
1996 GtkWidget *button_box;
1997
1998 struct addperm *p = g_new0(struct addperm, 1);
1994 1999
1995 p->window = gtk_window_new(GTK_WINDOW_DIALOG); 2000 p->window = gtk_window_new(GTK_WINDOW_DIALOG);
1996 dialogwindows = g_list_prepend(dialogwindows, p->window); 2001 gtk_widget_show(p->window);
1997 cancel = gtk_button_new_with_label(_("Cancel")); 2002 dialogwindows = g_list_prepend(dialogwindows, p->window);
1998 add = gtk_button_new_with_label(_("Add")); 2003
1999 bbox = gtk_hbox_new(TRUE, 10); 2004 bbox = gtk_hbox_new(TRUE, 10);
2000 topbox = gtk_hbox_new(FALSE, 5); 2005 topbox = gtk_hbox_new(FALSE, 5);
2001 vbox = gtk_vbox_new(FALSE, 5); 2006 vbox = gtk_vbox_new(FALSE, 5);
2002 rbox = gtk_vbox_new(FALSE, 5); 2007 rbox = gtk_vbox_new(FALSE, 5);
2003 p->entry = gtk_entry_new(); 2008 p->entry = gtk_entry_new();
2004 2009
2010 /* Build Add Button */
2011
2012 add = gtk_button_new();
2013
2014 button_box = gtk_hbox_new(FALSE, 5);
2015 icon = gdk_pixmap_create_from_xpm_d ( p->window->window, &mask, NULL, add_xpm);
2016 icon_i = gtk_pixmap_new(icon, mask);
2017
2018 label = gtk_label_new(_("Add"));
2019
2020 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
2021 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
2022
2023 gtk_widget_show(label);
2024 gtk_widget_show(icon_i);
2025
2026 gtk_widget_show(button_box);
2027
2028 gtk_container_add(GTK_CONTAINER(add), button_box);
2029
2030 /* End of Add Button */
2031
2032 /* Build Cancel Button */
2033
2034 cancel = gtk_button_new();
2035
2036 button_box = gtk_hbox_new(FALSE, 5);
2037 icon = gdk_pixmap_create_from_xpm_d ( p->window->window, &mask, NULL, cancel_xpm);
2038
2039 icon_i = gtk_pixmap_new(icon, mask);
2040
2041 label = gtk_label_new(_("Cancel"));
2042
2043 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
2044 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
2045
2046 gtk_widget_show(label);
2047 gtk_widget_show(icon_i);
2048
2049 gtk_widget_show(button_box);
2050
2051 gtk_container_add(GTK_CONTAINER(cancel), button_box);
2052
2053 /* End of Cancel Button */
2005 if (who != NULL) 2054 if (who != NULL)
2006 gtk_entry_set_text(GTK_ENTRY(p->entry), who); 2055 gtk_entry_set_text(GTK_ENTRY(p->entry), who);
2007 2056
2008 which = gtk_radio_button_new_with_label(NULL, _("Deny")); 2057 which = gtk_radio_button_new_with_label(NULL, _("Deny"));
2009 gtk_box_pack_start(GTK_BOX(rbox), which, FALSE, FALSE, 0); 2058 gtk_box_pack_start(GTK_BOX(rbox), which, FALSE, FALSE, 0);
2014 gtk_box_pack_start(GTK_BOX(rbox), which, FALSE, FALSE, 0); 2063 gtk_box_pack_start(GTK_BOX(rbox), which, FALSE, FALSE, 0);
2015 gtk_object_set_user_data(GTK_OBJECT(which), (int *)2); 2064 gtk_object_set_user_data(GTK_OBJECT(which), (int *)2);
2016 gtk_widget_show(which); 2065 gtk_widget_show(which);
2017 2066
2018 /* Put the buttons in the box */ 2067 /* Put the buttons in the box */
2019 gtk_box_pack_start(GTK_BOX(bbox), add, TRUE, TRUE, 10); 2068
2020 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10); 2069 gtk_widget_set_usize(add, 75, 30);
2070 gtk_widget_set_usize(cancel, 75, 30);
2071
2072 gtk_box_pack_start(GTK_BOX(bbox), add, FALSE, FALSE, 5);
2073 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 5);
2021 2074
2022 label = gtk_label_new(_("Add")); 2075 label = gtk_label_new(_("Add"));
2023 gtk_widget_show(label); 2076 gtk_widget_show(label);
2024 gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5); 2077 gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
2025 gtk_box_pack_start(GTK_BOX(topbox), p->entry, FALSE, FALSE, 5); 2078 gtk_box_pack_start(GTK_BOX(topbox), p->entry, FALSE, FALSE, 5);