static GtkWidget* create_updating_page (ModestGnomeGlobalSettingsDialog *self);
static GtkWidget* create_composing_page (ModestGnomeGlobalSettingsDialog *self);
+static ModestConnectedVia current_connection (void);
typedef struct _ModestGnomeGlobalSettingsDialogPrivate ModestGnomeGlobalSettingsDialogPrivate;
struct _ModestGnomeGlobalSettingsDialogPrivate {
gobject_class->finalize = modest_gnome_global_settings_dialog_finalize;
g_type_class_add_private (gobject_class, sizeof(ModestGnomeGlobalSettingsDialogPrivate));
+
+ MODEST_GLOBAL_SETTINGS_DIALOG_CLASS (klass)->current_connection_func = current_connection;
}
static void
{
GtkWidget *vbox, *table_update, *table_limit;
GtkWidget *label, *check, *combo, *spin;
- ModestPairList *list;
vbox = gtk_vbox_new (FALSE, MODEST_MARGIN_DEFAULT);
table_update = gtk_table_new (3, 2, FALSE);
/* Connected via */
label = create_label (_("mcen_fi_options_connectiontype"));
- list = _modest_global_settings_dialog_get_connected_via ();
- combo = modest_combo_box_new (list, g_int_equal);
- modest_pair_list_free (list);
+
+ ModestGlobalSettingsDialogPrivate *ppriv =
+ MODEST_GLOBAL_SETTINGS_DIALOG_GET_PRIVATE (self);
+
+ /* Note: This ModestPairList* must exist for as long as the combo
+ * that uses it, because the ModestComboBox uses the ID opaquely,
+ * so it can't know how to manage its memory. */
+ ppriv->connect_via_list = _modest_global_settings_dialog_get_connected_via ();
+ combo = modest_combo_box_new (ppriv->connect_via_list, g_int_equal);
+
add_to_table (GTK_TABLE (table_update), label, combo);
/* Update interval */
label = create_label (_("mcen_fi_options_updateinterval"));
- list = _modest_global_settings_dialog_get_update_interval ();
- combo = modest_combo_box_new (list, g_int_equal);
- modest_pair_list_free (list);
+
+ /* Note: This ModestPairList* must exist for as long as the combo
+ * that uses it, because the ModestComboBox uses the ID opaquely,
+ * so it can't know how to manage its memory. */
+ ppriv->update_interval_list = _modest_global_settings_dialog_get_update_interval ();
+ combo = modest_combo_box_new (ppriv->update_interval_list, g_int_equal);
+
add_to_table (GTK_TABLE (table_update), label, combo);
/* Add to vbox */
{
GtkWidget *vbox, *table;
GtkWidget *label, *check, *combo;
- ModestPairList *list;
vbox = gtk_vbox_new (FALSE, MODEST_MARGIN_DEFAULT);
table = gtk_table_new (2, 2, FALSE);
/* Update interval */
label = create_label (_("mcen_fi_options_messageformat"));
- list = _modest_global_settings_dialog_get_msg_formats ();
- combo = modest_combo_box_new (list, g_int_equal);
- modest_pair_list_free (list);
+
+ ModestGlobalSettingsDialogPrivate *ppriv =
+ MODEST_GLOBAL_SETTINGS_DIALOG_GET_PRIVATE (self);
+
+ /* Note: This ModestPairList* must exist for as long as the combo
+ * that uses it, because the ModestComboBox uses the ID opaquely,
+ * so it can't know how to manage its memory. */
+ ppriv->msg_format_list = _modest_global_settings_dialog_get_msg_formats ();
+ combo = modest_combo_box_new (ppriv->msg_format_list, g_int_equal);
+
add_to_table (GTK_TABLE (table), label, combo);
label = create_label (_("mcen_va_options_include_original_inreply"));
return vbox;
}
+
+static ModestConnectedVia
+current_connection (void)
+{
+ return MODEST_CONNECTED_VIA_ANY;
+}