After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 567260 - Migrate from GnomeDruid to GtkAssistant
Migrate from GnomeDruid to GtkAssistant
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.28.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
evolution[cleanup] evolution[kill-bon...
Depends on:
Blocks: 580887 589153
 
 
Reported: 2009-01-10 15:37 UTC by André Klapper
Modified: 2013-09-13 01:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed evo (kb) patch (part 1) (22.82 KB, patch)
2009-08-13 17:14 UTC, Milan Crha
committed Details | Review
proposed evo (kb) patch (part 2 - final) (72.48 KB, patch)
2009-08-18 13:31 UTC, Milan Crha
none Details | Review

Description André Klapper 2009-01-10 15:37:49 UTC
See
http://www.mail-archive.com/evolution-hackers@gnome.org/msg01635.html
http://library.gnome.org/devel/gtk/stable/gtk-migrating-GtkAssistant.html
http://live.gnome.org/LibgnomeMustDie


$:andre\> grep -r gnome_druid .

./plugins/backup-restore/backup-restore.c:

gnome_druid_set_show_finish (druid, state);
gnome_druid_set_buttons_sensitive (druid, TRUE, FALSE, TRUE, TRUE);
gnome_druid_set_buttons_sensitive (druid, TRUE, TRUE, TRUE, TRUE);
gnome_druid_set_buttons_sensitive (druid, TRUE, TRUE, TRUE, TRUE);
gnome_druid_set_buttons_sensitive (druid, TRUE, FALSE, TRUE, TRUE);
page = gnome_druid_page_standard_new_with_vals (_("Restore from backup"), NULL, NULL);
gnome_druid_append_page (GNOME_DRUID (hook_data->parent), GNOME_DRUID_PAGE (page));

./plugins/startup-wizard/startup-wizard.c:

gnome_druid_page_edge_set_title (start_page, _("Welcome"));
gnome_druid_page_edge_set_text (start_page, _(""
page = gnome_druid_page_standard_new_with_vals (_("Timezone"), NULL, NULL);
gnome_druid_append_page (GNOME_DRUID (hook_data->parent), GNOME_DRUID_PAGE (page));
page = gnome_druid_page_standard_new_with_vals (_("Importing files"), NULL, NULL);
gnome_druid_append_page (GNOME_DRUID (hook_data->parent), GNOME_DRUID_PAGE (page));

./plugins/groupwise-features/install-shared.c:	

title_page = GNOME_DRUID_PAGE_EDGE (gnome_druid_page_edge_new_with_vals(GNOME_EDGE_START, TRUE, _("Install the shared folder"), start_message, NULL, NULL, NULL));
wizard = GNOME_DRUID (gnome_druid_new_with_window (_("Shared Folder Installation"), NULL, TRUE, (GtkWidget**)(&window)));
gnome_druid_append_page(wizard, GNOME_DRUID_PAGE(title_page));

./e-util/e-config.c:	

gnome_druid_set_page((GnomeDruid *)ec->widget, (GnomeDruidPage *)wn->frame);
gnome_druid_set_page((GnomeDruid *)ec->widget, (GnomeDruidPage *)wn->frame);
root = druid = gnome_druid_new();
page = gnome_druid_page_edge_new(item->type == E_CONFIG_PAGE_START?GNOME_EDGE_START:GNOME_EDGE_FINISH);
gnome_druid_page_edge_set_title((GnomeDruidPageEdge *)page, translated_label);
gnome_druid_insert_page((GnomeDruid *)druid, pagenode?(GnomeDruidPage *)pagenode->frame:NULL, (GnomeDruidPage *)page);
w = gnome_druid_page_standard_new();
gnome_druid_page_standard_set_title((GnomeDruidPageStandard *)w, translated_label);
gnome_druid_insert_page((GnomeDruid *)druid, pagenode?(GnomeDruidPage *)pagenode->frame:NULL, (GnomeDruidPage *)w);
gnome_druid_set_page((GnomeDruid *)emp->widget, (GnomeDruidPage *)emp->priv->druid_page->frame);
gnome_druid_set_page((GnomeDruid *)emp->widget, (GnomeDruidPage *)emp->priv->druid_page->frame);


./shell/e-shell-importer.c:

gnome_druid_set_buttons_sensitive(GNOME_DRUID (data->druid), TRUE, fileok, TRUE, FALSE);
gnome_druid_set_buttons_sensitive(druid, TRUE, FALSE, TRUE, FALSE);
gnome_druid_set_page (druid, GNOME_DRUID_PAGE (data->finish));
gnome_druid_set_page (druid, GNOME_DRUID_PAGE (data->intelligent));
gnome_druid_set_page (druid, GNOME_DRUID_PAGE (data->filedialog));
gnome_druid_set_page (druid, GNOME_DRUID_PAGE (data->intelligent));
gnome_druid_set_page (druid, GNOME_DRUID_PAGE (data->destdialog));
gnome_druid_set_page (druid, GNOME_DRUID_PAGE (data->typedialog));
gnome_druid_page_edge_set_logo (data->start, icon);
gnome_druid_page_standard_set_logo (GNOME_DRUID_PAGE_STANDARD (data->typedialog), icon);
gnome_druid_page_standard_set_logo (GNOME_DRUID_PAGE_STANDARD (data->intelligent), icon);
gnome_druid_page_standard_set_logo (GNOME_DRUID_PAGE_STANDARD (data->filedialog), icon);
gnome_druid_page_edge_set_logo (data->finish, icon);

./mail/em-account-editor.c:

gnome_druid_append_page((GnomeDruid *)parent, (GnomeDruidPage *)page);
gnome_druid_append_page((GnomeDruid *)parent, (GnomeDruidPage *)page);
gnome_druid_append_page((GnomeDruid *)parent, (GnomeDruidPage *)page);
gnome_druid_append_page((GnomeDruid *)parent, (GnomeDruidPage *)page);
gnome_druid_append_page((GnomeDruid *)parent, (GnomeDruidPage *)w);
Comment 1 Sébastien Granjoux 2009-01-11 21:44:01 UTC
I have done this in Anjuta. It was not very easy as each page is generated dynamically based on the user inputs on all previous pages.

The best solution that I have found is to add a progress page between each page of the wizard. Then move the work done in the "next" handler of GnomeDruid in the "prepare" handler of these additional progress page. I have removed all work done in the "back" handler of GnomeDruid.



Comment 2 André Klapper 2009-04-30 15:06:47 UTC
and to cover my grep's for headers:

./e-util/e-import.c: #include <libgnomeui/gnome-druid.h>
./e-util/e-import.c: #include <libgnomeui/gnome-druid-page-standard.h>
./e-util/e-import.c: #include <libgnomeui/gnome-druid-page-edge.h>
./e-util/e-config.c: #include <libgnomeui/gnome-druid.h>
./e-util/e-config.c: #include <libgnomeui/gnome-druid-page-standard.h>
./e-util/e-config.c: #include <libgnomeui/gnome-druid-page-edge.h>
./shell/e-shell-importer.c: #include <libgnomeui/gnome-druid.h>
./shell/e-shell-importer.c: #include <libgnomeui/gnome-druid-page-edge.h>
./shell/e-shell-importer.c: #include <libgnomeui/gnome-druid-page-standard.h>
Comment 3 André Klapper 2009-04-30 15:09:47 UTC
garr. someone shot me. plus:

./mail/em-account-editor.c:#include <libgnomeui/gnome-druid.h>
./mail/em-account-editor.c:#include <libgnomeui/gnome-druid-page-standard.h>
Comment 4 André Klapper 2009-05-18 12:25:43 UTC
abharath, chen said you might work on this?
Comment 6 Matthew Barnes 2009-07-23 15:27:24 UTC
Would prefer this be done on the kill-bonobo branch, or else after it's merged.

Note, this has to happen before the GtkBuilder migration.  See bug #589153 comment #2.
Comment 7 André Klapper 2009-08-13 12:07:45 UTC
So, to have this completely listed once again:

$:andre\> grep -r "include <libgnomeui/gnome-druid" .

./plugins/backup-restore/backup-restore.c:#include <libgnomeui/gnome-druid.h>
./plugins/backup-restore/backup-restore.c:#include <libgnomeui/gnome-druid-page-standard.h>

./plugins/startup-wizard/startup-wizard.c:#include <libgnomeui/gnome-druid.h>
./plugins/startup-wizard/startup-wizard.c:#include <libgnomeui/gnome-druid-page-edge.h>
./plugins/startup-wizard/startup-wizard.c:#include <libgnomeui/gnome-druid-page-standard.h>

./plugins/groupwise-features/install-shared.c:#include <libgnomeui/gnome-druid.h>
./plugins/groupwise-features/install-shared.c:#include <libgnomeui/gnome-druid-page-edge.h>

./e-util/e-import.c:#include <libgnomeui/gnome-druid.h>
./e-util/e-import.c:#include <libgnomeui/gnome-druid-page-standard.h>
./e-util/e-import.c:#include <libgnomeui/gnome-druid-page-edge.h>

./e-util/e-config.c:#include <libgnomeui/gnome-druid.h>
./e-util/e-config.c:#include <libgnomeui/gnome-druid-page-standard.h>
./e-util/e-config.c:#include <libgnomeui/gnome-druid-page-edge.h>

./shell/e-shell-importer.c:#include <libgnomeui/gnome-druid.h>
./shell/e-shell-importer.c:#include <libgnomeui/gnome-druid-page-edge.h>
./shell/e-shell-importer.c:#include <libgnomeui/gnome-druid-page-standard.h>

./mail/em-account-editor.c:#include <libgnomeui/gnome-druid.h>
./mail/em-account-editor.c:#include <libgnomeui/gnome-druid-page-standard.h>
Comment 8 Milan Crha 2009-08-13 17:14:10 UTC
Created attachment 140679 [details] [review]
proposed evo (kb) patch (part 1)

for evolution (kill-bonobo);

the easy parts, shell/e-shell-importer.c, plugins/groupwise-features/install-shared.c, e-util/e-import.c done. The groupwise part I couldn't test, because it seems to be disabled and moreover I do not have groupwise. I hope someone having it will finish it. Note I dropped import.glade.

There lefts all related to EConfig, thus:
e-util/e-config.c
mail/em-account-editor.c
plugins/backup-restore/backup-restore.c
plugins/startup-wizard/startup-wizard.c

I plan to remove the druid widget from mail-config.glade, mainly because it's hard to edit in glade editor, and, of course, because it contains only two widgets per page, which doesn't worth it to maintain in a glade. Or do you think it's a wrong idea?
Comment 9 Matthew Barnes 2009-08-13 17:23:58 UTC
(In reply to comment #8)
> I plan to remove the druid widget from mail-config.glade, mainly because it's
> hard to edit in glade editor, and, of course, because it contains only two
> widgets per page, which doesn't worth it to maintain in a glade. Or do you
> think it's a wrong idea?

+1!  I think your approach is spot on and I'm happy to see import.glade killed.

I'll get this merged into kill-bonobo asap.
Comment 10 Matthew Barnes 2009-08-13 22:54:23 UTC
Patch looks peachy.  Importer works fine with a couple nitpicks: assistant window should not have a title and should be centered over the main window.  But we can address that in part 2.

Committed to kill-bonobo:
http://git.gnome.org/cgit/evolution/commit/?h=kill-bonobo&id=260c0c8e1eabeefd3d364f62114b4aa8d2b0028e
Comment 11 Milan Crha 2009-08-18 13:31:47 UTC
Created attachment 141080 [details] [review]
proposed evo (kb) patch (part 2 - final)

for evolution (kill-bonobo);

final patch, removes all the "druid" words from sources.
Comment 12 Matthew Barnes 2009-08-18 14:05:30 UTC
Awesome!  Patch applies and compiles cleanly, and I assume it basically works.  I'm going to commit this now since GnomeDruid is blocking so many other things.  If there's issues we can fix them as we find them.

http://git.gnome.org/cgit/evolution/commit/?h=kill-bonobo&id=de528db6c18b7ecee83bb8b52850d935c1244ebf

Nice work!