Mercurial > pidgin
changeset 19041:dd4444be5e26
- More pretty (useless) GUI sugar
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Thu, 26 Jul 2007 00:38:53 +0000 |
parents | 4167e2d7ebef |
children | 276c4b70d9cb |
files | pidgin/gtkcertmgr.c |
diffstat | 1 files changed, 65 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkcertmgr.c Tue Jul 24 04:32:04 2007 +0000 +++ b/pidgin/gtkcertmgr.c Thu Jul 26 00:38:53 2007 +0000 @@ -43,6 +43,14 @@ * X.509 tls_peers management interface * *****************************************************************************/ +/* Columns + See http://developer.gnome.org/doc/API/2.0/gtk/TreeWidget.html */ +enum +{ + TPM_HOSTNAME_COLUMN, + TPM_N_COLUMNS +}; + static void tls_peers_mgmt_destroy(GtkWidget *mgmt_widget, gpointer data) { @@ -53,13 +61,69 @@ static GtkWidget * tls_peers_mgmt_build(void) { - GtkWidget *mgmt_widget = gtk_label_new("TLS PEEERSSSSS!!!"); + GtkWidget *treeview; + GtkWidget *bbox; + GtkWidget *importbutton; + GtkWidget *exportbutton; + GtkWidget *infobutton; + GtkWidget *deletebutton; + + GtkTreeIter *iter; + + /** Element to return to the Certmgr window to put in the Notebook */ + GtkWidget *mgmt_widget; + mgmt_widget = gtk_hbox_new(FALSE, /* Non-homogeneous */ + 0); /* No spacing */ gtk_widget_show(mgmt_widget); /* Ensure that everything gets cleaned up when the dialog box is closed */ g_signal_connect(G_OBJECT(mgmt_widget), "destroy", G_CALLBACK(tls_peers_mgmt_destroy), NULL); + + /* List view */ + treeview = gtk_label_new("TLS PEEERS!!!"); + gtk_box_pack_start(GTK_BOX(mgmt_widget), treeview, + TRUE, TRUE, /* Take up lots of space */ + 0); /* TODO: this padding is wrong */ + gtk_widget_show(treeview); + + /* Right-hand side controls box */ + bbox = gtk_vbutton_box_new(); + gtk_box_pack_end(GTK_BOX(mgmt_widget), bbox, + FALSE, FALSE, /* Do not take up space */ + 0); /* TODO: this padding is probably wrong */ + gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_START); + gtk_widget_show(bbox); + + /* Import button */ + /* TODO: This is the wrong stock button */ + importbutton = gtk_button_new_from_stock(GTK_STOCK_ADD); + gtk_box_pack_start(GTK_BOX(bbox), importbutton, FALSE, FALSE, 0); + gtk_widget_show(importbutton); + + /* Export button */ + /* TODO: This is the wrong stock button */ + exportbutton = gtk_button_new_from_stock(GTK_STOCK_SAVE); + gtk_box_pack_start(GTK_BOX(bbox), exportbutton, FALSE, FALSE, 0); + gtk_widget_show(exportbutton); + + /* Info button */ + infobutton = gtk_button_new_from_stock(GTK_STOCK_INFO); + gtk_box_pack_start(GTK_BOX(bbox), infobutton, FALSE, FALSE, 0); + gtk_widget_show(infobutton); + + /* Delete button */ + deletebutton = gtk_button_new_from_stock(GTK_STOCK_DELETE); + gtk_box_pack_start(GTK_BOX(bbox), deletebutton, FALSE, FALSE, 0); + gtk_widget_show(deletebutton); + + /* Disable all the buttons */ + gtk_widget_set_sensitive(importbutton, FALSE); + gtk_widget_set_sensitive(exportbutton, FALSE); + gtk_widget_set_sensitive(infobutton, FALSE); + gtk_widget_set_sensitive(deletebutton, FALSE); + return mgmt_widget; }