diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-07-01 02:19:59 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-07-01 02:19:59 +0800 |
commit | 1b1697630caf05f1831f6d9a1dd5e8c3f3def429 (patch) | |
tree | 278d99b4022571dbafacc6f7aa85a8e447d6bc81 /e-util | |
parent | be69a3913cac46922111a87e7e813647573de089 (diff) | |
download | gsoc2013-evolution-1b1697630caf05f1831f6d9a1dd5e8c3f3def429.tar.gz gsoc2013-evolution-1b1697630caf05f1831f6d9a1dd5e8c3f3def429.tar.zst gsoc2013-evolution-1b1697630caf05f1831f6d9a1dd5e8c3f3def429.zip |
Bug 652958 - Evolution Account Assistant jumps steps
The GTK+ patch in bug 653705 is also required for the Account Assistant
to work properly under the new GtkAssistant design in GTK+ 3.1.
This commit only deals with sidebar ordering issues.
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-config.c | 44 | ||||
-rw-r--r-- | e-util/e-config.h | 2 |
2 files changed, 38 insertions, 8 deletions
diff --git a/e-util/e-config.c b/e-util/e-config.c index 2c781cf9da..9242c73fcc 100644 --- a/e-util/e-config.c +++ b/e-util/e-config.c @@ -36,7 +36,15 @@ #define d(x) -typedef GtkWidget * (*EConfigItemSectionFactoryFunc)(EConfig *ec, EConfigItem *, GtkWidget *parent, GtkWidget *old, gpointer data, GtkWidget **real_frame); +typedef GtkWidget * + (*EConfigItemSectionFactoryFunc) + (EConfig *ec, + EConfigItem *item, + GtkWidget *parent, + GtkWidget *old, + gint position, + gpointer data, + GtkWidget **real_frame); struct _EConfigFactory { gchar *id; @@ -83,7 +91,14 @@ struct _EConfigPrivate { GList *finish_pages; }; -static GtkWidget *ech_config_section_factory (EConfig *config, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data, GtkWidget **real_frame); +static GtkWidget * + ech_config_section_factory (EConfig *config, + EConfigItem *item, + GtkWidget *parent, + GtkWidget *old, + gint position, + gpointer data, + GtkWidget **real_frame); G_DEFINE_TYPE ( EConfig, @@ -624,7 +639,9 @@ ec_rebuild (EConfig *emp) break; } if (item->factory) { - root = item->factory (emp, item, NULL, wn->widget, wn->context->data); + root = item->factory ( + emp, item, NULL, wn->widget, + 0, wn->context->data); } else if (item->type == E_CONFIG_BOOK) { root = gtk_notebook_new (); gtk_widget_show (root); @@ -685,7 +702,9 @@ ec_rebuild (EConfig *emp) if (wn->widget == NULL) { if (item->factory) { - page = item->factory (emp, item, root, wn->frame, wn->context->data); + page = item->factory ( + emp, item, root, wn->frame, + pageno, wn->context->data); } else { page = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (page), 12); @@ -753,7 +772,9 @@ ec_rebuild (EConfig *emp) } if (item->factory) { - page = item->factory (emp, item, root, wn->frame, wn->context->data); + page = item->factory ( + emp, item, root, wn->frame, + pageno, wn->context->data); if (emp->type == E_CONFIG_ASSISTANT) { wn->frame = page; } else { @@ -832,7 +853,9 @@ ec_rebuild (EConfig *emp) */ EConfigItemSectionFactoryFunc factory = (EConfigItemSectionFactoryFunc) item->factory; - section = factory (emp, item, page, wn->widget, wn->context->data, &wn->real_frame); + section = factory ( + emp, item, page, wn->widget, 0, + wn->context->data, &wn->real_frame); wn->frame = section; if (section) itemno = 1; @@ -927,7 +950,9 @@ ec_rebuild (EConfig *emp) || (item->type == E_CONFIG_ITEM_TABLE && !GTK_IS_TABLE (section))) g_warning("EConfig item parent type is incorrect: %s", item->path); else if (item->factory) - w = item->factory (emp, item, section, wn->widget, wn->context->data); + w = item->factory ( + emp, item, section, wn->widget, + 0, wn->context->data); d(printf("item %d:%s widget %p\n", itemno, item->path, w)); @@ -1653,6 +1678,7 @@ ech_config_widget_factory (EConfig *config, EConfigItem *item, GtkWidget *parent, GtkWidget *old, + gint position, gpointer data) { struct _EConfigHookGroup *group = data; @@ -1664,6 +1690,7 @@ ech_config_widget_factory (EConfig *config, factory_data.target = config->target; factory_data.parent = parent; factory_data.old = old; + factory_data.position = position; plugin = group->hook->hook.plugin; return e_plugin_invoke (plugin, item->user_data, &factory_data); @@ -1674,8 +1701,9 @@ ech_config_section_factory (EConfig *config, EConfigItem *item, GtkWidget *parent, GtkWidget *old, + gint position, gpointer data, - GtkWidget **real_frame) + GtkWidget **real_frame) { struct _EConfigHookGroup *group = data; GtkWidget *label = NULL; diff --git a/e-util/e-config.h b/e-util/e-config.h index 5019acde00..338824ec95 100644 --- a/e-util/e-config.h +++ b/e-util/e-config.h @@ -74,6 +74,7 @@ typedef GtkWidget * EConfigItem *item, GtkWidget *parent, GtkWidget *old, + gint position, gpointer data); /* ok so this is all a bit bogussy @@ -328,6 +329,7 @@ struct _EConfigHookItemFactoryData { EConfigTarget *target; GtkWidget *parent; GtkWidget *old; + gint position; }; /** |