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 /mail | |
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 'mail')
-rw-r--r-- | mail/ChangeLog | 18 | ||||
-rw-r--r-- | mail/em-composer-prefs.c | 67 | ||||
-rw-r--r-- | mail/em-composer-prefs.h | 7 | ||||
-rw-r--r-- | mail/em-filter-editor.c | 44 | ||||
-rw-r--r-- | mail/em-filter-rule.c | 53 | ||||
-rw-r--r-- | mail/em-filter-source-element.c | 40 | ||||
-rw-r--r-- | mail/em-mailer-prefs.c | 56 | ||||
-rw-r--r-- | mail/em-mailer-prefs.h | 5 | ||||
-rw-r--r-- | mail/em-subscribe-editor.c | 77 | ||||
-rw-r--r-- | mail/mail-config.glade | 270 | ||||
-rw-r--r-- | mail/mail-dialogs.glade | 371 | ||||
-rw-r--r-- | mail/message-tag-followup.c | 24 | ||||
-rw-r--r-- | mail/message-tag-followup.h | 2 |
13 files changed, 388 insertions, 646 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index d1e0e834ef..73fca14281 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,21 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * mail-config.glade: + * mail-dialogs.glade: + * em-composer-prefs.h: + * em-composer-prefs.c: + * em-subscribe-editor.c: + * em-filter-editor.c: + * em-filter-rule.c: + * em-filter-source-element.c: + * em-mailer-prefs.h: + * em-mailer-prefs.c: + * message-tag-followup.h: + * message-tag-followup.c: + Remove deprecated Gtk+ symbols. + 2009-04-15 Chenthill Palanisamy <pchenthill@novell.com> * mail/mail-ops.c: Corrected a typo error. diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index 0b19cc24bf..d9f3718cb0 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -665,7 +665,7 @@ spell_setup (EMComposerPrefs *prefs) } static gint -attach_style_reply_new_order (gint style_id, +reply_style_new_order (gint style_id, gboolean from_enum_to_option_id) { gint values[] = { @@ -685,41 +685,18 @@ attach_style_reply_new_order (gint style_id, } static void -attach_style_info (GtkWidget *item, - gpointer user_data) -{ - gint *style = user_data; - - g_object_set_data ( - G_OBJECT (item), "style", GINT_TO_POINTER (*style)); - - (*style)++; -} - -static void -attach_style_info_reply (GtkWidget *item, - gpointer user_data) -{ - gint *style = user_data; - - g_object_set_data ( - G_OBJECT (item), "style", GINT_TO_POINTER ( - attach_style_reply_new_order (*style, FALSE))); - - (*style)++; -} - -static void -style_activate (GtkWidget *item, - EMComposerPrefs *prefs) +style_changed (GtkComboBox *combobox, const gchar *key) { GConfClient *client; - const gchar *key; gint style; client = mail_config_get_gconf_client (); - key = g_object_get_data (G_OBJECT (item), "key"); - style = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "style")); + style = gtk_combo_box_get_active (combobox); + g_return_if_fail (style >= 0); + + if (g_str_has_suffix (key, "/reply_style")) + style = reply_style_new_order (style, FALSE); + gconf_client_set_int (client, key, style, NULL); } @@ -979,31 +956,15 @@ em_composer_prefs_construct (EMComposerPrefs *prefs) spell_setup (prefs); /* Forwards and Replies */ - prefs->forward_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuForwardStyle")); + prefs->forward_style = GTK_COMBO_BOX (glade_xml_get_widget (gui, "comboboxForwardStyle")); style = gconf_client_get_int (client, "/apps/evolution/mail/format/forward_style", NULL); - gtk_option_menu_set_history (prefs->forward_style, style); - style = 0; + gtk_combo_box_set_active (prefs->forward_style, style); + g_signal_connect (prefs->forward_style, "changed", G_CALLBACK (style_changed), "/apps/evolution/mail/format/forward_style"); - gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->forward_style)), - attach_style_info, &style); - - if (gtk_option_menu_get_menu (prefs->forward_style)) { - option_menu_connect (prefs, prefs->forward_style, G_CALLBACK (style_activate), - "/apps/evolution/mail/format/forward_style"); - } - - prefs->reply_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuReplyStyle")); + prefs->reply_style = GTK_COMBO_BOX (glade_xml_get_widget (gui, "comboboxReplyStyle")); style = gconf_client_get_int (client, "/apps/evolution/mail/format/reply_style", NULL); - gtk_option_menu_set_history (prefs->reply_style, attach_style_reply_new_order (style, TRUE)); - style = 0; - gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->reply_style)), - attach_style_info_reply, &style); - - - if (gtk_option_menu_get_menu (prefs->reply_style)) { - option_menu_connect (prefs, prefs->reply_style, G_CALLBACK (style_activate), - "/apps/evolution/mail/format/reply_style"); - } + gtk_combo_box_set_active (prefs->reply_style, reply_style_new_order (style, TRUE)); + g_signal_connect (prefs->reply_style, "changed", G_CALLBACK (style_changed), "/apps/evolution/mail/format/reply_style"); /* Signatures */ dialog = (GtkDialog *) gtk_dialog_new (); diff --git a/mail/em-composer-prefs.h b/mail/em-composer-prefs.h index 6fcab979f4..82c6ece51e 100644 --- a/mail/em-composer-prefs.h +++ b/mail/em-composer-prefs.h @@ -66,11 +66,8 @@ struct _EMComposerPrefs { GtkTreeModel *language_model; /* Forwards and Replies */ - GtkOptionMenu *forward_style; - GtkOptionMenu *reply_style; - - /* Keyboard Shortcuts */ - GtkOptionMenu *shortcuts_type; + GtkComboBox *forward_style; + GtkComboBox *reply_style; /* Signatures */ GtkTreeView *sig_list; diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c index fb0c2c4ea6..4a92a65c58 100644 --- a/mail/em-filter-editor.c +++ b/mail/em-filter-editor.c @@ -122,11 +122,29 @@ em_filter_editor_new (EMFilterContext *fc, const EMFilterSource *source_names) } static void -select_source (GtkMenuItem *mi, EMFilterEditor *fe) +free_sources (gpointer data) +{ + GSList *sources = data; + + g_slist_foreach (sources, (GFunc)g_free, NULL); + g_slist_free (sources); +} + +static void +select_source (GtkComboBox *combobox, EMFilterEditor *fe) { char *source; + int idx; + GSList *sources; + + g_return_if_fail (GTK_IS_COMBO_BOX (combobox)); - source = g_object_get_data(G_OBJECT(mi), "source"); + idx = gtk_combo_box_get_active (combobox); + sources = g_object_get_data (G_OBJECT (combobox), "sources"); + + g_return_if_fail (idx >= 0 && idx < g_slist_length (sources)); + + source = (char *)g_slist_nth (sources, idx); g_return_if_fail (source); rule_editor_set_source ((RuleEditor *)fe, source); @@ -135,23 +153,23 @@ select_source (GtkMenuItem *mi, EMFilterEditor *fe) void em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const EMFilterSource *source_names) { - GtkWidget *menu, *item, *omenu; + GtkWidget *combobox; int i; GtkTreeViewColumn *column; + GSList *sources = NULL; - omenu = glade_xml_get_widget (gui, "filter_source"); - gtk_option_menu_remove_menu (GTK_OPTION_MENU (omenu)); - menu = gtk_menu_new (); + combobox = glade_xml_get_widget (gui, "filter_source_combobox"); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (combobox)))); for (i = 0; source_names[i].source; i++) { - item = gtk_menu_item_new_with_label(source_names[i].name); - g_object_set_data_full((GObject *)item, "source", g_strdup(source_names[i].source), g_free); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show (item); - g_signal_connect (item, "activate", G_CALLBACK (select_source), fe); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), source_names[i].name); + sources = g_slist_append (sources, g_strdup(source_names[i].source)); } - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - gtk_widget_show (omenu); + + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); + g_signal_connect (combobox, "changed", G_CALLBACK (select_source), fe); + g_object_set_data_full (G_OBJECT (combobox), "sources", sources, free_sources); + gtk_widget_show (combobox); rule_editor_construct ((RuleEditor *) fe, (RuleContext *) fc, gui, source_names[0].source, _("_Filter Rules")); diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c index 61156302f8..10f06e38da 100644 --- a/mail/em-filter-rule.c +++ b/mail/em-filter-rule.c @@ -324,39 +324,44 @@ struct _part_data { }; static void -option_activate(GtkMenuItem *item, struct _part_data *data) +part_combobox_changed (GtkComboBox *combobox, struct _part_data *data) { - FilterPart *part = g_object_get_data((GObject *)item, "part"); + FilterPart *part = NULL; FilterPart *newpart; + int index, i; + + index = gtk_combo_box_get_active (combobox); + for (i = 0, part = rule_context_next_part (RULE_CONTEXT (data->f), part); part && i < index; i++, part = rule_context_next_part (RULE_CONTEXT (data->f), part)) { + /* traverse until reached index */ + } + + g_return_if_fail (part != NULL); + g_return_if_fail (i == index); /* dont update if we haven't changed */ - if (!strcmp(part->title, data->part->title)) + if (!strcmp (part->title, data->part->title)) return; /* here we do a widget shuffle, throw away the old widget/rulepart, and create another */ if (data->partwidget) - gtk_container_remove(GTK_CONTAINER(data->container), data->partwidget); + gtk_container_remove (GTK_CONTAINER (data->container), data->partwidget); - newpart = filter_part_clone(part); - filter_part_copy_values(newpart, data->part); - em_filter_rule_replace_action((EMFilterRule *)data->fr, data->part, newpart); - g_object_unref(data->part); + newpart = filter_part_clone (part); + filter_part_copy_values (newpart, data->part); + em_filter_rule_replace_action ((EMFilterRule *)data->fr, data->part, newpart); + g_object_unref (data->part); data->part = newpart; - data->partwidget = filter_part_get_widget(newpart); + data->partwidget = filter_part_get_widget (newpart); if (data->partwidget) - gtk_box_pack_start(GTK_BOX(data->container), data->partwidget, TRUE, TRUE, 0); - - g_object_set_data((GObject *)data->container, "part", newpart); + gtk_box_pack_start (GTK_BOX (data->container), data->partwidget, TRUE, TRUE, 0); } static GtkWidget * get_rule_part_widget(EMFilterContext *f, FilterPart *newpart, FilterRule *fr) { FilterPart *part = NULL; - GtkWidget *menu; - GtkWidget *item; - GtkWidget *omenu; + GtkWidget *combobox; GtkWidget *hbox; GtkWidget *p; int index = 0, current = 0; @@ -373,14 +378,9 @@ get_rule_part_widget(EMFilterContext *f, FilterPart *newpart, FilterRule *fr) data->partwidget = p; data->container = hbox; - menu = gtk_menu_new(); + combobox = gtk_combo_box_new_text (); while ((part = em_filter_context_next_action(f, part))) { - item = gtk_menu_item_new_with_label(_(part->title)); - - g_object_set_data((GObject *)item, "part", part); - g_signal_connect(item, "activate", G_CALLBACK(option_activate), data); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show(item); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(part->title)); if (!strcmp(newpart->title, part->title)) current = index; @@ -388,12 +388,11 @@ get_rule_part_widget(EMFilterContext *f, FilterPart *newpart, FilterRule *fr) index++; } - omenu = gtk_option_menu_new(); - gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu); - gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), current); - gtk_widget_show(omenu); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), current); + g_signal_connect (combobox, "changed", G_CALLBACK (part_combobox_changed), data); + gtk_widget_show (combobox); - gtk_box_pack_start(GTK_BOX(hbox), omenu, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(hbox), combobox, FALSE, FALSE, 0); if (p) gtk_box_pack_start(GTK_BOX(hbox), p, TRUE, TRUE, 0); diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c index d2b5136751..096f91b2dd 100644 --- a/mail/em-filter-source-element.c +++ b/mail/em-filter-source-element.c @@ -232,21 +232,26 @@ clone(FilterElement *fe) } static void -source_changed(GtkWidget *item, EMFilterSourceElement *fs) +source_changed(GtkComboBox *combobox, EMFilterSourceElement *fs) { - SourceInfo *info = (SourceInfo *)g_object_get_data((GObject *)item, "source"); + SourceInfo *info; + int idx; - g_free(fs->priv->current_url); - fs->priv->current_url = g_strdup(info->url); + idx = gtk_combo_box_get_active (combobox); + g_return_if_fail (idx >= 0 && idx < g_list_length (fs->priv->sources)); + + info = (SourceInfo *) g_list_nth (fs->priv->sources, idx); + g_return_if_fail (info != NULL); + + g_free (fs->priv->current_url); + fs->priv->current_url = g_strdup (info->url); } static GtkWidget * get_widget(FilterElement *fe) { EMFilterSourceElement *fs = (EMFilterSourceElement *)fe; - GtkWidget *menu; - GtkWidget *omenu; - GtkWidget *item; + GtkWidget *combobox; GList *i; SourceInfo *first = NULL; int index, current_index; @@ -254,7 +259,7 @@ get_widget(FilterElement *fe) if (fs->priv->sources == NULL) em_filter_source_element_get_sources(fs); - menu = gtk_menu_new(); + combobox = gtk_combo_box_new_text (); index = 0; current_index = -1; @@ -273,15 +278,9 @@ get_widget(FilterElement *fe) else label = g_strdup_printf("%s <%s>", info->name, info->address); - item = gtk_menu_item_new_with_label(label); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), label); g_free(label); - g_object_set_data((GObject *)item, "source", info); - g_signal_connect(item, "activate", G_CALLBACK(source_changed), fs); - - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show(item); - if (fs->priv->current_url && !strcmp(info->url, fs->priv->current_url)) current_index = index; @@ -289,13 +288,10 @@ get_widget(FilterElement *fe) } } - omenu = gtk_option_menu_new(); - gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu); - if (current_index >= 0) { - gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), current_index); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), current_index); } else { - gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); g_free(fs->priv->current_url); if (first) @@ -304,7 +300,9 @@ get_widget(FilterElement *fe) fs->priv->current_url = NULL; } - return omenu; + g_signal_connect (combobox, "changed", G_CALLBACK (source_changed), fs); + + return combobox; } static void diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index ec5b8c7fb7..e489e16826 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -933,82 +933,74 @@ charset_menu_init (EMMailerPrefs *prefs) } static void -trash_days_activate (GtkWidget *item, EMMailerPrefs *prefs) +trash_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs) { - int days; + int idx; + + idx = gtk_combo_box_get_active (combobox); + g_return_if_fail (idx >= 0 && idx < G_N_ELEMENTS (empty_trash_frequency)); - days = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "days")); - gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", days, NULL); + gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", empty_trash_frequency [idx].days, NULL); } static void emmp_empty_trash_init (EMMailerPrefs *prefs) { int locked, days, hist = 0, i; - GtkWidget *menu, *item; toggle_button_init (prefs, prefs->empty_trash, FALSE, "/apps/evolution/mail/trash/empty_on_exit", G_CALLBACK (toggle_button_toggled)); days = gconf_client_get_int(prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", NULL); - menu = gtk_menu_new(); + + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (prefs->empty_trash_days))); for (i = 0; i < G_N_ELEMENTS (empty_trash_frequency); i++) { if (days >= empty_trash_frequency[i].days) hist = i; - item = gtk_menu_item_new_with_label (_(empty_trash_frequency[i].label)); - g_object_set_data ((GObject *) item, "days", GINT_TO_POINTER (empty_trash_frequency[i].days)); - g_signal_connect (item, "activate", G_CALLBACK (trash_days_activate), prefs); - - gtk_widget_show (item); - gtk_menu_shell_append((GtkMenuShell *)menu, item); + gtk_combo_box_append_text (prefs->empty_trash_days, _(empty_trash_frequency[i].label)); } - gtk_widget_show(menu); - gtk_option_menu_set_menu((GtkOptionMenu *)prefs->empty_trash_days, menu); - gtk_option_menu_set_history((GtkOptionMenu *)prefs->empty_trash_days, hist); + g_signal_connect (prefs->empty_trash_days, "changed", G_CALLBACK (trash_days_changed), prefs); + gtk_combo_box_set_active (prefs->empty_trash_days, hist); locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", NULL); gtk_widget_set_sensitive ((GtkWidget *) prefs->empty_trash_days, !locked); } static void -junk_days_activate (GtkWidget *item, EMMailerPrefs *prefs) +junk_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs) { - int days; + int idx; + + idx = gtk_combo_box_get_active (combobox); + g_return_if_fail (idx >= 0 && idx < G_N_ELEMENTS (empty_trash_frequency)); - days = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "days")); - gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", days, NULL); + gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", empty_trash_frequency[idx].days, NULL); } static void emmp_empty_junk_init (EMMailerPrefs *prefs) { int locked, days, hist = 0, i; - GtkWidget *menu, *item; toggle_button_init (prefs, prefs->empty_junk, FALSE, "/apps/evolution/mail/junk/empty_on_exit", G_CALLBACK (toggle_button_toggled)); days = gconf_client_get_int(prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", NULL); - menu = gtk_menu_new(); + + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (prefs->empty_junk_days))); for (i = 0; i < G_N_ELEMENTS (empty_trash_frequency); i++) { if (days >= empty_trash_frequency[i].days) hist = i; - item = gtk_menu_item_new_with_label (_(empty_trash_frequency[i].label)); - g_object_set_data ((GObject *) item, "days", GINT_TO_POINTER (empty_trash_frequency[i].days)); - g_signal_connect (item, "activate", G_CALLBACK (junk_days_activate), prefs); - - gtk_widget_show (item); - gtk_menu_shell_append((GtkMenuShell *)menu, item); + gtk_combo_box_append_text (prefs->empty_junk_days, _(empty_trash_frequency[i].label)); } - gtk_widget_show(menu); - gtk_option_menu_set_menu((GtkOptionMenu *)prefs->empty_junk_days, menu); - gtk_option_menu_set_history((GtkOptionMenu *)prefs->empty_junk_days, hist); + g_signal_connect (prefs->empty_junk_days, "changed", G_CALLBACK (junk_days_changed), prefs); + gtk_combo_box_set_active (prefs->empty_junk_days, hist); locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", NULL); gtk_widget_set_sensitive ((GtkWidget *) prefs->empty_junk_days, !locked); @@ -1268,7 +1260,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) /* Deleting Mail */ prefs->empty_trash = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEmptyTrashOnExit")); - prefs->empty_trash_days = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuEmptyTrashDays")); + prefs->empty_trash_days = GTK_COMBO_BOX (glade_xml_get_widget (gui, "comboboxEmptyTrashDays")); emmp_empty_trash_init (prefs); prefs->confirm_expunge = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkConfirmExpunge")); @@ -1481,7 +1473,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) G_CALLBACK (toggle_button_toggled)); prefs->empty_junk = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "junk_empty_check")); - prefs->empty_junk_days = GTK_OPTION_MENU (glade_xml_get_widget (gui, "junk_empty_combo")); + prefs->empty_junk_days = GTK_COMBO_BOX (glade_xml_get_widget (gui, "junk_empty_combobox")); emmp_empty_junk_init (prefs); prefs->default_junk_plugin = GTK_COMBO_BOX (glade_xml_get_widget (gui, "default_junk_plugin")); diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h index 6e783ef562..3b52d9f40a 100644 --- a/mail/em-mailer-prefs.h +++ b/mail/em-mailer-prefs.h @@ -34,6 +34,7 @@ extern "C" { struct _ESignature; struct _GtkToggleButton; struct _GtkOptionMenu; +struct _GtkComboBox; struct _GdkPixbuf; struct _GtkWidget; struct _GladeXML; @@ -85,7 +86,7 @@ struct _EMMailerPrefs { /* Deleting Mail */ struct _GtkToggleButton *empty_trash; - struct _GtkOptionMenu *empty_trash_days; + struct _GtkComboBox *empty_trash_days; struct _GtkToggleButton *confirm_expunge; /* HTML Mail tab */ @@ -121,7 +122,7 @@ struct _EMMailerPrefs { /* Junk prefs */ struct _GtkToggleButton *check_incoming; struct _GtkToggleButton *empty_junk; - struct _GtkOptionMenu *empty_junk_days; + struct _GtkComboBox *empty_junk_days; struct _GtkToggleButton *sa_local_tests_only; struct _GtkToggleButton *sa_use_daemon; diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c index bca062b096..724b9b4874 100644 --- a/mail/em-subscribe-editor.c +++ b/mail/em-subscribe-editor.c @@ -59,9 +59,8 @@ struct _EMSubscribeEditor { GtkDialog *dialog; GtkWidget *vbox; /* where new stores are added */ - GtkWidget *optionmenu; + GtkWidget *combobox; GtkWidget *none_selected; /* 'please select a xxx' message */ - GtkWidget *none_selected_item; GtkWidget *progress; }; @@ -357,7 +356,7 @@ sub_folderinfo_exec (struct _emse_folderinfo_msg *m) if (m->seq == m->sub->seq) { camel_operation_register(m->base.cancel); - m->info = camel_store_get_folder_info(m->sub->store, m->node?m->node->info->full_name:pub_full_name, CAMEL_STORE_FOLDER_INFO_FAST | CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL, &m->base.ex); + m->info = camel_store_get_folder_info(m->sub->store, m->node?m->node->info->full_name:pub_full_name, CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL, &m->base.ex); camel_operation_unregister(m->base.cancel); } } @@ -729,20 +728,31 @@ sub_editor_got_store(char *uri, CamelStore *store, void *data) } static void -sub_editor_menu_changed(GtkWidget *w, EMSubscribeEditor *se) +sub_editor_combobox_changed (GtkWidget *w, EMSubscribeEditor *se) { int i, n; struct _EMSubscribe *sub; - d(printf("menu changed\n")); + d(printf("combobox changed\n")); i = 1; - n = gtk_option_menu_get_history((GtkOptionMenu *)se->optionmenu); - if (n == 0) - gtk_widget_show(se->none_selected); - else { - gtk_widget_hide(se->none_selected); - gtk_widget_hide(se->none_selected_item); + n = gtk_combo_box_get_active (GTK_COMBO_BOX (se->combobox)); + if (n == 0) { + gtk_widget_show (se->none_selected); + } else { + GtkTreeIter iter; + GtkTreeModel *model; + + gtk_widget_hide (se->none_selected); + + model = gtk_combo_box_get_model (GTK_COMBO_BOX (se->combobox)); + if (gtk_tree_model_get_iter_first (model, &iter)) { + /* hide the first item */ + gtk_list_store_set ( + GTK_LIST_STORE (model), &iter, + 1, FALSE, + -1); + } } se->current = NULL; @@ -815,7 +825,10 @@ GtkDialog *em_subscribe_editor_new(void) EAccountList *accounts; EIterator *iter; GladeXML *xml; - GtkWidget *menu, *w; + GtkWidget *w; + GtkCellRenderer *cell; + GtkListStore *store; + GtkTreeIter gtiter; char *gladefile; se = g_malloc0(sizeof(*se)); @@ -859,12 +872,27 @@ GtkDialog *em_subscribe_editor_new(void) w = glade_xml_get_widget(xml, "refresh_button"); g_signal_connect(w, "clicked", G_CALLBACK(sub_editor_refresh), se); - /* setup stores menu */ - se->optionmenu = glade_xml_get_widget(xml, "store_menu"); - menu = gtk_menu_new(); - se->none_selected_item = w = gtk_menu_item_new_with_label(_("No server has been selected")); - gtk_widget_show(w); - gtk_menu_shell_append ((GtkMenuShell *)menu, w); + /* setup stores combobox */ + se->combobox = glade_xml_get_widget (xml, "store_combobox"); + store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); + gtk_combo_box_set_model (GTK_COMBO_BOX (se->combobox), GTK_TREE_MODEL (store)); + g_object_unref (store); + + gtk_cell_layout_clear (GTK_CELL_LAYOUT (se->combobox)); + + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (se->combobox), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (se->combobox), cell, + "text", 0, + "visible", 1, + NULL); + + gtk_list_store_append (store, >iter); + gtk_list_store_set ( + store, >iter, + 0, _("No server has been selected"), + 1, TRUE, + -1); accounts = mail_config_get_accounts (); for (iter = e_list_get_iterator ((EList *) accounts); @@ -875,9 +903,12 @@ GtkDialog *em_subscribe_editor_new(void) /* setup url table, and store table? */ if (account->enabled && account->source->url) { d(printf("adding account '%s'\n", account->name)); - w = gtk_menu_item_new_with_label(account->name); - gtk_menu_shell_append ((GtkMenuShell *)menu, w); - gtk_widget_show(w); + gtk_list_store_append (store, >iter); + gtk_list_store_set ( + store, >iter, + 0, account->name, + 1, TRUE, + -1); e_dlist_addtail(&se->stores, (EDListNode *)subscribe_new(se, account->source->url)); } else { d(printf("not adding account '%s'\n", account->name)); @@ -885,8 +916,8 @@ GtkDialog *em_subscribe_editor_new(void) } g_object_unref(iter); - gtk_option_menu_set_menu((GtkOptionMenu *)se->optionmenu, menu); - g_signal_connect(se->optionmenu, "changed", G_CALLBACK(sub_editor_menu_changed), se); + gtk_combo_box_set_active (GTK_COMBO_BOX (se->combobox), 0); + g_signal_connect(se->combobox, "changed", G_CALLBACK(sub_editor_combobox_changed), se); if (window_size.width == 0) { /* initialize @window_size with the previous session's size */ diff --git a/mail/mail-config.glade b/mail/mail-config.glade index de881e40e5..f435b95a63 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -550,8 +550,8 @@ For example: "Work" or "Personal"</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> <accessibility> - <atkrelation target="label464" type="labelled-by"/> <atkrelation target="identity_address_label" type="labelled-by"/> + <atkrelation target="label464" type="labelled-by"/> </accessibility> </widget> <packing> @@ -633,8 +633,8 @@ For example: "Work" or "Personal"</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> <accessibility> - <atkrelation target="identity_full_name_label" type="labelled-by"/> <atkrelation target="label464" type="labelled-by"/> + <atkrelation target="identity_full_name_label" type="labelled-by"/> </accessibility> </widget> <packing> @@ -836,8 +836,8 @@ For example: "Work" or "Personal"</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> <accessibility> - <atkrelation target="label466" type="labelled-by"/> <atkrelation target="identity_organization_label" type="labelled-by"/> + <atkrelation target="label466" type="labelled-by"/> </accessibility> </widget> <packing> @@ -890,8 +890,8 @@ For example: "Work" or "Personal"</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> <accessibility> - <atkrelation target="reply_to_label" type="labelled-by"/> <atkrelation target="label466" type="labelled-by"/> + <atkrelation target="reply_to_label" type="labelled-by"/> </accessibility> </widget> <packing> @@ -2804,7 +2804,7 @@ For example: "Work" or "Personal"</property> <widget class="Custom" id="sent_button"> <property name="visible">True</property> <property name="creation_function">em_account_editor_folder_selector_button_new</property> - <property name="string1" translatable="yes">Select Sent Folder</property> + <property name="string1">Select Sent Folder</property> <property name="int1">0</property> <property name="int2">0</property> <property name="last_modification_time">Tue, 14 Dec 2004 17:07:09 GMT</property> @@ -2823,7 +2823,7 @@ For example: "Work" or "Personal"</property> <widget class="Custom" id="drafts_button"> <property name="visible">True</property> <property name="creation_function">em_account_editor_folder_selector_button_new</property> - <property name="string1" translatable="yes">Select Drafts Folder</property> + <property name="string1">Select Drafts Folder</property> <property name="int1">0</property> <property name="int2">0</property> <property name="last_modification_time">Tue, 14 Dec 2004 17:07:02 GMT</property> @@ -5458,10 +5458,12 @@ For example: "Work" or "Personal"</property> </child> <child> - <widget class="GtkOptionMenu" id="omenuEmptyTrashDays"> + <widget class="GtkComboBox" id="comboboxEmptyTrashDays"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -6648,10 +6650,12 @@ For example: "Work" or "Personal"</property> </child> <child> - <widget class="GtkOptionMenu" id="junk_empty_combo"> + <widget class="GtkComboBox" id="junk_empty_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -6874,7 +6878,6 @@ For example: "Work" or "Personal"</property> <property name="right_attach">1</property> <property name="top_attach">6</property> <property name="bottom_attach">7</property> - <property name="x_padding">0</property> <property name="x_options">fill</property> </packing> </child> @@ -7164,7 +7167,6 @@ For example: "Work" or "Personal"</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">omenuReplyStyle</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -7199,48 +7201,14 @@ For example: "Work" or "Personal"</property> <property name="spacing">0</property> <child> - <widget class="GtkOptionMenu" id="omenuReplyStyle"> + <widget class="GtkComboBox" id="comboboxReplyStyle"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget33"> - <property name="visible">True</property> - <child> - <widget class="GtkMenuItem" id="convertwidget36"> - <property name="visible">True</property> - <property name="label" translatable="yes">Attachment</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget50"> - <property name="visible">True</property> - <property name="label" translatable="yes">Inline (Outlook style)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget34"> - <property name="visible">True</property> - <property name="label" translatable="yes">Quoted</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget35"> - <property name="visible">True</property> - <property name="label" translatable="yes">Do not quote</property> - <property name="use_underline">True</property> - </widget> - </child> - - </widget> - </child> + <property name="items" translatable="yes">Attachment +Inline (Outlook style) +Quoted +Do not quote</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -7268,40 +7236,13 @@ For example: "Work" or "Personal"</property> <property name="spacing">0</property> <child> - <widget class="GtkOptionMenu" id="omenuForwardStyle"> + <widget class="GtkComboBox" id="comboboxForwardStyle"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget37"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget38"> - <property name="visible">True</property> - <property name="label" translatable="yes">Attachment</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget39"> - <property name="visible">True</property> - <property name="label" translatable="yes">Inline</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget40"> - <property name="visible">True</property> - <property name="label" translatable="yes">Quoted</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">Attachment +Inline +Quoted</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -7371,7 +7312,6 @@ For example: "Work" or "Personal"</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">omenuForwardStyle</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -9329,35 +9269,6 @@ for display purposes only. </property> </packing> </child> - <!--<child> - <widget class="GtkLabel" id="lblSocksHost"> - <property name="visible">True</property> - <property name="label" translatable="yes">S_OCKS Host:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">txtSocksHost</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child>--> - <child> <widget class="GtkLabel" id="lblIgnoreHosts"> <property name="visible">True</property> @@ -9429,27 +9340,6 @@ for display purposes only. </property> </packing> </child> - <!--<child> - <widget class="GtkEntry" id="txtSocksHost"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child>--> - <child> <widget class="GtkLabel" id="lblHttpPort"> <property name="visible">True</property> @@ -9506,34 +9396,6 @@ for display purposes only. </property> </packing> </child> - <!--<child> - <widget class="GtkLabel" id="lblSocksPort"> - <property name="visible">True</property> - <property name="label" translatable="yes">Port:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child>--> - <child> <widget class="GtkSpinButton" id="spnHttpPort"> <property name="visible">True</property> @@ -9576,27 +9438,6 @@ for display purposes only. </property> </packing> </child> - <!--<child> - <widget class="GtkSpinButton" id="spnSocksPort"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 65535 1 10 0</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child>--> - <child> <widget class="GtkEntry" id="txtIgnoreHosts"> <property name="visible">True</property> @@ -9780,59 +9621,6 @@ for display purposes only. </property> <property name="fill">True</property> </packing> </child> - - <!-- <child> - <widget class="GtkRadioButton" id="rdoAutoConfig"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Automatic proxy configuration URL:</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">rdoSysSettings</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkAlignment" id="alignment36"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">24</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkEntry" id="txtAutoConfigUrl"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> --> </widget> <packing> <property name="padding">0</property> diff --git a/mail/mail-dialogs.glade b/mail/mail-dialogs.glade index 1ecf410ed5..689082792a 100644 --- a/mail/mail-dialogs.glade +++ b/mail/mail-dialogs.glade @@ -19,6 +19,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -174,7 +175,6 @@ <property name="fill">True</property> </packing> </child> - </widget> <packing> <property name="padding">0</property> @@ -201,6 +201,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -235,31 +236,62 @@ </packing> </child> + <child> + <widget class="GtkVBox" id="vbox161"> + <property name="border_width">12</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">18</property> + <child> - <widget class="GtkVBox" id="vbox161"> - <property name="border_width">12</property> + <widget class="GtkVBox" id="frame5"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">18</property> + <property name="spacing">6</property> + + <child> + <widget class="GtkLabel" id="label464"> + <property name="visible">True</property> + <property name="label" translatable="yes"><span weight="bold">Digital Signature</span></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> <child> - <widget class="GtkVBox" id="frame5"> + <widget class="GtkHBox" id="hbox170"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">6</property> + <property name="spacing">0</property> <child> - <widget class="GtkLabel" id="label464"> + <widget class="GtkLabel" id="label465"> <property name="visible">True</property> - <property name="label" translatable="yes"><span weight="bold">Digital Signature</span></property> + <property name="label" translatable="yes"></property> <property name="use_underline">False</property> - <property name="use_markup">True</property> + <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">0</property> + <property name="xalign">0.5</property> <property name="yalign">0.5</property> - <property name="xpad">0</property> + <property name="xpad">12</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> @@ -274,67 +306,29 @@ </child> <child> - <widget class="GtkHBox" id="hbox170"> + <widget class="GtkTable" id="table10"> <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">1</property> <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkLabel" id="label465"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">12</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="row_spacing">2</property> + <property name="column_spacing">6</property> <child> - <widget class="GtkTable" id="table10"> + <widget class="GtkVBox" id="signature_vbox"> <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">1</property> <property name="homogeneous">False</property> - <property name="row_spacing">2</property> - <property name="column_spacing">6</property> + <property name="spacing">0</property> <child> - <widget class="GtkVBox" id="signature_vbox"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - </packing> + <placeholder/> </child> </widget> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> </packing> </child> </widget> @@ -347,29 +341,67 @@ </widget> <packing> <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="frame6"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">6</property> + + <child> + <widget class="GtkLabel" id="label477"> + <property name="visible">True</property> + <property name="label" translatable="yes"><span weight="bold">Encryption</span></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkVBox" id="frame6"> + <widget class="GtkHBox" id="hbox171"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">6</property> + <property name="spacing">0</property> <child> - <widget class="GtkLabel" id="label477"> + <widget class="GtkLabel" id="label478"> <property name="visible">True</property> - <property name="label" translatable="yes"><span weight="bold">Encryption</span></property> + <property name="label" translatable="yes"></property> <property name="use_underline">False</property> - <property name="use_markup">True</property> + <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">0</property> + <property name="xalign">0.5</property> <property name="yalign">0.5</property> - <property name="xpad">0</property> + <property name="xpad">12</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> @@ -384,67 +416,29 @@ </child> <child> - <widget class="GtkHBox" id="hbox171"> + <widget class="GtkTable" id="table11"> <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">1</property> <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkLabel" id="label478"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">12</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="row_spacing">2</property> + <property name="column_spacing">6</property> <child> - <widget class="GtkTable" id="table11"> + <widget class="GtkVBox" id="encryption_vbox"> <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">1</property> <property name="homogeneous">False</property> - <property name="row_spacing">2</property> - <property name="column_spacing">6</property> + <property name="spacing">0</property> <child> - <widget class="GtkVBox" id="encryption_vbox"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - </packing> + <placeholder/> </child> </widget> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> </packing> </child> </widget> @@ -457,13 +451,24 @@ </widget> <packing> <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> </child> - + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> </widget> </child> </widget> @@ -483,6 +488,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -556,7 +562,6 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">store_menu</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -570,24 +575,10 @@ </child> <child> - <widget class="GtkOptionMenu" id="store_menu"> + <widget class="GtkComboBox" id="store_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu1"> - - <child> - <widget class="GtkMenuItem" id="no_imap_server_selected1"> - <property name="visible">True</property> - <property name="label" translatable="yes">None Selected</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_no_imap_server_selected1_activate" last_modification_time="Mon, 14 Apr 2003 17:08:20 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -661,6 +652,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">True</property> <child internal-child="vbox"> @@ -882,6 +874,7 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -943,13 +936,14 @@ <property name="spacing">6</property> <child> - <widget class="Custom" id="pixmap"> + <widget class="GtkImage" id="pixmap"> <property name="visible">True</property> - <property name="creation_function">e_create_image_widget</property> - <property name="string1">stock_mail-flag-for-followup</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Wed, 08 Dec 2004 02:35:27 GMT</property> + <property name="icon_size">6</property> + <property name="icon_name">stock_mail-flag-for-followup</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> @@ -1042,7 +1036,6 @@ Please select a follow up action from the "Flag" menu.</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">combo-entry</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -1106,71 +1099,6 @@ Please select a follow up action from the "Flag" menu.</property> </child> <child> - <widget class="GtkCombo" id="combo"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="combo-entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget3"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="convertwidget4"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget5"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="Custom" id="target_date"> <property name="visible">True</property> <property name="creation_function">target_date_new</property> @@ -1208,6 +1136,25 @@ Please select a follow up action from the "Flag" menu.</property> <property name="y_options"></property> </packing> </child> + + <child> + <widget class="GtkComboBoxEntry" id="combo"> + <property name="visible">True</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> @@ -1241,6 +1188,7 @@ Please select a follow up action from the "Flag" menu.</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -1441,7 +1389,6 @@ Please select a follow up action from the "Flag" menu.</property> <property name="inconsistent">False</property> <property name="draw_indicator">True</property> <property name="group">local_rb</property> - </widget> <packing> <property name="padding">0</property> diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c index a5f2a967db..2ddd372257 100644 --- a/mail/message-tag-followup.c +++ b/mail/message-tag-followup.c @@ -112,7 +112,7 @@ message_tag_followup_class_init (MessageTagFollowUpClass *klass) static void message_tag_followup_init (MessageTagFollowUp *editor) { - editor->combo = NULL; + editor->combo_entry = NULL; editor->target_date = NULL; editor->completed = NULL; editor->clear = NULL; @@ -139,7 +139,7 @@ get_tag_list (MessageTagEditor *editor) time_t date; char *text; - camel_tag_set (&tags, "follow-up", gtk_entry_get_text (GTK_ENTRY (followup->combo->entry))); + camel_tag_set (&tags, "follow-up", gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (followup->combo_entry))))); date = e_date_edit_get_time (followup->target_date); if (date != (time_t) -1) { @@ -170,7 +170,7 @@ set_tag_list (MessageTagEditor *editor, CamelTag *tags) text = camel_tag_get (&tags, "follow-up"); if (text) - gtk_entry_set_text (GTK_ENTRY (followup->combo->entry), text); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (followup->combo_entry))), text); text = camel_tag_get (&tags, "due-by"); if (text && *text) { @@ -195,7 +195,7 @@ clear_clicked (GtkButton *button, gpointer user_data) { MessageTagFollowUp *followup = user_data; - gtk_list_select_item (GTK_LIST (followup->combo->list), DEFAULT_FLAG); + gtk_combo_box_set_active (followup->combo_entry, DEFAULT_FLAG); e_date_edit_set_time (followup->target_date, (time_t) -1); gtk_toggle_button_set_active (followup->completed, FALSE); @@ -268,7 +268,6 @@ construct (MessageTagEditor *editor) GtkCellRenderer *renderer; GtkListStore *model; GtkWidget *widget; - GList *strings; GladeXML *gui; int i; char *gladefile; @@ -294,11 +293,6 @@ construct (MessageTagEditor *editor) gtk_widget_reparent (widget, GTK_DIALOG (editor)->vbox); gtk_box_set_child_packing (GTK_BOX (GTK_DIALOG (editor)->vbox), widget, TRUE, TRUE, 6, GTK_PACK_START); - widget = glade_xml_get_widget (gui, "pixmap"); - gtk_image_set_from_icon_name ( - GTK_IMAGE (widget), "stock_mail-flag-for-followup", - GTK_ICON_SIZE_DIALOG); - followup->message_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "message_list")); model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); gtk_tree_view_set_model (followup->message_list, (GtkTreeModel *) model); @@ -311,13 +305,11 @@ construct (MessageTagEditor *editor) gtk_tree_view_insert_column_with_attributes (followup->message_list, -1, _("Subject"), renderer, "text", 1, NULL); - followup->combo = GTK_COMBO (glade_xml_get_widget (gui, "combo")); - strings = NULL; + followup->combo_entry = GTK_COMBO_BOX (glade_xml_get_widget (gui, "combo")); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (followup->combo_entry))); for (i = 0; i < num_available_flags; i++) - strings = g_list_append (strings, (char *) _(available_flags[i])); - gtk_combo_set_popdown_strings (followup->combo, strings); - g_list_free (strings); - gtk_list_select_item (GTK_LIST (followup->combo->list), DEFAULT_FLAG); + gtk_combo_box_append_text (followup->combo_entry, (char *) _(available_flags[i])); + gtk_combo_box_set_active (followup->combo_entry, DEFAULT_FLAG); followup->target_date = E_DATE_EDIT (glade_xml_get_widget (gui, "target_date")); /* glade bug, need to show this ourselves */ diff --git a/mail/message-tag-followup.h b/mail/message-tag-followup.h index 80f261fb80..4b18865d89 100644 --- a/mail/message-tag-followup.h +++ b/mail/message-tag-followup.h @@ -47,7 +47,7 @@ struct _MessageTagFollowUp { struct _GtkTreeView *message_list; - struct _GtkCombo *combo; + struct _GtkComboBox *combo_entry; struct _EDateEdit *target_date; struct _GtkToggleButton *completed; |