aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-import-assistant.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-import-assistant.c')
-rw-r--r--widgets/misc/e-import-assistant.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c
index 55ea1bbc62..11059ebf1a 100644
--- a/widgets/misc/e-import-assistant.c
+++ b/widgets/misc/e-import-assistant.c
@@ -33,10 +33,6 @@
#include <e-util/e-extensible.h>
#include <e-util/e-util-private.h>
-#define E_IMPORT_ASSISTANT_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_IMPORT_ASSISTANT, EImportAssistantPrivate))
-
typedef struct _ImportFilePage ImportFilePage;
typedef struct _ImportDestinationPage ImportDestinationPage;
typedef struct _ImportTypePage ImportTypePage;
@@ -147,7 +143,7 @@ filename_changed (GtkWidget *widget,
const gchar *filename;
gint fileok;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->file_page;
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
@@ -219,7 +215,7 @@ filetype_changed_cb (GtkComboBox *combo_box,
GtkTreeModel *model;
GtkTreeIter iter;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
g_return_if_fail (gtk_combo_box_get_active_iter (combo_box, &iter));
@@ -503,7 +499,7 @@ prepare_intelligent_page (GtkAssistant *assistant,
gint row;
ImportSelectionPage *page;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->selection_page;
if (page->target != NULL) {
@@ -604,7 +600,7 @@ import_simple_done (EImport *ei, gpointer user_data)
g_return_if_fail (import_assistant != NULL);
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (import_assistant);
+ priv = import_assistant->priv;
g_return_if_fail (priv != NULL);
g_return_if_fail (priv->fileuris != NULL);
g_return_if_fail (priv->simple_page.target != NULL);
@@ -664,7 +660,7 @@ prepare_file_page (GtkAssistant *assistant,
GtkListStore *store;
ImportFilePage *page;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->file_page;
if (page->target != NULL) {
@@ -727,7 +723,7 @@ prepare_destination_page (GtkAssistant *assistant,
EImportAssistantPrivate *priv;
ImportDestinationPage *page;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->destination_page;
if (page->control)
@@ -754,7 +750,7 @@ prepare_progress_page (GtkAssistant *assistant,
gboolean intelligent_import;
gboolean is_simple = FALSE;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->selection_page;
/* Because we're a GTK_ASSISTANT_PAGE_PROGRESS, this will
@@ -817,7 +813,7 @@ simple_filetype_changed_cb (GtkComboBox *combo_box, GtkAssistant *assistant)
GtkWidget *vbox;
GtkWidget *control;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->simple_page;
g_return_if_fail (gtk_combo_box_get_active_iter (combo_box, &iter));
@@ -860,7 +856,7 @@ prepare_simple_page (GtkAssistant *assistant, GtkWidget *vbox)
ImportSimplePage *page;
gchar *uri;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->simple_page;
g_return_if_fail (priv->fileuris != NULL);
@@ -938,7 +934,7 @@ prepare_simple_destination_page (GtkAssistant *assistant,
ImportDestinationPage *page;
ImportSimplePage *simple_page;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
page = &priv->destination_page;
simple_page = &priv->simple_page;
@@ -999,7 +995,7 @@ set_import_uris (EImportAssistant *assistant, gchar **uris)
g_return_val_if_fail (assistant->priv->import != NULL, FALSE);
g_return_val_if_fail (uris != NULL, FALSE);
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
+ priv = E_IMPORT_ASSISTANT (assistant)->priv;
for (i = 0; uris[i]; i++) {
gchar *uri = uris[i];
@@ -1071,7 +1067,7 @@ import_assistant_dispose (GObject *object)
{
EImportAssistantPrivate *priv;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (object);
+ priv = E_IMPORT_ASSISTANT (object)->priv;
if (priv->file_page.target != NULL) {
e_import_target_free (
@@ -1114,7 +1110,7 @@ import_assistant_finalize (GObject *object)
{
EImportAssistantPrivate *priv;
- priv = E_IMPORT_ASSISTANT_GET_PRIVATE (object);
+ priv = E_IMPORT_ASSISTANT (object)->priv;
g_slist_free (priv->selection_page.importers);
@@ -1130,7 +1126,7 @@ import_assistant_set_property (GObject *object,
{
switch (property_id) {
case PROP_IS_SIMPLE:
- E_IMPORT_ASSISTANT_GET_PRIVATE (object)->is_simple = g_value_get_boolean (value);
+ E_IMPORT_ASSISTANT (object)->priv->is_simple = g_value_get_boolean (value);
return;
}
@@ -1146,7 +1142,7 @@ import_assistant_get_property (GObject *object,
switch (property_id) {
case PROP_IS_SIMPLE:
g_value_set_boolean (value,
- E_IMPORT_ASSISTANT_GET_PRIVATE (object)->is_simple);
+ E_IMPORT_ASSISTANT (object)->priv->is_simple);
return;
}
@@ -1257,9 +1253,6 @@ import_assistant_construct (EImportAssistant *import_assistant)
assistant = GTK_ASSISTANT (import_assistant);
- import_assistant->priv =
- E_IMPORT_ASSISTANT_GET_PRIVATE (import_assistant);
-
import_assistant->priv->import =
e_import_new ("org.gnome.evolution.shell.importer");
@@ -1363,7 +1356,7 @@ import_assistant_construct (EImportAssistant *import_assistant)
static void
e_import_assistant_init (EImportAssistant *import_assistant)
{
- /* do nothing here */
+ import_assistant->priv = G_TYPE_INSTANCE_GET_PRIVATE (import_assistant, E_TYPE_IMPORT_ASSISTANT, EImportAssistantPrivate);
}
GtkWidget *