diff options
author | Milan Crha <mcrha@redhat.com> | 2009-04-24 17:45:21 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-04-24 17:45:21 +0800 |
commit | 8a072ffc7c0ddcde472877a51ace0bb14f86fb0a (patch) | |
tree | 5c49c7807f24cd118e32e11ad52482b0ce65d0e6 /smime/gui/e-cert-selector.c | |
parent | f6792a6f1e60b04ee1c137c9232802df437580f6 (diff) | |
download | gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.tar.gz gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.tar.zst gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.zip |
GN-bug #572348 - Removed deprecated Gtk+ symbols
Some still left, because those gone in kill-bonobo branch.
Diffstat (limited to 'smime/gui/e-cert-selector.c')
-rw-r--r-- | smime/gui/e-cert-selector.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/smime/gui/e-cert-selector.c b/smime/gui/e-cert-selector.c index dacf33198f..770f95c1cd 100644 --- a/smime/gui/e-cert-selector.c +++ b/smime/gui/e-cert-selector.c @@ -41,7 +41,7 @@ struct _ECertSelectorPrivate { CERTCertList *certlist; - GtkWidget *menu, *description; + GtkWidget *combobox, *description; }; enum { @@ -73,7 +73,7 @@ ecs_find_current(ECertSelector *ecs) if (p->certlist == NULL || CERT_LIST_EMPTY(p->certlist)) return NULL; - n = gtk_option_menu_get_history((GtkOptionMenu *)p->menu); + n = gtk_combo_box_get_active (GTK_COMBO_BOX (p->combobox)); node = CERT_LIST_HEAD(p->certlist); while (n>0 && !CERT_LIST_END(node, p->certlist)) { n--; @@ -149,7 +149,7 @@ e_cert_selector_new(int type, const char *currentid) CERTCertList *certlist; CERTCertListNode *node; GladeXML *gui; - GtkWidget *w, *menu; + GtkWidget *w; int n=0, active=0; char *gladefile; @@ -162,7 +162,7 @@ e_cert_selector_new(int type, const char *currentid) gui = glade_xml_new(gladefile, "cert_selector_vbox", NULL); g_free (gladefile); - p->menu = glade_xml_get_widget(gui, "cert_menu"); + p->combobox = glade_xml_get_widget(gui, "cert_combobox"); p->description = glade_xml_get_widget(gui, "cert_description"); w = glade_xml_get_widget(gui, "cert_selector_vbox"); @@ -179,7 +179,7 @@ e_cert_selector_new(int type, const char *currentid) break; } - menu = gtk_menu_new(); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (p->combobox)))); certlist = CERT_FindUserCertsByUsage(CERT_GetDefaultCertDB(), usage, FALSE, TRUE, NULL); ecs->priv->certlist = certlist; @@ -187,9 +187,7 @@ e_cert_selector_new(int type, const char *currentid) node = CERT_LIST_HEAD(certlist); while (!CERT_LIST_END(node, certlist)) { if (node->cert->nickname || node->cert->emailAddr) { - w = gtk_menu_item_new_with_label(node->cert->nickname?node->cert->nickname:node->cert->emailAddr); - gtk_menu_shell_append((GtkMenuShell *)menu, w); - gtk_widget_show(w); + gtk_combo_box_append_text (GTK_COMBO_BOX (p->combobox), node->cert->nickname?node->cert->nickname:node->cert->emailAddr); if (currentid != NULL && ((node->cert->nickname != NULL && strcmp(node->cert->nickname, currentid) == 0) @@ -203,14 +201,13 @@ e_cert_selector_new(int type, const char *currentid) } } - gtk_option_menu_set_menu((GtkOptionMenu *)p->menu, menu); - gtk_option_menu_set_history((GtkOptionMenu *)p->menu, active); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox), active); - g_signal_connect(p->menu, "changed", G_CALLBACK(ecs_cert_changed), ecs); + g_signal_connect (p->combobox, "changed", G_CALLBACK(ecs_cert_changed), ecs); g_object_unref(gui); - ecs_cert_changed(p->menu, ecs); + ecs_cert_changed(p->combobox, ecs); return GTK_WIDGET(ecs); } |