From dadaff5f784e9dba84b90b6821eb1a5e41c11846 Mon Sep 17 00:00:00 2001 From: Andy Hertzfeld Date: Mon, 12 Mar 2001 07:35:37 +0000 Subject: merged to create post-1_0_7 branch merged to create post-1_0_7 branch --- ChangeLog | 19733 ++++++++++++++++++- Makefile.am | 1 - applets/Makefile.am | 1 - components/Makefile.am | 1 + components/rss-control/.cvsignore | 5 + components/rss-control/Makefile.am | 45 + components/rss-control/main.c | 120 + components/rss-control/nautilus-rss-control.c | 785 + components/rss-control/nautilus-rss-control.h | 54 + .../rss-control/nautilus-rss-control.oafinfo | 20 + .../install-view/nautilus-service-install.c | 229 + .../install-view/nautilus-service-install.h | 33 + .../services/install/lib/eazel-install-logic.c | 2090 ++ .../services/install/lib/eazel-install-logic.h | 51 + .../services/install/lib/eazel-install-rpm-glue.c | 470 + .../services/install/lib/eazel-install-rpm-glue.h | 50 + .../services/install/nautilus-view/.cvsignore | 6 + .../services/install/nautilus-view/Makefile.am | 64 + .../nautilus-view/Nautilus_View_install.oaf.in | 25 + .../services/install/nautilus-view/callbacks.c | 662 + .../services/install/nautilus-view/callbacks.h | 53 + components/services/install/nautilus-view/forms.c | 483 + components/services/install/nautilus-view/forms.h | 36 + components/services/install/nautilus-view/main.c | 116 + .../nautilus-view/nautilus-service-install-view.c | 858 + .../nautilus-view/nautilus-service-install-view.h | 156 + .../nautilus-view/nautilus-service-install.c | 229 + .../nautilus-view/nautilus-service-install.h | 33 + .../nautilus-inventory-config-page.h | 57 + .../icons/eazel-cloud-logo.png | Bin 0 -> 17676 bytes .../icons/eazel-services-logo.png | Bin 0 -> 14329 bytes .../icons/service-summary-logo-top.png | Bin 0 -> 8455 bytes .../icons/startup-logo.png | Bin 0 -> 11757 bytes .../shared-service-widgets.c | 212 - components/services/summary/lib/.cvsignore | 4 + components/services/summary/lib/Makefile.am | 21 + .../services/summary/lib/eazel-summary-shared.c | 326 + .../services/summary/lib/eazel-summary-shared.h | 70 + .../services/summary/nautilus-view/.cvsignore | 6 + .../services/summary/nautilus-view/Makefile.am | 64 + .../Nautilus_View_services-summary.oaf.in | 25 + .../summary/nautilus-view/icons/.cvsignore | 2 + .../summary/nautilus-view/icons/Makefile.am | 3 + .../nautilus-view/icons/gray_tab_pieces/.cvsignore | 2 + .../icons/gray_tab_pieces/Makefile.am | 22 + .../icons/gray_tab_pieces/active-fill.png | Bin 0 -> 416 bytes .../gray_tab_pieces/active-inactive-bridge.png | Bin 0 -> 937 bytes .../icons/gray_tab_pieces/active-left-bumper.png | Bin 0 -> 438 bytes .../gray_tab_pieces/active-prelight-bridge.png | Bin 0 -> 964 bytes .../icons/gray_tab_pieces/active-right-bumper.png | Bin 0 -> 918 bytes .../icons/gray_tab_pieces/fill-background.png | Bin 0 -> 368 bytes .../gray_tab_pieces/inactive-active-bridge.png | Bin 0 -> 745 bytes .../icons/gray_tab_pieces/inactive-fill.png | Bin 0 -> 421 bytes .../icons/gray_tab_pieces/inactive-left-bumper.png | Bin 0 -> 424 bytes .../gray_tab_pieces/inactive-right-bumper.png | Bin 0 -> 886 bytes .../gray_tab_pieces/prelight-active-bridge.png | Bin 0 -> 742 bytes .../icons/gray_tab_pieces/prelight-fill.png | Bin 0 -> 419 bytes .../icons/gray_tab_pieces/prelight-left-bumper.png | Bin 0 -> 414 bytes .../gray_tab_pieces/prelight-right-bumper.png | Bin 0 -> 887 bytes components/services/summary/nautilus-view/main.c | 118 + .../nautilus-view/nautilus-summary-callbacks.c | 321 + .../nautilus-view/nautilus-summary-callbacks.h | 40 + .../nautilus-view/nautilus-summary-dialogs.c | 276 + .../nautilus-view/nautilus-summary-dialogs.h | 36 + .../nautilus-view/nautilus-summary-footer.c | 111 + .../nautilus-view/nautilus-summary-footer.h | 31 + .../nautilus-view/nautilus-summary-menu-items.c | 187 + .../nautilus-view/nautilus-summary-menu-items.h | 33 + .../nautilus-view/nautilus-summary-view-private.h | 144 + .../nautilus-view/nautilus-summary-view-ui.xml | 26 + .../summary/nautilus-view/nautilus-summary-view.c | 912 + .../summary/nautilus-view/nautilus-summary-view.h | 60 + .../services/summary/nautilus-view/tests/README | 7 + .../summary/nautilus-view/tests/redirects.xml | 56 + .../summary/nautilus-view/tests/services.xml | 330 + components/services/vault/.cvsignore | 2 + components/services/vault/Makefile.am | 1 + components/services/vault/command-line/.cvsignore | 5 + components/services/vault/command-line/Makefile.am | 34 + components/services/vault/command-line/main.c | 129 + .../services/vault/command-line/vault-operations.c | 251 + .../services/vault/command-line/vault-operations.h | 36 + components/text/services/english_to_french.xml | 2 + components/text/services/french_to_english.xml | 3 + components/throbber/nautilus-throbber.c | 17 +- components/vcard/.cvsignore | 5 + components/vcard/Makefile.am | 48 + components/vcard/main.c | 120 + components/vcard/nautilus-vcard.c | 578 + components/vcard/nautilus-vcard.h | 54 + components/vcard/nautilus-vcard.oaf | 20 + components/vcard/vcard.c | 276 + components/vcard/vcard.h | 15 + configure.in | 2 + data/emblems/secret.png | Bin 0 -> 1659 bytes data/emblems/shared.png | Bin 0 -> 2353 bytes data/top/.cvsignore | 2 + data/top/.nautilus-metafile.xml | 8 + data/top/Clock | 3 + data/top/Computer | 2 + data/top/Makefile.am | 13 + data/top/Services | 2 + data/top/Slashdot | 3 + icons/Makefile.am | 2 + icons/crux_eggplant/i-regular-192-aa.png | Bin 0 -> 31156 bytes icons/crux_eggplant/i-regular-192.png | Bin 0 -> 27843 bytes icons/crux_eggplant/i-regular-72-aa.png | Bin 0 -> 5302 bytes icons/crux_eggplant/i-regular-72.png | Bin 0 -> 4920 bytes icons/crux_eggplant/i-regular-96-aa.png | Bin 0 -> 8862 bytes icons/crux_eggplant/i-regular-96.png | Bin 0 -> 7994 bytes icons/crux_eggplant/i-regular-aa.png | Bin 0 -> 3046 bytes icons/crux_eggplant/i-regular.png | Bin 0 -> 2810 bytes icons/eazel-logo.gif | Bin 0 -> 1438 bytes icons/emblem-note.png | Bin 0 -> 826 bytes icons/emblem-secret.svg | 31 + icons/emblem-shared.svg | 36 + icons/hand.svg | 22 + icons/i-directory-192.png | Bin 0 -> 23258 bytes icons/nautilus-logo.png | Bin 0 -> 7615 bytes libnautilus-extensions/Makefile.am | 2 + .../bug-5712-pr3-workaround--gdk-pixbuf-drawable.c | 1196 ++ .../bug-5712-pr3-workaround--gdk-pixbuf-private.h | 109 + .../bug-5712-pr3-workaround--gdkimage.c | 133 + libnautilus-extensions/nautilus-annotation.c | 897 + libnautilus-extensions/nautilus-annotation.h | 38 + libnautilus-extensions/nautilus-file-utilities.c | 2 +- libnautilus-extensions/nautilus-file.c | 6 + libnautilus-extensions/nautilus-file.h | 1 + libnautilus-extensions/nautilus-icon-canvas-item.c | 386 +- libnautilus-extensions/nautilus-icon-canvas-item.h | 4 + libnautilus-extensions/nautilus-icon-container.c | 34 +- libnautilus-extensions/nautilus-icon-container.h | 4 + libnautilus-extensions/nautilus-icon-dnd.c | 1 + libnautilus-extensions/nautilus-labeled-image.c | 3 +- libnautilus-extensions/nautilus-link.c | 29 + libnautilus-extensions/nautilus-link.h | 11 +- libnautilus-extensions/nautilus-metadata.h | 6 + libnautilus-extensions/nautilus-text-layout.c | 349 + libnautilus-extensions/nautilus-text-layout.h | 84 + libnautilus-private/Makefile.am | 2 + .../bug-5712-pr3-workaround--gdk-pixbuf-drawable.c | 1196 ++ .../bug-5712-pr3-workaround--gdk-pixbuf-private.h | 109 + .../bug-5712-pr3-workaround--gdkimage.c | 133 + libnautilus-private/nautilus-annotation.c | 897 + libnautilus-private/nautilus-annotation.h | 38 + libnautilus-private/nautilus-file-utilities.c | 2 +- libnautilus-private/nautilus-file.c | 6 + libnautilus-private/nautilus-file.h | 1 + libnautilus-private/nautilus-icon-canvas-item.c | 386 +- libnautilus-private/nautilus-icon-canvas-item.h | 4 + libnautilus-private/nautilus-icon-container.c | 34 +- libnautilus-private/nautilus-icon-container.h | 4 + libnautilus-private/nautilus-icon-dnd.c | 1 + libnautilus-private/nautilus-labeled-image.c | 3 +- libnautilus-private/nautilus-link.c | 29 + libnautilus-private/nautilus-link.h | 11 +- libnautilus-private/nautilus-metadata.h | 6 + libnautilus-private/nautilus-text-layout.c | 349 + libnautilus-private/nautilus-text-layout.h | 84 + nautilus-clean.sh | 1 + src/file-manager/fm-icon-view.c | 45 +- src/nautilus-information-panel.c | 7 +- src/nautilus-property-browser.c | 2 + src/nautilus-sidebar-tabs.c | 6 +- src/nautilus-sidebar.c | 7 +- user-guide/C/Makefile.am | 42 + user-guide/C/html/.cvsignore | 2 + user-guide/C/html/license.html | 153 + user-guide/C/img/.cvsignore | 1 + user-guide/C/img/ch1-README.png | Bin 0 -> 119577 bytes user-guide/C/img/ch1-cnn.png | Bin 0 -> 174186 bytes user-guide/C/img/ch1-complex-search.png | Bin 0 -> 49108 bytes user-guide/C/img/ch1-connect.png | Bin 0 -> 18939 bytes user-guide/C/img/ch1-duplicate.png | Bin 0 -> 154111 bytes user-guide/C/img/ch1-google.png | Bin 0 -> 96233 bytes user-guide/C/img/ch1-hardware.png | Bin 0 -> 84681 bytes user-guide/C/img/ch1-history.png | Bin 0 -> 72471 bytes user-guide/C/img/ch1-home-john.png | Bin 0 -> 124870 bytes user-guide/C/img/ch1-home.png | Bin 0 -> 129031 bytes user-guide/C/img/ch1-icon-view-150.png | Bin 0 -> 125218 bytes user-guide/C/img/ch1-icon-view-demo.png | Bin 0 -> 130976 bytes user-guide/C/img/ch1-inadequate-permissions.png | Bin 0 -> 15207 bytes user-guide/C/img/ch1-list-mydoc.png | Bin 0 -> 110013 bytes user-guide/C/img/ch1-music-control.png | Bin 0 -> 4792 bytes user-guide/C/img/ch1-nautiluslogo.png | Bin 0 -> 4244 bytes user-guide/C/img/ch1-new-window.png | Bin 0 -> 36529 bytes user-guide/C/img/ch1-open-with.png | Bin 0 -> 205122 bytes user-guide/C/img/ch1-panel.png | Bin 0 -> 20041 bytes user-guide/C/img/ch1-permissions.png | Bin 0 -> 26911 bytes user-guide/C/img/ch1-pluck.png | Bin 0 -> 163565 bytes user-guide/C/img/ch1-samba.png | Bin 0 -> 160090 bytes user-guide/C/img/ch1-slash.png | Bin 0 -> 145539 bytes user-guide/C/img/ch1-toolbar.png | Bin 0 -> 6088 bytes user-guide/C/img/ch1-toshiba.png | Bin 0 -> 18399 bytes user-guide/C/img/ch1-tree-demo.png | Bin 0 -> 156422 bytes user-guide/C/img/ch1-tree-doc-1.png | Bin 0 -> 174168 bytes user-guide/C/img/ch1-tree-doc.png | Bin 0 -> 158252 bytes user-guide/C/img/ch1-tree-etc.png | Bin 0 -> 26545 bytes user-guide/C/img/ch1-tree-slash.png | Bin 0 -> 2698 bytes user-guide/C/img/ch1-view-as.png | Bin 0 -> 1574 bytes user-guide/C/img/ch1-zoom-control.png | Bin 0 -> 1654 bytes user-guide/C/img/ch2-colors.png | Bin 0 -> 145709 bytes user-guide/C/img/ch2-edit-settings-folder.png | Bin 0 -> 33687 bytes user-guide/C/img/ch2-emblems.png | Bin 0 -> 122468 bytes user-guide/C/img/ch2-home-john-mydoc.png | Bin 0 -> 148727 bytes user-guide/C/img/ch2-icon-captions-alone.png | Bin 0 -> 14479 bytes user-guide/C/img/ch2-icon-captions.png | Bin 0 -> 139790 bytes user-guide/C/img/ch2-john.png | Bin 0 -> 137277 bytes user-guide/C/img/ch2-music.png | Bin 0 -> 132645 bytes user-guide/C/img/ch2-open-with-other.png | Bin 0 -> 26672 bytes user-guide/C/img/ch2-open-with.png | Bin 0 -> 92139 bytes user-guide/C/img/ch2-photos-john.png | Bin 0 -> 142465 bytes user-guide/C/img/ch2-right-click-open-with.png | Bin 0 -> 135051 bytes user-guide/C/img/ch2-search-settings.png | Bin 0 -> 28518 bytes user-guide/C/img/ch2-ski-intermediate-menu.png | Bin 0 -> 26286 bytes user-guide/C/img/ch2-theme-eazel.png | Bin 0 -> 188706 bytes user-guide/C/img/ch2-view-layout-menu.png | Bin 0 -> 139166 bytes user-guide/C/img/ch3-account-info.png | Bin 0 -> 65498 bytes user-guide/C/img/ch3-online-storage.png | Bin 0 -> 61404 bytes user-guide/C/img/ch3-package-titles.png | Bin 0 -> 114425 bytes user-guide/C/img/ch3-sign-up.png | Bin 0 -> 92486 bytes user-guide/C/img/ch3-welcome-screen.png | Bin 0 -> 63525 bytes user-guide/C/img/custicon.png | Bin 0 -> 129045 bytes user-guide/C/img/full.png | Bin 0 -> 29947 bytes user-guide/C/img/install-update.png | Bin 0 -> 99687 bytes user-guide/C/img/install-user-level.png | Bin 0 -> 132892 bytes user-guide/C/img/locbar.png | Bin 0 -> 2990 bytes user-guide/C/img/player.png | Bin 0 -> 2346 bytes user-guide/C/img/prefmenu.png | Bin 0 -> 3359 bytes user-guide/C/img/sidebar.png | Bin 0 -> 38574 bytes user-guide/C/img/viewmenu.png | Bin 0 -> 10021 bytes user-guide/C/nautilus-C.omf | 14 + user-guide/C/sgml/.cvsignore | 1 + user-guide/C/sgml/chapter-1.sgml | 995 + user-guide/C/sgml/chapter-2.sgml | 475 + user-guide/C/sgml/chapter-3.sgml | 226 + user-guide/C/sgml/fdl.sgml | 647 + user-guide/C/sgml/install.sgml | 190 + user-guide/C/sgml/intro.sgml | 144 + user-guide/C/sgml/model.sgml | 39 + user-guide/C/sgml/nautilus.sgml | 1086 + 241 files changed, 41967 insertions(+), 339 deletions(-) create mode 100644 components/rss-control/.cvsignore create mode 100644 components/rss-control/Makefile.am create mode 100644 components/rss-control/main.c create mode 100644 components/rss-control/nautilus-rss-control.c create mode 100644 components/rss-control/nautilus-rss-control.h create mode 100644 components/rss-control/nautilus-rss-control.oafinfo create mode 100644 components/services/install-view/nautilus-service-install.c create mode 100644 components/services/install-view/nautilus-service-install.h create mode 100644 components/services/install/lib/eazel-install-logic.c create mode 100644 components/services/install/lib/eazel-install-logic.h create mode 100644 components/services/install/lib/eazel-install-rpm-glue.c create mode 100644 components/services/install/lib/eazel-install-rpm-glue.h create mode 100644 components/services/install/nautilus-view/.cvsignore create mode 100644 components/services/install/nautilus-view/Makefile.am create mode 100644 components/services/install/nautilus-view/Nautilus_View_install.oaf.in create mode 100644 components/services/install/nautilus-view/callbacks.c create mode 100644 components/services/install/nautilus-view/callbacks.h create mode 100644 components/services/install/nautilus-view/forms.c create mode 100644 components/services/install/nautilus-view/forms.h create mode 100644 components/services/install/nautilus-view/main.c create mode 100644 components/services/install/nautilus-view/nautilus-service-install-view.c create mode 100644 components/services/install/nautilus-view/nautilus-service-install-view.h create mode 100644 components/services/install/nautilus-view/nautilus-service-install.c create mode 100644 components/services/install/nautilus-view/nautilus-service-install.h create mode 100644 components/services/inventory-view/nautilus-inventory-config-page.h create mode 100644 components/services/nautilus-dependent-shared/icons/eazel-cloud-logo.png create mode 100644 components/services/nautilus-dependent-shared/icons/eazel-services-logo.png create mode 100644 components/services/nautilus-dependent-shared/icons/service-summary-logo-top.png create mode 100644 components/services/nautilus-dependent-shared/icons/startup-logo.png delete mode 100644 components/services/nautilus-dependent-shared/shared-service-widgets.c create mode 100644 components/services/summary/lib/.cvsignore create mode 100644 components/services/summary/lib/Makefile.am create mode 100644 components/services/summary/lib/eazel-summary-shared.c create mode 100644 components/services/summary/lib/eazel-summary-shared.h create mode 100644 components/services/summary/nautilus-view/.cvsignore create mode 100644 components/services/summary/nautilus-view/Makefile.am create mode 100644 components/services/summary/nautilus-view/Nautilus_View_services-summary.oaf.in create mode 100644 components/services/summary/nautilus-view/icons/.cvsignore create mode 100644 components/services/summary/nautilus-view/icons/Makefile.am create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/.cvsignore create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/Makefile.am create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/active-fill.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/active-inactive-bridge.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/active-left-bumper.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/active-prelight-bridge.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/active-right-bumper.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/fill-background.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-active-bridge.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-fill.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-left-bumper.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-right-bumper.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-active-bridge.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-fill.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-left-bumper.png create mode 100644 components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-right-bumper.png create mode 100644 components/services/summary/nautilus-view/main.c create mode 100644 components/services/summary/nautilus-view/nautilus-summary-callbacks.c create mode 100644 components/services/summary/nautilus-view/nautilus-summary-callbacks.h create mode 100644 components/services/summary/nautilus-view/nautilus-summary-dialogs.c create mode 100644 components/services/summary/nautilus-view/nautilus-summary-dialogs.h create mode 100644 components/services/summary/nautilus-view/nautilus-summary-footer.c create mode 100644 components/services/summary/nautilus-view/nautilus-summary-footer.h create mode 100644 components/services/summary/nautilus-view/nautilus-summary-menu-items.c create mode 100644 components/services/summary/nautilus-view/nautilus-summary-menu-items.h create mode 100644 components/services/summary/nautilus-view/nautilus-summary-view-private.h create mode 100644 components/services/summary/nautilus-view/nautilus-summary-view-ui.xml create mode 100644 components/services/summary/nautilus-view/nautilus-summary-view.c create mode 100644 components/services/summary/nautilus-view/nautilus-summary-view.h create mode 100644 components/services/summary/nautilus-view/tests/README create mode 100644 components/services/summary/nautilus-view/tests/redirects.xml create mode 100644 components/services/summary/nautilus-view/tests/services.xml create mode 100644 components/services/vault/.cvsignore create mode 100644 components/services/vault/Makefile.am create mode 100644 components/services/vault/command-line/.cvsignore create mode 100644 components/services/vault/command-line/Makefile.am create mode 100644 components/services/vault/command-line/main.c create mode 100644 components/services/vault/command-line/vault-operations.c create mode 100644 components/services/vault/command-line/vault-operations.h create mode 100644 components/text/services/english_to_french.xml create mode 100644 components/text/services/french_to_english.xml create mode 100644 components/vcard/.cvsignore create mode 100644 components/vcard/Makefile.am create mode 100644 components/vcard/main.c create mode 100644 components/vcard/nautilus-vcard.c create mode 100644 components/vcard/nautilus-vcard.h create mode 100644 components/vcard/nautilus-vcard.oaf create mode 100644 components/vcard/vcard.c create mode 100644 components/vcard/vcard.h create mode 100644 data/emblems/secret.png create mode 100644 data/emblems/shared.png create mode 100644 data/top/.cvsignore create mode 100644 data/top/.nautilus-metafile.xml create mode 100644 data/top/Clock create mode 100644 data/top/Computer create mode 100644 data/top/Makefile.am create mode 100644 data/top/Services create mode 100644 data/top/Slashdot create mode 100644 icons/crux_eggplant/i-regular-192-aa.png create mode 100644 icons/crux_eggplant/i-regular-192.png create mode 100644 icons/crux_eggplant/i-regular-72-aa.png create mode 100644 icons/crux_eggplant/i-regular-72.png create mode 100644 icons/crux_eggplant/i-regular-96-aa.png create mode 100644 icons/crux_eggplant/i-regular-96.png create mode 100644 icons/crux_eggplant/i-regular-aa.png create mode 100644 icons/crux_eggplant/i-regular.png create mode 100644 icons/eazel-logo.gif create mode 100644 icons/emblem-note.png create mode 100644 icons/emblem-secret.svg create mode 100644 icons/emblem-shared.svg create mode 100644 icons/hand.svg create mode 100644 icons/i-directory-192.png create mode 100644 icons/nautilus-logo.png create mode 100644 libnautilus-extensions/bug-5712-pr3-workaround--gdk-pixbuf-drawable.c create mode 100644 libnautilus-extensions/bug-5712-pr3-workaround--gdk-pixbuf-private.h create mode 100644 libnautilus-extensions/bug-5712-pr3-workaround--gdkimage.c create mode 100644 libnautilus-extensions/nautilus-annotation.c create mode 100644 libnautilus-extensions/nautilus-annotation.h create mode 100644 libnautilus-extensions/nautilus-text-layout.c create mode 100644 libnautilus-extensions/nautilus-text-layout.h create mode 100644 libnautilus-private/bug-5712-pr3-workaround--gdk-pixbuf-drawable.c create mode 100644 libnautilus-private/bug-5712-pr3-workaround--gdk-pixbuf-private.h create mode 100644 libnautilus-private/bug-5712-pr3-workaround--gdkimage.c create mode 100644 libnautilus-private/nautilus-annotation.c create mode 100644 libnautilus-private/nautilus-annotation.h create mode 100644 libnautilus-private/nautilus-text-layout.c create mode 100644 libnautilus-private/nautilus-text-layout.h create mode 100644 user-guide/C/Makefile.am create mode 100644 user-guide/C/html/.cvsignore create mode 100644 user-guide/C/html/license.html create mode 100644 user-guide/C/img/.cvsignore create mode 100644 user-guide/C/img/ch1-README.png create mode 100644 user-guide/C/img/ch1-cnn.png create mode 100644 user-guide/C/img/ch1-complex-search.png create mode 100644 user-guide/C/img/ch1-connect.png create mode 100644 user-guide/C/img/ch1-duplicate.png create mode 100644 user-guide/C/img/ch1-google.png create mode 100644 user-guide/C/img/ch1-hardware.png create mode 100644 user-guide/C/img/ch1-history.png create mode 100644 user-guide/C/img/ch1-home-john.png create mode 100644 user-guide/C/img/ch1-home.png create mode 100644 user-guide/C/img/ch1-icon-view-150.png create mode 100644 user-guide/C/img/ch1-icon-view-demo.png create mode 100644 user-guide/C/img/ch1-inadequate-permissions.png create mode 100644 user-guide/C/img/ch1-list-mydoc.png create mode 100644 user-guide/C/img/ch1-music-control.png create mode 100644 user-guide/C/img/ch1-nautiluslogo.png create mode 100644 user-guide/C/img/ch1-new-window.png create mode 100644 user-guide/C/img/ch1-open-with.png create mode 100644 user-guide/C/img/ch1-panel.png create mode 100644 user-guide/C/img/ch1-permissions.png create mode 100644 user-guide/C/img/ch1-pluck.png create mode 100644 user-guide/C/img/ch1-samba.png create mode 100644 user-guide/C/img/ch1-slash.png create mode 100644 user-guide/C/img/ch1-toolbar.png create mode 100644 user-guide/C/img/ch1-toshiba.png create mode 100644 user-guide/C/img/ch1-tree-demo.png create mode 100644 user-guide/C/img/ch1-tree-doc-1.png create mode 100644 user-guide/C/img/ch1-tree-doc.png create mode 100644 user-guide/C/img/ch1-tree-etc.png create mode 100644 user-guide/C/img/ch1-tree-slash.png create mode 100644 user-guide/C/img/ch1-view-as.png create mode 100644 user-guide/C/img/ch1-zoom-control.png create mode 100644 user-guide/C/img/ch2-colors.png create mode 100644 user-guide/C/img/ch2-edit-settings-folder.png create mode 100644 user-guide/C/img/ch2-emblems.png create mode 100644 user-guide/C/img/ch2-home-john-mydoc.png create mode 100644 user-guide/C/img/ch2-icon-captions-alone.png create mode 100644 user-guide/C/img/ch2-icon-captions.png create mode 100644 user-guide/C/img/ch2-john.png create mode 100644 user-guide/C/img/ch2-music.png create mode 100644 user-guide/C/img/ch2-open-with-other.png create mode 100644 user-guide/C/img/ch2-open-with.png create mode 100644 user-guide/C/img/ch2-photos-john.png create mode 100644 user-guide/C/img/ch2-right-click-open-with.png create mode 100644 user-guide/C/img/ch2-search-settings.png create mode 100644 user-guide/C/img/ch2-ski-intermediate-menu.png create mode 100644 user-guide/C/img/ch2-theme-eazel.png create mode 100644 user-guide/C/img/ch2-view-layout-menu.png create mode 100644 user-guide/C/img/ch3-account-info.png create mode 100644 user-guide/C/img/ch3-online-storage.png create mode 100644 user-guide/C/img/ch3-package-titles.png create mode 100644 user-guide/C/img/ch3-sign-up.png create mode 100644 user-guide/C/img/ch3-welcome-screen.png create mode 100644 user-guide/C/img/custicon.png create mode 100644 user-guide/C/img/full.png create mode 100644 user-guide/C/img/install-update.png create mode 100644 user-guide/C/img/install-user-level.png create mode 100644 user-guide/C/img/locbar.png create mode 100644 user-guide/C/img/player.png create mode 100644 user-guide/C/img/prefmenu.png create mode 100644 user-guide/C/img/sidebar.png create mode 100644 user-guide/C/img/viewmenu.png create mode 100644 user-guide/C/nautilus-C.omf create mode 100644 user-guide/C/sgml/.cvsignore create mode 100644 user-guide/C/sgml/chapter-1.sgml create mode 100644 user-guide/C/sgml/chapter-2.sgml create mode 100644 user-guide/C/sgml/chapter-3.sgml create mode 100644 user-guide/C/sgml/fdl.sgml create mode 100644 user-guide/C/sgml/install.sgml create mode 100644 user-guide/C/sgml/intro.sgml create mode 100644 user-guide/C/sgml/model.sgml create mode 100644 user-guide/C/sgml/nautilus.sgml diff --git a/ChangeLog b/ChangeLog index 844f0a687..62f121bdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,459 @@ +2001-03-11 Andy Hertzfeld + + merged to create post-1_0_7 branch + + * Makefile.am: + * applets/Makefile.am: + * components/Makefile.am: + * components/rss-control/.cvsignore: + * components/rss-control/Makefile.am: + * components/rss-control/main.c: (rss_control_object_destroyed), + (rss_control_make_object), (main): + * components/rss-control/nautilus-rss-control.c: + (nautilus_rss_control_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_rss_control_initialize), + (free_rss_data_item), (nautilus_rss_control_clear_items), + (nautilus_rss_control_destroy), (nautilus_rss_control_get_control), + (nautilus_rss_control_set_title), (rss_logo_callback), + (rss_read_done_callback), (load_rss_file), + (nautilus_rss_control_set_uri), (rss_control_pixbuf_composite), + (draw_rss_logo_image), (draw_rss_title), (draw_blue_line), + (draw_rss_items), (nautilus_rss_control_draw), + (nautilus_rss_control_expose), + (nautilus_rss_control_set_prelight_index), + (nautilus_rss_control_motion_event), + (nautilus_rss_control_leave_event), + (nautilus_rss_control_size_request), + (nautilus_rss_control_button_press_event): + * components/rss-control/nautilus-rss-control.h: + * components/rss-control/nautilus-rss-control.oafinfo: + * components/services/install-view/nautilus-service-install.c: + (xnautilus_service_install_download_failed), + (xnautilus_service_install_failed_helper), + (xnautilus_service_install_failed), + (xnautilus_service_install_dependency_check), + (xnautilus_service_install_done), + (xnautilus_service_install_view_install_package_callback), + (xnautilus_service_install_view_uninstall_package_callback): + * components/services/install-view/nautilus-service-install.h: + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_pre_install_packages), (ei_install_packages), + (eazel_install_download_packages), + (eazel_install_check_for_file_conflicts), + (eazel_install_do_install_packages), (uninstall_all_packages), + (ei_uninstall_packages), (ei_get_packages_with_mod_flag), + (ei_check_uninst_vs_downgrade), (hest), (ei_revert_transaction), + (eazel_install_do_transaction_add_to_transaction), + (eazel_install_do_transaction_save_report_helper), + (eazel_install_do_transaction_save_report), + (eazel_install_do_transaction_all_files_check), + (get_total_size_of_packages), + (eazel_install_clean_name_to_package_hash), + (eazel_install_start_transaction), + (eazel_install_check_if_depends_on), + (eazel_install_prune_packages_helper), + (eazel_install_prune_packages), + (eazel_install_add_to_extras_foreach), + (eazel_install_check_if_related_package), + (eazel_install_fetch_dependencies), (dump_one_package), + (dump_packages_foreach), (dump_packages), (print_package_list), + (eazel_install_do_file_conflict_check), + (eazel_install_do_dependency_check), (eazel_install_ensure_deps), + (eazel_uninstall_upward_traverse), + (eazel_uninstall_downward_traverse), + (eazel_uninstall_check_for_install), (eazel_uninstall_globber): + * components/services/install/lib/eazel-install-logic.h: + * components/services/install/lib/eazel-install-rpm-glue.c: + (packagedata_new_from_rpm_conflict), + (packagedata_new_from_rpm_conflict_reversed), + (eazel_install_add_to_rpm_set), + (eazel_install_package_modifies_provides_compare), + (eazel_install_rpm_create_requirement), + (eazel_install_do_rpm_dependency_check): + * components/services/install/lib/eazel-install-rpm-glue.h: + * components/services/install/nautilus-view/.cvsignore: + * components/services/install/nautilus-view/Makefile.am: + * components/services/install/nautilus-view/Nautilus_View_install.o + af.in: + * components/services/install/nautilus-view/callbacks.c: + (reply_callback), (nautilus_service_install_dependency_check), + (nautilus_service_install_conflict_check), + (nautilus_service_install_preflight_check), + (nautilus_service_install_download_progress), + (nautilus_service_install_download_failed), + (previous_install_finished), (nautilus_service_install_progress), + (nautilus_service_install_failed), + (nautilus_service_install_solve_cases), + (nautilus_service_install_done): + * components/services/install/nautilus-view/callbacks.h: + * components/services/install/nautilus-view/forms.c: + (add_padding_to_box), (line_expose), (horizontal_line_new), + (install_message_destroy), (install_message_new), + (generate_install_form), (show_overall_feedback), + (update_package_info_display), (current_progress_bar_complete), + (button_ok_clicked), (button_cancel_clicked), (make_query_box): + * components/services/install/nautilus-view/forms.h: + * components/services/install/nautilus-view/main.c: (quit_timer), + (service_install_object_destroyed), (service_install_make_object), + (main): + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (deps_destroy_foreach), + (nautilus_service_install_view_destroy), + (nautilus_service_install_view_finalize), + (nautilus_service_install_view_initialize_class), + (nautilus_service_install_view_initialize), + (nautilus_service_install_view_get_nautilus_view), + (create_package), (nautilus_install_parse_uri), + (nautilus_service_install_check_for_desktop_files), + (nautilus_install_service_describe_menu_entry), + (nautilus_install_service_locate_menu_entries), + (nautilus_service_need_password), (nautilus_service_try_again), + (set_root_client), + (nautilus_service_install_view_update_from_uri_finish), + (user_login_callback), + (nautilus_service_install_view_update_from_uri), + (nautilus_service_install_view_load_uri), + (service_install_load_location_callback), + (service_install_stop_loading_callback): + * components/services/install/nautilus-view/nautilus-service-instal + l-view.h: + * components/services/install/nautilus-view/nautilus-service-instal + l.c: (xnautilus_service_install_download_failed), + (xnautilus_service_install_failed_helper), + (xnautilus_service_install_failed), + (xnautilus_service_install_dependency_check), + (xnautilus_service_install_done), + (xnautilus_service_install_view_install_package_callback), + (xnautilus_service_install_view_uninstall_package_callback): + * components/services/install/nautilus-view/nautilus-service-instal + l.h: + * components/services/inventory-view/nautilus-inventory-config-page + .h: + * components/services/nautilus-dependent-shared/icons/eazel-cloud-l + ogo.png: + * components/services/nautilus-dependent-shared/icons/eazel-service + s-logo.png: + * components/services/nautilus-dependent-shared/icons/service-summa + ry-logo-top.png: + * components/services/nautilus-dependent-shared/icons/startup-logo. + png: + * components/services/summary/lib/.cvsignore: + * components/services/summary/lib/Makefile.am: + * components/services/summary/lib/eazel-summary-shared.c: + (summary_data_new), (services_data_new), (eazel_news_data_new), + (update_news_data_new), (parse_a_service), + (parse_a_eazel_news_item), (parse_a_update_news_item), + (build_services_glist_from_xml), (build_eazel_news_glist_from_xml), + (build_update_news_glist_from_xml), (parse_summary_xml_file): + * components/services/summary/lib/eazel-summary-shared.h: + * components/services/summary/nautilus-view/.cvsignore: + * components/services/summary/nautilus-view/Makefile.am: + * components/services/summary/nautilus-view/Nautilus_View_services- + summary.oaf.in: + * components/services/summary/nautilus-view/icons/.cvsignore: + * components/services/summary/nautilus-view/icons/Makefile.am: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/. + cvsignore: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/M + akefile.am: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/a + ctive-fill.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/a + ctive-inactive-bridge.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/a + ctive-left-bumper.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/a + ctive-prelight-bridge.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/a + ctive-right-bumper.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/f + ill-background.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/i + nactive-active-bridge.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/i + nactive-fill.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/i + nactive-left-bumper.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/i + nactive-right-bumper.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/p + relight-active-bridge.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/p + relight-fill.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/p + relight-left-bumper.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/p + relight-right-bumper.png: + * components/services/summary/nautilus-view/main.c: + (summary_object_destroyed), (summary_make_object), (main): + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.c: (authn_cb_succeeded), (authn_cb_failed), (login_button_cb), + (logout_button_cb), (logged_in_callback), (logged_out_callback), + (preferences_button_cb), (forgot_password_button_cb), + (register_button_cb): + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.h: + * components/services/summary/nautilus-view/nautilus-summary-dialog + s.c: (nautilus_summary_login_failure_dialog), + (generate_error_dialog), (generate_login_dialog), + (widget_set_nautilus_background_color), (error_dialog_cancel_cb), + (get_window_from_summary_view), (set_dialog_parent), + (name_or_password_field_activated): + * components/services/summary/nautilus-view/nautilus-summary-dialog + s.h: + * components/services/summary/nautilus-view/nautilus-summary-footer + .c: (footer_item_clicked_callback): + * components/services/summary/nautilus-view/nautilus-summary-footer + .h: + * components/services/summary/nautilus-view/nautilus-summary-menu-i + tems.c: (update_menu_items), (merge_bonobo_menu_items), + (bonobo_register_callback), (bonobo_login_callback), + (bonobo_logout_callback), (bonobo_preferences_callback): + * components/services/summary/nautilus-view/nautilus-summary-menu-i + tems.h: + * components/services/summary/nautilus-view/nautilus-summary-view-p + rivate.h: + * components/services/summary/nautilus-view/nautilus-summary-view-u + i.xml: + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (update_header), (create_header), (update_footer), + (create_footer), (summary_view_button_callback), + (summary_view_button_new), (summary_view_item_label_new), + (summary_view_item_large_header_label_new), + (summary_view_item_header_label_new), + (summary_view_item_body_label_new), (append_hseparator_to_vbox), + (generate_eazel_news_entry_row), (summary_view_update_pane), + (summary_view_create_pane), (update_news_pane), (create_news_pane), + (generate_service_entry_row), (update_services_list_pane), + (create_services_list_pane), (generate_update_news_entry_row), + (update_featured_downloads_pane), (create_featured_downloads_pane), + (generate_summary_form), (nautilus_summary_view_initialize_class), + (nautilus_summary_view_initialize), + (nautilus_summary_view_destroy), + (nautilus_summary_view_get_nautilus_view), + (nautilus_summary_view_load_uri), (summary_load_location_callback): + * components/services/summary/nautilus-view/nautilus-summary-view.h + : + * components/services/summary/nautilus-view/tests/README: + * components/services/summary/nautilus-view/tests/redirects.xml: + * components/services/summary/nautilus-view/tests/services.xml: + * components/services/vault/.cvsignore: + * components/services/vault/Makefile.am: + * components/services/vault/command-line/.cvsignore: + * components/services/vault/command-line/Makefile.am: + * components/services/vault/command-line/main.c: (valid_ops), + (main): + * components/services/vault/command-line/vault-operations.c: + (vault_list), (make_local_uri), (make_remote_uri), (vault_upload), + (vault_download), (vault_move), (vault_delete): + * components/services/vault/command-line/vault-operations.h: + * components/text/services/english_to_french.xml: + * components/text/services/french_to_english.xml: + * components/throbber/nautilus-throbber.c: (get_bonobo_properties), + (set_bonobo_properties), (nautilus_throbber_initialize): + * components/vcard/.cvsignore: + * components/vcard/Makefile.am: + * components/vcard/main.c: (vcard_object_destroyed), + (vcard_make_object), (main): + * components/vcard/nautilus-vcard.c: + (nautilus_vcard_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_vcard_initialize), + (nautilus_vcard_destroy), (nautilus_vcard_get_control), + (vcard_logo_callback), (vcard_read_done_callback), (load_vcard), + (nautilus_vcard_set_uri), (vcard_pixbuf_composite), + (draw_vcard_logo_image), (draw_vcard_name_and_title), + (draw_vcard_addresses), (nautilus_vcard_draw), + (nautilus_vcard_expose), (nautilus_vcard_motion_event), + (nautilus_vcard_size_request), (nautilus_vcard_leave_event), + (nautilus_vcard_button_press_event): + * components/vcard/nautilus-vcard.h: + * components/vcard/nautilus-vcard.oaf: + * components/vcard/vcard.c: (vcard_full_name), (vcard_title), + (vcard_logo), (vcard_postal), (vcard_streetaddress), + (vcard_city_state_zip), (vcard_company), (vcard_email), + (vcard_fax), (vcard_web), (vcard_address_list): + * components/vcard/vcard.h: + * configure.in: + * data/emblems/secret.png: + * data/emblems/shared.png: + * data/top/.cvsignore: + * data/top/.nautilus-metafile.xml: + * data/top/Clock: + * data/top/Computer: + * data/top/Makefile.am: + * data/top/Services: + * data/top/Slashdot: + * icons/Makefile.am: + * icons/crux_eggplant/i-regular-192-aa.png: + * icons/crux_eggplant/i-regular-192.png: + * icons/crux_eggplant/i-regular-72-aa.png: + * icons/crux_eggplant/i-regular-72.png: + * icons/crux_eggplant/i-regular-96-aa.png: + * icons/crux_eggplant/i-regular-96.png: + * icons/crux_eggplant/i-regular-aa.png: + * icons/crux_eggplant/i-regular.png: + * icons/eazel-logo.gif: + * icons/emblem-note.png: + * icons/emblem-secret.svg: + * icons/emblem-shared.svg: + * icons/hand.svg: + * icons/i-directory-192.png: + * icons/nautilus-logo.png: + * libnautilus-extensions/Makefile.am: + * libnautilus-extensions/bug-5712-pr3-workaround--gdk-pixbuf-drawab + le.c: (rgb1), (rgb1a), (rgb8), (rgb8a), (rgb565lsb), (rgb565msb), + (rgb565alsb), (rgb565amsb), (rgb555lsb), (rgb555msb), (rgb555alsb), + (rgb555amsb), (rgb888alsb), (rgb888lsb), (rgb888amsb), (rgb888msb), + (convert_real_slow), (rgbconvert), + (NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_pixbuf_get_from_drawable): + * libnautilus-extensions/bug-5712-pr3-workaround--gdk-pixbuf-privat + e.h: + * libnautilus-extensions/bug-5712-pr3-workaround--gdkimage.c: + (NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_image_get), + (gdk_image_put_normal): + * libnautilus-extensions/nautilus-annotation.c: (_byte_reverse), + (md5_init), (md5_update), (md5_final), (md5_transform), + (digest_file_close_callback), (digest_file_completed), + (digest_file_failed), (calculate_checksum_callback), + (read_file_open_callback), (calculate_file_digest), + (get_file_from_digest), (get_annotation_path), + (look_up_local_annotation), (has_local_annotation), + (add_annotations_to_file), (remember_file), (forget_file), + (got_annotations_callback), (fetch_annotations_from_server), + (get_annotation_from_server), (got_file_digest), + (nautilus_annotation_get_annotation), + (nautilus_annotation_has_annotation), + (nautilus_annotation_add_annotation), + (nautilus_annotation_remove_annotation): + * libnautilus-extensions/nautilus-annotation.h: + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_get_user_main_directory): + * libnautilus-extensions/nautilus-file.c: + (prepend_automatic_emblem_names): + * libnautilus-extensions/nautilus-file.h: + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (nautilus_icon_canvas_item_destroy), + (nautilus_icon_canvas_item_get_icon_width), + (nautilus_icon_canvas_item_get_icon_height), + (nautilus_icon_canvas_item_set_arg), (do_control_destroy), + (nautilus_icon_canvas_item_get_arg), + (nautilus_icon_canvas_item_get_image), (recompute_bounding_box), + (nautilus_icon_canvas_item_update_bounds), + (draw_or_measure_label_text), (emblem_layout_next), + (nautilus_icon_canvas_item_draw), (draw_or_measure_label_text_aa), + (nautilus_icon_canvas_item_render), (create_annotation), + (remove_annotation), (nautilus_icon_canvas_item_set_note_state), + (nautilus_icon_canvas_item_event), (hit_test), + (nautilus_icon_canvas_item_point), + (nautilus_icon_canvas_item_bounds), + (nautilus_icon_canvas_item_get_icon_rectangle), + (get_icon_canvas_rectangle), + (nautilus_icon_canvas_item_hit_test_rectangle), + (nautilus_icon_canvas_item_set_smooth_font), + (nautilus_icon_canvas_item_get_control), + (nautilus_icon_canvas_item_set_control): + * libnautilus-extensions/nautilus-icon-canvas-item.h: + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_initialize_class), + (nautilus_icon_container_update_icon): + * libnautilus-extensions/nautilus-icon-container.h: + * libnautilus-extensions/nautilus-icon-dnd.c: + (nautilus_icon_dnd_begin_drag): + * libnautilus-extensions/nautilus-labeled-image.c: + (nautilus_labeled_image_get_image_bounds): + * libnautilus-extensions/nautilus-link.c: + (nautilus_link_local_get_component_info): + * libnautilus-extensions/nautilus-link.h: + * libnautilus-extensions/nautilus-metadata.h: + * libnautilus-extensions/nautilus-text-layout.c: + (text_layout_free_row), (nautilus_text_layout_free), + (nautilus_text_layout_new), (nautilus_text_layout_paint): + * libnautilus-extensions/nautilus-text-layout.h: + * nautilus-clean.sh: + * src/file-manager/fm-icon-view.c: (get_icon_control_callback), + (get_icon_text_callback), (create_icon_container): + * src/nautilus-property-browser.c: + * src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_hit_test), + (nautilus_sidebar_tabs_select_tab): + * src/nautilus-sidebar.c: (add_command_buttons), + (nautilus_sidebar_update_buttons): + * user-guide/C/Makefile.am: + * user-guide/C/html/.cvsignore: + * user-guide/C/html/license.html: + * user-guide/C/img/.cvsignore: + * user-guide/C/img/ch1-README.png: + * user-guide/C/img/ch1-cnn.png: + * user-guide/C/img/ch1-complex-search.png: + * user-guide/C/img/ch1-connect.png: + * user-guide/C/img/ch1-duplicate.png: + * user-guide/C/img/ch1-google.png: + * user-guide/C/img/ch1-hardware.png: + * user-guide/C/img/ch1-history.png: + * user-guide/C/img/ch1-home-john.png: + * user-guide/C/img/ch1-home.png: + * user-guide/C/img/ch1-icon-view-150.png: + * user-guide/C/img/ch1-icon-view-demo.png: + * user-guide/C/img/ch1-inadequate-permissions.png: + * user-guide/C/img/ch1-list-mydoc.png: + * user-guide/C/img/ch1-music-control.png: + * user-guide/C/img/ch1-nautiluslogo.png: + * user-guide/C/img/ch1-new-window.png: + * user-guide/C/img/ch1-open-with.png: + * user-guide/C/img/ch1-panel.png: + * user-guide/C/img/ch1-permissions.png: + * user-guide/C/img/ch1-pluck.png: + * user-guide/C/img/ch1-samba.png: + * user-guide/C/img/ch1-slash.png: + * user-guide/C/img/ch1-toolbar.png: + * user-guide/C/img/ch1-toshiba.png: + * user-guide/C/img/ch1-tree-demo.png: + * user-guide/C/img/ch1-tree-doc-1.png: + * user-guide/C/img/ch1-tree-doc.png: + * user-guide/C/img/ch1-tree-etc.png: + * user-guide/C/img/ch1-tree-slash.png: + * user-guide/C/img/ch1-view-as.png: + * user-guide/C/img/ch1-zoom-control.png: + * user-guide/C/img/ch2-colors.png: + * user-guide/C/img/ch2-edit-settings-folder.png: + * user-guide/C/img/ch2-emblems.png: + * user-guide/C/img/ch2-home-john-mydoc.png: + * user-guide/C/img/ch2-icon-captions-alone.png: + * user-guide/C/img/ch2-icon-captions.png: + * user-guide/C/img/ch2-john.png: + * user-guide/C/img/ch2-music.png: + * user-guide/C/img/ch2-open-with-other.png: + * user-guide/C/img/ch2-open-with.png: + * user-guide/C/img/ch2-photos-john.png: + * user-guide/C/img/ch2-right-click-open-with.png: + * user-guide/C/img/ch2-search-settings.png: + * user-guide/C/img/ch2-ski-intermediate-menu.png: + * user-guide/C/img/ch2-theme-eazel.png: + * user-guide/C/img/ch2-view-layout-menu.png: + * user-guide/C/img/ch3-account-info.png: + * user-guide/C/img/ch3-online-storage.png: + * user-guide/C/img/ch3-package-titles.png: + * user-guide/C/img/ch3-sign-up.png: + * user-guide/C/img/ch3-welcome-screen.png: + * user-guide/C/img/custicon.png: + * user-guide/C/img/full.png: + * user-guide/C/img/install-update.png: + * user-guide/C/img/install-user-level.png: + * user-guide/C/img/locbar.png: + * user-guide/C/img/player.png: + * user-guide/C/img/prefmenu.png: + * user-guide/C/img/sidebar.png: + * user-guide/C/img/viewmenu.png: + * user-guide/C/nautilus-C.omf: + * user-guide/C/sgml/.cvsignore: + * user-guide/C/sgml/chapter-1.sgml: + * user-guide/C/sgml/chapter-2.sgml: + * user-guide/C/sgml/chapter-3.sgml: + * user-guide/C/sgml/fdl.sgml: + * user-guide/C/sgml/install.sgml: + * user-guide/C/sgml/intro.sgml: + * user-guide/C/sgml/model.sgml: + * user-guide/C/sgml/nautilus.sgml: + 2001-03-08 Darin Adler reviewed by: John Sullivan @@ -66,8 +522,392 @@ Adding Vera's new version of Nautilus User Manual text. - Remove mention of RPM view since it isn't in this release Bug #: 7442 +======= +2001-03-04 Andy Hertzfeld + + partially implemented tooltips for emblems, as a stepping stone to + showing the annotations. + + * libnautilus-extensions/nautilus-annotation.c: + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (emblem_layout_next), (create_annotation), (remove_annotation), + (nautilus_icon_canvas_item_set_note_state), + (nautilus_icon_canvas_item_event), (hit_test), + (nautilus_icon_canvas_item_point), + (nautilus_icon_canvas_item_hit_test_rectangle): + +2001-03-01 Andy Hertzfeld + + added "notes" emblem and made one show up if annotations are + available + + * icons/Makefile.am: + * icons/emblem-note.png: + * libnautilus-extensions/nautilus-annotation.c: + (got_annotations_callback), (nautilus_annotation_has_annotation): + * libnautilus-extensions/nautilus-file.c: + (prepend_automatic_emblem_names): + * libnautilus-extensions/nautilus-file.h: + +2001-02-27 Andy Hertzfeld + + fixed bug 7019, emblem names not vertically aligned + + * libnautilus-extensions/nautilus-labeled-image.c: + (nautilus_labeled_image_initialize), (is_fixed_height), + (labeled_image_get_image_dimensions), + (nautilus_labeled_image_get_image_bounds), + (nautilus_labeled_image_set_fixed_image_height): + * libnautilus-extensions/nautilus-labeled-image.h: + * src/file-manager/fm-properties-window.c: (create_emblems_page): + * src/nautilus-property-browser.c: + (make_properties_from_directories), + (property_browser_category_button_new): + +2001-02-26 Andy Hertzfeld + + + * libnautilus-extensions/nautilus-annotation.c: + (nautilus_annotation_has_annotation): + implemented the has_annotation function + + * src/nautilus-property-browser.c: (add_reset_property): + fixed bug 7021 by adding a line to turn the reset image into a + property chit + +2001-02-25 Andy Hertzfeld + + finished first pass at underlying annotation infrastructure: + async md5 checksum calculation + saving the checksum in the metadata + batching multiple lookups into a single request + posting the request to the server and parsing the response + caching annotations locally, saving count in metadata + + * libnautilus-extensions/nautilus-annotation.c: + (digest_file_completed), (digest_file_failed), + (read_file_open_callback), (calculate_file_digest), + (get_file_from_digest), (get_annotation_path), + (has_local_annotation), (add_annotations_to_file), (remember_file), + (forget_file), (got_annotations_callback), + (fetch_annotations_from_server), (get_annotation_from_server), + (got_file_digest), (nautilus_annotation_get_annotation): + * libnautilus-extensions/nautilus-metadata.h: + +2001-02-22 Andy Hertzfeld + + post-1_0_6 branch with annotation stuff + + * Makefile.am: + * applets/Makefile.am: + * components/Makefile.am: + * components/rss-control/.cvsignore: + * components/rss-control/Makefile.am: + * components/rss-control/main.c: (rss_control_object_destroyed), + (rss_control_make_object), (main): + * components/rss-control/nautilus-rss-control.c: + (nautilus_rss_control_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_rss_control_initialize), + (free_rss_data_item), (nautilus_rss_control_clear_items), + (nautilus_rss_control_destroy), (nautilus_rss_control_get_control), + (nautilus_rss_control_set_title), (rss_logo_callback), + (rss_read_done_callback), (load_rss_file), + (nautilus_rss_control_set_uri), (rss_control_pixbuf_composite), + (draw_rss_logo_image), (draw_rss_title), (draw_blue_line), + (draw_rss_items), (nautilus_rss_control_draw), + (nautilus_rss_control_expose), + (nautilus_rss_control_set_prelight_index), + (nautilus_rss_control_motion_event), + (nautilus_rss_control_leave_event), + (nautilus_rss_control_size_request), + (nautilus_rss_control_button_press_event): + * components/rss-control/nautilus-rss-control.h: + * components/rss-control/nautilus-rss-control.oafinfo: + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_pre_install_packages), (ei_install_packages), + (eazel_install_download_packages), + (eazel_install_check_for_file_conflicts), + (eazel_install_do_install_packages), (uninstall_all_packages), + (ei_uninstall_packages), (ei_get_packages_with_mod_flag), + (ei_check_uninst_vs_downgrade), (hest), (ei_revert_transaction), + (eazel_install_do_transaction_add_to_transaction), + (eazel_install_do_transaction_save_report_helper), + (eazel_install_do_transaction_save_report), + (eazel_install_do_transaction_all_files_check), + (get_total_size_of_packages), + (eazel_install_clean_name_to_package_hash), + (eazel_install_start_transaction), + (eazel_install_check_if_depends_on), + (eazel_install_prune_packages_helper), + (eazel_install_prune_packages), + (eazel_install_add_to_extras_foreach), + (eazel_install_check_if_related_package), + (eazel_install_fetch_dependencies), (dump_one_package), + (dump_packages_foreach), (dump_packages), (print_package_list), + (eazel_install_do_file_conflict_check), + (eazel_install_do_dependency_check), (eazel_install_ensure_deps), + (eazel_uninstall_upward_traverse), + (eazel_uninstall_downward_traverse), + (eazel_uninstall_check_for_install), (eazel_uninstall_globber): + * components/services/install/lib/eazel-install-logic.h: + * components/services/install/lib/eazel-install-rpm-glue.c: + (packagedata_new_from_rpm_conflict), + (packagedata_new_from_rpm_conflict_reversed), + (eazel_install_add_to_rpm_set), + (eazel_install_package_modifies_provides_compare), + (eazel_install_rpm_create_requirement), + (eazel_install_do_rpm_dependency_check): + * components/services/install/lib/eazel-install-rpm-glue.h: + * components/services/summary/lib/.cvsignore: + * components/services/summary/lib/Makefile.am: + * components/services/summary/lib/eazel-summary-shared.c: + (summary_data_new), (services_data_new), (eazel_news_data_new), + (update_news_data_new), (parse_a_service), + (parse_a_eazel_news_item), (parse_a_update_news_item), + (build_services_glist_from_xml), (build_eazel_news_glist_from_xml), + (build_update_news_glist_from_xml), (parse_summary_xml_file): + * components/services/summary/lib/eazel-summary-shared.h: + * components/services/summary/nautilus-view/.cvsignore: + * components/services/summary/nautilus-view/Makefile.am: + * components/services/summary/nautilus-view/Nautilus_View_services- + summary.oaf.in: + * components/services/summary/nautilus-view/icons/.cvsignore: + * components/services/summary/nautilus-view/icons/Makefile.am: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/. + cvsignore: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/M + akefile.am: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/a + ctive-fill.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/a + ctive-inactive-bridge.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/a + ctive-left-bumper.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/a + ctive-prelight-bridge.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/a + ctive-right-bumper.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/f + ill-background.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/i + nactive-active-bridge.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/i + nactive-fill.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/i + nactive-left-bumper.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/i + nactive-right-bumper.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/p + relight-active-bridge.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/p + relight-fill.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/p + relight-left-bumper.png: + * components/services/summary/nautilus-view/icons/gray_tab_pieces/p + relight-right-bumper.png: + * components/services/summary/nautilus-view/main.c: + (summary_object_destroyed), (summary_make_object), (main): + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.c: (authn_cb_succeeded), (authn_cb_failed), (login_button_cb), + (logout_button_cb), (logged_in_callback), (logged_out_callback), + (preferences_button_cb), (forgot_password_button_cb), + (register_button_cb): + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.h: + * components/services/summary/nautilus-view/nautilus-summary-dialog + s.c: (nautilus_summary_login_failure_dialog), + (generate_error_dialog), (generate_login_dialog), + (widget_set_nautilus_background_color), (error_dialog_cancel_cb), + (get_window_from_summary_view), (set_dialog_parent), + (name_or_password_field_activated): + * components/services/summary/nautilus-view/nautilus-summary-dialog + s.h: + * components/services/summary/nautilus-view/nautilus-summary-footer + .c: (footer_item_clicked_callback): + * components/services/summary/nautilus-view/nautilus-summary-footer + .h: + * components/services/summary/nautilus-view/nautilus-summary-menu-i + tems.c: (update_menu_items), (merge_bonobo_menu_items), + (bonobo_register_callback), (bonobo_login_callback), + (bonobo_logout_callback), (bonobo_preferences_callback): + * components/services/summary/nautilus-view/nautilus-summary-menu-i + tems.h: + * components/services/summary/nautilus-view/nautilus-summary-view-p + rivate.h: + * components/services/summary/nautilus-view/nautilus-summary-view-u + i.xml: + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (update_header), (create_header), (update_footer), + (create_footer), (summary_view_button_callback), + (summary_view_button_new), (summary_view_item_label_new), + (summary_view_item_large_header_label_new), + (summary_view_item_header_label_new), + (summary_view_item_body_label_new), (append_hseparator_to_vbox), + (generate_eazel_news_entry_row), (summary_view_update_pane), + (summary_view_create_pane), (update_news_pane), (create_news_pane), + (generate_service_entry_row), (update_services_list_pane), + (create_services_list_pane), (generate_update_news_entry_row), + (update_featured_downloads_pane), (create_featured_downloads_pane), + (generate_summary_form), (nautilus_summary_view_initialize_class), + (nautilus_summary_view_initialize), + (nautilus_summary_view_destroy), + (nautilus_summary_view_get_nautilus_view), + (nautilus_summary_view_load_uri), (summary_load_location_callback): + * components/services/summary/nautilus-view/nautilus-summary-view.h + : + * components/services/summary/nautilus-view/tests/README: + * components/services/summary/nautilus-view/tests/redirects.xml: + * components/services/summary/nautilus-view/tests/services.xml: + * components/text/services/english_to_french.xml: + * components/text/services/french_to_english.xml: + * components/throbber/nautilus-throbber.c: (get_bonobo_properties), + (set_bonobo_properties), (nautilus_throbber_initialize): + * components/vcard/.cvsignore: + * components/vcard/Makefile.am: + * components/vcard/main.c: (vcard_object_destroyed), + (vcard_make_object), (main): + * components/vcard/nautilus-vcard.c: + (nautilus_vcard_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_vcard_initialize), + (nautilus_vcard_destroy), (nautilus_vcard_get_control), + (vcard_logo_callback), (vcard_read_done_callback), (load_vcard), + (nautilus_vcard_set_uri), (vcard_pixbuf_composite), + (draw_vcard_logo_image), (draw_vcard_name_and_title), + (draw_vcard_addresses), (nautilus_vcard_draw), + (nautilus_vcard_expose), (nautilus_vcard_motion_event), + (nautilus_vcard_size_request), (nautilus_vcard_leave_event), + (nautilus_vcard_button_press_event): + * components/vcard/nautilus-vcard.h: + * components/vcard/nautilus-vcard.oaf: + * components/vcard/vcard.c: (vcard_full_name), (vcard_title), + (vcard_logo), (vcard_postal), (vcard_streetaddress), + (vcard_city_state_zip), (vcard_company), (vcard_email), + (vcard_fax), (vcard_web), (vcard_address_list): + * components/vcard/vcard.h: + * configure.in: + * data/top/.cvsignore: + * data/top/.nautilus-metafile.xml: + * data/top/Clock: + * data/top/Computer: + * data/top/Makefile.am: + * data/top/Services: + * data/top/Slashdot: + * icons/Makefile.am: + * icons/i-directory-192.png: + * libnautilus-extensions/Makefile.am: + * libnautilus-extensions/nautilus-annotation.c: (_byte_reverse), + (md5_init), (md5_update), (md5_final), (md5_transform), + (digest_file_close_callback), (digest_file_completed), + (digest_file_failed), (calculate_checksum_callback), + (read_file_open_callback), (calculate_file_digest), + (get_annotation_path), (look_up_local_annotation), + (has_local_annotation), (got_annotations_callback), + (fetch_annotations_from_server), (get_annotation_from_server), + (got_file_digest), (nautilus_annotation_get_annotation), + (nautilus_annotation_has_annotation), + (nautilus_annotation_add_annotation), + (nautilus_annotation_remove_annotation): + * libnautilus-extensions/nautilus-annotation.h: + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_get_user_main_directory): + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (nautilus_icon_canvas_item_destroy), + (nautilus_icon_canvas_item_get_icon_width), + (nautilus_icon_canvas_item_get_icon_height), + (nautilus_icon_canvas_item_set_arg), (do_control_destroy), + (nautilus_icon_canvas_item_get_arg), + (nautilus_icon_canvas_item_get_image), (recompute_bounding_box), + (nautilus_icon_canvas_item_update_bounds), + (draw_or_measure_label_text), (emblem_layout_next), + (nautilus_icon_canvas_item_draw), (draw_or_measure_label_text_aa), + (nautilus_icon_canvas_item_render), + (nautilus_icon_canvas_item_bounds), + (nautilus_icon_canvas_item_get_icon_rectangle), + (get_icon_canvas_rectangle), + (nautilus_icon_canvas_item_set_smooth_font), + (nautilus_icon_canvas_item_get_control), + (nautilus_icon_canvas_item_set_control): + * libnautilus-extensions/nautilus-icon-canvas-item.h: + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_initialize_class), + (nautilus_icon_container_update_icon): + * libnautilus-extensions/nautilus-icon-container.h: + * libnautilus-extensions/nautilus-icon-dnd.c: + (nautilus_icon_dnd_begin_drag): + * libnautilus-extensions/nautilus-link.c: + (nautilus_link_local_get_component_info): + * libnautilus-extensions/nautilus-link.h: + * libnautilus-extensions/nautilus-metadata.h: + * nautilus-clean.sh: + * src/file-manager/fm-icon-view.c: (get_icon_control_callback), + (get_icon_text_callback), (create_icon_container): + * src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_hit_test), + (nautilus_sidebar_tabs_select_tab): + * src/nautilus-sidebar.c: (add_command_buttons), + (nautilus_sidebar_update_buttons): + * user-guide/C/img/ch1-README.png: + * user-guide/C/img/ch1-cnn.png: + * user-guide/C/img/ch1-complex-search.png: + * user-guide/C/img/ch1-connect.png: + * user-guide/C/img/ch1-duplicate.png: + * user-guide/C/img/ch1-google.png: + * user-guide/C/img/ch1-hardware.png: + * user-guide/C/img/ch1-history.png: + * user-guide/C/img/ch1-home-john.png: + * user-guide/C/img/ch1-home.png: + * user-guide/C/img/ch1-icon-view-150.png: + * user-guide/C/img/ch1-icon-view-demo.png: + * user-guide/C/img/ch1-inadequate-permissions.png: + * user-guide/C/img/ch1-list-mydoc.png: + * user-guide/C/img/ch1-music-control.png: + * user-guide/C/img/ch1-nautiluslogo.png: + * user-guide/C/img/ch1-new-window.png: + * user-guide/C/img/ch1-open-with.png: + * user-guide/C/img/ch1-panel.png: + * user-guide/C/img/ch1-permissions.png: + * user-guide/C/img/ch1-pluck.png: + * user-guide/C/img/ch1-samba.png: + * user-guide/C/img/ch1-slash.png: + * user-guide/C/img/ch1-toolbar.png: + * user-guide/C/img/ch1-toshiba.png: + * user-guide/C/img/ch1-tree-demo.png: + * user-guide/C/img/ch1-tree-doc-1.png: + * user-guide/C/img/ch1-tree-doc.png: + * user-guide/C/img/ch1-tree-etc.png: + * user-guide/C/img/ch1-tree-slash.png: + * user-guide/C/img/ch1-view-as.png: + * user-guide/C/img/ch1-zoom-control.png: + * user-guide/C/img/ch2-colors.png: + * user-guide/C/img/ch2-edit-settings-folder.png: + * user-guide/C/img/ch2-emblems.png: + * user-guide/C/img/ch2-home-john-mydoc.png: + * user-guide/C/img/ch2-icon-captions-alone.png: + * user-guide/C/img/ch2-icon-captions.png: + * user-guide/C/img/ch2-john.png: + * user-guide/C/img/ch2-music.png: + * user-guide/C/img/ch2-open-with-other.png: + * user-guide/C/img/ch2-open-with.png: + * user-guide/C/img/ch2-photos-john.png: + * user-guide/C/img/ch2-right-click-open-with.png: + * user-guide/C/img/ch2-search-settings.png: + * user-guide/C/img/ch2-ski-intermediate-menu.png: + * user-guide/C/img/ch2-theme-eazel.png: + * user-guide/C/img/ch2-view-layout-menu.png: + * user-guide/C/img/ch3-account-info.png: + * user-guide/C/img/ch3-online-storage.png: + * user-guide/C/img/ch3-package-titles.png: + * user-guide/C/img/ch3-sign-up.png: + * user-guide/C/img/ch3-welcome-screen.png: + * user-guide/C/img/install-update.png: + * user-guide/C/img/install-user-level.png: + * user-guide/C/sgml/chapter-1.sgml: + * user-guide/C/sgml/chapter-2.sgml: + * user-guide/C/sgml/chapter-3.sgml: + * user-guide/C/sgml/fdl.sgml: + * user-guide/C/sgml/install.sgml: + * user-guide/C/sgml/intro.sgml: + * user-guide/C/sgml/model.sgml: - * help/nautilus-user-manual/C/nautilus-user-manual.sgml: 2001-03-07 John Harper @@ -163,6 +1003,156 @@ global variable - only ever set true if we know for sure that http connections will work +2001-02-19 Andy Hertzfeld + + got basic annotation infrastructure working + + * libnautilus-extensions/Makefile.am: + * libnautilus-extensions/nautilus-annotation.c: + (digest_file_completed), (digest_file_failed), + (calculate_checksum_callback), (read_file_open_callback), + (calculate_file_digest), (get_annotation_path), + (look_up_local_annotation), (has_local_annotation), + (got_annotations_callback), (fetch_annotations_from_server), + (get_annotation_from_server), (got_file_digest), + (nautilus_annotation_has_annotation): + * libnautilus-extensions/nautilus-metadata.h: + * src/file-manager/fm-icon-view.c: (get_icon_text_callback): + +2001-02-13 Andy Hertzfeld + + first very rough cut at annotation stuff, not even building yet + + * libnautilus-extensions/nautilus-annotation.c: (_byte_reverse), + (md5_init), (md5_update), (md5_final), (md5_transform), + (digest_file_close_callback), (read_file_succeeded), + (read_file_failed), (calculate_checksum_callback), + (read_file_open_callback), (calculate_file_digest), + (look_up_local_annotation), (has_local_annotation), + (get_annotation_from_server), (got_file_digest), + (nautilus_annotation_get_annotation), + (nautilus_annotation_has_annotation), + (nautilus_annotation_add_annotation), + (nautilus_annotation_remove_annotation): + * libnautilus-extensions/nautilus-annotation.h: + + * Makefile.am: + * applets/Makefile.am: + had to remove this because it wasn't building for me + + * src/nautilus-sidebar.c: (add_command_buttons), + (empty_trash_callback), + (nautilus_sidebar_trash_state_changed_callback), + (nautilus_sidebar_update_buttons): + empty trash button + +2001-02-09 Andy Hertzfeld + + got rid of debug messages for demo + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (nautilus_icon_canvas_item_set_control): + * src/file-manager/fm-icon-view.c: (get_icon_control_callback): + +2001-02-08 Andy Hertzfeld + + created post-1_0_3 branch + + * components/Makefile.am: + * components/rss-control/.cvsignore: + * components/rss-control/Makefile.am: + * components/rss-control/main.c: (rss_control_object_destroyed), + (rss_control_make_object), (main): + * components/rss-control/nautilus-rss-control.c: + (nautilus_rss_control_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_rss_control_initialize), + (free_rss_data_item), (nautilus_rss_control_clear_items), + (nautilus_rss_control_destroy), (nautilus_rss_control_get_control), + (nautilus_rss_control_set_title), (rss_logo_callback), + (rss_read_done_callback), (load_rss_file), + (nautilus_rss_control_set_uri), (rss_control_pixbuf_composite), + (draw_rss_logo_image), (draw_rss_title), (draw_blue_line), + (draw_rss_items), (nautilus_rss_control_draw), + (nautilus_rss_control_expose), + (nautilus_rss_control_set_prelight_index), + (nautilus_rss_control_motion_event), + (nautilus_rss_control_leave_event), + (nautilus_rss_control_size_request), + (nautilus_rss_control_button_press_event): + * components/rss-control/nautilus-rss-control.h: + * components/rss-control/nautilus-rss-control.oafinfo: + * components/throbber/nautilus-throbber.c: (get_bonobo_properties), + (set_bonobo_properties), (nautilus_throbber_initialize): + * components/vcard/.cvsignore: + * components/vcard/Makefile.am: + * components/vcard/main.c: (vcard_object_destroyed), + (vcard_make_object), (main): + * components/vcard/nautilus-vcard.c: + (nautilus_vcard_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_vcard_initialize), + (nautilus_vcard_destroy), (nautilus_vcard_get_control), + (vcard_logo_callback), (vcard_read_done_callback), (load_vcard), + (nautilus_vcard_set_uri), (vcard_pixbuf_composite), + (draw_vcard_logo_image), (draw_vcard_name_and_title), + (draw_vcard_addresses), (nautilus_vcard_draw), + (nautilus_vcard_expose), (nautilus_vcard_motion_event), + (nautilus_vcard_size_request), (nautilus_vcard_leave_event), + (nautilus_vcard_button_press_event): + * components/vcard/nautilus-vcard.h: + * components/vcard/nautilus-vcard.oaf: + * components/vcard/vcard.c: (vcard_full_name), (vcard_title), + (vcard_logo), (vcard_postal), (vcard_streetaddress), + (vcard_city_state_zip), (vcard_company), (vcard_email), + (vcard_fax), (vcard_web), (vcard_address_list): + * components/vcard/vcard.h: + * configure.in: + * data/top/Clock: + * data/top/Makefile.am: + * data/top/Slashdot: + * icons/Makefile.am: + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_get_user_main_directory): + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (nautilus_icon_canvas_item_destroy), + (nautilus_icon_canvas_item_get_icon_width), + (nautilus_icon_canvas_item_get_icon_height), + (nautilus_icon_canvas_item_set_arg), (do_control_destroy), + (nautilus_icon_canvas_item_get_arg), + (nautilus_icon_canvas_item_get_image), (recompute_bounding_box), + (nautilus_icon_canvas_item_update_bounds), + (draw_or_measure_label_text), (emblem_layout_next), + (nautilus_icon_canvas_item_draw), (draw_or_measure_label_text_aa), + (nautilus_icon_canvas_item_render), + (nautilus_icon_canvas_item_bounds), + (nautilus_icon_canvas_item_get_icon_rectangle), + (get_icon_canvas_rectangle), + (nautilus_icon_canvas_item_set_smooth_font), + (nautilus_icon_canvas_item_get_control), + (nautilus_icon_canvas_item_set_control): + * libnautilus-extensions/nautilus-icon-canvas-item.h: + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_initialize_class), + (nautilus_icon_container_update_icon): + * libnautilus-extensions/nautilus-icon-container.h: + * libnautilus-extensions/nautilus-icon-dnd.c: + (nautilus_icon_dnd_begin_drag): + * libnautilus-extensions/nautilus-link.c: + (nautilus_link_local_get_component_info): + * libnautilus-extensions/nautilus-link.h: + * libnautilus-extensions/nautilus-metadata.h: + * nautilus-clean.sh: + * src/file-manager/fm-icon-view.c: (get_icon_control_callback), + (create_icon_container): + * src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_hit_test), + (nautilus_sidebar_tabs_select_tab): + * src/nautilus-sidebar.c: (nautilus_sidebar_release_event): + * user-guide/C/sgml/chapter-1.sgml: + * user-guide/C/sgml/chapter-2.sgml: + * user-guide/C/sgml/chapter-3.sgml: + * user-guide/C/sgml/fdl.sgml: + * user-guide/C/sgml/install.sgml: + * user-guide/C/sgml/intro.sgml: + * user-guide/C/sgml/model.sgml: (finished_label, update_finished_label, nautilus_first_time_druid_show): since we only launch the services window when http requests are known to work, make the @@ -265,11 +1255,95 @@ Wed Mar 07 00:35:04 2001 George Lebl * libnautilus-extensions/nautilus-trash-file.c: (trash_callback_check_done), (trash_file_call_when_ready): +======= + Fix tests now that gnome-vfs has a fix for bug 6798 (URI functions + don't always treat domain names as case-insensitive) and fix bug + 6799 (nautilus_uris_match_ignore_fragments gives wrong result for + URIs with trailing "/" characters). +======= +2001-01-28 Andy Hertzfeld - Added an "initializing" field to TrashCallback object. This - is set while connecting the call_when_ready callbacks in - trash_file_call_when_ready (). trash_callback_check_done () - checks this flag and only succeeds when it's false. + added better sizing of components by using size_request, and + a vcard component that graphically renders vcards. + + * components/Makefile.am: + added vcard component + + * components/rss-control/nautilus-rss-control.c: + (nautilus_rss_control_initialize_class), + (nautilus_rss_control_size_request): + added size_request call to rss-control + + * components/vcard/.cvsignore: + * components/vcard/Makefile.am: + * components/vcard/main.c: (vcard_object_destroyed), + (vcard_make_object), (main): + * components/vcard/nautilus-vcard.c: + (nautilus_vcard_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_vcard_initialize), + (nautilus_vcard_destroy), (nautilus_vcard_get_control), + (vcard_logo_callback), (vcard_read_done_callback), (load_vcard), + (nautilus_vcard_set_uri), (vcard_pixbuf_composite), + (draw_vcard_logo_image), (draw_vcard_name_and_title), + (draw_vcard_addresses), (nautilus_vcard_draw), + (nautilus_vcard_expose), (nautilus_vcard_motion_event), + (nautilus_vcard_size_request), (nautilus_vcard_leave_event), + (nautilus_vcard_button_press_event): + * components/vcard/nautilus-vcard.h: + * components/vcard/nautilus-vcard.oaf: + * components/vcard/vcard.c: (vcard_full_name), (vcard_title), + (vcard_logo), (vcard_postal), (vcard_streetaddress), + (vcard_city_state_zip), (vcard_company), (vcard_email), + (vcard_fax), (vcard_web), (vcard_address_list): + * components/vcard/vcard.h: + new vcard component for displaying graphical business cards, not + finished yet + + * configure.in: + added vcard component + + * nautilus-clean.sh: + added vcard to nautilus-clean + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (nautilus_icon_canvas_item_get_icon_width), + (nautilus_icon_canvas_item_get_icon_height), + (nautilus_icon_canvas_item_update_bounds): + better sizing of components + +2001-01-24 Andy Hertzfeld + + added missing files to post-1_0_1 branch, plus some more + development + + * components/rss-control/.cvsignore: + * components/rss-control/Makefile.am: + * components/rss-control/main.c: (rss_control_object_destroyed), + (rss_control_make_object), (main): + * components/rss-control/nautilus-rss-control.c: + (nautilus_rss_control_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_rss_control_initialize), + (free_rss_data_item), (nautilus_rss_control_clear_items), + (nautilus_rss_control_destroy), (nautilus_rss_control_get_control), + (nautilus_rss_control_set_title), (rss_logo_callback), + (rss_read_done_callback), (load_rss_file), + (nautilus_rss_control_set_uri), (rss_control_pixbuf_composite), + (draw_rss_logo_image), (draw_rss_title), (draw_blue_line), + (draw_rss_items), (nautilus_rss_control_draw), + (nautilus_rss_control_expose), + (nautilus_rss_control_set_prelight_index), + (nautilus_rss_control_motion_event), + (nautilus_rss_control_leave_event), + (nautilus_rss_control_button_press_event): + + * components/rss-control/nautilus-rss-control.h: + * components/rss-control/nautilus-rss-control.oafinfo: + + * components/throbber/nautilus-throbber.c: (get_bonobo_properties), + (set_bonobo_properties), (nautilus_throbber_initialize): + + * data/top/Clock: + * data/top/Slashdot: 2001-03-06 Eric Fischer @@ -311,6 +1385,182 @@ Wed Mar 07 00:35:04 2001 George Lebl * README: Note that we now use gnome-vfs HEAD, not a branch any more. +======= + * libnautilus-extensions/Makefile.am: + * libnautilus-extensions/nautilus-directory-metafile-monitor.h: + * libnautilus-extensions/nautilus-directory-metafile-monitor.c: + (nautilus_metafile_monitor_initialize_class), + (nautilus_metafile_monitor_get_epv), + (nautilus_metafile_monitor_get_vepv), + (nautilus_metafile_monitor_create_servant), + (nautilus_metafile_monitor_initialize), (destroy), + (nautilus_metafile_monitor_new), (corba_metafile_changed): + Added implementation of monitors for directories to recieve + notification when their metadata changes. This works across + processes. +======= +2001-01-28 Andy Hertzfeld + + added better sizing of components by using size_request, and + a vcard component that graphically renders vcards. + + * components/Makefile.am: + added vcard component + + * components/rss-control/nautilus-rss-control.c: + (nautilus_rss_control_initialize_class), + (nautilus_rss_control_size_request): + added size_request call to rss-control + + * components/vcard/.cvsignore: + * components/vcard/Makefile.am: + * components/vcard/main.c: (vcard_object_destroyed), + (vcard_make_object), (main): + * components/vcard/nautilus-vcard.c: + (nautilus_vcard_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_vcard_initialize), + (nautilus_vcard_destroy), (nautilus_vcard_get_control), + (vcard_logo_callback), (vcard_read_done_callback), (load_vcard), + (nautilus_vcard_set_uri), (vcard_pixbuf_composite), + (draw_vcard_logo_image), (draw_vcard_name_and_title), + (draw_vcard_addresses), (nautilus_vcard_draw), + (nautilus_vcard_expose), (nautilus_vcard_motion_event), + (nautilus_vcard_size_request), (nautilus_vcard_leave_event), + (nautilus_vcard_button_press_event): + * components/vcard/nautilus-vcard.h: + * components/vcard/nautilus-vcard.oaf: + * components/vcard/vcard.c: (vcard_full_name), (vcard_title), + (vcard_logo), (vcard_postal), (vcard_streetaddress), + (vcard_city_state_zip), (vcard_company), (vcard_email), + (vcard_fax), (vcard_web), (vcard_address_list): + * components/vcard/vcard.h: + new vcard component for displaying graphical business cards, not + finished yet + + * configure.in: + added vcard component + + * nautilus-clean.sh: + added vcard to nautilus-clean + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (nautilus_icon_canvas_item_get_icon_width), + (nautilus_icon_canvas_item_get_icon_height), + (nautilus_icon_canvas_item_update_bounds): + better sizing of components + +2001-01-24 Andy Hertzfeld + + added missing files to post-1_0_1 branch, plus some more + development + + * components/rss-control/.cvsignore: + * components/rss-control/Makefile.am: + * components/rss-control/main.c: (rss_control_object_destroyed), + (rss_control_make_object), (main): + * components/rss-control/nautilus-rss-control.c: + (nautilus_rss_control_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_rss_control_initialize), + (free_rss_data_item), (nautilus_rss_control_clear_items), + (nautilus_rss_control_destroy), (nautilus_rss_control_get_control), + (nautilus_rss_control_set_title), (rss_logo_callback), + (rss_read_done_callback), (load_rss_file), + (nautilus_rss_control_set_uri), (rss_control_pixbuf_composite), + (draw_rss_logo_image), (draw_rss_title), (draw_blue_line), + (draw_rss_items), (nautilus_rss_control_draw), + (nautilus_rss_control_expose), + (nautilus_rss_control_set_prelight_index), + (nautilus_rss_control_motion_event), + (nautilus_rss_control_leave_event), + (nautilus_rss_control_button_press_event): + + * components/rss-control/nautilus-rss-control.h: + * components/rss-control/nautilus-rss-control.oafinfo: + + * components/throbber/nautilus-throbber.c: (get_bonobo_properties), + (set_bonobo_properties), (nautilus_throbber_initialize): + + * data/top/Clock: + * data/top/Slashdot: + +2001-01-24 Andy Hertzfeld + + merged the post-1_0 branch with HEAD 1/23/01 to get this, + the post-1_0_1 branch + + * applets/launcher/nautilus-launcher-applet.c: + * components/Makefile.am: + * components/rss-control/.cvsignore: + * components/rss-control/Makefile.am: + * components/rss-control/main.c: (rss_control_object_destroyed), + (rss_control_make_object), (main): + * components/rss-control/nautilus-rss-control.c: + (nautilus_rss_control_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_rss_control_initialize), + (free_rss_data_item), (nautilus_rss_control_clear_items), + (nautilus_rss_control_destroy), (nautilus_rss_control_get_control), + (nautilus_rss_control_set_title), (rss_logo_callback), + (rss_read_done_callback), (load_rss_file), + (nautilus_rss_control_set_uri), (rss_control_pixbuf_composite), + (draw_rss_logo_image), (draw_rss_title), (draw_blue_line), + (draw_rss_items), (nautilus_rss_control_draw), + (nautilus_rss_control_expose), + (nautilus_rss_control_set_prelight_index), + (nautilus_rss_control_motion_event), + (nautilus_rss_control_leave_event), + (nautilus_rss_control_button_press_event): + * components/rss-control/nautilus-rss-control.h: + * components/rss-control/nautilus-rss-control.oafinfo: + * configure.in: + * data/top/Clock: + * data/top/Makefile.am: + * data/top/Slashdot: + * icons/Makefile.am: + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_get_user_main_directory): + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (nautilus_icon_canvas_item_destroy), + (nautilus_icon_canvas_item_get_icon_width), + (nautilus_icon_canvas_item_get_icon_height), + (nautilus_icon_canvas_item_set_arg), (do_control_destroy), + (nautilus_icon_canvas_item_get_arg), + (nautilus_icon_canvas_item_get_image), (recompute_bounding_box), + (nautilus_icon_canvas_item_update_bounds), + (draw_or_measure_label_text), (emblem_layout_next), + (nautilus_icon_canvas_item_draw), (draw_or_measure_label_text_aa), + (nautilus_icon_canvas_item_render), + (nautilus_icon_canvas_item_bounds), + (nautilus_icon_canvas_item_get_icon_rectangle), + (get_icon_canvas_rectangle), + (nautilus_icon_canvas_item_set_smooth_font), + (nautilus_icon_canvas_item_get_control), + (nautilus_icon_canvas_item_set_control): + * libnautilus-extensions/nautilus-icon-canvas-item.h: + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_initialize_class), + (nautilus_icon_container_update_icon): + * libnautilus-extensions/nautilus-icon-container.h: + * libnautilus-extensions/nautilus-icon-dnd.c: + (nautilus_icon_dnd_begin_drag): + * libnautilus-extensions/nautilus-link.c: + (nautilus_link_local_get_component_info): + * libnautilus-extensions/nautilus-link.h: + * libnautilus-extensions/nautilus-metadata.h: + * src/file-manager/fm-icon-view.c: (get_icon_control_callback), + (create_icon_container): + * src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_hit_test), + (nautilus_sidebar_tabs_select_tab): + * src/nautilus-sidebar.c: (nautilus_sidebar_release_event): + +2001-01-23 Andy Hertzfeld + + fixed bug 6369, sluggish keyboard response in location bar. I improved + this in two different ways: the expansion code is deferred to idle + time now, so it doesn't get in the way of fast typing. Also, the + file info list is cached in memory, so it doesn't have to load it + again for every keystroke. I also made the instance variables + private, instead of being exposed in the .h file. + 2001-03-06 Darin Adler @@ -11923,6 +13173,18479 @@ Thu Feb 22 04:13:13 2001 George Lebl 2001-02-02 Robey Pointer +======= + * components/services/install/lib/Makefile.am: + * components/services/install/lib/eazel-package-system-dpkg.c: + (debpackage_free), (debpackage_fill_packagedata), + (strip_trailing_whitespace), (parse_packages), + (load_package_callback), (eazel_package_system_dpkg_load_package), + (query_callback), (eazel_package_system_dpkg_query), + (eazel_package_system_dpkg_install), + (eazel_package_system_dpkg_uninstall), + (eazel_package_system_dpkg_verify), + (eazel_package_system_dpkg_compare_version), + (eazel_package_system_dpkg_finalize), + (eazel_package_system_dpkg_class_initialize), + (eazel_package_system_dpkg_initialize), + (eazel_package_system_dpkg_get_type), + (eazel_package_system_dpkg_new), + (eazel_package_system_implementation): + * components/services/install/lib/eazel-package-system-dpkg.h: + * components/services/install/lib/eazel-package-system.c: + (eazel_package_system_suggest_id), + (eazel_package_system_load_implementation): + Created a minimal, sub-functional Debian package backend for + libeazelinstall - essentially only enough to allow me to test my + software inventory work on my Debian machines. + + * components/services/inventory/Makefile.am: + * components/services/inventory/eazel-inventory-collect-hardware.c: + (add_device_property), (eazel_inventory_collect_pci), + (ide_get_value), (eazel_inventory_collect_ide), (str_has_prefix), + (add_info), (read_proc_info), (eazel_inventory_collect_memory), + (eazel_inventory_collect_cpu), (eazel_inventory_collect_hardware): + * components/services/inventory/eazel-inventory-collect-hardware.h: + * components/services/inventory/eazel-inventory-collect-software.c: + (str_has_prefix), (get_package_list), + (eazel_inventory_collect_packages), + (eazel_inventory_collect_software): + * components/services/inventory/eazel-inventory-collect-software.h: + * components/services/inventory/eazel-inventory-utils.c: + (eazel_create_configuration_metafile): + Moved software inventory code into eazel-inventory-collect-software.c + and hardware inventory code into eazel-inventory-collect-hardware.c. + Added coded to collect PCI and IDE bus information. + + * components/services/trilobite/libtrilobite/trilobite-core-distrib + ution.c: (determine_suse_version), (determine_debian_version): + Added version check code for SuSE and Debian. + +2001-02-04 Jason Leach + + reviewed by: Maciej Stachowiak + + * nautilus-clean.sh: Update to work with Solaris. + +2001-02-04 Maciej Stachowiak + + * indent.sh: Script that calls indent with the right parameters to + get a GNOME coding style (Nautilus subvariant). + + * components/help/hyperbola-filefmt.c, + components/help/hyperbola-filefmt.h, + components/help/hyperbola-main.c, + components/help/hyperbola-nav-index.c, + components/help/hyperbola-nav-search.c, + components/help/hyperbola-nav-tree.c, + components/help/hyperbola-nav.h, + components/help/hyperbola-types.h: Run indent.sh on these. + +2001-02-03 John Sullivan + + Fixed bug 6254 ("Display" name for grouping in "Folder Views" + category is poor) + + * libnautilus-extensions/nautilus-global-preferences.c: + (global_preferences_install_descriptions), + (global_preferences_create_dialog): Verafied a little text. + +2001-02-03 Eskil Heyn Olsen + + * components/throbber/Makefile.am: + Added the oaf.in files to EXTRA_DIST (tinderbox fix) + +2001-02-03 Gene Z. Ragan + + Do a simple check for NULL instead of using + g_return_if_fail. We don't need the error + reported to the terminal. + + * libnautilus-extensions/nautilus-volume-monitor.c: + (get_removable_volumes), (volume_is_removable), + (volume_is_read_only): + +2001-02-02 Eskil Heyn Olsen + + * components/services/install/command-line/eazel-alt-install-corba. + c: (tree_helper_helper), (tree_helper): + Added check for PackageBreaks iterators. + + * components/services/install/lib/eazel-install-corba-callback.c: + (impl_install_failed): + Leakfix, freeing the list given to the signal handler after + handling. + + * components/services/install/lib/eazel-install-corba-types.c: + (empty_hash_table), + (packagedata_tree_from_corba_packagedatastructlist): + Leakfix, now correctly frees the contents of the md5_hashtable and + unrefs the proper objects. + + * components/services/install/lib/eazel-install-logic2.c: + (eazel_install_check_existing_packages), (get_softcat_info), + (is_satisfied), (is_satisfied_features), + (check_dependencies_foreach), (check_tree_helper), + (add_file_conflict), + (check_conflicts_against_already_installed_packages), + (check_feature_consistency): + Proper fillflags for some EazelPackageSystem calls. + Nicer log-output when debug is off. + Leak fix, the PackageBreaks "objects". + + * components/services/install/lib/eazel-install-problem.c: + (get_detailed_messages_breaks_foreach), + (get_detailed_messages_foreach), + (get_detailed_cases_breaks_foreach), (get_detailed_cases_foreach): + Updated for the new PackageBreaks "objects". + + * components/services/install/lib/eazel-package-system-rpm4.c: + (eazel_package_system_rpm4_query_impl): + s/packagedata_destroy/gtk_object_unref/ + + * components/services/install/lib/eazel-package-system-types.c: + (at_exit_package_data_info), (categorydata_new), + (categorydata_destroy_foreach), (packagedata_finalize), + (packagedata_class_initialize), (packagedata_initialize), + (packagedata_get_readable_name), (packagebreaks_finalize), + (packagebreaks_class_initialize), (packagebreaks_initialize), + (packagefileconflict_finalize), + (packagefileconflict_class_initialize), + (packagefeaturemissing_finalize), + (packagefeaturemissing_class_initialize): + Finally got the destroy crap working for the PackageBreak + "objects". + More leakcheck stuff for various structures. + Again, fixed get_reabable_name. + + * components/services/install/lib/eazel-package-system-types.h: + Added finalizes to the "objects". + Removed packagedata_destroy prototype. + + * components/services/trilobite/libtrilobite/Makefile.am: + Cleanup and possible tinderbox fix. + +2001-02-02 Robey Pointer + + * components/services/install/lib/eazel-install-corba-types.c: + (packagedata_tree_from_corba_packagedatastructlist): + + Fix small bug in the package tree inflater that caused break + structs to be messed up. + + * components/services/install/lib/eazel-softcat.c: + (get_search_url_for_package): + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (create_package), + (nautilus_service_install_view_update_from_uri_finish): + + Encode and decode suite_id/suite_name/product_id/product_name from + eazel-install: urls and pass through to softcat queries. They are + all treated like variant flavors of suite_id internally (group of + packages with a single id). + + * nautilus-installer/src/Makefile: + * nautilus-installer/src/installer.c: + (get_detailed_errors_foreach), (get_detailed_errors), + (eazel_install_preflight), (eazel_installer_set_default_texts), + (eazel_installer_initialize): + + Remove eazel-hacking uninstall, since experts claim we no longer + need it. Some changes to sync up with the new world order where + PackageData is now a GTK object. + + * nautilus-installer/src/package-tree.c: + (find_package_parents_int), (find_package_parents), + (get_errant_children_int), (get_errant_children), + (package_customizer_fill_dep), (package_customizer_fill), + (jump_to_package_tree_page): + + Fix the package customizer to cope with the new world order, where + the package tree is sent across as a directed graph (instead of + tree) and the deps are in 'depends' not 'soft_depends'. + + * nautilus-installer/src/prescript: + + Up version to 1.0. + +2001-02-02 Darin Adler + + reviewed by: John Sullivan + + Fixed bug 6163 (Need NautilusViewFrame :: + report_location_changed). This is re-adding a feature we also had + long ago, where a view reports a location change, but does not + want the location change to come back to it in the form of a + load_location call. + + * src/nautilus-applicable-views.h: + * src/nautilus-applicable-views.c: + (get_view_result_from_gnome_vfs_result), (got_file_info_callback), + (got_minimum_file_info_callback), + (nautilus_determine_initial_view), + (nautilus_determine_initial_view_cancel): Changed this entire file + to have a much easier-to-understand API. + + * src/nautilus-view-frame-private.h: + * src/nautilus-view-frame-corba.c: (free_location_plus_callback): + Change existing structure so it can be used for the location-change + case, which includes a title too. + (open_force_new_window): Use new structure. + (report_location_change): Implement new call. + (impl_Nautilus_ViewFrame_open_location_force_new_window): Use new + structure. + (impl_Nautilus_ViewFrame_report_location_change): Implement new + call. + + * libnautilus/nautilus-view-component.idl: Add the new call. + * libnautilus/nautilus-view.h: + * libnautilus/nautilus-view.c: + (nautilus_view_report_location_change): Add the new call. + + * src/nautilus-view-frame.h: + * src/nautilus-view-frame.c: + (nautilus_view_frame_initialize_class): Add new signal. + (nautilus_view_frame_report_location_change): Implement new call. + + * src/nautilus-window-private.h: + * src/nautilus-window-manage-views.h: + * src/nautilus-window-manage-views.c: (update_for_new_location): + Got rid of obsolete assert. Also, no longer clear the selection. + The selection is set properly earlier, and clearing it at this + point serves no purpose. + (location_has_really_changed): Call free_location_change to share + more code. Also no reason to free "pending_ni" any more, because + we don't keep it around in the success case. + (load_new_location_in_one_view): New name. + (load_new_location_in_sidebar_panels): New name. Also take a + parameter of a view to skip. + (load_new_location_in_all_views): New function. + (set_to_pending_location_and_selection): New name, and removed + code to handle the case where there is no pending location, since + that doesn't happen. Also take a parameter of a view to skip. Also + broke out the guts into load_new_location_in_all_views. + (free_location_change): Free things by their new names. There's + also less to free now. + (cancel_location_change): Key off pending_location instead of + pending_ni. Also save code by using new function that skips a + view. + (determined_initial_view_callback): Changed name, and use new + interface. No longer need "end_reached" trick, because the new + interface handles that. + (begin_location_change): Made a static after moving all the + functions that use it in here. Also moved some of the reload + code out into nautilus_window_reload. + (report_location_change_callback): New function. Does all the + steps neede for a location change in place. + (nautilus_window_back_or_forward), (nautilus_window_reload): Moved + these two functions in here from nautilus-window.c so we could + make begin_location_change more private. + + * src/nautilus-window.h: + * src/nautilus-window.c: (nautilus_window_go_to): Changed the name. + (nautilus_window_get_location): New function for callers that used + to get the location field directly. + (go_to_callback): Changed name. + + * src/nautilus-desktop-window.c: (nautilus_desktop_window_new): + * src/nautilus-location-bar.c: (drag_data_received_callback): + * src/nautilus-shell.c: (open_window), (save_window_states), + (restore_window_states): + * src/nautilus-window-menus.c: (services_button_callback), + (help_menu_nautilus_manual_callback), + (help_menu_nautilus_license_callback), + (help_menu_nautilus_feedback_callback), + (activate_bookmark_in_menu_item): + * src/nautilus-window-service-ui.c: (goto_services_summary), + (goto_online_storage), (goto_software_catalog), + (goto_services_support): + * src/nautilus-window.c: (location_change_at_idle_callback), + (nautilus_window_constructed), (view_as_menu_vfs_method_callback), + (nautilus_window_go_web_search), (nautilus_window_go_home): + Use nautilus_go_to under its new name. + + * src/nautilus-shell.c: (restore_window_states): Use + nautilus_istr_has_prefix instead of g_strncasecmp. Also did other + code cleanup. + + * libnautilus-extensions/nautilus-gtk-extensions.h: Added a new + marshal function that I needed. + + * libnautilus-extensions/nautilus-thumbnails.c: Added a FIXME. + + * libnautilus-extensions/nautilus-view-identifier.h: + * libnautilus-extensions/nautilus-view-identifier.c: + (nautilus_view_identifier_copy), + (nautilus_view_identifier_compare): Use const. + + * src/nautilus-application.c: (nautilus_application_startup): Only + check for root if we are actually running nautilus, not if we are + just killing off an existing copy. + (confirm_ok_to_run_as_root): Changed name of the function and + improved the wording of the message and button. Also added an + environment variable you can set to get rid of this. (Probably + should have been a preference instead, but I am officially being + lazy about this.) + + Fixed bug that was revealed by the change in the loading sequence + I made. John didn't review this part: + + * libnautilus-extensions/nautilus-directory-private.h: + * libnautilus-extensions/nautilus-directory-async.c: + (load_directory_state_destroy), (load_directory_done): + Separate out code to free the partly-done state so it can + be used in the cancel case. + (dequeue_pending_idle_callback): Ref the directory object + so that we won't get messed up if the callback destroys it. + (directory_load_cancel): Separated out the old part of + file_list_cancel so that we can cancel the idle part too + when we want to. + (file_list_cancel): Use the new calls to cancel the idle + part of directory loading. + (directory_load_done): Use directory_load_cancel instead of + file_list_cancel. + (nautilus_directory_stop_monitoring_file_list): Use + directory_load_cancel instead of file_list_cancel. + (nautilus_directory_async_state_changed): Added state variables to + protect cases where we re-enter this function. + +2001-02-02 Ramiro Estrugo + + reviewed by: Michael Engber + + * applets/preferences-applet/nautilus-preferences-applet.c: + (restart_button_clicked_callback), (main): + Add a restart button. + +2001-02-02 Gene Z. Ragan + + Fixed a small bug where I was assuming a value would be valid + when it could be NULL. Now I check for NULL. + + * src/nautilus-application.c: (volume_unmounted_callback): + +2001-02-02 Brett Neely + + reviewed by: Eric Fischer + + * nautilus-clean.sh: + Kill oafd last so nautilus-clean.sh -x only needs to be run once. + +2001-02-02 Gene Z. Ragan + + reviewed by: Maciej Stachowiak + + Fixed bug 5222, + Nautilus allows users to rename .Trash (but not copy or link) + + * libnautilus-extensions/nautilus-file-utilities.c: + * libnautilus-extensions/nautilus-file-utilities.h: + (nautilus_uri_is_trash_folder): + Utility function to indentify if the folder is trash based + on a text uri. + + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_can_rename): + Call nautilus_uri_is_trash_folder to identify a trash + folder and disallow renaming. + +2001-02-02 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 5749 (bookmarks are untranslated) + + * data/static_bookmarks.xml: + An earlier checkin to update the bookmarks stripped off + all the underscores from "_name=" strings, which was what + was causing them to be translated. Fixed by returning the + underscores. + +2001-02-02 Ramiro Estrugo + + * applets/preferences-applet/nautilus-preferences-applet.c: + (boolean_toggle_button_new), (start_button_clicked_callback), + (main): + Add a Nautilus start button. Also make the fonts smaller to + conserver panel space. + +2001-02-02 Ramiro Estrugo + + reviewed by: Maciej Stachowiak + + Fix bug 6131 - NautilusLabel does not support proper line wrap. + Its fixed for smooth mode. Theres a bug (6243) for the more + complicated issue of wrapping in non smooth mode. + + * libnautilus-extensions/nautilus-label.h: + * libnautilus-extensions/nautilus-label.c: + (nautilus_label_initialize_class), (nautilus_label_set_arg), + (nautilus_label_get_arg), (nautilus_label_size_allocate), + (nautilus_label_set_never_smooth), + (nautilus_label_set_adjust_wrap_on_resize), + (nautilus_label_get_adjust_wrap_on_resize): + Add a boolean attribute 'adjust_wrap_on_resize' that controls + whether the label will automatically update its line wrap width + when its resized. + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (summary_view_item_label_new), (summary_load_location_callback): + No longer need size_allocate hack. Use NautilusLabel's + 'adjust_wrap_on_resize' attribute instead. + + * test/test-nautilus-label-wrapped.c: (create_nautilus_label), + (create_gtk_label_window), (create_nautilus_label_window), (main): + Update for 'adjust_wrap_on_resize'. + +2001-02-01 Maciej Stachowiak + + reviewed by: Pavel Cisler + + Fix bug 4678 (Clicking on a Nautilus link file in tree view causes + Nautilus cannot handle item type error box). + + * components/tree/nautilus-tree-view.c: + (nautilus_tree_view_destroy), (got_activation_uri_callback), + (cancel_possible_activation), (tree_select_row_callback): Activate + activation URI instead of file URI to support Nautilus links + properly. If the link resolves to a "command:" URI, however, + silently ignore it to avoid giving an ugly error message because + per John Sullivan, selecting things in the tree view should not + launch apps. + + * components/tree/nautilus-tree-view-private.h: Added + activation_uri_wait_file field to details struct. + + * data/top/Computer, data/top/Services: Updated to new nautilus + link format. + +2001-02-02 Robey Pointer + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (flatten_package_tree_foreach): + + Fix build breakage caused by my previous checkin. + +2001-02-02 Robey Pointer + +======= + (eazel_install_check_existing_packages), (get_softcat_info), + (is_satisfied), (is_satisfied_features), + (check_dependencies_foreach), (check_tree_helper), + (add_file_conflict), + (check_conflicts_against_already_installed_packages), + (check_feature_consistency): + Proper fillflags for some EazelPackageSystem calls. + Nicer log-output when debug is off. + Leak fix, the PackageBreaks "objects". + + * components/services/install/lib/eazel-install-problem.c: + (get_detailed_messages_breaks_foreach), + (get_detailed_messages_foreach), + (get_detailed_cases_breaks_foreach), (get_detailed_cases_foreach): + Updated for the new PackageBreaks "objects". + + * components/services/install/lib/eazel-package-system-rpm4.c: + (eazel_package_system_rpm4_query_impl): + s/packagedata_destroy/gtk_object_unref/ + + * components/services/install/lib/eazel-package-system-types.c: + (at_exit_package_data_info), (categorydata_new), + (categorydata_destroy_foreach), (packagedata_finalize), + (packagedata_class_initialize), (packagedata_initialize), + (packagedata_get_readable_name), (packagebreaks_finalize), + (packagebreaks_class_initialize), (packagebreaks_initialize), + (packagefileconflict_finalize), + (packagefileconflict_class_initialize), + (packagefeaturemissing_finalize), + (packagefeaturemissing_class_initialize): + Finally got the destroy crap working for the PackageBreak + "objects". + More leakcheck stuff for various structures. + Again, fixed get_reabable_name. + + * components/services/install/lib/eazel-package-system-types.h: + Added finalizes to the "objects". + Removed packagedata_destroy prototype. + + * components/services/trilobite/libtrilobite/Makefile.am: + Cleanup and possible tinderbox fix. + +2001-02-02 Robey Pointer + + * components/services/install/lib/eazel-install-corba-types.c: + (packagedata_tree_from_corba_packagedatastructlist): + + Fix small bug in the package tree inflater that caused break + structs to be messed up. + + * components/services/install/lib/eazel-softcat.c: + (get_search_url_for_package): + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (create_package), + (nautilus_service_install_view_update_from_uri_finish): + + Encode and decode suite_id/suite_name/product_id/product_name from + eazel-install: urls and pass through to softcat queries. They are + all treated like variant flavors of suite_id internally (group of + packages with a single id). + + * nautilus-installer/src/Makefile: + * nautilus-installer/src/installer.c: + (get_detailed_errors_foreach), (get_detailed_errors), + (eazel_install_preflight), (eazel_installer_set_default_texts), + (eazel_installer_initialize): + + Remove eazel-hacking uninstall, since experts claim we no longer + need it. Some changes to sync up with the new world order where + PackageData is now a GTK object. + + * nautilus-installer/src/package-tree.c: + (find_package_parents_int), (find_package_parents), + (get_errant_children_int), (get_errant_children), + (package_customizer_fill_dep), (package_customizer_fill), + (jump_to_package_tree_page): + + Fix the package customizer to cope with the new world order, where + the package tree is sent across as a directed graph (instead of + tree) and the deps are in 'depends' not 'soft_depends'. + + * nautilus-installer/src/prescript: + + Up version to 1.0. + +2001-02-02 Darin Adler + + reviewed by: John Sullivan + + Fixed bug 6163 (Need NautilusViewFrame :: + report_location_changed). This is re-adding a feature we also had + long ago, where a view reports a location change, but does not + want the location change to come back to it in the form of a + load_location call. + + * src/nautilus-applicable-views.h: + * src/nautilus-applicable-views.c: + (get_view_result_from_gnome_vfs_result), (got_file_info_callback), + (got_minimum_file_info_callback), + (nautilus_determine_initial_view), + (nautilus_determine_initial_view_cancel): Changed this entire file + to have a much easier-to-understand API. + + * src/nautilus-view-frame-private.h: + * src/nautilus-view-frame-corba.c: (free_location_plus_callback): + Change existing structure so it can be used for the location-change + case, which includes a title too. + (open_force_new_window): Use new structure. + (report_location_change): Implement new call. + (impl_Nautilus_ViewFrame_open_location_force_new_window): Use new + structure. + (impl_Nautilus_ViewFrame_report_location_change): Implement new + call. + + * libnautilus/nautilus-view-component.idl: Add the new call. + * libnautilus/nautilus-view.h: + * libnautilus/nautilus-view.c: + (nautilus_view_report_location_change): Add the new call. + + * src/nautilus-view-frame.h: + * src/nautilus-view-frame.c: + (nautilus_view_frame_initialize_class): Add new signal. + (nautilus_view_frame_report_location_change): Implement new call. + + * src/nautilus-window-private.h: + * src/nautilus-window-manage-views.h: + * src/nautilus-window-manage-views.c: (update_for_new_location): + Got rid of obsolete assert. Also, no longer clear the selection. + The selection is set properly earlier, and clearing it at this + point serves no purpose. + (location_has_really_changed): Call free_location_change to share + more code. Also no reason to free "pending_ni" any more, because + we don't keep it around in the success case. + (load_new_location_in_one_view): New name. + (load_new_location_in_sidebar_panels): New name. Also take a + parameter of a view to skip. + (load_new_location_in_all_views): New function. + (set_to_pending_location_and_selection): New name, and removed + code to handle the case where there is no pending location, since + that doesn't happen. Also take a parameter of a view to skip. Also + broke out the guts into load_new_location_in_all_views. + (free_location_change): Free things by their new names. There's + also less to free now. + (cancel_location_change): Key off pending_location instead of + pending_ni. Also save code by using new function that skips a + view. + (determined_initial_view_callback): Changed name, and use new + interface. No longer need "end_reached" trick, because the new + interface handles that. + (begin_location_change): Made a static after moving all the + functions that use it in here. Also moved some of the reload + code out into nautilus_window_reload. + (report_location_change_callback): New function. Does all the + steps neede for a location change in place. + (nautilus_window_back_or_forward), (nautilus_window_reload): Moved + these two functions in here from nautilus-window.c so we could + make begin_location_change more private. + + * src/nautilus-window.h: + * src/nautilus-window.c: (nautilus_window_go_to): Changed the name. + (nautilus_window_get_location): New function for callers that used + to get the location field directly. + (go_to_callback): Changed name. + + * src/nautilus-desktop-window.c: (nautilus_desktop_window_new): + * src/nautilus-location-bar.c: (drag_data_received_callback): + * src/nautilus-shell.c: (open_window), (save_window_states), + (restore_window_states): + * src/nautilus-window-menus.c: (services_button_callback), + (help_menu_nautilus_manual_callback), + (help_menu_nautilus_license_callback), + (help_menu_nautilus_feedback_callback), + (activate_bookmark_in_menu_item): + * src/nautilus-window-service-ui.c: (goto_services_summary), + (goto_online_storage), (goto_software_catalog), + (goto_services_support): + * src/nautilus-window.c: (location_change_at_idle_callback), + (nautilus_window_constructed), (view_as_menu_vfs_method_callback), + (nautilus_window_go_web_search), (nautilus_window_go_home): + Use nautilus_go_to under its new name. + + * src/nautilus-shell.c: (restore_window_states): Use + nautilus_istr_has_prefix instead of g_strncasecmp. Also did other + code cleanup. + + * libnautilus-extensions/nautilus-gtk-extensions.h: Added a new + marshal function that I needed. + + * libnautilus-extensions/nautilus-thumbnails.c: Added a FIXME. + + * libnautilus-extensions/nautilus-view-identifier.h: + * libnautilus-extensions/nautilus-view-identifier.c: + (nautilus_view_identifier_copy), + (nautilus_view_identifier_compare): Use const. + + * src/nautilus-application.c: (nautilus_application_startup): Only + check for root if we are actually running nautilus, not if we are + just killing off an existing copy. + (confirm_ok_to_run_as_root): Changed name of the function and + improved the wording of the message and button. Also added an + environment variable you can set to get rid of this. (Probably + should have been a preference instead, but I am officially being + lazy about this.) + + Fixed bug that was revealed by the change in the loading sequence + I made. John didn't review this part: + + * libnautilus-extensions/nautilus-directory-private.h: + * libnautilus-extensions/nautilus-directory-async.c: + (load_directory_state_destroy), (load_directory_done): + Separate out code to free the partly-done state so it can + be used in the cancel case. + (dequeue_pending_idle_callback): Ref the directory object + so that we won't get messed up if the callback destroys it. + (directory_load_cancel): Separated out the old part of + file_list_cancel so that we can cancel the idle part too + when we want to. + (file_list_cancel): Use the new calls to cancel the idle + part of directory loading. + (directory_load_done): Use directory_load_cancel instead of + file_list_cancel. + (nautilus_directory_stop_monitoring_file_list): Use + directory_load_cancel instead of file_list_cancel. + (nautilus_directory_async_state_changed): Added state variables to + protect cases where we re-enter this function. + +2001-02-02 Ramiro Estrugo + + reviewed by: Michael Engber + + * applets/preferences-applet/nautilus-preferences-applet.c: + (restart_button_clicked_callback), (main): + Add a restart button. + +2001-02-02 Gene Z. Ragan + + Fixed a small bug where I was assuming a value would be valid + when it could be NULL. Now I check for NULL. + + * src/nautilus-application.c: (volume_unmounted_callback): + +2001-02-02 Brett Neely + + reviewed by: Eric Fischer + + * nautilus-clean.sh: + Kill oafd last so nautilus-clean.sh -x only needs to be run once. + +2001-02-02 Gene Z. Ragan + + reviewed by: Maciej Stachowiak + + Fixed bug 5222, + Nautilus allows users to rename .Trash (but not copy or link) + + * libnautilus-extensions/nautilus-file-utilities.c: + * libnautilus-extensions/nautilus-file-utilities.h: + (nautilus_uri_is_trash_folder): + Utility function to indentify if the folder is trash based + on a text uri. + + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_can_rename): + Call nautilus_uri_is_trash_folder to identify a trash + folder and disallow renaming. + +2001-02-02 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 5749 (bookmarks are untranslated) + + * data/static_bookmarks.xml: + An earlier checkin to update the bookmarks stripped off + all the underscores from "_name=" strings, which was what + was causing them to be translated. Fixed by returning the + underscores. + +2001-02-02 Ramiro Estrugo + + * applets/preferences-applet/nautilus-preferences-applet.c: + (boolean_toggle_button_new), (start_button_clicked_callback), + (main): + Add a Nautilus start button. Also make the fonts smaller to + conserver panel space. + +2001-02-02 Ramiro Estrugo + + reviewed by: Maciej Stachowiak + + Fix bug 6131 - NautilusLabel does not support proper line wrap. + Its fixed for smooth mode. Theres a bug (6243) for the more + complicated issue of wrapping in non smooth mode. + + * libnautilus-extensions/nautilus-label.h: + * libnautilus-extensions/nautilus-label.c: + (nautilus_label_initialize_class), (nautilus_label_set_arg), + (nautilus_label_get_arg), (nautilus_label_size_allocate), + (nautilus_label_set_never_smooth), + (nautilus_label_set_adjust_wrap_on_resize), + (nautilus_label_get_adjust_wrap_on_resize): + Add a boolean attribute 'adjust_wrap_on_resize' that controls + whether the label will automatically update its line wrap width + when its resized. + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (summary_view_item_label_new), (summary_load_location_callback): + No longer need size_allocate hack. Use NautilusLabel's + 'adjust_wrap_on_resize' attribute instead. + + * test/test-nautilus-label-wrapped.c: (create_nautilus_label), + (create_gtk_label_window), (create_nautilus_label_window), (main): + Update for 'adjust_wrap_on_resize'. + +2001-02-01 Maciej Stachowiak + + reviewed by: Pavel Cisler + + Fix bug 4678 (Clicking on a Nautilus link file in tree view causes + Nautilus cannot handle item type error box). + + * components/tree/nautilus-tree-view.c: + (nautilus_tree_view_destroy), (got_activation_uri_callback), + (cancel_possible_activation), (tree_select_row_callback): Activate + activation URI instead of file URI to support Nautilus links + properly. If the link resolves to a "command:" URI, however, + silently ignore it to avoid giving an ugly error message because + per John Sullivan, selecting things in the tree view should not + launch apps. + + * components/tree/nautilus-tree-view-private.h: Added + activation_uri_wait_file field to details struct. + + * data/top/Computer, data/top/Services: Updated to new nautilus + link format. + +2001-02-02 Robey Pointer + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (flatten_package_tree_foreach): + + Fix build breakage caused by my previous checkin. + +2001-02-02 Robey Pointer + + * src/file-manager/fm-desktop-icon-view.c: + (update_home_link_and_delete_copies), (real_update_menus): + * src/file-manager/fm-directory-view.c: (open_location), + (confirm_delete_from_trash), (real_update_menus), + (fm_directory_view_activate_files), (filtering_changed_callback): + * src/file-manager/fm-icon-text-window.c: + (changed_attributes_option_menu_callback), + (fm_get_text_attribute_names_preference_or_default): + * src/file-manager/fm-icon-view.c: (should_preview_sound), + (fm_icon_view_update_click_mode), + (fm_icon_view_update_smooth_graphics_mode): + * src/file-manager/fm-list-view.c: + (fm_list_view_update_click_mode): + * src/file-manager/fm-properties-window.c: + (create_permissions_page): + * src/nautilus-application.c: (desktop_changed_callback): + * src/nautilus-complex-search-bar.c: + (nautilus_complex_search_bar_get_location): + * src/nautilus-first-time-druid.c: (user_level_selection_changed), + (make_hbox_user_level_radio_button), (set_up_user_level_page): + * src/nautilus-main.c: (main): + * src/nautilus-property-browser.c: + (nautilus_property_browser_update_contents): + * src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled), + (toggle_sidebar_panel), (nautilus_sidebar_size_allocate): + * src/nautilus-switchable-search-bar.c: + (nautilus_switchable_search_bar_new), + (nautilus_search_uri_to_search_bar_mode): + Update for preferences api changes. + + * src/nautilus-window-manage-views.c: + (position_and_show_window_callback), + (nautilus_window_end_location_change_callback): + Update for preferences api changes. Also, no longer need to pass + in a default location to the preferences getter. + + * src/nautilus-window-menus.c: (user_level_customize_callback), + (switch_to_user_level), (refresh_bookmarks_menu), + (user_level_changed_callback), (add_user_level_menu_item), + (nautilus_window_initialize_menus), (update_user_level_menu_items), + (convert_user_level_to_path): + A lot of simplification. The "Edit Settings..." menu item no + longer changes it wording based on the user level. We know allow + it to edit settings on all user levels, since we have the ability + to hide preferences at higher user levels. No longer need to + update the preferences dialog or its title. + + * src/nautilus-window.c: (nautilus_window_constructed), + (nautilus_window_close), (nautilus_window_go_web_search), + (nautilus_window_go_home), (nautilus_window_show): + Update for preferences api changes. + + * libnautilus-extensions/nautilus-global-preferences.h: + Update all the preferences defines to not include a full gconf + path. We dont need to do this anymore to get non user level + coupled prefernces. + + * libnautilus-extensions/nautilus-global-preferences.c: + (compare_view_identifiers), (global_preferences_create_dialog), + (nautilus_global_preferences_get_enabled_sidebar_panel_view_identif + iers), (global_preferences_install_sidebar_panel_defaults), + (global_preferences_is_sidebar_panel_enabled), + (global_preferences_install_speed_tradeoff_descriptions), + (register_proxy_preferences), (global_preferences_register), + (global_preferences_install_defaults), + (nautilus_global_preferences_set_dialog_title): + Lots of changes to support new preferences design. + + Set the WM_CLASS here once instead of everytime the dialog title + is changed. This was causing criticals. + + No longer need to create parallel proxy preferences and map them + to the gconf ones. We can use the gconf ones directly now. + + * test/.cvsignore: + * test/Makefile.am: + * test/test-nautilus-preferences-change.c: + (user_level_changed_callback), (fruits_changed_callback), + (int_picker_changed_callback), + (user_level_picker_changed_callback), (picker_new), + (user_level_picker_new), (main): + * test/test-nautilus-preferences-display.c: (text_caption_update), + (user_level_caption_update), (user_level_changed_callback), + (green_changed_callback), (yellow_changed_callback), + (red_changed_callback), (apple_changed_callback), + (orange_changed_callback), (pear_changed_callback), (entry_new), + (user_level_frame_new), (colors_frame_new), (fruits_frame_new), + (main): + * test/test.c: (test_pixbuf_draw_rectangle_tiled), + (test_text_caption_set_text_for_int_preferences), + (test_text_caption_set_text_for_string_preferences), + (test_text_caption_set_text_for_default_int_preferences), + (test_text_caption_set_text_for_default_string_preferences), + (test_text_caption_get_text_as_int), + (test_window_set_title_with_pid): + * test/test.h: + New tests for preferences changes. + + * test/test-nautilus-preferences.c: + Retire old prefs test which didnt really work. + + * test/test-nautilus-smooth-graphics.c: + (smooth_graphics_mode_changed_callback), (main): + Update for preferences api changes. + +2001-01-24 Andy Hertzfeld + + merged the post-1_0 branch with HEAD 1/23/01 to get this, + the post-1_0_1 branch + + * applets/launcher/nautilus-launcher-applet.c: + * components/Makefile.am: + * components/rss-control/.cvsignore: + * components/rss-control/Makefile.am: + * components/rss-control/main.c: (rss_control_object_destroyed), + (rss_control_make_object), (main): + * components/rss-control/nautilus-rss-control.c: + (nautilus_rss_control_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_rss_control_initialize), + (free_rss_data_item), (nautilus_rss_control_clear_items), + (nautilus_rss_control_destroy), (nautilus_rss_control_get_control), + (nautilus_rss_control_set_title), (rss_logo_callback), + (rss_read_done_callback), (load_rss_file), + (nautilus_rss_control_set_uri), (rss_control_pixbuf_composite), + (draw_rss_logo_image), (draw_rss_title), (draw_blue_line), + (draw_rss_items), (nautilus_rss_control_draw), + (nautilus_rss_control_expose), + (nautilus_rss_control_set_prelight_index), + (nautilus_rss_control_motion_event), + (nautilus_rss_control_leave_event), + (nautilus_rss_control_button_press_event): + * components/rss-control/nautilus-rss-control.h: + * components/rss-control/nautilus-rss-control.oafinfo: + * configure.in: + * data/top/Clock: + * data/top/Makefile.am: + * data/top/Slashdot: + * icons/Makefile.am: + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_get_user_main_directory): + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (nautilus_icon_canvas_item_destroy), + (nautilus_icon_canvas_item_get_icon_width), + (nautilus_icon_canvas_item_get_icon_height), + (nautilus_icon_canvas_item_set_arg), (do_control_destroy), + (nautilus_icon_canvas_item_get_arg), + (nautilus_icon_canvas_item_get_image), (recompute_bounding_box), + (nautilus_icon_canvas_item_update_bounds), + (draw_or_measure_label_text), (emblem_layout_next), + (nautilus_icon_canvas_item_draw), (draw_or_measure_label_text_aa), + (nautilus_icon_canvas_item_render), + (nautilus_icon_canvas_item_bounds), + (nautilus_icon_canvas_item_get_icon_rectangle), + (get_icon_canvas_rectangle), + (nautilus_icon_canvas_item_set_smooth_font), + (nautilus_icon_canvas_item_get_control), + (nautilus_icon_canvas_item_set_control): + * libnautilus-extensions/nautilus-icon-canvas-item.h: + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_initialize_class), + (nautilus_icon_container_update_icon): + * libnautilus-extensions/nautilus-icon-container.h: + * libnautilus-extensions/nautilus-icon-dnd.c: + (nautilus_icon_dnd_begin_drag): + * libnautilus-extensions/nautilus-link.c: + (nautilus_link_local_get_component_info): + * libnautilus-extensions/nautilus-link.h: + * libnautilus-extensions/nautilus-metadata.h: + * src/file-manager/fm-icon-view.c: (get_icon_control_callback), + (create_icon_container): + * src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_hit_test), + (nautilus_sidebar_tabs_select_tab): + * src/nautilus-sidebar.c: (nautilus_sidebar_release_event): + +2001-01-23 Andy Hertzfeld + + * src/nautilus-theme-selector.c: (remove_button_callback), + (exit_remove_mode): + fixed recently introduced problem where it was still + treating button labels as nautilus_labels instead of + gtk_labels. + +2001-01-23 Andy Hertzfeld + + * src/nautilus-theme-selector.c: + (nautilus_theme_selector_initialize), (remove_button_callback), + (exit_remove_mode): + fixed bug 5972, remove theme button uses aa text, by using + a gtk_label instead of a nautilus_label. + + * libnautilus-extensions/nautilus-theme.c: + (nautilus_theme_make_selector): + fixed a crash when an installed theme lacked a preview icon, + cleaned up code and fixed a memory leak. + +2001-01-17 Andy Hertzfeld + + changed the throbber component to use the new translated oaf file + scheme. The throbber still doesn't show up, due to recent bonobo + changes, which I'm looking into further. + + * components/throbber/.cvsignore: + cvs should ignore the translated oaf file + * components/throbber/Makefile.am: + change use of oaf files + * components/throbber/Nautilus_Control_throbber.oaf.in: + added new style oaf file\ + * components/throbber/nautilus-throbber.oafinfo: + removed the old file + * src/nautilus-window-toolbars.c: + (nautilus_window_initialize_toolbars): + more descriptive message when we get an exception + +2001-01-17 Pavel Cisler + + * libnautilus-extensions/nautilus-self-checks.c: + (nautilus_report_check_failure), (nautilus_before_check_function): + Make make check results go to stderror. + +2001-01-17 John Harper + + reviewed by: Pavel Cisler + + Work to fix bugs 1939 and 4614 -- text in list view is hard to + read when the foreground color specified by the gtk theme + conflicts with the background colors: + + * libnautilus-extensions/nautilus-gdk-extensions.h, + libnautilus-extensions/nautilus-gdk-extensions.c + (nautilus_gdk_color_is_dark, + nautilus_gdk_choose_foreground_color, + nautilus_gdk_gc_choose_foreground_color): new functions, used + for testing whether a foreground/background color pair is + suitable for drawing text, and if not, choosing a new + foreground color + + * libnautilus-extensions/nautilus-list.c (NautilusListDetails): + added gc fields: text_color, selected_text_color, link_text_color + (unref_gcs, make_gcs_and_colors): handle the new gcs + + (nautilus_list_setup_style_colors): use + nautilus_gdk_gc_set_foreground_color () to create the gcs that + will be used for drawing text + + (draw_cell): when drawing text cells, don't use the default + foreground gc, use one of the specially chosen gcs + +2001-01-17 Rebecca Schulman + + * src/file-manager/nautilus-indexing-info.c: + (update_file_index_callback), (show_indexing_info_dialog): + Make changes necessary because of the slight change in the + medusa_indexing_service api, and change "hide when closed" + on the index status dialig to TRUE. We still need to free + the dialog when we exit nautilus (Added a fixme) but + setting this value to false caused us to reference + the freed dialog. + +2001-01-17 Andy Hertzfeld + + fixed bugs 5674, 5697 and 5699, Nautilus shows a broken image + icon instead of a mime-type icon for image types that it doesn't + support. Fixed by generating a zero-length placeholder thumbnail + instead of the broken image icon; the icon factory tests for the + placeholder and uses the proper mime-type icon when it's present. + + * libnautilus-extensions/nautilus-icon-factory.c: + (should_display_image_file_as_itself), + (nautilus_icon_factory_get_icon_for_file): + made should_display_image_file_as_itself return FALSE when the + placeholder is present. + + * libnautilus-extensions/nautilus-thumbnails.c: + (make_invalid_thumbnail_uri), + (nautilus_thumbnail_has_invalid_thumbnail), (check_for_thumbnails): + added routine to test if a placeholder is present, and made it + generate the placeholder when thumbnailing fails. + + * libnautilus-extensions/nautilus-thumbnails.h: + added nautilus_thumbnail_has_invalid_thumbnail + +2001-01-17 Darin Adler + + * libnautilus-extensions/nautilus-self-checks.h: + * libnautilus-extensions/nautilus-self-checks.c: + (nautilus_before_check_function), (nautilus_after_check_function): + Write the names of the self-check functions as we run them. + Maybe this will help us figure out what's up with the Tinderbox. + +2001-01-17 Rebecca Schulman + + reviewed by: John Sullivan + + * src/nautilus-complex-search-bar.c: + (nautilus_complex_search_bar_initialize): + Remove some spacing settings that caused the + "More Options", "Fewer Options" and "Find Them" + buttons in the search bar too have way too much + space beneath them, fixing bug 4917 + * src/nautilus-window-private.h: + Up the minimum width of nautilus so that + the search controls are always still + readable (from 450 to 480). However, + this does not guarantee that on all + configurations you wil be able to see the + controls, but it should for the default case. + +2001-01-17 Ian McKellar + + reviewed by: Mike Fleming + + * components/services/summary/nautilus-view/nautilus-summary-dialog + s.c: (generate_login_dialog): + * components/services/summary/nautilus-view/nautilus-summary-view-p + rivate.h: + Keep track of the currently displayed login dialog (for each view). + If a login dialog is open when a dialog open request is recieved, + close the old one. + +2001-01-17 Andy Hertzfeld + + * components/throbber/main.c: (main): + * components/throbber/nautilus-throbber.c: + (nautilus_throbber_destroy): + fixed problem that Pavel pointed out where the throbber + component is left around after Nautilus exists, by calling + gnome_vfs_shutdown when we exit, and also unrefing the + throbber's bonobo control when the widget is destroyed. + +2001-01-17 Andy Hertzfeld + + reviewed by: + + * src/nautilus-window-manage-views.c: (unref_callback), + (ref_now_unref_at_idle_time), (location_has_really_changed), + (load_underway_callback): + this is actually Darin's change, checked in by Andy, that's a + better fix for bug 5657, the "destroying components messes up + idle routines" crash. Instead of deferring the window state change + to idle time, it does an extra ref of the view and unrefs it when + idle rolls around. + +2001-01-16 Eskil Olsen + + reviewed by: Darin Adler + + * libnautilus-extensions/nautilus-view-identifier.c: + (get_lang_list): + LANG might contain an underscore, so add both the la_LC var, + but also only the la to the list. This fixes the "View as xxx" + translation issue. + +2001-01-17 Pavel Cisler + + Fix 5188: Duplicate in list view -> Nautilus crashes. + + * src/file-manager/fm-directory-view.c: + (fm_directory_view_duplicate_selection): + It was really only an inaccurate assert. + +2001-01-16 Ian McKellar + + reviewed by: Darin Adler + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_service_install_preflight_check): + Removed check that package has been installed in preflight check + because this will never occur. + + (nautilus_install_service_describe_menu_entry), + Added this function which is used to generate a text description + of a menu item. + + (nautilus_install_service_locate_menu_entries), + Check for files in an /applnk/ directories as well as in /gnome/apps/ + directories. Closed GnomeDesktopEntry leak. + + (nautilus_service_install_done), + Implement the equivalent of the preflight check that I removed, + but at a point where we know whether the install has succeed, failed, + been cancelled or been struck by lightning. + + (nautilus_service_install_view_load_uri): + Reset some state variables, so that some weird random things + don't happen. + +2001-01-16 Mike Fleming + + Dialog re-wording suggested by Vera. + + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.c: (authn_cb_failed): + +2001-01-16 Pavel Cisler + + Fix 5511: Dropping a file in same folder asks about replacing it. + Fix 5606: Left drag into window where file exists deletes file. + + * src/file-manager/fm-list-view.c: (fm_list_receive_dropped_icons): + During a file move, add a check to see if the dragged items are in the + target directory. + + * libnautilus-extensions/nautilus-list.c: + (nautilus_list_get_drop_action): + Tiny tweak. + +2001-01-16 Michael Engber + + * libnautilus-extensions/nautilus-directory-background.c: + Removed comment detailing differences with the background-capplet + code since I just propagated the same fixes to the capplet. + +2001-01-16 Andy Hertzfeld + + * src/file-manager/fm-properties-window.c: + (property_button_focused_out), (create_emblems_page): + fixed bug 5572, black rectangle left behind after clicking + on an emblem in Properties window, by attaching to the + focus_out signal and redrawing + + * src/nautilus-property-browser.c: + (nautilus_property_browser_initialize), + (nautilus_property_browser_destroy), + (nautilus_property_browser_theme_changed), + (nautilus_property_browser_smooth_graphics_changed): + fixed some of bug 5614, label text in property browser is + corrupted when smooth text option changed, by monitoring the + smooth_graphics preference and updating when it changes. The + rest of this bug will be fixed when Ramiro fixes the nautilus_label + geometry problems as part of bug 5607 + + * components/text/nautilus-text-view.c: (file_read_callback): + corrected the name of the "file too big to load" dialog + +2001-01-16 Michael Engber + + reviewed by: Gene Z. Ragan + + * libnautilus-extensions/nautilus-directory-background.c: + (nautilus_gnome_config_string_match_no_case_with_default), + (nautilus_file_background_read_desktop_settings): + Use theme defaults for desktop background when ~/.gnome/Background + is missing. + +2001-01-16 Seth Nickell + + reviewed by: Darin Adler + + * libnautilus-extensions/nautilus-directory-metafile.c: + (nautilus_directory_rename_file_metadata), + (nautilus_directory_remove_file_metadata): + * libnautilus-extensions/nautilus-file.c: + (sort_keyword_list_and_remove_duplicates): + + Add casts to strcmp's performed on gpointers so they will + not generate warnings. + +2001-01-16 John Sullivan + + reviewed by: Pavel Cisler + + More work on bug 2146 (Properties window for desktop Trash icon + should show Trash properties). Mostly this was clean-up of the + properties window code to make future changes easier. The only + substantive change is to remove the "Type" field for the trash. + + * src/file-manager/fm-properties-window.c: + Removed enums for basic page and permissions page row numbers. + The rows are now added (and table sized) as needed. + (append_row): New helper function, appends one row to a GtkTable + and returns the index of the new last row. + (append_title_field): New function, like attach_title_field + but appends row instead of taking a row parameter. + (append_separator), (append_directory_contents_fields), + (append_title_value_pair), (append_special_execution_checkbox), + (append_special_execution_flags): Renamed from attach_xxx, now + append a row instead of taking a row parameter. + (create_page_with_table_in_vbox): Now returns GtkTable * instead + of GtkWidget *, for callers' convenience. + (get_adjusted_permissions_row): Removed this somewhat hacky function. + (should_show_file_type): New function, returns FALSE for + special trash location but TRUE for everything else. + (create_basic_page): Check should_show_file_type; use new + append_xxx calls instead of using predefined row numbers. + (create_permissions_page): use new append_xxx calls instead of + using predefined row numbers. + +2001-01-16 Gene Z. Ragan + + Fixed mistake in asserting on a NULL value. Assert if the + value is NULL, not non-NULL. + + * libnautilus-extensions/nautilus-file-operations.c: + (extract_and_ellipsize_file_name_for_dialog): + +2001-01-16 Darin Adler + + reviewed by: Gene Ragan + + * libnautilus-extensions/nautilus-file-operations.c: + (get_label_font): It's illegal to unref a new widget since you + don't own a ref to it. Sink it instead. + (ellipsize_string_for_dialog): New function. + (format_and_ellipsize_uri_for_dialog): Rename this function and + change it to use nautilus_format_uri_for_display. Also add FIXME + about where the ellipsis goes. + (extract_and_ellipsize_file_name_for_dialog): Added a seprate + function for the case where we want to extract the file name + part only. The old code mixed the URI and file name cases in a + way that would lead to anomalies with unusual names. + (handle_transfer_vfs_error): Fixed storage leak. + (is_special_link): Rewrote this function and also made it take + a URI in text form, not a GnomeVFSURI. + (handle_transfer_overwrite): Use is_special_link instead of + duplicate its test. Removed incorrect use of NautilusFile (without + waiting for results). Added quotes around file name in + message. Use extract_and_ellipsize_file_name_for_dialog instead of + our own ad-hoc functions. + (make_next_duplicate_name): Get rid of bizarre buffer/sprintf that + was used by someone who didn't know you can use printf formatting + with g_warning. + (vfs_uri_is_special_link): Created cover for one remaining caller + of is_special_link that needs to pass a GnomeVFSURI. + (nautilus_file_operations_copy_move): Use the new is_special_link + (nautilus_file_operations_move_to_trash): Use + extract_and_ellipsize_file_name_for_dialog instead of an old + strange combination of calls. + + * libnautilus-extensions/nautilus-icon-factory.c: + (nautilus_icon_factory_get_icon_name_for_regular_file): Fix + obsolete comment and rearrange code now that plain text special + case is gone. + +2001-01-16 Josh Barrow + + * src/nautilus-first-time-druid.c: (druid_finished): + Make the new services icon use big_services_icon.png. This is a + much better choice until we get something official. + +2001-01-16 Gene Z. Ragan + + Checked in broken code before. Doh! + + * libnautilus-extensions/nautilus-link.c: + * src/nautilus-first-time-druid.c: (druid_finished): + +2001-01-16 Gene Z. Ragan + + reviewed by: Mike Fleming + + Fixed bug 4358, Please put a services icon on the desktop + + * libnautilus-extensions/nautilus-link.c: + (nautilus_link_local_create): + Perform NULL checking on arguments + + * src/nautilus-first-time-druid.c: (druid_finished): + Create a link to services on the desktop. + +2001-01-16 Michael K. Fleming + + reviewed by: + + Bug 4411 -- implement keypress hook for Mozilla so that URL navigation + initiated by keypress are handled the same as mouse-initiated navigation + events (eg, correctly have their schemes translated if necessary) + + * components/mozilla/main.c: (mozilla_object_destroyed), + (mozilla_make_object), (main): + * components/mozilla/mozilla-events.cpp: + * components/mozilla/mozilla-events.h: + * components/mozilla/nautilus-mozilla-content-view.c: + (nautilus_mozilla_content_view_initialize), + (mozilla_open_uri_callback), (mozilla_dom_key_press_callback), + (mozilla_dom_mouse_click_callback): + +2001-01-16 Gene Z. Ragan + + Fixed bug 5677, Drag files w/names of Specials to desktop -> malloc crash + Fixed bug 5673, Spaces are escaped in new "replace special desktop icon" + dialog. + + * libnautilus-extensions/nautilus-file-operations.c: + (handle_transfer_overwrite): + +2001-01-15 John Sullivan + + reviewed by: Gene Z. Ragan + + Removed stuff I added earlier as part of a failed fix + for bug 2068, which I ended up fixing a different way. + + Fixed bug 5661 (Hardwired button sizes for custom icons + in properties window) + + Fixed bug 1682 ("Go There" button taller than others + in "Open with Other" dialog) + + * libnautilus-extensions/nautilus-scrolled-window.h: + * libnautilus-extensions/nautilus-scrolled-window.c: + Removed these files from cvs. + + * libnautilus-extensions/Makefile.am: + Removed the removed files from the build. + + * libnautilus-extensions/nautilus-metadata.h: + removed NAUTILUS_METADATA_KEY_ICON_VIEW_SCROLL_ORIGIN + + * src/file-manager/fm-directory-view.h: + * src/file-manager/fm-directory-view.c: + (fm_directory_view_initialize): Changed back to inheriting + from GtkScrolledWindow instead of now non-existent + NautilusScrolledWindow. + + * libnautilus-extensions/nautilus-gtk-extensions.h: + * libnautilus-extensions/nautilus-gtk-extensions.c: + (nautilus_gtk_button_set_standard_padding): New function, + wrapper for nautilus_gtk_button_set_padding that uses + a standard amount of padding instead of taking a parameter. + This is preferred so we can change a single number if we + change our minds about what the standard padding should be. + + * libnautilus-extensions/nautilus-program-chooser.c: + (nautilus_program_chooser_new): Use + nautilus_gtk_button_set_standard_padding. Also added a vbox + so that "Go There" button doesn't grow taller to match the + height of the adjacent text. This fixed bug 1682. + * src/nautilus-bookmarks-window.c: (create_bookmarks_window): + Use nautilus_gtk_button_set_standard_padding. + * src/file-manager/fm-properties-window.c: (create_basic_page): + Use nautilus_gtk_button_set_standard_padding instead of + hardwiring button sizes. This fixed bug 5661. + +2001-01-16 Carlos Perelló Marín + + * configure.in: Added es to ALL_LINGUAS. + +2001-01-16 Ramiro Estrugo + + * libnautilus-extensions/nautilus-string-list.c: + (nautilus_string_list_get_length): + Allow for NULL to be treated as a zero length string list. + + * libnautilus-extensions/nautilus-string-picker.h: + * libnautilus-extensions/nautilus-string-picker.c: + (nautilus_string_picker_set_selected_string_index), + (nautilus_string_picker_get_index_for_string): + Two new functions to manipulate the string picker using indeces. + + * libnautilus-extensions/nautilus-text-caption.h: + * libnautilus-extensions/nautilus-text-caption.c: + (nautilus_text_caption_get_text), (nautilus_text_caption_set_text): + Make the signature of get_text() use a const object. + + (nautilus_text_caption_set_editable): New function to change + whether the caption's text is editable. + +2001-01-16 Andy Hertzfeld + + * src/nautilus-window-manage-views.c: (change_state_at_idle), + (load_underway_callback): + fixed bug 5657, crash during menu update when switching views. This is + also behind several other reported bugs. Fixed it as Darin suggested, + which is to defer the window state change associated with loading + a new component until idle time, so it doesn't wreak havoc + by interrupting other idle routines. + + * components/throbber/nautilus-throbber.c: + (nautilus_throbber_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_throbber_destroy), + (nautilus_throbber_initialize), + (nautilus_throbber_button_press_event): + added a location property and made it issue a notification when the + throbber is clicked on. Also, removed the no longer used + "location_changed" signal and better memory management of the + property bag. + + * src/nautilus-window.c: (throbber_location_changed_callback), + (nautilus_window_constructed), (nautilus_window_destroy): + make clicking on the throbber work by adding a listener for + the throbber location property and changing the location + accordingly when the event is posted. Also, fixed a leak + of the bonobo object. + + * src/nautilus-window-private.h: + added a field to hold the event source listener ID. + +2001-01-15 Andy Hertzfeld + + * components/throbber/main.c: (main): + fixed recently introduced bug where the throbber wasn't respecting + the theme; I had forgotten to initialize global preferences in the + throbber component. + +2001-01-15 Andy Hertzfeld + + fixed bug 4369, throbber frozen during long refresh, by making the + throbber a bonobo component so it's driven by its own thread. + Note that clicking on the throbber is temporarily broken; I'll + fix that soon. Also, made the frame delay be specified by the + theme and set the default to spin somewhat slower than before. + + * configure.in: + * components/Makefile.am: + * components/throbber/.cvsignore: + * components/throbber/Makefile.am: + * components/throbber/nautilus-throbber.oafinfo: + added throbber component + + * components/throbber/main.c: (throbber_object_destroyed), + (throbber_make_object), (main): + factory for the throbber component + + * components/throbber/nautilus-throbber.c,h: + (nautilus_throbber_initialize_class), (is_throbbing), + (get_bonobo_properties), (set_bonobo_properties), + (nautilus_throbber_destroy), (nautilus_throbber_get_control), + (get_throbber_dimensions), (nautilus_throbber_initialize), + (nautilus_throbber_new), (nautilus_throbber_theme_changed), + (draw_pixbuf), (select_throbber_image), (draw_throbber_image), + (nautilus_throbber_draw), (nautilus_throbber_expose), + (nautilus_throbber_map), (bump_throbber_frame), + (nautilus_throbber_start), + (nautilus_throbber_remove_update_callback), + (nautilus_throbber_stop), (nautilus_throbber_unload_images), + (load_themed_image), (make_throbber_frame_name), + (nautilus_throbber_load_images), + (nautilus_throbber_button_press_event), + (nautilus_throbber_set_small_mode), + (nautilus_throbber_size_allocate), + (nautilus_throbber_size_request): + throbber widget for the bonobo component + + * src/nautilus-window-toolbars.c: (theme_changed_callback), + (nautilus_window_initialize_toolbars): + set up throbber component in the toolbar + + * src/nautilus-window.c,h: (nautilus_window_constructed), + (nautilus_window_allow_stop): + use property interface to start and stop the throbber + + * icons/default.xml: + added delay specification to throbber in default theme + + * nautilus-clean.sh: + clean throbber component as necessary + + * src/Makefile.am: + * src/nautilus-throbber.c,h + removed old throbber widget + + +2001-01-15 Michael Engber + + reviewed by: John Sullivan + + * libnautilus-extensions/nautilus-stock-dialogs.c: + (nautilus_timed_wait_start_with_duration), + (nautilus_timed_wait_start): + * libnautilus-extensions/nautilus-stock-dialogs.h: + * libnautilus-extensions/nautilus-trash-directory.c: + (find_directory_start): + Increase delay before putting up "searching for trash dialog" + +2001-01-15 Gene Z. Ragan + + reviewed by: Arlo Rose + + Fixed bug 1420, pane splitter drag outline edges are indistinct + + * libnautilus-extensions/nautilus-horizontal-splitter.c: + (splitter_xor_line): + Make line appears as single pixel on off dash. + +2001-01-15 Gene Z. Ragan + + reviewed by: Mike Engber + + Fixed bug 5651, Mounting write-protected disk gives Mount Error + + I examined the source code to mount. There is one case where + an error message is returned but it is not an error. I now + check for that case in the error checking code. + + * libnautilus-extensions/nautilus-volume-monitor.c: + (mount_volume_get_cdrom_name), (eject_cdrom), (close_error_pipe), + (locate_audio_cd): + Also remove some old debugging code and make sure audio cd + mounting is ifdefed out. + +2001-01-15 Michael K. Fleming + + reviewed by: + + * libnautilus-extensions/nautilus-file-operations.c: + (handle_transfer_vfs_error): + + Fixed error message for the case where a file was moved to an unwritable + target where permissions were not known in advance (eg, Eazel vault). + + Previously: "The file or its directory cannot be changed" + Now: "You do not have permissions to write to this folder" + +2001-01-15 Michael Engber + + reviewed by: Gene Z. Ragan + + * libnautilus-extensions/nautilus-directory-background.c: + (set_root_pixmap): Fixed leaking x-server memory. + +2001-01-15 John Sullivan + + reviewed by: Darin Adler + + Some work on bug 2146 (Properties window for desktop Trash icon + should show Trash properties) + + * src/file-manager/fm-properties-window.c: + (is_merged_trash_directory): New helper function, checks whether + window is displaying special trash location. + (should_show_custom_icon_buttons): New helper function, returns + FALSE for special trash location since custom icons don't work + with the trash (see bug 5642) + (should_show_mime_type): New helper function, extracted for + code clarity (returns FALSE for directories). + (create_basic_page): Now takes only one parameter, gets file + and notebook from details struct; uses should_show_mime_type + and should_show_custom_icon_buttons. + (create_emblems_page), (create_permissions_page): Now take only + one parameter, get file and notebook from details struct. + (should_show_emblems): New helper function, returns FALSE for + special trash location since emblems don't work with the + trash (see bug 5643) + (should_show_permissions): New helper function, returns FALSE for + special trash location since it's not really a file system object + for which permissions make sense. + (create_properties_window): Respect should_show_emblems and + should_show_permissions. + + Eli ran into a case where the "can't set permissions" error message + was the vague default case when the disk was locked. I added that + case to the set of specifically handled cases. + + * src/file-manager/fm-error-reporting.c: + (fm_report_error_renaming_file), (fm_report_error_setting_group), + (fm_report_error_setting_owner), + (fm_report_error_setting_permissions): Handle + GNOME_VFS_ERROR_READ_ONLY_FILE_SYSTEM cases. + +2001-01-15 Ian McKellar + + * components/services/inventory/eazel-inventory-service.c: + (impl_Trilobite_Eazel_Inventory__get_machine_name): + The default hostname is now guessed if: + It now guesses a default if: + - gethostname succeds; and + - the hostname doesn't start with "localhost." + - the hostname doesn't equal "localhost" + The hostname stored is the name, up to but not including the + first "." in the name (if any). + +2001-01-15 Darin Adler + + Fix bug 5557 (Intermittent crash in + Nautilus_View_history_changed): + + * src/nautilus-view-frame.c: (send_history): Added a check for + NULL so we don't try to send a NULL history list through the + history machinery. + + Fix bug 5360 ("menthos's Home" string is hard to translate): + + * src/file-manager/fm-desktop-icon-view.c: + (update_home_link_and_delete_copies): Added comment to help + translators understand what to do with "%s's Home". + + Fix bug 5641 ("xfree" does not work with newer versions of RPM 4 + headers): + + * components/services/install/lib/eazel-package-system-rpm3.c: + (eazel_package_system_rpm3_packagedata_fill_from_header): Just + use "free" instead of "xfree". + + Fix bug 5631 (Tear-offs of right-click menus don't work): + + * src/nautilus-shell-ui.xml: + * src/file-manager/nautilus-directory-view-ui.xml: + * src/file-manager/nautilus-icon-view-ui.xml: + Mark popups and submenus of the popups with tearoff="0" so they + don't have tear-off menu items. + + More work on bug 2147 (NautilusFile for trash needs non-empty + values for more properties). + + * libnautilus-extensions/nautilus-file.h: + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_new_from_relative_uri), + (nautilus_file_new_from_info), (nautilus_file_monitor_add), + (nautilus_file_monitor_remove), + (nautilus_file_get_directory_item_count), + (nautilus_file_get_deep_counts), (nautilus_file_check_if_ready), + (nautilus_file_call_when_ready), + (nautilus_file_cancel_call_when_ready): + Put more of the machinery in place to make enough of NautilusFile + virtual so that we can implement the trash case. + + * libnautilus-extensions/nautilus-merged-directory.h: + * libnautilus-extensions/nautilus-merged-directory.c: + (merged_add_real_directory), + (nautilus_merged_directory_add_real_directory), + (merged_remove_real_directory), + (nautilus_merged_directory_remove_real_directory), + (remove_all_real_directories), + (nautilus_merged_directory_initialize_class): + Make adding and removing directories use signals so we can share + this list with the NautilusTrashFile. + + * libnautilus-extensions/nautilus-trash-file.c: + (add_directory_callback), (remove_directory_callback), + (nautilus_trash_file_initialize), (trash_destroy): + Use a NautilusTrashDirectory object for the list of directories. + + * libnautilus-extensions/nautilus-vfs-file.c: + (vfs_file_monitor_add), (vfs_file_monitor_remove), + (vfs_file_call_when_ready), (vfs_file_cancel_call_when_ready), + (vfs_file_check_if_ready), (vfs_file_get_item_count), + (vfs_file_get_deep_counts), (nautilus_vfs_file_initialize_class): + Move the guts of these functions into the "VFS" subclass. + + Other stuff: + + * libnautilus-extensions/nautilus-trash-directory.c: + (find_directory_start), (find_directory_end), + (find_directory_callback), (add_volume), (remove_trash_volume): + Fix bug in the recently-added timed-wait, to handle the case where + the call is cancelled as well as the case where it succeeds or + fails. + + * src/file-manager/fm-directory-view.c: + (zoomable_set_zoom_level_callback): Formatting tweak. + + * src/nautilus-main.c: (main): Fix the FIXME. + +2001-01-15 Ian McKellar + + * components/services/inventory-view/nautilus-inventory-config-page + .c: (nautilus_inventory_config_page_initialize): + Retreive the previously assigned machine name (if one exists). + Retreive the previously set "warn before upload" setting. + + * components/services/inventory/eazel-inventory-client.c: (main): + Added default values so that this actually works. + + * components/services/inventory/eazel-inventory-service.c: + (impl_Trilobite_Eazel_Inventory__set_machine_name), + (impl_Trilobite_Eazel_Inventory_upload): + Added some temporary debugging code, and the beginnings of better + error checking/reporting. + Removed hardcoded filesystem paths. + + * components/services/inventory/eazel-inventory-utils.h: + * components/services/inventory/eazel-inventory-utils.c: + (eazel_gather_inventory), (eazel_inventory_local_path): + Removed hardcoded filesystem paths. + +2001-01-15 Gene Z. Ragan + + Fixed bug 5533, Need good dialog text for failed + replace of special desktop icons. + + * libnautilus-extensions/nautilus-file-operations.c: + (handle_transfer_overwrite): + +2001-01-15 J Shane Culpepper + + reviewed by: Michael Engber + + * src/nautilus-application.c: (nautilus_application_startup): + * src/nautilus-application.h: + * src/nautilus-first-time-druid.c: (druid_finished): + * src/nautilus-main.c: (main): + + Fix for bug #1555. There is already an error dialog but there + was an infinite loop problem hiding it. If the first time druid + failed to create .nautilus, etc it would just run over and over + again. + +2001-01-15 Gene Z. Ragan + + Fixed bug 5635, RPM view crashed if click "Install" + after unmounting volume containing RPM + + Fixed bug 5636, Unmounting a volume doesn't close + it's associated windows. + + * src/nautilus-application.c: (nautilus_application_initialize), + (volume_mounted_callback), (volume_unmounted_callback): + Connect to volume monitor signals. When a volume is unmounted, + examine open window list and close any windows that originate + from the volume being unmounted. + + Add code to mount audio cds on desktop. It is all + ifdefed out right now. + + * src/file-manager/fm-desktop-icon-view.c: (create_mount_link), + (update_disks_menu): + + * libnautilus-extensions/nautilus-volume-monitor.c: + (nautilus_volume_monitor_volume_is_removable), + (nautilus_volume_monitor_get_removable_volumes), + (nautilus_volume_monitor_get_target_uri), + (mount_volume_get_cdda_name), (mount_volume_activate_cdda), + (mount_volume_get_name), (mount_volume_activate), + (get_current_mount_list), (mount_volumes_check_status), + (mount_volume_cdda_add), (mount_volume_add_filesystem), + (open_cdda_device), (locate_audio_cd): + * libnautilus-extensions/nautilus-volume-monitor.h: + +2001-01-14 J Shane Culpepper + + * src/nautilus-view-frame.c: (attach_client): + + Upped the timeout from 10 seconds to 12 seconds to be paranoid on + really slow machines. I think this is really generous for bug #4757. + In an attempt to reproduce the crash I started a build of mozilla + and gcc "emulate" a slow machine since I don't have one. Adding + additional comments to bugzilla bug #4757. + +2001-01-13 Jim Garrison + + * nautilus.spec.in: package "extras" no longer depends on mpg123 + +2001-01-13 Gene Z. Ragan + + Fixed bug 5414, Don't create a link for launchers dragged onto desktop + that require a terminal + + * src/file-manager/fm-desktop-icon-view.c: (create_link_callback), + (icon_view_create_nautilus_links): + Display a simple dialog telling user that we don't support htis feature yet. + +2001-01-13 Andy Hertzfeld + + * libnautilus-extensions/nautilus-icon-canvas-item.c: (hit_test): + fixed bug 4731, expanding folders cause oscillation, by hit-testing + to the bounding box instead of the pixmap when an icon is highlighted + for dropping. + +2001-01-12 Ramiro Estrugo + + reviewed by: Arik Devens + + * components/music/nautilus-music-view.c: + (music_view_set_selected_song_title), (reset_playtime), + (play_status_display), (slider_moved_callback), + (add_play_controls): + Fix bug 5617. Playtime in music view keeps growing forever. + +2001-01-12 John Sullivan + + reviewed by: Rebecca Schulman + + Fixed bug 5437 (date column is too wide for default nautilus width) + + * src/file-manager/fm-list-view.c: (real_get_column_specification): + Tweaked the default column widths so they're more balanced in the + default window width. The tradeoff is that you lose the date column + more quickly if you resize the window thinner (but of course the + user can stretch the columns to get it back). The column widths + in the search results view already look decent, for slightly + mysterious historical reasons. + +2001-01-12 Michael Engber + + reviewed by: Gene Z. Ragan + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (draw_stretch_handles_aa), (draw_label_text_aa), + (nautilus_icon_canvas_item_render): + Removed last vestiges of affine/libart code which was + slowing up icon drawing - bug 5381. + +2001-01-12 Ramiro Estrugo + + * components/services/install/nautilus-view/nautilus-service-install-view.c: + (nautilus_service_install_downloading): + I meant to actually remove the code rather than comment it out. + +2001-01-12 Ramiro Estrugo + + reviewed by: Arik Devens + + * libnautilus-extensions/nautilus-label.c: + (nautilus_label_expose_event), + (nautilus_label_set_background_mode), (nautilus_label_set_text), + (nautilus_label_get_text): + * libnautilus-extensions/nautilus-label.h: + Change the get_text() prototype to use a const object. Add a + workaround for bug 5608 while I debug the problem. + + reviewed by: Robey Pointer + + * components/services/install/nautilus-view/nautilus-service-install-view.c: + (nautilus_service_install_downloading): + Remove queue_resize() workarounds for improperly displaying + labels. I checked in a workaround in NautilusLabel instead. + +2001-01-12 Andy Hertzfeld + + fixed bug 5198, removing an active sidebar panel messes up the + remaining ones . I had already fixed this but missed the case + when multiple windows were open. Fixed by adding a sidebar call to + close the active panel if it matches a passed-in id, and used that in + nautilus window to close the panel if necessary before destroying it. + + * src/nautilus-sidebar.c: + (nautilus_sidebar_hide_active_panel_if_matches), + (toggle_sidebar_panel): + added routine to close the active panel if it matches a passed-in + id. + * src/nautilus-sidebar.h: + added above mentioned routine + + * src/nautilus-window-manage-views.c: (handle_view_failure), + (nautilus_window_set_sidebar_panels): + close the active panel if necessary before destroying it. + +2001-01-12 John Sullivan + + Fixed the corner of bug 3405 that valiant bug verifier Brett + discovered while verifying. Yay for bug verification! + + * src/file-manager/fm-icon-view.c: (switch_to_manual_layout): + I had neglected to remove an extra call to + nautilus_icon_container_reset_scroll_region here. It's already + handled one level lower, where the empty directory case is + taken into account. + +2001-01-12 John Sullivan + + reviewed by: Michael Engber + + Fixed bug 2207 (Search needs to gracefully handle too + many items found) + + * libnautilus-extensions/nautilus-directory-async.c: + (directory_load_done): Don't treat GNOME_VFS_OK as an + error case here. This was happening when the file limit + was reached, and the resulting propogated error was making + it to the search list view code, which was putting up + an error dialog saying no error had occurred. + + * libnautilus-extensions/nautilus-directory.h: + Added FIXME with bug number for new bug 5603, which complains + that the file list limit isn't as hard as it claims. + + * src/file-manager/fm-directory-view.h: + * src/file-manager/fm-directory-view.c: + (fm_directory_view_initialize_class), + (fm_directory_view_file_limit_reached), (real_file_limit_reached), + (check_for_directory_hard_limit): Broke out the code that handles + the UI when the directory contains too many files such that + subclasses can override the behavior. + + (fm_directory_view_get_containing_window): Renamed from + "get_containing_window" and made public so subclasses don't have + to reimplent. + (fm_directory_view_confirm_multiple_windows), + (fm_directory_view_launch_application), (choose_program), + (fm_directory_view_confirm_deletion), (confirm_delete_from_trash), + (report_broken_symbolic_link), (fm_directory_view_activate_file): + Updated for function name change. + + * src/file-manager/fm-search-list-view.c: + (load_error_callback): Marked strings for localization; reworded to + avoid use of "directory". + (fm_search_list_view_initialize_class), (real_file_limit_reached): + Put up dialog that's been worded specifically for search results + when too many items are found. + +2001-01-12 Ramiro Estrugo + + * test/.cvsignore: + * test/Makefile.am: + * test/test-nautilus-label-offset.c: (main): + * test/test.h: + + Add a test for debugging bug 5608. + +2001-01-12 Zbigniew Chyla + + * libnautilus-extensions/nautilus-gtk-macros.h: + Define empty NAUTILUS_ASSIGN_MUST_OVERRIDE_SIGNAL macro if + G_DISABLE_ASSERT is defined. + +2001-01-11 Robey Pointer + + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_start_transaction): + + Reverse the package list just before installing, so that the + install view gets info on toplevel packages before their + dependencies (this keeps the user from being bored, since they'll + see the package detailed info on toplevel packages while the + others are installing). + + * components/services/install/lib/eazel-install-metadata.c: + (init_default_install_configuration): + * components/services/install/lib/eazel-install-object.c: + (eazel_install_uninstall_packages): + + Remove last vestigal uses of a literal "/var" path. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (install_message_new), (generate_install_form), + (current_progress_bar_complete), + (nautilus_service_install_downloading), + (previous_install_finished), (nautilus_service_install_installing), + (nautilus_service_install_done): + * components/services/install/nautilus-view/nautilus-service-instal + l-view.h: + + Finish Arlo'ification of the install view: Pin the message box at + a specific height, clean up lots of nastiness caused by the new + font system, and fix up the text displayed per-package when the + package is done being installed. Also, fix a bug that caused a + cancelled install to report that it was successful. + + * components/services/nautilus-dependent-shared/eazel-services-head + er.c: (eazel_services_header_middle_new): + + Change positioning of the middle header so that it doesn't cause + mondo amounts of empty space to appear beneath it. (Not sure why; + GTK magic.) + +2001-01-11 John Harper + + reviewed by: Pavel Cisler + + Fixed bug 5589 (crash when dragging from list view), that I'd + introduced when making list view icons anti-aliased + + * libnautilus-extensions/nautilus-list.h, + libnautilus-extensions/nautilus-list.c + (nautilus_list_get_pixbuf): new function, returns the GdkPixbuf + stored in a cell, or a null pointer if there isn't one + + * src/file-manager/fm-list-view.c (fm_list_get_drag_pixmap): + use nautilus_list_get_pixbuf to fetch the GdkPixbuf from the + row, then gdk_pixbuf_render_pixmap_and_mask to turn it into the + required format (instead of accessing the NautilusClist widget + directly, assuming that a Pixmap is stored in the cell) + +2001-01-12 Rebecca Schulman + + * src/nautilus-complex-search-bar.c: + (nautilus_complex_search_bar_get_location): + Change "index-only" to "index-if-available" + in search uris, to take advantage of the new + option in medusa to perform a slow search + only if an index is unavailable + +2001-01-11 John Sullivan + + reviewed by: Pavel Cisler + + Fixed bug 2068 (Dragging icons adjusts scroll area in a way + that causes immediate scrolling) + + Fixed bug 3402 (Dragging singleton icon to edge of window in + manual layout mode puts it back at top-left) + + Fixed bug 3405 (Dropping an icon into empty manual-layout + window always puts it at top-left) + + Fixed bug 3570 (Relayout glitch after removing an item from + a view) + + I had earlier started to fix these by trying to save and + restore the scroll position per directory. But this path + turned evil, and I gave up on it. There is still some + partly-implemented work from my start in the evil direction, + which I will remove in my next checkin. + + The new fix was to always include the visible white space + when recomputing the icon container's scroll region, unless + a caller has specifically requested not to. + + * libnautilus-extensions/nautilus-icon-container.h: + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_reset_scroll_region): New function, + sets a flag in the details struct that's respected in the + next scroll region update. + (reset_scroll_region_if_not_empty): New helper function, + calls _reset_scroll_region unless container is empty. + (nautilus_icon_container_update_scroll_region_include_visible_area): + Removed this function; its equivalent is to call reset_scroll_region + before calling update_scroll_region. + (nautilus_icon_container_update_scroll_region): Now that the + _include_visible_area variant is gone, merged the local function + update_scroll_region with this public one. It decides whether to + include the visible area or not based on the flag set by + _reset_scroll_region (also, it never includes the visible area + if the container is empty). + (nautilus_icon_container_set_auto_layout): Reset the scroll region + when changing the auto_layout state. + (nautilus_icon_container_sort): reset the scroll region before + sorting. + + * libnautilus-extensions/nautilus-icon-dnd.c: (handle_local_move): + Call nautilus_icon_container_update_scroll_region instead of + _update_scroll_region_include_visible_area, which no longer exists. + + * libnautilus-extensions/nautilus-icon-private.h: Store flag for + resetting scroll region in details; eliminate prototype for + nautilus_icon_container_update_scroll_region_include_visible_area. + + * src/file-manager/fm-directory-view.h: + * src/file-manager/fm-directory-view.c: + (fm_directory_view_initialize_class), (done_loading), + (fm_directory_view_begin_loading), (fm_directory_view_end_loading): + Added end_loading signal that's sent when a directory is finished + loading, parallel to existing begin_loading signal. + + * src/file-manager/fm-icon-view.c: + (fm_icon_view_add_file): Reset the scroll region for the first + icon added when loading a directory. + (fm_icon_view_begin_loading), (fm_icon_view_end_loading): + Remember that we're loading, so fm_icon_view_add_file can test correctly. + (set_sort_criterion_by_id): Bail out early if state hasn't changed. + (switch_to_manual_layout): Bail out early if state hasn't changed. + Also, reset scroll region before switching to manual layout. + (fm_icon_view_initialize_class): Attach fm_icon_view_end_loading to + virtual function slot. + +2001-01-11 Ramiro Estrugo + + * src/nautilus-property-browser.c: (make_category_link): + Add a fixme for a problem i just spotted. + +2001-01-11 Robin * Slomkowski + + * test/Makefile.am: added test/test.h to EXTRA_DIST + +2001-01-11 Ramiro Estrugo + + reviewed by: Mike Fleming + + * libnautilus-extensions/nautilus-art-extensions.c: + (nautilus_art_irect_align): + * libnautilus-extensions/nautilus-art-extensions.h: + New function to align a rectangle within another. + + * libnautilus-extensions/nautilus-image.c: + (image_get_pixbuf_bounds): + * libnautilus-extensions/nautilus-label.c: (label_get_text_bounds): + Share more code between these two widgets by using a common + alignment routine. + +2001-01-11 Michael Meeks + + * components/adapter/nautilus-adapter-embeddable-embed-strategy.c + (nautilus_adapter_embeddable_embed_strategy_new): remove redundant + bonobo_item_container_add. + +2001-01-11 Andy Hertzfeld + + * src/nautilus-property-browser.c: (make_category_link): + make the category links use nautilus-image for anti-aliased + graphics like we intended, now that Ramiro has fixed the + background problems. + + * icons/eazel/Back.png + * icons/eazel/Forward.png + * icons/eazel/Home.png + * icons/eazel/Refresh.png + * icons/eazel/Search.png + * icons/eazel/SearchWeb.png + * icons/eazel/Services.png + * icons/eazel/Stop.png + * icons/eazel/Up.png + newer toolbar buttons from Susan + +2001-01-11 Ramiro Estrugo + + * src/nautilus-about.c: (nautilus_about_draw_info), + (nautilus_about_update_authors): + + Fix bug 5056 - hard coded fonts in About dialog. + +2001-01-11 Ramiro Estrugo + + * libnautilus-extensions/nautilus-preferences.c: + (preferences_hash_node_check_changes_func): + Yank FIXME for bug 1273 which no longer exists. + +2001-01-11 Ramiro Estrugo + + * applets/launcher/nautilus-launcher-applet.c: (image_leave_event), + (set_is_launching), (image_button_press_event), + (image_button_release_event), (main): + Fix imminent build bustage. Updates for NautilusImage api changes. + +2001-01-11 Robey Pointer + + * components/services/install/lib/eazel-install-corba-callback.c: + (eazel_install_callback_initialize), (eazel_install_callback_new): + + Turn g_error to g_warning in the EazelInstallCallback initializer, + so that it doesn't kill off the view when the install service + isn't around. Instead, set some fields to NULL and return + normally. The *_new call then returns NULL on failure. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_service_install_installing), + (nautilus_service_install_view_update_from_uri): + + Notice if the eazel_install_callback_new call returns NULL, and + gracefully handle it by ceasing operations and popping up a dialog + about the failure. This solves the "don't crash if the install + service is missing" bug. + + * components/services/install/lib/eazel-install-object.c: + (eazel_install_add_repository): + * components/services/install/lib/eazel-install-private.h: + * components/services/install/lib/eazel-install-protocols.c: + (my_copy_file), (eazel_install_fetch_file): + * components/services/install/lib/eazel-install-public.h: + * nautilus-installer/src/installer.c: (get_candidate_dirs), + (search_for_local_cds), (eazel_installer_initialize): + * nautilus-installer/src/main.c: + + Retrofit the --cache-dir option and code to automatically add + mounted CD packages to the repository, from the PR3 installer + branch. + + * nautilus-installer/src/Makefile: + + Help me, Obi-wan, you're my only hope. + +2001-01-11 Ramiro Estrugo + + reviewed by: Pavel Cisler + + Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts), + 5051, 2783 and maybe other relating to (ab)use of fonts, + backgrounds and other sacred attrbiutes of Gtk themes. + + * components/hardware/nautilus-hardware-view.c: (setup_form_title), + (setup_overview_form), (setup_CPU_form), (setup_RAM_form), + (setup_IDE_form): + Fix hard coded fonts. + + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize), + (music_view_set_selected_song_title), (reset_playtime), + (play_status_display), (slider_moved_callback), + (add_play_controls): + Fix hard coded fonts. + + * components/rpmview/nautilus-rpm-verify-window.c: + (nautilus_rpm_verify_window_initialize): + Fix hard coded fonts. + + * components/rpmview/nautilus-rpm-view.c: + (nautilus_rpm_view_initialize): + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (horizontal_line_new), (install_message_new), + (generate_install_form), + (nautilus_service_install_view_initialize), + (current_progress_bar_complete), + (nautilus_service_install_installing): + Fix hard coded fonts. + + * components/services/login/nautilus-view/nautilus-change-password- + view.c: (generate_change_password_form), (authn_succeeded), + (authn_failed), (change_password_button_cb), + (nautilus_change_password_view_initialize): + Fix hard coded fonts. Cleanup header inclusion a bit. + + * components/services/nautilus-dependent-shared/Makefile.am: + Retire some crufty code. + + * components/services/nautilus-dependent-shared/eazel-services-exte + nsions.c: (eazel_services_image_new), + (eazel_services_image_new_from_uri):, (eazel_services_label_new): + Update for label, image and hard coded font changes. + + * components/services/nautilus-dependent-shared/eazel-services-exte + nsions.h: + Make the colors opaque. Remove a bunch of hard coded font stuff. + Also remove a bunch of hard coded offsets. We use alignments and + paddings instead. + + * components/services/nautilus-dependent-shared/eazel-services-foot + er.c: (label_enter_event), (label_leave_event), + (image_enter_event), (footer_item_new), + (eazel_services_footer_update): + Update for label, image and hard coded font changes. + + * components/services/nautilus-dependent-shared/eazel-services-head + er.c: (eazel_services_header_title_new), + (eazel_services_header_middle_new): + * components/services/nautilus-dependent-shared/shared-service-util + ities.c: + * components/services/nautilus-dependent-shared/shared-service-util + ities.h: + * components/services/nautilus-dependent-shared/shared-service-widg + ets.c: + * components/services/nautilus-dependent-shared/shared-service-widg + ets.h: + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.c: + * components/services/summary/nautilus-view/nautilus-summary-dialog + s.c: (generate_login_dialog): + * components/services/summary/nautilus-view/nautilus-summary-footer + .c: + * components/services/summary/nautilus-view/nautilus-summary-menu-i + tems.c: + * components/services/summary/nautilus-view/nautilus-summary-view-p + rivate.h: + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form), (generate_service_entry_row), + (generate_eazel_news_entry_row), (generate_update_news_entry_row): + Update for label, image and hard coded font changes. + + * libnautilus-extensions/Makefile.am: + Add new smooth/label/image widget stuff. Retire buffered widget. + + * libnautilus-extensions/nautilus-art-extensions.c: + (nautilus_art_irect_get_width), (nautilus_art_irect_get_height): + * libnautilus-extensions/nautilus-art-extensions.h: + Two new very simple functions to get the width/height of an + ArtIRect. + + * libnautilus-extensions/nautilus-art-gtk-extensions.c: + (nautilus_irect_gtk_widget_get_frame): + * libnautilus-extensions/nautilus-art-gtk-extensions.h: + New simple function to get the dimensions of a widget as an + ArtIRect frame. + + * libnautilus-extensions/nautilus-buffered-widget.c: + * libnautilus-extensions/nautilus-buffered-widget.h: + Retire. We dont use this no more. + + * libnautilus-extensions/nautilus-customization-data.c: + (nautilus_customization_data_get_next_element_for_display): + Update for image and hard coded font changes. + + * libnautilus-extensions/nautilus-debug-drawing.c: + (debug_pixbuf_viewer_initialize_class), + (debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy), + (debug_pixbuf_viewer_size_request), + (debug_pixbuf_viewer_expose_event), + (debug_pixbuf_viewer_set_pixbuf), + (nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window), + (nautilus_debug_show_pixbuf): + * libnautilus-extensions/nautilus-debug-drawing.h: + Back to using a widget to display the debug pixbuf. But since we + cant use NautilusImage (because we want to use this debug stuff to + debug NautilusImage itselft) we need something else. Thus a new + private and simple widget to display the debug pixbuf. + + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: + (nautilus_gdk_pixbuf_draw_to_drawable), + (nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo. + (draw_tile_to_pixbuf_callback), + (nautilus_gdk_pixbuf_draw_to_pixbuf_tiled), + (nautilus_gdk_pixbuf_draw_to_drawable_tiled), + (nautilus_gdk_pixbuf_get_from_window_safe): + Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for + clarity. + + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h: + Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for + clarity. + + * libnautilus-extensions/nautilus-icon-factory.c: (embed_text): + Update opacity macros. Tiny update for change in font constructor. + + * libnautilus-extensions/nautilus-image-with-background.h: + * libnautilus-extensions/nautilus-image-with-background.c: + (find_background_ancestor), (draw_background_callback), + (nautilus_image_new_with_background): + Create a NautilusImage that uses NautilusBackground to + draw the background. We put this in a separate file to avoid the + ugly dependency chain in NautilusBackground so that NautilusImage + can be used by standalone components in the future. + + * libnautilus-extensions/nautilus-image.h: + * libnautilus-extensions/nautilus-image.c: + (nautilus_image_initialize_class), (nautilus_image_initialize), + (nautilus_image_destroy), (nautilus_image_set_arg), + (nautilus_image_get_arg), (nautilus_image_size_request), + (image_paint_pixbuf_callback), (image_composite_pixbuf_callback), + (nautilus_image_expose_event), + (nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame), + (image_get_pixbuf_bounds), (image_get_tile_frame), + (nautilus_image_new), (nautilus_image_set_is_smooth), + (nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf), + (nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf), + (nautilus_image_set_pixbuf_from_file_name), + (nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity), + (nautilus_image_get_pixbuf_opacity), + (nautilus_image_set_tile_opacity), + (nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width), + (nautilus_image_get_tile_width), (nautilus_image_set_tile_height), + (nautilus_image_get_tile_height), + (nautilus_image_set_tile_mode_vertical), + (nautilus_image_get_tile_mode_vertical), + (nautilus_image_set_tile_mode_horizontal), + (nautilus_image_get_tile_mode_horizontal), + (nautilus_image_set_tile_pixbuf_from_file_name), + (nautilus_image_set_background_mode), + (nautilus_image_get_background_mode), + (nautilus_image_set_solid_background_color), + (nautilus_image_get_solid_background_color), + (nautilus_image_new_solid): + Fixed many problems. Properly handles rendering + on top of arbitrary Gtk backgrounds. Does not allocate a buffer + the size of the widget anymore. All rendering occurs on exposure + events. Honrts the the GtkMisc superclass attrbutes for alignment + and padding. The widget is a lot simpler now. + + * libnautilus-extensions/nautilus-label-with-background.h: + * libnautilus-extensions/nautilus-label-with-background.c: + (find_background_ancestor), (draw_background_callback), + (nautilus_label_new_with_background): + Create a NautilusLabel that uses NautilusBackground to + draw the background. We put this in a separate file to avoid the + ugly dependency chain in NautilusBackground so that NautilusLabel + can be used by standalone components in the future. + + * libnautilus-extensions/nautilus-label.h: + * libnautilus-extensions/nautilus-label.c: + (nautilus_label_initialize_class), (nautilus_label_initialize), + (nautilus_label_destroy), (nautilus_label_set_arg), + (nautilus_label_get_arg), (nautilus_label_size_request), + (label_paint_pixbuf_callback), (label_composite_pixbuf_callback), + (nautilus_label_expose_event), + (nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf), + (label_get_default_line_wrap_width), (label_get_text_frame), + (label_get_text_bounds), (label_get_tile_frame), (label_peek_text), + (label_get_empty_line_height), + (label_get_total_text_and_line_offset_height), + (label_line_geometries_clear), (label_line_geometries_recompute), + (nautilus_label_new), (nautilus_label_set_smooth_font), + (nautilus_label_get_smooth_font), + (nautilus_label_set_smooth_font_size), + (nautilus_label_get_smooth_font_size), + (nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth), + (nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf), + (nautilus_label_set_text_opacity), + (nautilus_label_get_text_opacity), + (nautilus_label_set_tile_opacity), + (nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width), + (nautilus_label_get_tile_width), (nautilus_label_set_tile_height), + (nautilus_label_get_tile_height), + (nautilus_label_set_tile_mode_vertical), + (nautilus_label_get_tile_mode_vertical), + (nautilus_label_set_tile_mode_horizontal), + (nautilus_label_get_tile_mode_horizontal), + (nautilus_label_set_tile_pixbuf_from_file_name), + (nautilus_label_set_background_mode), + (nautilus_label_get_background_mode), + (nautilus_label_set_solid_background_color), + (nautilus_label_get_solid_background_color), + (nautilus_label_set_smooth_line_wrap_width), + (nautilus_label_get_smooth_line_wrap_width), + (nautilus_label_set_text_color), (nautilus_label_get_text_color), + (nautilus_label_set_smooth_drop_shadow_offset), + (nautilus_label_get_smooth_drop_shadow_offset), + (nautilus_label_set_smooth_drop_shadow_color), + (nautilus_label_get_smooth_drop_shadow_color), + (nautilus_label_set_justify), (nautilus_label_get_text_justify), + (nautilus_label_set_text), (nautilus_label_get_text), + (nautilus_label_set_wrap), (nautilus_label_get_wrap), + (nautilus_label_new_solid), (nautilus_label_make_bold), + (nautilus_label_make_larger), (nautilus_label_make_smaller): + Fixed many problems. Properly handles rendering + on top of arbitrary Gtk backgrounds. Does not allocate a buffer + the size of the widget anymore. All rendering occurs on exposure + events. Honors the the GtkMisc superclass attrbutes for alignment + and padding. NautilusLabel is now subclassed from GtkLabel + itself. That means that the is_smooth attribute can be toggled to + make both religions happy. Support for making the label larger, + smaller and/or bold based on the current font. Renamed a lot of + methods to make it obvious that they apply only to the smooth case. + Also made the api match GtkLabel more closely. So many functions + got renamed. + + * libnautilus-extensions/nautilus-radio-button-group.c: + (nautilus_radio_button_group_set_entry_pixbuf): + Tiny update for changes in the NautilusImage constructor. + + * libnautilus-extensions/nautilus-scalable-font-private.h: + New file. Some private font stuff lives here. I need this + changed for a checkin that I will make later regarding improvement + of performance in the icon container smooth fonts. + + * libnautilus-extensions/nautilus-scalable-font.h: + * libnautilus-extensions/nautilus-scalable-font.c: + (nautilus_scalable_font_initialize), (font_entry_new), + (font_entry_free), (nautilus_scalable_font_new), + (nautilus_scalable_font_make_bold), + (nautilus_scalable_font_draw_text), + (nautilus_scalable_font_draw_text_lines_with_dimensions), + (nautilus_scalable_font_draw_text_lines), + (nautilus_scalable_font_get_default_font), + (nautilus_scalable_font_get_rsvg_handle), + (nautilus_scalable_font_get_rsvg_context), + (nautilus_text_layout_paint): + Change the constructor to return the type itself instead of + GtkObject. Some minor style tweaks. Keep track of the font entry + that was used to allocate the font. New private functions for + accessing the rsvg context and font handles. Remove an unsed + function. + + * libnautilus-extensions/nautilus-smooth-widget.h: + * libnautilus-extensions/nautilus-smooth-widget.c: + (widget_is_smooth), (smooth_widget_set_is_smooth), + (preferences_get_is_smooth), (smooth_widget_destroy), + (smooth_graphics_mode_changed_callback), + (nautilus_smooth_widget_register), + (smooth_widget_get_tile_origin_point), + (smooth_widget_get_gtk_background), (smooth_widget_get_background), + (smooth_widget_paint_tile_opaque), + (smooth_widget_paint_tile_transparent), + (smooth_widget_paint_content_opaque), + (smooth_widget_paint_content_transparent), + (smooth_widget_paint_tile_and_content_transparent), + (nautilus_smooth_widget_paint), + (nautilus_smooth_widget_get_tile_bounds), + (nautilus_smooth_widget_get_preferred_frame): + Shared code between NautilusLabel and NautilusImage. ALl the code + to support smooth toggable widgets lives here. Also, keep track + of smooth widgets and toggle their is_smooth attribute in response + to nautilus smooth graphics preferences changes. + + * libnautilus-extensions/nautilus-tabs.c: + (nautilus_tabs_initialize), (draw_tab_label): + Tiny update for change in font constructor. Add a FIXME for a + hard coded font issue im going to fix later. Opacity macro + update. + + * src/file-manager/fm-properties-window.c: + (create_image_widget_for_file): + Using the new image widget makes this code a lot simpler. No + longer need to check smooth preference. It all happens + automatically. + + * src/file-manager/nautilus-indexing-info.c: + (update_progress_display), (show_reindex_request_information), + (show_index_progress_bar), (show_indexing_info_dialog): + Fix a bunch of hard coded font issues. + + * src/nautilus-about.c: (draw_aa_string), + (nautilus_about_draw_info), (nautilus_about_update_authors): + Tiny update for change in font constructor. Opacity macro + update. + + * src/nautilus-first-time-druid.c: (label_new_left_justified), + (make_hbox_user_level_radio_button), (set_up_user_level_page), + (set_up_service_signup_page), (set_up_update_page), + (set_up_proxy_config_page), (set_up_update_feedback_page), + (nautilus_first_time_druid_show): + Fix a bunch of hard coded font issues. Also fix the rendering + problems with image usage inside selectable buttons. + + * src/nautilus-property-browser.c: + (nautilus_property_browser_initialize), + (set_emblem_image_from_file), (make_property_tile), + (make_properties_from_directories), (add_reset_property), + (make_properties_from_xml_node), + (nautilus_property_browser_update_contents): + Fix hard coded fonts. Update for NautilusImage and NautilusLabel + changes. + + * src/nautilus-search-bar-criterion.c: + Remove unused #include. + + * src/nautilus-shell.c: (display_caveat): + Fix hard coded fonts. + + * src/nautilus-sidebar-tabs.c: + (nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain), + (draw_one_tab_themed): + Fix hard coded fonts. Opacity macros update. + + * src/nautilus-sidebar-title.c: + (nautilus_sidebar_title_initialize), + (nautilus_sidebar_title_select_text_color), (update_icon), + (update_font), (update_title), (update_more_info), (add_emblem), + (sidebar_title_create_title_label), + (sidebar_title_create_more_info_label), + (smooth_graphics_mode_changed_callback): + Update for NautilusImage and NautilusLabel changes. Made the + widget a lot simpler. + + We no longer need to keep track of smooth changes in the sidebar + title. They are taked care automatically by the widgets. + + We no longer need to create 2 labels to honor smoothness. + NautilusLabel does it all now. + + Removed a set_background() function that already + exists in nautilus-extensions. + + * src/nautilus-theme-selector.c: + (nautilus_theme_selector_initialize), (set_help_label), + (exit_remove_mode): + Fix hard coded fonts. + + * test/font-test.sh: + Retire. Not needed. + + * test/.cvsignore: + * test/Makefile.am: + Add a bunch of tests. + + * test/test.h: + * test/test.c: + Put shared test code here. + + * test/test-nautilus-font-simple.c: + * test/test-nautilus-font.c: + * test/test-nautilus-image-background.c: + * test/test-nautilus-image-scrolled.c: + * test/test-nautilus-image-simple.c: + * test/test-nautilus-image-tile.c: + * test/test-nautilus-image.c: + * test/test-nautilus-label-background.c: + * test/test-nautilus-label-flavorful.c: + * test/test-nautilus-label-scrolled.c: + * test/test-nautilus-label-simple.c: + * test/test-nautilus-label-wrapped.c: + * test/test-nautilus-label.c: + * test/test-nautilus-pixbuf-tile.c: + * test/test-nautilus-smooth-graphics.c: + * test/test-nautilus-wrapped-label.c: + Some new tests. Many updates to old label and image tests. + +2001-01-11 Robin * Slomkowski + + * components/services/inventory/Makefile.am: added $(IDL) to + EXTRA_DISTS + +2001-01-11 Ian McKellar + + * components/services/install/command-line/Makefile.am: + Don't build the inventory test code here as the inventory code has + moved to the inventory component. + + * components/services/inventory/eazel-inventory-service-interface.i + dl: + This file was missing from mjs' checkin of the inventory upload code. + +2001-01-11 Andy Hertzfeld + + fixed bug 5338, switching to and from "tighter layout" messes up + icon labels, by adding a call to invalidate an item's cached label + size, and making the icon canvas invalidate the items when appropriate. + This also fixes a similar problem when the anti-aliased mode changes. + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (nautilus_icon_canvas_item_initialize), + (nautilus_icon_canvas_item_invalidate_label_size), + (nautilus_icon_canvas_item_set_arg): + renamed internal invalidation routine to make it externally accessible + + * libnautilus-extensions/nautilus-icon-canvas-item.h: + added nautilus_icon_canvas_item_invalidate_label_size + + * libnautilus-extensions/nautilus-icon-container.c: + (invalidate_label_sizes), + (nautilus_icon_container_set_anti_aliased_mode), + (nautilus_icon_container_set_tighter_layout): + added an invalidate_label_sizes routine and called it when + tighter layout or the anti-aliased mode changes. + +2001-01-11 Robin * Slomkowski + + reviewed by: + + * components/services/Makefile.am: fixed typo for + variable INSTALL_SERVICES + +2001-01-11 Michael Engber + + reviewed by: John Sullivan + + * libnautilus-extensions/nautilus-stock-dialogs.c: + (timed_wait_delayed_destroy_dialog_callback), (timed_wait_free), + (timed_wait_cancel_callback), (timed_wait_callback), + (nautilus_timed_wait_start), (nautilus_timed_wait_stop): + * libnautilus-extensions/nautilus-trash-directory.c: + (find_directory_callback), (add_volume): + We now put up a dialog when searching for trash is slow - bug 3990. + Also added a minimum time up to nautilus_timed_wait dialogs + so they don't disappear before the user has a chance to read them. + Also, nautilus_timed_wait_start will now accept NULL for the + cancel_callback, resulting in a dialog without a cancel button. + +2001-01-11 Michael Engber + + * configure.in: + Missed configure.in in prior check in. + +2001-01-11 Josh Barrow + + + * components/services/Makefile.am: + Fixed typo that said, "INSTALLS_SERVICE". Changed it to + "INSTALL_SERVICE" + +2001-01-11 Maciej Stachowiak + + pair programmed with Ian McKellar + + Fix bugs 5100 ("First time dialog" for inventory preferences) and + 5099 (Need configuration preferences for inventory control). Ian + and I did a first cut at a component for inventory gathering and + upload, as well as a start on the client-side UI for this. + + * components/services/Makefile.am, configure.in: Add + components/services/inventory and + components/services/inventory-view directories to build. + + * components/services/install/lib/eazel-inventory-utils.c, + components/services/install/lib/eazel-inventory-utils.h: Move + these files to components/services/inventory. + * components/services/install/lib/Makefile.am: Remove from build + here. + + * components/services/inventory-view/.cvsignore: + * components/services/inventory-view/Makefile.am: + * components/services/inventory-view/Nautilus_View_inventory.oaf.in + : + * components/services/inventory-view/main.c: (main): + * components/services/inventory-view/nautilus-inventory-config-page + .c: (nautilus_inventory_config_page_initialize_class), + (next_button_callback), + (nautilus_inventory_config_page_initialize), + (nautilus_inventory_config_page_new), + (nautilus_inventory_config_page_destroy): + * components/services/inventory-view/nautilus-inventory-config-page + .h: + * components/services/inventory-view/nautilus-inventory-view.c: + (nautilus_inventory_view_initialize_class), + (nautilus_inventory_view_initialize), + (nautilus_inventory_view_destroy), + (inventory_load_location_callback): + * components/services/inventory-view/nautilus-inventory-view.h: + + First cut at the inventory view component. Right now it only + provides a config page, over time it may also do inventory + display. + + * components/services/inventory/.cvsignore: + * components/services/inventory/Makefile.am: + * components/services/inventory/Trilobite_Service_inventory.oaf.in: + * components/services/inventory/eazel-inventory-client.c: + (gboolean_to_yes_or_no), (main): + * components/services/inventory/eazel-inventory-service.c: + (get_enabled), (impl_Trilobite_Eazel_Inventory__get_enabled), + (impl_Trilobite_Eazel_Inventory__set_enabled), + (impl_Trilobite_Eazel_Inventory__get_machine_name), + (impl_Trilobite_Eazel_Inventory__set_machine_name), + (get_warn_before_upload), + (impl_Trilobite_Eazel_Inventory__get_warn_before_upload), + (impl_Trilobite_Eazel_Inventory__set_warn_before_upload), + (impl_Trilobite_Eazel_Inventory_upload), + (eazel_inventory_service_get_epv), + (eazel_inventory_service_finalize), + (eazel_inventory_service_unref), + (eazel_inventory_service_class_initialize), + (eazel_inventory_service_create_corba_object), + (eazel_inventory_service_initialize), + (eazel_inventory_service_get_type), (eazel_inventory_service_new): + * components/services/inventory/eazel-inventory-service.h: + * components/services/inventory/eazel-inventory-utils.c: + (eazel_inventory_gconf_done), (check_gconf_init), + (eazel_create_configuration_metafile), (eazel_gather_inventory): + * components/services/inventory/main.c: + (eazel_inventory_service_factory_destroy), + (eazel_inventory_service_factory), (main): + + First cut at back end inventory gathering and upload + component. Right now it uses libeazelinstall directly, it should + probably be changed to use the install/package system CORBA + component for package info. + +2001-01-10 Mike Fleming + + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.c: (authn_cb_failed): + + Dialog rewording. Commented out the "Login failed" dialog that I had + added. The user keeps getting re-prompted for now. + +2001-01-10 Andy Hertzfeld + + * components/text/nautilus-text-view.c: + (nautilus_text_view_initialize), (nautilus_text_view_destroy), + (done_file_read), (file_read_callback), (file_opened_callback), + (nautilus_text_view_update): + fixed bug 3256, loading a huge text file crashes nautilus. Now, + if the file size exceeds a predetermined threshold, currently + set at a megabyte, it truncates it to the threshold amount and + warns the user with an error dialog. As part of this, I made + the text view load files asynchronously and progressively, as + Maciej suggested; however, we won't see the benefit of this + until Pavel checks in some gnome-vfs optimizations he's working + on since currently gnome-vfs doesn't give the main loop much + time to run if it has ongoing activity. + + * components/text/services/Makefile.am: + * components/text/services/french_to_english.xml: + at Bud's request, checked in the "frech to english" text service + + * src/file-manager/fm-properties-window.c: (create_emblems_page): + removed debug message that I accidentally checked in. + +2001-01-10 Gene Z. Ragan + + reviewed by: Pavel Cisler + + Fixed bug 5427, Right-click menu for disk should include + a way to unmount it. + + * src/file-manager/fm-desktop-icon-view.c: + (unmount_volume_callback), (volume_link_is_selection), + (real_update_menus), (real_merge_menus): + Add a context sensitive menu to Nautilus volume links + which allows the volume it represents to be unmounted. + Only allow this if the volume is removable. Currently + only removable volumes are shown on the desktop. + + * src/file-manager/nautilus-desktop-icon-view-ui.xml: + Add command path for new unmount volume command + +2001-01-10 Michael Engber + + reviewed by: John Harper + + * configure.in: + * libnautilus-extensions/nautilus-background-canvas-group.c: + (nautilus_background_canvas_group_initialize_common), + (nautilus_background_canvas_group_initialize), + (nautilus_background_canvas_group_supplant_root_class): + * libnautilus-extensions/nautilus-background-canvas-group.h: + * libnautilus-extensions/nautilus-background.c: + (nautilus_background_set_up_canvas): + Turned on dithering for canvases (aa mode). We no longer expose + NautilusBackgroundCanvasGroupClass, in nautilus-background-canvas- + group.h. Now we just provide an API to do the class change. + +2001-01-10 Pavel Cisler + + * components/services/install/nautilus-view/nautilus-service-install-view.c: + (install_message_new): + Fix a warning and the build. + +2001-01-09 Mike Fleming + + Added dialogs as specified in: + + 3871 + Logging in to account that has not been activated + should produce activation instructions + + 3399 + no bad passwd lockout dialog in Nautilus + + Also, changed the way the "max login retries" condition was handled + (it previously wasn't) + + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.c: (authn_cb_failed), (login_button_cb): + * components/services/summary/nautilus-view/nautilus-summary-dialog + s.c: (nautilus_summary_login_failure_dialog), + (generate_login_dialog): + * components/services/summary/nautilus-view/nautilus-summary-dialog + s.h: + * components/services/summary/nautilus-view/nautilus-summary-view-p + rivate.h: + +2001-01-09 Robey Pointer + + * components/services/install/nautilus-view/Nautilus_View_install.o + af.in: + + Give the install view a reasonable name that won't make people's + heads explode. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (line_expose), (horizontal_line_new), + (install_message_destroy), (install_message_new), + (generate_install_form), (show_overall_feedback), + (nautilus_service_install_view_initialize), (deps_destroy_foreach), + (nautilus_service_install_view_destroy), + (nautilus_service_install_view_get_nautilus_view), + (nautilus_install_parse_uri), (current_progress_bar_complete), + (nautilus_service_install_downloading), + (nautilus_service_install_dependency_check), + (nautilus_service_install_download_failed), + (nautilus_service_install_installing), + (nautilus_service_install_failed), + (nautilus_service_install_view_update_from_uri), + (nautilus_service_install_view_load_uri), + (service_install_stop_loading_callback): + * components/services/install/nautilus-view/nautilus-service-instal + l-view.h: + * components/services/nautilus-dependent-shared/eazel-services-exte + nsions.h: + + Many changes to make the install view prettier and less annoying + -- mostly Arlo'ified now, with some tweaking left to do. + +2001-01-09 John Harper + + reviewed by: Pavel Cisler + + Work to make icons in list view draw anti-aliased in respect to + the background. Fixes bug 1659 + + * cut-n-paste-code/widgets/nautilusclist/nautilusclist.h + (NautilusCellType): added new type NAUTILUS_CELL_PIXBUF at end + of this enum + + * libnautilus-extensions/nautilus-list.c (NautilusListDetails): + added fields for RGB values of all background colors + + (nautilus_gdk_set_shifted_foreground_gc_color): return the + shifted RGB value + + (nautilus_list_setup_style_colors): save RGB values of all + background colors into the details structure + + (get_cell_style): added another parameter: `bg_rgb', when a non + null pointer it gets set to the RGB value of the chosen + background color + + (draw_cell_pixbuf): added another parameter: `bg_rgb'. + Composite the pixbuf onto a square of this color (using the + full 8-bit alpha), then blit the entire square onto the + drawable + + (draw_cell): added cases to handle NAUTILUS_CELL_PIXBUF type. + Also pass the extra arg to draw_cell_pixbuf in + NAUTILUS_CELL_PIXBUF_LIST case + + (nautilus_list_set_cell_contents): handle NAUTILUS_CELL_PIXBUF + case + + (nautilus_list_set_pixbuf_list): broke out contents into the + new function set_list_cell, parameterized by the + NautilusCellType in addition + (nautilus_list_set_pixbuf): new function, calls set_list_cell + + * src/file-manager/fm-list-view.c (install_row_images): get the + file's icon as a pixbuf, not a pixmap/mask pair. Then use + nautilus_list_set_pixbuf to install it in the list cell + +2001-01-09 Gene Z. Ragan + + reviewed by: Mike Engber + + Fixed bug 5220, Default desktop icon overwritten by dragging + same-named file to Desktop + + * libnautilus-extensions/nautilus-file-operations.c: + (handle_transfer_overwrite): + We now check for special link files being overwritten and + notify the user that such an action is not allowed. + +2001-01-08 Andy Hertzfeld + + * libnautilus-extensions/nautilus-customization-data.c: + (nautilus_customization_data_destroy): + fixed recently introduced memory leak by calling + nautilus_g_hash_table_destroy_deep instead of + g_hash_table_destroy + + * src/nautilus-sidebar-title.c: (update_icon): + fixed problem in the sidebar where web pages were getting the + generic icon instead of the web icon. Fixed by adding + "http:" to the protocols the sidebar special-cases. + +2001-01-08 Darin Adler + + reviewed by: John Sullivan + + A cut at an ability to build without Medusa, starting with a patch + that Eric Fischer wrote. This change is not fully tested. + + Fixed bug 5513 ("nautilus --help" displays "Help options" twice). + + * acconfig.h: Add HAVE_MEDUSA. + * configure.in: Add code to detect HAVE_MEDUSA. + + * libnautilus-extensions/nautilus-customization-data.c: + (nautilus_customization_data_destroy), (load_name_map_hash_table): + Added a FIXME. + + * libnautilus-extensions/Makefile.am: + * libnautilus-extensions/nautilus-file.h: + * libnautilus-extensions/nautilus-trash-file.h: + * libnautilus-extensions/nautilus-trash-file.c: + (nautilus_trash_file_initialize), (trash_destroy), + (nautilus_trash_file_initialize_class): + * libnautilus-extensions/nautilus-vfs-file.h: + * libnautilus-extensions/nautilus-vfs-file.c: + (nautilus_vfs_file_initialize), (vfs_destroy), + (nautilus_vfs_file_initialize_class): + Initial cut at breaking out the special trash version of + NautilusFile. Sadly we need this as well as + NautilusTrashDirectory. + + * src/file-manager/fm-search-list-view.c: + (load_location_callback): Add _() so things get localized and put + the code to compose the indexing message inside ifdef HAVE_MEDUSA. + + * src/file-manager/nautilus-indexing-info.h: + * src/file-manager/nautilus-indexing-info.c: + Put HAVE_MEDUSA ifdefs around most of this file. + (get_text_for_progress_label): Mark string for translation. + (update_progress_display): Remove code to "handle" timeout left + around after dialog is destroyed. + (update_file_index_callback): Change error messages to be more + easily localizable. Use nautilus_error_dialog instead of + gnome_error_dialog. + (timeout_remove_callback): Get rid of the timeout when the object + is destroyed. + (show_index_progress_bar): Connect handler to get rid of the + timeout when the object is destroyed. + (show_indexing_info_dialog): Move code that puts up dialog into a + new function. Also use nautilus_gtk_window_present to put up a + window. Change the NautilusLabel to use line wrapping. + (show_search_service_not_available_dialog): Put this dialog in its + own function so you can use it multiple times. + (nautilus_indexing_info_request_reindex): Put HAVE_MEDUSA around + the content of this function. + (nautilus_indexing_info_get_last_index_time): Put HAVE_MEDUSA + around the function, with a small simple implementation for the + other case. + (nautilus_indexing_info_show_dialog): Put HAVE_MEDUSA around the + function, with a small invocation of the "not available" dialog. + + * src/nautilus-main.c: (main): Remove redundant AUTOHELP. + + * src/nautilus-search-bar-criterion.c: (make_emblem_value_menu): + Fix emblem_name storage lifetime problem. + + * src/file-manager/fm-icon-view.c: Whitespace tweak. + +2001-01-08 John Sullivan + + reviewed by: Darin Adler + + Some infrastructure for bug 2068 and related bugs. + No actual user-visible changes yet. + + * libnautilus-extensions/nautilus-scrolled-window.h: + * libnautilus-extensions/nautilus-scrolled-window.c: + New files, implement a subclass of GtkScrolledWindow + that sends a signal when the scroll position changes. + This was tragically left out of GtkScrolledWindow. + (nautilus_scrolled_window_initialize_class), + (nautilus_scrolled_window_initialize): The usual stuff. + (get_hadjustment), (get_vadjustment): Little helper + functions to avoid repeating some casting. + (adjustment_changed_callback): Callback that emits the + scroll_changed signal when the scroll changes. + (connect_adjustment): Helper function that disconnects + old signals and sets up new ones when the adjustment + objects change. + (real_set_arg): virtual function overridden to connect + up adjustment_changed_callback. + (nautilus_scrolled_window_set_vadjustment), + (nautilus_scrolled_window_set_hadjustment): New functions + that call through to gtk_scrolled_window_xxx and connect + up adjustment_changed_callback. + + * libnautilus-extensions/Makefile.am: Add the new + files to the build. + + * libnautilus-extensions/nautilus-metadata.h: + #define NAUTILUS_METADATA_KEY_ICON_VIEW_SCROLL_ORIGIN + + * src/file-manager/fm-directory-view.h: + * src/file-manager/fm-directory-view.c: + (fm_directory_view_initialize): Make FMDirectoryView inherit + from NautilusScrolledWindow instead of GtkScrolledWindow so + it can hook into the scroll_changed signal. + +2001-01-08 Gene Z. Ragan + + Fixed bug 5507, nautilus crashes when you unmount a drive while a file is + viewed in music viewer + + * libnautilus-extensions/nautilus-volume-monitor.c: + (close_error_pipe): + In the case of a failed unmount, I was just assigning a string to memory + that was later being freed, rather than allocating the memory and + copying the string. I now allocate memory and copy the string. + +2001-01-08 Eric Fischer + + * configure.in: + + Add check for gnome-xml version; insist on version 1.x. + (reviewed by robin@eazel.com) + +2001-01-08 Robey Pointer + + * components/services/install/lib/eazel-install-logic2.c: + (is_satisfied), (is_filename_probably_a_directory), + (no_two_packages_with_same_file), + (package_is_upgrading_and_doesnt_need_file), + (check_conflicts_with_other): + + Rough drafts for 2 of the functions Eskil left in pseudocode form. + + * components/services/install/lib/eazel-install-protocols.c: + (eazel_install_fetch_package): + * components/services/trilobite/libtrilobite/trilobite-core-network + .c: (trilobite_open_uri): + + Fix two typos (no code change). + +2001-01-08 Robey Pointer + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_service_install_preflight_check), + (nautilus_service_install_installing): + + Add gnome-vfs and oaf to the list of packages that trigger a + Nautilus restart. + + * nautilus-installer/src/Makefile: + * nautilus-installer/src/gtk-hackery.c: (gtk_box_nth): + * nautilus-installer/src/installer.c: (find_old_tmpdir): + * nautilus-installer/src/package-tree.c: + (package_customizer_set_package_list), (table_hbox_nth), + (focus_next), (handle_focus), (jump_to_package_tree_page): + + Add mondo code to do keyboard focus management (as well as GTK + will let us) in the package selector. + +2001-01-08 Michael Engber + + * libnautilus-extensions/nautilus-background.c: + (nautilus_background_draw), + (nautilus_background_is_too_complex_for_gtk_style), + (nautilus_background_is_dark): + * src/nautilus-sidebar.c: (background_settings_changed_callback), + (nautilus_sidebar_update_appearance): + Draw sidebar gradients dithered to avoid striation - bug 5458. + +2001-01-07 Andy Hertzfeld + + fixed bugs 5189, 5190 and 5046, pattern and emblem names + not translated, and upper-casing emblem names is bad for + translation, by introducing a translatable display name + specified in the browser xml file. + + * libnautilus-extensions/nautilus-customization-data.c: + (nautilus_customization_data_new), + (nautilus_customization_data_get_next_element_for_display), + (nautilus_customization_data_destroy), (format_name_for_display), + (load_name_map_hash_table): + made it load a display name mapping from the browser xml file into + a hash table when a nautilus customization is created; use the mapping + to return a label with a translated name. + + * src/file-manager/fm-properties-window.c: (create_emblems_page): + rewrote the emblem code in the properties window to use + nautilus_customization instead of ad hoc code, so it will use + the translated names. + + * src/nautilus-property-browser.c: (get_color_category): + replaced custom xml code with a standard routine from xml_extensions. + + * src/nautilus-search-bar-criterion.c: (make_emblem_value_menu): + fixed a memory leak and tweaked the code a bit for translated names. + + * data/browser.xml: + added display name mappings for patterns and emblems + +2001-01-05 Gene Z. Ragan + + * components/music/nautilus-music-view.c: (selection_callback), + (value_changed_callback), (nautilus_music_view_load_uri): + Fixed a bug introduced when all widgets are being shown + when a URI is loaded. This includes both the on and off + states of the play and pause controls. Update control + state right after the control are shown to correct this. + + * libnautilus-extensions/nautilus-volume-monitor.c: + * libnautilus-extensions/nautilus-volume-monitor.h: + (nautilus_volume_monitor_volume_is_removable): + + * src/file-manager/fm-desktop-icon-view.c: (create_mount_link): + More work on detecting is a volume is removable or not. + +2001-01-05 Maciej Stachowiak + + * nautilus.spec.in: Correct names of .oaf files. + +2001-01-05 Robin * Slomkowski + + * nautilus.spec.in: removed time service refrences + left the following renamed files for mjs to fix + nautilus-service-install-view.oaf + trilobite-eazel-install-service.oaf + nautilus-change-password-view.oaf + nautilus-summary-view.oaf + nautilus-rpm-view.oaf + +2001-01-05 Michael Engber + + * libnautilus-extensions/nautilus-glib-extensions.c: + (nautilus_shell_quote), (nautilus_g_round): + * libnautilus-extensions/nautilus-glib-extensions.h: + Added nautilus_g_round. + + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_start_renaming_selected_item): + * libnautilus-extensions/nautilus-icon-text-item.c: + (iti_stop_editing), (layout_text), (iti_edition_accept), + (iti_entry_text_changed_by_clipboard), (iti_start_editing), + (iti_destroy), (recompute_bounding_box), (iti_update), (iti_draw), + (iti_render), (iti_point), (iti_start_selecting), + (iti_stop_selecting), (iti_selection_motion), (iti_ensure_focus), + (iti_event), (iti_bounds), (nautilus_icon_text_item_configure), + (nautilus_icon_text_item_setxy), (nautilus_icon_text_item_select), + (nautilus_icon_text_item_set_text), + (nautilus_icon_text_item_get_type): + * libnautilus-extensions/nautilus-icon-text-item.h: + Overhauled nautilus-icon-text-item to be a more proper canvas + item - mainly fixing it's use of coordinates. Also simplified + its configure api a bit. This fixed bug 4166. Also put in a + workaround to fix bug 3973. + + +Fri Jan 05 20:28:43 2001 George Lebl + + Darin saw this patch and says it should not destroy the world + if I apply it. + + Fixes: 3988 + + * libnautilus-extensions/nautilus-background.c + (nautilus_background_draw_flat_box): Unset the mask on the bg_gc + from the style, not to leave the gc in a bad state + + * libnautilus-extentions/nautilus-list.c (nautilus_list_style_set) + (unref_gcs) (unref_a_gc) (nautilus_list_initialize_class) + (nautilus_list_destroy) (nautilus_gdk_gc_copy) + (nautilus_list_realize) (make_gcs_and_colors) + (nautilus_list_unrealize): Follow the theme by recopying the gcs + after a theme was changed. Also do more sanity setting + when copying the gcs, just to be on the very safe side. + + * src/nautilus-theme-selector.c (theme_style_set_callback) + (setup_font_sizes_for_row) (setup_font_sizes_for_all_rows) + (clear_style_for_all_rows) (nautilus_theme_selector_initialize) + (add_theme): Follow the current theme by binding to the style_set + signal and redoing the style stuff so that we don't get garbage + and other fun on changing of gtk theme. + +2001-01-05 Robin * Slomkowski + + * components/notes/Makefile.am: + added Nautilus_View_notes.oaf.in + * components/services/login/nautilus-view/Makefile.am: + added Nautilus_View_change-password.oaf.in + * po/POTFILES.in: removed references to + components/services/time/command-line/main.c + components/services/time/nautilus-view/main.c + components/services/time/nautilus-view/trilobite-eazel-time-view.c + components/services/time/service/main.c + components/services/time/service/trilobite-eazel-time-service.c + components/shell/Nautilus_View_shell.oaf.in + +2001-01-05 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 5410 ("Esc" cancelling of icon stretch doesn't + update menus) + + * libnautilus-extensions/nautilus-icon-container.h: + Defined signals icon_stretch_started and icon_stretch_ended. + + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_initialize_class): Set up new signals. + (emit_stretch_started), (emit_stretch_ended): New convenience + functions for emitting new signals. + (icon_toggle_selected), (undo_stretching), + (nautilus_icon_container_show_stretch_handles): Emit new signals. + + * src/file-manager/fm-icon-view.c: + (create_icon_container): Call fm_directory_view_update_menus + when icon_stretch_begin/end signals are emitted. + (show_stretch_handles_callback), + (unstretch_icons_callback): Remove calls to update menus, since + we'll now do it when we get the stretch-state-changed signals. + +2001-01-05 Darin Adler + + * Makefile.am: Fix for wrongly named ChangeLog-200001018. + * components/Makefile.am: Removed obsolete comment. + +2001-01-05 Andy Hertzfeld + + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize), (nautilus_music_view_load_uri): + fixed bug 4045, unfinished widgets during load in music view, by + not showing the widgets until the load is completed. + +2001-01-05 Andy Hertzfeld + + * src/nautilus-property-browser.c: (ensure_uri_is_image), + (add_pattern_to_browser): + fixed bug 5265, you shouldn't be able to replace the reset image + in the property browser, by testing for that case and putting up + an error dialog instead. + +2001-01-05 Robin * Slomkowski + + * nautilus.spec.in: changed .oafinfo to .oaf + +2001-01-05 Gene Z. Ragan + + My previous change dealing with desktop mounts was a bit too + overzealous. Removable volumes now appear on the desktop + when mounted. + + * libnautilus-extensions/nautilus-volume-monitor.c: + (mount_volume_floppy_add), (mount_volume_iso9660_add), + (mount_volume_add_filesystem): + * src/file-manager/fm-desktop-icon-view.c: (create_mount_link): + +2001-01-05 Maciej Stachowiak + + xml-i18n-toolized Nautilus (plus a bit of other cleanup) as part + of resolving bug 2693 (I will consider my work done once I have + also handled Bonobo). + + * autogen.sh, configure.in: xml-i18n-toolize + * .cvsignore: ignore xml-i18n scripts + * Makefile.am: distribute xml-i18n-scripts + + * components/adapter/Nautilus_ComponentAdapterFactory_std.oaf.in: + Renamed from components/adapter/nautilus-adapter.oafinfo; mark + translatable strings transalatable. + * components/adapter/Makefile.am: Deal w/ oaf file rename, do + merge. + * components/adapter/.cvsignore: Ignore .oaf file. + + * components/hardware/.cvsignore, components/hardware/Makefile.am, + components/hardware/Nautilus_View_hardware.oaf.in, + components/hardware/nautilus-hardware-view.oafinfo: Ditto. + * components/history/.cvsignore, components/history/Makefile.am, + components/history/Nautilus_View_history.oaf.in, + components/history/nautilus-history-view.oafinfo: Ditto. + + * components/image-viewer/.cvsignore, + components/image-viewer/Makefile.am, + components/image-viewer/Nautilus_View_image.oaf.in, + components/image-viewer/nautilus-image-view.oafinfo: Ditto. + + * components/loser/content/.cvsignore, + components/loser/content/Makefile.am, + components/loser/content/Nautilus_View_content-loser.oaf.in, + components/loser/content/nautilus-content-loser.oafinfo: Ditto. + + * components/loser/sidebar/.cvsignore, + components/loser/sidebar/Makefile.am, + components/loser/sidebar/Nautilus_View_sidebar-loser.oaf.in, + components/loser/sidebar/nautilus-sidebar-loser.oafinfo: Ditto. + * components/mozilla/.cvsignore, components/mozilla/Makefile.am, + components/mozilla/Nautilus_View_mozilla.oaf.in, + components/mozilla/nautilus-mozilla-content-view.oafinfo: Ditto. + * components/music/.cvsignore, components/music/Makefile.am, + components/music/Nautilus_View_music.oaf.in, + components/music/nautilus-music-view.oafinfo: Ditto. + * components/notes/.cvsignore, components/notes/Makefile.am, + components/notes/Nautilus_View_notes.oaf.in, + components/notes/nautilus-notes.oafinfo: Ditto. + * components/rpmview/.cvsignore, components/rpmview/Makefile.am, + components/rpmview/Nautilus_View_rpm.oaf.in, + components/rpmview/nautilus-rpm-view.oafinfo: Ditto. + * components/sample/.cvsignore, components/sample/Makefile.am, + components/sample/Nautilus_View_sample.oaf.in, + components/sample/nautilus-sample-content-view.oafinfo: Ditto. + * components/services/install/nautilus-view/.cvsignore, + components/services/install/nautilus-view/Makefile.am, + components/services/install/nautilus-view/Nautilus_View_install.oaf.in, + components/services/install/nautilus-view/nautilus-service-install-view.oafinfo: + Ditto. + * components/services/install/server/.cvsignore, + components/services/install/server/Makefile.am, + components/services/install/server/Trilobite_Service_install.oaf.in, + components/services/install/server/trilobite-eazel-install-service.oafinfo: + Ditto. + * components/services/login/nautilus-view/.cvsignore, + components/services/login/nautilus-view/Makefile.am, + components/services/login/nautilus-view/Nautilus_View_change-password.oaf.in, + components/services/login/nautilus-view/nautilus-change-password-view.oafinfo: + Ditto. + * components/services/summary/nautilus-view/.cvsignore, + components/services/summary/nautilus-view/Makefile.am, + components/services/summary/nautilus-view/Nautilus_View_services-summary.oaf.in, + components/services/summary/nautilus-view/nautilus-summary-view.oafinfo: Ditto. + * components/services/trilobite/sample/.cvsignore, + components/services/trilobite/sample/nautilus-view/Makefile.am, + components/services/trilobite/sample/nautilus-view/Nautilus_View_service-sample.oaf.in, + components/services/trilobite/sample/nautilus-view/nautilus-sample-service-view.oafinfo: + Ditto. + * components/services/trilobite/sample/service/.cvsignore, + components/services/trilobite/sample/service/Makefile.am, + components/services/trilobite/sample/service/Trilobite_Service_sample.oaf.in, + components/services/trilobite/sample/service/trilobite-eazel-sample-service.oafinfo: + Ditto. + * components/text/.cvsignore, components/text/Makefile.am, + components/text/Nautilus_View_text.oaf.in, + components/text/nautilus-text-view.oafinfo: Ditto. + * src/.cvsignore, src/Makefile.am, src/Nautilus_shell.oaf.in, + src/nautilus.oafinfo: Ditto. + * components/tree/.cvsignore, components/tree/Makefile.am, + components/tree/Nautilus_View_tree.oaf.in, + components/tree/nautilus-tree-view.oafinfo.shlib: Ditto, and + removed ability to build tree view as an exe component (no one was + really using it anyway). + * components/tree/nautilus-tree-view.oafinfo.exe: Removed. + * components/help/.cvsignore, components/help/Makefile.am, + components/help/Nautilus_View_help.oaf.in: + components/help/help-contents.oafinfo: Ditto, and merged other + oafinfo files into Nautilus_View_help.oaf.in, commented out. + * components/help/help-factory.oafinfo, + components/help/help-index.oafinfo, + components/help/help-search.oafinfo: Removed. + + * po/POTFILES.in: Added .oaf.in files. + * po/README.tools, po/ui-extract.pl, po/ui-testcases.glade, + po/ui-testcases.xml, po/update.pl, po/update.sh: Removed these + now-obsolete files. + + * components/services/Makefile.am: Removed time service from build. + * components/html/*, components/websearch/*: cvs deleted these + obsolete long since non-built components. + * ChangeLog-200001018: Renamed to ChangeLog-20001018 (whoops) + +2001-01-04 Andy Hertzfeld + + * libnautilus-extensions/nautilus-icon-factory.c: + (should_display_image_file_as_itself): + fixed bug 5134, shouldn't display thumbnails for images that we + don't have read permission by explicitly test for read permission + in should_display_image_file_as_itself. + +2001-01-04 Andy Hertzfeld + + * src/file-manager/fm-icon-view.c: (should_preview_sound): + fixed bug 5108, remote sounds get preview image, but don't actually + preview. Fixed by making can_preview_sound return FALSE for + non-local sounds. + +2001-01-04 Pavel Cisler + + reviewed by: Rebecca Schulman + + Fix 5451 - GnomeVFS-WARNING received at startup. + + * libnautilus/nautilus-view-standard-main.c: + (nautilus_view_standard_main_multi): + New standard module initialization call was not initializing + or shutting down gnome_vfs. + + * components/adapter/main.c: (main): + * components/hardware/main.c: (main): + * components/html/ntl-web-browser.c: (main): + * components/mozilla/main.c: (main): + * components/music/main.c: (main): + * components/notes/nautilus-notes.c: (main): + * components/rpmview/main.c: (main): + * components/text/main.c: (main): + * components/tree/main.c: (main): + All of the above modules were initializing gnome_vfs but never + shutting it down. Add proper gnome_vfs_shutdown call. + This very likely fixes a problem with the notes module, etc. + sticking around after Nautilus quits. + + +2001-01-04 Darin Adler + + Fix a screwup in my recent check-in that made hidden files + show up on the desktop. + + * src/file-manager/fm-directory-view.h: + * src/file-manager/fm-directory-view.c: + (fm_directory_view_initialize): Don't try to special-case the + desktop since it's too early to detect that case anyway. + (fm_directory_view_destroy): Use the + fm_directory_view_ignore_hidden_file_preferences call to + disconnect the preferences callbacks. This prevents disconnecting + them twice in case another caller makes that call. + (fm_directory_view_ignore_hidden_file_preferences): Turn on the + flag that says we're ignoring the preferences, disconnect the + preference callbacks, and set the flags both to FALSE so we won't + show hidden or backup files. + + * src/file-manager/fm-desktop-icon-view.c: + (fm_desktop_icon_view_initialize): Call the new + fm_directory_view_ignore_hidden_file_preference to make it never + show hidden or backup files on the desktop. + +2001-01-04 Andy Hertzfeld + + * src/nautilus-property-browser.c: (set_emblem_image_from_file), + (make_properties_from_directories): + fixed bug 5392, custom image causes distortion in emblems dialog, + by setting the background mode of the nautilus_image used to display + the emblems to solid, which also improves performance. Also, use + a nautilus image instead of a pixmap widget in the emblem image + selection dialog to better display the image. + +2001-01-04 Darin Adler + + Some FIXME cleanup. + + * components/help/converters/gnome-db2html2/sect-elements.c: + (sect_article_end_element), (sect_inlinegraphic_start_element): + * components/help/converters/gnome-db2html2/toc-elements.c: + (toc_sect_end_element): + * components/mozilla/mozilla-events.cpp: + * components/mozilla/nautilus-mozilla-content-view.c: + (make_full_uri_from_relative), (eazel_services_scheme_translate): + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize), + (music_view_set_selected_song_title), (reset_playtime), + (play_status_display), (slider_moved_callback), + (add_play_controls): + * components/notes/nautilus-notes.c: (notes_load_metainfo): + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_check_for_file_conflicts), + (eazel_install_do_transaction_all_files_check), + (eazel_install_prune_packages_helper), + (eazel_install_check_existing_packages): + * libnautilus-extensions/nautilus-string.c: (nautilus_strcmp), + (nautilus_strcasecmp), (nautilus_strcmp_case_breaks_ties), + (nautilus_strcoll), (nautilus_str_is_equal), + (nautilus_istr_is_equal), (nautilus_strcmp_compare_func), + (nautilus_strcoll_compare_func), + (nautilus_strcasecmp_compare_func): + * src/file-manager/fm-directory-view.c: (open_location): + * src/nautilus-first-time-druid.c: (make_anti_aliased_label), + (make_hbox_user_level_radio_button), (set_up_user_level_page): + Added bug numbers to FIXMEs. At one point Josh made some bugs for + FIXMEs but never got around to checking in the bug numbers in the + source code. And I wrote one bug report. + + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize): Removed a fixed FIXME. Also got + rid of a hard-coded constant and took excess spaces out of some + string constants. + + * components/services/install/lib/eazel-install-object.c: + (eazel_install_emit_dependency_check_default): Changed a FIXME + into a non-FIXME comment, now the the bug is fixed. + + * components/services/install/lib/eazel-package-system-rpm3.c: + (rpm_packagedata_fill_from_file): Removed an incorrect bug number + from a FIXME. + + * components/services/install/nautilus-view/nautilus-service-install-view.h: + * components/services/install/nautilus-view/nautilus-service-install-view.c: + (nautilus_service_install_installing): Removed the FIXME from a + comment that's about how a bug was fixed. + + * components/services/trilobite/libtrilobite/trilobite-md5-tools.h: + * components/services/trilobite/libtrilobite/trilobite-md5-tools.c: + * docs/style-guide.html: + Removed FIXME and corrected misunderstanding about whether use of + the guchar typedef is recommended in Nautilus coding style. + + * libnautilus-extensions/nautilus-gdk-font-extensions.h: + * libnautilus-extensions/nautilus-gdk-font-extensions.c: + Removed misguided use of const in here. Gdk and Gtk object types + just aren't suitable for const, and you end up doing type casts + that defeat the purpose. + + * src/nautilus-window-manage-views.c: (load_underway_callback): + Remove a FIXME for a fixed bug. + +2001-01-04 Robey Pointer + + * components/services/install/command-line/eazel-alt-install-corba. + c: (delete_files): + + Remove the restriction that files be physically downloaded before + asking if the user would like to delete files. That way all the + packages could come from a previous cache and still be cleaned up + afterwards. + + * components/services/install/lib/eazel-install-logic.c: + * components/services/install/lib/eazel-package-system-rpm3.c: + (rpm_open_db): + * components/services/install/lib/eazel-package-system-types.c: + * components/services/install/lib/eazel-package-system-types.h: + * components/services/install/lib/eazel-softcat.c: + (eazel_softcat_get_info): + + Fix up some documentation. + + * components/services/install/lib/eazel-install-object.c: + (find_old_tmpdir), (create_temporary_directory), + (eazel_install_delete_downloads), + (eazel_install_install_packages): + + Clean up the tmpdir creation code: Make sure any new directory is + created atomically. If generating a new directory name, + incorporate the username for uniqueness, and reuse any generated + directory from a previous session. + +2001-01-04 Darin Adler + + reviewed by: John Sullivan + + Fixed bug 5435 (Irreproducible crash in nautilus_directory_destroy + after copy/move operations). + + * libnautilus-extensions/nautilus-directory.c: + (nautilus_directory_notify_files_moved): Removed an extra unref + and slightly reordered the code to make it clearer why the rest of + the ref count manipulation is correct. + +2001-01-04 Darin Adler + + reviewed by: Rebecca Schulman + + Fixed bug 3811 (shallow file counts and top-left text are fetched + even for non-displayed hidden/backup items). + + * libnautilus-extensions/nautilus-directory-private.h: + * libnautilus-extensions/nautilus-directory-async.c: + (allow_metafile): Add "ghelp:" and "gnome-help:" to the + unfortunate list of hard-coded schemes. If we hard-code "help:" we + have to hard-code its synonyms too. + (find_monitor): Use g_new0 so fields in the Monitor are not + uninitialized in this case (the fields in question are ignored, + but it's still nicer this way). + (nautilus_directory_monitor_add_internal): Set up the "monitor + hidden files" and "monitor backup files" in the Monitor structure + based on new parameters. + (should_display_file_name): Use + nautilus_file_name_matches_hidden_pattern and + nautilus_file_name_matches_backup_pattern. + (monitor_includes_file): New function that encapsulates the rule + about which monitor includes which file. Handles the new flags for + not monitoring hidden or backup files. + (is_needy): Call monitor_includes_file. + (select_needy_file): Call monitor_includes_file. + + * libnautilus-extensions/nautilus-file-private.h: + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_name_matches_hidden_pattern), + (nautilus_file_name_matches_backup_pattern): New functions to + share with the directory code. + (nautilus_file_is_hidden_file), (nautilus_file_is_backup_file): + Use the new functions and use the raw relative_uri -- no need to + unescape to change to a file name since the "." and "~" characters + are not encoded. + + * src/file-manager/fm-directory-view.c: + (fm_directory_view_initialize): Share more code with the + filtering_changed_callback. Handle the desktop view better by + never setting the "show hidden" and "show backup" flags (so they + are both FALSE) and not setting up the callbacks. + (fm_directory_view_destroy): Since we don't set up the callbacks + for desktop windows, don't remove them for desktop windows. + (queue_pending_files): Remove the desktop special case from + here. It was strange to set the flags up then wait until this + moment to clear them both. It's better to keep them FALSE. + (finish_loading): Renamed and changed to pass the appropriate + values in to the nautilus_directory_file_monitor_add call -- this + is the actual bug fix. + (filtering_changed_callback): Remove the desktop special case, + since this function will now never be called for the desktop. + + * libnautilus-extensions/nautilus-directory.h: + * libnautilus-extensions/nautilus-directory.c: + (nautilus_directory_file_monitor_add): Pass through the new + "monitor hidden files" and "monitor backup files" parameters. + (nautilus_self_check_directory): Pass TRUE for both. + * libnautilus-extensions/nautilus-vfs-directory.c: + (vfs_file_monitor_add): Pass through the new "monitor hidden + files" and "monitor backup files" parameters. + + * libnautilus-extensions/nautilus-merged-directory.c: + (merged_file_monitor_add), (monitor_add_directory): Store the + "monitor hidden files" and "monitor backup files" and pass them + through to the individual directory monitor calls. + + * components/tree/nautilus-tree-model.c: + (nautilus_tree_model_node_begin_monitoring_no_connect): + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_monitor_add): + * libnautilus-extensions/nautilus-trash-monitor.c: + (nautilus_trash_monitor_initialize): + * src/nautilus-applicable-views.c: + (got_minimum_file_info_callback): + Pass in TRUE for "monitor hidden files" and "monitor backup files" + to get the same behavior as before. (In some cases the booleans + are just ignored, in other cases we just monitor all files as we + used to.) + + * RENAMING: Remind myself to change the name of the + NAUTILUS_CALL_VIRTUAL macro to NAUTILUS_CALL_METHOD some day. + +2001-01-04 John Harper + + * libnautilus-extensions/nautilus-gdk-extensions.c, + libnautilus-extensions/nautilus-gdk-extensions.h + (nautilus_gdk_window_focus): added second argument, + `timestamp', that's passed straight through to XSetInputFocus + + * libnautilus-extensions/nautilus-drag-window.c: save the + timestamp in the WM_TAKE_FOCUS client message, and use it when + eventually focusing the window (instead of implicitly using + CurrentTime, which can lead to race conditions) + + * libnautilus-extensions/nautilus-icon-text-item.c + (iti_ensure_focus): pass GDK_CURRENT_TIME as timestamp to + nautilus_gdk_window_focus + +2001-01-04 John Harper + + reviewed by: Pavel Cisler + + When renaming an icon, manually focus the associated top-level + window. This fixes bug 5426 (can't rename icons in sloppy-focus + mode) + + * libnautilus-extensions/nautilus-icon-text-item.c + (iti_ensure_focus): new function, ensures that both the canvas + item and the top-level window are focused + (iti_event): call iti_ensure_focus in the button-press case + (nautilus_icon_text_item_start_editing): call iti_ensure_focus + instead of gnome_canvas_item_grab_focus to focus the item + +2001-01-03 John Harper + + Small fix to the `drag doesn't focus' stuff I did earlier to + work around button-release events not following button-press + events. (E.g. this happens for some reason when clicking on the + left hand pane of the property browser window) + + * libnautilus-extensions/nautilus-drag-window.c + (wm_protocols_filter): don't only start the timeout when we + don't think we're in the middle of a press-release sequence + (button_press_emission_callback): if we already think we're in + the middle of a press-release, commit any pending requests + +2001-01-03 Darin Adler + + reviewed by: Pavel Cisler + + Fix bug 5235 ("Forget History" eliminates history from Go menu, + not History sidebar panel). + + * components/history/nautilus-history-view.c: + (install_icons): Fix leak of pixmap and bitmap. + (update_history): Replaced dual lock system with a single one. + (button_press_callback): Only respect button 1, ignore others. + (button_release_callback): Only respect button 1, ignore others, + (history_changed_callback): A new single callback for when the + history list changes to replace the multiple callbacks before. + (nautilus_history_view_initialize_class), + (nautilus_history_view_initialize), + (nautilus_history_view_destroy), (main): Change the history view + to use nautilus_view_standard_main which requires a subclass. This + gets rid of a lot of boilerplate code. + + * libnautilus/nautilus-view-component.idl: Make every NautilusView + get an explicit history_changed call instead of requiring them to + guess when to get history. Removed the old get_history_list call + and also renamed the HistoryList sequence to History. + * libnautilus/nautilus-view.h: + * libnautilus/nautilus-view.c: + (impl_Nautilus_View_history_changed), + (nautilus_view_initialize_class): Added the necessary stuff to + cover the new history_changed call. + + * src/nautilus-view-frame.h: + * src/nautilus-view-frame.c: (nautilus_view_frame_initialize): + Connect handlers so we can send history_changed calls to the + NautilusView when either the history or the icons change. + (nautilus_view_frame_destroy): Change state to EMPTY so the + history signal won't be sent once the frame is destroyed. + (view_frame_activated): Send a history_changed to every + newly-activated view. + (get_CORBA_object): Helper function to make code that makes CORBA + calls simpler. + (check_if_view_is_gone): Use get_CORBA_object. + (attach_client): Gave a nicer name, removed the code that makes + the Nautilus_HistoryFrame interface. + (nautilus_view_frame_load_client): Do the attach_client (formerly + nautilus_view_frame_set_to_component) before calling + view_frame_activated. This is needed since view_frame_activated + now sends a history_changed to the view. + (nautilus_view_frame_load_location), + (nautilus_view_frame_stop_loading), + (nautilus_view_frame_selection_changed), + (nautilus_view_frame_title_changed): Use get_CORBA_object. + (get_history_list): Made this private. + (send_history): Helper function that sends history to the view if + it's in the appropriate state. + + * src/Makefile.am: + * src/nautilus-history-frame.c: + * src/nautilus-history-frame.h: + Removed the old NautilusHistoryFrame, which is no longer needed + since we put the history call right in the NautilusView class. + + * src/nautilus-window-manage-views.c: (get_history_list_callback): + Updated for Nautilus_HistoryList -> Nautilus_History change. + + Fix bug 5391 ("Esc" Canceling of an icon stretch doesn't restore + icon position.). + + * libnautilus-extensions/nautilus-icon-private.h: + * libnautilus-extensions/nautilus-icon-container.c: + (clear_drag_state): Add a single bottleneck function to make sure + the context menu timeout always gets canceled. + (continue_stretching): Remove the unused "update_position" parameter. + (undo_stretching): Consolidate the cancel_stretching function and + restore the icon's position as well as its size. Also use the new + bottleneck to clear the drag state. + (button_release_event): Use the new bottleneck to clear the drag + state. + (show_context_menu_callback): Use the new bottleneck to clear the + drag state. + (nautilus_icon_container_set_selection), + (nautilus_icon_container_select_list_unselect_others): Take + advantage of the defaults in g_hash_table_new and use NULL, NULL + instead of g_direct_hash, g_direct_equal. + (nautilus_icon_container_show_stretch_handles): Save the position + as well as the size. + (compute_stretch): Add a FIXME with a bug number. + + Fix bug 5407 (Make "Hardware Overview" title translatable). + + * components/hardware/nautilus-hardware-view.c: + (nautilus_hardware_view_destroy): Remove unused uri field. + (extract_info): Fix storage leak. + (get_RAM_description): Get rid of code that non-portably relies on + long long. Mark strings for translation. + (get_IDE_description): Get rid of code that non-portably relies on + long long. Mark strings for translation. + (setup_overview_form): Marked string for translation. + (setup_CPU_form), (setup_RAM_form), (setup_IDE_form), + (is_location), (nautilus_hardware_view_load_uri): Disable the + views other than the overview for now since they are not ready to + be seen. + (nautilus_hardware_view_drag_data_received): Get rid of the code + that makes the hardware view accept a URI list drag. + + Fix bug 5405 (nautilus --check fails when using LC_ALL=sv_SE due + to missing entry in POTFILES.in). + + * po/POTFILES.in: Added nautilus-glib-extensions.c. + + Other changes. + + * src/nautilus-signaller.h: + * src/nautilus-signaller.c: (nautilus_signaller_initialize_class), + (nautilus_signaller_get_current): + Change the NautilusSignaller class so that the interface calls the + object a GtkObject * and the details of the class are hidden. + + * src/nautilus-property-browser.c: (emit_emblems_changed_signal): + * src/nautilus-search-bar-criterion.c: + (nautilus_search_bar_criterion_destroy), + (nautilus_search_bar_criterion_new_from_values): + * src/nautilus-window-menus.c: + (nautilus_window_initialize_go_menu): + * src/nautilus-window.c: (nautilus_send_history_list_changed): + Now that nautilus_signaller_get_current returns a GtkObject, + remove some unnecessary casts. + + * components/html/glibwww-callbacks.c: (get_sock_info), + (glibwww_timer_register): + * components/tree/nautilus-tree-model.c: + (nautilus_tree_model_initialize): + * components/tree/nautilus-tree-view.c: + (nautilus_tree_view_initialize): + * libnautilus-extensions/nautilus-directory-async.c: + (async_job_start): + * libnautilus-extensions/nautilus-directory.c: + (nautilus_directory_notify_files_added), + (nautilus_directory_notify_files_removed), + (nautilus_directory_notify_files_moved): + * libnautilus-extensions/nautilus-icon-factory.c: + (nautilus_icon_factory_initialize): + * libnautilus-extensions/nautilus-list.c: + (nautilus_list_set_selection): + * libnautilus-extensions/nautilus-merged-directory.c: + (nautilus_merged_directory_initialize): + * libnautilus-extensions/nautilus-trash-directory.c: + (nautilus_trash_directory_initialize): + * src/file-manager/fm-properties-window.c: + (fm_properties_window_present): + Take advantage of the defaults in g_hash_table_new and use NULL, + NULL instead of g_direct_hash, g_direct_equal. + +2001-01-03 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 5313 (location bar gets partly inactive during + auto-completion) + + This was a GTK bug involving event timing. The fix was to + add a workaround in NautilusEntry. + + * libnautilus-extensions/nautilus-entry.c: + (nautilus_entry_initialize_class): Wire up default handler + for selection_clear_event. + (nautilus_entry_selection_clear): Bail out without doing anything + if we are still the selection owner. + +2001-01-03 John Harper + + reviewed by: Darin Adler + + Work to make clicking on an inactive window not focus it if the + click subsequently starts a drag. Fixes bug 1681, and removes + fixme bugs 5030, 5032, and 5033 + + * libnautilus-extensions/nautilus-drag-window.c, + libnautilus-extensions/nautilus-drag-window.h + (nautilus_drag_window_register): new module, hooks into a + GtkWindow to retrofit a focus policy that makes sense with drag + and drop sources. When dragging from a window, a button press + event that subsequently causes a drag to be started doesn't + focus (or raise) the window + + This uses a sawfish-specific WM_PROTOCOL to handle the `don't + raise' part (_SAWFISH_WM_RAISE_WINDOW), but everything else + should work with any ICCCM-compliant wm. (The sawfish specific + part will have zero effect with other wm's. It currently + requires a cvs version of sawfish) + + * src/nautilus-window.c (nautilus_window_constructed): + * src/nautilus-property-browser.c + (nautilus_property_browser_initialize): + Call nautilus_drag_window_register () on the window, since it + may be used as a drag source + + * libnautilus-extensions/nautilus-gdk-extensions.c, + libnautilus-extensions/nautilus-gdk-extensions.h + (nautilus_gdk_window_focus, + nautilus_gdk_window_set_wm_protocols): new functions + +2001-01-04 Rebecca Schulman + + reviewed by: Maciej Stachowiak + + * libnautilus-extensions/nautilus-mime-actions.c: + (nautilus_mime_get_default_component_for_file_internal): + Remove fixme for bug 1264, which is no longer relevant. + + +2001-01-03 Gene Z. Ragan + + Only display removable volumes on desktop. + + * libnautilus-extensions/nautilus-volume-monitor.c: + (nautilus_volume_monitor_volume_is_removable): + * libnautilus-extensions/nautilus-volume-monitor.h: + * src/file-manager/fm-desktop-icon-view.c: (volume_in_black_list), + (create_mount_link): + +2001-01-03 Mike Fleming + + * components/services/summary/nautilus-view/main.c: (main): + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.c: (login_button_cb): + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (nautilus_summary_view_destroy): + + Bug 5343 for real this time. + + My decision to move the ammonite_init call after the + oaf_make_registration_id call was a poor one and caused another + potential race. + +2001-01-03 Gene Z. Ragan + + Fixed bug 5394, CRITICAL warning received when zooming a 1x1 + pixel image below 100% + + * components/image-viewer/nautilus-image-view.c: (rezoom_control), + (control_size_allocate_callback): + Don't allow a scale if the new width or height is less then 1. + +2001-01-03 Ramiro Estrugo + + reviewed by: Pavel Cisler + + * components/mozilla/nautilus-mozilla-content-view.c: + (file_exists), (ensure_profile_dir), (ensure_cache_dir), + (mozilla_content_view_one_time_happenings): + Add support for using mozilla caching. + +Wed Jan 03 04:11:01 2001 George Lebl + + Reviewed by Maciej, so if I broke something, blame him. + + Fixes #5356 + + * libnautilus-extensions/nautilus-directory-background.c + (make_root_pixmap): Do what the comment says and actually open + a new display before setting the close down mode to RetainPermanent. + This made nautilus windows stay persistent after a crash or whatnot. + This bug was inherited from control-center. + +2001-01-03 Ramiro Estrugo + + reviewed by: Pavel Cisler + + Fix bugs 4677, 3031. + + * configure.in: + * components/mozilla/Makefile.am: + Use the right RPATH flags depending on where mozilla was found. + This fixed the problem of trying to use mozilla built by + eazel-hacking instead of from RPMS. + + * components/mozilla/nautilus-mozilla-content-view.c: + (nautilus_mozilla_content_view_initialize_class), + (mozilla_content_view_one_time_happenings), + (mozilla_content_view_setup_profile_directory): + Add support for setting up a Mozilla profile so that cookies and + cache work. + +2001-01-02 Ramiro Estrugo + + * configure.in: + Add "detection" of M19. Remove the pre M18 detections. + +2001-01-02 Ramiro Estrugo + + reviewed by: Gene Ragan + + * libnautilus-extensions/nautilus-art-extensions.c: + (nautilus_art_irect_contains_point): + * libnautilus-extensions/nautilus-art-extensions.h: + New function to test whether a rectangle contains a point. + + * libnautilus-extensions/nautilus-gdk-extensions.c: + (nautilus_self_check_gdk_extensions): + * libnautilus-extensions/nautilus-gdk-extensions.h: + * libnautilus-extensions/nautilus-gdk-font-extensions.c: + (nautilus_gdk_font_get_bold), (font_scalable_get_by_size), + (font_bitmap_get_by_size), (nautilus_gdk_font_get_larger), + (nautilus_gdk_font_get_smaller), (nautilus_gdk_font_equal), + (nautilus_get_largest_fitting_font), + (nautilus_string_ellipsize_start), (nautilus_gdk_font_list_fonts), + (nautilus_gdk_font_get_name), (xlfd_string_get_nth), + (xlfd_string_replace_nth), (xlfd_string_get_nth_as_int), + (xlfd_string_is_scalable_non_bitmap), + (xlfd_string_could_be_scalable_non_bitmap), + (font_entry_has_bold_weight_test), + (font_entry_is_scalable_non_bitmap_test), + (compare_xlfd_by_size_in_points), (compare_xlfd_by_size_in_pixels), + (nautilus_self_check_ellipsize_start), + (nautilus_self_check_gdk_font_extensions): + * libnautilus-extensions/nautilus-gdk-font-extensions.h: + Move GdkFont extensions to their own file. Add new functions to + find a larger/smaller find given an existing font. Change the + bold flavor font function to query the system for fonts, this + makes it work regardless of the user's selected font. Before it + worked only for some fonts. + + * libnautilus-extensions/nautilus-file-operations-progress.c: + * libnautilus-extensions/nautilus-file-operations.c: + * libnautilus-extensions/nautilus-icon-canvas-item.c: + * src/nautilus-sidebar-title.c: + Include nautilus-gdk-font-extensions.h. + + * libnautilus-extensions/nautilus-gtk-extensions.c: + (nautilus_gtk_label_make_bold), (nautilus_gtk_label_make_larger), + (nautilus_gtk_label_make_smaller): + * libnautilus-extensions/nautilus-gtk-extensions.h: + New functions to make a GtkLabel larger/smaller. + + * libnautilus-extensions/nautilus-lib-self-check-functions.h: + Add entry for nautilus-gdk-font-extensions. + + * libnautilus-extensions/nautilus-string-list.c: + (nautilus_string_list_modify_nth), + (nautilus_string_list_remove_nth), + (nautilus_string_list_find_by_function), + (nautilus_string_list_sort), + (nautilus_string_list_sort_with_function): + * libnautilus-extensions/nautilus-string-list.h: + New functions to modify, remove and find specific string entries. + New function to sort the string list given a compare function. + +2001-01-02 Robey Pointer + + * components/services/install/command-line/eazel-alt-install-corba. + c: (main): + * components/services/install/server/main.c: (main): + * components/services/time/service/main.c: (main): + * components/services/trilobite/libtrilobite/trilobite-core-utils.c + : (trilobite_init): + * components/services/trilobite/libtrilobite/trilobite-core-utils.h + : + * components/services/trilobite/sample/command-line/main.c: (main): + * components/services/trilobite/sample/service/main.c: (main): + + Add a parameter to trilobite_init to allow a service to pass its + own popt options along (needed for the command-line installer). + +2001-01-02 Andy Hertzfeld + + * components/hardware/nautilus-hardware-view.c: + (get_RAM_description), (get_IDE_description): + Incorporated Bud's patch to the disk size calculation in the + hardware view, which sidesteps integer overflow problems and makes + it consistent with industry convention by using 1000 instead of + 1024 for the definition of a kbyte. Also tweaked the RAM size + calculation, but it's still not quite right yet. + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (draw_pixbuf_aa): + improved performance by using nautilus_gnome_canvas_draw_pixbuf + to draw on the aa canvas instead of libart. + +======= +2001-01-09 Andy Hertzfeld + + * src/nautilus-throbber.c: (nautilus_throbber_initialize_class), + (nautilus_throbber_initialize), (bump_throbber_frame), + (nautilus_throbber_start), (nautilus_throbber_stop): + + made the throbber anti-aliased by using a nautilus_image widget + to do the drawing. + +2001-01-04 Andy Hertzfeld + + * components/rss-control/nautilus-rss-control.c: + (nautilus_rss_control_initialize_class), + (nautilus_rss_control_initialize), (nautilus_rss_control_destroy), + (rss_control_pixbuf_composite), (draw_rss_logo_image), + (draw_rss_items), (nautilus_rss_control_draw), + (nautilus_rss_control_expose), + (nautilus_rss_control_set_prelight_index), + (nautilus_rss_control_motion_event), + (nautilus_rss_control_leave_event): + + fixed problem with critical errors in gdk_pixbuf by clipping to + the destination pixbuf. + + added prelighting to the rss items by tracking mouse motion events + to maintain a prelight index, which is used to draw an item + in a different color. + +2001-01-03 Andy Hertzfeld + + * components/rss-control/main.c: (main): + tweaked broken stop-on-criticals stuff + + * components/rss-control/nautilus-rss-control.c: + (free_rss_data_item), (nautilus_rss_control_clear_items), + (nautilus_rss_control_destroy), (rss_logo_callback), + (rss_read_done_callback), (load_rss_file), (draw_rss_items), + (nautilus_rss_control_button_press_event): + made it extract urls for rss items and keep them in a structure, + and then activate them when clicked. + + Also, keep around file handles in instance data so we can cancel + any pending async I/O when the object is destroyed. + + * data/top/Makefile.am: + add sample controls to novice home directory + * data/top/Clock: + sample control + * data/top/Slashdot: + sample control + * src/file-manager/fm-icon-view.c: (get_icon_control_callback): + added check for non-zero moniker length + +2001-01-03 Andy Hertzfeld + + * components/rss-control/nautilus-rss-control.c: + (nautilus_rss_control_initialize), (nautilus_rss_control_destroy), + (rss_read_done_callback), (nautilus_rss_control_draw), + (nautilus_rss_control_button_press_event): + captured the channel link from the xml file, added title and logo + hit-testing, and made it launch a new window pointed at the + channel link when the user clicks on the logo or title. + +2001-01-02 Andy Hertzfeld + + first check-in to post-1_0 branch. + + add ability to embed Bonobo controls in the icon view. + created a new bonobo control that fetches and displays rss weblogs + plus miscellaneous optimizations and improvements + + * components/Makefile.am: + * configure.in: + added new rss-control component + + * components/hardware/nautilus-hardware-view.c: + (get_RAM_description), (get_IDE_description): + incorporated Bud's disk size calculation, plus tweaked the + RAM size calculation + + * components/rss-control/.cvsignore: + * components/rss-control/Makefile.am: + * components/rss-control/nautilus-rss-control.oafinfo: + files for the new rss-control component + + * components/rss-control/main.c: (rss_control_object_destroyed), + (rss_control_make_object), (main): + factory for the rss-control Bonobo component + + * components/rss-control/nautilus-rss-control.c,h: + (nautilus_rss_control_initialize_class), (get_bonobo_properties), + (set_bonobo_properties), (nautilus_rss_control_initialize), + (nautilus_rss_control_clear_items), (nautilus_rss_control_destroy), + (nautilus_rss_control_get_control), + (nautilus_rss_control_set_title), (rss_logo_callback), + (rss_read_done_callback), (load_rss_file), + (nautilus_rss_control_set_uri), (draw_rss_logo_image), + (draw_rss_title), (draw_blue_line), (draw_rss_items), + (nautilus_rss_control_draw), (nautilus_rss_control_expose), + (nautilus_rss_control_button_press_event): + new bonobo control to fetch an rss file and display it. + + * icons/Makefile.am: + * icons/bullet.png: + added a "bullet" image used in rss control, but it's generally + useful enough that I added it to the main icons + + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_get_user_main_directory): + deleted some code that's no longer relevant + + * libnautilus-extensions/nautilus-icon-canvas-item.c,h: + (nautilus_icon_canvas_item_destroy), + (nautilus_icon_canvas_item_get_icon_width), + (nautilus_icon_canvas_item_get_icon_height), + (nautilus_icon_canvas_item_set_arg), (do_control_destroy), + (nautilus_icon_canvas_item_get_arg), + (nautilus_icon_canvas_item_get_image), (recompute_bounding_box), + (nautilus_icon_canvas_item_update_bounds), + (draw_or_measure_label_text), (emblem_layout_next), + (draw_pixbuf_aa), (nautilus_icon_canvas_item_draw), + (draw_or_measure_label_text_aa), + (nautilus_icon_canvas_item_render), + (nautilus_icon_canvas_item_bounds), + (nautilus_icon_canvas_item_get_icon_rectangle), + (get_icon_canvas_rectangle), + (nautilus_icon_canvas_item_set_smooth_font), + (nautilus_icon_canvas_item_get_control), + (nautilus_icon_canvas_item_set_control): + added support for widgets embedded in icon canvas items + + * libnautilus-extensions/nautilus-icon-container.c,h: + (nautilus_icon_container_initialize_class), + (nautilus_icon_container_update_icon): + taught the icon container to ask for the control associated + with a file, and configured the canvas item with it if there + is one. + + * libnautilus-extensions/nautilus-icon-dnd.c: + (nautilus_icon_dnd_begin_drag): + made it unref the image it fetches from the canvas item, so the + canvas item can generate custom images for controls. + + * libnautilus-extensions/nautilus-link.c,h: + (nautilus_link_local_get_component_info): + fetch the activation and configuration strings associated with + a link file for string embedding. + + * libnautilus-extensions/nautilus-metadata.h: + added metadata types for the activation and configuration data + + * src/file-manager/fm-icon-view.c: (get_icon_control_callback), + (create_icon_container): + added signal to create a bonobo control associated with a file + and configure it, if there is one + + * src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_hit_test), + (nautilus_sidebar_tabs_select_tab): + hit test invisible tabs to support the change below. + * src/nautilus-sidebar.c: (nautilus_sidebar_release_event): + implemented Bud's idea of toggling the visibility of the active + view by clicking on the tab again. + +2001-01-02 Darin Adler + + reviewed by: John Sullivan + + Fixed bug 4344 (assertion if you view a directory without a + metafile). + + * libnautilus-extensions/nautilus-directory.c: + (nautilus_directory_initialize), (nautilus_directory_destroy): + Create and destroy the metafile hash table when the directory + is created and destroyed instead of waiting until the metafile + is read. + + * libnautilus-extensions/nautilus-directory-metafile.c: + (get_file_node): Get rid of code to handle NULL for hash table. + (nautilus_directory_metafile_destroy): Just destroy the contents + of the hash table (hash table itself is destroyed elsewhere now). + (nautilus_directory_rename_file_metadata), + (nautilus_directory_remove_file_metadata): Get rid of code to + handle NULL for the hash table. + (nautilus_directory_set_metafile_contents): Don't create the + hash table any more, just populate it. + +2001-01-02 Darin Adler + + reviewed by: John Sullivan + + * src/nautilus-window-menus.c: (help_menu_about_nautilus_callback): + Added the year 2001 to the user-visible copyright notice and made it + use the standard format with the word Copyright. + +2001-01-02 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 5375 (reword the 4000-file limit so it doesn't + mention the Nautilus Preview Release) + + * libnautilus-extensions/nautilus-directory.c: + * libnautilus-extensions/nautilus-directory.h: + Move the #define for the limit to a public place. + + * src/file-manager/fm-directory-view.c: + (check_for_directory_hard_limit): + Reword the dialog so it doesn't promise to go away + soon. Also, use #define for the limit in case it + changes, which is likely. + +2001-01-02 Ali Abdin + + A minor attempt at deallocating things correctly before we exit (so + memory profilers can be used properly). + + * components/help/converters/gnome-db2html2/gdb3html.c: + (parse_file): Free stuff that has been allocated by libxml before + exiting this function. Now memprof stops showing one big large red + bar. + + Call toc_free_data when done with the TOC. + + * components/help/converters/gnome-db2html2/toc-elements.c: + (toc_copyright_characters): Add a comment about a memory leak I + discovered. + (toc_free_data): New function to free data allocated by toc_init_data + +2001-01-02 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 5331 (Control-W closes the desktop) + + * src/file-manager/nautilus-desktop-icon-view-ui.xml: + Added insensitive "Close" command that overrides the + default one. + + * src/nautilus-window-menus.c: + (nautilus_window_update_show_hide_menu_items), + (refresh_bookmarks_menu), + (nautilus_window_remove_bookmarks_menu_items), + (nautilus_window_remove_go_menu_items), + (nautilus_window_update_find_menu_item), + (append_dynamic_bookmarks), (refresh_go_menu): Removed + initial NAUTILUS_ from some #defines that are private to + this file. + +2001-01-01 Ali Abdin + + More patches from John Fleck. A fixup for the QANDASET title showing + up in the TOC. + + Also a fixup for bug #4409 (due to the switching of 'states' in the + parser we sometimes would print out some extra HTML closing tags + that shouldn't be there) + + Happy New Year. + + * components/help/converters/gnome-db2html2/gdb3html.h: + * components/help/converters/gnome-db2html2/sect-elements.c: + * components/help/converters/gnome-db2html2/sect-preparse.c: + * components/help/converters/gnome-db2html2/toc-elements.c: + Add QANDASET and QANDAENTRY. + + * components/help/converters/gnome-db2html2/sect-elements.c: + (sect_title_start_element), + (sect_title_end_element): + Use a temporary boolean variable to reflect wether the we printed out + the starting tags in sect_title_start_element. If we did, then we + print out the closing in sect_title_end_element. Otherwise we don't. + + * components/help/converters/gnome-db2html2/toc-elements.c: + (toc_title_start_element), + (toc_title_end_element), + (toc_title_characters): + Ignore the QANDASET title's since they should not be in the TOC. + +2000-12-29 Darin Adler + + reviewed by: Gene Ragan + + Fixed bug 5374 (No-longer-mounted removable media linger as + generic icons upon restart). + + * src/file-manager/fm-desktop-icon-view.c: + (free_volume_black_list): Save code by using + nautilus_g_list_free_deep. + (create_mount_link): Save some g_strdup calls by using const char + * for the icon_name. + (fm_desktop_icon_view_initialize): Simplify the code that creates + the black list by creating a local variable. + (unlink_and_notify): Helper function that deletes a file and + notifies the NautilusDirectory/File framework. + (volume_unmounted_callback): Call unlink_and_notify to do the work. + (create_link_callback): Pass NULL for default values when setting + metadata, since we always want to set the metadata. + (icon_view_create_nautilus_links): Avoid a storage leak by using + const char * for the icon name. + (update_link_and_delete_copies): New function shared for both the + home and trash link cases. Simpler because it just lets the + nautilus_link_xxx functions handle file vs. directory and . and + .. and doesn't bother doing a stat itself. Also fixes leaks that + were in the old versions as well as the questionable practice of + using chdir instead of full paths. Also changes the logic to + delete any links with the right type but wrong name, rather than + trying to rename the first icon found of the right type. + (update_home_link_and_delete_copies): Use the shared + function. Also don't bother making unused home_link_path. + (update_trash_link_and_delete_copies): Use the new shared + function. + (delete_all_mount_links): Turns out we can use the shared function + for this case too just by passing in a name that will never match + any existing link's name (""). + +2000-12-29 Michael Engber + + * libnautilus-extensions/nautilus-global-preferences.h: + Changed gconf key for the show desktop option in order to + avoid using the old default value (OFF) in existing gconf + databases (bug 5148) + +2000-12-29 Andy Hertzfeld + + * src/file-manager/fm-list-view.c: + fixed bug 3900, emblems too big in list view, by lowering the + minimum emblem size one notch + + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_update_icon): + fixed problem where images that are small in one dimension but large + in the other were being scaled too large by the minimum size scaling. + Fixed by pinning to both the minimum and maximum sizes. + + also, pinned icon view emblem sizes to MAXIMUM_EMBLEM_SIZE independent + of scale factor, so they don't become enormous when the icons are + large. + +2000-12-29 Darin Adler + + reviewed by: Gene Ragan + + Fixed bug 5067 (Moving a file doesn't update the directory in the + link hash table). + + Fixed bug 5366 (error when passing two directories on the command + line). + + * libnautilus-extensions/nautilus-directory.c: + (nautilus_directory_remove_file): Change code that was doing "== + FALSE" which is not such good style. + (nautilus_directory_notify_files_moved): Change to properly update + file names in all cases and to update the directory with a new + nautilus_file_set_directory function. + + * libnautilus-extensions/nautilus-file-private.h: Moved the + Knowledge enum up here. I was going to make a change that required + it, and now I don't feel like moving it back. + + * libnautilus-extensions/nautilus-file.h: Add + nautilus_file_set_directory (and reformat). + + * libnautilus-extensions/nautilus-file.c: (is_self_owned), + (destroy): Moved is_self_owned so the destroy function can use it. + (update_info_internal): Call the update_links functions before + (nautilus_file_set_directory): New function that changes the + parent directory and updates everything appropriately. + (nautilus_file_mark_gone): Added a check that the file is not + already marked gone. + + * src/nautilus-main.c: (main): Sort the command-line options, add + some single-character versions, add code to initialize the + "geometry" variable for the case where the option is not passed, + removed some unused code that sets start_desktop twice. + +2000-12-28 Pavel Cisler + + Fixed bug 4952 (Move or copy or large number of items fails). + Final part of fix for bug 956 (UI takes time to become operational + after drag&drop) + + * libnautilus-extensions/nautilus-file-changes-queue.c: + (nautilus_file_changes_consume_changes): Fixed a bug in + the logic that chunked up file change notifications into groups + that could be all handled at once - before the fix each change + was processed individually. Grouped move, metadata move, position + setting and copy, metadata copy, position setting respectively + into groups that would get all processed in a single chunk. + Tweaked the maximum size of a changes chunk. + + * libnautilus-extensions/nautilus-file-changes-queue.c: + (nautilus_file_changes_queue_schedule_metadata_copy), + (nautilus_file_changes_queue_schedule_metadata_move), + (nautilus_file_changes_queue_schedule_metadata_remove), + (nautilus_file_changes_queue_schedule_position_setting): + Some renamings. + + * libnautilus-extensions/nautilus-directory-async.c: + Small tweak to make turning on debugging diagnostics easier. + +2000-12-28 Mike Fleming + + * components/services/summary/nautilus-view/main.c: (main): + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (nautilus_summary_view_initialize): + + Fix for bug 5343, work around for bug 5365. By avoiding the redundant + activation of eazel-proxy, race condition described in 5365 is avoided. + +2000-12-28 Darin Adler + + reviewed by: Maciej Stachowiak + + Fixed bug 2808 (copy all metadata, not just certain items). There + are still a few loose ends but it's basically there. + + Fixed bug 5296 (Hardware overview should be localized). + Fixed bug 5299 (Spacing problems with sizes in bytes). + + * libnautilus-extensions/nautilus-directory-metafile.c: + (get_file_node): Used a local variable for the hash table to make + the code more readable because the full expression is too long. + Removed the half-baked attempt at using xmlNode objects to + represent "changes" data, which no longer seems a likely + direction. + (nautilus_directory_metafile_destroy): Local variable for hash + table. + (nautilus_directory_get_file_metadata): Return NULL, not FALSE, + since the function returns char *, not gboolean. + (nautilus_directory_rename_file_metadata): Local variable for hash + table. Also added a FIXME for a case that won't work. + (apply_file_changes): Broke out so it can be used elsewhere. + (apply_one_file_changes): This is now the version that has the + hash table iterator function interface. + (nautilus_directory_get_integer_file_metadata): Use sscanf instead + of atoi so we can do error checking. + (nautilus_directory_copy_file_metadata): Removed the old code that + copied fixed keys and wrote new code that copies all the metadata. + (nautilus_directory_remove_file_metadata): Local variable for hash + table. + + * icons/arlo/arlo.xml: Added an explicit H offset of 0 for the + zoom control. It was inheriting the default theme's offset of + -2. This seems to indicate a design problem with the "fall back on + default" approach for themes, but for now it's nice to have the + zoom control looking right again. + + * src/nautilus-window-menus.c: + (help_menu_about_nautilus_callback): Use the real copyright + character, not "(C)". + + * src/file-manager/fm-desktop-icon-view.c + (find_and_update_home_link), (place_home_directory): Mark the + "darin's Home" string for localization. Needs improvement beyond + this, because just tacking "'s Home" onto the login name is + probably no good. + + * components/hardware/nautilus-hardware-view.c: (read_proc_info): + Tweak code style a bit. Use g_string_free (FALSE) instead of + g_strdup and g_string_free (TRUE). + (get_CPU_description): Make this a little more localizable by + adding a strdup format string instead of appending things. Added + FIXMEs about additional problems. + (get_RAM_description): Add a little reality checking on the value + read from the file and make a little more localizable. + (get_IDE_description): Change to use the gnome-vfs file size + formatting functions in the right way. The old code had been + changed to not use them at all, probably because the first cut at + this code was using it wrong and ran into a 32-bit limit. Use + g_string_free (FALSE) instead of g_strdup and g_string_free + (TRUE). + + * po/POTFILES.in: Marked nautilus-hardware-view.c as needing + localization. + + * components/help/converters/gnome-db2html2/sect-elements.c: + (sect_informaltable_start_element): Fixed a runaway string + literal. + + * libnautilus-extensions/nautilus-directory-async.c: Moved the + constants to the top of the file and put the compile-time switches + at the top of the constants section. + + * NEWS: Removed out of date news. + * README: Fixed a typo. + * TODO: Removed out of date tasks. + +2000-12-27 Michael Engber + + * libnautilus-extensions/nautilus-background-canvas-group.c: + (nautilus_background_canvas_group_draw), + (nautilus_background_canvas_group_render): + Bug number for FIXMEs. + +2000-12-26 Michael Engber + + * libnautilus-extensions/nautilus-directory-background.c: + (desktop_background_realized), (nautilus_background_set_desktop), + (nautilus_background_is_desktop), + (nautilus_background_get_desktop_background_window), + (image_loading_done_callback), + (nautilus_file_update_desktop_pixmaps), + (background_changed_callback), (saved_settings_changed_callback), + (background_reset_callback), + (nautilus_connect_desktop_background_to_file_metadata): + * libnautilus-extensions/nautilus-directory-background.h: + * src/file-manager/fm-icon-view.c: (fm_icon_view_begin_loading): + Set the background pixmap of the desktop xwindow so that the + window manager paints background behind nautilus windows instead + of leaving trails. + +2000-12-26 Gene Z. Ragan + + * src/file-manager/fm-desktop-icon-view.c: (volume_in_black_list), + (fm_desktop_icon_view_initialize): + Compare mount point, not device path. + +2000-12-25 Ali Abdin + + Handle the
tag properly (including , , + , , and ) - Fixes bug #2176 + + Support the tag - Fixes bug #5341 + + These patches contributed by John Fleck + + Happy Eid and Merry Christmas! + + * components/help/converters/gnome-db2html2/gdb3html.h: + * components/help/converters/gnome-db2html2/sect-elements.[ch]: + * components/help/converters/gnome-db2html2/sect-preparse.c: + * components/help/converters/gnome-db2html2/toc-elements.c: + (sect_literallayout_start_element), + (sect_literallayout_end_element): + New functions to for LITERALLAYOUT tag support. + (sect_country_start_element), + (sect_city_start_element), + (sect_street_start_element), + (sect_address_end_element), + (sect_address_start_element), + (sect_address_characters): + New functions to handle the ADDRESS/STREET/CITY/COUNTRY tags properly + + * components/help/converters/gnome-db2html2/ASSUMPTIONS: + Removed an erroneous entry + + * components/help/converters/gnome-db2html2/TODO: + Updated + + * components/help/converters/gnome-db2html2/AUTHORS: + Added John Fleck (jfleck@inkstain.net) + +2000-12-25 Gene Z. Ragan + + * src/file-manager/fm-desktop-icon-view.c: + (fm_desktop_icon_view_destroy), (free_volume_black_list), + (volume_in_black_list), (create_mount_link), + (startup_create_mount_links), (fm_desktop_icon_view_initialize), + (volume_mounted_callback): + Started work on volume black list. Added proc and boot to + list. Need to figure out a way to expose this to the UI + so it is easy for the user to specify what mounts they + want displayed on the desktop. + + * libnautilus-extensions/nautilus-drag.c: (add_one_url_list), + (add_one_path_list), (nautilus_drag_drag_data_get): + * libnautilus-extensions/nautilus-icon-dnd.c: + Work on supporting drags form Nautilus into the attachments + frame of Netscape mail. + +2000-12-23 John Harper + + * libnautilus-extensions/nautilus-gdk-extensions.c + (nautilus_gdk_parse_geometry): moved this out of the `! defined + (NAUTILUS_OMIT_SELF_CHECK)' preprocessor block where I had + inserted it by mistake. Also removed a statement with no effect + +2000-12-23 Ali Abdin + + * components/help/hyperbola-filefmt.c: + (fmt_man_populate_tree): + Look in /usr/share/man if the 'manpath' app returns nothing. + +2000-12-23 Ali Abdin + + So, I thought I was fixing this bug in the Eazel bugtracker. I hack + away, and get gzipped man files showing up in the Help sidebar. Turns + out, that the bug I /should/ have been working on was some info-files + now showing up in the Help sidebar. + + Oh well, at least we now get gzipp'd man files showing up in the + sidebar (which is most man files nowadays). + + So I continuied hacking and fixd bug #4414 (info files in Debian do + not show up in Help sidebar) + + * components/help/hyperbola-filefmt.c: + (extract_secnum_from_filename), + (name_without_suffix): New functions + + (fmt_man_populate_tree_from_subdir): + gnome-man2html2 actually supports gzip'd files. So this needed some + major work to get it to support them gzip'd files. + + (fmt_info_populate_tree): + Also populate tree from the /usr/share/info subdir. I think this helps + destroy bug #4414 + +2000-12-23 Ali Abdin + + More Fixing for bug #5118 (tags within a title do not appear in the + TOC). There are a few 'difficult' cases that are still not supported + and we probably won't support. + + Thanks to jfleck@inkstain.net + + * components/help/converters/gnome-db2html2/toc-elements.c: + + Filled in function table to use toc_tag_characters where + appropriate. + + (toc_tag_characters), + (toc_title_end_element), + (toc_title_start_element): + Some hackery to use an 'in_printed_title' variable (so we can + distinguish on wether we need to actually print the tag within the + title). + + * components/help/converters/gnome-db2html2/gdb3html.c: + (xml_parse_document): This function was #if 0'd out and is now gone + from the tree + (parse_file): Remove #if 0'd code. + (main): Remove a really old unncessary comment + + * components/help/converters/gnome-db2html2/gdb3html.c: + * components/help/converters/gnome-db2html2/sect-elements.c: + * components/help/converters/gnome-db2html2/toc-elements.c: + i18n'd a bunch of strings as some preliminary work to getting i18n + working with gnome-db2html2 + + * po/POTFILES.in: + Update to reflect the i18n'd strings in gnome-db2html2 + +2000-12-23 Gene Z. Ragan + + reviewed by: Pavel Cisler + + Fixed bug 4158, dropping a file onto gnome-terminal + doesn't insert a path name. + + * libnautilus-extensions/nautilus-drag.c: (add_one_path_list), + (nautilus_drag_drag_data_get): + Return a list a text paths. + + * libnautilus-extensions/nautilus-drag.h: + Add new type and data type for "text/uri" + +2000-12-22 Ramiro Estrugo + + reviewed by: Gene Z. Ragan + + * libnautilus-extensions/nautilus-debug-drawing.c: + (event_box_draw), (event_box_expose_event), + (nautilus_debug_show_pixbuf): + Dont use NautilusImage here because that create a chicken + and egg problem when debuggin NautilusImage itself. Use + an event box instead. + + * libnautilus-extensions/nautilus-gdk-extensions.h: + * libnautilus-extensions/nautilus-gdk-extensions.c: + (nautilus_gdk_rgb_to_color_spec): + New function to make a string color spec from an rgb value. + + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h: + (nautilus_gdk_pixbuf_is_valid), + (nautilus_gdk_pixbuf_get_frame): + Make these public and add documentation for them. + +2000-12-22 Gene Z. Ragan + + reviewed by: Pavel Cisler + + Fixed bug 4951, No error given selecting unmountable "Disks" volume. + + I added a pipe to monitor the result of the mount/umount command. + If an error is in the pipe, a details error dialog is displayed. + A generic mount failed error is first and the details button reveals + the error message returned in the pipe. + + * libnautilus-extensions/nautilus-volume-monitor.c: (find_command), + (open_error_pipe), (close_error_pipe), + (nautilus_volume_monitor_mount_unmount_removable): + + Renamed xfer to transfer. + * libnautilus-extensions/nautilus-file-operations.c: + (parent_for_error_dialog), (transfer_dialog_clicked_callback), + (create_transfer_dialog), (handle_transfer_ok), + (build_error_string), (handle_transfer_vfs_error), + (handle_transfer_overwrite), (handle_transfer_duplicate), + (update_transfer_callback), (sync_transfer_callback), + (nautilus_file_operations_copy_move), + (handle_new_folder_vfs_error), (new_folder_transfer_callback), + (nautilus_file_operations_new_folder), + (nautilus_file_operations_move_to_trash), + (nautilus_file_operations_delete), (do_empty_trash): + + Added compatibility call. + * libnautilus-extensions/nautilus-entry.c: + * libnautilus-extensions/nautilus-entry.h: + (nautilus_entry_new_with_max_length): + +2000-12-22 Darin Adler + + * libnautilus-extensions/nautilus-global-preferences.c: + (global_preferences_register): Add missing _() + +2000-12-22 Darin Adler + + reviewed by: Pavel Cisler + + Fixed bug 5065 (When Nautilus moves a directory it doesn't rename + the corresponding private metafile). + + Fixed bug 5066 (Moving a directory doesn't update infomrration + about child directories in Nautilus). + + Fixed bug 5297 (Make all (C) strings use gettext). + + * libnautilus-extensions/nautilus-directory-metafile.c: + (nautilus_directory_rename_file_metadata), + (nautilus_directory_remove_file_metadata): Add check for NULL hash + table. Without this check we kept running into asserts. + + * libnautilus-extensions/nautilus-directory-private.h: + * libnautilus-extensions/nautilus-directory.c: + (nautilus_directory_new): Share URI-setup code with the renaming + case. + (set_directory_uri): New function shared with new directories and + renaming. + (get_path_from_vfs_uri), (get_private_metafile_path): Utility + functions to help get local paths for private metafiles. + (change_directory_uri): Update URI for an existing + NautilusDirectory object. This handles renaming the private + metafile too. + (collect_directories_by_prefix): Function to collect affected + directories when you rename a directory. + (str_replace_prefix): Utility to replace string prefix so we can + turn old directory name into the new one. + (nautilus_directory_moved): Renamed and changed to use URIs + instead of a directory object so it can be called even when no + directory exists. Also made it collect all affected directories + and do the work with change_directory_uri on each one. + * libnautilus-extensions/nautilus-file.c: (rename_callback): Use + the new nautilus_directory_moved. + + * libnautilus-extensions/nautilus-file-utilities.h: + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_get_build_time_stamp): + * src/nautilus-about.h: + * src/nautilus-about.c: (nautilus_about_new), + (nautilus_about_draw_info): + * src/nautilus-window-manage-views.c: + (window_set_title_with_time_stamp), (update_title): + * src/nautilus-window-menus.c: + (help_menu_about_nautilus_callback): + Rename "timestamp" -> "time stamp". + + * src/nautilus-window-menus.c: + (help_menu_about_nautilus_callback): Mark "(C)" string for + translation. + +2000-12-21 John Harper + + reviewed by: Darin Adler + + Work to allow geometry of initial window to be specified on + command line. Fixes bug #5135 + + * src/nautilus-shell.c (open_window): new arg `geometry'. When + non-null, use nautilus_gtk_window_set_initial_geometry_from_string + to affect the geometry of the unmapped window + + (corba_open_default_window, corba_open_windows): new arg, + `geometry', passed to open_window () if a non-null string + + * src/nautilus-shell-interface.idl (open_windows, + open_default_window): added `geometry' parameter. Pass a + zero-length string to show no specified geometry + + * src/nautilus-main.c (main): new option `--geometry=GEOMETRY'. + Pass the value to nautilus_application_startup (). This option + is only allowed when no more than one URI is given on the + command line (to prevent multiple windows appearing on top of + one another) + + * src/nautilus-application.c, src/nautilus-application.h + (nautilus_application_startup): added parameter `geometry', a + string describing the geometry to give any created windows + + * src/nautilus-first-time-druid.c (druid_finished): pass null + geometry parameter to nautilus_application_startup () + + * libnautilus/nautilus-gdk-extensions.c, + libnautilus/nautilus-gdk-extensions.h + (NautilusGdkGeometryFlags, nautilus_gdk_parse_geometry): a + wrapper for XParseGeometry () and associated bit definitions. + Required since gnome_parse_geometry () offers no reliable way + of detecting which of the geometry components were parsed + successfully + + * libnautilus/nautilus-gtk-extensions.c, + libnautilus/nautilus-gtk-extensions.h + (nautilus_gtk_window_set_initial_geometry): takes an extra + parameter, a NautilusGdkGeometryFlags value specifying which of + the geometry parameters are valid + + (nautilus_gtk_window_set_initial_geometry_from_string): changed + to allow the geometry string to specify one or both of position + and dimensions. Also doesn't use g_return_if_fail to test for + validity of input string (since it may come from the user), + instead just use the parseable parts of the geometry string + +2000-12-22 John Sullivan + + reviewed by: Pavel Cisler + + Nautilus part of fix for bug 4798 (icon changes in MIME + type capplet aren't reflected automatically in Nautilus) + + * libnautilus-extensions/nautilus-icon-factory.c: + (get_icon_factory): connect to gnome_vfs_mime_monitor's + "data_changed" signal. + (mime_type_data_changed_callback): emit "icons_changed" + signal when gnome_vfs_mime_monitor says data has changed. + +2000-12-21 Maciej Stachowiak + + reviewed by: Pavel Cisler + + * components/text/nautilus-text-view.oafinfo, + components/hardware/nautilus-hardware-view.oafinfo: Fixed IID to + standard format. + + * components/hardware/main.c (hardware_view_make_object, main), + components/text/main.c: (text_view_make_object, main): + Updated to match. + +2000-12-21 Ramiro Estrugo + + reviewed by: Pavel Cisler + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (draw_or_measure_label_text_aa): + * libnautilus-extensions/nautilus-icon-factory.c: (embed_text): + * libnautilus-extensions/nautilus-label.c: (render_buffer_pixbuf): + * libnautilus-extensions/nautilus-scalable-font.c: + (nautilus_scalable_font_draw_text), + (nautilus_scalable_font_draw_text_lines_with_dimensions), + (nautilus_scalable_font_draw_text_lines), + (nautilus_text_layout_paint), (nautilus_gdk_pixbuf_new_from_text): + * libnautilus-extensions/nautilus-scalable-font.h: + * libnautilus-extensions/nautilus-tabs.c: (draw_tab_label): + * src/nautilus-about.c: (draw_aa_string): + * src/nautilus-sidebar-tabs.c: (draw_one_tab_plain), + (draw_one_tab_themed): + * test/test-nautilus-font.c: (main): + Lost the "inverted" feature of smooth text drawing. It wasnt used + anywhere except a test program. It never looked well and the + nautilus icon container does something unrelated to select text. + + Also replace some hard coded 255 opacity values to use the + NAUTILUS_OPACITY_NONE define. + +2000-12-21 J Shane Culpepper + + reviewed by: Gene Z. Ragan + + * components/services/install/lib/eazel-inventory-utils.c: + (add_package_info), (add_hardware_info), (add_software_info), + (eazel_create_configuration_metafile): + + Added the SOFTWARE node to the xml generation. Added + bogomips, flags, and distribution to information gathered. + There are very few things missing from the collection engine + now. + +2000-12-21 Gene Z. Ragan + + Fixed bug 5218, The desktop is missing devices. (cdrom & vfat volume) + + Try and be more intelligent about determing the name of mounted + volumes. Until we can get the device name from the partition, + we instead derive the name form the mount path. If that fails, we fall + back on a hrad coded string. + + * libnautilus-extensions/nautilus-volume-monitor.c: + (mount_volume_get_name), (get_ext2_volume_name), + (get_msdos_volume_name), (get_nfs_volume_name), + (get_floppy_volume_name), (get_generic_volume_name): + New and modified functions to return volume names. + +2000-12-21 John Sullivan + + * components/sample/main.c: (main): Changed + nautilus_view_create_from_get_type to + nautilus_view_create_from_get_type_function so it would + compile. My guess is this was a last-minute rename from + Maciej's previous checkin. + + Fixed bug 5319 (two menu items in Help menu use same underline + accelerator key) + Fixed bug 5293 ("Nautilus Feedback..." should just be "Feedback..." + since it's not only for Nautilus feedback.) + + * src/nautilus-shell-ui.xml: Moved an underscore, changed a label, + tweaked a tip. + +2000-12-21 John Sullivan + + reviewed by: Pavel Cisler + + Fixed bug 5282 (Two file-name-conflict dialogs renaming in + Properties window) + + The problem was that the activate signal and the focus-out signal + were both trying to rename using the bad name. Fixed by restoring + the text in the name field to the original name when an error occurs. + + * src/file-manager/fm-properties-window.c: + (fm_properties_window_initialize_class): Wire up finalize handler. + (name_field_restore_original_name): Select text of original name + after restoring it into text field. + (set_pending_name): Helper function to save pending name. + (name_field_done_editing): Remember pending name in case window + and name field get destroyed before callback. Ref window so it + won't be finalized before callback. + (rename_callback): Restore original name when rename fails, use + stored pending name for window, unref window. + (name_field_focus_out), (name_field_activate): Now take window + as callback data so it can be passed to done_editing. + (create_basic_page): Remember name field in window details struct + so it can be accessed in rename_callback; remove some unnecessary + casts; pass window as callback data to two signal handlers. + (real_destroy): Don't free details here; do so in finalize + (real_finalize): Free pending_name and details here, so pending + name is always accessible by rename_callback. + +2000-12-21 Maciej Stachowiak + + reviewed by: Darin Adler + + * libnautilus/nautilus-view.c, libnautilus/nautilus-view.h + (nautilus_view_construct, + nautilus_view_construct_from_bonobo_control): New construct + functions so it's possible for view implementations to be + subclasses of NautilusView. + (nautilus_view_new_from_bonobo_control): Implement in terms of construct function. + * libnautilus/nautilus-view-standard-main.h, + libnautilus/nautilus-view-standard-main.c: + (nautilus_view_standard_main_multi, nautilus_view_standard_main, + nautilus_view_create_from_get_type): New convenience functions + that encapsulate and librarify most of the cut and pasted main.c + code that is in every nautilus view. + (object_destroyed, make_object): Helper functions. + * libnautilus/Makefile.am: Add nautilus-view-standard-main.[ch] to + build. + * libnautilus/nautilus-view-component.idl: Add license header + comment. + + * libnautilus-extensions/nautilus-gtk-macros.h: Lined up the + backslashes to make it easier to read and edit the multi-line + macros. + + * components/sample/README: Explain that all files in this + directory have "WHAT YOU NEED TO CHANGE" comments. + * components/sample/main.c (main): Implement in terms of + `nautilus_view_standard_main' and removed most of the rest of this + file. Now all you have to change when writing your own view is an + include and some defines at the top of the file. Added "WHAT YOU + NEED TO CHANGE" comment. + * components/sample/nautilus-sample-content-view.h, + components/sample/nautilus-sample-content-view.c: Added "WHAT YOU + NEED TO CHANGE" comments. + (nautilus_sample_content_view_get_type, + nautilus_sample_content_view_initialize, + nautilus_sample_content_view_destroy, load_location, + sample_load_location_callback, bonobo_sample_callback, + sample_merge_bonobo_items_callback): Changed everything around so + NautilusSampleContentView inherits from Nautilus view, not + GtkLabel (the widget that happens to be in the main content + area). This makes a lot more sense. Also fix bug 2410 but + including alternative code to nautilus-only macros. + + * components/sample/nautilus-sample-content-view.oafinfo: Added + "WHAT YOU NEED TO CHANGE" comment. + * components/sample/Makefile.am: Added "WHAT YOU NEED TO CHANGE" comment. + +2000-12-21 John Sullivan + + * libnautilus-extensions/nautilus-search-uri.c: + (nautilus_self_check_search_uri): Updated self-check + expected results to match recent wording changes. + This should fix the Tinderbox build. + +2000-12-21 Rebecca Schulman + Fix for bug 5244, that search interface + text that are sentence fragments should have comments explaining + the context of the text to improve translation quality. + + reviewed by: Christian Rose + + * libnautilus-extensions/nautilus-search-uri.c: + * src/nautilus-search-bar-criterion.c: + Added comments directly above sentence fragments + that will be translated. + +2000-12-20 Ramiro Estrugo + + reviewed by: Pavel Cisler + + * libnautilus-extensions/nautilus-debug-drawing.h: + * libnautilus-extensions/nautilus-debug-drawing.c: + (nautilus_debug_show_pixbuf_in_eog), (debug_delete_event), + (nautilus_debug_show_pixbuf): + Add a debug function to show pixbufs in process without having to + fork off eog. This is more useful than the eog version for + asynchronous stuff. + + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h: + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: + (pixbuf_draw_tiled), (draw_tile_to_pixbuf_callback), + (draw_tile_to_drawable_callback), + (nautilus_gdk_pixbuf_draw_to_pixbuf_tiled), + (nautilus_gdk_pixbuf_draw_to_drawable_tiled), + New function to tile pixbufs into drawables. In order to reuse the + tiling algorithm from the "tile_to_pixbuf" function, I added a + simple callback mechanism. + + (nautilus_gdk_pixbuf_get_global_buffer), + New function to access a global buffer. + + (nautilus_gdk_pixbuf_get_from_window_safe): + New function to wrap gdk_pixbuf_get_from_drawable with safety from + x errors and race conditions. See code for detailed comments as to + the specific problems this wrapper addresses. + + * libnautilus-extensions/nautilus-gtk-extensions.h: + * libnautilus-extensions/nautilus-gtk-extensions.c: + (nautilus_gtk_class_name_make_like_existing_type): + New function that custom widgets can call to make themselves look + like stock widgets wrt to the gtk thememing engine. + +2000-12-21 Ramiro Estrugo + + reviewed by: Pavel Cisler + + * libnautilus-extensions/Makefile.am: + * libnautilus-extensions/nautilus-art-gtk-extensions.h: + * libnautilus-extensions/nautilus-art-gtk-extensions.c: + (nautilus_irect_assign_gdk_rectangle), + (nautilus_irect_screen_get_frame), + (nautilus_irect_gdk_window_get_bounds), + (nautilus_irect_gdk_window_get_screen_relative_bounds), + (nautilus_irect_gtk_widget_get_bounds), + (nautilus_irect_gdk_window_clip_dirty_area_to_screen): + New functions that accept gtk/gdk structures and + return their bounds/frames as ArtIRects. + + These are very useful in code that uses libart functions + to do operations on ArtIRects (such as intersection) + +2000-12-20 Maciej Stachowiak + + * components/services/inventory/lib/trilobite-eazel-inventory-public.h: + Removed. + +2000-12-20 Darin Adler + + reviewed by: Pavel Cisler + + Fixed bug 5285 (Renaming file through 'properties' dialog causes + Glib errors). + + Did some work on bug 2288 (Location bar should only escape / + unescape unambiguously for URIs ). + + * libnautilus-extensions/nautilus-directory-metafile.c: + (nautilus_directory_set_metafile_contents): Create hash table even + when no metafile is read in. This fixes asserts people were + seeing. + + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_format_uri_for_display): Use + gnome_vfs_get_local_path_from_uri to unescape paths so we don't + unintentionally munge them. There may still be an issue with using + this function on a string that gets written into the location bar. + (is_valid_scheme_character), (has_valid_scheme), (expand_tilde), + (nautilus_make_uri_from_input): Redo function to implement a new + scheme where we put http:// in front of anything that doesn't + start with a URI scheme or a / and file:// in front of things that + do start with / (converting the path to a URI by escaping + characters are necessary). + (nautilus_get_build_timestamp): Get rid of unneeded tests. + (nautilus_self_check_file_utilities): Updated self-test for + nautilus_make_uri_from_input. + * src/nautilus-location-bar.c: (try_to_expand_path): Fix + NULL-dereference in cases where gnome_vfs_unescape_string returns + NULL. + * src/nautilus-navigation-bar.c: + (nautilus_navigation_bar_location_changed): Remove the broken + get_mapped_location function (which called g_file_exists on + partial paths so gave virtually "random" results) and just call + get_location directly. + +2000-12-20 Gene Z. Ragan + + Fixed bug 5186, Music View (and then Nautilus) crashes playing + 0-length MP3 + + reviewed by: Pavel Cisler + + Crash was caused by using an unitialized variable. Initializing + the variable to NULL and then checking the result after the + function is called solved the problem. + + * components/music/nautilus-music-view.c: (get_song_text), + (music_view_set_selected_song_title): + +2000-12-20 Gene Z. Ragan + + Fixed bug 5172, Music View doesn't always scroll when + active song off-screen + + Borrowed code from NautilusCList to fix bug. + Selection now scrolls into view in a logical manner during + playback. + + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize_class), + (nautilus_music_view_initialize), (nautilus_music_view_destroy), + (list_move_vertical), (list_moveto), (list_reveal_row), + (play_current_file): + +2000-12-20 John Sullivan + + reviewed by: Pavel Cisler + + Fixed bug 4842 (Link to .Trash gives "You cannot copy the Trash" + dialog) and part of bug 5221 (Trying to delete .Trash says + "The Trash cannot be moved from the desktop") + + * libnautilus-extensions/nautilus-file-operations.c: + (nautilus_file_operations_copy_move): Don't disallow linking + to trash folders (was doing so accidentally); distinguish + error wording for desktop Trash icon and other trash folders. + +2000-12-20 J Shane Culpepper + + reviewed by: Maciej Stachowiak + + * components/services/install/command-line/.cvsignore: + * components/services/install/command-line/Makefile.am: + * components/services/install/command-line/eazel-test-inventory.c: + (main): + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_do_transaction_md5_check): + * components/services/install/lib/eazel-inventory-utils.c: + (eazel_create_configuration_metafile), + (update_gconf_inventory_digest), (eazel_gather_inventory): + * components/services/install/lib/eazel-inventory-utils.h: + * components/services/trilobite/libtrilobite/trilobite-md5-tools.c: + (trilobite_md5_get_digest), (trilobite_md5_get_digest_from_file), + (trilobite_md5_get_digest_from_md5_string), + (trilobite_md5_get_string_from_md5_digest), (main): + * components/services/trilobite/libtrilobite/trilobite-md5-tools.h: + + Adding various fixes to the inventory engine and adding a test program + to validate the inventory api. Fixed the trilobite-md5-tools functions + to namespace trilobite correctly. + +2000-12-19 Ramiro Estrugo + + * libnautilus-extensions/Makefile.am: + Dumshit me forgot to add new files to makefile. + +2000-12-19 Ramiro Estrugo + + reviewed by: + + * libnautilus-extensions/Makefile.am: + * libnautilus-extensions/nautilus-debug-drawing.h: + * libnautilus-extensions/nautilus-debug-drawing.c: + (nautilus_debug_draw_rectangle_and_cross), + (nautilus_debug_show_pixbuf_in_eog): + New files. Put drawing debugging functions here. + + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h: + Move drawing debugging functions to nautilus-debug-drawing.[ch]. + + * test/test-nautilus-font.c: (main): + Update for debug drawing functions location change. + +2000-12-19 Eskil Heyn Olsen + + reviewed by: Maciej Stachowiak + + This powerpatch introduces the first parts of the ei2 work. + + * components/rpmview/nautilus-rpm-view.c: + (nautilus_rpm_view_update_from_uri): + Updated the is_installed call to also pass a version sense. + + * components/services/install/command-line/eazel-alt-install-corba. + c: (set_parameters_from_command_line), + (eazel_download_progress_signal), (main): + Option to enable ei2. + And since I was bored and played with adding KB/s to download. + Also reenabled the use of gnome_init since otherwise the options + were all incorrect. + + * components/services/install/command-line/eazel-test-packsys.c: + (test_query), (progress_signal), (test_verify): + Made the tests easier to tweak, by having defines for the + packages/features etc that are used in the test queries. + Fixed test_verify, so it' won't report badness on verify of + multiple packages. + + * components/services/install/lib/eazel-package-system-types.h: + * components/services/install/lib/eazel-package-system-types.c: + (categorylist_flatten_to_packagelist), + Moved a function from eazel-install-logic. It returns a flat list + of all the packages in a set of categories. + (packagedata_class_initialize), (packagedata_initialize), + (packagedata_finalize), (packagedata_get_type), (packagedata_new), + (packagedata_fill_in_missing), (packagedata_destroy), + gtk'ified the packagedata object (I apologize) + (eazel_install_package_matches_versioning): + Made the matches_versioning use a version sense. + Also added a PACKAGE_FILL_INVALID enum and a + EAZEL_SOFTCAT_SENSE_ANY. Guess what they mean... + Also added some gtk style defines for PackageDependency, for the + day when we actually want to abuse it into a gtkobject (shudder) + fill_in_missing now also sets the fillflag (needed for the ei2 work) + + * components/services/install/command-line/eazel-test-types.c: + (test_eazel_install_package_matches_versioning): + More test of matches_versioning to test the new sense ability. + + * components/services/install/idl/trilobite-eazel-install.idl: + * components/services/install/lib/eazel-install-corba.c: + (impl_Eazel_Install__set_ei2), (impl_Eazel_Install__get_ei2), + (impl_Eazel_Install__set_ignore_file_conflicts), + (impl_Eazel_Install__get_ignore_file_conflicts), + (eazel_install_get_epv): + Added the evil ei2 boolean. If set, libeazelinstall will use the + new ei2 features. + + * components/services/install/lib/Makefile.am: + Added eazel-install-logic2.c which has the ei2 stuff. + + * components/services/install/lib/eazel-install-logic.h: + * components/services/install/lib/eazel-install-logic.c: + (ei_install_packages), (eazel_install_download_packages), + (ei_uninstall_packages), (ei_revert_transaction), + (eazel_install_check_existing_packages), + (eazel_install_fetch_dependencies), + (eazel_uninstall_check_for_install): + Moved flatten_packages out. + Prefixed soem functions with ei_ to seperate them from the ei2 + equivalents. + Suffixed emit_dependency_check with _pre_ei2 to seperate it from + the ei2 equivalent. + + * components/services/install/lib/eazel-install-logic2.h: + * components/services/install/lib/eazel-install-logic2.c: + (dump_tree_helper), (dump_tree), (get_softcat_info), + (get_package_info_foreach), (get_package_info), + (dedupe_foreach_depends), (dedupe_foreach), (dedupe), + (is_satisfied), (is_satisfied_features), + (check_dependencies_foreach), (check_dependencies), + (no_two_packages_with_same_file), (check_conflicts_with_other), + (feature_consistency_check), (do_file_conflict_check), + (do_dep_check), (install_packages), (uninstall_packages), + (revert_transaction): + Implemented the first many steps of ei2. It now gets package info + and correctly constructs a tree of needed packages. It still lacks + the file and feature conflict checking. + + * components/services/install/lib/eazel-install-metadata.c: + (init_default_install_configuration): + Default debug to FALSE + + * components/services/install/lib/eazel-install-public.h: + * components/services/install/lib/eazel-install-private.h: + * components/services/install/lib/eazel-install-object.c: + (eazel_install_set_arg), (eazel_install_class_initialize), + (eazel_install_initialize), (eazel_install_install_packages), + (eazel_install_uninstall_packages), + (eazel_install_revert_transaction_from_xmlstring), + (eazel_install_emit_dependency_check), + (eazel_install_emit_dependency_check_pre_ei2), + (eazel_install_set_debug): + Shitload of code just to have one more arg (ei2). I remember how + easy this was in Emerald... *sigh* + _set_debug also sets VERBOSE debug in the packagesystem object. + Initialise also inits some new hashes for ei2. + The install, uninstall and revert checks for the ei2 setting, if + true, use the new ones, of not, use the old ones (doh) + Added a new emit_dependency that as second arg takes a + PackageDependency and mutates a correct PackageData from it. + + * components/services/install/lib/eazel-install-protocols.c: + (eazel_install_fetch_package): + Back to only getting with NO_PROVIDES|NO_DEPENDENCIES when using + the old (non ei2) stuff. + + * components/services/install/lib/eazel-package-system.h: + * components/services/install/lib/eazel-package-system.c: + (eazel_package_system_is_installed): + Takes a sense as last argument, make it more flexible. + + * components/services/install/lib/eazel-package-system-rpm3.c: + (eazel_package_system_rpm3_packagedata_fill_from_header), + (eazel_package_system_rpm3_query_requires), + (check_if_all_packages_seen): + Removed a fixme comment. + Added a fixme comment. + Set the package fillflag in fill_from_header. + Fixed some braindamage in query_requires to limit the amount of + damage the query does. + all_packages_seen changes according to the is_installed changes. + + * components/services/install/lib/eazel-softcat.c: + * components/services/install/lib/eazel-softcat.h: + Give robey more blame than me. + + * components/services/install/lib/makefile.staticlib.in: + Added logic2.o + +2000-12-19 John Sullivan + + Fixed bug 5258 (no UI for renaming new folder in View as List) + + After some email discussion, decided to bring up Properties + window in this case. Fortunately, FMDirectoryView had this case + beautifully factored so it was a cinch to add this. + + * src/file-manager/fm-list-view.c: + (real_start_renaming_item): New function, presents properties + window. + (fm_list_view_initialize_class): wire up real_start_renaming_item + as start_renaming_item function pointer, + +2000-12-19 Ramiro Estrugo + + reviewed by: Pavel Cisler + + * libnautilus-extensions/nautilus-art-extensions.h: + * libnautilus-extensions/nautilus-art-extensions.c: + (nautilus_art_irect_assign), + Convenience function to assign x,y,width,height values to an + ArtIRect. + + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h: + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: + (nautilus_gdk_pixbuf_is_valid), + A simple private function that returns whether a pixbuf is "valid" + or not. Vailidy is meassured as not null, with valid pixel data + and non zero dimensions. + + (nautilus_gdk_pixbuf_get_frame), + Private function to return the frame of a GdkPixbuf in a stucture for + better readability. + + (nautilus_gdk_pixbuf_fill_rectangle_with_color), + Changed it to use ArtIRect's instead of GdkRectangles to avoid + using unsigned and short integers. Also, use art_irect_interset() + to do clipping. + + (nautilus_gdk_pixbuf_save_to_file), + Changed the pixbuf parameter to be const. + + (nautilus_gdk_pixbuf_unref_if_not_null), + + (nautilus_gdk_window_get_frame), + Private function to return the frame of a GdkWindow in a stucture for + better readability. + + (nautilus_gdk_pixbuf_draw_to_drawable), + Renamed function to be consitent with the other pixbuf drawing + functions. Also made it use ArtIRect's instead of GdkRectangles + to avoid using unsigned and short integers. Rewrote the clipping + operations using art_irect_intersect() for better readability. + + (nautilus_gdk_pixbuf_draw_to_pixbuf), + Renamed function to be consitent with the other pixbuf drawing + functions. Also made it use ArtIRect's instead of GdkRectangles + to avoid using unsigned and short integers. Rewrote the clipping + operations using art_irect_intersect() for better readability. + + (nautilus_gdk_pixbuf_draw_to_pixbuf_alpha), + Renamed function to be consitent with the other pixbuf drawing + functions. Also made it use ArtIRect's instead of GdkRectangles + to avoid using unsigned and short integers. Changed the + implementation to honor all parameters including the source_x and + source_y. This is needed to work around limitation in + gdk_pixbuf_composite(). Rewrote the clipping operations using + art_irect_intersect() for better readability. + + (nautilus_gdk_pixbuf_new_from_pixbuf_sub_area), + (pixbuf_destroy_callback), + New function to create pixbuf from a sub area. The pixel data is + shared an all memory bookeeping is taken care of for the caller by + simply unreffing the resulting pixbuf. + + (nautilus_gdk_pixbuf_draw_to_pixbuf_tiled), + Renamed function to be consitent with the other pixbuf drawing + functions. Made the implementation work and honor all its + parameters including the origin. Rewrote the clipping + operations using art_irect_intersect() for better readability. + + There was a bug (5077) about this function claiming it was not + used except in test code. This was true, but now that it works im + planning on using it in NautilusImage shortly. I have marked that + bug fixed. + + (nautilus_gdk_pixbuf_show_in_eog): + New function to show a pixbuf externally in eog. Useful for + debugging pixbuf stuff. + + * libnautilus-extensions/nautilus-buffered-widget.c: + (nautilus_buffered_widget_draw), (nautilus_gdk_pixbuf_tile_alpha): + Use new gdk-pixbuf extension functions. + + * libnautilus-extensions/nautilus-scalable-font.c: + (nautilus_text_layout_paint): + Update for changes in fill_rectangle_with_color() api. + + * src/nautilus-about.c: (nautilus_about_update_authors): + Update for changes in fill_rectangle_with_color() api. + + * test/test-nautilus-font.c: (main): + Update for changes in pixbuf extensions. + +2000-12-19 Darin Adler + + * components/tree/nautilus-tree-model.c: (dump_one_file_node): + Fixed code that cast a pointer to (unsigned), which won't work on + the many platforms where pointers are bigger than ints. + +2000-12-19 John Sullivan + + * libnautilus-extensions/nautilus-thumbnails.c: + (nautilus_update_thumbnail_file_renamed_one): + Removed a g_assert (!vfs_file_exists). I ran into this while + testing something unrelated and Darin convinced me that it is + loony to assert anything about the state of the files on disk. + +2000-12-19 John Sullivan + + reviewed by: Pavel Cisler + + Fixed bug 2392 (need timed wait when activating file) + + * src/file-manager/fm-directory-view.c: + (get_containing_window): Rewrote to avoid applying + GTK_WINDOW () cast on potential NULL object. + (fm_directory_view_activate_file): Start timed-wait when + activating file, so user can cancel it if the call_when_ready + takes a really long time. + (activate_callback): Cancel timed-wait when we hear back from + the call_when_ready. + (cancel_activate_callback): Cancel call_when_ready if the user + clicks the Cancel button in the timed-wait dialog. + + * src/file-manager/fm-properties-window.c: + (fm_properties_window_present): Fixed a doubled character in + a string from my previous checkin. + +2000-12-19 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 2292 (no way to cancel opening a Properties window, + which could wait forever checking if a file is a directory). + Now there's a hashtable of pending files, which is used to + avoid trying to show the same window twice and to cancel + showing a window. + + * src/file-manager/fm-properties-window.c: + (cancel_create_properties_window_callback): New function, used + by timed-wait mechanism to give up on not-yet-appearing + properties window. + (remove_pending_file): New helper function, removes pending + file from hashtable and stops timed-wait. + (pending_file_succeeded): New helper function called when + the wait for info is over and the window can be created. + (create_properties_window_callback): call pending_file_succeeded + before doing anything else. + (directory_view_destroyed_callback): New function, used to + cancel timed-wait if the directory view is destroyed before + the properties window has appeared. + (fm_properties_window_present): Create pending_files hashtable; + do nothing if we're already waiting for a properties window + for this file; add file to pending_files; wire up + directory_view_destroyed_callback; start timed-wait before + using call_when_ready to determine if file is a directory; + use nautilus_g_hash_table_new_free_at_exit to help catch + leaks. + + + Added a couple more bonobo_ui_component_freeze/thaw pairs, + though they have only a very small measured effect here. + + * src/file-manager/fm-icon-view.c: (update_layout_menus), + (fm_icon_view_merge_menus): Add freeze/thaw pairs around + multiple bonobo-ui operations. + +2000-12-19 Darin Adler + + reviewed by: John Sullivan + + Fixed bug 2233 (proper icon not selected switching views after + rename) by re-sending selection when the selection items change + since they might have changed names. + + * src/file-manager/fm-directory-view.c: (done_loading): Moved + more of the done_loading code here for clarity. + (compare_pointers), (sort_and_check_for_intersection): Added + functions that quickly find if there's an intersection in two + GLists of NautilusFile objects. + (display_pending_files): Move some of the done_loading code into a + new function, do it after processing file changes, and add code to + send out the selection if a file change comes in for any items in + the selection (in case the name changed). + (display_selection_info_idle_callback), + (update_menus_idle_callback), (display_pending_idle_callback): + Make all of these more robust by keeping the NautilusView object + in a local variable. + (display_pending_timeout_callback): Do the "ref the NautilusView" + thing in this function too. + + * check-POTFILES.pl: Added support for .xml and .cpp files and + also updated special cases for directory environment variables. + * check-THANKS.pl: Added a special case and fixed some things in + the ChangeLog too to make this output fewer false positives. + +2000-12-19 Mike Fleming + + * components/services/nautilus-dependent-shared/shared-service-widgets.c: + Added fixme + + * components/mozilla/main.c: (main): + * components/services/summary/nautilus-view/main.c: (main): + + Cleaned up the ammonite/gconf initialization mess. gconf should + always be initialized before ammonite, and ammonite should always be + initizalized if you're going to use it. + +2000-12-19 Ramiro Estrugo + + reviewed by: Maciej Stachowiak + + * libnautilus-extensions/Makefile.am: + * libnautilus-extensions/nautilus-art-extensions.c: + * libnautilus-extensions/nautilus-art-extensions.h: + * libnautilus-extensions/nautilus-gnome-extensions.c: + * libnautilus-extensions/nautilus-gnome-extensions.h: + * libnautilus-extensions/nautilus-icon-canvas-item.c: + Move the libart specific extensions to their own place where I + will soon add stuff. + +2000-12-19 Ramiro Estrugo + + reviewed by: Pavel Cisler + + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h: + Remove nautilus_gdk_pixbuf_draw_text(). This function was meant + to be used by embedded text. Ever since we started using anti- + aliased text via freetype, we dont need it anymore. + + This yanking manuever fixes Bug 2559, since the code relevant to + that bug is now gone. + + * libnautilus-extensions/nautilus-icon-factory.c: (embed_text): + Always use smooth fonts for embedded text. Remove currently + unused call to nautilus_gdk_pixbuf_draw_text(). + + The issue of embedded always being anti aliased will continue to + be tracked by bug 2783. + +2000-12-18 Andy Hertzfeld + + * icons/i-harddisk.png: + aligned perspective with other images in the hardware view + + * icons/eazel/Back.png: + * icons/eazel/Forward.png: + * icons/eazel/Home.png: + * icons/eazel/Refresh.png: + * icons/eazel/Search.png: + * icons/eazel/SearchWeb.png: + * icons/eazel/Services.png: + * icons/eazel/Stop.png: + * icons/eazel/Up.png: + new toolbar icons from Susan. She's not quite finished with them + yet, but these are a lot closer to the final ones, and I wanted to + get them checked in before my vacation. + +2000-12-18 Gene Z. Ragan + + Fixed an issue in sorting. When you reload a directory + into music view, the last sort mode is applied to the + newly loaded list. + + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize_class), + (nautilus_music_view_initialize), (nautilus_music_view_destroy), + (sort_list), (click_column_callback), (nautilus_music_view_update): + +2000-12-18 Andy Hertzfeld + + * components/image-viewer/nautilus-image-view.c: + (zoomable_zoom_to_fit_callback), (image_bigger_than_viewer), + (scrolled_window_size_allocate_callback), (control_factory_common), + (scrollable_control_factory): + implemented initial "zoom-to-fit" if an image is bigger than the + displayable area, as requested by Mike Boich. + +2000-12-18 John Sullivan + + reviewed by: Rebecca Shulman + + Fixed Nautilus half of bug 2109 (Images (and any other + files) with "execute" bit set will try to be executed + instead of viewed when activated). This change requires + a recent GNOME-VFS change to compile. + + * src/file-manager/fm-directory-view.c: (file_is_launchable): + Test for launchability now includes asking GNOME_VFS whether + this mime type is conceivably executable. + + * libnautilus-extensions/nautilus-mime-actions.c: + (nautilus_mime_get_short_list_methods_for_file): Changed + "vfs-method" to "vfs_method" to match change in GNOME-VFS. + +2000-12-18 Darin Adler + + reviewed by: John Sullivan + (Robey also looked at the install part a bit) + + Fix bug 5212 (File leaks when you start and immediately quit + Nautilus). + + * src/file-manager/fm-directory-view.c: (queue_pending_files): + Remove incorrect nautilus_file_list_ref that created a + NautilusFile leak. + + Fix bug 5180 (Defined messages won't end up in translations) by + making sure we don't ever use "_()" inside a #define. + + * libnautilus-extensions/nautilus-file-operations.c: + * libnautilus-extensions/nautilus-global-preferences.c: + * libnautilus-extensions/nautilus-icon-canvas-item.c: + * libnautilus-extensions/nautilus-icon-factory.c: + * nautilus-installer/src/installer.c: + * nautilus-installer/src/package-tree.c: + * src/file-manager/fm-desktop-icon-view.c: + * src/nautilus-location-bar.c: + Changed all localizable strings in #defines to instead use global + (const) variables. We still have the defines, though, since we + can't call gettext in a global-initialization. + +2000-12-18 Gene Z. Ragan + + Fixed bug 5136, Exit Music View with a 2nd open Music View window -> crash + + The bug was caused by a runaway timer callback. The callback is now + properly destroyed when the component is destroyed. + + * components/music/nautilus-music-view.c: + (nautilus_music_view_destroy), (play_status_display), + (play_current_file), (play_button_callback): + +2000-12-18 Robey Pointer + + * components/services/trilobite/libtrilobite/trilobite-core-utils.c: + (trilobite_get_popt_context), (trilobite_init), (trilobite_main), + (trilobite_main_quit): + * components/services/trilobite/libtrilobite/trilobite-core-utils.h: + + Clean up trilobite_init to not use or require X anymore (yay!). + Add a trilobite_main and trilobite_main_quit to mirror the GTK + versions (but without polling for X events). Add a way for + services to retreive their popt context for command-line argument + processing. + + * components/services/install/command-line/eazel-alt-install-corba.c: + (done), (main): + * components/services/install/server/main.c: + (trilobite_service_factory_destroy), (main): + * components/services/time/service/main.c: + (trilobite_service_factory_destroy), (main): + * components/services/trilobite/sample/service/main.c: + (trilobite_service_factory_destroy), (main): + + Make the command-line utilities use trilobite_main() and + trilobite_main_quit() instead of the GTK variants. + + * components/services/install/lib/eazel-install-xml-package-list.c: + (generate_xml_package_list), (osd_parse_dependency): + + Stop filling in the soft_depends field from XML. (The old code + that uses soft_depends doesn't expect it to be filled in and will + get confused, and this field is going away shortly anyway.) + + * components/services/install/nautilus-view/main.c: (main): + * components/services/time/nautilus-view/main.c: (main): + + Don't make the nautilus-views use trilobite_* functions (that + would be bad), but clean them up to look similar to each other so + it's easy to see how to copy them and make new trilobites. + +2000-12-18 Robin * Slomkowski + + * nautilus.spec.in: updated version of bonobo + for no good reason, change pw2 because I never + understood it and changed /rpm3/ to rpm* + because on rpm4 systems it didn't generate the + right files. + +2000-12-18 Ramiro Estrugo + + reviewed by: Michael Engber + + * libnautilus-extensions/nautilus-background.c: + (nautilus_background_draw_to_pixbuf): + * libnautilus-extensions/nautilus-background.h: + Add a new function to draw backgrounds into GdkPixbufs. Its a + simple wrapper around the draw_to_canvas() function. + + Also, small tweaking of the prototypes to match "the style." + + * libnautilus-extensions/nautilus-buffered-widget.c: + (create_background_pixbuf_from_ancestor): + Draw directly into the pixbuf by using + nautilus_background_draw_to_pixbuf function instead of drawing to + a Pixmap and capturing the bits. + +2000-12-18 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 4037 (Error dialog every time on launch when + permissions are set strangely) + + Fixed bug 1115 (Need better name for "User Directory" + and "User Data Directory") + + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_get_user_main_directory): Removed g_warning when + Nautilus fails to create ~/Nautilus directory, improved + FIXME comments. + (nautilus_get_user_directory), (nautilus_get_desktop_directory): + Added FIXME comments. + + * src/nautilus-application.c: + (check_required_directories): Renamed from nautilus_application_ + check_user_directories; now returns FALSE if any required + directories were not created. Reworded error dialog to mention + directories by path rather than using confusing invented symbolic + names, and to tell the user to address the problem by creating + specified directories or setting permissions such that Nautilus + can create specified directories. (It used to say "restart + Nautilus", which was pretty much guaranteed to have no effect.) + (nautilus_application_startup): Now returns if + check_required_directories fails. The user has to address the + problem described in the error message before Nautilus will + launch. + +2000-12-18 Gene Z. Ragan + + Fixed an unused variable error. + + * src/file-manager/fm-desktop-icon-view.c: (create_mount_link), + (place_home_directory): + +2000-12-18 Andy Hertzfeld + + * src/nautilus-property-browser.c: (nautilus_emblem_dialog_new), + (emblem_dialog_clicked): + fixed bug 4164, "Add New Emblem" file entry can be typed in, but is + ignored. Fixed by reworking logic to read the path from it, instead + of relying on activate to set it up. + +2000-12-18 Gene Z. Ragan + + Fixed bug 2494, Error ignored when making icon directory for link file + + We now check the GnomeVFSResult. If it does != GNOME_VFS_OK, NULL + is returned. The callers of this function can properly handle a NULL + result. + + * libnautilus-extensions/nautilus-link.c: (make_local_path): + +2000-12-18 Gene Z. Ragan + + Fixed bug 2526, Error case ignored when creating desktop link file + + I remvoed the error check in the three cases th ebug referenced. + If an error occurs there is not much we can do. We could tell + the user something, but the notification would be vague. If a + link is not created, there is no destructive side effect. + + * src/file-manager/fm-desktop-icon-view.c: (create_mount_link), + (volume_unmounted_callback), (place_home_directory): + +2000-12-18 Andy Hertzfeld + + * src/nautilus-property-browser.c: (set_up_category_width): + fixed bug 5230, shrinking the width of Backgrounds window + causes floating point exception, by pinning the number of + columns at 1. + + * icons/Makefile.am: + * icons/default.xml: + * icons/eazel/eazel.xml: + * icons/vector/vector.xml: + * icons/zoom_body.png: + * icons/eazel/zoom_body.png: + new zoom control image from Susan + +2000-12-18 Gene Z. Ragan + + Fixed bug 2472, text_height and text_width shouldn't be + left alone when renaming. + + Preserve the text_width and text_height when renaming. + Don't reset the values, just block the draw when the + renaming widget is visibile. + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (draw_label_text_aa): + +2000-12-17 Ali Abdin + + Fix bug #4379 (problem with variablelist's) + + Partial fix for bug #5118 (acronym (and other tags) do not appear + in table of contents) - Implemented for: ACRONYM, FUNCTION + + Both of these are based on patches thanks to jfleck@inkstain.net + + Also added experimental ScrollKeeper support to the sidebar (as + contributed by Mark Murnane from Sun). This is experimental, and + disabled by default. + + * components/help/converters/gnome-db2html2/gdb3html.h: + * components/help/converters/gnome-db2html2/sect-elements.[ch]: + * components/help/converters/gnome-db2html2/toc-elements.c: + (sect_varlistentry_start_element), + (sect_varlistentry_end_element): + new functions for VARLISTENTRY support + (sect_listitem_start_element), + (sect_listitem_end_element): + Only print
  • for itemizedlist and orderlist (for the varlist we + print it out during the varlistentry) + + Makre sure we print out
  • 's too, and remove the

    cruft. + + * components/help/converters/gnome-db2html2/toc-elements.c: + (toc_tag_characters): + New function. This will be used to print tags within the title. e.g. + <acronym>ASCII</acronym> should print out ASCII. + + * components/help/hyperbola-filefmt.c: + * components/help/hyperbola-nav-tree.c: + Added a patch contributes by Mark Murnane + that integrates experimental ScrollKeeper support for Hyperbola (the + Help Sidebar). This is disabled by default. You should #define + ENABLE_SCROLLKEEPER_SUPPORT to be able to use it. + + * components/help/ScrollKeeper-TODO: + New file contributed by Sun. + +2000-12-17 Andy Hertzfeld + + * src/nautilus-property-browser.c: + (nautilus_property_browser_initialize_class), + (nautilus_property_browser_get_category_width), + (set_up_category_width), (update_category_width), + (nautilus_property_browser_update_contents), + (nautilus_property_browser_set_path), + (nautilus_property_browser_size_allocate): + + fixed bug 3310, contents of property browser should relayout + to fit the window, by calculating the number of columns + from the window width, and overriding size_allocate to + relayout if necessary when the size changes. + +2000-12-17 Gene Z. Ragan + + Fixed bug 3890, Resort columns while MP3 plays, + active song changes. + + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize), (selection_callback), + (compare_song_numbers), (compare_song_titles), + (compare_song_artists), (compare_song_times), (compare_song_years), + (compare_song_bitrates), (click_column_callback), + (play_current_file), (nautilus_music_view_update): + Change the way the list is sorted. Use column sorting functions + that are set when the column button is clicked. Don't reload list + to resort. Make sure current selection index is updated + when the list is resorted. + +2000-12-15 Andy Hertzfeld + + * src/nautilus-sidebar.c: + (nautilus_sidebar_active_panel_matches_id), (toggle_sidebar_panel), + (nautilus_sidebar_add_panel_items), + (nautilus_sidebar_remove_panel), + (nautilus_sidebar_deactivate_panel): + + fixed bug 5198, removing the displayed sidebar panel messes up + others, by closing the active panel before removing if it's the + one to be removed. + + also fixed bug 1840 with this change, tab gets left behind when + sidebar panel dies, by handling the case when we can't find the + notebook page better. + +2000-12-15 Gene Z. Ragan + + * src/file-manager/fm-desktop-icon-view.c: (create_mount_link): + Test and see how users respond to a more lenient mount policy. + We now will mount a lot of things. Just curious. + +2000-12-15 Gene Z. Ragan + + reviewed by: Pavel Cisler + + Fixed bug 2400, LABEL=/ lines in /etc/fstab (used in Red Hat Beta 7) + prevents trash from working + + Fixed bug 4586, Nautilus does not properly detect zip drives as removable + media + + Rearchitected the way the volume monitor works. It now examines /proc/mounts + to determine what file systems are mounted. This solves several problems such + as the use of LABEL and auto in fstab. By using /proc/mounts we do not have to + worry about permissions and disk access. + + * libnautilus-extensions/nautilus-volume-monitor.c: + * libnautilus-extensions/nautilus-volume-monitor.h: + (nautilus_volume_monitor_initialize), + (nautilus_volume_monitor_destroy), (floppy_sort), + (nautilus_volume_monitor_get_removable_volumes), + (nautilus_volume_monitor_get_volume_name), + (mount_volume_get_cdrom_name), (mount_volume_activate_cdrom), + (mount_volume_activate_floppy), (mount_volume_activate_ext2), + (mount_volume_activate_msdos), (mount_volume_activate_generic), + (mount_volume_get_name), (mount_volume_activate), (eject_cdrom), + (free_mount_list), (create_differed_list), + (get_current_mount_list), (verify_current_mount_state), + (mount_volumes_check_status), (mount_volume_floppy_add), + (mount_volume_ext2_add), (mount_volume_udf_add), + (mount_volume_vfat_add), (mount_volume_msdos_add), + (cdrom_ioctl_get_info), (mount_volume_iso9660_add), + (mount_volume_proc_add), (find_volumes), + (nautilus_volume_monitor_each_volume), + (nautilus_volume_monitor_each_mounted_volume), + (nautilus_volume_monitor_volume_is_mounted), + (nautilus_volume_monitor_mount_unmount_removable), (copy_volume), + (nautilus_volume_monitor_free_volume), (get_msdos_volume_name), + (get_floppy_volume_name), (mount_volume_add_filesystem): + + * src/file-manager/fm-desktop-icon-view.c: (create_mount_link), + (volume_unmounted_callback), (update_disks_menu): + +2000-12-15 John Sullivan + + reviewed by: nobody, but Darin knew exactly what I was + doing for these two small changes so that sorta counts. + + Fixed two problems found while investigating bug 4810 + (typing "gzip:" in location bar crashes), though I + ended up fixing the bug entirely in gnome-vfs. + + * libnautilus-extensions/nautilus-directory-async.c: + (get_info_callback): Don't call nautilus_directory_remove_file + on self-owned files. + + * src/nautilus-window-manage-views.c: (handle_unreadable_location): + Don't call a file "unreadable" if it doesn't exist. Let the rest + of the error machinery handle it instead. + +2000-12-15 Andy Hertzfeld + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (hit_test_pixbuf): + liberalized the alpha threshold for hit-testing, so + semi-transparent areas hit test positively if they have + any opacity at all. + +2000-12-15 Robin * Slomkowski + + * components/services/install/lib/Makefile.am: added + eazel-package-system-rpm3-private.h to EXTRA_DISTS + +2000-12-15 Michael Engber + + * src/nautilus-zoom-control.c: (draw_number), + (draw_pixbuf_with_prelight), (nautilus_zoom_control_draw), + (nautilus_zoom_control_expose), + (nautilus_zoom_control_unload_images), + (nautilus_zoom_control_load_images): + Fixed performance of zoom control drawing by elimitating + continual calls to gdk_fontset_load - bug 3317. Also fixed + a falure to unref the number strip image. + +2000-12-15 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 2464 ("open each item in a new window" sometimes + reuses an existing window) + + * libnautilus-extensions/nautilus-global-preferences.c: + (global_preferences_register): Changed preferences text to + say "separate window" rather than "new window" + + + Fixed bug 2752 (double-clicking Help item causes "sidebar view + failed" message) + + Fixed bug 5040 (only one dead view name gets saved for a window) + + This was a tangled mess of issues, including: (1) the dialog + code was incorrectly guessing "sidebar panel" when a content + view failed in some cases (fixed); (2) view frame lifetime + issues found while working on (1) (fixed); (3) the state machine + can fail if asked to load the same location twice very quickly + (written up as bug 5197); (4) the Help sidebar panel asks to + load the same location multiple times on a double-click (fixed); + (5) Mozilla sometimes fails to load just after it has quit + (written up as bug 5199). + + * components/help/hyperbola-nav-tree.c: + (hyperbola_navigation_tree_new): Connect to destroy signal of + ctree widget. + (set_pending_location): New helper function to remember the + location for which this component just initiated a load. + (hyperbola_navigation_tree_load_location): Set pending location + to NULL now that there's a new real location. + (hyperbola_navigation_tree_select_row): Don't try to start a + new load of the pending location; set the pending location when + we do start a new load. + (hyperbola_navigation_tree_destroy): free pending location. + + * src/nautilus-view-frame.c: + (nautilus_view_frame_initialize_class), + (nautilus_view_frame_destroy), (nautilus_view_frame_finalize): + Don't destroy details fields until finalize, so view_frame objects + with extra refs can survive between destroy & finalize. + + * src/nautilus-window-manage-views.c: + (view_frame_info_new), (view_frame_info_free): New helper + functions for dealing with the label & sidebar-panel-ness + of a view frame. + (set_view_frame_info): New helper function for storing + the label & sidebar-panel-ness of a view frame in object + data in the view frame. + (view_frame_is_sidebar_panel), (view_frame_get_label): + New helper functions for retrieving info stored in object + data in the view frame. + (report_content_view_failure_to_user_internal), + (report_current_content_view_failure_to_user), + (report_nascent_content_view_failure_to_user), + (report_sidebar_panel_failure_to_user): Reworked the functions + that put up the "view failed" dialog to take a NautilusViewFrame + and to distinguish the existing-content-view from content-view- + that's-being-created cases. + (disconnect_view_and_destroy), (disconnect_destroy_unref_view): + New helper functions for cleanly forgetting about a view. + (handle_view_failure): Use object data to distinguish content views + from sidebar panels so we'll always get the right failure dialog. + (update_state), (change_state): Get rid of dead_view_name mechanism; + the name is now stored in the view frame in all cases. + (load_content_view), (free_location_change), + (nautilus_window_begin_location_change), + (nautilus_window_set_sidebar_panels): Jigger around the reffing & + sinking of NautilusViewFrames to fix leaks and uncancelled-callback + issues. + + * src/nautilus-window-private.h: remove obsolete dead_view_name + field. + * src/nautilus-window.c: (nautilus_window_destroy): + Don't free now-non-existent dead_view_name field. + +2000-12-15 Darin Adler + + reviewed by: Gene Ragan + + Fix bug 5176 (Theme descriptions not translated). + + Fix bug 5187 (Real name in file ownership doesn't take GECOS data + into account). + + * src/nautilus-theme-selector.c: (make_theme_description): Get the + theme description (which I also moved to the theme node from its + own description node) by using + nautilus_xml_get_property_translated which handles using the + gettext database to translate the property if the XML file has it + with a _ prefix. + + * icons/ardmore/ardmore.xml: + * icons/arlo/arlo.xml: + * icons/default.xml: + * icons/gnome/gnome.xml: + * icons/vector/vector.xml: + Moved description to be a property of the theme node and use the + name that indicates it needs to be localized. + + * po/POTFILES.in: Add all of the theme .xml files which now + potentially have localizable theme descriptions in them. + + * libnautilus-extensions/nautilus-file.c: (get_real_name): Add + code to compute the real name from the GECOS info, by stripping + anything after the "," and substituting the login name, + capitalized, for any occurences of "&". + (get_user_and_real_name_from_id): Use get_real_name instead of + going for the pw_gecos field directly. + (nautilus_get_user_names): Use get_real_name instead of + going for the pw_gecos field directly. + + * libnautilus-extensions/nautilus-string.h: + * libnautilus-extensions/nautilus-string.c: + (nautilus_str_strip_substring_and_after), + (nautilus_str_replace_substring), (nautilus_self_check_string): + Add two new string utility functions and self-checks for them. + These were both needed for the GECOS change. + + * src/nautilus-property-browser.c: Tweak formatting. + +2000-12-15 John Harper + + reviewed by: Darin Adler + + * components/html/gnome-dialogs.c: (get_progress), + (glibwww_prompt), (glibwww_prompt_password), + (glibwww_prompt_username_and_password): + * components/music/configure.c: (mpg123_configure): + * components/music/fileinfo.c: (mpg123_file_info_box): + * components/music/nautilus-music-view.c: (image_button_callback): + * helper-utilities/error-dialog/nautilus-error-dialog.c: + (show_message_box): + * libnautilus-extensions/nautilus-file-operations-progress.c: + (nautilus_file_operations_progress_new): + * libnautilus-extensions/nautilus-global-preferences.c: + (nautilus_global_preferences_set_dialog_title): + * libnautilus-extensions/nautilus-program-chooser.c: + (run_program_configurator_callback), + (nautilus_program_chooser_new): + * libnautilus-extensions/nautilus-stock-dialogs.c: + (timed_wait_callback), (nautilus_simple_dialog), + (show_message_box): + * src/file-manager/fm-icon-text-window.c: + (create_icon_text_window): + * src/file-manager/fm-properties-window.c: + (create_properties_window), (select_image_button_callback): + * src/nautilus-about.c: (nautilus_about_initialize): + * src/nautilus-bookmarks-window.c: (create_bookmarks_window): + * src/nautilus-first-time-druid.c: + (nautilus_first_time_druid_show): + * src/nautilus-link-set-window.c: + (nautilus_link_set_configure_window): + * src/nautilus-property-browser.c: + (nautilus_property_browser_initialize), + (nautilus_emblem_dialog_new), (add_new_pattern): + * src/nautilus-shell.c: (display_caveat): + * src/nautilus-theme-selector.c: + (nautilus_theme_selector_initialize), + (add_new_theme_button_callback): + + Added calls to gtk_window_set_wmclass with suitable instance + names and `Nautilus' class name + +2000-12-15 Andy Hertzfeld + + reviewed by: Pavel Cisler + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (nautilus_icon_canvas_item_initialize), + (invalidate_text_dimensions), (nautilus_icon_canvas_item_set_arg), + (measure_label_text): + fixed performance bottleneck where we measure the label text too + many times by making it use values cached in the item details. + Added code to invalidate them at the appropriate times, and + made measure_label_text short-circuit if they're valid. + +2000-12-15 J Shane Culpepper + + reviewed by: Darin Adler + + * components/services/install/lib/Makefile.am: + * components/services/install/lib/eazel-inventory-utils.c: + (init_package_system), (get_package_list), (add_package_info), + (str_has_prefix), (eazel_inventory_gconf_done), (check_gconf_init), + (get_digest_from_gconf), (update_gconf_inventory_digest), + (eazel_gather_inventory): + * components/services/install/lib/eazel-inventory-utils.h: + + Removing hardcoded rpm calls and now using the eazel package + system lib. Added digest testing to know when the inventory + xml has changed. + +2000-12-15 Darin Adler + + * components/services/install/lib/eazel-install-xml-package-list.h: + * components/services/install/nautilus-view/nautilus-service-install.c: + * nautilus-installer/src/Makefile.am: + Got rid of lingering references to helixcode-utils.* that Robey + apparently missed when he removed those files. This should fix + clean builds and Tinderbox. + + * components/services/trilobite/libtrilobite/Makefile.am: Removed + duplicate mention of file. + + * src/nautilus-view-frame.c: Formatting tweak. + +2000-12-15 Maciej Stachowiak + + * components/rpmview/nautilus-rpm-view-install.c + (nautilus_rpm_view_install_package_callback, + nautilus_rpm_view_uninstall_package_callback): Remove check for + Red Hat to match Robey's earlier changes and fix the build. + +2000-12-15 Robey Pointer + + * nautilus-installer/src/Makefile: + * nautilus-installer/src/callbacks.c: (ask_to_delete_rpms), + (ask_are_you_sure): + * nautilus-installer/src/gtk-hackery.c: (log_debug), (gtk_box_nth), + (gnome_reply_callback): + * nautilus-installer/src/installer.c: + (get_detailed_errors_foreach): + * nautilus-installer/src/installer.h: + * nautilus-installer/src/main.c: + + Factor more stuff out into GTK hackery. Fix headers to sync up + with the better libtrilobite layout and to follow the moving + target that is libeazelinstall. + + * nautilus-installer/src/package-tree.c: + (package_customizer_finalize), (package_customizer_unref), + (package_customizer_class_initialize), + (package_customizer_initialize), (package_customizer_new), + (package_customizer_get_type), (package_info_compare), + (package_customizer_find_package), (popup_package_dialog), + (package_customizer_recompute_bongs), (package_toggled), + (package_customizer_fill), (normalize_labels), + (package_customizer_set_package_list), + (package_customizer_get_widget), (jump_to_package_tree_page): + * nautilus-installer/src/package-tree.h: + + Make the package tree into a proper GTK object. + +2000-12-15 Robey Pointer + + * components/services/install/command-line/eazel-alt-install-corba. + c: (main): + + Remove check for redhat. + + * components/services/install/lib/eazel-install-corba-callback.c: + * components/services/install/lib/eazel-install-metadata.c: + * components/services/install/lib/eazel-install-object.c: + * components/services/install/lib/eazel-install-xml-package-list.c: + (parse_package), (parse_category), (osd_parse_provides), + (osd_parse_implementation), (osd_parse_softpkg), + (eazel_install_packagelist_parse): + * components/services/install/lib/eazel-softcat.c: + * components/services/install/server/main.c: (main): + * components/services/summary/lib/eazel-summary-shared.c: + (parse_a_service), (parse_a_eazel_news_item), + (parse_a_update_news_item): + * components/services/time/service/trilobite-eazel-time-service.c: + (trilobite_eazel_time_service_initialize_load_config): + * components/services/trilobite/libtrilobite/Makefile.am: + * components/services/trilobite/libtrilobite/helixcode-utils.c: + * components/services/trilobite/libtrilobite/helixcode-utils.h: + * components/services/trilobite/libtrilobite/libtrilobite.h: + * components/services/trilobite/libtrilobite/makefile.staticlib.in: + * components/services/trilobite/libtrilobite/trilobite-core-messagi + ng.c: (trilobite_add_log), (trilobite_close_log), + (trilobite_debug), (trilobite_set_debug_mode), + (trilobite_set_log_handler): + * components/services/trilobite/libtrilobite/trilobite-core-messagi + ng.h: + * components/services/trilobite/libtrilobite/trilobite-core-network + .c: (trilobite_xml_get_string), (trilobite_open_uri), + (trilobite_fetch_uri), (trilobite_fetch_uri_to_file): + * components/services/trilobite/libtrilobite/trilobite-core-network + .h: + * components/services/trilobite/libtrilobite/trilobite-core-utils.c + : (trilobite_init), (trilobite_setenv): + * components/services/trilobite/libtrilobite/trilobite-core-utils.h + : + * components/services/trilobite/libtrilobite/trilobite-redirect.c: + * components/services/trilobite/libtrilobite/trilobite-service-priv + ate.h: + * components/services/trilobite/sample/command-line/main.c: (main): + * components/services/trilobite/sample/service/main.c: (main): + + Clean up libtrilobite: move network and XML related funcs into + -network.c and logging stuff into -messaging.c, where they were + intended to be all along I guess. Fix header include lines from + other files to match the new locations. Ditch the archaic + helixcode stuff. + + * components/services/install/lib/makefile.staticlib.in: + + Fix staticlibs to add new trilobite files and to follow the MD5 + funcs to their new home. + +2000-12-15 Andy Hertzfeld + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (draw_or_measure_label_text), (draw_or_measure_label_text_aa): + fixed problem with selection causing relayout, by always allocating + the space for highlighting. Also, tightened up the size of the + highlighted area. + +2000-12-14 Pavel Cisler + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (draw_or_measure_label_text), (draw_or_measure_label_text_aa): + Some #defines to help me profile draw_measure_label_text. + Off in the build. + +2000-12-14 Maciej Stachowiak + + sort of reviewed by: Mathieu Lacage + + * src/nautilus-window-manage-views.c + (viewed_file_changed_callback): If the file we are viewing got + renamed, update the window's concept of it's location, the up + button sensitivity, the navigation bar location and the + title. This fixes bug 807 (File name in sidebar doesn't update + when file is renamed). + + * libnautilus-extensions/nautilus-directory-async.c + (get_info_callback): Make sure not to free an already NULL file + info. This pathological case was being tirggered sometime when + doing a Refresh on a viewed location that got renamed. + +2000-12-14 Arlo Rose + + * icons/eazel/eazel.xml: + * icons/eazel/sidebar_tab_pieces/*: + Changed the sidebar to reflect the solid blue Susan and Andy wanted. + +2000-12-14 Andy Hertzfeld + + * src/nautilus-sidebar-title.c: (update_icon): + made the sidebar get the right icon for the hardware + view by special-casing it like we do for services and man. + As part of this, I made the sidebar work properly with + .svg icons by calling the icon factory to load the icon. + + * libnautilus-extensions/nautilus-icon-factory.c: + (nautilus_icon_factory_get_pixbuf_from_name): + added a convenience routine to fetch icons by name. + * libnautilus-extensions/nautilus-icon-factory.h: + definition for the convenience routine. + +2000-12-14 Robey Pointer + + reviewed by: Maciej Stachowiak + + * components/services/install/lib/eazel-install-xml-package-list.c: + (osd_parse_provides), (osd_parse_dependency), + (osd_parse_file_list), (osd_parse_implementation): + + Parse package dependency info from softcat and put them in the new + 'depends' list in the package. (This will replace the old + soft_depends and hard_depends fields.) Incorporate new fields + supplied by the internal triggerfish. + + * components/services/install/lib/eazel-package-system-types.c: + (packagedependency_new), (packagedependency_copy), + (packagedependency_destroy), (packagedata_new), + (packagedata_deplist_copy), (packagedata_copy), + (packagedata_fill_in_missing), (packagedata_destroy), + (packagedata_status_str_to_enum), (dump_package_list), + (dump_package_deplist), (packagedata_dump_int): + * components/services/install/lib/eazel-package-system-types.h: + + Add new 'depends' field and PackageDependency struct. + + * components/services/install/lib/eazel-softcat.c: + (eazel_softcat_initialize), (sense_flags_to_softcat_flags), + (eazel_softcat_convert_sense_flags), + (eazel_softcat_sense_flags_to_string): + * components/services/install/lib/eazel-softcat.h: + + Add functions to convert to/from softcat sense flags, and a + convenience function for converting them into a human-friendly + string like ">=". + +2000-12-14 Robey Pointer + + * components/services/install/lib/eazel-install-corba-callback.c: + (eazel_install_callback_create_corba_object), + (eazel_install_callback_initialize): + * components/services/install/lib/eazel-install-corba-callback.h: + * components/services/install/lib/eazel-install-corba.c: + (eazel_install_create_corba_object): + * components/services/install/lib/eazel-install-object.c: + (eazel_install_finalize), (eazel_install_unref), + (eazel_install_set_arg), (eazel_install_initialize): + * components/services/install/lib/eazel-install-problem.c: + * components/services/install/lib/eazel-install-problem.h: + * components/services/install/lib/eazel-install-public.h: + * components/services/install/lib/eazel-package-system-private.h: + * components/services/install/lib/eazel-package-system-rpm3.c: + (eazel_package_system_rpm3_create_dbs), + (eazel_package_system_rpm3_open_dbs), + (eazel_package_system_rpm3_initialize): + * components/services/install/lib/eazel-package-system-rpm3.h: + * components/services/install/lib/eazel-package-system-rpm4.c: + (eazel_package_system_rpm4_initialize): + * components/services/install/lib/eazel-package-system-rpm4.h: + * components/services/install/lib/eazel-package-system-skeleton.c: + (eazel_package_system_skeleton_load_package), + (eazel_package_system_skeleton_query), + (eazel_package_system_skeleton_install), + (eazel_package_system_skeleton_uninstall), + (eazel_package_system_skeleton_verify), + (eazel_package_system_skeleton_initialize): + * components/services/install/lib/eazel-package-system-skeleton.h: + * components/services/install/lib/eazel-package-system.c: + (eazel_package_system_initialize): + * components/services/install/lib/eazel-package-system.h: + + Change all IS_EAZEL* macros to EAZEL_IS*, to match convention. + +2000-12-14 Darin Adler + + * components/image-viewer/nautilus-image-view.c: + (bonobo_object_factory): Remove unnecessary return_if_fail + that was referring to a field now renamed in Bonobo. + +2000-12-14 Darin Adler + + reviewed by: John Sullivan + + Fix bug 2807 (support metadata removal for cases where we + move/delete files) by implementing metadata removal. + + Fix bug 2199 (Saved icon positions ruin desktop layout features) + by testing and fixing other bugs now that metadata removal is + implemented. + + Fix bug 5164 (exception trying to drag file) by fixing a few + placeholders in XML files that were still transparent and should + not be. + + Fix bug where we don't reveal the New Folder icon (reintroduced by + my changes yesterday) by computing the icon position in a way that + works even before the canvas item is updated. + + * libnautilus-extensions/nautilus-directory-metafile.c: + (get_file_node): Small change (not used for now) that might + help unify the "before metafile is read" case with the code + after the metafile is read. + (nautilus_directory_rename_file_metadata): Remove the old + file metadata before renaming the new data. Also change code + to avoid looking up things in the hash table twice. + (nautilus_directory_copy_file_metadata): Updated and added + FIXME comments. + (nautilus_directory_remove_file_metadata): Add code to + remove metadata, similar to the existing rename code. + + * libnautilus-extensions/nautilus-directory.c: + (nautilus_directory_schedule_metadata_copy), + (nautilus_directory_schedule_metadata_move), + (nautilus_directory_schedule_metadata_remove): Fix code that was + using file names instead of relative URIs (essentially escaped + file names). This code was missed when we made the + switchover. Without this, changes to files with spaces in their + names didn't update metadata properly. + + * libnautilus-extensions/nautilus-file-operations.c: + (build_error_string): Added blank line between the intro sentence + and the rest of the error message. + (handle_xfer_overwrite): Added blank line between the intro + sentence and the rest of the error message. + (sync_xfer_callback): Fix metadata code to remove the metadata + when creating a new file, just as it copies metadata when copying + a file. This change helps the New Folder case, but requires a fix + in gnome-vfs to set the top level boolean for the New Folder case. + (handle_new_folder_vfs_error): Added blank line between the intro + sentence and the rest of the error message. + (nautilus_self_check_file_operations): Changed the self-check to + use the standard way of testing functions that return text instead + of rolling its own. + + * libnautilus-extensions/nautilus-gnome-extensions.h: + * libnautilus-extensions/nautilus-gnome-extensions.c: + (nautilus_gnome_canvas_item_get_canvas_bounds): Added a function + that's like nautilus_gnome_canvas_item_get_current_canvas_bounds + but is accurate even before the icon is updated. + + * libnautilus-extensions/nautilus-icon-container.c: (reveal_icon): + Use nautilus_gnome_canvas_item_get_canvas_bounds instead of + nautilus_gnome_canvas_item_get_current_canvas_bounds. Fixes the + bug I reintroduced where New Folder icons would not be revealed. + + * libnautilus-extensions/nautilus-xml-extensions.h: + * libnautilus-extensions/nautilus-xml-extensions.c: + (nautilus_xml_remove_node): Add a remove-node function. This is + needed because gnome-xml doesn't have xmlRemoveNode + implemented. This implementation is not quite complete, but + probably good enough for our purposes. A complete implementation + might have to have some handling for removing the root node and + perhaps some stuff to remove unused namespaces. Maybe this can be + rolled into gnome-xml. + + * src/file-manager/nautilus-directory-view-ui.xml: + * src/nautilus-shell-ui.xml: + Added some more delimit="none" entries to make it so that the + actual placeholder definitions are not "transparent". + + * libnautilus-extensions/nautilus-glib-extensions.c + (nautilus_self_check_glib_extensions): Marked some strings that + are part of a test translatable since the result might be + different in some locales. Translating the strings to the right + result makes "make check" work properly in that locale. + +2000-12-14 Andy Hertzfeld + + * src/nautilus-first-time-druid.c: + (make_hbox_user_level_radio_button), (set_up_user_level_page), + (set_up_update_page): + fixed bug 2912, better wording in the first time wizard, by revising + the text. Also, improvement the vertical alignment on the + user level selection page. + +2000-12-14 Eskil Heyn Olsen + + * components/rpmview/nautilus-rpm-verify-window.c: + (nautilus_rpm_verify_window_set_progress): + * components/rpmview/nautilus-rpm-view-private.h: + * components/rpmview/nautilus-rpm-view.c: + (nautilus_rpm_view_initialize), (verify_failed_signal), + (nautilus_rpm_view_verify_files): + Fixed 5169 and 5170 (install and verify didn't work). + +2000-12-14 Andy Hertzfeld + + * src/nautilus-sidebar.c: (nautilus_sidebar_initialize_class), + (nautilus_sidebar_press_event), (nautilus_sidebar_release_event): + at Arlo's request, made the sidebar tabs activate on button release + instead of button press. + +2000-12-14 Martin Norbäck + + reviewed by: Darin Adler + + * po/POTFILES.in, src/nautilus-complex-search-bar.c: + Marked strings for translation and adding file to POTFILES.in + +2000-12-14 Eskil Heyn Olsen + + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_download_packages), + Set toplevel to TRUE even if not downloading, fixes 5196. + (eazel_install_do_transaction_all_files_check): + Only do interpackage file check in packages.size() > 1 + + * components/services/install/lib/eazel-install-object.c: + (eazel_install_initialize), (eazel_install_set_debug): + Set debug in packagesystem to FAIL, not VERBOSE. _set_debug raises + it to verbose. + +2000-12-14 Maciej Stachowiak + + reviewed by: Pavel Cisler + + Major boost in tree view performance, and startup/new window + performance when tree view is on. This fixes bugs 4922 (Opening + new windows is really slow when the tree view is enabled), 5149 + (http://bugzilla.eazel.com/show_bug.cgi?id=5149) and 3936 + (http://bugzilla.eazel.com/show_bug.cgi?id=3936). + + * components/tree/nautilus-tree-change-queue.c, + components/tree/nautilus-tree-change-queue.h: New files that + implement a change queue, so the tree view can defer processing + changes until idle time but still handle them in order. + * components/tree/Makefile.am: Add to build. + + * components/tree/nautilus-tree-view.c: + (nautilus_tree_view_initialize): Initialize change queue. + (nautilus_tree_view_enqueue_change), + (nautilus_tree_view_model_node_added_callback, + nautilus_tree_view_model_node_changed_callback, + nautilus_tree_view_model_node_removed_callback, + nautilus_tree_view_model_done_loading_callback): Do no real work, + just enqueue the changes and schedule the idle callback. + (reload_model_node, reload_model_node_recursive): Don't actually + update all nodes, just enqueue changes and schedule idle + callbacks. + (schedule_pending_idle_callback): Helper function to schedule an + idle callback to process the change queue. + (dequeue_pending_idle_callback): Process the head of the change + queue, and unschedule self when done (currently it will process at + most 100 changes at one go). Keep the tree frozen while doing the + changes, to minimize redraws. + (nautilus_tree_view_insert_model_node): Moved call to + notify_node_seen here from + nautilus_tree_view_model_node_added_callback. + (nautilus_tree_view_destroy): free change queue, dnd data. + + * components/tree/nautilus-tree-view-dnd.c: Prune includes. + (nautilus_tree_view_free_dnd): New function so + nautilus-tree-view.c destroy function does not need to know + internal details of tree view. + * components/tree/nautilus-tree-node.h: Removed prototypes of + nonexistent functions. + * components/tree/nautilus-tree-view.h, + components/tree/nautilus-tree-view-private.h, + components/tree/nautilus-tree-view-dnd.h: Include necessary + headers, to make these standalone, and prune unneeded headers. + +2000-12-14 Andy Hertzfeld + + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_update_icon): + fixed bug 4219, using an image to represent itself bad when image is + too small, by scaling up the image to a minimum size if necessary. + +2000-12-13 Pavel Cisler + + * libnautilus-extensions/nautilus-file-operations.c: + (build_error_string): + Translated error messages to English (with John's help). + +2000-12-13 Eskil Heyn Olsen + + reviewed by: Pavel Cisler + + This should fix 4891 and 4892 & 4454. + + * components/services/install/command-line/eazel-test-packsys.c: + (test_query), (progress_signal), (main): + Also does a test on QUERY_FLAG_REQUIRES, by checking if more then + 10 packages require glibc. + Fixed the wrong order of arguments for progress_signal. + main can now take a --debug= which sets the debug level in + the EazelPackageSystem. + + * components/services/install/lib/eazel-package-system-rpm3.h: + * components/services/install/lib/eazel-package-system-rpm3-private + .h: + * components/services/install/lib/eazel-package-system-rpm3.c: + (eazel_package_system_rpm3_get_and_set_string_tag), + (eazel_package_system_rpm3_packagedata_fill_from_header), + (eazel_package_system_rpm3_get_db), + (eazel_package_system_rpm3_query_impl), + (eazel_package_system_rpm3_query_substr), + (eazel_package_system_rpm3_query_foreach), + (eazel_package_system_rpm3_query_requires), + (eazel_package_system_rpm3_query), + (eazel_package_system_rpm3_class_initialize), + (eazel_package_system_rpm3_initialize), + (eazel_package_system_rpm3_new): + Mindnumbing amounts of boilerplate code to make query_foreach and + query_impl virtual functions which the rpm4 class can override. I + weep for gnome and it's C usage of OO and long for the good ole + days of C++. + Also made the loops more unreadable but safer (I hope). + + * components/services/install/lib/eazel-package-system-rpm4.c: + (eazel_package_system_rpm4_query_impl), + (eazel_package_system_rpm4_query_substr), + (eazel_package_system_rpm4_query_foreach), + (eazel_package_system_rpm4_class_initialize), + (eazel_package_system_rpm4_initialize): + The final juju to implement the EazelPackageSystemRpm4 class. I + will not bore you with more details. + + * components/services/install/lib/eazel-package-system.c: + (eazel_package_system_query): + assert that the key is non-null. + +2000-12-13 Maciej Stachowiak + + * components/loser/content/.cvsignore, + components/loser/sidebar/.cvsignore, + components/mozilla/.cvsignore, components/sample/.cvsignore, + libnautilus/.cvsignore, src/.cvsignore, + src/file-manager/.cvsignore: Add -ui.xml.h generated files to + .cvsignore. + +2000-12-13 Maciej Stachowiak + + * components/services/docs/directories: New file documenting the + directory layout of components/services. + + * components/services/inventory/.cvsignore, + components/services/inventory/Makefile.am, + components/services/inventory/command-line/README, + components/services/inventory/lib/.cvsignore, + components/services/inventory/lib/Makefile.am, + components/services/inventory/lib/eazel-inventory-shared.c, + components/services/inventory/lib/eazel-inventory-shared.h, + components/services/inventory/nautilus-view/.cvsignore, + components/services/inventory/nautilus-view/Makefile.am, + components/services/inventory/nautilus-view/main.c, + components/services/inventory/nautilus-view/nautilus-inventory-view.c, + components/services/inventory/nautilus-view/nautilus-inventory-view.h, + components/services/inventory/nautilus-view/nautilus-inventory-view.oafinfo: + Remove old dead inventory code. + + * components/services/login/command-line/README: Remove last file + in otherwise-empty directory. + * components/services/summary/command-line/README: Ditto. + * cut-n-paste-code/widgets/gtkclist/.cvsignore: Ditto. + +2000-12-13 Andy Hertzfeld + + * icons/Makefile.am: + * icons/i-music-12.png: + * icons/i-music-12-aa.png: + * icons/i-music-24.png: + * icons/i-music-24-aa.png: + * icons/i-music-36.png: + * icons/i-music-36-aa.png: + fixed bug 3502, music icon doesn't scale well, by adding + pre-scaled icons from Susan. + + * libnautilus-extensions/nautilus-icon-factory.c: + (nautilus_icon_factory_get_icon_name_for_regular_file): + removed evil special-case of text files; now it uses + whatever is defined in the mime-type database. + +2000-12-13 John Harper + + reviewed by: Darin Adler + + * src/file-manager/fm-properties-window.c: + (select_image_button_callback): + * src/nautilus-property-browser.c: (add_new_pattern): + * src/nautilus-theme-selector.c: (add_new_theme_button_callback): + + Added calls to gtk_window_set_transient_for for file selectors + +2000-12-13 J Shane Culpepper + + * components/services/trilobite/libtrilobite/trilobite-md5-tools.c: + + Fixing improper include. + +2000-12-13 J Shane Culpepper + + * components/services/install/lib/Makefile.am: + * components/services/install/lib/eazel-install-logic.c: + * components/services/install/lib/eazel-install-md5.c: + * components/services/install/lib/eazel-install-md5.h: + * components/services/install/lib/eazel-install-rpm-glue.c: + * components/services/install/lib/eazel-inventory-utils.c: + (add_package_info), (read_proc_info), (add_info), (add_io_info), + (add_hardware_info), (eazel_create_configuration_metafile), + (str_has_prefix): + * components/services/install/lib/eazel-inventory-utils.h: + * components/services/trilobite/libtrilobite/Makefile.am: + * components/services/trilobite/libtrilobite/trilobite-inventory-ut + ils.c: + * components/services/trilobite/libtrilobite/trilobite-inventory-ut + ils.h: + * components/services/trilobite/libtrilobite/trilobite-md5-tools.c: + (_byte_reverse), (md5_init), (md5_update), (md5_final), + (md5_transform), (md5_get_digest), (md5_get_digest_from_file), + (md5_get_digest_from_md5_string), (md5_get_string_from_md5_digest), + (main): + * components/services/trilobite/libtrilobite/trilobite-md5-tools.h: + + More inventory gymnastics. Moving the md5 utils to libtrilobite where + they belong and moving the rpm specific inventory code into libeps. + Still not hooked up to the build until I remove the hardcoded rpm + stuff. + + +2000-12-13 Darin Adler + + reviewed by: Rebecca Shulman + + Fixed bug 2155 (type-selected icon is not successfully scrolled + into view). The code was using the wrong coordinate system. + + * libnautilus-extensions/nautilus-icon-container.c: (reveal_icon): + Do the icon revealing with the + nautilus_gnome_canvas_item_get_current_canvas_bounds instead of + icon_get_bounding_box. The old code used item coordinates instead + of canvas coordinates. + (match_best_name): Added (guchar) casts to make tolower work + right, since it takes int parameters, not char. + (select_matching_name): Added (guchar) casts to make tolower work + right, since it takes int parameters, not char. + (undo_stretching): Broke out this function -- work was in-line in + key_press_event before. + (handle_typeahead): Renamed, added (guchar) casts to make isprint + work right, since it takes int parameters, not char. + (key_press_event): Use undo_stretching helper function. + (nautilus_icon_container_set_label_font_for_zoom_level): Remove + redundant NULL check. + (nautilus_icon_container_set_smooth_label_font): Ref new + font before unref'ing the old one in case they are the same. + (nautilus_icon_container_set_single_click_mode) Remove redundant + NULL check. + (nautilus_icon_container_get_is_fixed_size): Remove redundant + NULL check. + (nautilus_icon_container_set_is_fixed_size): Remove redundant + NULL check. + (check_compute_stretch), (nautilus_self_check_icon_container): + Renamed. + + * libnautilus-extensions/nautilus-string.c: + (nautilus_istr_has_prefix), (nautilus_istr_has_suffix), + (nautilus_str_capitalize): Added (guchar) casts to make tolower + and toupper work right, since it they take int parameters, not + char. Removed unnecessary checks of isupper before calling tolower + and islower before calling toupper. We did the research a while + back and discovered that broken platforms like that where toupper + can munge non-lower-case-letter characters don't really exist in + practice any more. + + * libnautilus-extensions/nautilus-file.c: (update_link), + (update_info_internal): Added FIXMEs to remind me to come back + here when I go fix bug 2044. + + * libnautilus-extensions/nautilus-gnome-extensions.c: + (nautilus_gnome_canvas_draw_pixbuf_helper), + (nautilus_gnome_canvas_draw_pixbuf_helper_alpha): Tweak + formatting. + +2000-12-13 Martin Norbäck + + reviewed by: Darin Adler + + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize): + + Added localisation of the clist titles. + +2000-12-13 John Sullivan + + reviewed by: Darin Adler (the patch; + Eli reviewed the wording change since he spotted the + problem) + + Fixed bug 3378 ("inadequate permissions" message when the + permissions were in fact adequate) + + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_denies_access_permission): + Check for supplemental group permissions also. Thanks to + Martin Norback for submitting + this patch. + + * src/nautilus-shell-ui.xml: Reworded the tip for the + "Backgrounds and Emblems" menu item to not mention the + phrase "Property Browser" + +2000-12-13 Robey Pointer + + * nautilus.spec.in: + + Fix some of the RPM descriptions and summaries so they're not + quite so wrong or vague. + + * components/services/install/lib/eazel-install-object.c: + (eazel_install_initialize): + + Don't try to open a user-specific rpmdb in slim mode. + + * components/services/install/lib/eazel-package-system.c: + (eazel_package_system_load_implementation): + * components/services/install/lib/eazel-package-system.h: + + Allow direct linking with a package system in slim mode (so that + the bootstrap installer can be built linked statically against the + rpm3 package system). + + * components/services/install/lib/makefile.staticlib.in: + + Include different parts of the package system in the slim + version. Eventually we're going to have to make this a little + more flexible to allow for building an rpm3 vs. rpm4 slim library. + + * nautilus-installer/src/Makefile.am: + * nautilus-installer/src/gtk-hackery.c: + * nautilus-installer/src/package-tree.c: + * nautilus-installer/src/installer.h: + * nautilus-installer/src/installer.c: (create_install_page), + (add_bullet_point_to_vbox), (jump_to_error_page), + (insert_info_page), (create_finish_page_good), (create_window), + (eazel_install_preflight), (eazel_installer_add_category), + (more_check_system), (draw_splash_text), (find_old_tmpdir), + (eazel_installer_initialize): + * nautilus-installer/src/link.sh: + + Move all GTK hackery into its own file (there are getting to be a + lot of these, sadly). Fix the installer to use the new package + system for now, though it will need to continue to change. Add a + new page for customizing the package tree, and temporarily make it + mandatory. + +2000-12-13 Maciej Stachowiak + + reviewed by: Pavel Cisler + + * src/nautilus-profiler.c (dump_dialog_new): Replace call to the + obsolete `nautilus_gtk_extensions_set_up_close_accelerator' with a + call to `nautilus_gtk_window_set_up_close_accelerator', so the + profile build works. + +2000-12-13 Andy Hertzfeld + + * src/nautilus-sidebar-title.c: + (nautilus_sidebar_title_background_is_default), + (nautilus_sidebar_title_select_text_color): + gave Arlo the ability to control the sidebar text color for his new + sidebar by specifying the colors in the theme file. + * icons/eazel/eazel.xml: + specified the sidebar title text colors for the eazel theme + + * src/nautilus-theme-selector.c: (make_theme_description): + fixed memory leak. + +2000-12-13 Josh Barrow + + * icons/eazel/eazel.xml: + Make it actually use them again. A bit ago, Arlo (without a + ChangeLog entry) checked in his new tabs, and accedently + checked in the old eazel.xml file. + +2000-12-13 Josh Barrow + + reviewed by: + + * nautilus.spec.in: + + Update for Eazel theme sidebar pieces + +2000-12-12 Pavel Cisler + + reviewed by: Maciej Stachowiak + + * libnautilus-extensions/nautilus-gdk-extensions.c: + (nautilus_gdk_window_bring_to_front): + Fix 5153: Make the call also handle showing iconified + windows. + + * libnautilus-extensions/nautilus-gtk-extensions.c: + (nautilus_gtk_window_present): + Remove a FIXME. + +2000-12-13 Josh Barrow + + * icons/eazel/sidebar_tab_pieces/.cvsignore: + + Make it be nick when you update. + +2000-12-13 Josh Barrow + + * configure.in: + * icons/eazel/Makefile.am: + * icons/eazel/sidebar_tab_pieces/Makefile.am: + + Make everything work nicely. + +2000-12-12 Arlo Rose + + * icons/eazel/eazel.xml: + * icons/eazel/sidebar_tab_pieces/Makefile.am: + * icons/eazel/sidebar_tab_pieces/middle-normal-normal.png: + * icons/eazel/sidebar_tab_pieces/middle-normal-prelight.png: + * icons/eazel/sidebar_tab_pieces/fill-active-prelight.png: + * icons/eazel/sidebar_tab_pieces/middle-prelight-normal.png: + * icons/eazel/sidebar_tab_pieces/fill-active.png: + * icons/eazel/sidebar_tab_pieces/right-bumper-prelight.png: + * icons/eazel/sidebar_tab_pieces/fill-empty-space.png: + * icons/eazel/sidebar_tab_pieces/right-bumper.png: + * icons/eazel/sidebar_tab_pieces/fill-prelight.png: + * icons/eazel/sidebar_tab_pieces/right-empty-space.png: + * icons/eazel/sidebar_tab_pieces/fill.png: + * icons/eazel/sidebar_tab_pieces/right-top-active-prelight.png: + * icons/eazel/sidebar_tab_pieces/left-bumper-active-prelight.png: + * icons/eazel/sidebar_tab_pieces/right-top-active.png: + * icons/eazel/sidebar_tab_pieces/left-bumper-active.png: + * icons/eazel/sidebar_tab_pieces/right-top-prelight.png: + * icons/eazel/sidebar_tab_pieces/left-bumper-prelight.png: + * icons/eazel/sidebar_tab_pieces/right-top.png: + * icons/eazel/sidebar_tab_pieces/left-bumper.png: + Added pieces for the Eazel sidebar tabs. + +2000-12-12 Eskil Olsen + + reviewed by: My imaginary friend Oskar. + + * components/services/install/lib/eazel-package-system-rpm3-private + .h: + * components/services/install/lib/eazel-package-system-rpm3.c: + (eazel_package_system_rpm3_create_dbs), + (rpm_packagedata_fill_from_file), + (eazel_package_system_rpm3_query_impl), + (eazel_package_system_rpm3_query_substr), + (eazel_package_system_rpm3_query), + (eazel_package_system_rpm3_initialize), + (eazel_package_system_rpm3_new): + + GtkObject is soo lame, whoever likes this, should surely be struck + down with OO book. + + * components/services/install/lib/eazel-package-system-rpm4.c: + (eazel_package_system_rpm4_query_impl), + (eazel_package_system_rpm4_query_foreach), + (eazel_package_system_rpm4_new): + Implemented more rpm4 query stuff. + +2000-12-12 Gene Z. Ragan + + Fixed silly bug involving the new Sound Busy dialog. + It now uses the proper routines to check the status of the + sound hardware. + + * components/music/mpg123.c: (mpg123_stop), (mpg123_seek): + * components/music/nautilus-music-view.c: (play_current_file), + (go_to_next_track), (go_to_previous_track): + +2000-12-12 Arlo Rose + + * icons/eazel/eazel.xml: + * icons/eazel/side_bar_image.png: + * icons/eazel/MakeFile.am: + Added new sidebar background to Eazel theme. + Tab will show up later. + + * icons/text-selection-frame.png: + Fixed corner radius in the selection. + The incorrect radius was due to a change in the way + the image was being rendered. + +2000-12-12 Pavel Cisler + + reviewed by: Darin Adler + + Fixed 4954 Nautilus crashes attempting to empty a .Trash + containing undeletable files + + * libnautilus-extensions/nautilus-file-operations.c: + (build_error_string), (handle_xfer_vfs_error) + Reworked the error message building logic. Split up + the routine into a part that decides what the interesting + input for building the error message is and a part that + actually builds the error message. Fixed a number + of cases where a wrong error message would be used. The + actual bug in the bug report was one of the cases -- an assert + catching a case that was not handled properly. + + Fixed: + part of -- 638 When a new volume gets mounted, integrate its Trash + directory. + part of -- 4143 Files dragged to trash icon on desktop seem to + vanish, + part of -- 4963 Files dragged to Trash from floppy don't appear + in Trash, + + * libnautilus-extensions/nautilus-trash-monitor.c: + * libnautilus-extensions/nautilus-trash-monitor.h: + (add_one_volume_trash), + (nautilus_trash_monitor_get_trash_directories): + Added a new call that returns a list of all the Trash directories + on all the mouted volumes. + + * libnautilus-extensions/nautilus-trash-directory.c: (add_volume): + Got rid of get_volume_vfs_uri_if_writable. + Used the new nautilus_volume_monitor_should_integrate_trash instead + to pick the volumes that can support trash. + + * libnautilus-extensions/nautilus-volume-monitor.c: + (nautilus_volume_monitor_should_integrate_trash), + (nautilus_volume_monitor_get_volume_mount_uri): + * libnautilus-extensions/nautilus-volume-monitor.h: + Add new helper calls used by the routine that collects all the + trash uris from all mouted volumes. + + * libnautilus-extensions/nautilus-file-operations.c: + (do_empty_trash): + Pass in a list of Trash directories instead of just the + single trash in the user's home directory. + + Fixed: + 2443 Trash is only found on EXT2 volumes + 2444 Trash on read-only volumes is not displayed + remaining part of -- 4143 Files dragged to trash icon on desktop + seem to vanish, + remaining part of -- 4963 Files dragged to Trash from floppy + don't appear in Trash, + + * libnautilus-extensions/nautilus-volume-monitor.c: + (nautilus_volume_monitor_should_integrate_trash): + Removed the old logic from get_volume_vfs_uri_if_writable + that only displayed trash from writable ext2 volumes. + Enumerated all the file system types that we know can + support trash. + +2000-12-12 Eskil Heyn Olsen + + * components/services/install/lib/eazel-package-system-private.h: + * components/services/install/lib/eazel-package-system-rpm3-private + .h: + * components/services/install/lib/eazel-package-system-rpm3.c: + (rpm_packagedata_fill_from_rpm_header), + (rpm_packagedata_fill_from_file), (rpm_packagedata_new_from_file), + (eazel_package_system_rpm3_load_package), + (eazel_package_system_rpm3_query_impl), + (eazel_package_system_rpm3_query_substr), + (eazel_package_system_rpm3_query_requires), + (eazel_package_system_rpm3_query): + * components/services/install/lib/eazel-package-system-skeleton.c: + (eazel_package_system_skeleton_query): + * components/services/install/lib/eazel-package-system-types.c: + (packagedata_new): + * components/services/install/lib/eazel-package-system-types.h: + * components/services/install/lib/eazel-package-system.c: + (eazel_package_system_load_package), (eazel_package_system_query): + * components/services/install/lib/eazel-package-system.h: + unsigned long to int replacement on various types. + +2000-12-12 Arik Devens + + reviewed by: Darin Adler + + Fixed bug 5047 ("Using spaces in the location bar label for + alignment is fragile and not necessarily internationalizable") by + adding code to usize and align the label widget to be both the + right size and proper alignment no matter what language we are in. + + * src/nautilus-location-bar.c: Added #defines for Location: and Go + To: so they only need to be translated once. + (style_set_handler): New function to set the label's usize to the + larger of the two strings plus padding so that it doesn't resize. + (nautilus_location_bar_initialize): Added gtk_misc_set_alignment + to the label widget (probably don't need it but it can't hurt) and + also hooked up the style_set_handler to the label widget. + (nautilus_location_bar_update_label): Removed comments about + fixing bug 5047. + +2000-12-12 Darin Adler + + reviewed by: John Sullivan + + Fixed bug 1948 ("Open in New Window" menu item reuses existing + window if it exists) by separating the explicit "open in new + window" feature (always gives a new window) from the "open all + items in new windows" preference (reuses window if one with the + right location already exists). + + * libnautilus/nautilus-view-component.idl: Added new + open_location_prefer_existing_window call. Renamed open_location + to open_location_in_this_window and open_location_in_new_window to + open_location_force_new_window for clarity. + + * libnautilus/nautilus-view.h: + * libnautilus/nautilus-view.c: + (nautilus_view_open_location_in_this_window), + (nautilus_view_open_location_prefer_existing_window), + (nautilus_view_open_location_force_new_window): + * src/nautilus-view-frame-corba.c: + (impl_Nautilus_ViewFrame_open_location_in_this_window), + (impl_Nautilus_ViewFrame_open_location_prefer_existing_window), + (impl_Nautilus_ViewFrame_open_location_force_new_window): + * src/nautilus-view-frame-private.h: + * src/nautilus-view-frame.c: + (nautilus_view_frame_initialize_class), + (nautilus_view_frame_open_location_in_this_window), + (nautilus_view_frame_open_location_prefer_existing_window), + (nautilus_view_frame_open_location_force_new_window): + * src/nautilus-view-frame.h: + Add new call, rename old ones. + + * src/file-manager/fm-directory-view.c: (open_callback): Pass parameter + to tell the open code to respect the "use new windows" preference. + (open_location): Take new WindowChoice parameter to respect preference + as appropriate. + (switch_location_and_view): Tell the code to respect the preference in + this case (opening from Open With). + (show_trash_callback): Use code that respects the preference instead of + always opening in this case. + (open_one_in_new_window): Always force a new window (used by Open + in New Window command). + (activate_callback): Pass through new WindowChoice instead of boolean. + (fm_directory_view_activate_file): Pass through new WindowChoice + instead of boolean., + (fm_directory_view_activate_files): Respect the user preference if + opening only one file, do the "use existing window or make new one" + mode if opening more than one. + + * src/nautilus-window-manage-views.c: (handle_unreadable_location): + Move check for empty location string in here. + (open_location): Moved the code for reusing existing windows out + of here. Also changed code structure to avoid redoing the + handle_unreadable_location check. + (open_location_in_this_window_callback): Renamed. + (open_location_prefer_existing_window_callback): Here's where + the code for reusing existing windows went. New callback for the + new call/signal. + (open_location_force_new_window_callback): Renamed. + + * src/file-manager/fm-search-list-view.c: + (reveal_selected_items_callback): Change to use + nautilus_view_open_location_force_new_window by its new name. + + * src/nautilus-window-manage-views.h: Got rid of + nautilus_window_open_location_in_new_window, which was public and + unused. + + * components/adapter/nautilus-adapter.c: + (nautilus_adapter_open_location_callback): + * components/help/hyperbola-nav-index.c: + (hyperbola_navigation_index_select_row): + * components/help/hyperbola-nav-search.c: + (hyperbola_navigation_search_select_row): + * components/help/hyperbola-nav-tree.c: + (hyperbola_navigation_tree_select_row): + * components/history/nautilus-history-view.c: + (history_button_release): + * components/mozilla/nautilus-mozilla-content-view.c: + (mozilla_open_uri_callback), (mozilla_dom_mouse_click_callback): + * components/rpmview/nautilus-rpm-view.c: (go_to_button_callback): + * components/services/login/nautilus-view/nautilus-change-password-view.c: + (run_away_timer), (authn_failed), (maintenance_button_cb): + * components/services/summary/nautilus-view/nautilus-summary-callbacks.c: + (logged_in_callback), (logged_out_callback), + (preferences_button_cb), (forgot_password_button_cb), + (register_button_cb): + * components/services/summary/nautilus-view/nautilus-summary-dialogs.c: + (error_dialog_cancel_cb): + * components/services/summary/nautilus-view/nautilus-summary-footer.c: + (footer_item_clicked_callback): + * components/services/summary/nautilus-view/nautilus-summary-view.c: + (goto_service_cb), (goto_update_cb): + * components/text/nautilus-text-view.c: (handle_service_menu_item): + * components/tree/nautilus-tree-view.c: (tree_select_row_callback): + Change to use new nautilus_view_open_location_in_this_window + name. It's better because it's more explicit, but also, it's the + new name! + + * libnautilus-extensions/nautilus-gdk-extensions.c: + (nautilus_gdk_window_bring_to_front): Fixed indentation. + + * libnautilus-extensions/nautilus-gtk-extensions.c: + (nautilus_gtk_window_present): Put in a new implementation that + uses nautilus_gdk_window_bring_to_front instead of the old one + that did a hide followed by a show. Corrected an assert that + should have been a return_if_fail. + +2000-12-12 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 2327 (Alt-key combinations to show menus work on + Desktop, but shouldn't) + + Had to abandon the old-Bonobo approach for this and make a + new-Bonobo approach. + + * src/file-manager/nautilus-desktop-icon-view-ui.xml: + Redefine all top-level menus' labels to be "" so there won't + be any underline accelerator + + * src/nautilus-desktop-window.c: (nautilus_desktop_window_new): + * src/nautilus-window-menus.c: + (remove_underline_accelerator_from_menu_title), + (nautilus_window_disable_keyboard_navigation_for_menus): + * src/nautilus-window.h: Remove the old now-useless trick to + do this. + +2000-12-12 Gene Z. Ragan + + Fixed bug 4145, Music view fails if sound device in use + Fixed bug, 4903, slider state bleeds between music views + + Changed the way that the view stects availability of sound + hardware. We now use a more just in time approach. If the + sound hardware is unavailable, a dialog is displayed with + a warning and some info about the problem. The downside + to this is that the controls always appear active. I think + this is a good tradeoff. It avoids having the controls inactive + when the sound hardware is available, as in the case of bug + 4145. + + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize), (get_song_text), + (play_current_file), (add_play_controls): + +2000-12-12 Michael Engber + + reviewed by: John Sullivan + + * src/nautilus-window-menus.c: + (nautilus_window_bookmarks_preference_changed_callback), + (nautilus_window_initialize_bookmarks_menu): + * src/nautilus-window-private.h: + * src/nautilus-window.c: (nautilus_window_destroy): + Added a preference remove callback - which fixes bug 5147. + +2000-12-12 John Sullivan + + reviewed by: Darin Adler + + Fixed a couple of places that were causing zillions of failed + assertions about hash tables on boot. + + * libnautilus-extensions/nautilus-directory-metafile.c: + (create_metafile_root): Use nautilus_directory_set_metafile_contents + instead of setting field directly. + (get_file_node): Don't futz with hashtable if its NULL. + +2000-12-12 John Sullivan + + reviewed by: Darin Adler + + While investigating bug 5147, which I couldn't reproduce, I found + and fixed a crashing bug with similar steps. + + * src/file-manager/fm-desktop-icon-view.c: + (fm_desktop_icon_view_destroy): remove preferences callback for + home_uri_changed, so we won't crash trying to execute it after the + desktop view has been destroyed. + + Fixed bug 4226 (Non-standard text field auto-selection behavior + wreaks havoc with finely tuned middle-click paste feature) + + The problem here was that I had done some automatic selection + changing on focus-in and focus-out a long time ago in an attempt + to make the behavior more usable for real copy/paste and tabbing. + Unfortunately my attempt to improve the default behavior ran afoul + of the hellish X middle-click-to-paste-selected-text feature that + is a staple of every poor X window user's life. For now, I just took + out my non-standard behaviors as they aren't clearly an overall + improvement and I hadn't even tried to deploy them across Nautilus, + much less across GTK. + + * src/file-manager/fm-properties-window.c: + (name_field_focus_in): Removed this function, which used to select + all the text in the field. + (name_field_focus_out): No longer deselects contents. + (create_basic_page): Don't connect to focus-in signal. + + * src/nautilus-bookmarks-window.c: + (on_text_field_focus_in_event): Removed this function, which used to + select all the text in the field. + (on_text_field_focus_out_event): No longer deselects contents. + (create_bookmarks_window): Don't connect to focus-in signal. + +2000-12-12 Andy Hertzfeld + + * libnautilus-extensions/nautilus-icon-factory.c: (cache_icon_new), + (load_icon_for_scaling), (scale_icon), (get_icon_from_cache), + (nautilus_icon_factory_get_pixbuf_for_icon), + (nautilus_icon_factory_get_pixbuf_for_file): + + fixed bug 4212, emblem doesn't show up when the image is a JPEG + file, by adding ".jpg" to extensions checked in the icon factory. + + Fixed bug 3208, generic icon shows up for deleted emblems, by adding + a "wants_default" parameter to the icon factory get_pixbuf_for_icon + call. If "wants_default" is false, it returns NULL instead of the + generic icon. Emblem callers pass FALSE so they don't get pixmaps + for deleted emblems. + + * libnautilus-extensions/nautilus-bookmark.c: + (nautilus_bookmark_get_pixbuf): + added boolean parameter to get_pixbuf_for_icon call + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_update_icon): + added boolean parameter to get_pixbuf_for_icon call + * libnautilus-extensions/nautilus-icon-factory.h: + added "wants_default" boolean to get_pixbuf_for_icon definition + * src/file-manager/fm-list-view.c: + (fm_list_view_get_emblem_pixbufs_for_file): + added boolean parameter to get_pixbuf_for_icon call + * src/file-manager/fm-properties-window.c: + (create_image_widget_for_emblem): + added boolean parameter to get_pixbuf_for_icon call + * src/nautilus-sidebar-title.c: (update_emblems): + added boolean parameter to get_pixbuf_for_icon call + +2000-12-12 Darin Adler + + reviewed by: Pavel Cisler + + Fixed bug 650 (moving a large number of files is extremely slow) + by using a hash table to find metafile nodes given a file name. + Fixed bug 3410 (sorting not locale-sensitive) by making + nautilus_strcoll suitable for wider use and using it a lot more. + + * libnautilus-extensions/nautilus-directory-private.h: Add a + new hash table for locating metafile nodes by file name. + + * libnautilus-extensions/nautilus-directory-metafile.h: Add + nautilus_directory_set_metafile_contents call so the metafile + code will have a crack at the metafile contents right when + they are first read in. + + * libnautilus-extensions/nautilus-directory-metafile.c: + (get_file_node): Locate the file node using the hash table, + and create a hash table entry when making a new file node. + (destroy_xml_string_key), (nautilus_directory_metafile_destroy): + Destroy the hash table when the directory is destroyed. + (nautilus_directory_rename_file_metadata): Remove the old hash + table entry and make a new one when the node's name is changed. + (nautilus_directory_set_metafile_contents): Create the hash + table and populate it when the metafile is read in. + + * libnautilus-extensions/nautilus-string.h: + * libnautilus-extensions/nautilus-string.c: (nautilus_strcoll): + Treat a locale that can't be fetched by setlocale the same as + locale "C" and "POSIX", fall back on strcmp if strcoll says two + strings are equal, so that only identical strings get a 0. + (nautilus_strcmp_compare_func): New name for nautilus_str_compare. + (nautilus_strcoll_compare_func): New function. + (nautilus_strcasecmp_compare_func): New name for nautilus_istr_compare. + + * libnautilus-extensions/nautilus-glib-extensions.h: + * libnautilus-extensions/nautilus-glib-extensions.c: + (nautilus_g_str_list_copy): Removed an unnecessary check for NULL. + (nautilus_g_str_list_alphabetize): Replaced the old sort calls + with this single call. It sorts in a locale-sensitive way, using + nautilus_strcoll. + + * libnautilus-extensions/nautilus-file.c: (compare_by_name), + (compare_by_directory_name), (compare_by_emblems), + (compare_by_type), (nautilus_file_compare_name): Use + nautilus_strcoll instead of nautilus_strcmp_case_breaks_ties so we + use local sorting conventions in locales other than "C" and + "POSIX". + (nautilus_get_user_names), (nautilus_get_group_names_including): + (sort_keyword_list_and_remove_duplicates): Use the new + nautilus_g_str_list_alphabetize to sort by locale-specific + conventions. + + * libnautilus-extensions/nautilus-icon-container.c: + (compare_icons_by_name): Use nautilus_strcoll instead of + nautilus_strcmp_case_breaks_ties so we use local sorting + conventions in locales other than "C" and "POSIX". + + * src/file-manager/fm-properties-window.c: (get_property_names): + Use the new nautilus_g_str_list_alphabetize + * src/nautilus-window-manage-views.c: (change_selection): Use the + new nautilus_g_str_list_alphabetize + * src/nautilus-window.c: (load_view_as_menu_callback): Use the new + nautilus_g_str_list_alphabetize + + * libnautilus-extensions/nautilus-directory-async.c: + (metafile_read_done_callback), + (nautilus_directory_set_up_request): Use nautilus_str_compare + under its new name, nautilus_strcmp_compare_func. + + * components/services/install/command-line/.cvsignore: Added + eazel-test-types, a new generated file. + + * libnautilus-extensions/nautilus-string-list.c: + (nautilus_string_list_new): Use nautilus_str_compare and + nautilus_istr_compare under their new names, + nautilus_strcmp_compare_func and nautilus_strcasecmp_compare_func. + + * libnautilus-extensions/nautilus-xml-extensions.c: + (nautilus_xml_get_child_by_name): Fixed indenting. + +2000-12-12 Gene Z. Ragan + + Fixed bug 4901, Music view displays "()" when MP3 lacks + Year tag + + * components/music/nautilus-music-view.c: (get_song_text), + (read_id_tag): + Don't display Year parentheses if year tad is absent or empty + + * components/music/mpg123.c: (mpg123_id3v1_to_id3v2): + * components/music/mpg123.h: + More cleanup to support ID3v2 tags. This fixes breakage + in displaying ID3v1 track numbers. + +2000-12-12 Maciej Stachowiak + + reviewed by: Pavel Cisler + + Improve New Window performance when the tree view is enabled, to + partially address bug 4922 (Opening new windows is really slow + when the tree view is enabled). This affects only the New Window + case, not the initial window. Here's some timings before and after + on my laptop with a bunch of stuff expanded (times in seconds): + + First window New window + Tree View Off 8 5 + w/ Tree Before My Change 16 37 + w/ Tree After My Change 16 20 + + I made this change by altering tree view semantics slightly. The + tree view used to do a force reload any time it expanded a + directory. Now it does a normal load the first time any given + directory is expanded (as at startup, or when you first expand the + node), but a force reload on subsequent collapse and + expansion. This is more in line with the way the rest of Nautilus + works. + + * components/tree/nautilus-tree-expansion-state.h, + components/tree/nautilus-tree-expansion-state.c: + (nautilus_tree_expansion_state_was_ever_expanded): New function to + see if a node was ever expanded. Being initially expanded does not + count; only being expanded through an API call to + `nautilus_tree_expansion_state_expand_node' does. + (nautilus_tree_expansion_state_load_foreach_callback, + nautilus_tree_expansion_state_initialize, + nautilus_tree_expansion_state_destroy, + nautilus_tree_expansion_state_expand_node_internal, + nautilus_tree_expansion_state_expand_node): Adjusted to track + "was_ever_expanded" property right. + + * components/tree/nautilus-tree-model.h, + components/tree/nautilus-tree-model.c + (nautilus_tree_model_monitor_node): Add force_reload parameter. + (nautilus_tree_model_node_begin_monitoring_no_connect): New helper + function. + (nautilus_tree_model_node_begin_monitoring, + nautilus_tree_model_node_end_monitoring): Slightly adjusted helper + functions. + + * components/tree/nautilus-tree-view.c: + (filtering_changed_callback): Do a reload of the whole tree, but + not a force reload. + (expand_uri_sequence_and_select_end): Simplify logic a bit. + (expand_node_for_file): Force reload only if this node has been + expanded before. + (reload_model_node, reload_model_node_recursive, + reload_whole_tree): Make force reload an option. + +2000-12-12 Maciej Stachowiak + + reviewed by: Pavel Cisler + + Fix an infinite loop problem that my last change caused: + + * libnautilus-extensions/nautilus-directory-async.c: + (activation_uri_read_done): Remove setting of + activation_uri_is_up_to_date to TRUE + (activation_uri_done): and move it here, because this function + gets called directly for files that are not nautilus or gmc links, + as well as being called from activation_uri_done. + + * components/services/install/command-line/.cvsignore: Add + eazel-softcat + +2000-12-11 Eskil Heyn Olsen + + * components/services/install/lib/Makefile.am: + Stupid stupid stupid mistake in the conditionals. + +2000-12-11 Andy Hertzfeld + + * src/file-manager/fm-directory-view.c: (activate_callback): + fixed bug 2390, uri-activating security hole, by following + Frank's recommendation, which is to not allow any parameters + to the launch command, which is enforced by using execlp + instead of system. + +2000-12-11 Eskil Heyn Olsen + + Not reviewed, I have no buddies... + + * components/services/install/lib/Makefile.am: + * configure.in: + automake conditionals are a complete joke. + +2000-12-11 Eskil Heyn Olsen + + * components/services/install/lib/eazel-package-system-rpm3-private + .h: + * components/services/install/lib/eazel-package-system-rpm3.c: + (eazel_package_system_rpm3_query): + Fixed the types, now back to automakes lack of conditionals... + +2000-12-11 Eskil Heyn Olsen + + * components/services/install/lib/Makefile.am: + automake conditionals are figments of your imagination. + + * configure.in: + More rpmcheck voodoo, might even make this compile on rh62 agains. + +2000-12-11 Maciej Stachowiak + + reviewed by: Pavel Cisler + + Fix bug 4919 (Tree view crashes when you expand and collapse the + root node). I did this by changing the design of file attribute + forgetting, which I implemented recently - now when you forget an + attribute, it is merely marked out of date, not thrown away; the + old value is still available until the fresh value is actually + loaded. This fixes other potential UI problems with the old + approach but I am not sure if bugs were filed for those. + + * libnautilus-extensions/nautilus-file-private.h: Added new + is_up_to_date booleans, converted all booleans and the + RequestStatus enum to bitfields. This saved 200-300k or so for me + on runs of Nautilus with the tree view on and expanded a lot. + + * libnautilus-extensions/nautilus-file.h, + libnautilus-extensions/nautilus-file.c: + (nautilus_file_invalidate_attributes_internal, + nautilus_file_invalidate_attributes, + nautilus_file_invalidate_all_attributes): Renamed to match new + semantics. + (update_info_internal): Mark file info up to date. + (invalidate_directory_count), (invalidate_deep_counts), + (invalidate_mime_list), (invalidate_top_left_text), + (invalidate_file_info), (invalidate_activation_uri): renamed from + forget_*, and changed to only mark the attributes invalid, not + actually throw them out. + + * libnautilus-extensions/nautilus-directory-async.c: + (lacks_directory_count, lacks_top_left, lacks_info, + lacks_mime_list, lacks_activation_uri): Check _is_up_to_date bit + for relevant attribute, not got_ or _failed bits. If the info is + out of date, we want to retry eve if we already got it or it + already failed. + (directory_count_callback, mime_list_callback, + top_left_read_callback, get_info_callback, + activation_uri_read_done): Mark corresponding attributes up to + date. + (dequeue_pending_idle_callback): Mark directory_count and + mime_list up to date if appropriate. + (file_info_start): Mark file info up to date on invalid URI error. + (nautilus_directory_invalidate_counts): Mark directory count and + mime list out of date, but do not forget them. + + (nautilus_directory_invalidate_file_attributes): Renamed. + (nautilus_directory_force_reload): Deal with rename. + (cancel_loading_attributes, + nautilus_directory_cancel_loading_file_attributes): Replace forget + with invalidate in some comments. + + * libnautilus-extensions/nautilus-link.c + (forget_file_activation_uri): Handle function renames. + * src/nautilus-window-manage-views.c + (nautilus_window_begin_location_change): Likewise + +2000-12-11 Eskil Olsen + + * components/services/install/lib/eazel-package-system-rpm3-private + .h: + * components/services/install/lib/eazel-package-system-rpm3.h: + * components/services/install/lib/eazel-package-system-rpm3.c: + (make_rpm_argument_list), (eazel_package_system_rpm3_create_dbs), + (rpm_open_db), (eazel_package_system_rpm3_open_dbs), + (eazel_package_system_rpm3_close_dbs), + (eazel_package_system_rpm3_free_dbs), + (eazel_package_system_rpm3_query_impl), + (eazel_package_system_rpm3_query_substr), + (eazel_package_system_rpm3_query_requires), + (eazel_package_system_rpm3_query), + (eazel_package_system_rpm3_finalize), + (eazel_package_system_rpm3_initialize), + (eazel_package_system_rpm3_new): + Created a private part for EazelPackageSystemRpm3 + + * components/services/install/lib/eazel-install-rpm-glue.c: + (eazel_install_do_rpm_dependency_check): + Fondle the private parts of EazelPackageSystemRpm3 (eew, + can't wait to get rid of this code). + + * components/services/install/lib/eazel-package-system-rpm4.h: + * components/services/install/lib/eazel-package-system-rpm4.c: + (eazel_package_system_rpm4_query_foreach), + (eazel_package_system_rpm4_finalize), + (eazel_package_system_rpm4_initialize), + (eazel_package_system_rpm4_new), + (eazel_package_system_implementation): + Began hacking on the missing RPM4 pieces. + +2000-12-11 Gene Z. Ragan + + Fixed bug 4900, Nautilus doesn't support ID3 v2.x tags + + * components/music/mpg123.c: + * components/music/mpg123.h: + * components/music/nautilus-music-view.c: (read_id_tag): + Add support for both v1 and v2 ID3 tags. + +2000-12-11 Eskil Heyn Olsen + + * README: + Blabla about rpm 4 on redhat 7.0 + + * configure.in: + * nautilus.spec.in: + configure now carves the rpm version found into the spec file as a + requirement. + +2000-12-11 Mike Fleming + + * components/mozilla/main.c: (main): + * src/nautilus-window-service-ui.c: (goto_online_storage), + (goto_software_catalog): + + bugzilla.eazel.com 5035 + + removed ammonite_shutdown call, ammonite_init is now resiliant + to multiple calls and registers an atexit function. + +2000-12-11 Gene Z. Ragan + + reviewed by: Pavel Cisler + + Fixed bug 3818, Sorting of album is case insensitive + + * libnautilus-extensions/nautilus-string.c: + * libnautilus-extensions/nautilus-string.h: + (nautilus_strcmp_case_breaks_ties), (nautilus_strcoll): + New function that wraps strcoll. It checks the locale and if it is + specific, uses strcoll. If the locale is generic "C" or "POSIX", + sorting is done using nautilus_strcmp_case_breaks_ties. + + + Fixed bug 5126, Press "Pause" and "Play", music view returns + to start of track. + + * components/music/nautilus-music-view.c: (selection_callback), + (value_changed_callback), (sort_by_title), (sort_by_artist), + (sort_by_year), (play_button_callback), (pause_button_callback), + (get_player_state): + Some state machine logic cleanup to fix bug 5216. + +2000-12-11 John Sullivan + + reviewed by: Maciej Stachowiak + + Fixed bug 4820 (default Nautilus window too narrow; web + pages look bad) + + * src/nautilus-window-private.h: Changed + NAUTILUS_WINDOW_DEFAULT_WIDTH from 700 to 800. Read the + bug report for some of the rationale discussion. + +2000-12-11 Michael Engber + + * libnautilus-extensions/nautilus-background.c: + (nautilus_background_set_image_placement_no_emit), + (nautilus_background_set_image_placement), + (nautilus_background_receive_dropped_background_image): + * libnautilus-extensions/nautilus-directory-background.c: + (nautilus_file_background_get_default_settings), + (nautilus_file_background_write_desktop_settings): + Fixed dragging a new background image onto the dekstop + so that it; writes out the new color (white) instead of + leaving the old, wrong, color setting; sets the image + placement to tiled, since all Nautilus images are + currently meant to be tiled. Bugs 3477 & 3022. + +2000-12-11 Eskil Heyn Olsen + + reviewed by: A donkey with a rather large shrubbery + + * components/rpmview/Makefile.am: + * components/rpmview/nautilus-rpm-verify-window.c: + (nautilus_rpm_verify_window_update_message): + * components/services/install/command-line/Makefile.am: + * components/services/install/command-line/eazel-test-packsys.c: + (main): + * components/services/install/lib/Makefile.am: + * components/services/install/lib/eazel-install-rpm-glue.c: + * components/services/install/lib/eazel-package-system-rpm3.c: + (rpm_create_db), (eazel_package_system_rpm3_query): + * components/services/install/lib/eazel-package-system-rpm4.c: + (eazel_package_system_rpm4_finalize), + (eazel_package_system_rpm4_new): + * components/services/install/lib/eazel-package-system-types.c: + (packagedata_list_prune): + * components/services/install/lib/eazel-package-system.c: + (eazel_package_system_load_implementation): + * components/services/install/nautilus-view/Makefile.am: + * components/services/install/server/Makefile.am: + Muy untested RedHat 7.0/RPM4 related stuff. Let's watcht the build + blow up. + + * acconfig.h: + HAVE_RPM_x0 for different rpm.s + + * configure.in: + More weird rpm checks + + * nautilus.spec.in + No more libeazelsoftcat + +2000-12-11 Darin Adler + + reviewed by: John Sullivan + + Fixed bug 5112 (Segfault on startup using non C locale). The error + was caused by localized text making it through bonobo to + gnome-xml, which only happened because we were using an incorrect + attribute name. + + * libnautilus-extensions/nautilus-bonobo-extensions.c: + * libnautilus-extensions/nautilus-bonobo-extensions.h: + Removed nautilus_bonobo_set_description because there is no + attribute named "description" any more. It's now "tip". + + * src/file-manager/fm-directory-view.c: (real_update_menus): + Use set_tip instead of set_description. + + Another cut at the placeholder changes. I caught one problem and + John caught some others when he reviewed my last check-in. + + * src/file-manager/nautilus-directory-view-ui.xml: + * src/file-manager/nautilus-icon-view-ui.xml: + * src/nautilus-service-ui.xml: + Removed some "delimit" and added others. Only the file that + actually defines a placeholder should use a delimit, and you must + always use a delimit when defining the placeholder. + +2000-12-11 J Shane Culpepper + + reviewed by: + + * components/services/install/lib/Makefile.am: + + Minor Makefile fix for Eskil. + +2000-12-11 Darin Adler + + * src/file-manager/nautilus-directory-view-ui.xml: + * src/file-manager/nautilus-icon-view-ui.xml: + * src/nautilus-service-ui.xml: + * src/nautilus-shell-ui.xml: + Changed all placeholders that are not supposed to be "transparent" + to use an explict 'delimit="none"' to make it clear to the bonobo + merging code that they are not transparent. This subtle rule about + the 2 different kinds of placeholder resulted in a number of bugs + that were then "fixed" by a Bonobo change that was then rolled out. + +2000-12-11 John Sullivan + + * icons/arlo/arlo.xml: I broke the Arlo theme with my earlier + checkin by changing references to ./backgrounds to ./patterns; + this changes them back. ./backgrounds is a directory inside the + Arlo theme folder, whose name has not been changed. + +2000-12-11 Gene Z. Ragan + + Fixed bug 3767, Click through MP3s, multiple MP3s often selected + Fixed bug 2263, Scroll in music view, text redrawn on top + of self + + Both of these bugs are caused by a bug in GtkCList. There + is a case where the gcs are set to invalid. I work around + this by queueing redraws when a new item is selected and + when the adjustment is changed during scrolling. + + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize), (selection_callback), + (value_changed_callback): + +2000-12-11 John Sullivan + + reviewed by: Darin Adler + + Terminology change -- the window & menu item formerly known + as "Customization" are now known as "Backgrounds and Emblems"; + the swatches of image formerly known as "backgrounds" are + now known as "patterns". + + After 1.0 if this window acquires more varied content we will + have to redo the menu item & window label, though we will + continue to distinguish between "backgrounds" and "patterns", + since "backgrounds" encompasses colors as well as images. + + Note that this change will only appear in full (and your + "Backgrounds and Emblems" window work in full) after you've + deleted your ~/.nautilus directory and let Nautilus make you + a new one. + + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: + (file_opened_callback): Set vfs_handle to NULL on failure. + (load_done): Don't try to close pixbuf loader if it's NULL. + These two bugs were flushed out by a temporary state on my + machine where the theme was using a non-existent file for + its background image. + + * data/backgrounds/Makefile.am: removed this file, as well as + all the image files in this directory. + + * data/patterns/.cvsignore: + * data/patterns/Makefile.am: New files, copied from data/backgrounds. + Also copied over all image files from data/backgrounds, which is now + obsolete. + + * data/Makefile.am: Changed "backgrounds" subdir to "patterns" + + * configure.in: changed data/backgrounds/Makefile to + data/patterns/Makefile + + * nautilus.spec.in: Changed regular expressions with "backgrounds" + to use "patterns" + + * data/browser.xml: Changed "background" to "pattern" in the + terminology in this file, which gets installed into ~/.nautilus. + You have to remove your ~/.nautilus to get a fresh one of these; + without doing so the "Backgrounds and Emblems" window will be + confused (won't crash, will use wrong terminology and sometimes + have blank content). + + * icons/ardmore/ardmore.xml: + * icons/arlo/arlo.xml: + * icons/default.xml: + * icons/eazel/eazel.xml: + * icons/gnome/gnome.xml: + * icons/vector/vector.xml: + * icons/villanova/villanova.xml: Changed "backgrounds" directory + references to "patterns" + + * libnautilus-extensions/nautilus-customization-data.h: + * libnautilus-extensions/nautilus-customization-data.c: + (nautilus_customization_data_new), + (nautilus_customization_data_get_next_element_for_display), + (nautilus_customization_data_destroy), + (nautilus_customization_make_pattern_chit): Change "background" to + "pattern" in many places, including one public function name. + + * src/nautilus-property-browser.c: + (nautilus_property_browser_initialize), + (nautilus_property_browser_drag_data_get), (make_drag_image), + (make_color_drag_image), (remove_pattern), (remove_emblem), + (nautilus_property_browser_remove_element), + (add_pattern_to_browser), (add_new_pattern), + (add_new_button_callback), (element_clicked_callback), + (make_properties_from_directories), (add_reset_property), + (nautilus_property_browser_update_contents), + (nautilus_property_browser_set_category): Change "background" to + "pattern" in many places. Also change window title from + "Customization Options" to "Backgrounds and Emblems". + + * src/nautilus-shell-ui.xml: Change "Customization..." to + "Backgrounds and Emblems...". + + * test/test-nautilus-background.c: (main): + * test/test-nautilus-font.c: (create_named_background): + * test/test-nautilus-label.c: + (widget_set_nautilus_background_image): Changed test code that was + using sample images from backgrounds directory to look in patterns + directory instead. + +2000-12-11 Gene Z. Ragan + + Fixed bug 2242, fstat /etc/mtab to check if needs + to reread (for speed) + + I now use a read of /proc/mounts. This is not only faster, but + it avoids a read to disk thus saving power for portable users. + + * libnautilus-extensions/nautilus-volume-monitor.c: (find_volumes): + +2000-12-11 Ramiro Estrugo + + * README: + Move us to use gconf from a stable branch (gconf-1-0). + +2000-12-10 Eskil Heyn Olsen + + * components/rpmview/Makefile.am: + * components/rpmview/nautilus-rpm-verify-window.c: + (nautilus_rpm_verify_window_initialize), + (nautilus_rpm_verify_window_set_message), + (nautilus_rpm_verify_window_update_message), + (nautilus_rpm_verify_window_set_progress), + (nautilus_rpm_verify_window_set_error_mode): + * components/rpmview/nautilus-rpm-verify-window.h: + * components/rpmview/nautilus-rpm-view-install.c: + (nautilus_rpm_view_install_package_callback), + (nautilus_rpm_view_uninstall_package_callback): + * components/rpmview/nautilus-rpm-view-private.h: + * components/rpmview/nautilus-rpm-view.c: + (nautilus_rpm_view_initialize), (nautilus_rpm_view_destroy), + (add_to_clist), (nautilus_rpm_view_update_from_uri), + (verify_failed_signal), (verify_progress_signal), + (nautilus_rpm_view_verify_files), + (nautilus_rpm_view_verify_package_callback): + Fixed bug 5119, update rpmview to use EazelPackageSystem. I + still need to hook up the continue signal from the verifywindow, + this is opened as bug 5123. + + * components/services/install/command-line/Makefile.am: + * components/services/install/command-line/eazel-alt-install-corba. + c: + include eazel-package-system-types instead of + eazel-install-types.h + + * components/services/install/command-line/eazel-test-packsys.c: + (progress_signal), (failed_signal), (test_verify), (main): + Implemented the test for verfiy. + + * components/services/install/lib/Makefile.am: + Mangled to fix 5121. + + * components/services/install/lib/eazel-softcat.h: + * components/services/install/lib/eazel-install-tests.h: + * components/services/install/lib/eazel-install-xml-package-list.h: + * components/services/install/lib/eazel-install-protocols.h: + * components/services/install/lib/eazel-install-public.h: + * components/services/install/lib/eazel-install-query.h: + * components/services/install/lib/eazel-install-logic.h: + * components/services/install/lib/eazel-install-metadata.h: + * components/services/install/lib/eazel-install-object.c: + * components/services/install/lib/eazel-install-problem.h: + * components/services/install/lib/eazel-install-corba-callback.h: + * components/services/install/lib/eazel-install-corba-types.h: + include eazel-package-system-types instead of + eazel-install-types.h + + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_download_packages), + (eazel_install_check_for_file_conflicts), + (eazel_install_start_signal), (eazel_install_end_signal), + (eazel_install_progress_signal), + (eazel_install_check_existing_packages), + (eazel_uninstall_upward_traverse), + (eazel_uninstall_downward_traverse), + (eazel_uninstall_check_for_install): + Fixed signals and use FILL_NO_DIRS_IN_PROVIDES + + * components/services/install/lib/eazel-install-protocols.c: + (gnome_vfs_fetch_remote_file), (eazel_install_fetch_package): + Use FILL_NO_DIRS_IN_PROVIDES + + * components/services/install/lib/eazel-install-rpm-glue.h: + * components/services/install/lib/eazel-install-rpm-glue.c: + (eazel_install_do_rpm_dependency_check): + include eazel-package-system-types instead of + eazel-install-types.h + Also open/close the db when doing the rpmdepCheck call. + + * components/services/install/lib/eazel-install-types.c: + * components/services/install/lib/eazel-install-types.h: + Removed + + * components/services/install/lib/eazel-package-system.h: + * components/services/install/lib/eazel-package-system-private.h: + * components/services/install/lib/eazel-package-system.c: + (eazel_package_system_load_implementation), + (eazel_package_system_verify), + (eazel_package_system_emit_progress): + * components/services/install/lib/eazel-package-system-rpm3-private + .h: + * components/services/install/lib/eazel-package-system-rpm3.c: + (monitor_rpm_process_pipe), (eazel_package_system_rpm3_create_dbs), + (eazel_package_system_rpm3_open_dbs), + (eazel_package_system_rpm3_close_dbs), + (eazel_package_system_rpm3_free_dbs), + (rpm_packagedata_fill_from_rpm_header), + (rpm_packagedata_fill_from_file), (rpm_packagedata_new_from_file), + (eazel_package_system_rpm3_load_package), + (eazel_package_system_rpm3_query_impl), + (eazel_package_system_rpm3_query_substr), + (eazel_package_system_rpm3_query), (check_if_all_packages_seen), + (eazel_package_system_rpm3_install_uninstall), + (eazel_package_system_rpm3_verify_impl), + (get_num_of_files_in_packages), (eazel_package_system_rpm3_verify), + (eazel_package_system_rpm3_finalize), + (eazel_package_system_rpm3_new), + (eazel_package_system_implementation): + * components/services/install/lib/eazel-package-system-rpm4.c: + (eazel_package_system_rpm4_query), + (eazel_package_system_rpm4_finalize), + (eazel_package_system_rpm4_class_initialize), + (eazel_package_system_rpm4_initialize), + (eazel_package_system_rpm4_get_type), + (eazel_package_system_rpm4_new), + (eazel_package_system_implementation): + * components/services/install/lib/eazel-package-system-rpm4.h: + * components/services/install/lib/eazel-package-system-skeleton.c: + (eazel_package_system_skeleton_verify): + Shuffled the order of the info longs and the package in the + progress signal. + Implemented verify in rpm3 (fixes bug 5120) + First pieces of code for the rpm4 module. + Unfortunately, since rpmview now also has a eazelpackagesystem + object, I ran into the problem of database locking. The rpmview + would have a read-only version of all the db files, thereby + failing in install because trilobite-eazel-install-service spawned + a rpm that could not get exclusive lock. To fix this, I now have + the db closed at all times, but open/close it everytime I do + something. Unfortunately for the queryloops in + eazel-install-logic, this means opening/closing on every + query. Optionally, I should consider exposing + eazel_package_system_open/close_dbs, so the caller can do it. But + that makes the api a bit more cumbersome. + + * components/services/install/lib/eazel-package-system-types.h: + * components/services/install/lib/eazel-package-system-types.c: + (eazel_install_protocol_as_string), (categorydata_new), + (categorydata_list_copy), (categorydata_copy), + (categorydata_destroy_foreach), (categorydata_destroy), + (categorydata_list_destroy), (packagedata_new), + (packagedata_list_copy), (packagedata_copy), + (packagedata_fill_in_missing), (packagedata_destroy), + (packagedata_remove_soft_dep), (rpmfilename_from_packagedata), + (rpmname_from_packagedata), (packagedata_get_readable_name), + (packagedata_get_name), (packagedata_hash_equal), + (packagedata_status_enum_to_str), (packagedata_status_str_to_enum), + (packagedata_modstatus_enum_to_str), + (packagedata_modstatus_str_to_enum), (packagedata_add_pack_to), + (packagedata_add_pack_to_breaks), + (packagedata_add_pack_to_soft_depends), + (packagedata_add_pack_to_hard_depends), + (packagedata_add_pack_to_modifies), (packagedata_list_prune), + (packagerequirement_new), + (eazel_install_package_provides_basename_compare), + (eazel_install_package_provides_compare), + (eazel_install_package_name_compare), + (eazel_install_package_compare), + (eazel_install_requirement_dep_compare), + (eazel_install_requirement_dep_name_compare), + (eazel_install_package_version_compare), + (eazel_install_package_other_version_compare), + (eazel_install_package_matches_versioning), + (eazel_install_gtk_marshal_NONE__POINTER_INT_INT_INT_INT_INT_INT), + (gstr_indent), (dump_package_list), (packagedata_dump_int), + (packagedata_dump): + Renamed eazel-install-types to eazel-package-system-types + + * components/services/install/nautilus-view/Makefile.am: + Fixed linking after fix to 5121. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.h: + include eazel-package-system-types instead of + eazel-install-types.h + + * components/services/install/server/Makefile.am: + Fixed linking after fix to 5121. + + * components/services/trilobite/libtrilobite/trilobite-root-helper. + c: (eazel_helper_start): + Don't mention the info msg's from userhelper. + + * po/POTFILES.in: + Renamed eazel-install-types to eazel-package-system-types. + +2000-12-10 J Shane Culpepper + + * components/services/summary/nautilus-view/Makefile.am: + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.c: (service_tab_selected_callback), + (updates_tab_selected_callback): + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.h: + * components/services/summary/nautilus-view/nautilus-summary-footer + .c: (footer_item_clicked_callback): + * components/services/summary/nautilus-view/nautilus-summary-footer + .h: + * components/services/summary/nautilus-view/nautilus-summary-view.c + : + + More minor cleaning to make the summary view more managable. + +2000-12-09 Andy Hertzfeld + + * src/file-manager/fm-properties-window.c: (create_basic_page), + (create_properties_window), (ensure_uri_is_image), + (set_custom_image), (select_image_button_callback), + (remove_image_button_callback): + fixed bug 2167, no way to add custom icons for files without a viewer, + by adding buttons for adding and removing custom icons to the + properties window. + +2000-12-09 J Shane Culpepper + + * components/services/summary/nautilus-view/Makefile.am: + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.c: (authn_cb_succeeded), (authn_cb_failed), (login_button_cb), + (logout_button_cb), (logged_in_callback), (logged_out_callback), + (preferences_button_cb), (forgot_password_button_cb), + (register_button_cb): + * components/services/summary/nautilus-view/nautilus-summary-callba + cks.h: + * components/services/summary/nautilus-view/nautilus-summary-dialog + s.c: (generate_error_dialog), (generate_login_dialog), + (widget_set_nautilus_background_color), (error_dialog_cancel_cb), + (get_window_from_summary_view), (set_dialog_parent), + (name_or_password_field_activated): + * components/services/summary/nautilus-view/nautilus-summary-dialog + s.h: + * components/services/summary/nautilus-view/nautilus-summary-menu-i + tems.c: (update_menu_items), (merge_bonobo_menu_items), + (bonobo_register_callback), (bonobo_login_callback), + (bonobo_logout_callback), (bonobo_preferences_callback): + * components/services/summary/nautilus-view/nautilus-summary-menu-i + tems.h: + * components/services/summary/nautilus-view/nautilus-summary-view-p + rivate.h: + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (updates_tab_selected_callback): + + Breaking the summary view up into separate files. It was getting + way to monolithic. Still needs more cleanup from the rewrite before + pr2 but much more managable now. Getting it ready for inventory + additions. + +2000-12-08 Gene Z. Ragan + + Fixed bug 5102, Changing to or from Music View advances song in + second window. + + * components/music/nautilus-music-view.c: (stop_playing_file): + Only stop playback if playback is occurring. Otherwise + esd get's confused and temporarily halts playback causeing + the status callback to advnace the song counter in any music + view that is playing. + +2000-12-08 Andy Hertzfeld + + * src/nautilus-sidebar-title.c: (update_emblems): + fixed crash at launch revealed by recent changes by not trying to + update the emblems in the sidebar if we don't have a + file object yet. + +2000-12-08 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 5029 (File count in sidebar might not match displayed + search results list due to filtering) + + * libnautilus-extensions/nautilus-search-uri.h: + * libnautilus-extensions/nautilus-search-uri.c: + (nautilus_get_target_uri_from_search_result_name): + New function to extract the sooper-secretly encoded + actual search result URI from the search result "file name". + + * libnautilus-extensions/nautilus-directory-async.c: + (should_display_file_name): New helper function that users + user preferences to determine whether a file should be + displayed, based only on its name. + (filter_search_uri): New filter function used on search + results + (get_file_count_filter) New function, result depends on + whether directory is a search directory. + (start_monitoring_file_list): Use get_file_count_filter. + + * src/file-manager/fm-search-list-view.c: (real_add_file): + Use nautilus_get_target_uri_from_search_result_name instead + of spreading out the sooper secret knowledge. + + + Fixed bug 5014 (Control-w should close the properties dialog) + + I made Control-w close a bunch o' windows without menus. + + * libnautilus-extensions/nautilus-gtk-extensions.h: + * libnautilus-extensions/nautilus-gtk-extensions.c: + (handle_standard_close_accelerator): New helper function, + closes the window if the key was the close accelerator. + (nautilus_gtk_window_event_is_close_accelerator): New public + function, checks whether a key event is the close accelerator. + (nautilus_gtk_window_set_up_close_accelerator): New public + function, one-stop shopping for most clients that want to + have Control-w close a window. + + * libnautilus-extensions/nautilus-preferences-dialog.c: + (nautilus_preferences_dialog_construct): + * src/file-manager/fm-icon-text-window.c: + (create_icon_text_window): + * src/nautilus-about.c: (nautilus_about_initialize): + * src/nautilus-profiler.c: (dump_dialog_new): + * src/nautilus-theme-selector.c: + (nautilus_theme_selector_initialize): + * src/file-manager/fm-properties-window.c: + (fm_properties_window_initialize): + Simple cases, just use nautilus_gtk_window_set_up_close_accelerator + so Control-w closes window. + + * src/nautilus-bookmarks-window.c: + (save_geometry_and_hide): New helper function, saves geometry + before hiding window. + (on_window_delete_event): Call save_geometry_and_hide; move + other code into hide event handler since it should happen on + every hide. + (restore_geometry): Idle function to restore geometry after + window is hidden (sounds strange, but that's the way it works). + (on_window_hide_event): Do the every-hide work formerly done + in delete_event handler; call restore_geometry at idle time + because it must be called after window is hidden to work right. + (on_window_destroy_event): remove idle handler in this case + (only happens when Nautilus is exiting). + (handle_close_accelerator), (set_up_close_accelerator): + Similar to nautilus_gtk_window_ versions of these functions, + but also handle saving the geometry before hiding. + (create_bookmarks_window): Call set_up_close_accelerator; + wire up "hide" and "destroy" events. + + * src/nautilus-property-browser.c: + (nautilus_property_browser_delete_event_callback), + (nautilus_property_browser_hide_callback): Move code that + should run on "hide" from "delete_event" handler to "hide" + handler; this didn't matter before when clicking was the only + way to close the window. + (nautilus_property_browser_initialize): Wire up "hide" handler; + call nautilus_gtk_window_set_up_close_accelerator. + +2000-12-08 Pavel Cisler + + reviewed by: Gene Z. Ragan + + Fixed 5074: Should give a NULL description in cases where the mime + type isn't known. + + * libnautilus-extensions/nautilus-file.c: (get_description): + It is now an error for a MIME type to ever be NULL. Added an assert, + removed a special case code for handling directories even when + we do not know the mime type. + + Fixed 5073: old code to give type "program" for some files (unkown + MIME type) is not triggering any more. + + * libnautilus-extensions/nautilus-file.c: (get_description): + Changed the check that looked for an empty MIME string to a + compare for a MIME type of "application/octet-stream". + + Fixed 5021: Create Link in View as List -> Nautilus Crashes. + + * src/file-manager/fm-directory-view.c: + (fm_directory_view_create_links_for_files): + This was just a broken assert that didn't cover the case of an + empty drop point list. + + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_get_mime_type): + * libnautilus-extensions/nautilus-mime-actions.c: + (is_known_mime_type): + Use a symbolic name for "application/octet-stream". + +2000-12-08 Darin Adler + + reviewed by: John Sullivan + + Fixed bug 2244 (trash window sidebar should have trash icon). + + * libnautilus-extensions/nautilus-icon-factory.c: + (nautilus_icon_factory_get_icon_name_for_directory): Added code to + give the trash its own icon. + (nautilus_icon_factory_get_icon_for_file): Rearranged to simplify + it a bit. + + * libnautilus-extensions/Makefile.am: + * libnautilus-extensions/nautilus-trash-monitor.h: + * libnautilus-extensions/nautilus-trash-monitor.c: + Moved trash monitor to here. + (nautilus_trash_files_changed_callback): Do nautilus_file_changed + on the trash NautilusFile object when the state changes from full + to empty or from empty to full. + + * src/file-manager/Makefile.am: + * src/file-manager/nautilus-trash-monitor.h: + * src/file-manager/nautilus-trash-monitor.c: + Moved trash monitor from here. + + * src/file-manager/fm-desktop-icon-view.c: + * src/file-manager/fm-directory-view.c: + Changed includes to include trash monitor from new location. + + * libnautilus-extensions/nautilus-directory-metafile.c: + (get_metadata_string_from_metafile), + (get_metadata_list_from_metafile), + (set_metadata_string_in_metafile), (set_metadata_list_in_metafile): + Remove some dead code left over from handling of directory metadata. + We don't have directory metadata any more, only file metadata. + +2000-12-08 Michael Engber + + * libnautilus-extensions/nautilus-global-preferences.c: + (global_preferences_register): + * src/file-manager/fm-desktop-icon-view.c: (real_merge_menus): + * src/file-manager/nautilus-desktop-icon-view-ui.xml: + * src/nautilus-application.c: (nautilus_application_startup), + (desktop_changed_callback): + * src/nautilus-application.h: + * src/nautilus-main.c: (main): + Remove command line args --start-desktop & --stop-desktop and the + "Quit Nautilus Desktop" item from the desktop right click menu. + Add the command line arg: --no-default-window. Default for the + show desktop pref is now ON. + +2000-12-08 Darin Adler + + reviewed by: John Sullivan + + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_initialize): Added FIXME about hard-coded + font and size. + (nautilus_icon_container_start_renaming_selected_item): Fix bug + 5078 by removing useless empty signal handlers. + (end_renaming_mode): Fix bug 5079 by merging the remaining code + from the old hide_rename_widget in after deleting some of it. + This is more parallel with the start renaming function. + * libnautilus-extensions/nautilus-icon-private.h: Removed the + unused rename_editable field. + + * libnautilus-extensions/nautilus-icon-text-item.c: + (iti_stop_editing): Now that the strange "persistent" editable is + no longer used, restore the code used to destroy the editable when + not editing. This also fixes a storage leak. + (nautilus_icon_text_item_get_text): Change return type to const + char * to make it clear it's not free-able. + (nautilus_icon_text_item_get_renaming_editable): Change the + return type to GtkEditable *. + * libnautilus-extensions/nautilus-icon-text-item.h: Change + return types of get_text and get_renaming_editable. + + * src/file-manager/fm-directory-view.c: (queue_pending_files), + (filtering_changed_callback): Added FIXMEs about special cases + for the desktop. + * src/file-manager/fm-icon-view.c: (fm_icon_view_begin_loading): + Improved wording of a comment. + +2000-12-08 Andy Hertzfeld + + * src/nautilus-property-browser.c: + (nautilus_property_browser_update_contents): + fixed bug 5045, browser assumes categories end in 's', by removing + the offending code, which wasn't used anyway. fixed bug 5046, + shouldn't upper-case category names, by casing out instead. + +2000-12-08 Darin Adler + + reviewed by: Maciej Stachowiak + + * libnautilus-extensions/nautilus-undo-signal-handlers.c: + (editable_key_press_event): Fixed bugs 5090 and 5091. The fix is + not even compiled right now, but it was better to improve the code + now -- we'll test when we enable it some day. + +2000-12-07 Maciej Stachowiak + + * components/services/startup/nautilus-view/.cvsignore: Remove + file from this otherwise empty directory. + +2000-12-07 Rebecca Schulman + Bug numbers for the FIXMEs in libnautilus-extensions. + + * libnautilus-extensions/nautilus-customization-data.c: + (format_name_for_display): + * libnautilus-extensions/nautilus-directory-async.c: + (dequeue_pending_idle_callback), (cancel_loading_attributes), + (nautilus_directory_cancel_loading_file_attributes): + * libnautilus-extensions/nautilus-directory.c: + (nautilus_directory_handle_directory_moved), + (nautilus_directory_notify_files_moved), + (nautilus_self_check_directory): + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_make_uri_canonical), + (pthread_nautilus_read_file_thread_entry), + (pthread_nautilus_read_file_async), (nautilus_read_file_cancel), + (nautilus_self_check_file_utilities): + * libnautilus-extensions/nautilus-file.c: (get_description), + (nautilus_file_forget_attributes_internal): + * libnautilus-extensions/nautilus-gdk-extensions.c: + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_start_renaming_selected_item): + * libnautilus-extensions/nautilus-icon-dnd.c: + (receive_dropped_uri_list): + * libnautilus-extensions/nautilus-icon-factory.c: + * libnautilus-extensions/nautilus-label.c: + (nautilus_label_size_allocate), (label_recompute_line_geometries): + * libnautilus-extensions/nautilus-merged-directory.c: + (nautilus_merged_directory_add_real_directory): + * libnautilus-extensions/nautilus-mime-actions.c: + (nautilus_mime_get_default_application_for_file_internal): + * libnautilus-extensions/nautilus-scalable-font.c: + (nautilus_text_layout_paint): + * libnautilus-extensions/nautilus-search-uri.c: + (nautilus_self_check_search_uri): + * libnautilus-extensions/nautilus-string.c: + * libnautilus-extensions/nautilus-undo-signal-handlers.c: + (editable_key_press_event), (nautilus_undo_editable_set_undo_key): + +2000-12-07 Rebecca Schulman + Added bug numbers to FIXMEs for the src + subdirectory. If I can stomach it, + I'll try and do a few more today. + + * src/file-manager/fm-directory-view.c: (duplicate_callback), + (check_for_directory_hard_limit), (load_directory): + * src/file-manager/fm-icon-view.c: (fm_icon_view_begin_loading): + * src/file-manager/fm-search-list-view.c: (load_error_callback), + (real_adding_file): + * src/nautilus-about.c: (nautilus_about_draw_info): + * src/nautilus-first-time-druid.c: (druid_cancel), + (druid_finished), (make_anti_aliased_label), + (make_hbox_user_level_radio_button), (set_up_user_level_page), + (next_update_page_callback), (initiate_file_download): + * src/nautilus-link-set-window.c: (get_link_set_names): + * src/nautilus-location-bar.c: + (nautilus_location_bar_update_label): + * src/nautilus-property-browser.c: + (nautilus_property_browser_initialize), (add_reset_property), + (make_properties_from_xml_node), + (nautilus_property_browser_update_contents): + * src/nautilus-sidebar-title.c: + (nautilus_sidebar_title_background), (update_icon): + * src/nautilus-view-frame.c: + (nautilus_view_frame_set_to_component): + * src/nautilus-window-manage-views.c: + (window_set_title_with_timestamp), (viewed_file_changed_callback), + (load_content_view), (change_state): + * src/nautilus-window-service-ui.c: (goto_online_storage), + (goto_software_catalog): + * src/nautilus-window-toolbars.c: (set_up_throbber_frame_type): + * src/nautilus-window.c: (nautilus_window_realize): + * test/test-nautilus-font.c: + +2000-12-07 Andy Hertzfeld + + * nautilus.spec.in: + added nautilus-text-view files to spec file + + * src/nautilus-window-toolbars.c: (theme_changed_callback): + fixed bug 4982, throbber mispositioned when theme changes, + by toggling the toolbar's visibility when the theme changes + +2000-12-07 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 2230 (Search can find hidden files, which the user + can't otherwise see) + + Unfortunately this fix leaves behind a related but harder- + to-fix bug, bug 5029. I'll fix that separately. + + * src/file-manager/fm-directory-view.h: + * src/file-manager/fm-directory-view.c: + (fm_directory_view_should_show_file): New function, intended + for subclasses, returns whether a single file should be + displayed or not, based on user's filter preferences. + + * src/file-manager/fm-search-list-view.c: + (real_add_file): Use should_show_file to filter out files + that don't match preferences. The normal directory-view + mechanism doesn't work in this case due to the way + the search view uses "fake" uris to pass around the + search results. + +2000-12-07 Rebecca Schulman + Hopefully will improve performance for + menu merging in a case where it is poor. + (bug 5020) Completely fixing the bug will + involve some design changes in the way the + clipboard works, though. + + reviewed by: John Sullivan + (the additional bonobo freezes and thaws) + + * libnautilus/nautilus-clipboard.c: + (merge_in_clipboard_menu_items), (merge_out_clipboard_menu_items): + Add freezes and thaws in hopes of improving performance here + * src/nautilus-window-menus.c: (nautilus_window_initialize_menus): + Ditto + + * components/tree/nautilus-tree-view-dnd.c: + (nautilus_tree_view_get_drop_action): + * libnautilus-extensions/nautilus-user-level-manager.h: + * src/file-manager/fm-desktop-icon-view.c: (create_mount_link): + * src/nautilus-switchable-search-bar.c: + (nautilus_switchable_search_bar_set_mode): + * src/nautilus-window-toolbars.c: (theme_changed_callback): + Removed fixme comments in cases where the fixme has been + fixed. + +2000-12-07 Gene Z. Ragan + + Enabled the jump to next feature. This should be the last missing + feature enabled that was lost during the brain salad surgery. + + * components/music/nautilus-music-view.c: (get_player_state): + +2000-12-07 Darin Adler + + reviewed by: Pavel Cisler + + * libnautilus-extensions/nautilus-search-uri.c: (parse_uri): Removed + the *_suffix code. The change log said this would require data structure + chagnges, but it didn't. Just deleting the code. + (nautilus_self_check_search_uri): Fix test cases that were causing + "make check" and Tinderbox to fail, added FIXMES. + +2000-12-07 Robin * Slomkowski + + * nautilus.spec.in: OK this time I really will remove nautilus-mpg123 + +2000-12-07 Gene Z. Ragan + + Fixed bug 4996, Repeatedly pressing pause "Pause" crashes music view + + * components/music/mpg123.c: (mpg123_pause): + * components/music/mpg123.h: + * components/music/nautilus-music-view.c: (go_to_previous_track), + (play_button_callback), (pause_button_callback): + Fixed pause and added some logic to avoid redundant calls. + +2000-12-07 Rebecca Schulman + Changes to fix bugs 2341, to match the sidebar + to Arlo's design for search results, and 3488 + that the human readable description of search + results ends in a period. + + reviewed by: Maciej Stachowiak + + * libnautilus-extensions/nautilus-search-uri.c: + (get_nth_criterion_suffix): + Remove "." from this function. Eventually, + this function should be deprecated, but it will + require some data structure changes, so I left a + FIXME and an associated bug 5019. + * src/file-manager/fm-search-list-view.c: (load_location_callback): + Set the search results title to be "Search Results" instead of + the human readable description + * src/nautilus-sidebar-title.c: (file_is_search), + (update_more_info): + Special case search uri's for the "more_info" part + of the sidebar to be in accordance with Arlo's design. + This is an annoying way of doing things, but until + a better framework is in place, John Sullivan and + I agreed this was ok to do for now. + +2000-12-07 Gene Z. Ragan + + Fixed bug 4679, Double clicking on an MP3 in music view should play it + + * components/music/nautilus-music-view.c: (selection_callback): + Check for double click and play if one is detected. + +2000-12-07 Gene Z. Ragan + + Some clean up and another attempt to fix tinderbox. + + * components/music/Makefile.am: + * components/music/esd-audio.c: (esdout_close): + * components/music/nautilus-music-view.c: (selection_callback), + (play_button_callback): + +2000-12-07 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 3926 (summary view uses non-standard anti-aliased + text in error dialogs) + + Fixed unreported bug where closing the summary view error + dialog with close box would leave user at gray screen. + + * components/services/summary/nautilus-view/nautilus-summary-view.c: + (get_window_from_summary_view): Split this out from set_dialog_parent + so I could also use it in a different context. + (set_dialog_parent): Now calls get_window_from_summary_view. + (generate_error_dialog): Now just calls nautilus_error_dialog instead + of doing a bunch of custom code to set up an anti-aliased text error + dialog. After we get the anti-aliased text preference to work on + NautilusLabel, we can consider changing nautilus_error_dialog and + friends to use it everywhere, but it doesn't make sense for error + dialogs only in this one place to look different from all others. + Also, connected error_dialog_cancel_cb to the "destroy" signal + instead of just to the OK button, so that closing the dialog with + the close box will have the same effect as the OK button. + +2000-12-07 Andy Hertzfeld + + * components/text/nautilus-text-view.c: + (nautilus_text_view_initialize), (add_one_service), + (update_service_menu_items), (merge_bonobo_menu_items): + fixed problem with "command/verb separation", and added support + for the clipboard to the text view. + + * nautilus-clean.sh: + added nautilus-text-view to nautilus-clean.sh + + * data/emblems/Makefile.am: + * data/emblems/danger.png: + * icons/Makefile.am: + * icons/emblem-danger.svg: + added danger emblem from Susan + + * icons/i-executable.png: + * icons/i-executable-aa.png: + fixed bug 4691, executable icon looks like KDE icon, by using + a new icon from Susan + + * src/file-manager/fm-icon-view.c: + (icon_container_preview_callback): + fixed bug 4926, Nautilus tries to preview realaudio files but + can't, by special casing the realaudio mime type. Also, cleaned + things up a little by removing redundant is_local call. + +2000-12-07 Gene Z. Ragan + + Fixed bug 954, Plays two MP3s at once instead of one at a time + + This was caused by playback not being stopped when a new uri + was being loaded. We now stop playback when a new uri is loaded. + + * components/music/nautilus-music-view.c: + (nautilus_music_view_update), (nautilus_music_view_load_uri): + +2000-12-07 Darin Adler + + reviewed by: John Sullivan + + Fixed bug 3245 (When an empty folder is visited, the throbbing + never stops), bug 2540 (Hook up done_loading signal in + NautilusMergedDirectory?), and bug 3067 (throbber doesn't start + again if you do a new "underway" call after load is complete). + + * src/file-manager/fm-directory-view.c: (queue_pending_files): + Get rid of code that uses nautilus_directory_are_all_files_seen + to notice we are done loading. + (done_loading_callback): Use done_loading signal to notice we + are done loading. + (finish_loading_uri): Connect to the done_loading signal. + (disconnect_model_handlers): Disconnect from the done_loading + signal. + + * libnautilus-extensions/nautilus-merged-directory.c: + (done_loading_callback), + (nautilus_merged_directory_add_real_directory), + (nautilus_merged_directory_remove_real_directory): Add code to + track all the trash directories and emit done_loading signals + once all of them are done loading. + + * src/nautilus-window-manage-views.c: (change_state): Turn the + stop and the throbber back on when a view re-marks itself + underway. + + * libnautilus-extensions/nautilus-drag.c: + (nautilus_drag_file_receive_dropped_keyword): Fix storage leak by + doing a free_deep on the list of keywords. + + * libnautilus-extensions/nautilus-file-operations.h: + * libnautilus-extensions/nautilus-file-operations.c: + Get rid of excess includes. + + * libnautilus-extensions/nautilus-icon-dnd.c: Get rid of unused + ERASE_KEYWORD constant. + + * src/nautilus-window.c: (nautilus_window_constructed): Fix a + typo in a comment. + +2000-12-07 Gene Z. Ragan + + Add header files to Makefile.am to make tinderbox happy. + + * components/music/Makefile.am: + * components/music/mp3head.h: + Put a header guard define in file. + +2000-12-07 Robey Pointer + + * components/services/trilobite/helper/README: + Update the eazel-helper README to be more current than July. Tell + readers about the softlinks and tell them that eazel-hacking does + this for you now. + +2000-12-06 Mike Fleming + + reviewed by: Pavel Cisler + + * libnautilus-extensions/nautilus-file-operations.c: + (handle_new_folder_vfs_error), (new_folder_xfer_callback), + (nautilus_file_operations_new_folder): + + bugzilla.eazel.com 3940 + "DAV: Creating folder in read-only directory does not produce error feedback" + + Added an error dialog for the case where gnome-vfs-xfer reports an + error during directory creation. This case is only commonly + encountered in remote filesystems where Nautilus can't check + permissions before operations. (Similar behaviour to 3940 applied + to FTP as well). + +2000-12-06 Gene Z. Ragan + + Changes in the music view to use a threaded file reader + and threaded audio output mechanism. Modified the xmms + engine to be used as the mp3 engine that the view uses. + Removed the use of stored proc IDs as the mechanism to + determine if the view is currently in the process of + playing a file. + + * components/music/Makefile.am: + * components/music/common.c: (fullread), (stream_init), + (stream_rewind), (mpg123_stream_close), (stream_head_read), + (stream_head_shift), (stream_mpg123_read_frame_body), + (stream_back_bytes), (mpg123_stream_jump_to_frame), + (mpg123_stream_jump_to_byte), + (mpg123_stream_check_for_xing_header), (stream_init), + (mpg123_stream_close), (stream_head_read), (stream_head_shift), + (stream_mpg123_read_frame_body), (mpg123_stream_jump_to_frame), + (mpg123_stream_jump_to_byte), + (mpg123_stream_check_for_xing_header), (get_fileinfo), + (mpg123_read_frame_init), (read_id3v2_tag), (mpg123_head_check), + (mpg123_read_frame), (mpg123_decode_header), (mpg123_open_stream), + (mpg123_set_pointer), (mpg123_compute_bpf), + (mpg123_calc_numframes): + * components/music/configure.c: (mpg123_configurewin_ok), + (auto_select_cb), (use_3dnow_cb), (use_fpu_cb), (proxy_use_cb), + (proxy_auth_use_cb), (streaming_save_dirbrowser_cb), + (streaming_save_browse_cb), (streaming_save_use_cb), + (title_id3_use_cb), (configure_destroy), (mpg123_configure): + * components/music/dct64.c: (mpg123_dct64): + * components/music/dct64_i386.c: (mpg123_dct64_1), (mpg123_dct64): + * components/music/decode_2to1.c: (mpg123_synth_2to1_8bit), + (mpg123_synth_2to1_8bit_mono), + (mpg123_synth_2to1_8bit_mono2stereo), (mpg123_synth_2to1_mono), + (mpg123_synth_2to1_mono2stereo), (mpg123_synth_2to1): + * components/music/decode_4to1.c: (mpg123_synth_4to1_8bit), + (mpg123_synth_4to1_8bit_mono), + (mpg123_synth_4to1_8bit_mono2stereo), (mpg123_synth_4to1_mono), + (mpg123_synth_4to1_mono2stereo), (mpg123_synth_4to1): + * components/music/decode_i386.c: (mpg123_synth_1to1_8bit), + (mpg123_synth_1to1_8bit_mono), + (mpg123_synth_1to1_8bit_mono2stereo), (mpg123_synth_1to1_mono), + (mpg123_synth_1to1_mono2stereo), (mpg123_synth_1to1): + * components/music/decode_ntom.c: (mpg123_synth_ntom_set_step), + (mpg123_synth_ntom_8bit), (mpg123_synth_ntom_8bit_mono), + (mpg123_synth_ntom_8bit_mono2stereo), (mpg123_synth_ntom_mono), + (mpg123_synth_ntom_mono2stereo), (mpg123_synth_ntom): + * components/music/dxhead.c: (ExtractI4), (mpg123_get_xing_header), + (mpg123_seek_point): + * components/music/dxhead.h: + * components/music/esd-audio.c: (esdout_init), (get_latency), + (esd_stou8), (esd_utos16sw), (esd_utos16), (esd_16sw), + (esdout_setup_format), (esdout_get_written_time), + (esdout_get_output_time), (esdout_used), (esdout_playing), + (esdout_free), (esdout_write_audio), (esdout_write), + (esdout_close), (esdout_flush), (esdout_pause), (esdout_loop), + (esdout_set_audio_params), (esdout_open): + * components/music/esd-audio.h: + * components/music/esd-mixer.c: (esdout_get_volume), + (esdout_set_volume): + * components/music/fileinfo.c: (set_entry_tag), (get_entry_tag), + (find_genre_id), (genre_comp_func), (save_cb), (label_set_text), + (remove_id3_cb), (set_mpeg_level_label), (channel_mode_name), + (file_info_http), (mpg123_file_info_box): + * components/music/getbits.c: (check_buffer_range), + (mpg123_backbits), (mpg123_getbitoffset), (mpg123_getbyte), + (mpg123_getbits), (mpg123_getbits_fast), (mpg123_get1bit): + * components/music/getbits.h: + * components/music/huffman.h: + * components/music/id3.c: (id3_seek_mem), (id3_read_mem), + (id3_seek_fd), (id3_read_fd), (id3_seek_fp), (id3_read_fp), + (id3_open_mem), (id3_open_fd), (id3_open_fp), (id3_close), + (id3_tell), (id3_alter_file), (safe_write), (id3_write_tag): + * components/music/id3.h: + * components/music/id3_frame.c: (id3_read_frame), (id3_get_frame), + (id3_decompress_frame), (id3_delete_frame), (id3_add_frame): + * components/music/id3_frame_content.c: (id3_get_content): + * components/music/id3_frame_text.c: (id3_get_encoding), + (id3_set_encoding), (id3_get_text), (id3_get_text_desc), + (id3_get_text_number), (id3_set_text), (id3_set_text_number): + * components/music/id3_frame_url.c: (id3_get_url), + (id3_get_url_desc): + * components/music/id3_header.h: + * components/music/id3_tag.c: (id3_init_tag), (id3_read_tag): + * components/music/l2tables.h: + * components/music/layer1.c: (I_step_one), (I_step_two), + (mpg123_do_layer1): + * components/music/layer2.c: (mpg123_init_layer2), (II_step_one), + (II_step_two), (II_select_table), (mpg123_do_layer2): + * components/music/layer3.c: (mpg123_init_layer3), + (III_get_side_info), (III_get_scale_factors_1), + (III_get_scale_factors_2), (III_dequantize_sample), (III_i_stereo), + (III_antialias), (dct36), (dct12), (III_hybrid), + (mpg123_do_layer3): + * components/music/mpg123.c: (mpg123_compute_tpf), + (set_mpg123_synth_functions), (mpg123_init), (convert_to_header), + (play_frame), (get_id3_genre), (mpg123_strip_spaces), (extname), + (eval_id3_format), (mpg123_id3v1_to_id3v2), + (mpg123_format_song_title), (mpg123_get_id3v2), (get_song_title), + (get_song_time), (get_song_info), (decode_loop), + (mpg123_play_file), (mpg123_stop), (mpg123_seek), (mpg123_pause), + (get_time): + * components/music/mpg123.h: + * components/music/mpg123_handler.c: + * components/music/mpg123_handler.h: + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize), (nautilus_music_view_destroy), + (selection_callback), (update_play_controls_status), + (play_status_display), (play_current_file), (stop_if_playing), + (go_to_next_track), (go_to_previous_track), (play_button_callback), + (stop_button_callback), (pause_button_callback), + (slider_moved_callback), (slider_release_callback), + (add_play_controls), (nautilus_music_view_update), + (nautilus_music_view_drag_data_received), (start_playing_file), + (stop_playing_file), (get_player_state), (set_player_state): + * components/music/tabinit.c: (mpg123_make_decode_tables), + (mpg123_make_conv16to8_table): + +2000-12-06 Darin Adler + + reviewed by: John Sullivan + + Fixed bug 4992 ("New folder" menu item enable state doesn't follow + permissions), bug 4965 (Dragging multiple items to location bar + crashes Nautilus), and bug 4995 (Rename a file to bad name -> + error cites wrong filename). + + Fixed a bug jsh spotted where we were doing the mod. time checks + wrong in the icon factory for thumbnails. + + Did some wording fixes after menthos pointed out some problems. + + * libnautilus-extensions/nautilus-icon-factory.c: + (get_cache_time): Split out this function to get the mtime of a + file so we can check when it changed. + (load_specific_icon): Get the time when loading an icon. + (scale_icon): Copy the time when making a scaled icon from an + existing icon. + (remove_icons_if_file_changed): New renamed function uses + get_cache_time to check if the icon needs recomputing because of a + change in the underlying file. + (get_icon_from_cache): Call the new remove_icons_if_file_changed. + (load_icon_with_embedded_text): Copy the time when making an icon + with text from an existing icon. + + * libnautilus-extensions/nautilus-file-attributes.h: Added + ATTRIBUTE_CAPABILITIES (and sorted in alphabetical order). + * libnautilus-extensions/nautilus-directory-async.c: + (nautilus_directory_set_up_request): Changed the name of this, + made it public, and added ATTRIBUTE_CAPABILITIES as another + way to ask for the file info. + (cancel_loading_attributes), + (nautilus_directory_cancel_loading_file_attributes): Set up a + request and use it to decide what to cancel. + * libnautilus-extensions/nautilus-directory-private.h: Moved the + request structure and call into here so it can be used by + NautilusFile and NautilusDirectory both. + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_forget_attributes_internal): Set up a request and + use it to decide what to forget. + (nautilus_file_forget_all_attributes): Add ATTRIBUTE_CAPABILITIES + to the set of things in "all". + + * src/file-manager/fm-directory-view.c: + (check_for_directory_hard_limit): Added a FIXME and made some + minor wording improvements. + (file_changed_callback): Helper to schedule a menu update when + the directory's NautilusFile reports a change. + (load_directory): Add monitoring of the directory's "capabilities" + since they affect whether "New Folder" is allowed. Fixes 4992. + (disconnect_handler): Helper for the two functions below. + (disconnect_directory_handler): Disconnect a NautilusDirectory + handler. + (disconnect_directory_as_file_handler): Disconnect a NautilusFile + handler. + (disconnect_model_handlers): Add code to stop monitoring the + directory's "capabilities". + + * src/file-manager/fm-error-reporting.c: + (fm_report_error_renaming_file): Got rid of some unneeded "\n" + characters. Improved the error message in the "/"-forbidden case + with a specific special case message and the proper file name (was + using the old file name, not the new one). Fixes 4995. + (fm_rename_file): Added quotes to message. + + * src/nautilus-location-bar.h: Removed unused fields. + * src/nautilus-location-bar.c: (nautilus_location_bar_get_window): + Find the window by looking for an ancestor instead of trying to + use gtk_object_get_data (on data no one was setting any + more!). Fixes 4965. + (nautilus_location_bar_initialize): Got rid of redundant + initialization to NULL. + (nautilus_location_bar_set_location): Got rid of gratuitous check + before calling g_free. + (nautilus_location_bar_update_label): Added a localization-related + FIXME here. + + * libnautilus-extensions/nautilus-file-operations.c: + (handle_xfer_vfs_error): Corrected the "it's" to "its" even though + I know that John and Pavel were writing an improved version of the + entire message. + + * libnautilus-extensions/nautilus-search-uri.c: + (get_translated_criterion), (nautilus_self_check_search_uri): Say + "folder" instead of "directory". + * src/nautilus-search-bar-criterion.c: Say "folder" instead of + "directory". + * src/nautilus-theme-selector.c: (add_theme_to_icons): Say + "folder" instead of "directory". Other minor wording improvements. + (make_theme_description): Minor wording improvement. + + * src/nautilus-window-manage-views.c: + (window_set_title_with_timestamp): Added a FIXME. + +2000-12-06 John Sullivan + + reviewed by: Pavel Cisler + + Addressed bug 4208 (Opening new window is slow) + + Pavel identified the 2nd biggest performance bottleneck in + opening a new window (1st being tree view) as the code that + sets up the bookmark menus. I found some good speedups; time + to profile again. + + * libnautilus-extensions/nautilus-bookmark.c: + (bookmark_file_changed_callback): nautilus_uris_match returns + a gboolean, not a strcmp-style int. Doh! Sense of test was + reversed, causing many unnecessary rebuild-bookmarks-menus. + + * src/nautilus-window-menus.c: + (append_static_bookmarks), (refresh_bookmarks_menu): Wrapped + some Bonobo-ui-manipulating code with freeze/thaw; this speeds + up rebuild-bookmarks_menu by an order of magnitude or so. + + Fixed bug 4334: (Icon name being edited can get separated + from icon on restore-original-size) + + * libnautilus-extensions/nautilus-icon_container.c: + (nautilus_icon_container_move_icon): End renaming mode + if icon being renamed is moved. + +2000-12-06 Rebecca Schulman + + * libnautilus-extensions/nautilus-search-uri.c: + Remove a comment about a FIXME that is fixed. + +2000-12-06 Michael Engber + + * src/nautilus-sidebar-title.c: (appearance_changed_callback), + (realize_callback), (nautilus_sidebar_title_initialize), + (nautilus_sidebar_title_background), + (nautilus_sidebar_title_select_text_color): + Hookup sidebar_title to their background's appearance_changed + signals so that the text can adjust color to match the + background being light or dark - bug 4991. + +2000-12-06 J Shane Culpepper + + * components/services/trilobite/libtrilobite/Makefile.am: + * components/services/trilobite/libtrilobite/libtrilobite.h: + + Backing out rpm evil until the abstractions can be fixed correctly. + +2000-12-06 J Shane Culpepper + + * components/services/trilobite/libtrilobite/trilobite-inventory-ut + ils.c: (add_info), (str_has_prefix): + + One more quick fix for the build. Didn't want to make trilobite + depend on libnautilus-extensions. + +2000-12-06 Rebecca Schulman + This should complete the rest of the work for bug 3920, + by added a message in the status bar about what + search results will appear (only those files indexed as + of the last index time) + + reviewed by: Maciej Stachowiak + + * src/file-manager/fm-search-list-view.c: (load_location_callback): + Add a status message + + * src/file-manager/nautilus-indexing-info.c: + * src/file-manager/nautilus-indexing-info.h: + (nautilus_indexing_info_get_last_index_time), + (show_reindex_request_information): + Changed get_last_index_time to + nautilus_indexing_info_get_last_index_time + to share the code with the search list view + + * src/nautilus-window.c: + Upped the status bar timeout for 5 seconds to 10. + +2000-12-06 J Shane Culpepper + + * components/services/trilobite/libtrilobite/Makefile.am: + + Fixing the build. Adding the temporary dep to rpmlib. + +2000-12-06 J Shane Culpepper + + * components/services/trilobite/libtrilobite/Makefile.am: + * components/services/trilobite/libtrilobite/libtrilobite.h: + * components/services/trilobite/libtrilobite/trilobite-inventory-ut + ils.c: (add_package_info), (read_proc_info), (add_info), + (add_io_info), (add_hardware_info), + (trilobite_synchronize_configuration_metafile), + (trilobite_update_configuration_metafile), + (trilobite_create_configuration_metafile): + * components/services/trilobite/libtrilobite/trilobite-inventory-ut + ils.h: + + Adding basic inventory collection funtions to trilobite. Still needs + the rpm abstraction in order to work on RH7. + +2000-12-06 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 4994 (Back and Forward tool bar buttons don't respect + "no label" gnomecc option) + + * src/nautilus-window-toolbars.c: (set_up_special_bonobo_button): + Set initial labels-or-not state based on global preference. This + is an imperfect solution because it only partially matches the + logic used by the Bonobo standard button mechanism, but the + remaining symptoms are very minor (see bug 5005). + +2000-12-06 Eskil Heyn Olsen + + * nautilus.spec.in: + Added the new libs to the spec, so tinderbox can build again. + +2000-12-06 John Fleck + + reviewed by Ali Abdin + * components/help/converters/gnome-db2html2/sect-preparse.c: + fixing memory leak + +2000-12-06 Eskil Heyn Olsen + + * components/services/install/lib/eazel-install-query.c: + killed + + * components/services/trilobite/libtrilobite/trilobite-root-helper. + c: (trilobite_root_helper_run_program): + Replaced the g_assert with g_warning and a continue; + + * po/POTFILES.in: + Updated for all the new stuff in eazel-install + +2000-12-06 Eskil Heyn Olsen + + * components/rpmview/Makefile.am: + Needs to link with eazelpackagesystem now. + + * components/services/install/command-line/Makefile.am: + Build eazel-test-types. + + * components/services/install/command-line/eazel-alt-install-corba. + c: (eazel_download_progress_signal), + (eazel_install_progress_signal), (something_failed), (dep_check): + Nicer output. + + * components/services/install/command-line/eazel-test-packsys.c: + (test_package_load), (main): + Moved the packagelist_prun test into eazel-test-types. Also + relaxed the test of uninstall (doesn't require progress signals + now). + + * components/services/install/command-line/eazel-test-types.c: + (make_package), (test_packagelist_prune), + (test_eazel_install_package_matches_versioning), (main): + Test packagedatalist_prune and the new ugly func for testing + version-minor match. + + * components/services/install/lib/Makefile.am: + Do compile eazel-install-query.c anymore. + + * components/services/install/lib/eazel-install-protocols.c: + (eazel_install_fetch_package): + * components/services/install/lib/eazel-install-public.h: + * components/services/install/lib/eazel-install-rpm-glue.c: + (packagedata_new_from_rpm_conflict), + (packagedata_new_from_rpm_conflict_reversed), + (eazel_install_do_rpm_dependency_check): + * components/services/install/lib/eazel-install-logic.h: + * components/services/install/lib/eazel-install-object.c: + (eazel_install_finalize), (eazel_install_set_arg), + (eazel_install_class_initialize), (eazel_install_initialize), + (eazel_install_install_packages), + (eazel_install_uninstall_packages), + (eazel_install_revert_transaction_from_xmlstring), + (eazel_install_query_package_system), + (eazel_install_get_size_increasement), + (eazel_install_emit_preflight_check): + * components/services/install/lib/eazel-install-private.h: + * components/services/install/lib/eazel-install-logic.c: + (install_packages), (eazel_install_download_packages), + (eazel_install_check_for_file_conflicts), + (eazel_install_do_install_packages), (uninstall_all_packages), + (uninstall_packages), (get_total_size_of_packages), + (eazel_install_start_signal), (eazel_install_end_signal), + (eazel_install_progress_signal), (eazel_install_failed_signal), + (eazel_install_start_transaction), + (eazel_install_check_existing_packages), + (eazel_install_fetch_dependencies), + (eazel_install_do_dependency_check), + (eazel_uninstall_upward_traverse), + (eazel_uninstall_downward_traverse), + (eazel_uninstall_check_for_install): + Fixes bug 4936, use EazelPackageSystem in EazelInstall. + + * components/services/install/lib/eazel-install-problem.c: + (problem_step_foreach_remove), + (eazel_install_problem_tree_to_case), + (eazel_install_problem_handle_cases): + Slammed some ifdef EIP_DEBUG around some debug. + + * components/services/install/lib/eazel-install-types.h: + * components/services/install/lib/eazel-install-types.c: + (eazel_install_package_matches_versioning): + New funky match function. Since I needed the same check two + places, I moved it into a generel function. + Also cut out all the rpmload code. + + * components/services/install/lib/eazel-package-system-rpm3.c: + (monitor_rpm_process_pipe), (rpm_packagedata_fill_from_rpm_header), + (eazel_package_system_rpm3_load_package), + (eazel_package_system_rpm3_query_impl), + (eazel_package_system_rpm3_query_requires), + (eazel_package_system_rpm3_query_foreach), + (monitor_subcommand_pipe), (eazel_package_system_rpm3_execute), + (check_if_all_packages_seen), + (eazel_package_system_rpm3_install_uninstall): + Fixed 4914. And also added the use of the packages_seen in + piggyback. + + * components/services/install/lib/eazel-package-system.h: + * components/services/install/lib/eazel-package-system-private.h: + * components/services/install/lib/eazel-package-system.c: + (eazel_package_system_is_installed), + (eazel_package_system_emit_start), + (eazel_package_system_emit_progress), + (eazel_package_system_emit_failed), + (eazel_package_system_emit_end): + Added const to all the signal emitters. + Added the is_installed call. + + * components/services/install/nautilus-view/Makefile.am: + Link against eazelpackagesystem + + * components/services/install/server/Makefile.am: + Link against eazelpackagesystem + + * components/services/trilobite/libtrilobite/trilobite-core-distrib + ution.h: + Added a documentational comment. + + * components/services/trilobite/libtrilobite/trilobite-root-helper. + c: (trilobite_root_helper_run_program): + Added an api g_assert that I ran into (no element in args may be null). + +2000-12-06 Ramiro Estrugo + + * src/file-manager/fm-search-list-view.c: (load_error_callback): + Remove the extra not needed ", NULL" from this g_strdup_printf call. + +2000-12-06 Robey Pointer + + * components/services/install/lib/eazel-softcat.c: + (gnome_vfs_escape_string): + + Fixed a dumb url-quoting error that resulted in "hilarious" + quoting flubs. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_service_install_done): + + Never return to the summary-view page after completion now: let + the user do their own navigation. + + * nautilus-installer/src/callbacks.c: (log_debug), + (reply_callback), (ask_to_delete_rpms), (ask_are_you_sure), + (druid_cancel), (begin_install), (druid_finish): + * nautilus-installer/src/installer.c: (start_over), + (insert_info_page), (get_detailed_errors_foreach), + (get_detailed_errors), (install_failed), (uninstall_failed), + (download_failed), (eazel_installer_post_install), + (draw_splash_text), (eazel_installer_set_default_texts), + (eazel_installer_initialize): + + Ask if the user wants to delete the RPMs after a successful + install, and ask for verification when they hit the "cancel" + button. Eliminate a redundant cancel callback that caused double + vision. Restore the error dialog's AWOL title (?). Turn off that + damn checkbox for now (can turn it on later if anyone makes an + installer PR2.1). + +John Fleck + + reviewed by: Ali Abdin + + * components/help/converters/gnome-db2html2/gdb3html.h, + sect-preparse.c, toc-elements.c: completes support for + glossaries in the Gnome help system. Fixes bug #2349 + +2000-12-05 John Sullivan + + reviewed by: Darin Adler + + Fixed bug 3355 (No "New Window" menu item in right-click menu) + + * src/nautilus-shell-ui.xml: Added "New Window" to + right-click context menu (that appears in directory views) + +2000-12-05 John Sullivan + + reviewed by: Pavel Cisler + + Fixed bug 4986 (Open in new windows disabled) + + * src/file-manager/fm-directory-view.c: (real_update_menus): + An == should have been a != + + Fixed bug 3510 (The Back and Forward right-click menus are + missing) + + * src/nautilus-shell-ui.xml: Replaced toolitem nodes for + "Back" and "Forward" with control nodes for their wrappers. + Have to do a lot of stuff manually for non-standard Bonobo + buttons. + + * src/nautilus-window-private.h: Store back_button_item and + forward_button_item in details. + + * src/nautilus-window-toolbars.c: + Removed #ifdef UIH brackets around right-click menu code. + (get_back_button), (get_forward_button): Helper functions to + get the GtkButton widgets from the stored BonoboUIToolbarButtonItems. + (back_or_forward_button_pressed_callback): Renamed from ..._clicked_..., + since it's a handler for button_press_event. Compare for Back or + Forward button a newfangled way. + (back_or_forward_button_clicked_callback): New function, callback + from button's "clicked" handler now that Bonobo doesn't handle this + for us. + (get_file_name_from_icon_name): New function extracted from + set_up_button; gets the full file path from the leaf icon "name". + (set_up_standard_bonobo_button): Renamed from "set_up_button", + now calls get_file_name_from_icon_name. + (get_pixbuf_for_xml_node): New function, calls Bonobo utility code + to get the pixbuf from an xml button node. + (set_up_special_bonobo_button): New function, parallel to + set_up_standard_bonobo_button but handles the case where you have + a BonoboUIToolbarButtonItem in hand. + (set_up_toolbar_images): Call set_up_special_bonobo_button for the + Back and Forward items; put the bonobo freeze/thaw here instead of + where it was before in set_up_button. + (set_widget_for_bonobo_control): New function, extracted from + nautilus_window_initialize_toolbars, handles attaching a widget to + a Bonobo control defined in the XML file. + (set_up_back_or_forward_tool_bar_item): New function, creates + widget, wraps it in control, and wires up signal handlers. + (nautilus_window_initialize_toolbars): Call set_up_toolbar_images + only after Back/Forward buttons are created; create Back/Forward + buttons and use new helper functions. + + * src/nautilus-window.c: + (nautilus_window_allow_back), (nautilus_window_allow_forward): + Set sensitivity of Back/Forward buttons explicitly. + +2000-12-05 Robey Pointer + + * components/services/install/lib/eazel-install-object.c: + (eazel_install_initialize): + + Re-order softcat init so it's initialized before pieces of it are + set. + + * components/services/install/lib/eazel-softcat.c: + (gnome_vfs_escape_string): + + Fix the stub escape_string (for the gnome-vfs-less bootstrap + installer) to actually compile and work. + + * nautilus-installer/src/Makefile: + + (innocent whistle) + + * nautilus-installer/src/installer.c: (create_what_to_do_page), + (eazel_installer_add_category), (eazel_installer_initialize), + (eazel_installer_new): + + Fix label names to match (and avoid assertion). + +2000-12-05 Michael Engber + + * src/nautilus-window.c: (nautilus_window_constructed), + (update_sidebar_panels_from_preferences): + Keep the desktop from creating sidebar panels (it still + has the sidebar) - bug 2603. + +2000-12-05 Rebecca Schulman + + reviewed by: Darin Adler + + * src/file-manager/fm-search-list-view.c: (load_error_callback): + Added an error callback for search uris that produce error + GNOME_VFS_ERROR_TOO_BIG, which happens when a search matches + every criterion in the database. + * src/nautilus-search-bar-criterion.c: (get_owner_location_for): + Fixed an "is not" in a search uri that should have been "is_not" + so that searches did not produce an error. + +2000-12-05 J Shane Culpepper + + * components/services/trilobite/libtrilobite/Makefile.am: + * components/services/trilobite/libtrilobite/libtrilobite.h: + * components/services/trilobite/libtrilobite/trilobite-core-metadat + a-manager.c: + * components/services/trilobite/libtrilobite/trilobite-core-metadat + a-manager.h: + * components/services/trilobite/libtrilobite/trilobite-core-package + -manager.c: + * components/services/trilobite/libtrilobite/trilobite-core-package + -manager.h: + * components/services/trilobite/libtrilobite/trilobite-core-securit + y-manager.c: + * components/services/trilobite/libtrilobite/trilobite-core-securit + y-manager.h: + * components/services/trilobite/libtrilobite/trilobite-core-tests.c + : + * components/services/trilobite/libtrilobite/trilobite-core-tests.h + : + + Removing some empty file templates from libtrilobite. + +2000-12-05 Pavel Cisler + + reviewed by: Gene Z. Ragan + + * libnautilus-extensions/nautilus-file-operations.c: + (handle_xfer_vfs_error): + Second part of fix 4894 "Dragging /proc from the tree view to + /home causes a file not found". + Part of fix to 3232 "Error message when copying rwx file from + r-x folder to rwx folder". + Part of fix to 3237 "No error occurs if move file to folder w/o + write access". + Part of fix to 3748 "misleading file operation error dialog" + Added logic that distinguishes between read and write phases + of a file move properly and gives the right error. + Split up the "no permissions" and "read only" cases and gave them + distinct errors. + Added a specific case for a move from a directory that is not writable. + +2000-12-05 John Sullivan f + + reviewed by: Darin Adler + + Fixed bug 3586 (Nautilus tool bar doesn't respect + "no labels" setting in gnomecc) + + I fixed the Bonobo part of this bug earlier; this is the + little leftover Nautilus-specific part. + + * src/nautilus-shell-ui.xml: Remove 'look="both"' from + tool bar definition. This was formerly needed due to + Bonobo behavior where you would get icons-only without this, + but now this prevents the preference from kicking in. + * src/nautilus-window-toolbars.c: + (allocate_throbber): Use small throbber if gnome preference is + for unlabelled tool bar buttons. This makes the throbber + appearance fit in well when tool bar labels are off. + (theme_changed_callback): Remove hide/show toolbar and replace + it with FIXME about how the throbber doesn't reposition + correctly when theme changes. The hide/show was a hack that + worked in the old Bonobo but doesn't in the new one. + + * src/nautilus-desktop-window.c: (realize): + Removed some leftover #ifdef UIH code that was functionally + replaced a while back. + +2000-12-04 Robey Pointer + + * components/services/install/lib/eazel-install-metadata.c: + (init_default_transfer_configuration), + (eazel_install_configure_softcat), (transferoptions_destroy): + * components/services/install/lib/eazel-install-metadata.h: + + Remove softcat fields from the TransferOptions struct and move + them into EazelSoftCat's config. Read ESC's config from the + install/server/ gconf items. + + * components/services/install/lib/eazel-install-object.c: + (eazel_install_finalize), (eazel_install_initialize), + (eazel_install_new_with_config), (eazel_install_get_server), + (eazel_install_get_server_port), (eazel_install_get_username), + (eazel_install_get_eazel_auth), (eazel_install_get_cgi_path), + (eazel_install_set_server), (eazel_install_set_server_port), + (eazel_install_set_username), (eazel_install_set_eazel_auth), + (eazel_install_set_cgi_path): + * components/services/install/lib/eazel-install-private.h: + * components/services/install/lib/eazel-install-public.h: + * components/services/install/lib/eazel-install-types.h: + + Put a SoftCat into the Install object, and map the set/get + functions for old TransferOptions fields to SoftCat fields. + + * components/services/install/lib/eazel-install-protocols.c: + (gnome_vfs_xfer_callback), (eazel_install_fetch_package): + + Remove some sarcasm (I'm over it). Remove traces of the "old" + (fake) CGI code. Remove the evil softcat hack and make it use the + softcat object now. + + * components/services/install/lib/eazel-softcat.c: + (eazel_softcat_unref), (eazel_softcat_set_server), + (eazel_softcat_set_server_host), (eazel_softcat_set_server_port), + (eazel_softcat_get_server_host), (eazel_softcat_get_server_port), + (eazel_softcat_set_authn), (eazel_softcat_set_authn_flag), + (eazel_softcat_set_username): + * components/services/install/lib/eazel-softcat.h: + + Let a SoftCat be unref'd (cough cough). Add some more field + set/get functions for the Install object. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_service_install_solve_cases), + (nautilus_service_install_done), + (nautilus_service_install_failed): + * components/services/install/nautilus-view/nautilus-service-instal + l-view.h: + + Remove some cruft and fix the "already installed" case so that it + doesn't drop windows everywhere and vanish abruptly, leaving a + dangling eazel-install service running in the background. + +2000-12-04 Maciej Stachowiak + + * components/tree/nautilus-tree-view.c + (expand_uri_sequence_and_select_end): Fix build lossage from last + commit. + +2000-12-04 Maciej Stachowiak + + reviewed by: John Sullivan + + * components/tree/nautilus-tree-view.c + (expand_uri_sequence_and_select_end): Changed control flow a bit + to avoid possibly dereferencing a NULL view_node pointer. This can + happen when launching nautilus with the tree view and the desktop + both enabled. Thanks to John Sullivan for locating the bug, + finding the likely cause in the debugger, and helping me simplify + the control flow of this function. + +2000-12-04 Darin Adler + + reviewed by: Maciej Stachowiak + + * libnautilus-extensions/Makefile.am: Add ESD flags and library + since we are now using it. Without this change, I couldn't link. + + * libnautilus-extensions/nautilus-icon-container.c: + (redo_layout_internal), (redo_layout_callback), + (unschedule_redo_layout), (schedule_redo_layout), (relayout): Get + rid of some circular logic in relayout (now called redo_layout) + and made nice calls to cleanly schedule the idle function to redo + layout. + (size_allocate): Make sure we redo layout if this is the first + allocate, since we have inhibited them up to this point. + (nautilus_icon_container_initialize): Get rid of unnecessary + initialization of things that are already 0, NULL, FALSE. + (finish_adding_new_icons): Remove unnecessary check for NULL. + (nautilus_icon_container_add): Use the new schedule_redo_layout. + (nautilus_icon_container_remove): Use schedule_redo_layout instead + of redoing the layout right away, since this can be called for + many icons at a time and we want to bunch up the layout work. + (nautilus_icon_container_request_update): Schedule a redo_layout + any time an icon changes. We could get fancy and detect changes + that are substantive if this does too much extra layout work. + (nautilus_icon_container_set_zoom_level): Removed extraneous + direct call to redo_layout after the request_update_all call. + + * src/nautilus-window.c: (menu_bar_no_resize_hack_class_free), + (menu_bar_no_resize_hack): Tweak function name and formatting. + (nautilus_window_constructed): Do a little bit less sidebar setup + when making a desktop window. + + * libnautilus-extensions/nautilus-sound.c: Tweak (has nice side + effect of forcing recompile). + +2000-12-04 Robey Pointer + + * components/services/install/command-line/eazel-test-softcat.c: + (main): + + Add -V (version), --gt (greater-than), and -C (check for new + version) options to eazel-softcat. (The -C/--gt options won't work + until the softcat java-side supports it.) + + * components/services/install/lib/eazel-softcat.c: + (eazel_softcat_initialize), (eazel_softcat_set_retry), + (eazel_softcat_get_info), (eazel_softcat_available_update): + * components/services/install/lib/eazel-softcat.h: + + Finish softcat API (check for new version of a package). + +2000-12-04 Maciej Stachowiak + + * README: Updated ORBit version. + +2000-12-04 Michael Engber + + * libnautilus-extensions/nautilus-background.c: + (nautilus_background_ensure_gradient_buffered): + Changed the semantics of multi-point gradients + so that percentages are postions (rather than + widths) - bug 4759 + +2000-12-04 Pavel Cisler + + reviewed by: Gene Z. Ragan + + * libnautilus-extensions/nautilus-file-operations.c: + (nautilus_file_operations_copy_move): + * src/file-manager/fm-directory-view.c: + (fm_directory_view_move_copy_items): + * src/file-manager/fm-list-view.c: (fm_list_receive_dropped_icons): + Fixed 4949: + Fix a crash when copying from an icon view to a list view - + my last fix to set icon positions properly during duplicate was sloppy + and broke this. + The change needed to add one more place that use an empty GArray instead + of a NULL. + Properly handle the case of an empty GArray in + nautilus_file_operations_copy_move. + +2000-12-04 Maciej Stachowiak + + * README: Update OAF branch info. + +2000-12-04 Michael Engber + + * libnautilus-extensions/nautilus-background-canvas-group.c: + (nautilus_background_canvas_group_initialize_class), + (nautilus_background_canvas_group_update), + (nautilus_background_canvas_group_draw), + (nautilus_background_canvas_group_render): + Code formatting changes. + + * libnautilus-extensions/nautilus-background.c: + (nautilus_background_initialize_class), + (nautilus_background_set_combine_mode), + (nautilus_background_ensure_image_scaled), + (nautilus_background_load_image_callback), + (nautilus_background_start_loading_image), + (nautilus_background_set_image_uri_helper), + (nautilus_background_set_image_uri), + (set_image_and_color_image_loading_done_callback), + (nautilus_background_set_image_uri_and_color), + (nautilus_background_reset): + * libnautilus-extensions/nautilus-directory-background.c: + (background_changed_callback), (saved_settings_changed_callback), + (background_reset_callback): + * src/nautilus-sidebar-tabs.c: (draw_one_tab_plain): + * src/nautilus-sidebar.c: (receive_dropped_color), + (background_settings_changed_callback), + (background_reset_callback), (nautilus_sidebar_update_appearance), + (background_metadata_changed_callback), (nautilus_sidebar_set_uri): + Fixed various issues with dropping colors on the sidebare. + Osetensibly, the problem was with dropping white - bug 4880. + +2000-12-04 Gene Z. Ragan + + Fixed broken build. + + * components/help/converters/gnome-db2html2/sect-preparse.c: + (sect_preparse_figure_start_element), + (sect_preparse_acronym_characters), (gloss_term_append): + File had typos, missing and extra punctuation. The code did not + even compile. Now it does. + +2000-12-04 Ali Abdin + + * components/help/converters/gnome-db2html2/sect-preparse.c: + * components/help/converters/gnome-db2html2/gdb3html.h: + (sect_preparse_glossterm_characters), + (sect_preparse_acronym_characters), + (sect_preparse_glossterm_start_element), + (sect_preparse_glossterm_end_element), + (gloss_term_append): + Changed around the glossary a bit (partial fix for a bug). Leaks some + memory though. + +2000-12-04 Gene Z. Ragan + + reviewed by: Pavel Cisler + + Fixed bug 645, nautilus_file_rename should handle path separators sensibly + + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_rename): + Check for the presence of the "/" path separator charcter. If one + exists, return an error. + + * src/file-manager/fm-error-reporting.c: + (fm_report_error_renaming_file): + Add a case to report an error if an illegal name has been specified + for the file to renamed to. + +2000-12-04 John Sullivan + + reviewed by: Gene Z. Ragan + + Fixed bug 4931 ("Can't display files of this type" + message is inaccurate in some cases) + + * src/nautilus-window-manage-views.c: + (nautilus_window_end_location_change_callback): + Reworded the error message when there's no viewer for a + file to not mention the file type, since the file type + might not have anything to do with why no viewer could be + found. For example, clicking on a remote RPM was getting a + message implying that Nautilus had no viewer capable of + displaying RPM files in general, whereas in fact it has a + viewer that can display RPM files, but only if local. This + is the simplest way to address this problem; see bugs + 4932 and 4933 for better but harder-to-implement solutions. + +2000-12-04 Pavel Cisler + + reviewed by: Maciej Stachowiak + + * src/file-manager/fm-directory-view.c: (create_link_callback), + (offset_drop_points), (fm_directory_view_create_links_for_files): + Fixed 4946 - Create link consistently crashes Nautilus. + Fixed it by implementing the proper positioning code for creating + symbolic links from a context menu, copying the logic from the + "Duplicate selection" code path. + +2000-12-03 Eskil Heyn Olsen + + * components/services/install/lib/eazel-softcat.c: + (eazel_softcat_initialize): + Default some of the private attributes to sane values. + +2000-12-02 Robert Brady + + * configure.in (ALL_LINGUAS): Add ta (Tamil). + +2000-12-01 Andy Hertzfeld + + * src/nautilus-property-browser.c: (category_clicked_callback): + fixed bug 4937, changing pane in remove mode crashes Nautilus, + by exiting remove mode when switching categories. + +2000-12-01 Andy Hertzfeld + + * src/nautilus-window-toolbars.c: (theme_changed_callback): + fixed bug where throbber was mispositioned after theme changes by + forcing a toolbar resize when the theme changes. + + * icons/eazel/i-directory.xml: + tweaked folder emblem positions + +2000-12-01 Maciej Stachowiak + + * components/tree/nautilus-tree-view.c + (nautilus_tree_view_insert_model_node): Fix bug 4930 (Tree sidebar + panel doesn't expand remembered directories until second window is + opened) by making sure to expand directories that should be + expanded when initially inserting nodes, not just updating. + +2000-12-01 Eskil Heyn Olsen + + Migrated more code into eazel-package-system and finished + eazel-package-system-rpm3 (except for verify). This fixes 4858, + 4851. + + * components/services/install/command-line/eazel-test-packsys.c: + (test_packagelist_prune), (test_package_load), (get_password_dude), + (init_package_system), (test_matches_query), (get_package_list), + (start_signal), (end_signal), (progress_signal), (is_installed), + (test_install), (test_uninstall), (test_verify), (main):D + All the code for the packagesytem test programs. It does test- + queries, install and uninstall. + + * components/services/install/lib/Makefile.am: + Moved softcat .h's files into + includedir/libtrilobite/eazel/package-sytem/ + + * components/services/install/lib/eazel-install-corba-callback.c: + (eazel_install_callback_initialize): + Fixed the IDL rename, which broke the eazelinstall init. + + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_start_transaction): + Some comments about codepieces that needs removal. + + * components/services/install/lib/eazel-install-types.h: + * components/services/install/lib/eazel-install-types.c: + (packagedata_get_readable_name), (packagedata_get_name): + Changed get_readable's names output for rpmid's. + Added a function that returns name-version-release names. + + * components/services/install/lib/eazel-package-system-rpm3.h: + * components/services/install/lib/eazel-package-system-rpm3.c: + (make_rpm_argument_list), (destroy_string_list), + (rpm_make_names_to_package_hash), (clear_name_to_package), + (get_total_size_of_packages), (monitor_rpm_process_pipe), + (rpm_create_db), (rpm_create_dbs), (rpm_open_db), (rpm_open_dbs), + (rpm_close_db), (rpm_close_dbs), (rpm_free_db), (rpm_free_dbs), + (rpm_packagedata_fill_from_rpm_header), + (rpm_packagedata_fill_from_file), (rpm_packagedata_new_from_file), + (eazel_package_system_rpm3_load_package), + (eazel_package_system_rpm3_query_impl), + (eazel_package_system_rpm3_query_substr), + (eazel_package_system_rpm3_query_foreach), + (eazel_package_system_rpm3_query), (display_arguments), + (monitor_subcommand_pipe), (eazel_package_system_rpm3_execute), + (eazel_package_system_rpm3_install_uninstall), + (eazel_package_system_rpm3_install), + (eazel_package_system_rpm3_uninstall), + (eazel_package_system_rpm3_verify), + (eazel_package_system_rpm3_finalize), + (eazel_package_system_rpm3_initialize), + (eazel_package_system_rpm3_new), + (eazel_package_system_implementation): + Finished the rpm3 library. + + * components/services/install/lib/eazel-package-system-private.h: + * components/services/install/lib/eazel-package-system.h: + * components/services/install/lib/eazel-package-system.c: + (eazel_package_system_load_implementation), + (eazel_package_system_load_package), (eazel_package_system_query), + (eazel_package_system_install), (eazel_package_system_uninstall), + (eazel_package_system_verify), (eazel_package_system_emit_start), + (eazel_package_system_emit_progress), + (eazel_package_system_emit_failed), + (eazel_package_system_get_debug), (eazel_package_system_set_debug), + (eazel_package_system_class_initialize), + (eazel_package_system_initialize), + (eazel_package_system_marshal_BOOL__ENUM_POINTER_POINTER), + (eazel_package_system_marshal_BOOL__ENUM_POINTER): + Fixed the usual signal bloopers, added the arguments to _new that + lets the system get it's dbpaths/root sets, fixed other small bugs. + + * components/services/install/lib/eazel-package-system-skeleton.h: + * components/services/install/lib/eazel-package-system-skeleton.c: + (eazel_package_system_skeleton_query), + (eazel_package_system_skeleton_install), + (eazel_package_system_skeleton_uninstall), + (eazel_package_system_skeleton_verify), + (eazel_package_system_skeleton_new), + (eazel_package_system_implementation): + Updated the skeleton library. + +2000-12-01 Robin * Slomkowski + + * nautilus.spec.in: added libeazelsoftcat libs + +2000-12-01 John Sullivan + + reviewed by: Pavel Cisler + + Worked around without fixing cause of bug 2151 (crash in + Undo manager on quit). We can defer fixing the bug properly + until we have Undo working again. + + * libnautilus-extensions/nautilus-undo-signal-handlers.c: + (nautilus_undo_editable_set_undo_key): Added FIXMEs with bug + number 3515 ("Undo doesn't work"). + * src/nautilus-shell-ui.xml: Added FIXME with bug number 3515. + + * src/file-manager/fm-properties-window.c: (create_basic_page), + (create_properties_window_callback): #ifdeffed out undo code + and added FIXME with bug number 2151. + +2000-12-01 Pavel Cisler + + reviewed by: Darin Adler + + * libnautilus-extensions/nautilus-file-operations.c: + (progress_dialog_set_to_from_item_text), (handle_xfer_ok), + (handle_xfer_vfs_error), (handle_xfer_overwrite), (get_link_name), + (nautilus_file_operations_copy_move), + (nautilus_file_operations_new_folder), + (nautilus_file_operations_move_to_trash), + (nautilus_file_operations_delete), (do_empty_trash): + + Fixed 3392 - Messages in nautilus-file-operations hard to localize. + + Replaced all the cases that did "clever" string composition from + parts depending on the specific file operation with full texts of + the respective error alerts and progress dialog label texts and + titles. + Changed action_verb to action_label. + Got rid of progress_dialog_set_files_done_text because the the + "Files copied:" etc. label is no longer composed. + Added switch statements in handle_xfer_vfs_error that choose the + right error text based on the xfer operation kind. + + Fixed 3139 - Add comments to all the localizable strings to make them + easier to localize. + + * libnautilus-extensions/nautilus-file-operations.c: + (icon_position_iterator_new), + * libnautilus-extensions/nautilus-file-operations.h: + (nautilus_file_operations_copy_move), + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_get_icon_locations), + (nautilus_icon_container_get_selected_icon_locations): + * libnautilus-extensions/nautilus-icon-container.h: + * libnautilus-extensions/nautilus-icon-dnd.c: + (handle_nonlocal_move), (nautilus_icon_container_find_drop_target): + * libnautilus-extensions/nautilus-icon-private.h: + * src/file-manager/fm-directory-view.c: + (fm_directory_view_initialize_class), (duplicate_callback), + (fm_directory_view_create_links_for_files), (offset_drop_points), + (fm_directory_view_duplicate_selection), + (fm_directory_get_selected_icon_locations), + (fm_directory_view_move_copy_items): + * src/file-manager/fm-directory-view.h: + * src/file-manager/fm-icon-view.c: + (fm_icon_view_get_selected_icon_locations), + (fm_icon_view_set_selection), (fm_icon_view_initialize_class), + (icon_view_move_copy_items): + * src/file-manager/fm-list-view.c: (fm_list_view_initialize_class), + (fm_list_view_get_selected_icon_locations), + (fm_list_view_sort_items): + + Fixed 2817 - when you duplicate a file, it doesn't end up in the correct + position. + + Redid the icon position array to use GArray instead of a simple vector of + GdkPoints. GArray contains the count of all the contained points + which is now needed. + Added new calls to get the icon locations of selected icons and + of a list of NautilusIcon objects. + Passed the list of icon locations to the duplicate method. + Added a default signal handler that returns the list of + icon locations of selected icons. + Added code to fm_directory_view_duplicate_selection that + offsets the new duplicates to the left and bottom of the + original item. + + +2000-12-01 John Sullivan + + reviewed by: Pavel Cisler + + Fixed bug 4911 (Crash emptying trash while displaying + properties window for trashed file) + + This crawled out of the woodwork recently, and required + several small fixes here and there to solve it nicely, + including making FMPropertiesWindow a subclass -- + formerly it was just a GtkWindow with a bunch of wired-up + widgets. + + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_get_directory_item_count), + (nautilus_file_get_deep_counts): Allow non-directory items + (files marked gone don't count as directories). Fill in + return values in all cases, even return_if_fail cases. + + * src/file-manager/fm-error-reporting.c: + (fm_report_error_renaming_file): Specific error message for + the case where the file being renamed no longer exists. I + ran into this partway through my changes, tested this fix, + then changed the caller to not hit this case. + + * src/file-manager/fm-properties-window.h: + Standard header stuff now that FMPropertiesWindow is a class + and not just some grouped functions. + * src/file-manager/fm-properties-window.c: + (fm_properties_window_initialize_class), + (fm_properties_window_initialize): Standard functions needed + for class. + (name_field_done_editing): Don't try to rename file that's gone. + (create_group_menu_item), (create_owner_menu_item): + Added some parameter checking. + (synch_groups_menu), (synch_owner_menu): Check for NULL result + from nautilus_file_get_string_attribute before making a menu + item from it (GTK is unhappy with using NULL for a label). + (directory_contents_value_field_update): Soften assert to make + it not fire when file is gone. + (update_permissions_check_button_state): Bail out if file is gone. + (create_properties_window): Create an FMPropertiesWindow instead + of a GtkWindow; set up its Details. + (create_properties_window_callback): Removed signal handler for + "destroy" now that there's a default handler for this class. + (forget_properties_window): Removed function, guts now in + real_destroy. + (real_shutdown): Disconnect file-changed signal here. This is the + core fix of the infinite loop reported in bug 4911. + (real_destroy): Do the stuff formerly done in + forget_properties_window here. + +2000-12-01 Andy Hertzfeld + + * src/nautilus-window.c: (nautilus_window_destroy): + fixed bug 4921, crash when changing sidebar panels preferences + after opening new window, by fixing the call to remove the + preferences callback to have the right callback data. + +2000-12-01 John Fleck + + * nautilus/components/help/converters/gnome-db2html2/gdb3html.h, + sect-elements.c, sect-preparse.c,toc-elements.c: add support for + tag, fixing bug #4378 + +2000-12-01 Maciej Stachowiak + + reviewed by: Pavel Cisler + + * components/tree/nautilus-tree-view.c: + (expand_uri_sequence_and_select_end): Avoid forcing a reload of a + node while trying to find a location to select unless we get + stuck; and even then, do only a shallow force reload, not a deep + force reload. This fixes bug 4890 (Tree view makes normal + navigation very slow if a large directory is expanded). + (reload_model_node_recursive): Renamed from `reload_model_node' to + make clear that it will also reload all expanded subnodes. + (reload_model_node): Non-recursive version of + `reload_model_node_recursive'. + (reload_whole_tree, expand_node_for_file): Use + `reload_model_node_recursive' instead of the new non-recursive + version. + (nautilus_tree_view_remove_model_node, + (nautilus_tree_view_update_model_node): Added ifdef'd-out + debugging text for future use. + +2000-11-30 Maciej Stachowiak + + reviewed by: Robey Pointer + + * components/tree/nautilus-tree-model.c (report_node_changed): + Don't do anything if we don't know the file type yet, since this + may cause directories to mistakenly lose their children. This + fixes bug 4912 (Nautilus crashes in tree code when multiple + windows are open). + + * components/tree/nautilus-tree-view-private.h: Remove unused + file_to_hack_node_map field from details struct. + +2000-11-30 Robey Pointer + + * components/rpmview/Makefile.am: + * components/services/install/command-line/Makefile.am: + * components/services/install/nautilus-view/Makefile.am: + * components/services/install/server/Makefile.am: + + Everyone that uses libeazelinstall now needs to use + libeazelsoftcat too. This doesn't make much sense for the rpm + view, but we've shelved that issue for later. + + * components/services/install/command-line/eazel-test-softcat.c: + (main): + + New test program (eazel-softcat) to perform primitive softcat + queries and check the results. + + * components/services/install/lib/eazel-install-protocols.c: + (eazel_install_fetch_package): + + Removed get_search_url_for_package and get_url_for_package: they + now belong to libesc. + + * components/services/install/lib/eazel-install-types.c: + (eazel_install_protocol_as_string), (packagedata_new), + (packagedata_copy), (packagedata_fill_in_missing), + (packagedata_destroy), (gstr_indent), (dump_package_list), + (packagedata_dump_int), (packagedata_dump): + * components/services/install/lib/eazel-install-types.h: + + Add "features" field which is a GList of features this + package resolves for its parent. Moved fill_in_missing here since + it's PackageData-centric. Added debugging function for dumping a + PackageData into a human-readable string. + + * components/services/install/lib/eazel-install-xml-package-list.c: + (osd_parse_list), (osd_parse_dependency), + (osd_parse_implementation), (osd_parse_softpkg), + (eazel_install_packagelist_parse): + * components/services/install/lib/eazel-install-xml-package-list.h: + + Parse the "provides" list from softcat: this will change once + softcat finishes revising their XML format, but we need something + to work with for now. Pull out other values like the Eazel id, + and tie "abstract" to summary instead of description. Fix the OSD + parser so that we can distinguish an error return from an empty + package list. + + * components/services/install/lib/eazel-softcat-private.h: + * components/services/install/lib/eazel-softcat.c: + (eazel_softcat_initialize), (eazel_softcat_new), + (eazel_softcat_set_server), (eazel_softcat_get_server), + (eazel_softcat_set_cgi_path), (eazel_softcat_get_cgi_path), + (eazel_softcat_set_authn), (eazel_softcat_get_authn), + (eazel_softcat_set_retry), (eazel_softcat_error_string), + (sense_flags_to_softcat_flags), (gnome_vfs_escape_string), + (add_to_url), (verify_softcat_fields), + (get_search_url_for_package), (eazel_softcat_get_info): + * components/services/install/lib/eazel-softcat.h: + + Actually implement a good chunk of the softcat library. + + * components/services/trilobite/libtrilobite/trilobite-core-distrib + ution.c: (trilobite_get_distribution_enum), + (trilobite_get_distribution_arch): + * components/services/trilobite/libtrilobite/trilobite-core-distrib + ution.h: + + Move architecture detection here. + + * components/services/trilobite/libtrilobite/trilobite-core-utils.c + : (trilobite_fetch_uri), (trilobite_init), + (trilobite_set_debug_mode), (trilobite_set_log_handler): + * components/services/trilobite/libtrilobite/trilobite-core-utils.h + : + + Split out log handling so that test programs can trap trilobite + log entries. + +2000-11-30 Rebecca Schulman + Fixed bug 3750, to make cut/copy/paste work + in the complex search bar + + reviewed by: Maciej Stachowiak + + * src/nautilus-complex-search-bar.h: + * src/nautilus-complex-search-bar.c: + (nautilus_complex_search_bar_new), + Set up the first criterion after we create + the bar. + (nautilus_complex_search_bar_set_up_enclosed_entry_for_clipboard): + add a second procedure that new criteria with entries call + when they are added. + * src/nautilus-search-bar-criterion.c: + (nautilus_search_bar_criterion_new_with_type): + set an entry up for the clipboard, if one exists. + +2000-11-30 Mike Fleming + + reviewed by: ramiro@eazel.com + + * components/mozilla/nautilus-mozilla-content-view.c: + (nautilus_mozilla_content_view_initialize), + (mozilla_net_state_callback), (mozilla_net_stop_callback), + (mozilla_progress_callback): + + fix bugzilla.eazel.com 4113: + Some web pages never finish loading (throbber spins) + + Instead of replying on "max_progress == cur_progress" + doing mozilla_progress_callback, stop throbber on a "net_stop" + signal. Galeon uses "net_stop" for this functionality as well. + +2000-11-30 Darin Adler + + Ran check-headers-in-Makefile since we had some problems + with that lately. I guess the Tinderbox is the new way to + catch these problems but I couldn't resist fixing them + the old way too. + + * check-headers-in-Makefile.pl: Added some more special cases + in here to make it work better. + + * components/services/install/nautilus-view/Makefile.am: + Marked the unused files in here as "noinst_HEADERS" as a hack + to make the script happy. We should delete the files at some + point if we decide we aren't ever using them. + + * components/loser/content/.cvsignore: + * components/loser/sidebar/.cvsignore: + * components/mozilla/.cvsignore: + * components/sample/.cvsignore: + * components/services/install/command-line/.cvsignore: + * libnautilus/.cvsignore: + * src/.cvsignore: + * src/file-manager/.cvsignore: + Removed all the .xml.h files because they aren't put in these + directories any more so they don't need to be ignored. If you + have the files still and the cvs warnings bother you, you can + delete them. + +2000-11-30 Andy Hertzfeld + + * components/image-viewer/nautilus-image-view.c: + (zoomable_zoom_in_callback): + fixed bug in image viewer where zooming in skipped a level if you + were zoomed to fit. Fixed by only incrementing the index if we're + already at the current level. + +2000-11-30 Gene Z. Ragan + + Fixed bug 4879, "unknown sort mode" warning upon sorting + by "Time" column. + + The problem was caused by the sort mode enumeration being + out of sync with the number of columns. As a result + most sorts were being done incorrectly with the wrong + sort function. A new SORT_BY_YEAR entry was added to + the sort enumeration to fix the problem. + + * components/music/nautilus-music-view.c: + (sort_song_list): + Add SORT_BY_YEAR case to switch statement. + + (sort_by_year): + New sort function to sort by year. + +2000-11-30 Gene Z. Ragan + + Fixed bug 3891, Repeatedly clicking the "Play" button + crashes Nautilus. + + * components/music/nautilus-music-view.c: + (play_button_callback): Don't start playback machinery + if a file is already playing. + + * components/music/mpg123_handler.c: (start_playing_file): + Add check for playback before starting playback of another + file. + +2000-11-30 Gene Z. Ragan + + Fixed bug 3888, Deleting an MP3 file while in use -> Nautilus crashes + + Added a check for the existence of a file before beginning playback. + If the file is no longer available, remove the file form the + song list and attempt to play the next file in the song list. + + * components/music/nautilus-music-view.c: + (nautilus_music_view_initialize), (play_current_file): + +2000-11-30 John Sullivan + + reviewed by: Rebecca Schulman + + Fixed bug 4899 (Bookmark for nonexistent file can cause + infinite loop at startup) + + Changed NautilusBookmark's internal logic so that it doesn't + keep around a file object for known non-existent URIs. The + trick is to get it to notice when the URI is no longer non-existent + and get a fresh file object then. This is done imperfectly, but + the new symptom is very minor and deferrable (wrote it up as bug 4906). + + * libnautilus-extensions/nautilus-bookmark.c: + (nautilus_bookmark_connect_file): Don't get a new NautilusFile + object if we know the URI doesn't exist; instead just set the + missing-bookmark icon. Also made it safe to call this routine + when there's already a file object in hand (just bails out early). + (nautilus_bookmark_get_icon), (nautilus_bookmark_get_uri): + Call nautilus_bookmark_connect_file so that it will connect to a + now-existing file if possible (and thus get the right icon). + Since callers that try to activate the bookmark will call get_uri, + one way to kick a reincarnated bookmark's icon into appearing is + to select it in a menu. + (nautilus_bookmark_get_pixbuf): Call nautilus_bookmark_get_icon to + benefit from its connect_file logic. + + + Fixed bug 3847 (Icon in properties window flashes while + folder count increments) + + * libnautilus-extensions/nautilus-image.c: + (nautilus_image_set_pixbuf): Don't call gtk_widget_queue_resize if + the pixbuf hasn't changed. + + + Fixed bug 1454 (Properties dialog needs mucho tweaking) + + Mostly this was changes to match Arlo's design that he gave me + ages ago. I also fixed a few other problems. + + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_get_date_as_string): Change format of date + strings from "

      + rather than
        + +2000-11-02 John Fleck + * updating gnome-db2html2/toc-elements.c to improve help + documentation table of contents display + +2000-11-02 Rebecca Schulman + Clean up some of the "human" strings for search uris, + mostly so the translation scheme doesn't fail and + leave a search uri sitting around + + * libnautilus-extensions/nautilus-search-uri.c: + update structures to correspond to latest search uri + spec + * nautilus-clean.sh: + removed mpg123 (it kept interrupting my cds) and + a duplicate summary view copy + +2000-11-01 Andy Hertzfeld + + * icons/villanova/Makefile.am: + * icons/villanova/villanova.xml: + * icons/villanova_green.png: + Susan changed the background image for the icon view of + the villanova theme + + * icons/i-blockdev.png: + better hard disk for hardware view + * components/hardware/nautilus-hardware-view.c: + (setup_overview_form): + improved layout of IDE items + +2000-11-01 Eskil Heyn Olsen + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_install_service_locate_menu_entries): + Just to make sure, I don't think tinderbox got my change... + +2000-11-01 Eskil Heyn Olsen + + * components/services/install/command-line/eazel-alt-install-corba. + c: (delete_files), (done), (main): + Now has a --batch command to it doens't need userinteraction + --batch=yes|no to set the default answer to continue ? + questions. Using --batch defaults the answer to delete to yes. Now + delete works again (after Great Delete Change) + + * components/services/install/lib/eazel-install-problem.c: + (get_detailed_cases_foreach): + Fixed potiental sigsegvs. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_install_service_locate_menu_entries): + Fixed a compiler warning that broke build. + +2000-11-01 Eskil Heyn Olsen + + * components/services/install/command-line/eazel-alt-install-corba. + c: (main): + Fixed 4331. + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_download_packages), + Checked if a toplevel package is a source package + (eazel_install_prune_packages_helper), + (eazel_install_check_if_depends_on), + (eazel_install_do_transaction_fill_hash), + (eazel_install_prune_packages), + (eazel_install_ensure_deps), + Commented out/changed some debug output + (eazel_install_fetch_dependencies), + Changed the debug output in case of circular dependency, also + added a check for source packages. + (eazel_install_start_transaction): + Commented out the debug output of the rpm args + + * components/services/install/lib/eazel-install-problem.c: + (get_detailed_messages_foreach), + Detect source package. + (eazel_install_problem_tree_to_case): + Removed debug output. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_service_install_view_initialize), + (nautilus_service_install_installing), + (nautilus_service_install_done), + Improved the updating of nautilus from natilus, by actually + offering to restart nautilus (and doing it if the user wants to) + (nautilus_install_service_locate_menu_entries): + If I can't figure out where the desktop files are, don't print + "blabla is somewhere..." + + * nautilus.spec.in: + Added usermode >= 1.35 for nautilus-trilobite + + * po/da.po: + * po/no.po: + Removed the fatal Control*t translation. + + * src/file-manager/fm-directory-view.c: + (reset_bonobo_trash_delete_menu): + Added a comment for the translation teams to not translate + Control*t at this point. + + * src/nautilus-shell.c: (save_window_states): + When saving windowstates, replace any window->location that starts + with eazel-install: with eazel:, thereby preventing loops when + eazel-install: views restart nautilus. + +2000-11-01 Andy Hertzfeld + + * src/nautilus-first-time-druid.c: (initiate_file_download): + fixed bug 1826 by pointing the update download uri to it's + real location at services.eazel.com. + + * src/nautilus-window-manage-views.c: (just_one_window), + (nautilus_window_end_location_change_callback): + fixed bug 4351, nautilus quits after running the first time + druid if services are inaccessible. Fixed by making it + not quit if there's a single window that fails, going to + the home directory (if it's valid) instead. + + * icons/loading.png: + a better version of the non-anti-aliased loading icon from Susan. + +2000-11-01 Robey Pointer + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (set_dialog_parent): + + Fix corner case where dialog won't be parented if services are + down. + +2000-11-01 Darin Adler + + * src/nautilus-window-service-ui.c: (goto_services_support): + Remove FIXME for already-fixed bug. + * src/run-nautilus: Add Debian-specific hack requested in + bug report (bug 4353). + +2000-11-01 Maciej Stachowiak + + * libnautilus-extensions/nautilus-mime-actions.h, + libnautilus-extensions/nautilus-mime-actions.c: + (nautilus_mime_actions_file_needs_full_file_attributes, + server_has_content_requirements, + server_matches_content_requirements): New functions. + + (nautilus_mime_get_all_components_for_file) Updated. + + * src/nautilus-applicable-views.h, + src/nautilus-applicable-views.c: (got_file_info_callback_common, + (got_full_file_info_callback, got_minimum_file_info_callback, + nautilus_navigation_info_new, nautilus_navigation_info_cancel): + Changed to possibly handle calling the callback twice so we can + avoid having to load twice before showing a component at all. + + * src/nautilus-window-manage-views.c + (nautilus_window_end_location_change_callback): If being called a + preliminary time, ignore it for now. + +2000-11-01 Robey Pointer + + * components/services/install/lib/eazel-install-metadata.c: + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_service_install_view_update_from_uri): + * components/services/login/nautilus-view/nautilus-change-password- + view.c: (start_change_password): + * components/services/trilobite/libtrilobite/libtrilobite.h: + * components/services/trilobite/libtrilobite/trilobite-redirect.c: + * nautilus-installer/src/installer.c: + + Fix builtin uri's to point to a sane place by default. Make the + install view use your trilobite gconf config and not a made-up + site (oops). Remove leftover "eazel-auth:" uri. Use good PR2 + defaults for the bootstrap installer. Fix missing ellipses that + were bothering Eli. + +2000-11-01 Darin Adler + + Fixed bug 4335 (music view does not work with Services:Vault) + + * components/music/nautilus-music-view.oafinfo: + Added the requirement that the URL must be file scheme, since + the music view doesn't know how to deal with MP3s that are not + on the local hard disk. + +2000-11-01 John Sullivan + + Fixed bug 4343 (crash clicking "Back" deep in software catalog) + + This was an inaccurate assert. Other similar asserts had been + fixed earlier, but this one and a parallel one in Forward got + overlooked. + + * src/nautilus-window-manage-views.c: + (check_bookmark_location_matches_uri): New helper function, uses + uris_match. + (check_last_bookmark_location_matches_window): Now calls the + new function (which was extracted from this) + (handle_go_back), + (handle_go_forward): Use the new function to check that the bookmark + has the right uri, instead of direct string compares. + +2000-11-01 Mathieu Lacage + + * nautilus.spec.in: adding fdl. + * user-guide/C/Makefile.am: adding installation of fdl + * user-guide/C/fdl.sgml: adding fdl + +2000-11-01 Gene Z. Ragan + + Fixed bug 4337, Title for nautilus user manual is "GNOME Documemtation" + + * user-guide/C/sgml/nautilus.sgml: + Added "Nautilus User Manual" as tag. + +2000-11-01 Darin Adler <darin@eazel.com> + + Fix bug 4305 (Nautilus can't find myplay.com (default bookmark) + URL). As Mike Fleming and Pavel suggested, changed NautilusFile to + keep relative URIs around instead of file names. This may also fix + two other Mozilla-component-related bugs, bug 3438 and 4220. I'll + check that later. + + Also fix bugs 4128, 4311, and 4344, which are all about a hash + table NULL critical assertion. + + * libnautilus-extensions/nautilus-directory-async.c: + (dequeue_pending_idle_callback): Handle info in the order it gets + queued. That requires a call to g_list_reverse since we add things + with g_list_prepend. Check for NULL to handle case where the info + is not part of a directory load. Use the new + nautilus_directory_find_file_by_name to keep it clearly separate + from code that would find files given relative URIs. + + * libnautilus-extensions/nautilus-directory-private.h: RIP + nautilus_compare_file_with_name. We haven't used it since we've + been using a hash table. + + * libnautilus-extensions/nautilus-directory.c: + (add_to_hash_table): Put the relative URI in the hash table, not + the name. + (extract_from_hash_table): Look up in the hash table by relative + URI, not name. + (nautilus_directory_add_file), (nautilus_directory_remove_file): + Assertions are based on the relative URI, not the name. + (nautilus_directory_find_file_by_name): Turn the name into a + relative URI and search for that. + (nautilus_directory_find_file_by_relative_uri): Look up in the + hash table by relative URI, not name. + + * libnautilus-extensions/nautilus-file-private.h: Replace the name + field with a relative_uri field. There aren't always names for + files. + + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_new_from_relative_uri): Mechanical changes to make + it create a file given a directory and relative_uri. Uses the new + update_info_and_name instead of the old nautilus_update_file_info + (which no longer updates names). + (nautilus_file_new_from_info). Use the new update_info_and_name + instead of the old nautilus_update_file_info (which no longer + updates names). + (nautilus_file_get_internal): Call nautilus_uri_make_canonical on + the URI before using it. This is needed now to make the escaping + of characters in the relative URI uniform. Also made mechanical + changes to deal with relative URIs instead of file names. + (destroy): Always free the relative URI. We no longer share the + name inside the file info, so the logic is now simpler. + (nautilus_file_get_gnome_vfs_uri): Append the relative URI instead + of appending a file name to make the full URI. + (rename_callback): Use the new update_info_and_name instead of the + old nautilus_update_file_info (which no longer updates + names). Also call nautilus_find_file_by_name under its new name. + (name_is): New helper function for checking the file name quickly + without requiring a local variable. + (nautilus_file_rename): Use name_is instead of strcmp since the + name is no longer so readily available. + (update_info_internal): Moved the guts of nautilus_file_update_info + in here and made the name-updating part optional. Logic is a bit + simpler since we don't share the name in the file info any more. + (update_info_and_name), (nautilus_file_update_info): Covers that + call the internal call with the "update_name" flag set. + (nautilus_file_update_name): Use name_is and update_info_and_name. + Also fix the info == NULL case to handle relative URIs, not names. + (nautilus_file_compare_for_sort): Add a FIXME about using the name + in the info when sorting. Also change the info == NULL case to get + the names with nautilus_file_get_name. + (nautilus_file_compare_name): Use nautilus_file_get_name to get + the names to compare. + (nautilus_file_get_metadata), (nautilus_file_get_metadata_list), + (nautilus_file_set_metadata), (nautilus_file_set_metadata_list), + (nautilus_file_get_boolean_metadata), + (nautilus_file_get_integer_metadata), + (nautilus_file_set_boolean_metadata), + (nautilus_file_set_integer_metadata): Store metadata using the + relative URI as the key instead of the name. This amounts to a + minor metadata file format change. + (nautilus_file_get_name): Create the name by unescaping the + relative URI. If this fails, just return the relative URI + itself. In some cases the URI instead of the name would represent + a terrible error (but the unescaping will not fail in those + cases), but in other cases we just need some kind of name. + (nautilus_file_get_uri): Some broken code in here was just + appending the name to the parent URI. Now it appends the relative + URI so it's no longer broken. + (get_description): Use the relative URI instead of the name in the + warning message. + (nautilus_file_mark_gone): Since we always keep the relative URI + around now, can get rid of the logic that copies the name out of + the file info for this case. + (nautilus_file_dump): Since we already dump the URI, don't bother + dumping the name any more. + +2000-11-01 Ramiro Estrugo <ramiro@eazel.com> + + * libnautilus-extensions/nautilus-image.c: (render_buffer_pixbuf): + Change '=+' to the more common '+=' when adding integers. + +2000-11-01 John Fleck <jfleck@inkstain.net> + + * change to sect-elements.c in gnome-db2html2 to change display of + <note> elements + +2000-11-01 Ramiro Estrugo <ramiro@eazel.com> + + * libnautilus-extensions/nautilus-global-preferences.c: + (global_preferences_register): + Make smooth graphics mode be false by default as agreed for pr2. + +2000-11-01 Ramiro Estrugo <ramiro@eazel.com> + + * applets/launcher/nautilus-launcher-applet.c: (image_enter_event), + (window_set_cursor_for_state), (set_is_launching), + (get_is_launching), (image_button_press_event), + (image_button_release_event), (event_filter), + (root_listen_for_property_changes), (main): + Keep track of NautilusWindow realization events. Do this by + monitoring a property on the root window. Use this flag in order + to give the user feedback about the launching state of new + Nautilus windows. Fixes bug 4300. + + * src/nautilus-window.c: (nautilus_window_update_launcher), + (nautilus_window_realize): + Notify the launcher when a NautilusWindow get realized. + + * src/run-nautilus: + If no arguments are given, then open a window pointed to the + user's home directory. + +2000-11-01 Pavel Cisler <pavel@eazel.com> + + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_make_uri_canonical), + (nautilus_self_check_file_utilities): + Hook up new GnomeVFS "make canonical" calls to fix test cases + Darin needed to work for the bug he is fixing. + Switched the test cases to their intended values, now that they pass. + Get rid of some crufty workarounds that weren't really needed + after my previous fix to not add extra '//' to some URIs and + removed the respective tests. + +2000-11-01 Mathieu Lacage <mathieu@eazel.com> + + This is completely useless but I needed a break from "usefull" + bugs. + * applets/launcher/nautilus-launcher-applet.c: (image_leave_event), + (image_button_press_event), (image_button_release_event), (main): + Add an event handler for release event to make sure we launch + nautilus only if you release the cursor without leaving the icon. + Add an offset when you click to give the user feedback about what + he is doing. + * libnautilus-extensions/nautilus-image.c: (render_buffer_pixbuf): + Fix offset problem when drawing image: the offset was not taken + into account in the calculation of the x and y coordinates. + +2000-10-31 Robey Pointer <robey@eazel.com> + + * nautilus-installer/src/Makefile: + * nautilus-installer/src/main.c: (main): + * nautilus-installer/src/proxy.c: (load_nscp_proxy_settings), + (load_galeon_proxy_settings): + * src/nautilus-first-time-druid.c: (load_nscp_proxy_settings), + (load_galeon_proxy_settings), (attempt_http_proxy_autoconfigure): + + Fix installer version to follow the Makefile define. Fix evil bug + in detecting proxy servers that was freeing g_get_home_dir + results. Fixed it again in the first-time druid, and added Galeon + support there. + +2000-10-31 Robey Pointer <robey@eazel.com> + + * nautilus-installer/src/Makefile: + * src/nautilus-window-service-ui.c: (goto_services_support): + + Fix bootstrap installer for new Makefile config and fix typo in + dropdown menus. + +2000-10-31 Ramiro Estrugo <ramiro@eazel.com> + + * applets/launcher/Makefile.am: + Add missing includes. + +2000-10-31 Ramiro Estrugo <ramiro@eazel.com> + + * Makefile.am: + Add applets to SUBDIRS if needed. + + * applets/Makefile.am: + Tiny bit of cleanup. + + * configure.in: + Define HAVE_APPLETS only if the applets devel libs are found by + gnome-config. + +2000-10-31 Ramiro Estrugo <ramiro@eazel.com> + + * components/mozilla/nautilus-mozilla-content-view.c: + (nautilus_mozilla_content_view_load_uri), + (mozilla_content_view_one_time_happenings): + Remove a rogue printf. Also fix a broken debug printf. + +2000-10-31 Andy Hertzfeld <andy@eazel.com> + + * icons/Makefile.am: + * icons/loading.png: + * icons/loading-aa.png: + * libnautilus-extensions/nautilus-icon-factory.c: + (nautilus_icon_factory_get_icon_for_file): + added a new "loading thumbnail" icon from Susan + + * src/nautilus-property-browser.c: + (nautilus_property_browser_delete_event_callback), + (cancel_remove_mode), (add_new_button_callback), + (done_button_callback): + made the property browser reset remove mode when it's dismissed + +2000-10-31 Mathieu Lacage <mathieu@eazel.com> + + * nautilus.spec.in: add gnorba file in specfile. + +2000-10-31 Mathieu Lacage <mathieu@eazel.com> + + * applets/launcher/Makefile.am: add .gnorba file. + * applets/launcher/nautilus-launcher-applet.c: (main): fix typo. + * applets/launcher/nautilus-launcher-applet.gnorba: new gnorba file. + +2000-10-31 Ramiro Estrugo <ramiro@eazel.com> + + * applets/launcher/.cvsignore: + Use the right binary name. + +2000-10-31 Robey Pointer <robey@eazel.com> + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_install_parse_uri), + (nautilus_service_install_view_update_from_uri): + + Support [ username "@" ] in the eazel-install: URI so that a + username can be specified (like anonymous) to libeazelinstall. + + * components/services/trilobite/libtrilobite/trilobite-core-utils.c + : (trilobite_init): + + Don't free the result of g_get_home_dir(), because it unleashes + 1000 demons. + + * nautilus-installer/src/installer.c: (create_what_to_do_page), + (eazel_installer_add_category): + + Change the "what to install" header for the single-category case. + +2000-10-31 Darin Adler <darin@eazel.com> + + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_self_check_file_utilities): Add the new self-checks that + will help Pavel see the minimum I need in a URI canonifying + function. + +2000-10-31 Maciej Stachowiak <mjs@eazel.com> + + * libnautilus-extensions/nautilus-mime-actions.c: + (nautilus_mime_actions_check_if_minimum_attributes_ready), + (nautilus_mime_actions_check_if_full_attributes_ready), + (nautilus_mime_actions_get_minimum_file_attributes), + (nautilus_mime_actions_get_full_file_attributes), + (nautilus_mime_actions_wait_for_full_file_attributes), + (nautilus_mime_get_default_action_type_for_file), + (nautilus_mime_get_default_action_for_file), + (nautilus_mime_get_default_application_for_file_internal), + (nautilus_mime_get_default_application_for_file), + (nautilus_mime_is_default_application_for_file_user_chosen), + (nautilus_mime_get_default_component_sort_conditions), + (nautilus_mime_get_default_component_for_file_internal), + (nautilus_mime_get_short_list_applications_for_file), + (nautilus_mime_get_short_list_components_for_file), + (nautilus_mime_get_short_list_methods_for_file), + (nautilus_mime_get_all_applications_for_file), + (nautilus_mime_get_all_components_for_file), + (nautilus_mime_set_default_application_for_file), + (nautilus_mime_set_default_component_for_file), + (nautilus_mime_set_short_list_applications_for_file), + (nautilus_mime_set_short_list_components_for_file), + (nautilus_mime_add_application_to_short_list_for_file), + (nautilus_mime_remove_application_from_short_list_for_file), + (nautilus_mime_add_component_to_short_list_for_file), + (nautilus_mime_remove_component_from_short_list_for_file), + (nautilus_mime_extend_all_applications_for_file), + (nautilus_mime_remove_from_all_applications_for_file), + (nautilus_do_component_query): + * libnautilus-extensions/nautilus-mime-actions.h: + * libnautilus-extensions/nautilus-program-chooser.c: + (repopulate_program_list), (is_component_default_for_file), + (program_file_pair_is_default_for_file), + (program_file_pair_is_in_short_list_for_file), + (add_to_short_list_for_file), (remove_from_short_list_for_file), + (remove_default_for_item), (set_default_for_item): + * libnautilus-extensions/nautilus-program-choosing.c: + (any_programs_available_for_file): + * libnautilus/nautilus-clipboard-ui.xml.h: + * src/file-manager/fm-directory-view.c: (switch_location_and_view), + (create_open_with_gtk_menu), (reset_bonobo_open_with_menu), + (activate_callback): + * src/file-manager/nautilus-directory-view-ui.xml.h: + * src/file-manager/nautilus-icon-view-ui.xml.h: + * src/file-manager/nautilus-search-list-view-ui.xml.h: + * src/nautilus-applicable-views.c: (nautilus_navigation_info_new): + * src/nautilus-shell-ui.xml.h: + * src/nautilus-sidebar.c: (nautilus_sidebar_update_all), + (nautilus_sidebar_set_uri): + * src/nautilus-window.c: (nautilus_window_load_content_view_menu): + * test/test-nautilus-mime-actions-set.c: (main): + * test/test-nautilus-mime-actions.c: (main): Un-revert my changes + from before, fixing the bugs in the process. + +2000-10-31 Ramiro Estrugo <ramiro@eazel.com> + + * applets/launcher/Makefile.am: + * applets/launcher/nautilus-icon-applet.c: + * applets/launcher/nautilus-launcher-applet.c: (create_pixbufs), + (applet_change_pixel_size), (image_enter_event), + (image_leave_event), (get_root_window), (root_window_set_busy), + (root_window_set_not_busy), (image_button_press_event), (main): + * nautilus.spec.in: + Rename the launcher applet from 'nautilus-icon-applet' to + 'nautilus-launcher-applet'. + +2000-10-31 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/lib/eazel-install-protocols.c: + (get_eazel_auth_path): + Doh, copied the wrong variable. + +2000-10-31 Ramiro Estrugo <ramiro@eazel.com> + + * applets/launcher/Makefile.am: + * applets/launcher/nautilus-icon-applet.c: (get_root_window), + (root_window_set_busy), (root_window_set_not_busy), + (image_button_press_event), (main): + Add code to execute nautilus. Add first try at adding busy + feedback while launching. + +2000-10-31 Mathieu Lacage <mathieu@eazel.com> + + fix bug 4015. + * libnautilus-extensions/nautilus-global-preferences.c: + add correct default here. + * src/nautilus-window.c: (nautilus_window_go_web_search): + remove bad default here. ramiro has a bug to do the correct + fix post-pr2. + +2000-10-31 Ramiro Estrugo <ramiro@eazel.com> + + * src/run-nautilus: + Remove a bunch of debug echo statements i left in by mistake. + +2000-10-31 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/lib/eazel-install-public.h: + * components/services/install/lib/eazel-install-types.h: + * components/services/install/lib/eazel-install-protocols.c: + (eazel_install_fetch_package), (get_eazel_auth_path), + (get_search_url_for_package): + * components/services/install/lib/eazel-install-metadata.c: + (init_default_transfer_configuration), (transferoptions_destroy): + * components/services/install/lib/eazel-install-object.c: + (eazel_install_initialize): + * components/services/install/command-line/eazel-alt-install-corba. + c: (set_parameters_from_command_line): + * components/services/install/idl/trilobite-eazel-install.idl: + * components/services/install/lib/eazel-install-corba.c: + (impl_Eazel_Install__set_username), + (impl_Eazel_Install__get_username), (eazel_install_get_epv): + Stuff to get/set a username for eazel-service:/ uris. Needed for + 4004 (The Bug Noone Knew What To Do With And Everyone Ignore) + + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_download_packages), + If a package fails, don't silently remove it, but set CANNOT_OPEN + and prune it. + (eazel_install_do_transaction_save_report), + If no transaction dir is set, dont' try and store the report + (eazel_install_check_existing_packages): + Doh! All packages apparently ended at DOWNGRADES, yech. + + * components/services/install/lib/eazel-install-problem.c: + (get_detailed_messages_foreach): + Sane message if file could not be found on server + +2000-10-31 Maciej Stachowiak <mjs@eazel.com> + + * src/nautilus-window-manage-views.c + (nautilus_window_set_sidebar_panels): Call `update_view' on new + sidebar panels that get activated, so they find out about the + location and selection. + +2000-10-31 Ramiro Estrugo <ramiro@eazel.com> + + * applets/Makefile.am: + * applets/launcher/Makefile.am: + * applets/launcher/nautilus-icon-applet.c: (create_pixbufs), + (image_enter_event), (image_leave_event), (main): + Make the applet use the nautilus launcher icon and prelight. + +2000-10-31 Pavel Cisler <pavel@eazel.com> + + * libnautilus-extensions/nautilus-file-operations.c: + (handle_xfer_vfs_error): + Fix 4227 - Trying to copy an unreadable file gives a bogus + error message. + Added code that distinguishes between the read and write phases + of a copy. + +2000-10-31 John Sullivan <sullivan@eazel.com> + +Fixed bug 4334 (changing layout separataes icon from name) +Fixed bug 4332 (Right-click after New Folder separates icon from name) + + * libnautilus-extensions/nautilus-icon-container.c: + (icon_set_position): end renaming mode before changing position + of icon being renamed. + (button_press_event): end renaming mode on any background + context click. + +2000-10-31 Robey Pointer <robey@eazel.com> + + * components/services/install/lib/eazel-install-protocols.c: + (eazel_install_fetch_package): + * nautilus-installer/src/installer.c: (eazel_install_dep_check), + (install_done): + * nautilus-installer/src/installer.h: + + Don't blame RPM if the real error is that services is down. + +2000-10-31 Mathieu Lacage <mathieu@eazel.com> + + * nautilus.spec.in: add applet to the spec file. + * user-guide/C/sgml/chapter-1.sgml: + * user-guide/C/sgml/chapter-2.sgml: + * user-guide/C/sgml/chapter-3.sgml: + * user-guide/C/sgml/nautilus.sgml: + update the sgml files. + +2000-10-31 Robin * Slomkowski <rslomkow@eazel.com> + + * src/nautilus-window.c: set the url to fix 4015 + but it does not Nautilus attempts to connect to the + wrong URL. http://www.eazel.com/websearch instead of + http://services.eazel.com/websearch + +2000-10-31 Mathieu Lacage <mathieu@eazel.com> + + add new directories. + * applets/.cvsignore: + * applets/launcher/.cvsignore: + * applets/Makefile.am: + * applets/launcher/Makefile.am: + + stupid applet which is used during installation + to display a nautilus icon on the user's panel. + * applets/launcher/nautilus-icon-applet.c: + (applet_change_pixel_size), (main): + + add checks for the libapplet library. + * configure.in: + +2000-10-31 Ramiro Estrugo <ramiro@eazel.com> + + * configure.in: + Fix bug 3729. Bump the version number to 0.5.0. + +2000-10-31 Ali Abdin <aliabdin@aucegypt.edu> + + * components/help/converters/gnome-db2html2/gdb3html.c: + (parse_file): Try to correct a problem jfleck was having. + + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_uri_is_local_scheme): Add 'gnome-help' to the list + +2000-10-31 Darin Adler <darin@eazel.com> + + * nautilus.spec.in: Removed vendor again. Putting these in cvs + is a bad idea. For more details see bug 3461. + +2000-10-31 Darin Adler <darin@eazel.com> + + * nautilus.spec.in: Add vendor. + +2000-10-31 Darin Adler <darin@eazel.com> + + Fixed bug 4242 (Tree view crash trying to navigate to parent uri + (Up)) and bug 4297 (Opening a window twice causes Nautilus to + crash). + + * components/tree/nautilus-tree-model.c: + (nautilus_tree_model_destroy): Disconnect the root_node_changed + signal. + +2000-10-31 J Shane Culpepper <pepper@eazel.com> + + * components/services/login/nautilus-view/nautilus-change-password- + view.c: (generate_change_password_form): + + Fixing buttons in the change password view to not use nautilus_label + and pointing to the right help place. + +2000-10-31 Brian Frank <bfrank@eazel.com> + + * data/static_bookmarks.xml + Fixed capitalization problem of VMware name in bookmark list + +2000-10-31 Mathieu Lacage <mathieu@eazel.com> + + * configure.in: fix some configure magic for libfreetype2. + +2000-10-31 Andy Hertzfeld <andy@eazel.com> + + * src/nautilus-first-time-druid.c: (druid_finished): + changed the services uris that are hard-coded into the wizard to + ones specified by Laura; they are not in place yet but she + assures me that they will be soon. + +2000-10-31 Darin Adler <darin@eazel.com> + + Fixed bug 4144 (Extra Services menu items installed by Summary + view never go away). The problem was actually with the factory + code from the sample. I had fixed it a while back, but not before + people cloned the broken sample code. + + * components/adapter/nautilus-adapter-factory-server.c: + (impl_Nautilus_ComponentAdapterFactory_create_adapter): + * components/hardware/main.c: (hardware_view_make_object): + * components/music/main.c: (music_view_make_object): + * components/rpmview/main.c: (rpm_view_make_object): + * components/services/install/nautilus-view/main.c: + (service_install_make_object): + * components/services/inventory/nautilus-view/main.c: + (inventory_make_object): + * components/services/login/nautilus-view/main.c: + (change_password_make_object): + * components/services/summary/nautilus-view/main.c: + (summary_make_object): + * components/tree/libmain.c: (tree_shlib_make_object): + * components/tree/main.c: (tree_exe_make_object): + Connect the destroy handler to the NautilusView object rather than + to the widget. If you connect to the widget, the handler gets + called too early and the control doesn't get properly destroyed, + leaving the UI component behind, and causing the bug. + + * components/adapter/main.c: (adapter_factory_make_object): Got + rid of incorrect comment. + +2000-10-31 J Shane Culpepper <pepper@eazel.com> + + Fixing one more. + +2000-10-31 J Shane Culpepper <pepper@eazel.com> + + * libnautilus-extensions/nautilus-mime-actions.h: + * src/nautilus-applicable-views.c: + (nautilus_navigation_info_get_location), + (nautilus_navigation_info_get_initial_content_id): + + missed a file + +2000-10-31 J Shane Culpepper <pepper@eazel.com> + + * libnautilus-extensions/nautilus-mime-actions.c: + (nautilus_mime_actions_check_if_required_attributes_ready), + (nautilus_mime_actions_get_required_file_attributes), + (nautilus_mime_actions_wait_for_required_file_attributes), + (nautilus_mime_get_default_action_type_for_file), + (nautilus_mime_get_default_action_for_file), + (nautilus_mime_get_default_application_for_file_internal), + (nautilus_mime_get_default_application_for_file), + (nautilus_mime_is_default_application_for_file_user_chosen), + (nautilus_mime_get_default_component_for_file_internal), + (nautilus_mime_get_short_list_applications_for_file), + (nautilus_mime_get_short_list_components_for_file), + (nautilus_mime_get_short_list_methods_for_file), + (nautilus_mime_get_all_applications_for_file), + (nautilus_mime_get_all_components_for_file), + (nautilus_mime_set_default_application_for_file), + (nautilus_mime_set_default_component_for_file), + (nautilus_mime_set_short_list_applications_for_file), + (nautilus_mime_set_short_list_components_for_file), + (nautilus_mime_add_application_to_short_list_for_file), + (nautilus_mime_remove_application_from_short_list_for_file), + (nautilus_mime_add_component_to_short_list_for_file), + (nautilus_mime_remove_component_from_short_list_for_file), + (nautilus_mime_extend_all_applications_for_file), + (nautilus_mime_remove_from_all_applications_for_file), + (nautilus_do_component_query): + * libnautilus-extensions/nautilus-program-chooser.c: + (repopulate_program_list), (is_component_default_for_file), + (program_file_pair_is_default_for_file), + (program_file_pair_is_in_short_list_for_file), + (add_to_short_list_for_file), (remove_from_short_list_for_file), + (remove_default_for_item), (set_default_for_item): + * libnautilus-extensions/nautilus-program-choosing.c: + (any_programs_available_for_file): + * src/file-manager/fm-directory-view.c: (switch_location_and_view), + (create_open_with_gtk_menu), (reset_bonobo_open_with_menu), + (activate_callback): + * src/nautilus-window.c: (nautilus_window_load_content_view_menu): + * test/test-nautilus-mime-actions-set.c: (main): + * test/test-nautilus-mime-actions.c: (main): + + backing out changes that caused a serious regression in services. + +2000-10-31 Eskil Heyn Olsen <eskil@eazel.com> + + * components/rpmview/nautilus-rpm-view-install.c: + (nautilus_rpm_view_install_package_callback): + Hopefully fixed the completely fatal tmp_dir bug in the + package view. + + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_pre_install_packages): + Ifdeffed some borked code + + * components/services/install/lib/eazel-install-problem.c: + (get_detailed_messages_foreach): + If no messages generated on modification status. Potientially + completely incorrect unless I check prev_pack->status first. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (dig_up_errors), (nautilus_service_install_failed): + Use eazel-install-problem to generate error messages + + * nautilus.spec.in: + Woops, eazel/throbber is not there.. + +2000-10-30 Eskil Heyn Olsen <eskil@eazel.com> + + * nautilus.spec.in: + Added some of the themes stuff to %files. + +2000-10-30 Andy Hertzfeld <andy@eazel.com> + + made thumbnailing work remotely for all images, by treating + small remote files like large ones and keeping a local thumbnail + for them. + + * libnautilus-extensions/nautilus-icon-factory-private.h: + moved SELF_THUMBNAIL_SIZE_THRESHOLD constant into private, + so it could be shared with nautilus-thumbnails. + * libnautilus-extensions/nautilus-icon-factory.c: + (nautilus_icon_factory_get_icon_for_file): + if a file is remote, make a thumbnail even if it's smaller + than the size threshold. + * libnautilus-extensions/nautilus-thumbnails.c: (make_thumbnails): + don't use a frame for files smaller than the size threshold. + +2000-10-30 Robey Pointer <robey@eazel.com> + + * components/services/install/lib/eazel-install-logic.c: + (dump_one_package): + * components/services/install/lib/eazel-install-types.c: + (packagedata_copy): + + Show provides-list when dumping packages for debug. Copy + provides-list when doing a deep copy of the package data. + + * components/services/install/lib/eazel-install-xml-package-list.c: + (parse_category): + + Clean up leading/trailing linefeeds on category descriptions. + + * components/services/install/server/main.c: (main): + * components/services/trilobite/libtrilobite/trilobite-core-utils.c + : (trilobite_add_log), (trilobite_init), + (trilobite_set_debug_mode): + * components/services/trilobite/libtrilobite/trilobite-core-utils.h + : + + Use ~/.nautilus/trilobite-install.log for logging install debug + messages, and not a file in /tmp. Timestamp those logs. + + * nautilus-installer/src/installer.c: (create_install_page), + (eazel_download_progress), (get_required_name), + (get_detailed_errors_foreach), (install_done), + (eazel_installer_add_category), (find_old_tmpdir), + (eazel_installer_initialize): + + Make category list display slightly differently when there's only + one category (which is how PR2 will be): avoid showing the + checkbox, etc. If there's a suitable /tmp directory leftover from + a previous install attempt, reuse it instead of creating a new + one. + + * nautilus-installer/src/link.sh: + + Fix missing quotes in XFree checking. + +2000-10-30 Eskil Heyn Olsen <eskil@eazel.com> + + * nautilus-installer/src/Makefile: + * nautilus-installer/src/link.sh: + link.sh does vague attempt at checking XFree version. Partial fix + for 4159. + +2000-10-30 Maciej Stachowiak <mjs@eazel.com> + + * libnautilus-extensions/nautilus-mime-actions.c: + (nautilus_mime_actions_check_if_minimum_attributes_ready), + (nautilus_mime_actions_check_if_full_attributes_ready), + (nautilus_mime_actions_get_minimum_file_attributes), + (nautilus_mime_actions_get_full_file_attributes), + (nautilus_mime_actions_wait_for_full_file_attributes), + (nautilus_mime_get_default_action_type_for_file), + (nautilus_mime_get_default_action_for_file), + (nautilus_mime_get_default_application_for_file_internal), + (nautilus_mime_get_default_application_for_file), + (nautilus_mime_is_default_application_for_file_user_chosen), + (nautilus_mime_get_default_component_sort_conditions), + (nautilus_mime_get_default_component_for_file_internal), + (nautilus_mime_get_short_list_applications_for_file), + (nautilus_mime_get_short_list_components_for_file), + (nautilus_mime_get_short_list_methods_for_file), + (nautilus_mime_get_all_applications_for_file), + (nautilus_mime_get_all_components_for_file), + (nautilus_mime_set_default_application_for_file), + (nautilus_mime_set_default_component_for_file), + (nautilus_mime_set_short_list_applications_for_file), + (nautilus_mime_set_short_list_components_for_file), + (nautilus_mime_add_application_to_short_list_for_file), + (nautilus_mime_remove_application_from_short_list_for_file), + (nautilus_mime_add_component_to_short_list_for_file), + (nautilus_mime_remove_component_from_short_list_for_file), + (nautilus_mime_extend_all_applications_for_file), + (nautilus_mime_remove_from_all_applications_for_file), + (nautilus_do_component_query): + * libnautilus-extensions/nautilus-mime-actions.h: + * libnautilus-extensions/nautilus-program-chooser.c: + (repopulate_program_list), (is_component_default_for_file), + (program_file_pair_is_default_for_file), + (program_file_pair_is_in_short_list_for_file), + (add_to_short_list_for_file), (remove_from_short_list_for_file), + (remove_default_for_item), (set_default_for_item): + * libnautilus-extensions/nautilus-program-choosing.c: + (any_programs_available_for_file): + * src/file-manager/fm-directory-view.c: (switch_location_and_view), + (create_open_with_gtk_menu), (reset_bonobo_open_with_menu), + (activate_callback): + * src/nautilus-applicable-views.c: (nautilus_navigation_info_new): + * src/nautilus-sidebar.c: (nautilus_sidebar_update_all), + (nautilus_sidebar_set_uri): + * src/nautilus-window.c: (nautilus_window_load_content_view_menu): + * test/test-nautilus-mime-actions-set.c: (main): + * test/test-nautilus-mime-actions.c: (main): Portions of the fix + for 2379 (the parts that don't make it crash). + +2000-10-30 Ramiro Estrugo <ramiro@eazel.com> + + * components/services/nautilus-dependent-shared/eazel-services-extensions.h: + * components/services/nautilus-dependent-shared/eazel-services-header.c: + (eazel_services_header_middle_new): + Separate the left and right text offsets. Tweak them some more. + +2000-10-30 Ramiro Estrugo <ramiro@eazel.com> + + * nautilus-clean.sh: + Add trilobite-eazel-install-service to list of processes to kill. + Also alphabetize the list. + +2000-10-30 Andy Hertzfeld <andy@eazel.com> + + * libnautilus-extensions/nautilus-thumbnails.c: + (make_thumbnail_path): + fixed bug 4190, problem thumbnailing icons in vault, by adding + a test to make sure it tries to keep the thumbnails for remote + files locally. + +2000-10-30 Ramiro Estrugo <ramiro@eazel.com> + + * icons/nautilus-launch-icon.png: + * nautilus.png: + + I removed these from Makefiles, but forgot to take them out of + CVS. + +2000-10-30 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/command-line/eazel-alt-install-corba. + c: (done), (main): + Fixed 4203 + + * components/services/install/lib/eazel-install-corba-types.c: + (corba_string_sequence_to_glist), + (corba_packagedatastruct_from_packagedata): + Changed because I added debug and removed it again... + + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_pre_install_packages), + (eazel_install_download_packages), + (eazel_install_check_existing_packages), + (eazel_install_fetch_dependencies): + Made a set of enums for check_for_existing_packages since it no + longer really acts as a *cmp function (has four result values + rather then 3) + * components/services/install/lib/eazel-install-logic.h: + Also renamed the status enum for the main functions + + * components/services/install/lib/eazel-install-object.c: + (eazel_install_install_packages), + (eazel_install_uninstall_packages), + (eazel_install_revert_transaction_from_xmlstring): + Also renamed the status enum for the main functions (in + logic.[ch]) + + * components/services/install/lib/eazel-install-problem.c: + (get_detailed_messages_foreach), + (eazel_install_problem_case_to_string), + Moved get_required_name into -types.c (as + packagedata_get_readable_name), so everyone gets the benefit of + it. + (eazel_install_problem_handle_cases): + Now also sets the downgrade flag in handle cases. + + * components/services/install/lib/eazel-install-rpm-glue.c: + (eazel_install_rpm_set_settings), + No longer always set rpm debub + (eazel_install_start_transaction_make_rpm_argument_list): + Don't set --oldpackage on -e. + + * components/services/install/lib/eazel-install-types.h: + * components/services/install/lib/eazel-install-types.c: + (packagedata_get_readable_name): + Moved here from -problem.c(get_required_name) + + * components/services/install/lib/eazel-install-xml-package-list.c: + (parse_package), (eazel_install_packagedata_to_xml): + Now also put provides into xml. This was needed for the menu path + info fix that Bart asked for. Unfortunately this means huge + transaction files, need to put in a boolean or such. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.h: + Added list containing all .*\.desktop$ or .*\.kdelnk$ files that + where installed. + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_service_install_dependency_check), + Print nicer dep check strings (using packagedata_get_readable_name) + (nautilus_service_install_check_for_desktop_files), + In preflight, find any .*\.desktop$ or .*\.kdelnk$ files. + (nautilus_service_install_preflight_check), + call check_for_desktop_files only on toplevel packages + (nautilus_service_install_installing), + Moved the dialog box for nautilus updates down to done. + (nautilus_install_service_locate_menu_entries), + Locates where the menu entries went + (nautilus_service_install_done): + Pop up the dialog if nautilus was updated, also generate message + reg. where menu entries went. Fixes 3431 + + * nautilus-installer/src/installer.c: (jump_to_retry_page), + (get_detailed_errors_foreach), (eazel_install_dep_check): + Used packagedata_get_readable_name instead of get_requried_name. + +2000-10-30 Ramiro Estrugo <ramiro@eazel.com> + + * components/mozilla/mozilla-preferences.cpp: + * components/mozilla/mozilla-preferences.h: + * components/mozilla/nautilus-mozilla-content-view.c: + (nautilus_mozilla_content_view_initialize), + (nautilus_mozilla_content_view_destroy), + (eazel_services_scheme_translate), + (test_make_full_uri_from_relative), + (mozilla_content_view_one_time_happenings): + Fix bug 4112 - Mozilla component does not listen for proxy + configuration changes. + + Move all the gconf and proxy related things to + mozilla-preferences.cpp, makes the main view implementation a + little less convoluted. + + Add gconf notifications for changes in the proxy and route these + changes to the mozilla universe. + + Also some minor style changes. + +2000-10-30 Darin Adler <darin@eazel.com> + + Fix bug 4202 (rename a file to an existing file will crash + Nautilus). + + * libnautilus-extensions/nautilus-file.c: (rename_callback): Mark + the overwritten file as "gone" if we succeed in renaming to an + existing file's name. Either the module overwrote the file or the + file was deleted "under Nautilus's nose" -- in either case it is + gone. + (nautilus_file_update_name): Fix comment. + +2000-10-30 Andy Hertzfeld <andy@eazel.com> + + * src/nautilus-sidebar-title.c: (update_icon): + added "eazel-services:" and "man:" to the schemes with custom + sidebar icons via the recently implemented hack (which will be + replaced by a real framework after PR2). + + * icons/Makefile.am: + * icons/manual.png: + added icon for man: scheme + +2000-10-30 Andy Hertzfeld <andy@eazel.com> + + cleaned up the sidebar for the summary view by putting in a + temporary hack to get the right icon and giving the view + a shorter title. + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (summary_load_location_callback): + changed the summary view's title to "Eazel Services" so it fits + better in the sidebar. + + * src/nautilus-sidebar-title.c: (update_icon): + added a hack to special-case the "eazel:" uri to get the appropriate + icon; we'll remove this after PR2 and replace it with a real + framework. + +2000-10-30 Darin Adler <darin@eazel.com> + + * icons/Makefile.am: Removed gnome-core.png again. + +2000-10-30 Josh Barrow <josh@eazel.com + + * icons/gnome-core.png: + Removed + + * icons/i-core.png: + Made this be the old gnome-core icon, per Arlo's suggestion. + +2000-10-30 Gene Z. Ragan <gzr@eazel.com> + + Fixed bug 4166, "New Folder" offset problem. + + Also reverted Enter to activate selected items instead of + entering renaming mode. + + * libnautilus-extensions/nautilus-icon-container.c: + (relayout): + Call nautilus_icon_container_update_scroll_region before + processing pending reveal and rename actions. + + (key_press_event): + Enter keypress activates selected items + +2000-10-30 Robey Pointer <robey@eazel.com> + + * nautilus-installer/src/proxy.c: (load_nscp_proxy_settings), + (load_galeon_proxy_settings), (attempt_http_proxy_autoconfigure): + + Try to find proxy settings via Galeon too. + +2000-10-30 J Shane Culpepper <pepper@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form): + + Fixing the box packing on the news widget. Still not optimal but + looks a little better than it did. Will continue tweaking it until + it is acceptable. + +2000-10-30 Michael Engber <engber@eazel.com> + + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: + (file_opened_callback), (file_read_callback), (load_done): + + Fixed nautilus_gdk_pixbuf_load_async bug that would cause + it to fail loading xpm files. (bug 4140) + +2000-10-30 Rebecca Schulman <rebecka@eazel.com> + Fixed bug 4176, that files remaining to be + copied goes up instead of down. The short + fix for this was just to change the wording to + reflect what was actually being counted. + + * libnautilus-extensions/nautilus-file-operations.c: + (progress_dialog_set_files_done_text), (handle_xfer_ok): + changed "Files remaining to be [copied, moved,...]" to + "Files [copied, moved,...]" + +2000-10-30 Darin Adler <darin@eazel.com> + + Fixed bug 4057 (clicking the back button while opening a huge + directory often crashes). + + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_for_each): The function was iterating + some icons twice. All the icons on the new_icons list are also on + the icons list. + (icon_destroy): Also be sure to remove the icon from the new_icons + list if it happens to be destroyed while still on that list. + + * configure.in: + * Makefile.shared: + Got rid of the shared part of the code to generate .xml.h + files. It's no longer needed since the po directory takes care of + everything itself. + + * components/loser/content/Makefile.am: + * components/loser/sidebar/Makefile.am: + * components/mozilla/Makefile.am: + * components/sample/Makefile.am: + * components/services/summary/nautilus-view/Makefile.am: + * libnautilus/Makefile.am: + * src/Makefile.am: + * src/file-manager/Makefile.am: + Got rid of the per-directory part of the code to generate .xml.h + files. + + * components/loser/content/nautilus-content-loser-ui.xml.h: + * components/loser/sidebar/nautilus-sidebar-loser-ui.xml.h: + * components/mozilla/nautilus-mozilla-ui.xml.h: + * components/sample/nautilus-sample-content-view-ui.xml.h: + * components/services/summary/nautilus-view/nautilus-summary-view-ui.xml.h: + * libnautilus/nautilus-clipboard-ui.xml.h: + * src/file-manager/nautilus-directory-view-ui.xml.h: + * src/file-manager/nautilus-icon-view-ui.xml.h: + * src/file-manager/nautilus-search-list-view-ui.xml.h: + * src/nautilus-service-ui.xml.h: + * src/nautilus-shell-ui.xml.h: + Got rid of the checked-in copies of the .xml.h files. The worst + part! + +2000-10-30 J Shane Culpepper <pepper@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (forgot_password_button_cb): + + Fixing Bug #4178. The Help button was not working right. + +2000-10-29 John Sullivan <sullivan@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_login_dialog): Change "Please login to eazel services" + to "Please log in to Eazel services", in two places. + +2000-10-30 Rebecca Schulman <rebecka@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (summary_load_location_callback): + Add setting of window and sidebar title to the summary view + to "Eazel Services Summary". I'm not necessarily attached to the wording + but we should definitely make it something other than "eazel". + this fixes a bug I filed, #4183 + +2000-10-30 Robey Pointer <robey@eazel.com> + + * components/services/trilobite/helper/eazel-helper.pam: + + Yeah! Found out how to let eazel-helper run even if root has + no password set. Add "nullok" to the pwdb line in the pam + config file. + +2000-10-30 Pavel Cisler <pavel@eazel.com> + + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_make_uri_canonical), + (nautilus_self_check_file_utilities): + nautilus_make_uri_canonical was relying on GnomeVFSURI sort-of + handling relative uris, even though they are illegal in GnomeVFS. + My earlier fix in gnome-vfs "broke" some of this broken behavior. + Added more special-case handling of cryptic absolute to + nautilus_make_uri_canonical to make it behave like before and not + break existing behavior that depends on it. Added some bandaids for + conversions that are clearly wrong but that may need more work + throughout the code that depends on it, for now I'm making it + behave like the old call. + My earlier fix to gnome-vfs fixes 2803. Change the test to reflect + the correct behavior. + +2000-10-30 Robey Pointer <robey@eazel.com> + + * components/services/trilobite/helper/README: + * components/services/trilobite/helper/eazel-helper.security.in: + + Set fallback (in pam and usermode) to false: always needs to run + as root. + +2000-10-30 Andy Hertzfeld <andy@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_eazel_news_entry_row): + disabled the "use all the space" since it causes too much flashing + during size negotiation. I'll either fix the flashing or remove + it from nautilus_label soon. + +2000-10-29 Andy Hertzfeld <andy@eazel.com> + + * libnautilus-extensions/nautilus-label.c: + (nautilus_label_initialize_class), (nautilus_label_size_allocate), + (get_clipped_width), (label_recompute_line_geometries): + made nautilus_label interpret a wrap width of -1 to mean "use + all of the available space". + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_service_entry_row), (generate_eazel_news_entry_row), + (generate_update_news_entry_row): + made the news items use all of the available space by setting its + wrap width to -1. + +2000-10-29 Andy Hertzfeld <andy@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form), (generate_eazel_news_entry_row), + (authn_cb_succeeded), (authn_cb_failed): + improved formatting of news items, now that we finally have a long + one. Also, removed some unconditional debugging messages. + +2000-10-29 Robey Pointer <robey@eazel.com> + + * components/services/install/idl/trilobite-eazel-install.idl: + * components/services/install/lib/eazel-install-corba-callback.c: + (eazel_install_callback_delete_files): + * components/services/install/lib/eazel-install-corba-callback.h: + * components/services/install/lib/eazel-install-corba.c: + (impl_Eazel_Install_delete_files), (eazel_install_get_epv): + * components/services/install/lib/eazel-install-object.c: + (eazel_install_class_initialize), (create_temporary_directory), + (eazel_install_delete_downloads), (eazel_install_install_packages), + (eazel_install_revert_transaction_from_xmlstring), + (eazel_install_emit_dependency_check_default): + * components/services/install/lib/eazel-install-public.h: + + Change delete_files from a signal to an explicit API call. Also + be sure to erase the temp dir even if it has no files in it. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_service_install_done), + (nautilus_service_install_failed), + (nautilus_service_install_view_update_from_uri): + * components/services/install/server/Makefile.am: + + Make the install view use the new explicit delete_files call, and + condense those into a single dialog box. + + * nautilus-installer/src/callbacks.c: (begin_install), + (druid_finish): + * nautilus-installer/src/installer.c: (install_done), + (eazel_installer_do_install), (eazel_installer_initialize): + * nautilus-installer/src/installer.h: + + Fix the bootstrap installer for the delete_files call, and don't + forget to delete the package list too. Also, set forced-downgrade + to TRUE until a post-PR2 bug is fixed. + +2000-10-29 Mike Fleming <mfleming@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : switch authority-less eazel-services URL's + from "eazel-services:/" to "eazel-services:///" + + * src/nautilus-window-service-ui.c: (goto_online_storage), + (goto_software_catalog), (detach_service_ui), + (nautilus_window_install_service_ui): + + Go back to initing ammonite each time these menus are called. + I didn't want to bother with trying to make it work. + + +2000-10-29 J Shane Culpepper <pepper@eazel.com> + + * components/loser/content/nautilus-content-loser-ui.xml.h: + * components/loser/sidebar/nautilus-sidebar-loser-ui.xml.h: + * components/mozilla/nautilus-mozilla-ui.xml.h: + * components/sample/nautilus-sample-content-view-ui.xml.h: + * components/services/summary/nautilus-view/nautilus-summary-view-u + i.xml.h: + * libnautilus/nautilus-clipboard-ui.xml.h: + * src/file-manager/nautilus-directory-view-ui.xml.h: + * src/file-manager/nautilus-icon-view-ui.xml.h: + * src/file-manager/nautilus-search-list-view-ui.xml.h: + * src/nautilus-service-ui.xml.h: + * src/nautilus-shell-ui.xml.h: + * src/nautilus-shell.c: (display_caveat): + + Fixing bad spelling in caveat. + +2000-10-29 Robey Pointer <robey@eazel.com> + + * components/services/install/server/Makefile.am: + + Move RPMLIBS even *earlier* in the Makefile -- way back! Seems to + need to be the very first thing or else tons of libs get better + precedence. + +2000-10-29 Mike Fleming <mfleming@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form), (nautilus_summary_view_load_uri), + (merge_bonobo_menu_items): + * src/nautilus-window-service-ui.c: (goto_online_storage), + (goto_software_catalog), (detach_service_ui), + (nautilus_window_install_service_ui): + + Change uses of "am_i_logged_in" and "who_is_logged_in" to + "ammonite_get_default_user_username" Fix misc bugs/memory leaks. + +2000-10-29 Arlo Rose <arlo@eazel.com> + + * icons/temp-home.png: + Added some extra stuff to the house to make it look better. + +2000-10-28 Arlo Rose <arlo@eazel.com> + + * icons/temp-home.png: + Did a new home icon for PR2 that isn't my happy sunflower. + +2000-10-28 Arlo Rose <arlo@eazel.com> + + * icons/arlo/Makefile.am: + * icons/arlo/i-regular.png: + * icons/arlo/i-regular72.png: + * icons/arlo/i-regular96.png: + * icons/arlo/i-regular192.png: + Fixed non-AA i-regular* icons to look the same as the AA versions. + +2000-10-28 Robey Pointer <robey@eazel.com> + + * components/services/install/server/Makefile.am: + + Move RPMLIBS earlier in the Makefile, to try to force the + sleipnir build to use the right version of libdb. + +2000-10-28 Ramiro Estrugo <ramiro@eazel.com> + + * Makefile.am: + * icons/Makefile.am: + * nautilus-launch-icon.png: + Fix bug 4155. Nautilus Panel launching icon installed in the + wrong place. Needs to be $prefix/share/pixmaps, not + $prefix/share/pixmaps/nautilus. + + Also added more ChangeLog files to EXTRA_DIST so they can be + availalble in tarballs. + +2000-10-28 J Shane Culpepper <pepper@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_login_dialog): + * src/nautilus-service-ui.xml.h: + * src/nautilus-shell.c: (display_caveat): + + Fixes for Bug #4104 and Bug# 4134. Changed error text to be more + descriptive about account activation and added new wording for + caveat dialog. + +2000-10-28 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/server/Makefile.am: + Undoh rpm stuff + +2000-10-28 Josh Barrow <josh@eazel.com> + + * nautilus-clean.sh: + Added mpg123 to the list of things to kill. This finishes + bug 4076. + +2000-10-28 Josh Barrow <josh@eazel.com> + + * nautilus-clean.sh: + Changed to clean more things. + + * README + Changed to reflect actual requirements. + + I actually checked these in a while ago, just neglected to + check in the ChangeLog + +2000-10-27 Eskil Heyn Olsen <eskil@eazel.com> + + * configure.in: + Doh doh doh + +2000-10-27 Ramiro Estrugo <ramiro@eazel.com> + + * src/Makefile.am: + Dumshit me, I forgot to take out the file I retired from the + makefile. + +2000-10-27 Ramiro Estrugo <ramiro@eazel.com> + + Fix bug 4054 - fix nautilus GNOME menu item so it does not + "crash" nautilus. + + Fix bug 4117 - change default for PR2 back to desktop off. + + Also fix the issue about turning off the gnome crash dialog for + out of process components. + + * icons/Makefile.am: + * icons/nautilus-launch-icon.png: + New launch icon from Arlo. + + * src/run-nautilus: + Change this beast to not always run nautilus-clean.sh. It only + runs nautilus-clean.sh right before/after running Nautilus and not + for every single invocation of 'run-nautilus'. + + Also, dont start the desktop anymore, since there is not a + preference in Nautilus to toggle the desktop. + + Finally, turn on the environment variable needed to prevent the + gnome crash dialog from showing up for out of process components. + + * nautilus.desktop: + Update icon and launch script back to run-nautilus. + + * nautilus.spec.in: + We're back to using run-nautilus. + + * src/launch-nautilus: + Retire. + +2000-10-27 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/server/Makefile.am: + Moved RPM_LIBS to top to ensure the right db is used. + +2000-10-27 J Shane Culpepper <pepper@eazel.com> + + * src/nautilus-window-service-ui.c: (goto_online_storage): + + Fixing Bug # 4097. Should now point to correct place. + +2000-10-27 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/lib/eazel-install-rpm-glue.c: + (eazel_install_rpm_set_settings): + Output which rpmrc file I read. + * configure.in: + Attempt at fixing the install view breaking on rpm builds and not + eazel-hacking builds. + +2000-10-27 John Sullivan <sullivan@eazel.com> + + Fixed bug 4087 (crash leaving Summary view) + + * components/services/summary/nautilus-view/nautilus-summary-view.c: + (nautilus_summary_view_destroy): Don't unset container and unref + component here; that's not necessary for the component that's + created automagically. And doing so causes a double-destroy. + (update_menu_items), (merge_bonobo_menu_items): Removed + ui_component field from details and changed callers to get the + ui_component elsewise when needed (to clarify that it isn't + owned here). + * src/nautilus-service-ui.xml: Changed "Eazel Services" to + "Eazel Services Home" since all the services are Eazel Services. + * src/nautilus-service-ui.xml.h: gotta check this in too. + +2000-10-27 Andy Hertzfeld <andy@eazel.com> + + at Bud's request, implemented bug 4127, add a preference to + show or hide Nautilus' desktop. + + * libnautilus-extensions/nautilus-global-preferences.h: + define NAUTILUS_PREFERENCES_SHOW_DESKTOP + * libnautilus-extensions/nautilus-global-preferences.c: + (global_preferences_create_dialog), (global_preferences_register): + register the desktop preference and show the checkbox in + the appearance section of preferences + * src/nautilus-application.c: (nautilus_application_initialize), + (nautilus_application_destroy), (check_for_and_run_as_super_user), + (desktop_changed_callback): + watch the desktop preference and show or hide the desktop window + when it changes. + * src/nautilus-main.c: (main): + show the desktop at launch if the preference is set and it's not + overriden by command-line options. + +2000-10-27 Darin Adler <darin@eazel.com> + + Fixed bugs in file renaming. These changes along with the + gnome-vfs ones take care of bug 3846 (cancel dialog persists after + renaming online storage folder). + + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_get_gnome_vfs_uri): Moved higher so it could be + used by rename code. + (operation_remove): Separated out the remove operation so we can + remove the operation before the callback. This makes it safe to + do a nautlius_file_cancel from inside a callback. + (operation_free): Call the separate remove. Also cut down because + we don't need so much state in the operation object any more. + (operation_complete): Call remove before calling callback as + described above. + (rename_callback): A new callback that uses set_file_info results + instead of the old one that used xfer. + (nautilus_file_rename): Change to use set_file_info instead of + xfer. Also updates the MIME type now, which will fix a bug I + think. + (nautilus_file_update_info): Use gnome_vfs_file_info_dup instead + of gnome_vfs_file_info_ref so it works with any info, including + static ones on the stack. + (set_permissions_callback), (nautilus_file_set_permissions), + (set_owner_and_group_callback), (set_owner_and_group): Change to + use the info returned by the async. set_file_info. This simplifies + things a lot. + + * src/file-manager/fm-error-reporting.c: (rename_callback), + (cancel_rename_callback), (cancel_rename), (fm_rename_file): + Rewrote renaming code. Use object data to keep track of pending + renames so we can cancel a previous one if we try to re-rename the + same file again. This allowed the code to get a lot simpler too. + + * libnautilus-extensions/nautilus-directory-async.c: + (directory_load_done): Fixed bug that prevented the directory from + ever noticing files that are no longer around. This code never + worked because we checked for the wrong error code (EOF means + success here). + + * po/Makefile.in.in: Re-removed this file. Seth checked it in by + accident. This is a generated file, not one that should be checked + in. + + * src/nautilus-window.c: (nautilus_window_realize): Got rid of + "//"-style comments and used #if 0 instead. + + * components/loser/content/nautilus-content-loser-ui.xml.h: + * components/loser/sidebar/nautilus-sidebar-loser-ui.xml.h: + * components/mozilla/nautilus-mozilla-ui.xml.h: + * components/sample/nautilus-sample-content-view-ui.xml.h: + * components/services/summary/nautilus-view/nautilus-summary-view-ui.xml.h: + * libnautilus/nautilus-clipboard-ui.xml.h: + * src/file-manager/nautilus-directory-view-ui.xml.h: + * src/file-manager/nautilus-icon-view-ui.xml.h: + * src/file-manager/nautilus-search-list-view-ui.xml.h: + * src/nautilus-service-ui.xml.h: + * src/nautilus-shell-ui.xml.h: + Someone checked in some .xml.h files generated with an old + Bonobo. Soon, this nightmare will be over and we won't check these + files in any more. + +2000-10-27 Arlo Rose <arlo@eazel.com> + + * src/nautilus-first-time-druid.c: (make_anti_aliased_label): + Made a font size change. + +2000-10-28 Mathieu Lacage <mathieu@eazel.com> + + second round of fixing of the sgml. Will be + the last one hopefuly. + * user-guide/C/sgml/chapter-1.sgml: + * user-guide/C/sgml/chapter-2.sgml: + * user-guide/C/sgml/chapter-3.sgml: + * user-guide/C/sgml/install.sgml: + * user-guide/C/sgml/intro.sgml: + +2000-10-27 Mathieu Lacage <mathieu@eazel.com> + + * user-guide/C/sgml/chapter-1.sgml: + * user-guide/C/sgml/chapter-2.sgml: + * user-guide/C/sgml/chapter-3.sgml: + * user-guide/C/sgml/install.sgml: + * user-guide/C/sgml/intro.sgml: + * user-guide/C/sgml/nautilus.sgml: + update to John's latest version, fix the sgml where needed. + Need a new round of checking on my laptop. Help now displays + images !! hooray for Ali Abdin :) + +2000-10-27 Robin * Slomkowski <rslomkow@eazel.com> + + * README: package build requirments changed to be current + left hole3s for gnome-vfs, ammonite, and medusa + +2000-10-27 Andy Hertzfeld <andy@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form), (generate_eazel_news_entry_row), + (generate_login_dialog): + finished bug 3793 for Shane, new login dialog for summary view, by + changing the widget layout to satisfy Arlo. Also marked more + strings for translation. + +2000-10-27 Arlo Rose <arlo@eazel.com> + + * components/services/nautilus-dependent-shared/eazel-services-exte + nsions.h: + Tweaked text offests. + +2000-10-27 John Sullivan <sullivan@eazel.com> + + Grumble grumble canonical grumble uri grumble. + + Josh found another assertion failure involving + canonical uris. Yay Josh! Boo canonical uri troubles! + + * libnautilus-extensions/nautilus-directory.c: + (nautilus_directory_get_internal): Removed call to + nautilus_uri_is_canonical_uri since it isn't quite the + right check. Decided that the right check here is + pointless. + * libnautilus-extensions/nautilus-file-utilities.c: + * libnautilus-extensions/nautilus-file-utilities.h: + Removed nautilus_uri_is_canonical_uri since it now has + no callers. + +2000-10-27 John Sullivan <sullivan@eazel.com> + + Fixed bug 4085 for now (need Support menu item in Services menu) + + The URL will have to be updated again later, as the bug report says. + + * src/nautilus-service-ui.xml: Added Support menu item at end, made + underline accelerators unique + * components/services/summary/nautilus-view/nautilus-summary-view-u + i.xml: tweaked wording and made underline accelerators unique + + * components/services/summary/nautilus-view/nautilus-summary-view-u + i.xml.h: + * src/nautilus-service-ui.xml.h: These guys changed. + + * src/nautilus-window-service-ui.c: + (goto_services_support): New function, goes to magic URI. + (nautilus_window_install_service_ui): add verb to connect menu item + to function. + +2000-10-27 J Shane Culpepper <pepper@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (forgot_password_button_cb): + + Fixing the url for the change password button. + +2000-10-27 John Sullivan <sullivan@eazel.com> + + Fixed bug 4114 (typing single word into location bar crashes) + + Grumble grumble canonical grumble uri grumble. + + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_make_uri_canonical): Return of the workaround to + convert file://foo to file:///foo, marked with appropriate + FIXME. + (nautilus_uri_is_canonical_uri): Changed implementation to just + call make_uri_canonical and compare. It had been doing a subset + of the things that make_uri_canonical does, but it had gotten out + of synch. + (nautilus_self_check_file_utilities): Updated tests and added more. + +2000-10-27 Ali Abdin <aliabdin@aucegypt.edu> + + * components/help/converters/gnome-db2html2/gdb3html.[ch]: + Added a 'base_path' to the Context struct + (parse_file): Do some minimal parsing to get the base path from the + provided filename on the command line. + + * components/help/converters/gnome-db2html2/sect-elements.c: + * components/help/converters/gnome-db2html2/toc-elements.c: + (sect_figure_end_element), + (sect_inlinegraphic_start_element), + (sect_infobox_start_element), + (toc_artheader_end_element): + Use 'file://' URIs on images (using base_path to get the path of the + image). This means images should now work within SGML files. Should + fix bug #3938 + +2000-10-27 Ramiro Estrugo <ramiro@eazel.com> + + Final bits of arlification for the install view. Make the fonts + smaller and use a better fill icon. + + * components/services/install/nautilus-view/nautilus-service-install-view.c: + (generate_install_form): + * components/services/login/nautilus-view/nautilus-change-password-view.c: + (generate_change_password_form): + * components/services/nautilus-dependent-shared/eazel-services-extensions.c: + (eazel_services_label_new): + * components/services/nautilus-dependent-shared/eazel-services-extensions.h: + * components/services/nautilus-dependent-shared/eazel-services-footer.c: + (footer_item_new), (eazel_services_footer_update): + Reverse the order of font_size and weight as its usually specified. + + * components/services/nautilus-dependent-shared/eazel-services-header.c: + (eazel_services_header_title_new), + (eazel_services_header_middle_new), + (eazel_services_header_set_left_text), + (eazel_services_header_set_right_text): + * components/services/nautilus-dependent-shared/eazel-services-header.h: + Split the constructors into 2 for the 2 common header cases. + + * components/services/nautilus-dependent-shared/icons/Makefile.am: + Add a new icon for the middle header fill. + + * components/services/nautilus-dependent-shared/test-footer-header.c: + (main): + Update for header constructor changes. + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form), (nautilus_summary_view_load_uri): + Quiet down the debug spew. + + +2000-10-27 Pavel Cisler <pavel@eazel.com> + + * libnautilus-extensions/nautilus-list.c: (nautilus_gdk_gc_copy): + An attempt to fix a list view redraw glitch Andy and I were trying to + track down. + +2000-10-27 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/lib/eazel-install-rpm-glue.c: + (eazel_install_rpm_set_settings): + Always enable rpm debugging (needed temporarily) + +2000-10-27 Andy Hertzfeld <andy@eazel.com> + + * components/music/nautilus-music-view.c: (add_play_controls): + left justified the song label in the music view to make it + look cleaner. + +2000-10-27 Josh Barrow <josh@eazel.com> + + * icons/ardmore/Makefile.am: + * icons/ardmore/theme_preview.png: + Added theme preview to the Ardmore theme. + + * icons/villanova/Makefile.am: + * icons/villanova/theme_preview.png: + Added theme preview to the Villanova theme. + + * nautilus-installer/src/Makefile: + As Eskil says, "Yes." + +2000-10-26 Seth Nickell <seth@eazel.com> + + * src/nautilus-window.c: (nautilus_window_realize): + + Commented out a wm hints line that was causing Nautilus to be + unfocusable (hence not allowing keyboard input, making it + hard to work on things) in Sawfish. Coordination with + Sawfish/John Harper is probably needed here... + +2000-10-26 Eskil Heyn Olsen <eskil@eazel.com> + + This introduces the problem thingy to libeazelinstall. A set of + funcs that can create humanreadable descriptions of a installation + failure, plus repair descriptions and even better, automagically + execute them. Basically this is all the RepairCase related crap + from the bootstrap installer. + + * components/services/install/command-line/eazel-alt-install-corba. + c: (tree_helper), (install_failed), (delete_files), (done), (main): + Use the new problem thingy + + * components/services/install/lib/Makefile.am: + Added the .c and .h file for the problem thingy + + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_check_existing_packages): + Loads of debug output in the case that people kept nagging me + about. If they still don't get that this is a known problem, they + must be blind. + + * components/services/install/lib/eazel-install-problem.h: + * components/services/install/lib/eazel-install-problem.c: + (get_required_name), (get_detailed_messages_foreach), + (compare_problem_case), (add_case), (add_force_install_both_case), + (add_force_remove_case), (add_remove_case), (add_update_case), + (get_detailed_cases_foreach), + (eazel_install_problem_case_to_string), + (eazel_install_problem_case_foreach_to_string), + (eazel_install_problem_case_foreach_destroy), + (eazel_install_problem_case_new), + (eazel_install_problem_case_destroy), + (eazel_install_problem_case_list_destroy), + (eazel_install_problem_new), (eazel_install_problem_finalize), + (eazel_install_problem_class_initialize), + (eazel_install_problem_initialize), + (eazel_install_problem_get_type), (problem_step_foreach_remove), + (eazel_install_problem_step), (eazel_install_problem_tree_to_case), + (eazel_install_problem_tree_to_string), + (eazel_install_problem_cases_to_string), + (find_dominant_problem_type), (find_problems_of_type), + (find_dominant_problems), (build_categories_from_problem_list), + (eazel_install_problem_handle_cases): + The problem thingy. + + * components/services/install/lib/eazel-install-rpm-glue.c: + (eazel_install_rpm_set_settings), + (eazel_install_prepare_rpm_system): + Set rpm debug if debug==TRUE, also fixed a debug message + reg. cannot open rpm db. + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.h: + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (nautilus_service_install_view_update_from_uri): + Allocate the problem thingy. + + * nautilus-installer/src/Makefile: + Yes. + + * nautilus-installer/src/installer.c: (get_required_name): + Used the samen get_required_name as the problem thingy + + * nautilus-installer/src/prescript: + Removed the hack that we inserted for bug night. + +2000-10-26 Robey Pointer <robey@eazel.com> + + * components/services/login/nautilus-view/nautilus-change-password- + view.c: (run_away_timer), (authn_succeeded), (authn_failed): + + Tidy up the password-change view a bit to try to make it more + stable, and use more of the info from ammonite. If ammonite + throws away the current login (which happens whenever the server + responds oddly), switch back to the summary view to force a + re-login instead of drifting away. + +2000-10-26 Andy Hertzfeld <andy@eazel.com> + + * libnautilus-extensions/nautilus-icon-container.c: (destroy), + (icon_destroy): + fixed bug 4108, changing themes in the list view crashes nautilus. + Fixed by removing the call to preferences_remove_callback from + icon_destroy and putting it into the widget's destroy method like + it should have been. This also could have been hurting performance + and causing other weird problems. + +2000-10-26 Arlo Rose <arlo@eazel.com> + + * components/services/nautilus-dependent-shared/eazel-services-exte + nsions.h: + Fixed a font weight problem. + +2000-10-26 Ramiro Estrugo <ramiro@eazel.com> + + * components/services/nautilus-dependent-shared/eazel-services-header.h: + * components/services/nautilus-dependent-shared/eazel-services-header.c: + (eazel_services_header_new), + (eazel_services_header_set_left_text), + (eazel_services_header_set_right_text): + Change the 'constructor' to accept left/right strings a boolean + that determines whether the logo is visible. + * components/services/install/nautilus-view/nautilus-service-install-view.c: + (generate_install_form): + * components/services/login/nautilus-view/nautilus-change-password-view.c: + (generate_change_password_form): + * components/services/summary/nautilus-view/nautilus-summary-view.c: + (generate_summary_form): + Update for header changes. Fixes bug 4099 (Secondary Header broke + with test changed to the nautilus widget) + + * components/services/nautilus-dependent-shared/eazel-services-extensions.c: + (eazel_services_get_current_date_string): + Change the date format string. Using a format of "%e" worked on + one computer but spewed warnings on another. + + * components/services/nautilus-dependent-shared/eazel-services-extensions.h: + Tweak the header text offset a bit. + + * components/services/nautilus-dependent-shared/eazel-services-footer.c: + (footer_item_new): + Fix the last item's right boundary to make this beast be up to the + most stringent Arlo standards. + + * components/services/nautilus-dependent-shared/test-footer-header.c: (main): + Add a middle header to test new header features. + + * components/services/nautilus-dependent-shared/shared-service-widgets.c: + * components/services/nautilus-dependent-shared/shared-service-widgets.h: + Retire the old way to do middle headers. + +2000-10-26 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/lib/eazel-install-rpm-glue.c: + (eazel_install_prepare_rpm_system): + Moved the addition of the opened db into the if clause. + + * components/services/time/command-line/Makefile.am: + Added GNOMELOCALEDIR + + * components/services/trilobite/helper/Makefile.am: + Trickery to make the eazel-helper.security file be build during + make and not make install, as the latter is Real Bad<tm> as the + rpm version will point to a nonexisting binary. + + * components/services/trilobite/libtrilobite/trilobite-core-distrib + ution.c: (trilobite_get_distribution): + Inserted a else to fix the mandrake/redhat issue. + +2000-10-26 John Sullivan <sullivan@eazel.com> + + Fixed bug 4064 (Can't get a right-click menu in vault) + + * libnautilus-extensions/nautilus-file-utilities.c: + (nautilus_make_uri_canonical): Changed this to call + gnome_vfs_uri_new () and gnome_vfs_uri_to_string () so + we get the same canonicalization behavior as gnome-vfs, + other than the special Nautilus-specific cases. + (nautilus_self_check_file_utilities): Added a bunch of + new checks, including copying & pasting many from + gnome-vfs. + * libnautilus-extensions/nautilus-directory.c: + (nautilus_self_check_directory): added a couple of checks. + +2000-10-26 J Shane Culpepper <pepper@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (forgot_password_button_cb), (generate_login_dialog): + + Adding the button toggle between register and i forgot my password + options in the login dialog. Still need to tweak the ui before the + login is finished. + +2000-10-26 Michael Engber <engber@eazel.com> + + * libnautilus-extensions/nautilus-icon-container.c: (relayout), + (button_press_event), (key_press_event), (get_icon_being_renamed), + (pending_icon_to_rename_destroy_callback), + (get_pending_icon_to_rename), (set_pending_icon_to_rename), + (process_pending_icon_to_rename), (is_renaming_pending), + (is_renaming), + (nautilus_icon_container_start_renaming_selected_item), + (end_renaming_mode): + * libnautilus-extensions/nautilus-icon-container.h: + * libnautilus-extensions/nautilus-icon-private.h: + * src/file-manager/fm-directory-view.c: + (reveal_newly_added_folder), (new_folder_done): + Folder renaming now starts when the icon is added rather than + at some arbitrary timeout after the new folder command is + issued. Fixed icon container to handle a request to rename an + unpositioned icon. + +2000-10-26 Eskil Heyn Olsen <eskil@eazel.com> + + * src/Makefile.am: + Install launch-nautilus, should fix rpmbuilding. + +2000-10-26 Andy Hertzfeld <andy@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form): + changed "additional services" message in summary view as requested + by marketing. + +2000-10-26 Ramiro Estrugo <ramiro@eazel.com> + + * components/mozilla/nautilus-mozilla-content-view.c: + Fix bug 3845. When configured to use an HTTP proxy, Mozilla won't + go through Ammonite. The fix is to tell the mozilla network + library to NOT use the proxy to resolve 'localhost'. + +2000-10-26 Gene Z. Ragan <gzr@eazel.com> + + * libnautilus-extensions/nautilus-directory-async.c: + (dequeue_pending_idle_callback): + Did some refactoring to stop an assertion in NautilusDirectory + add_to_hash_table from firing. This involved removing two lists + of NautilusFiles that we being created and then merged. Now one + list is being used and the condition that causes the assertion (duplicate + files in the hash table) is not being created. + + * components/tree/nautilus-tree-model.c: + (nautilus_tree_model_directory_files_changed_callback): + Removed the world famous ANOMALY error at the request of Darin. + +2000-10-26 Robey Pointer <robey@eazel.com> + + * components/services/login/nautilus-view/nautilus-change-password- + view.c: (authn_failed): + + Better logging of a failed password change attempt. + + * components/services/install/lib/eazel-install-xml-package-list.c: + (parse_category): + * nautilus-installer/src/installer.c: (add_bullet_point_to_vbox), + (jump_to_error_page), (jump_to_retry_page): + + Factor out the bullet point generation and make it line-wrap + (using Gtk's unfortunately lame line-wrapping algorithm). Do + better debugging on failed package lists. + +2000-10-26 J Shane Culpepper <pepper@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (footer_item_clicked_callback): + + Fixing location callbacks to go to the right place when a user is + logged in. + +2000-10-26 Michael Engber <engber@eazel.com> + + * src/file-manager/fm-desktop-icon-view.c: + (quit_nautilus_desktop_menu_item_callback), + (fm_desktop_icon_view_create_background_context_menu_items): + + Add "Quit Nautilus Desktop" to desktop context menu + +2000-10-26 Ramiro Estrugo <ramiro@eazel.com> + + * components/services/nautilus-dependent-shared/eazel-services-extensions.h: + Make the font smaller (11 vs 13) as requested by Arlo. + +2000-10-26 J Shane Culpepper <pepper@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (authn_cb_succeeded), (nautilus_summary_view_initialize), + (nautilus_summary_view_destroy): + + Rolling back gconf evil that seems to be causing the production runs + of the summary to segfault. + +2000-10-26 Rebecca Schulman <rebecka@eazel.com> + Fixed the panel menu item to launch the desktop + and one nautilus window, starting at the user's + home directory by default. To do this, we created + a new script called launch-nautilus. Ramiro + recommended some changes to run-nautilus that + I also did. + + * nautilus.desktop: + Changed run-nautilus to launch-nautilus + * nautilus.spec.in: + Changed run-nautilus to launch-nautilus, + since run-nautilus won't be needed in the + rpm + * src/Makefile.am: + added launch-nautilus to the build + * src/launch-nautilus: + * src/run-nautilus: + removed the mozilla environment + LD_LIBRARY_PATH hacks. + + * user-guide/C/sgml/chapter-1.sgml: + Corrected an HTML error. + + +2000-10-26 J Shane Culpepper <pepper@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form), (nautilus_summary_view_load_uri), + (merge_bonobo_menu_items): + * src/nautilus-window-service-ui.c: (goto_online_storage), + (goto_software_catalog): + + Fixing exported function name used from ammonite. + +2000-10-26 Andy Hertzfeld <andy@eazel.com> + + fixed bug 2814, move "built-in bookmarks" checkbox from the + edit bookmarks window to preferences/navigation. + + * libnautilus-extensions/nautilus-global-preferences.c: + (global_preferences_create_dialog), (global_preferences_register): + added a checkbox to control the "hide built-in bookmarks" preference + * libnautilus-extensions/nautilus-global-preferences.h: + renamed preference path so the built-in bookmarks preference can + be in the preferences window + * src/nautilus-bookmarks-window.c: (create_bookmarks_window), + (repopulate): + removed the built-in bookmarks checkbox from the edit bookmarks + window + +2000-10-26 Andy Hertzfeld <andy@eazel.com> + + added a new theme from Susan + + * configure.in: + * icons/Makefile.am: + * icons/villanova/.cvsignore: + * icons/villanova/Makefile.am: + * icons/villanova/villanova.xml: + * icons/villanova/*.png: + +2000-10-26 Pavel Cisler <pavel@eazel.com> + + * librsvg/Makefile.am: + fix the build. + Checking in for Ramiro. + +2000-10-26 Darin Adler <darin@eazel.com> + + Fix bug 4052 (sidebar file count is not updated as settings are + changed). + + * libnautilus-extensions/nautilus-directory-async.c: + (dequeue_pending_idle_callback): Add a missing call to + nautilus_file_changed. + +2000-10-26 J Shane Culpepper <pepper@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form), (generate_update_news_entry_row), + (nautilus_summary_view_load_uri): + + Adding debug prints to locate optimized build crash in the summary view. + +2000-10-26 Andy Hertzfeld <andy@eazel.com> + + moved the eazel throbber into the default theme; moved Arlo's throbber + into his theme and restored the generic throbber to the gnome theme. + Updated the theme files to reflect this. + + * configure.in: + * icons/ardmore/ardmore.xml: + * icons/arlo/Makefile.am: + * icons/arlo/arlo.xml: + * icons/arlo/throbber/.cvsignore: + * icons/arlo/throbber/Makefile.am: + * icons/default.xml: + * icons/eazel/Makefile.am: + * icons/eazel/eazel.xml: + * icons/gnome/Makefile.am: + * icons/gnome/gnome.xml: + * icons/gnome/throbber/.cvsignore: + * icons/gnome/throbber/Makefile.am: + * icons/throbber/Makefile.am: + +2000-10-26 Darin Adler <darin@eazel.com> + + Fix bug 3998 (Move to Trash crashes Nautilus if item with that + name already in trash). + + * libnautilus-extensions/nautilus-directory.c: + (nautilus_directory_notify_files_moved): Change the sequence so + that the renaming doesn't try to update the file hash twice. + + * src/file-manager/fm-icon-view.c: (compute_menu_item_info): + Handle NULL icon container case. This case happened to Will while + testing. + + * src/file-manager/fm-directory-view.c: (load_directory): Fix + GList leak. + * src/nautilus-view-frame.c: (nautilus_view_frame_destroy): Fix + string leak. + * src/nautilus-window-menus.c: (append_bookmark_to_menu): Fix + GdkPixbuf ref. leak. + + * libnautilus-extensions/nautilus-user-level-manager.c: + (user_level_set_default_if_needed): Tiny coding style change. + +2000-10-26 Rebecca Schulman <rebecka@eazel.com> + + * nautilus.spec.in: Moved the spec file entry + from the binaries section to the data section, + so the manual files' permissions will be set + correctly, and changed *.sgml to * so + we'll get the associated .css files (they're + style sheets, I think?) and the images + installed, too. + +2000-10-26 Mathieu Lacage <mathieu@eazel.com> + + * nautilus.spec.in: add sgml files in rpms + +2000-10-26 Michael Engber <engber@eazel.com> + + * libnautilus-extensions/nautilus-file-operations.c: + (get_link_name), (make_next_duplicate_name): + Link names weren't properly escaped causing them not to + get selected. + + * src/file-manager/fm-directory-view.c: (copy_move_done_callback), + (new_folder_done), + (fm_directory_view_trash_state_changed_callback): + added asserts + +2000-10-26 Ramiro Estrugo <ramiro@eazel.com> + + * components/services/nautilus-dependent-shared/eazel-services-footer.c: + (footer_destroy), (label_enter_event), (label_leave_event), + (image_enter_event), (image_leave_event), + (prelight_data_free_callback), (image_add_prelighting), + (label_add_prelighting), (footer_item_new): + Final arlification touches. Make the footer item's left and right + bumpers prelight as well. + +2000-10-26 Ramiro Estrugo <ramiro@eazel.com> + + * components/mozilla/nautilus-mozilla-content-view.c: + (mozilla_is_uri_handled_by_nautilus): + Add "gnome-help" and "ghelp" to the list of uris handled by + Nautilus as requested by Ali. + +2000-10-26 Ramiro Estrugo <ramiro@eazel.com> + + * librsvg/Makefile.am: + Add LIBPNG to test program link line. It was breaking for me. + +2000-10-26 Ramiro Estrugo <ramiro@eazel.com> + + * components/services/nautilus-dependent-shared/shared-service-utilities.c: + * components/services/nautilus-dependent-shared/shared-service-utilities.h: + * components/services/nautilus-dependent-shared/shared-service-widgets.c: + * components/services/nautilus-dependent-shared/shared-service-widgets.h: + Remove a bunch of unused code. Also removed 'go_to_uri()' which + does the exact same thing (and nothing more) than + 'nautilus_view_open_location()'. Use that directly instead. + + * components/services/install/nautilus-view/nautilus-service-install-view.c: + (show_dialog_and_run_away), + (nautilus_service_install_view_update_from_uri): + * components/services/inventory/nautilus-view/nautilus-inventory-view.c: + (gather_config_button_cb), (register_later_cb), + (make_http_post_request): + * components/services/login/nautilus-view/nautilus-change-password-view.c: + (authn_succeeded), (maintenance_button_cb): + Tiny bit of 'go_to_uri' cleanup. + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (logged_in_callback), (logged_out_callback), + (preferences_button_cb), (register_button_cb), (goto_service_cb), + (goto_update_cb), (error_dialog_cancel_cb), + (footer_item_clicked_callback): + Add #defines for magical uris and 'go_to_uri' cleanup. + +2000-10-26 Ramiro Estrugo <ramiro@eazel.com> + + * components/mozilla/main.c: (main): + Dont need to check the mozilla environment anymore. + +2000-10-26 Mathieu Lacage <mathieu@eazel.com> + + Fix bug 2571: action not computed corected for dnd in list view. + Also, the dnd in list view should be slightly nicer now :) + * libnautilus-extensions/nautilus-gtk-extensions.c: + (nautilus_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_INT), space + (nautilus_gtk_marshal_NONE__POINTER_POINTER_POINTER_POINTER_INT_INT + _UINT): brand new function for brand new signal as below :) + * libnautilus-extensions/nautilus-gtk-extensions.h: prototype. + + * libnautilus-extensions/nautilus-list.c: + (nautilus_list_initialize_class), + (nautilus_list_get_drop_action): + * libnautilus-extensions/nautilus-list.h: + Add signal get_default_action, remove old code to compute + default action... + + * src/file-manager/fm-list-view.c: + (nautilus_list_find_icon_list_drop_target), + (fm_list_get_default_action), (set_up_list): + connect to new signal, move old code to there, cleanup, finish. + +2000-10-26 Andy Hertzfeld <andy@eazel.com> + + * components/music/nautilus-music-view.c: (selection_callback), + (add_play_controls), (nautilus_music_view_set_album_image), + (nautilus_music_view_update): + minimized flashing in the music view by fixing the size of the + song label and play time, since it was relaying everything out + when they changed. + +2000-10-26 Mathieu Lacage <mathieu@eazel.com> + + Make prelighted icons not prelighted when you leave the list + view without dropping. Also, move the actual prelighting + operation from fm-list-view to nautilus-list. + Also, remove FIXME about this bug since it is fixed. + * libnautilus-extensions/nautilus-list.c: + (nautilus_list_drag_leave), + (nautilus_list_find_icon_list_drop_target), + (nautilus_list_prelight_if_necessary): + * src/file-manager/fm-list-view.c: (fm_list_handle_dragged_items): + +2000-10-25 Ramiro Estrugo <ramiro@eazel.com> + + * components/mozilla/Makefile.am: + Fix bug 4031. Mozilla component wont run cause of unresolved + symbols. Link in the standard location of Mozilla + (/usr/lib/mozilla) to make it always work without having to mess + with environment stuff. + +2000-10-25 Ramiro Estrugo <ramiro@eazel.com> + + * components/services/nautilus-dependent-shared/eazel-services-extensions.h: + * components/services/nautilus-dependent-shared/eazel-services-footer.c: + (footer_item_new), (eazel_services_footer_update): + * components/services/nautilus-dependent-shared/eazel-services-header.c: + (eazel_services_header_new): + Move more constants to shared place. + +2000-10-26 Mathieu Lacage <mathieu@eazel.com> + + * libnautilus-extensions/nautilus-drag.c: spaces... + * libnautilus-extensions/nautilus-list.c: + (nautilus_list_drag_start), + (nautilus_list_drag_leave): spaces. + * src/file-manager/fm-list-view.c: + (fm_list_receive_dropped_icons): make dnd work in list + view by removing some old code from there which was made + useless by some recent changes in teh copy/move code... + +2000-10-25 Mike Fleming <mfleming@eazel.com> + + * components/mozilla/nautilus-mozilla-content-view.c: + (eazel_services_scheme_untranslate): + + Fix 3969; Untranslating eazel-services URI's works + correctly for non-default users. + +2000-10-25 John Sullivan <sullivan@eazel.com> + + Fixed problems that were causing crash when Services button pressed. + + * libnautilus-extensions/nautilus-directory-async.c: + (load_directory_done), (dequeue_pending_idle_callback): + Was missing several NULL checks. + +2000-10-25 Robey Pointer <robey@eazel.com> + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (generate_install_form), (show_dialog_and_run_away): + + A few quick tweaks to make the installer screenshot-worthy, and to + fix a possible case where it would switch to a new URI before it + had told nautilus it was done loading. (I think that was + confusing Nautilus in some corner cases.) + + * components/services/trilobite/libtrilobite/trilobite-redirect.c: + (wipe_redirect_table), (add_redirect), + (trilobite_redirect_lookup): + + Add "/" back to the keys when adding and removing, since otherwise + we end up with a big blob of evil-named keys. Fix the bug that + the missing "/" was hiding: namely, that mass-removing keys had + stopped working after the gconf upgrade. + +2000-10-25 Mike Fleming <mfleming@eazel.com> + + * components/mozilla/main.c: (run_test_cases), (main): + * components/mozilla/nautilus-mozilla-content-view.c: + (is_uri_partial), (make_full_uri_from_relative), + (mozilla_dom_mouse_click_callback), + (test_make_full_uri_from_relative): + + Fix bugzilla.eazel.com 3949. Better (but still not perfect) + support for relative URI's. The cases that aren't handled are rarely + encountered in my experiance. I'd make it perfect, but I just + don't have time right now. + Also added self-test. + +2000-10-25 Ramiro Estrugo <ramiro@eazel.com> + + * components/services/nautilus-dependent-shared/eazel-services-extensions.c: + (eazel_services_label_new): + * components/services/nautilus-dependent-shared/eazel-services-extensions.h: + * components/services/nautilus-dependent-shared/eazel-services-footer.c: + (footer_item_new), (eazel_services_footer_update): + * components/services/nautilus-dependent-shared/eazel-services-header.c: + (eazel_services_header_new): + Place the font families, weights and sizes in the header file so + that Arlo can arloify them. + +2000-10-25 Darin Adler <darin@eazel.com> + + * libnautilus-extensions/nautilus-directory-private.h: + * libnautilus-extensions/nautilus-directory.h: + * libnautilus-extensions/nautilus-file-private.h: + * libnautilus-extensions/nautilus-directory-async.c: (istr_equal), + (istr_hash), (istr_set_new), (istr_set_insert), (add_istr_to_list), + (istr_set_get_as_list), (istr_set_destroy): New set of functions + for manipulating a set of case-insensitive strings (private for + now). + (mime_list_cancel): Change to use the istr_set. + (get_filter_options_for_directory_count): Moved up so it can be + used by the directory load code. + (load_directory_done): Common function to use when a load is + completed or cancelled. + (dequeue_pending_idle_callback): Update file count and MIME list + as well as just loading the files. + (should_get_directory_count): New cover that takes into account + the fact that a directory load is already getting the count. + (should_get_mime_list): New cover that takes into account + the fact that a directory load is already getting the MIME list. + (start_monitoring_file_list): Set up more stuff since a load + does a lot more now. + (directory_count_start): Don't start a directory count if we are + already loading the directory's file list. + (mime_list_one), (mime_list_callback), (mime_list_load): Change to + use the istr_set. Also removed some code that set variables that + were never used. + (mime_list_start): Don't start a MIME list if we are already + loading the directory's file list. + + * components/adapter/Makefile.am: + * components/hardware/Makefile.am: + * components/html/Makefile.am: + * components/loser/content/Makefile.am: + * components/loser/sidebar/Makefile.am: + * components/mozilla/Makefile.am: + * components/music/Makefile.am: + * components/rpmview/Makefile.am: + * components/sample/Makefile.am: + * components/services/install/command-line/Makefile.am: + * components/services/install/lib/Makefile.am: + * components/services/install/nautilus-view/Makefile.am: + * components/services/install/server/Makefile.am: + * components/services/inventory/lib/Makefile.am: + * components/services/inventory/nautilus-view/Makefile.am: + * components/services/login/nautilus-view/Makefile.am: + * components/services/nautilus-dependent-shared/Makefile.am: + * components/services/summary/lib/Makefile.am: + * components/services/summary/nautilus-view/Makefile.am: + * components/services/time/command-line/Makefile.am: + * components/services/time/nautilus-view/Makefile.am: + * components/services/time/service/Makefile.am: + * components/services/trilobite/libtrilobite/Makefile.am: + * components/services/trilobite/sample/command-line/Makefile.am: + * components/services/trilobite/sample/lib/Makefile.am: + * components/services/trilobite/sample/nautilus-view/Makefile.am: + * components/services/trilobite/sample/service/Makefile.am: + * components/services/vault/command-line/Makefile.am: + * components/tree/Makefile.am: + * helper-utilities/authenticate/Makefile.am: + * nautilus-installer/src/Makefile.am: + Changed all use of CPPFLAGS to use INCLUDES instead as it says in + the automake documentation. + + * libnautilus-extensions/nautilus-glib-extensions.h: Reformatting. + * libnautilus-extensions/nautilus-glib-extensions.c: + (nautilus_g_hash_table_remove_deep_custom), + (nautilus_g_hash_table_remove_deep), (destroy_deep_helper), + (nautilus_g_hash_table_destroy_deep_custom): Reformatting. + +2000-10-25 Michael Engber <engber@eazel.com> + + * libnautilus-extensions/nautilus-file-operations.c: + (new_folder_xfer_callback): + new_folder_xfer_callback was not escaping the space in + duplicate_name, this was causing us to not recognize + second and subsequent new folders (& select them). + * src/file-manager/fm-directory-view.c: (copy_move_done_callback): + moved free call to better spot + +2000-10-25 J Shane Culpepper <pepper@eazel.com> + + * src/nautilus-window-service-ui.c: (goto_online_storage): + + Fixing url string. Had one too many slashes. + +2000-10-25 John Sullivan <sullivan@eazel.com> + + Fixed various usability problems with the services log-in + dialog that I ran into. Some coding tweaks too. + + * components/services/summary/nautilus-view/nautilus-summary-view.c: + (generate_error_dialog): move cast to cause fewer of them + (name_or_password_field_activated): New function, auto-clicks the + OK button if the password row is activated. + (generate_login_dialog): move cast to cause fewer of them; use + #defines for button indices and row numbers; changed "Opps" to + "Oops" (Oops!); set default button to OK button; wire up + name_or_password_field_activated; start with focus in Name field. + +2000-10-25 J Shane Culpepper <pepper@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form), (nautilus_summary_view_load_uri), + (merge_bonobo_menu_items): + * src/Makefile.am: + * src/nautilus-window-service-ui.c: (goto_online_storage), + (goto_software_catalog): + + Fixing the services menu items to go to correct locations. + +2000-10-25 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/lib/eazel-install-query.c: + Fixed a include problem. + * components/services/install/lib/eazel-install-rpm-glue.h: + Added /me to authors + +2000-10-25 Robey Pointer <robey@eazel.com> + + * components/services/install/lib/eazel-install-types.c: + (categorydata_new): + * components/services/install/lib/eazel-install-types.h: + * components/services/install/lib/eazel-install-xml-package-list.c: + (parse_category): + * nautilus-installer/src/installer.c: + (eazel_installer_add_category): + + Add <DEFAULT/> option to the package list XML file, and make all + default choices be pre-clicked when the user gets to the selection + page. + +2000-10-25 Darin Adler <darin@eazel.com> + + * src/nautilus-applicable-views.c: (nautilus_navigation_info_new), + (nautilus_navigation_info_free), + (nautilus_navigation_info_get_location): Changed to store the + location URI separate from the NautilusFile object. NautilusFile + was munging URLs that had queries in them, causing big problems + for the software catalog among other things. This is a good + short-term fix. + +2000-10-25 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/lib/eazel-install-query.c: + (eazel_install_simple_rpm_query): + Don't bomb out when db cannot be accessed. + +2000-10-25 Michael Engber <engber@eazel.com> + + * libnautilus-extensions/nautilus-list.c: + (nautilus_list_set_selection): + nautilus_list_set_selection used to pass a bogus NautilusCListRow* + to row_set_selected + + * src/file-manager/fm-directory-view.c: + (fm_directory_view_new_folder): + whitespace change + + * src/file-manager/fm-list-view.c: + comment corrected + +2000-10-25 Darin Adler <darin@eazel.com> + + * components/adapter/bonobo-stream-vfs.c: (vfs_get_info), + (vfs_set_info), (vfs_write), (vfs_read), (vfs_seek), (vfs_copy_to), + (vfs_commit), (vfs_revert), (vfs_destroy), + (bonobo_stream_vfs_class_init), (bonobo_stream_vfs_open): + Update for changes to the BonoboStream class. Also did a thorough code + review, fixed some small bugs, and added a bunch of FIXMEs for things + that are broken. + +2000-10-25 Ramiro Estrugo <ramiro@eazel.com> + + * components/services/nautilus-dependent-shared/eazel-services-constants.h: + Removed. It was a bad try. Stuff is now in eazel-services-extensions.h. + + * components/services/nautilus-dependent-shared/Makefile.am: + * components/services/nautilus-dependent-shared/eazel-services-extensions.c: + (pixbuf_new_from_name), (eazel_services_image_new), + (eazel_services_label_new): + * components/services/nautilus-dependent-shared/eazel-services-extensions.h: + Add a place to put shared services extensions. + + * components/services/nautilus-dependent-shared/eazel-services-footer.c: + (footer_item_new), (footer_remainder_new), + (eazel_services_footer_update): + * components/services/nautilus-dependent-shared/eazel-services-header.c: + (eazel_services_header_new): + * components/services/nautilus-dependent-shared/test-footer-header.c: + Remove a bunch of duplicated code and put it in a shared + extensions location. Make the footer real. Add an item_clicked + signal to the footer. + + * components/services/summary/nautilus-view/nautilus-summary-view.c: + Hook up the footer for item clicks. + + * libnautilus-extensions/nautilus-image.c: + (nautilus_image_new_loaded): + * libnautilus-extensions/nautilus-image.h: + * libnautilus-extensions/nautilus-label.c: + (nautilus_label_new_loaded): + * libnautilus-extensions/nautilus-label.h: + Add constructors that take a bunch of arguments for the various + widgets attributes. Makes the widgets easier to use for callers + that need to tweak many attributes (like eazel services). + +2000-10-25 Ramiro Estrugo <ramiro@eazel.com> + + * components/services/nautilus-dependent-shared/.cvsignore: + * components/services/nautilus-dependent-shared/Makefile.am: + * components/services/nautilus-dependent-shared/eazel-services-constants.h: + * components/services/nautilus-dependent-shared/eazel-services-footer.c: + (eazel_services_footer_initialize_class), + (eazel_services_footer_initialize), (footer_destroy), + (pixbuf_new_from_name), (label_new), (label_enter_event), + (label_leave_event), (label_button_press_event), (label_free_data), + (label_free_uri), (image_new), (image_new_from_name), + (buffered_widget_add_prelighting), (footer_item_new), + (footer_remainder_new), (eazel_services_footer_new), + (eazel_services_footer_update): + * components/services/nautilus-dependent-shared/eazel-services-footer.h: + * components/services/nautilus-dependent-shared/eazel-services-header.c: + (eazel_services_header_initialize_class), + (eazel_services_header_initialize), (header_destroy), + (pixbuf_new_from_name), (label_new), (image_new), + (image_new_from_name), (eazel_services_header_new), + (eazel_services_header_set_text): + * components/services/nautilus-dependent-shared/eazel-services-header.h: + Two new widgets to deal with services views headers and footers. + + * components/services/install/nautilus-view/nautilus-service-install-view.c: + (generate_install_form): + * components/services/login/nautilus-view/nautilus-change-password-view.c: + (generate_change_password_form): + * components/services/summary/nautilus-view/nautilus-summary-view.c: + (generate_summary_form): + Use the new footer and header widgets. + + * components/services/nautilus-dependent-shared/shared-service-widgets.c: + * components/services/nautilus-dependent-shared/shared-service-widgets.h: + Retire some old code. + + * components/services/nautilus-dependent-shared/test-footer-header.c: + (delete_event), (main): + Add a test for the new header and footer widgets. + +2000-10-25 Ramiro Estrugo <ramiro@eazel.com> + + * libnautilus-extensions/nautilus-label.c: + (nautilus_label_size_request), (render_buffer_pixbuf): + Make sure text layout honors the vertical and horizontal offsets. + + (nautilus_scalable_font_draw_text): + * test/test-nautilus-image.c: (label_new), (label_enter_event), + (label_leave_event), (label_free_data), + (buffered_widget_add_prelighting), (header_new), (footer_item_new), + (footer_remainder_new), (footer_new), (main): + More work on prelighting footers. + +2000-10-25 Andy Hertzfeld <andy@eazel.com> + + * components/services/nautilus-dependent-shared/shared-service-widg + ets.c: (create_image_widget), (create_image_widget_from_uri): + fixed bug where local images were not showing up in the summary + view. + +2000-10-24 Andy Hertzfeld <andy@eazel.com> + + worked on bug 3898, selection in the aa icon view is too slow. + Fixed by using a fill to make the selection pixbuf with some tiny + blits for the rounded corners, instead of stretching a pixbuf. + Also, made the selection color themable in the process. + + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (clear_rounded_corners), (draw_label_text_aa): + make the selection pixbuf with a fill and then some + blits for the corner. + * libnautilus-extensions/nautilus-icon-container.c: + (nautilus_icon_container_initialize), (icon_destroy), + (nautilus_icon_container_set_is_fixed_size), + (nautilus_icon_container_theme_changed): + made it read the selection color from the current theme + * libnautilus-extensions/nautilus-icon-private.h: + added a field to keep the selection color w/alpha. + * icons/default.xml: + added semi-transparent gray selection color to default theme. + +2000-10-24 Ramiro Estrugo <ramiro@eazel.com> + + * libnautilus-extensions/nautilus-buffered-widget.c: + Remove a bunch of extraneous includes. + +2000-10-24 Ramiro Estrugo <ramiro@eazel.com> + + * components/services/nautilus-dependent-shared/icons/Makefile.am: + Rename one of the icons. + + * test/test-nautilus-image.c: (delete_event), (icon_get_path), + (pixbuf_new_from_name), (label_new), (label_enter_event), + (label_leave_event), (label_new_with_prelight), (image_new), + (image_new_from_name), (header_new), (footer_new), (main): + Add better test for image and label widgets. + +2000-10-24 Ramiro Estrugo <ramiro@eazel.com> + + * librsvg/Makefile.am: + Fix the broken build. Add missing header to sources. + +2000-10-24 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/lib/eazel-install-logic.c: + Moved a CORBA include, so EAZEL_INSTALL_NO_CORBA doesn't include + it + + * components/services/time/command-line/main.c: (main): + * components/services/time/idl/trilobite-eazel-time-service.idl: + * components/services/time/nautilus-view/trilobite-eazel-time-view. + c: (server_button_pressed), (timediff_button_pressed), + (trilobite_eazel_time_view_initialize), + (trilobite_eazel_time_view_destroy): + * components/services/time/service/trilobite-eazel-time-service-pri + vate.h: + * components/services/time/service/trilobite-eazel-time-service.c: + (impl_Trilobite_Eazel_Time_Service_set_time_server), + (trilobite_eazel_time_service_get_epv), + (trilobite_eazel_time_service_finalize), + (trilobite_eazel_time_service_initialize_load_config), + (get_nist_time), (trilobite_eazel_time_service_get_server_time): + Revived the timeservice, made it use nist/ntp (defaults to + nist1.sjc.certifiedtime.com). Uses code from gnuclear to do the + actual nist parse. + + * nautilus-installer/src/Makefile: + Yes. + * nautilus-installer/src/installer.c: (start_over), + (add_update_package), (eazel_install_preflight), (check_system), + (more_check_system): + Fixed the "will update eog && will remove eog" bug. Now it just + say "will update eog x 2". Also checks for rh7.x and rpm v.4.x + + * nautilus-installer/src/prescript: + Temporarily hacked prescript to run + /h/public/bin/eazel-trilobite-configure (if present), and set + nautilus to use gegl as services server. + + * nautilus.spec.in: + Updated deps to ORBit >= 0.5.3 and oaf >= 0.6.0 + +2000-10-24 Robey Pointer <robey@eazel.com> + + * libnautilus-extensions/nautilus-directory-async.c: + (mime_list_callback): + + Fix a typo that caused a failure to not report that it failed. + +2000-10-24 Ramiro Estrugo <ramiro@eazel.com> + + * components/services/nautilus-dependent-shared/icons/Makefile.am: + * components/services/nautilus-dependent-shared/icons/eazel-logo-left-side-repeat.png: + * components/services/nautilus-dependent-shared/icons/eazel-logo-right-side-eazel-logo.png: + * components/services/nautilus-dependent-shared/icons/summary-service-normal-fill.png: + * components/services/nautilus-dependent-shared/icons/summary-service-normal-left-bumper.png: + * components/services/nautilus-dependent-shared/icons/summary-service-normal-right-bumper.png: + * components/services/nautilus-dependent-shared/icons/summary-service-prelight-fill.png: + * components/services/nautilus-dependent-shared/icons/summary-service-prelight-left-bumper.png: + * components/services/nautilus-dependent-shared/icons/summary-service-prelight-right-bumper.png: + * components/services/nautilus-dependent-shared/icons/summary-service-remainder-fill.png: + * components/services/nautilus-dependent-shared/icons/summary-service-remainder-left-bumper.png: + * components/services/nautilus-dependent-shared/icons/summary-service-remainder-right-bumper.png: + + New icons for summary view. + +2000-10-24 Andy Hertzfeld <andy@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form), (generate_service_entry_row), + (generate_eazel_news_entry_row), (generate_update_news_entry_row): + lots of layout tweaks to please Arlo; it's still not finished yet + since I wasn't able to shrink the news section properly + + * libnautilus-extensions/nautilus-tabs.c: + (nautilus_tabs_initialize), (draw_tab_label), (draw_all_tabs), + (nautilus_tabs_prelight_tab), (nautilus_tabs_select_tab): + changed font size, text spacing and prelight behaviour as + specified by Arlo. + + * icons/eazel/Back.png: + * icons/eazel/Forward.png: + * icons/eazel/Home.png: + * icons/eazel/Refresh.png: + * icons/eazel/Search.png: + * icons/eazel/SearchWeb.png: + * icons/eazel/Services.png: + * icons/eazel/Stop.png: + * icons/eazel/Up.png: + + updated Susan's toolbar icons + +2000-10-24 Arlo Rose <arlo@eazel.com> + + * components/services/summary/nautilus-view/icons/ + gray_tab_pieces/prelight-active-bridge.png: + Fixed a typo. + +2000-10-24 Ramiro Estrugo <ramiro@eazel.com> + + * librsvg/Makefile.am: + * librsvg/art_rgba.c: (art_rgba_rgba_composite), + (art_rgba_fill_run), (art_rgba_run_alpha): + * librsvg/art_rgba.h: + * librsvg/rsvg.c: + Make Raph's latest changes work with the old version of libart in + gnome-libs-1-0. + +2000-10-24 Arlo Rose <arlo@eazel.com> + + * icons/arlo/Makefile.am: + * icons/arlo/i-directory.xml: + * icons/arlo/emblem-nowrite-72.png: + * icons/arlo/emblem-nowrite-96.png: + Some old stuff I guess I never checked in... + + + * components/services/summary/nautilus-view/icons/ + gray_tab_pieces/prelight-fill.png: + * components/services/summary/nautilus-view/icons/ + gray_tab_pieces/active-prelight-bridge.png: + * components/services/summary/nautilus-view/icons/ + gray_tab_pieces/prelight-active-bridge.png: + * components/services/summary/nautilus-view/icons/ + gray_tab_pieces/prelight-right-bumper.png: + * components/services/summary/nautilus-view/icons/ + gray_tab_pieces/prelight-left-bumper.png: + Making the summary view tabs pre-light better. + +2000-10-24 Raph Levien <raph@acm.org> + + * librsvg/rsvg.c: Implemented the "opacity" property for objects + and groups. This makes rsvg render more SVG files exported from + Adobe Illustrator 9 correctly and should make Arlo happy. + + * librsvg/opacity.svg: New test file including opacity examples. + +2000-10-24 J Shane Culpepper <pepper@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_update_news_entry_row), (authn_cb_failed), + (login_button_cb), (generate_login_dialog), + (nautilus_summary_view_load_uri): + + Adding login changes to the summary view. Still needs a bit more + work but looks better. + +2000-10-24 Michael Engber <engber@eazel.com> + + * libnautilus-extensions/nautilus-glib-extensions.c: + (nautilus_g_hash_table_remove_deep_custom), + (nautilus_g_hash_table_destroy_deep_helper): + These two fns now properly handle key == value (won't double free) + +2000-10-24 Michael Engber <engber@eazel.com> + + * libnautilus-extensions/nautilus-file-operations.c: + (handle_xfer_ok): + * libnautilus-extensions/nautilus-glib-extensions.c: + (nautilus_g_hash_table_remove_deep_custom), + (nautilus_g_hash_table_remove_deep), + (nautilus_g_hash_table_destroy_deep_helper), + (nautilus_g_hash_table_destroy_deep_custom), + (nautilus_g_hash_table_destroy_deep): + * libnautilus-extensions/nautilus-glib-extensions.h: + * src/file-manager/fm-directory-view.c: (debuting_uri_data_free): + Fix embarrassing check-in sloppiness + +2000-10-24 Michael Engber <engber@eazel.com> + + * libnautilus-extensions/nautilus-glib-extensions.c: + (nautilus_g_hash_table_remove_deep_custom), + (nautilus_g_hash_table_remove_deep), + (nautilus_g_hash_table_free_deep_helper), + (nautilus_g_hash_table_free_deep_custom), + (nautilus_g_hash_table_free_deep): + * libnautilus-extensions/nautilus-glib-extensions.h: + Fixed APIs of new utils to match existing, similar, fns. + + * src/file-manager/fm-directory-view.c: (debuting_uri_data_free), + (debuting_uri_add_file_callback), (copy_move_done_data_free), + (pre_copy_move_add_file_callback), (copy_move_done_partition_func), + (copy_move_done_callback): + Icons now left selected after copy_move operation. + +2000-10-24 Brian Frank <bfrank@eazel.com> + + * data/static_bookmarks.xml + Updated bookmarks list to current links + +2000-10-24 Darin Adler <darin@eazel.com> + + Some work towards reducing load_directory calls. + + Also fixed bug 3978 (Many Bonobo warnings/errors on quit). + + * libnautilus-extensions/nautilus-directory-async.c: + (set_up_request_by_file_attributes), + (update_file_info_in_list_if_needed), + (dequeue_pending_idle_callback), (request_is_satisfied), + (get_info_callback), (file_info_start): + * libnautilus-extensions/nautilus-directory-private.h: + * libnautilus-extensions/nautilus-file-attributes.h: + * libnautilus-extensions/nautilus-file-private.h: + * libnautilus-extensions/nautilus-file.c: + (nautilus_file_new_from_info), (destroy), + (nautilus_file_update_info), (nautilus_file_update_name), + (nautilus_file_compare_by_type), + (nautilus_file_get_string_attribute), (get_description), + (update_description_for_link), (nautilus_file_get_type_as_string), + (nautilus_file_get_mime_type), (nautilus_file_is_mime_type), + (nautilus_file_check_if_ready): + * libnautilus-extensions/nautilus-file.h: + * libnautilus-extensions/nautilus-mime-actions.c: + (nautilus_mime_actions_get_required_file_attributes), + (nautilus_mime_get_default_action_type_for_file), + (nautilus_mime_get_default_application_for_file_internal), + (nautilus_mime_get_default_component_for_file_internal), + (nautilus_mime_get_short_list_applications_for_file), + (nautilus_mime_get_short_list_components_for_file), + (nautilus_mime_get_short_list_methods_for_file), + (nautilus_mime_get_all_applications_for_file), + (nautilus_mime_get_all_components_for_file), + (nautilus_mime_set_short_list_applications_for_file), + (nautilus_mime_set_short_list_components_for_file): + Get rid of the distinction between slow and default MIME type once + again. We (Pavel, Maciej, John, and I) decided it's better not to + have multiple opinions on the MIME type, despite our original idea + that we needed the slow MIME type for some things, even on remote + file systems. + + * libnautilus-extensions/nautilus-glib-extensions.h: + Fixed the formatting in this file. + + * src/file-manager/fm-directory-view.c: (load_location_callback): + Only force a reload if we are reloading the same directory. This + is needed to take advantage of the loading already done for us by + the framework. + (load_directory): Take a NautilusDirectory instead of a URI string. + Also take a boolean parameter to control if we force a reload. + (finish_loading_uri): Respect the boolean parameter that tells us + whether to force a reload. + (filtering_changed_callback): Use the new load_directory. + + * src/nautilus-applicable-views.c: (nautilus_navigation_info_new), + (nautilus_navigation_info_cancel), (nautilus_navigation_info_free): + Monitor the directory while we are loading the component. We + already need to load the directory to get the MIME types, so this + does no additional harm, and it prepares us to consolidate the + loading done for different reasons. + + * src/nautilus-main.c: (main): Use nautilus_setenv instead of + putenv, since it's more portable. + + * src/nautilus-window-manage-views.c: Quick simplification pass on + state machine. Got rid of the use of varargs and renamed a bunch + of things. + + * src/nautilus-window-manage-views.h: + * src/nautilus-window-private.h: + Moved external functions from nautilus-window-manage-views.c to + all be in nautilus-window-manager-views.h. This is one step in + reducing the number of clients that need access to private stuff + in NautilusWindow. + + * src/nautilus-window-service-ui.c: (detach_service_ui), + (nautilus_window_install_service_ui): Detach the service UI on + "destroy" rather that using set_data_full, because finalize time + is too late. + + * src/nautilus-view-frame.c: (nautilus_view_frame_destroy): + Got rid of extra unref that was messing things up here. + +2000-10-24 Ramiro Estrugo <ramiro@eazel.com> + + * components/mozilla/nautilus-mozilla-content-view.c: + (uris_are_equal), (nautilus_mozilla_content_view_load_uri): + Fix for bug 3908. Browsing to web documents deeper than the root + is broken. I fixed it by backing out my previous broken fix for + "reloading" a web page. There is a separate bug for the reload + issue which ill fix properly later. + +2000-10-24 Ramiro Estrugo <ramiro@eazel.com> + + * configure.in: + Make the require rpm version be 3.0.4 or greater. Not just 3.0.4. + +2000-10-24 Andy Hertzfeld <andy@eazel.com> + + added new certified emblem from Susan + + * data/emblems/Makefile.am: + * data/emblems/certified.png: + added certified.png + * icons/Makefile.am: + * icons/emblem-certified.svg: + added emblem-certified.svg, removed emblem-certified.gif + +2000-10-23 Pavel Cisler <pavel@eazel.com> + + * libnautilus-extensions/nautilus-file-operations.c: + (parse_previous_duplicate_name), + (nautilus_self_check_file_operations): + Fix 3971 - "duplicate" from context-click menu adds space to + beginning of the name. + This was a case of misinterpretting files such as ".bashrc" as + an extension. + Added tests that catch this problem and fixed it. + +2000-10-24 Josh Barrow <josh@eazel.com> + + * nautilus.spec.in: + Make it require 3.0.4 or *greater*. I'm using 3.0.5 and it + works fine. + +2000-10-23 Robey Pointer <robey@eazel.com> + + * components/services/install/lib/eazel-install-types.c: + (categorydata_new): + * components/services/install/lib/eazel-install-types.h: + * components/services/install/lib/eazel-install-xml-package-list.c: + (parse_category): + * nautilus-installer/src/installer.c: (strip_categories), + (start_over_make_category_func), (start_over), + (jump_to_retry_page), (add_force_packages), (add_force_remove), + (add_update_package), (toggle_button_toggled), + (eazel_installer_add_category), (eazel_installer_do_install): + + add <EXCLUSIVE/> tag to categories in package-list.xml to indicate + that a category can't be selected with any other category (it's + mutually exclusive with them). added puppet-strings to the + bootstrap installer to support that. + +2000-10-23 Eskil Heyn Olsen <eskil@eazel.com> + + * user-guide/C/Makefile.am: + Fixing tinderbox build. + +2000-10-23 Eskil Heyn Olsen <eskil@eazel.com> + + * configure.in: + Some code to test for rpm version. We require 3.0.4. If it fucks + up, feel free to revert. + + * components/services/install/lib/eazel-install-private.h: + * components/services/install/lib/eazel-install-object.c: + Moved the DEFAULT_RPM_DB_ROOT into -private.h + + * components/services/install/lib/eazel-install-query.c: + (eazel_install_simple_rpm_query): + Code so you can call the query function directly + (EAZEL_INSTALL_SLIM/NO_CORBA) + + * components/services/install/lib/eazel-install-types.c: + (packagedata_fill_from_rpm_header): + Moved support for rpm < 3.0.4 + + * nautilus-installer/src/Makefile: + * nautilus-installer/src/callbacks.c: (begin_install): + * nautilus-installer/src/installer.c: (insert_info_page), + (create_window), (check_system), (more_check_system), + (eazel_installer_initialize): + If eazel-hacking is installed, offer to remove it. + +2000-10-23 Mike Fleming <mfleming@eazel.com> + + * components/services/summary/nautilus-view/main.c: (main): + Add gconf-init + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (save_default_eazel_service_user), (authn_cb_succeeded), + (am_i_logged_in), (logged_in_callback), + (nautilus_summary_view_initialize), + (nautilus_summary_view_destroy): + + Store previously used Eazel Service user for later. The ammonite + login dialog makes use of this as the default username. + + +2000-10-23 Robey Pointer <robey@eazel.com> + + * components/services/install/lib/eazel-install-types.c: + (packagedata_fill_from_rpm_header): + + Fix a few warnings that show up on older rpmlibs. + +2000-10-23 Pavel Cisler <pavel@eazel.com> + + Last part of fix to 2989 - Disk thrashing on Nautilus startup. + * libnautilus-extensions/nautilus-trash-directory.c: (add_volume): + When starting up, don't try to create a Trash up-front, just search + for existing Trash directories. The first time Nautilus ever runs, + this will still take the same ammount of time, the next time it + will use the cached entries. + + * src/file-manager/fm-directory-view.c: + (fm_directory_view_can_move_file_to_trash): + Trash monitor no longer creates Trash directories on startup. + Create them lazily when trying to move an item to the Trash. + +2000-10-23 Mathieu Lacage <mathieu@eazel.com> + + * user-guide/C/Makefile.am: make it install files for real... + +2000-10-23 Gene Z. Ragan <gzr@eazel.com> + + Fixed bug 1945, Image viewer component does not display XPMs + Fixed bug 1964, doesn't load xpm images using the loader framework. + + * components/image-viewer/nautilus-image-view.c: + (load_image_from_stream): + Fixed some leaks and call close on the loader to fix TIFF and XPM loading. + + * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: + (nautilus_gdk_pixbuf_load): + Now it does. Loader must be closed to cause callbacks an non-progressive + loaders to complete. + + * components/services/install/lib/eazel-install-types.c: + (packagedata_fill_from_rpm_header): + Fixed a couple of build breaking unitilaized variable warnings. + + * components/tree/nautilus-tree-view.c: + Updated function call to new prototype that was causing build to fail. + +2000-10-23 Mathieu Lacage <mathieu@eazel.com> + + * components/help/hyperbola-filefmt.c: + (fmt_help_populate_tree_from_subdir): add lookup + for sgml and xml files. + +2000-10-23 Robey Pointer <robey@eazel.com> + + * components/services/install/lib/eazel-install-xml-package-list.c: + (parse_local_xml_package_list): + * nautilus-installer/src/installer.c: (strip_categories), + (start_over_make_category_func), (start_over), + (jump_to_retry_page), (add_force_packages), (add_force_remove), + (add_update_package), (eazel_installer_add_category), + (eazel_installer_do_install), (eazel_installer_initialize): + * nautilus-installer/src/link.sh: + + Reduce category description text to 10pt and adjust the layout to + match Arlo specs. Change g_message's to LOG_DEBUG just to annoy + Eskil (actually, so we can turn them on/off easily with --debug). + +2000-10-23 Michael Engber <engber@eazel.com> + + * libnautilus-extensions/nautilus-file-operations.c: + (handle_xfer_ok), (sync_xfer_callback), + (nautilus_file_operations_copy_move), + (nautilus_file_operations_move_to_trash), + (nautilus_file_operations_delete), (do_empty_trash): + * libnautilus-extensions/nautilus-file-operations.h: + Added callback for copy_move operation - to support + selecting icons afterward. + + * libnautilus-extensions/nautilus-glib-extensions.c: + (nautilus_g_hash_table_remove_deep_custom), + (nautilus_g_hash_table_remove_deep), + (nautilus_g_hash_table_free_deep_helper), + (nautilus_g_hash_table_free_deep_custom), + (nautilus_g_hash_table_free_deep): + * libnautilus-extensions/nautilus-glib-extensions.h: + Added misc hash table utilities + + * src/file-manager/fm-directory-view.c: (debuting_uri_data_free), + (debuting_uri_add_file_callback), (copy_move_done_data_free), + (pre_copy_move_add_file_callback), (pre_copy_move), + (copy_move_done_partition_func), (copy_move_done_callback), + (fm_directory_view_create_links_for_files), + (fm_directory_view_duplicate_selection), (new_folder_done), + (fm_directory_view_new_folder), + (fm_directory_view_move_copy_items): + Hooked up to new copy_move callback. There are still problems, + the icons get unselected by someone after they're selected. + +2000-10-23 Eskil Heyn Olsen <eskil@eazel.com> + + * README: + Added that we require rpm 3.0.4 if --enable-eazel-service + + * components/services/install/lib/eazel-install-types.c: + (packagedata_fill_from_rpm_header): + Fix for older rpm's (although installation will probably still + be borked, should insert #error instead. + + * nautilus.spec.in: + nautilus-trilobite requires rpm = 3.0.4 + +2000-10-23 Robey Pointer <robey@eazel.com> + + * components/services/install/nautilus-view/nautilus-service-instal + l-view.c: (create_package): + + Nautilus doesn't always encode "rpm_id=" into "rpm_id%3D", so + check for both. + +2000-10-23 Darin Adler <darin@eazel.com> + + * Makefile.shared: Fix extra dependency that was causing the xml.h + files to be generated too often. + * configure.in: Fix code that detects the gcc options to work even + with -O on. + + * src/nautilus-view-frame.h: + * src/nautilus-view-frame.c: + (nautilus_view_frame_initialize_class), + (view_frame_loaded), (view_frame_failed), + (nautilus_view_frame_handle_client_destroy), + (nautilus_view_frame_handle_client_gone), + (nautilus_view_frame_new), (check_if_view_is_gone), + (nautilus_view_frame_set_to_component), + (nautilus_view_frame_get_is_underway): + Revamp set of signals to be easier to understand. Handle all + failures uniformly, + + * src/nautilus-window-manage-views.h: + * src/nautilus-window-manage-views.c: (change_selection), + (nautilus_window_update_for_new_location), + (nautilus_window_has_really_changed), + (nautilus_window_set_state_info), + (nautilus_window_set_sidebar_panels), + (zoom_level_changed_callback), (get_history_list_callback), + (change_selection_callback), (change_status_callback), + (failed_callback), (load_underway_callback), + (load_complete_callback), (open_location_callback), + (open_location_in_new_window_callback), (title_changed_callback), + (nautilus_window_connect_view), (nautilus_window_disconnect_view): + Make more of the view management private to this file. Use the + signals by their new names. Disconnect all the signals, not just + the error-related ones. + + * src/nautilus-window.c: + (nautilus_window_set_content_view_widget): Updated the debugging + check to do it with the new Bonobo UI calls. + +2000-10-23 Andy Hertzfeld <andy@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form): + made the summary view not display the news section when there is + no news to display. + +2000-10-23 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/idl/trilobite-eazel-install.idl: + Added a comment to the ssl_rename variable. + Added a function stub for querying the server about packages. Not + impl yet. + + * components/services/install/lib/eazel-install-logic.c: + (eazel_install_check_for_file_conflicts), + (eazel_install_do_transaction_fill_hash), + (eazel_install_monitor_process_pipe), + (eazel_install_monitor_err_process_pipe), + (eazel_install_monitor_subcommand_pipe), + (eazel_install_do_transaction_all_files_check), + (eazel_install_clean_name_to_package_hash), + (eazel_install_start_transaction), + (eazel_install_check_existing_packages), + (eazel_install_fetch_dependencies), (dump_one_package), + (eazel_install_do_file_conflict_check), + (eazel_install_ensure_deps), (eazel_uninstall_upward_traverse), + (eazel_uninstall_globber): + Added comments and clarified some variable names. + No file dep checking on --force. + No whatrequires check on uninstall on --force + Moved the all_files_check call into ensure_deps, so if packages + are pruned we can rerun ensure_deps. + No longer check if a provides file is a directory before conflict + check (not needed because of fix in eazel-install-types). + Calling g_main_iteration during file conflict checking if + EAZEL_INSTALL_SLIM is set. + Clean up some lists and hashtables at the end of a transaction. + + * components/services/install/lib/eazel-install-private.h: + * components/services/install/lib/eazel-install-object.c: + (eazel_install_finalize), (eazel_install_class_initialize), + (eazel_install_initialize), (eazel_install_install_packages), + (eazel_install_uninstall_packages), + (eazel_install_revert_transaction_from_xmlstring), + (eazel_install_emit_done): + All default funcs are NULL if EAZEL_INSTALL_NO_CORBA set. + Set private->revert to TRUE during revert. + Some more debug output. + + * components/services/install/lib/eazel-install-protocols.c: + (http_fetch_remote_file), (eazel_install_fetch_file), + (eazel_install_fetch_package), (get_search_url_for_package): + Don't add the package to downloaded_files list till after we've + checked the version and name. + If revert, use &flag=8 otherwise 12. + + * components/services/install/lib/eazel-install-query.c: + (eazel_install_simple_rpm_query): + Assert that the dbs hashtable is !null. + + * components/services/install/lib/eazel-install-rpm-glue.h: + * components/services/install/lib/eazel-install-rpm-glue.c: + (eazel_install_rpm_set_settings), + (eazel_install_start_transaction_make_rpm_argument_list), + (eazel_install_monitor_rpm_process_pipe), + (eazel_install_free_rpm_system), + (eazel_install_prepare_rpm_system), + (eazel_install_package_modifies_provides_compare), + (eazel_install_do_rpm_dependency_check): + Loads of debug code to grab stderr & stdout output from rpm. + More comments in the do_rpm_dependency_check func. + + * components/services/install/lib/eazel-install-types.h: + * components/services/install/lib/eazel-install-types.c: + (categorydata_new), (categorydata_list_copy), (categorydata_copy), + (packagedata_list_copy), (packagedata_copy), + (packagedata_fill_from_rpm_header), (packagedata_destroy): + Added a boolean flag to packagedata_copy, toggles whether or not + to deep copy. + Fix rpm header load to not add directories to the ->provides list + (using a wonderfull O(n²) function, I'll leave it to the reader to + improve it). + Uncommented the rpmheaderFree call. + + * components/services/install/lib/eazel-install-xml-package-list.c: + (eazel_install_packagelist_to_xml): + More debug output (we can never have enough!) + + * nautilus-installer/src/Makefile: + Yes. + + * nautilus-installer/src/callbacks.c: (druid_cancel), + (druid_delete), (begin_install), (druid_finish), (prep_install): + * nautilus-installer/src/installer.c: (create_what_to_do_page), + (strip_categories), (start_over_make_category_func), (start_over), + (jump_to_retry_page), (create_window), (eazel_install_progress), + (eazel_download_progress), (add_force_packages), + (add_force_remove), (add_update_package), (get_required_name), + (get_detailed_errors_foreach), (get_detailed_errors), + (eazel_install_preflight), (eazel_install_delete_files), + (install_done), (check_system), (eazel_installer_do_install), + (eazel_installer_initialize): + * nautilus-installer/src/installer.h: + * nautilus-installer/src/link.sh: + * nautilus-installer/src/main.c: (main): + Now takes a --tmpdir argument + Puts builddate in window title + Has a system for creating RepairCases when traversing a tree in + install_failed signal handler. + Now handles stuff like "need to updage eog" and then there is no + update for eog. + Hopefully also handles circular conflict cases. + Now has a completely obfuscated call stack... + +2000-10-23 Mathieu Lacage <mathieu@eazel.com> + + * user-guide/C/sgml/chapter-1.sgml: + applying patch from John Fleck to make it work better + with the current gnome-db2html behaviour. + +2000-10-23 John Sullivan <sullivan@eazel.com> + + * src/nautilus-window-menus.c: (append_bookmark_to_menu): + Fixed memory leak I happened to notice. + +2000-10-23 J Shane Culpepper <pepper@eazel.com> + + * nautilus.spec.in: + + Fixing the spec to pick up new image directory. + +2000-10-23 John Sullivan <sullivan@eazel.com> + + Fixed 3568: Bonobo verbs and data leak when menus rebuilt + + Michael Meeks added verb-removing support to Bonobo, which + I have now deployed in Nautilus. + + * libnautilus-extensions/nautilus-bonobo-extensions.h: + * libnautilus-extensions/nautilus-bonobo-extensions.c: + (remove_verbs): New function, walks through the XML nodes + beneath a specified path and removes each verb it finds. + (nautilus_bonobo_remove_menu_items_and_verbs): Now calls + remove_verbs; also changed name from _remove_menu_items + for clarity. + + * src/file-manager/fm-directory-view.c: + (reset_bonobo_open_with_menu): + * src/nautilus-window-menus.c: + (nautilus_window_remove_bookmarks_menu_items), + (nautilus_window_remove_go_menu_items): Removed FIXMEs + and updated for name change. + +2000-10-23 John Sullivan <sullivan@eazel.com> + + * src/nautilus-applicable-views.c: + (get_nautilus_navigation_result_from_gnome_vfs_result): + Improved the warning message output to the terminal when + get-file-info returns a GnomeVFSResult for which we don't + have a nice user error message. + +2000-10-23 Mike Fleming <mfleming@eazel.com> + + * components/services/trilobite/libtrilobite/trilobite-redirect.c: + (trilobite_get_services_address) + Added small comment to currently unused function with regards to + format of gconf paramameter (services-host) + +2000-10-22 Martin Baulig <baulig@suse.de> + + This is Maciej checking in Martin's fix for 3691. Credit to him, + blame to me. + + * components/adapter/nautilus-adapter-embed-strategy.h + (NautilusAdapterEmbedStrategyClass): Added "activate" and "deactivate" + signals. + (nautilus_adapter_embed_strategy_get): Removed ui_container argument. + (nautilus_adapter_embed_strategy_activate): New function; emits + the "activate" signal. + (nautilus_adapter_embed_strategy_deactivate): New function; emits + the "deactivate" signal. + + * components/adapter/nautilus-adapter-control-embed-strategy.c + (nautilus_adapter_control_embed_strategy_activate): New static function; + this is the handler of the "activate" signal. + (nautilus_adapter_control_embed_strategy_deactivate): New static function; + this is the handler of the "deactivate" signal. + + * components/adapter/nautilus-adapter-embeddable-embed-strategy.c + (nautilus_adapter_embeddable_embed_strategy_activate): New static function; + this is the handler of the "activate" signal. + (nautilus_adapter_embeddable_embed_strategy_deactivate): New static function; + this is the handler of the "deactivate" signal. + + * components/adapter/nautilus-adapter.c (nautilus_adapter_activate_callback): + New static function; connect this to the "activate" signal of the adapter + control. + +2000-10-23 Kjartan Maraas <kmaraas@gnome.org> + + * src/nautilus-shell-ui.xml.h: Check in a file containing + the strings to be translated instead of the 0-byte file that's + there now. + +2000-10-23 Andy Hertzfeld <andy@eazel.com> + + * components/services/summary/nautilus-view/nautilus-summary-view.c + : (generate_summary_form), (service_tab_selected_callback), + (updates_tab_selected_callback): + made the updates section of the summary use the new, image-based tabs. + + * libnautilus-extensions/nautilus-tabs.c: (draw_all_tabs): + made it handle the right edge for the single tab case properly. + +2000-10-22 Andy Hertzfeld <set EMAIL_ADDRESS environment variable> + + * components/services/summary/ + nautilus-view/nautilus-summary-view.c + : (generate_summary_form), (generate_login_dialog), + (nautilus_summary_view_load_uri), (service_tab_selected_callback): + + added image-based tabs to the summary view. Also, fixed problem where + the throbber kept spinning until the login dialog was dismissed by + making it a non-modal dialog by refraining from calling gnome_run_dialog + Currently, only the service tabs have been converted but the update + tab is coming soon. + + * libnautilus-extensions/Makefile.am: + * libnautilus-extensions/nautilus-tabs.c: + (nautilus_tabs_initialize_class), (nautilus_tabs_initialize), + (nautilus_tabs_new), (tab_item_destroy), (tab_item_destroy_cover), + (nautilus_tabs_destroy), (nautilus_tabs_unload_tab_pieces), + (load_tab_piece), (nautilus_tabs_load_tab_pieces), + (nautilus_tabs_hit_test), (measure_height), (recalculate_size), + (nautilus_tabs_size_request), (draw_tab_piece_aa), + (draw_pixbuf_tiled_aa), (allocate_cleared_pixbuf), + (measure_tab_name), (draw_tab_label), (draw_all_tabs), + (tab_item_find_by_name), (nautilus_tabs_expose), + (nautilus_tabs_draw), (nautilus_tabs_add_tab), + (nautilus_tabs_remove_tab), (nautilus_tabs_prelight_tab), + (nautilus_tabs_select_tab), (nautilus_tabs_press_event), + (nautilus_tabs_leave_event), (nautilus_tabs_motion_event): + * libnautilus-extensions/nautilus-tabs.h: + added a new class for the fancy Arlo tabs in the summary view, + based on the sidebar tabs. + + * configure.in: + * components/services/summary/ + nautilus-view/Makefile.am: + * components/services/summary/ + nautilus-view/icons/.cvsignore: + * components/services/summary/ + nautilus-view/icons/Makefile.am: + * components/services/summary/ + nautilus-view/icons/gray_tab_pieces/.cvsignore: + * components/services/summary/ + nautilus-view/icons/gray_tab_pieces/*.png + + added Arlo's new tab images for the summary view + + * src/nautilus-property-browser.c: + (nautilus_property_browser_initialize), (add_new_button_callback), + (done_button_callback): + + added a done button to the property dialog to make it easier to + dismiss it. + +2000-10-22 Mike Fleming <mfleming@eazel.com> + + * libnautilus-extensions/nautilus-stock-dialogs.c: + (timed_wait_free), (timed_wait_callback): + + Made timed-wait dialog remember the dialog. Was being triggered + during a DAV rename w/ debug info on. + +2000-10-22 Robert Brady <rwb197@zepler.org> + + * configure.in: Added en_GB to ALL_LINGUAS. + reviewed by: Eskil Heyn Olsen <eskil@eazel.com> * components/services/install/lib/eazel-install-logic2.c: diff --git a/Makefile.am b/Makefile.am index 48290bb94..e65f18f6e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,6 @@ endif SUBDIRS = \ data \ icons \ - intl \ cut-n-paste-code \ librsvg \ libnautilus \ diff --git a/applets/Makefile.am b/applets/Makefile.am index f17e756e5..439536f98 100644 --- a/applets/Makefile.am +++ b/applets/Makefile.am @@ -1,6 +1,5 @@ include $(top_srcdir)/Makefile.shared SUBDIRS = \ - launcher \ preferences-applet \ $(NULL) diff --git a/components/Makefile.am b/components/Makefile.am index 1f84f61a5..cc6e79b8e 100644 --- a/components/Makefile.am +++ b/components/Makefile.am @@ -21,6 +21,7 @@ SUBDIRS = \ loser \ music \ notes \ + rss-control \ sample \ text \ throbber \ diff --git a/components/rss-control/.cvsignore b/components/rss-control/.cvsignore new file mode 100644 index 000000000..9eeb873c6 --- /dev/null +++ b/components/rss-control/.cvsignore @@ -0,0 +1,5 @@ +.deps +.libs +Makefile +Makefile.in +nautilus-rss-control diff --git a/components/rss-control/Makefile.am b/components/rss-control/Makefile.am new file mode 100644 index 000000000..99ae8d1f8 --- /dev/null +++ b/components/rss-control/Makefile.am @@ -0,0 +1,45 @@ +NULL = + +SUBDIRS = + +INCLUDES = \ + -DPREFIX=\"$(prefix)\" \ + -DG_LOG_DOMAIN=\"Nautilus-RSS-Control\" \ + -DDATADIR=\""$(datadir)"\" \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(top_builddir)/libnautilus \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + $(GNOMEUI_CFLAGS) \ + $(GCONF_CFLAGS) \ + $(OAF_CFLAGS) \ + $(BONOBO_CFLAGS) \ + $(VFS_CFLAGS) + +oafdir = $(datadir)/oaf +oaf_DATA = \ + nautilus-rss-control.oafinfo + + +bin_PROGRAMS = \ + nautilus-rss-control + +nautilus_rss_control_SOURCES = \ + nautilus-rss-control.c \ + nautilus-rss-control.h \ + main.c + +nautilus_rss_control_LDADD = \ + $(top_builddir)/libnautilus/libnautilus.la \ + $(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \ + $(BONOBO_LIBS) \ + $(GNOMEUI_LIBS) \ + $(GCONF_LIBS) \ + $(VFS_LIBS) \ + $(GNORBA_LIBS) + +OBJECT_DIRECTORY_LIBS = $(GNOME_LIBS) $(OAF_LIBS) + +EXTRA_DIST = \ + $(oaf_DATA) \ + $(NULL) diff --git a/components/rss-control/main.c b/components/rss-control/main.c new file mode 100644 index 000000000..24e82e463 --- /dev/null +++ b/components/rss-control/main.c @@ -0,0 +1,120 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Andy Hertzfeld + */ + +/* main.c - main function and object activation function for the rss control component. */ + +#include <config.h> +#include "nautilus-rss-control.h" + +#include <bonobo.h> +#include <gnome.h> +#include <libgnomevfs/gnome-vfs.h> +#include <libnautilus-extensions/nautilus-debug.h> +#include <liboaf/liboaf.h> + +static int object_count = 0; + +static void +rss_control_object_destroyed(GtkObject *obj) +{ + object_count--; + if (object_count <= 0) { + gtk_main_quit (); + } +} + +static BonoboObject * +rss_control_make_object (BonoboGenericFactory *factory, + const char *iid, + void *closure) +{ + NautilusRSSControl *rss_control; + BonoboObject *bonobo_control; + + if (strcmp (iid, "OAFIID:nautilus_rss_control:1230")) { + return NULL; + } + + rss_control = NAUTILUS_RSS_CONTROL (gtk_object_new (NAUTILUS_TYPE_RSS_CONTROL, NULL)); + + object_count++; + + bonobo_control = nautilus_rss_control_get_control (rss_control); + + gtk_signal_connect (GTK_OBJECT (bonobo_control), "destroy", rss_control_object_destroyed, NULL); + return bonobo_control; +} + +int +main (int argc, char *argv[]) +{ + BonoboGenericFactory *factory; + CORBA_ORB orb; + char *registration_id; + + /* Make criticals and warnings stop in the debugger if + * NAUTILUS_DEBUG is set. Unfortunately, this has to be done + * explicitly for each domain. + */ + if (g_getenv ("NAUTILUS_DEBUG") != NULL) { + nautilus_make_warnings_and_criticals_stop_in_debugger + (G_LOG_DOMAIN, g_log_domain_glib, + "Bonobo", + "Gdk", + "GnomeUI", + "GnomeVFS", + "GnomeVFS-CORBA", + "GnomeVFS-pthread", + "Gtk", + "Gdk-Pixbuf", + "Nautilus", + "Nautilus-Authenticate", + "Nautilus-Tree", + "ORBit", + NULL); + } + + gnome_init_with_popt_table("nautilus-rss-control", VERSION, + argc, argv, + oaf_popt_options, 0, NULL); + + orb = oaf_init (argc, argv); + + bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL); + + /* initialize gnome-vfs, etc */ + g_thread_init (NULL); + gnome_vfs_init (); + + registration_id = oaf_make_registration_id ("OAFIID:nautilus_rss_control_factory:1230", getenv ("DISPLAY")); + factory = bonobo_generic_factory_new_multi (registration_id, + rss_control_make_object, + NULL); + g_free (registration_id); + + + do { + bonobo_main (); + } while (object_count > 0); + + return 0; +} diff --git a/components/rss-control/nautilus-rss-control.c b/components/rss-control/nautilus-rss-control.c new file mode 100644 index 000000000..c161e2003 --- /dev/null +++ b/components/rss-control/nautilus-rss-control.c @@ -0,0 +1,785 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + +/* + * Copyright (C) 2000 Eazel, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Author: Andy Hertzfeld <andy@eazel.com> + * + */ + +/* this is the implementation of the rss control, which fetches an rss file through a uri, and + * displays it in the widget. + */ + +#include <config.h> +#include <gnome.h> +#include <liboaf/liboaf.h> + +#include <bonobo.h> + +#include "nautilus-rss-control.h" +#include <ghttp.h> + +#include <gnome-xml/parser.h> +#include <gnome-xml/xmlmemory.h> + +#include <libgnomevfs/gnome-vfs.h> + +#include <libnautilus/nautilus-view.h> + +#include <libnautilus-extensions/nautilus-file-utilities.h> +#include <libnautilus-extensions/nautilus-gdk-extensions.h> +#include <libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h> +#include <libnautilus-extensions/nautilus-glib-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-macros.h> +#include <libnautilus-extensions/nautilus-scalable-font.h> +#include <libnautilus-extensions/nautilus-string.h> +#include <libnautilus-extensions/nautilus-xml-extensions.h> +#include <libnautilus-extensions/nautilus-font-factory.h> + +/* private instance variables */ +struct _NautilusRSSControlDetails { + char* rss_uri; + BonoboObject *control; + NautilusScalableFont *font; + + NautilusReadFileHandle *load_file_handle; + NautilusPixbufLoadHandle *load_image_handle; + + int items_v_offset; + int prelight_index; + + char* title; + char* main_uri; + + GdkPixbuf *logo; + GdkPixbuf *bullet; + GList *items; +}; + +/* per item structure for rss items */ +typedef struct { + char *item_title; + char *item_url; + +} RSSItemData; + +#define RSS_ITEM_HEIGHT 15 +#define MINIMUM_DRAW_SIZE 8 + +static void nautilus_rss_control_initialize_class (NautilusRSSControlClass *klass); +static void nautilus_rss_control_initialize (NautilusRSSControl *view); +static void nautilus_rss_control_destroy (GtkObject *object); + +static void nautilus_rss_control_draw (GtkWidget *widget, GdkRectangle *box); +static int nautilus_rss_control_expose (GtkWidget *widget, GdkEventExpose *event); +static gboolean nautilus_rss_control_button_press_event (GtkWidget *widget, GdkEventButton *event); +static gboolean nautilus_rss_control_motion_event (GtkWidget *widget, GdkEventMotion *event); +static gboolean nautilus_rss_control_leave_event (GtkWidget *widget, GdkEventCrossing *event); +static void nautilus_rss_control_size_request (GtkWidget *widget, GtkRequisition *request); + +static void nautilus_rss_control_set_uri (NautilusRSSControl *rss_control, const char *uri); + + +NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusRSSControl, + nautilus_rss_control, + GTK_TYPE_EVENT_BOX) + + +static void +nautilus_rss_control_initialize_class (NautilusRSSControlClass *klass) +{ + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + + object_class = GTK_OBJECT_CLASS (klass); + widget_class = GTK_WIDGET_CLASS (klass); + + object_class->destroy = nautilus_rss_control_destroy; + + widget_class->draw = nautilus_rss_control_draw; + widget_class->expose_event = nautilus_rss_control_expose; + widget_class->button_press_event = nautilus_rss_control_button_press_event; + widget_class->motion_notify_event = nautilus_rss_control_motion_event; + widget_class->leave_notify_event = nautilus_rss_control_leave_event; + widget_class->size_request = nautilus_rss_control_size_request; + +} + +/* routines to handle setting and getting the configuration properties of the Bonobo control */ + +enum { + CONFIGURATION +} MyArgs; + + +static void +get_bonobo_properties (BonoboPropertyBag *bag, + BonoboArg *arg, + guint arg_id, + CORBA_Environment *ev, + gpointer user_data) +{ + NautilusRSSControl *rss_control = NAUTILUS_RSS_CONTROL (user_data); + + switch (arg_id) { + + case CONFIGURATION: + { + BONOBO_ARG_SET_STRING (arg, rss_control->details->rss_uri); + break; + } + + default: + g_warning ("Unhandled arg %d", arg_id); + break; + } +} + +static void +set_bonobo_properties (BonoboPropertyBag *bag, + const BonoboArg *arg, + guint arg_id, + CORBA_Environment *ev, + gpointer user_data) +{ + NautilusRSSControl *rss_control = NAUTILUS_RSS_CONTROL (user_data); + + switch (arg_id) { + + case CONFIGURATION: + { + char *uri; + + uri = BONOBO_ARG_GET_STRING (arg); + nautilus_rss_control_set_uri (rss_control, uri); + + break; + } + + default: + g_warning ("Unhandled arg %d", arg_id); + break; + } +} + +/* initialize ourselves by connecting to the location change signal and allocating our subviews */ +static void +nautilus_rss_control_initialize (NautilusRSSControl *rss_control) +{ + GtkWidget *frame; + char *bullet_path; + BonoboPropertyBag *property_bag; + + rss_control->details = g_new0 (NautilusRSSControlDetails, 1); + + /* set up the font */ + rss_control->details->font = NAUTILUS_SCALABLE_FONT (nautilus_scalable_font_new ("helvetica")); + rss_control->details->prelight_index = -1; + + /* load the bullet used to display the items */ + bullet_path = nautilus_pixmap_file ("bullet.png"); + rss_control->details->bullet = gdk_pixbuf_new_from_file (bullet_path); + g_free (bullet_path); + + /* receive mouse motion events */ + gtk_widget_add_events (GTK_WIDGET (rss_control), GDK_POINTER_MOTION_MASK); + + /* embed it into a frame */ + frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type(GTK_FRAME (frame), GTK_SHADOW_OUT); + gtk_widget_show (frame); + gtk_container_add (GTK_CONTAINER (frame), GTK_WIDGET (rss_control)); + + /* make the bonobo control */ + rss_control->details->control = (BonoboObject*) bonobo_control_new (GTK_WIDGET (frame)); + + /* attach a property bag with the configure property */ + property_bag = bonobo_property_bag_new (get_bonobo_properties, set_bonobo_properties, rss_control); + bonobo_control_set_properties (BONOBO_CONTROL(rss_control->details->control),property_bag); + bonobo_object_unref (BONOBO_OBJECT (property_bag)); + + bonobo_property_bag_add (property_bag, "configuration", CONFIGURATION, BONOBO_ARG_STRING, NULL, + "RSS Configuration", BONOBO_PROPERTY_WRITEABLE); + + /* show the view itself */ + gtk_widget_show (GTK_WIDGET (rss_control)); +} + +static void +free_rss_data_item (RSSItemData *item) +{ + g_free (item->item_title); + g_free (item->item_url); + g_free (item); +} + +static void +nautilus_rss_control_clear_items (NautilusRSSControl *rss_control) +{ + if (rss_control->details->items != NULL) { + nautilus_g_list_free_deep_custom (rss_control->details->items, (GFunc) free_rss_data_item, NULL); + rss_control->details->items = NULL; + } +} + +static void +nautilus_rss_control_destroy (GtkObject *object) +{ + NautilusRSSControl *rss_control; + + rss_control = NAUTILUS_RSS_CONTROL (object); + g_free (rss_control->details->rss_uri); + g_free (rss_control->details->title); + g_free (rss_control->details->main_uri); + + if (rss_control->details->load_file_handle != NULL) { + nautilus_read_file_cancel (rss_control->details->load_file_handle); + } + + if (rss_control->details->load_image_handle != NULL) { + nautilus_cancel_gdk_pixbuf_load (rss_control->details->load_image_handle); + } + + if (rss_control->details->logo != NULL) { + gdk_pixbuf_unref (rss_control->details->logo); + } + + if (rss_control->details->bullet != NULL) { + gdk_pixbuf_unref (rss_control->details->bullet); + } + + if (rss_control->details->items != NULL) { + nautilus_rss_control_clear_items (rss_control); + } + + if (rss_control->details->font) { + gtk_object_unref (GTK_OBJECT (rss_control->details->font)); + } + + g_free (rss_control->details); + + NAUTILUS_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object)); +} + + +/* get associated Bonobo control */ +BonoboObject * +nautilus_rss_control_get_control (NautilusRSSControl *rss_control) +{ + return rss_control->details->control; +} + +static void +nautilus_rss_control_set_title (NautilusRSSControl *rss_control, const char *title) +{ + if (nautilus_strcmp (rss_control->details->title, title) == 0) { + return; + } + + if (rss_control->details->title) { + g_free (rss_control->details->title); + } + if (title != NULL) { + rss_control->details->title = g_strdup (title); + } else { + rss_control->details->title = NULL; + + } + gtk_widget_queue_draw (GTK_WIDGET (rss_control)); +} + + +static void +rss_logo_callback (GnomeVFSResult error, GdkPixbuf *pixbuf, gpointer callback_data) +{ + NautilusRSSControl *rss_control; + + rss_control = NAUTILUS_RSS_CONTROL (callback_data); + rss_control->details->load_image_handle = NULL; + + if (rss_control->details->logo) { + gdk_pixbuf_unref (rss_control->details->logo); + } + + if (pixbuf != NULL) { + gdk_pixbuf_ref (pixbuf); + rss_control->details->logo = pixbuf; + gtk_widget_queue_draw (GTK_WIDGET (rss_control)); + } +} + +/* completion routine invoked when we've loaded the rss file uri. Parse the xml document, and + * then extract the various elements that we require */ + +static void +rss_read_done_callback (GnomeVFSResult result, + GnomeVFSFileSize file_size, + char *file_contents, + gpointer callback_data) +{ + RSSItemData *item_parameters; + xmlDocPtr rss_document; + xmlNodePtr image_node, channel_node; + xmlNodePtr current_node, title_node, temp_node, uri_node; + char *image_uri, *title, *temp_str; + NautilusRSSControl *rss_control; + + char *buffer; + + rss_control = NAUTILUS_RSS_CONTROL (callback_data); + rss_control->details->load_file_handle = NULL; + + /* make sure the read was successful */ + if (result != GNOME_VFS_OK) { + g_assert (file_contents == NULL); + return; + } + + + /* Parse the rss file with gnome-xml. The gnome-xml parser requires a zero-terminated array. */ + buffer = g_realloc (file_contents, file_size + 1); + buffer[file_size] = '\0'; + rss_document = xmlParseMemory (buffer, file_size); + g_free (buffer); + + /* extract the title and set it */ + channel_node = nautilus_xml_get_child_by_name (xmlDocGetRootElement (rss_document), "channel"); + if (channel_node != NULL) { + temp_node = nautilus_xml_get_child_by_name (channel_node, "title"); + if (temp_node != NULL) { + title = xmlNodeGetContent (temp_node); + if (title != NULL) { + nautilus_rss_control_set_title (rss_control, title); + xmlFree (title); + } + } + + temp_node = nautilus_xml_get_child_by_name (channel_node, "link"); + if (temp_node != NULL) { + temp_str = xmlNodeGetContent (temp_node); + if (temp_str != NULL) { + g_free (rss_control->details->main_uri); + rss_control->details->main_uri = g_strdup (temp_str); + xmlFree (temp_str); + } + } + + } + + /* extract the image uri and, if found, load it asynchronously */ + image_node = nautilus_xml_get_child_by_name (xmlDocGetRootElement (rss_document), "image"); + if (image_node != NULL) { + uri_node = nautilus_xml_get_child_by_name (image_node, "url"); + if (uri_node != NULL) { + image_uri = xmlNodeGetContent (uri_node); + if (image_uri != NULL) { + rss_control->details->load_image_handle = nautilus_gdk_pixbuf_load_async (image_uri, rss_logo_callback, rss_control); + xmlFree (image_uri); + } + } + } + + /* extract the items in a loop */ + nautilus_rss_control_clear_items (rss_control); + current_node = rss_document->root->childs; + while (current_node != NULL) { + if (nautilus_strcmp (current_node->name, "item") == 0) { + title_node = nautilus_xml_get_child_by_name (current_node, "title"); + if (title_node) { + item_parameters = (RSSItemData*) g_new0 (RSSItemData, 1); + + title = xmlNodeGetContent (title_node); + item_parameters->item_title = g_strdup (title); + xmlFree (title); + temp_node = nautilus_xml_get_child_by_name (current_node, "link"); + + if (temp_node) { + temp_str = xmlNodeGetContent (temp_node); + item_parameters->item_url = g_strdup (temp_str); + xmlFree (temp_str); + } + + rss_control->details->items = g_list_append (rss_control->details->items, item_parameters); + } + } + current_node = current_node->next; + } + + /* we're done, so free everything up */ + xmlFreeDoc (rss_document); + + /* schedule a redraw to reflect the new contents */ + gtk_widget_queue_draw (GTK_WIDGET (rss_control)); +} + +/* load the rss file asynchronously */ +static void +load_rss_file (NautilusRSSControl *rss_control) +{ + char *title; + /* load the uri asynchrounously, calling a completion routine when completed */ + rss_control->details->load_file_handle = nautilus_read_entire_file_async (rss_control->details->rss_uri, rss_read_done_callback, rss_control); + + /* put up a title that's displayed while we wait */ + title = g_strdup_printf ("Loading %s", rss_control->details->rss_uri); + nautilus_rss_control_set_title (rss_control, title); + g_free (title); +} + +/* set the uri and load it */ +static void +nautilus_rss_control_set_uri (NautilusRSSControl *rss_control, const char *uri) +{ + + if (nautilus_strcmp (rss_control->details->rss_uri, uri) == 0) { + return; + } + + if (rss_control->details->rss_uri != NULL) { + g_free (rss_control->details->rss_uri); + rss_control->details->rss_uri = NULL; + } + + if (uri != NULL) { + rss_control->details->rss_uri = g_strdup (uri); + load_rss_file (rss_control); + } +} + +/* convenience routine to composite an image with the proper clipping */ +static void +rss_control_pixbuf_composite (GdkPixbuf *source, GdkPixbuf *destination, int x_offset, int y_offset, int alpha) +{ + int source_width, source_height, dest_width, dest_height; + double float_x_offset, float_y_offset; + + source_width = gdk_pixbuf_get_width (source); + source_height = gdk_pixbuf_get_height (source); + dest_width = gdk_pixbuf_get_width (destination); + dest_height = gdk_pixbuf_get_height (destination); + + float_x_offset = x_offset; + float_y_offset = y_offset; + + /* clip to the destination size */ + if ((x_offset + source_width) > dest_width) { + source_width = dest_width - x_offset; + } + if ((y_offset + source_height) > dest_height) { + source_height = dest_height - y_offset; + } + + gdk_pixbuf_composite (source, destination, x_offset, y_offset, source_width, source_height, + float_x_offset, float_y_offset, 1.0, 1.0, GDK_PIXBUF_ALPHA_BILEVEL, alpha); +} + + + +/* draw the logo image */ +static int +draw_rss_logo_image (NautilusRSSControl *rss_control, GdkPixbuf *pixbuf, int offset) +{ + GtkWidget *widget; + int logo_width, logo_height; + int v_offset; + + widget = GTK_WIDGET (rss_control); + v_offset = offset; + + if (rss_control->details->logo != NULL) { + logo_width = gdk_pixbuf_get_width (rss_control->details->logo); + logo_height = gdk_pixbuf_get_height (rss_control->details->logo); + + rss_control_pixbuf_composite (rss_control->details->logo, pixbuf, 2, v_offset, 255); + v_offset += logo_height + 2; + } + + return v_offset; +} + +/* draw the title */ +static int +draw_rss_title (NautilusRSSControl *rss_control, GdkPixbuf *pixbuf, int v_offset) +{ + GtkWidget *widget; + NautilusDimensions title_dimensions; + + if (rss_control->details->title == NULL || rss_control->details->font == NULL) { + return v_offset; + } + + widget = GTK_WIDGET (rss_control); + + /* first, measure the text */ + title_dimensions = nautilus_scalable_font_measure_text (rss_control->details->font, + 18, + rss_control->details->title, strlen (rss_control->details->title)); + + /* draw the name into the pixbuf using anti-aliased text */ + nautilus_scalable_font_draw_text (rss_control->details->font, pixbuf, + 4, v_offset, + NULL, + 18, + rss_control->details->title, strlen (rss_control->details->title), + NAUTILUS_RGB_COLOR_BLACK, + NAUTILUS_OPACITY_FULLY_OPAQUE); + + return v_offset + title_dimensions.height; +} + +/* utility for underlining an item - assumes the pixbuf has an alpha channel */ +static void +draw_blue_line (GdkPixbuf *pixbuf, int x, int y, int width) +{ + guchar *pixels_ptr; + int row_stride, line_width, pixbuf_width, i; + + line_width = width; + pixbuf_width = gdk_pixbuf_get_width (pixbuf); + if ((x + line_width) > pixbuf_width) { + line_width = pixbuf_width - x - 1; + } + row_stride = gdk_pixbuf_get_rowstride (pixbuf); + pixels_ptr = gdk_pixbuf_get_pixels (pixbuf); + + pixels_ptr += (4 * x) + (row_stride * y); + for (i = 0; i < line_width; i++) { + *pixels_ptr++ = 0; + *pixels_ptr++ = 0; + *pixels_ptr++ = 159; + *pixels_ptr++ = 255; + + } +} + +/* draw the items */ +static int +draw_rss_items (NautilusRSSControl *rss_control, GdkPixbuf *pixbuf, int v_offset) +{ + GList *current_item; + RSSItemData *item_data; + int bullet_width, bullet_height, font_size; + int item_index, bullet_alpha; + int maximum_height; + guint32 text_color; + NautilusDimensions text_dimensions; + + maximum_height = GTK_WIDGET (rss_control)->allocation.height - 16; + + if (rss_control->details->bullet) { + bullet_width = gdk_pixbuf_get_width (rss_control->details->bullet); + bullet_height = gdk_pixbuf_get_height (rss_control->details->bullet); + } else { + bullet_width = 0; + bullet_height = 0; + } + + current_item = rss_control->details->items; + item_index = 0; + + while (current_item != NULL) { + /* draw the text */ + + item_data = (RSSItemData*) current_item->data; + if (item_index == rss_control->details->prelight_index) { + text_color = NAUTILUS_RGB_COLOR_BLUE; + bullet_alpha = 255; + } else { + text_color = NAUTILUS_RGB_COLOR_BLACK; + bullet_alpha = 160; + } + font_size = 12; + + text_dimensions = nautilus_scalable_font_measure_text (rss_control->details->font, + font_size, + item_data->item_title, + strlen (item_data->item_title)); + + nautilus_scalable_font_draw_text (rss_control->details->font, pixbuf, + 20, v_offset, + NULL, + font_size, + item_data->item_title, strlen (item_data->item_title), + text_color, + NAUTILUS_OPACITY_FULLY_OPAQUE); + + /* draw a blue underline to make it look like a link */ + draw_blue_line (pixbuf, 20, v_offset + 11, text_dimensions.width); + + /* draw the bullet */ + if (rss_control->details->bullet) { + rss_control_pixbuf_composite (rss_control->details->bullet, pixbuf, 2, v_offset - 2, bullet_alpha); + } + + v_offset += RSS_ITEM_HEIGHT; + item_index += 1; + current_item = current_item->next; + if (v_offset > maximum_height) { + break; + } + + } + + return v_offset; +} + +/* handle drawing the control */ +static void +nautilus_rss_control_draw (GtkWidget *widget, GdkRectangle *box) +{ + NautilusRSSControl *control; + GdkPixbuf *temp_pixbuf; + int width, height, v_offset; + + /* allocate a pixbuf to draw into */ + width = widget->allocation.width; + height = widget->allocation.height; + + /* don't draw when too small, like during size negotiation */ + if (width < MINIMUM_DRAW_SIZE || height < MINIMUM_DRAW_SIZE) { + return; + } + + temp_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height); + nautilus_gdk_pixbuf_fill_rectangle_with_color (temp_pixbuf, NULL, 0xFFEFEFEF); + + g_return_if_fail (widget != NULL); + g_return_if_fail (NAUTILUS_IS_RSS_CONTROL (widget)); + + control = NAUTILUS_RSS_CONTROL (widget); + + v_offset = draw_rss_logo_image (control, temp_pixbuf, 2); + v_offset = draw_rss_title (control, temp_pixbuf, v_offset); + control->details->items_v_offset = v_offset; + + v_offset += 6; + v_offset = draw_rss_items (control, temp_pixbuf, v_offset); + + /* blit the pixbuf to the drawable, then release it */ + gdk_pixbuf_render_to_drawable_alpha (temp_pixbuf, + widget->window, + 0, 0, + widget->allocation.x, widget->allocation.y, + width, height, + GDK_PIXBUF_ALPHA_BILEVEL, 128, + GDK_RGB_DITHER_MAX, + 0, 0); + + gdk_pixbuf_unref (temp_pixbuf); +} + +/* handle expose events */ +static int +nautilus_rss_control_expose (GtkWidget *widget, GdkEventExpose *event) +{ + GdkRectangle box; + g_return_val_if_fail (widget != NULL, FALSE); + g_return_val_if_fail (NAUTILUS_IS_RSS_CONTROL (widget), FALSE); + + box.x = 0; box.y = 0; + box.width = widget->allocation.width; + box.height = widget->allocation.height; + + nautilus_rss_control_draw (widget, &box); + return FALSE; +} + +/* maintain the prelight state, redrawing if necessary */ + +static void +nautilus_rss_control_set_prelight_index (NautilusRSSControl *rss_control, int prelight_state) +{ + if (rss_control->details->prelight_index != prelight_state) { + rss_control->details->prelight_index = prelight_state; + gtk_widget_queue_draw (GTK_WIDGET (rss_control)); + } +} + +/* handle mouse motion events by maintaining the prelight state */ +static gboolean +nautilus_rss_control_motion_event (GtkWidget *widget, GdkEventMotion *event) +{ + int x, y; + int which_item, item_count; + NautilusRSSControl *rss_control; + + rss_control = NAUTILUS_RSS_CONTROL (widget); + + gtk_widget_get_pointer (widget, &x, &y); + which_item = (y - (widget->allocation.y + rss_control->details->items_v_offset)) / RSS_ITEM_HEIGHT; + item_count = g_list_length (rss_control->details->items); + + if (which_item < 0 || which_item >= item_count) { + which_item = -1; + } + nautilus_rss_control_set_prelight_index (rss_control, which_item); + return TRUE; +} + +/* handle leave events by cancelling any prelighting */ +static gboolean +nautilus_rss_control_leave_event (GtkWidget *widget, GdkEventCrossing *event) +{ + NautilusRSSControl *rss_control; + + rss_control = NAUTILUS_RSS_CONTROL (widget); + nautilus_rss_control_set_prelight_index (rss_control, -1); + + return TRUE; +} + +/* handle size requests by requesting a fixed size */ +static void +nautilus_rss_control_size_request (GtkWidget *widget, GtkRequisition *request) +{ + request->width = 240; + request->height = 140; +} + + +/* handle button press events */ +static gboolean +nautilus_rss_control_button_press_event (GtkWidget *widget, GdkEventButton *event) +{ + GList *selected_item; + NautilusRSSControl *rss_control; + RSSItemData *item_data; + char *command; + int result, which_item; + + rss_control = NAUTILUS_RSS_CONTROL (widget); + if (event->y < (widget->allocation.y + rss_control->details->items_v_offset)) { + command = g_strdup_printf ("nautilus %s", rss_control->details->main_uri); + result = system (command); + g_free (command); + } else { + which_item = (event->y - (widget->allocation.y + rss_control->details->items_v_offset)) / RSS_ITEM_HEIGHT; + if (which_item < (int) g_list_length (rss_control->details->items)) { + selected_item = g_list_nth (rss_control->details->items, which_item); + item_data = (RSSItemData*) selected_item->data; + + command = g_strdup_printf ("nautilus %s", item_data->item_url); + result = system (command); + g_free (command); + } + } + + return FALSE; +} + diff --git a/components/rss-control/nautilus-rss-control.h b/components/rss-control/nautilus-rss-control.h new file mode 100644 index 000000000..e73c31bbc --- /dev/null +++ b/components/rss-control/nautilus-rss-control.h @@ -0,0 +1,54 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Andy Hertzfeld + */ + +/* header file for the rss control component */ + +#ifndef NAUTILUS_RSS_CONTROL_H +#define NAUTILUS_RSS_CONTROL_H + +#include <bonobo.h> +#include <gtk/gtkeventbox.h> +typedef struct _NautilusRSSControl NautilusRSSControl; +typedef struct _NautilusRSSControlClass NautilusRSSControlClass; + +#define NAUTILUS_TYPE_RSS_CONTROL (nautilus_rss_control_get_type ()) +#define NAUTILUS_RSS_CONTROL(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_RSS_CONTROL, NautilusRSSControl)) +#define NAUTILUS_RSS_CONTROL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_RSS_CONTROL, NautilusRSSControlClass)) +#define NAUTILUS_IS_RSS_CONTROL(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_RSS_CONTROL)) +#define NAUTILUS_IS_RSS_CONTROL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_RSS_CONTROL)) + +typedef struct _NautilusRSSControlDetails NautilusRSSControlDetails; + +struct _NautilusRSSControl { + GtkEventBox parent; + NautilusRSSControlDetails *details; +}; + +struct _NautilusRSSControlClass { + GtkEventBoxClass parent_class; +}; + +/* GtkObject support */ +GtkType nautilus_rss_control_get_type (void); +BonoboObject* nautilus_rss_control_get_control (NautilusRSSControl *rss_control); + +#endif /* NAUTILUS_RSS_CONTROL_H */ diff --git a/components/rss-control/nautilus-rss-control.oafinfo b/components/rss-control/nautilus-rss-control.oafinfo new file mode 100644 index 000000000..9d21acf6a --- /dev/null +++ b/components/rss-control/nautilus-rss-control.oafinfo @@ -0,0 +1,20 @@ +<oaf_info> + +<oaf_server iid="OAFIID:nautilus_rss_control_factory:1230" type="exe" location="nautilus-rss-control"> +<oaf_attribute name="repo_ids" type="stringv"> +<item value="IDL:Bonobo/GenericFactory:1.0"/> +</oaf_attribute> +<oaf_attribute name="name" type="string" value="rss control factory"/> +<oaf_attribute name="description" type="string" value="rss control object factory"/> +</oaf_server> + +<oaf_server iid="OAFIID:nautilus_rss_control:1230" type="factory" location="OAFIID:nautilus_rss_control_factory:1230"> +<oaf_attribute name="repo_ids" type="stringv"> +<item value="IDL:Bonobo/Control:1.0"/> +<item value="IDL:Bonobo/Unknown:1.0"/> +</oaf_attribute> +<oaf_attribute name="name" type="string" value="rss control"/> +<oaf_attribute name="description" type="string" value="nautilus rss control object"/> +</oaf_server> + +</oaf_info> diff --git a/components/services/install-view/nautilus-service-install.c b/components/services/install-view/nautilus-service-install.c new file mode 100644 index 000000000..addeaff69 --- /dev/null +++ b/components/services/install-view/nautilus-service-install.c @@ -0,0 +1,229 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: Eskil Heyn Olsen <eskil@eazel.com> + */ + +#include "nautilus-service-install.h" +#include <libeazelinstall.h> + +#define OAF_ID "OAFIID:trilobite_eazel_install_service:8ff6e815-1992-437c-9771-d932db3b4a17" + +static void +xnautilus_service_install_download_failed (EazelInstallCallback *service, + const char *name, + NautilusServiceInstallView *view) +{ + fprintf (stdout, "Download of %s FAILED\n", name); +} + +/* + This dumps the entire tree for the failed package. + */ +static void +xnautilus_service_install_failed_helper (EazelInstallCallback *service, + const PackageData *pd, + gchar *indent, + NautilusServiceInstallView *view) +{ + GList *iterator; + + if (pd->toplevel) { + fprintf (stdout, "\n***The package %s failed. Here's the dep tree\n", pd->name); + } + switch (pd->status) { + case PACKAGE_DEPENDENCY_FAIL: + fprintf (stdout, "%s-%s FAILED\n", indent, rpmfilename_from_packagedata (pd)); + break; + case PACKAGE_CANNOT_OPEN: + fprintf (stdout, "%s-%s NOT FOUND\n", indent, rpmfilename_from_packagedata (pd)); + break; + case PACKAGE_SOURCE_NOT_SUPPORTED: + fprintf (stdout, "%s-%s is a source package\n", indent, rpmfilename_from_packagedata (pd)); + break; + case PACKAGE_BREAKS_DEPENDENCY: + fprintf (stdout, "%s-%s breaks\n", indent, rpmfilename_from_packagedata (pd)); + break; + default: + fprintf (stdout, "%s-%s\n", indent, rpmfilename_from_packagedata (pd)); + break; + } + for (iterator = pd->soft_depends; iterator; iterator = iterator->next) { + PackageData *pack; + char *indent2; + indent2 = g_strconcat (indent, iterator->next ? " |" : " " , NULL); + pack = (PackageData*)iterator->data; + xnautilus_service_install_failed_helper (service, pack, indent2, view); + g_free (indent2); + } + for (iterator = pd->breaks; iterator; iterator = iterator->next) { + PackageData *pack; + char *indent2; + indent2 = g_strconcat (indent, iterator->next ? " |" : " " , NULL); + pack = (PackageData*)iterator->data; + xnautilus_service_install_failed_helper (service, pack, indent2, view); + g_free (indent2); + } +} + +static void +xnautilus_service_install_failed (EazelInstallCallback *service, + const PackageData *pd, + NautilusServiceInstallView *view) +{ + nautilus_service_install_failed_helper (service, pd, "", view); +} + + +static void +xnautilus_service_install_dependency_check (EazelInstallCallback *service, + const PackageData *package, + const PackageData *needs, + NautilusServiceInstallView *view) +{ + g_message ("Doing dependency check for %s - need %s\n", package->name, needs->name); +} + +static void +xnautilus_service_install_done (EazelInstallCallback *service, + gboolean result, + NautilusServiceInstallView *view) +{ + char *tmp; + eazel_install_callback_unref (GTK_OBJECT (service)); + + tmp = g_strdup (view->details->uri); + nautilus_service_install_view_load_uri (view, tmp); + g_free (tmp); +} + +void +xnautilus_service_install_view_install_package_callback (GtkWidget *widget, + NautilusServiceInstallView *view) +{ + GList *packages; + GList *categories; + CORBA_Environment ev; + EazelInstallCallback *cb; + + CORBA_exception_init (&ev); + + packages = NULL; + categories = NULL; + + { + char *ptr; + CategoryData *category; + PackageData *pack; + + /* Find the :// of the url and skip to after it */ + ptr = strstr (view->details->uri, "file://"); + ptr += strlen ("file://"); + + /* make a package and add to it to a categorylist */ + pack = packagedata_new (); + pack->filename = g_strdup (ptr); + + category = categorydata_new (); + category->packages = g_list_prepend (NULL, pack); + categories = g_list_prepend (NULL, category); + } + + /* Check that we're on a redhat system */ + if (!check_for_redhat ()) { + fprintf (stderr, "*** This tool can only be used on RedHat.\n"); + } + + cb = eazel_install_callback_new (); + + Trilobite_Eazel_Install__set_protocol (eazel_install_callback_corba_objref (cb), Trilobite_Eazel_PROTOCOL_HTTP, &ev); + if (!check_for_root_user()) { + fprintf (stderr, "*** This tool requires root access, switching to test mode\n"); + Trilobite_Eazel_Install__set_test_mode (eazel_install_callback_corba_objref (cb), TRUE, &ev); + } else { + Trilobite_Eazel_Install__set_test_mode (eazel_install_callback_corba_objref (cb), FALSE, &ev); + } + Trilobite_Eazel_Install__set_tmp_dir (eazel_install_callback_corba_objref (cb), "/tmp/eazel-install", &ev); + Trilobite_Eazel_Install__set_server (eazel_install_callback_corba_objref (cb), "testmachine.eazel.com", &ev); + Trilobite_Eazel_Install__set_server_port (eazel_install_callback_corba_objref (cb), 80, &ev); + + gtk_signal_connect (GTK_OBJECT (cb), "download_progress", nautilus_service_install_download_progress_signal, view); + gtk_signal_connect (GTK_OBJECT (cb), "install_progress", nautilus_service_install_progress_signal, view); + gtk_signal_connect (GTK_OBJECT (cb), "install_failed", nautilus_service_install_failed, view); + gtk_signal_connect (GTK_OBJECT (cb), "download_failed", nautilus_service_install_download_failed, view); + gtk_signal_connect (GTK_OBJECT (cb), "dependency_check", nautilus_service_install_dependency_check, view); + gtk_signal_connect (GTK_OBJECT (cb), "done", nautilus_service_install_done, view); + + eazel_install_callback_install_packages (cb, categories, NULL, &ev); + + CORBA_exception_free (&ev); +} + +void +xnautilus_service_install_view_uninstall_package_callback (GtkWidget *widget, + NautilusServiceInstallView *view) +{ + GList *packages; + GList *categories; + CORBA_Environment ev; + EazelInstallCallback *cb; + + CORBA_exception_init (&ev); + + packages = NULL; + categories = NULL; + + { + CategoryData *category; + PackageData *pack; + pack = gtk_object_get_data (GTK_OBJECT (view), "packagedata"); + + category = categorydata_new (); + category->packages = g_list_prepend (NULL, pack); + categories = g_list_prepend (NULL, category); + } + + /* Check that we're on a redhat system */ + if (!check_for_redhat ()) { + fprintf (stderr, "*** This tool can only be used on RedHat.\n"); + } + + cb = eazel_install_callback_new (); + + Trilobite_Eazel_Install__set_protocol (eazel_install_callback_corba_objref (cb), Trilobite_Eazel_PROTOCOL_HTTP, &ev); + if (!check_for_root_user ()) { + fprintf (stderr, "*** This tool requires root access, switching to test mode\n"); + Trilobite_Eazel_Install__set_test_mode (eazel_install_callback_corba_objref (cb), TRUE, &ev); + } else { + Trilobite_Eazel_Install__set_test_mode (eazel_install_callback_corba_objref (cb), FALSE, &ev); + } + Trilobite_Eazel_Install__set_tmp_dir (eazel_install_callback_corba_objref (cb), "/tmp/eazel-install", &ev); + Trilobite_Eazel_Install__set_server (eazel_install_callback_corba_objref (cb), "testmachine.eazel.com", &ev); + Trilobite_Eazel_Install__set_server_port (eazel_install_callback_corba_objref (cb), 80, &ev); + + gtk_signal_connect (GTK_OBJECT (cb), "download_progress", nautilus_service_install_download_progress_signal, view); + gtk_signal_connect (GTK_OBJECT (cb), "uninstall_progress", nautilus_service_install_progress_signal, view); + gtk_signal_connect (GTK_OBJECT (cb), "uninstall_failed", nautilus_service_install_failed, view); + gtk_signal_connect (GTK_OBJECT (cb), "dependency_check", nautilus_service_install_dependency_check, view); + gtk_signal_connect (GTK_OBJECT (cb), "done", nautilus_service_install_done, view); + + eazel_install_callback_uninstall_packages (cb, categories, NULL, &ev); + + CORBA_exception_free (&ev); +} diff --git a/components/services/install-view/nautilus-service-install.h b/components/services/install-view/nautilus-service-install.h new file mode 100644 index 000000000..c284779fb --- /dev/null +++ b/components/services/install-view/nautilus-service-install.h @@ -0,0 +1,33 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: Eskil Heyn Olsen <eskil@eazel.com> + */ + +#ifndef NAUTILUS_SERVICE_INSTALL_H +#define NAUTILUS_SERVICE_INSTALL_H + +#include "nautilus-service-install-view.h" + +void nautilus_service_install_view_install_package_callback (GtkWidget *widget, + NautilusServiceInstallView *view); +void nautilus_service_install_view_uninstall_package_callback (GtkWidget *widget, + NautilusServiceInstallView *view); + +#endif /* NAUTILUS_SERVICE_INSTALL_H */ diff --git a/components/services/install/lib/eazel-install-logic.c b/components/services/install/lib/eazel-install-logic.c new file mode 100644 index 000000000..38dbc9922 --- /dev/null +++ b/components/services/install/lib/eazel-install-logic.c @@ -0,0 +1,2090 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: Eskil Heyn Olsen <eskil@eazel.com> + */ + +#include "eazel-install-logic.h" +#include "eazel-install-xml-package-list.h" +#include "eazel-install-public.h" +#include "eazel-install-private.h" +#include "eazel-install-rpm-glue.h" +#include "eazel-install-query.h" +#include "eazel-install-logic2.h" + +/* We use rpmvercmp to compare versions... */ +#include <rpm/rpmlib.h> +#include <rpm/misc.h> + +#ifndef EAZEL_INSTALL_NO_CORBA +#include <libtrilobite/libtrilobite.h> +#else +#include <libtrilobite/libtrilobite-service.h> +#include <libtrilobite/trilobite-root-helper.h> +#endif + +#include <libtrilobite/trilobite-core-utils.h> +#include <string.h> +#include <time.h> + +#include <errno.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <fcntl.h> +#include <unistd.h> +#include <ctype.h> +#ifdef EAZEL_INSTALL_SLIM +#include <sys/wait.h> +#endif + +static gboolean eazel_install_do_install_packages (EazelInstall *service, + GList* packages); + +static int eazel_install_start_transaction (EazelInstall *service, + GList* packages); + +static gboolean eazel_install_ensure_deps (EazelInstall *service, + GList **filenames, + GList **fails); + +static void eazel_uninstall_globber (EazelInstall *service, + GList **packages, + GList **failed); + +static gboolean eazel_install_download_packages (EazelInstall *service, + gboolean toplevel, + GList **packages, + GList **failed_packages); +#if 0 +static gboolean eazel_install_check_for_file_conflicts (EazelInstall *service, + PackageData *pack, + GList **breaks, + GList **requires); +#endif +static void eazel_install_prune_packages (EazelInstall *service, + PackageData *pack, + ...); +/* + Checks for pre-existance of all the packages + */ +static void +eazel_install_pre_install_packages (EazelInstall *service, + GList **packages) +{ + GList *iterator; + GList *failed_packages = NULL; + + for (iterator = *packages; iterator; iterator = g_list_next (iterator)) { + PackageData *pack = (PackageData*)iterator->data; + EazelInstallStatus inst_status; + gboolean skip = FALSE; + + inst_status = eazel_install_check_existing_packages (service, pack); + + /* If in force mode, install it under all circumstances. + if not, only install if not already installed in same + version or up/downgrade is set */ + if (eazel_install_get_force (service) || + (eazel_install_get_downgrade (service) && inst_status == EAZEL_INSTALL_STATUS_DOWNGRADES) || + (eazel_install_get_update (service) && inst_status == EAZEL_INSTALL_STATUS_UPGRADES) || + inst_status == EAZEL_INSTALL_STATUS_NEW_PACKAGE) { + skip = FALSE; + } else { + skip = TRUE; + } + + if (skip) { + trilobite_debug ("Skipping %s...", pack->name); +#if 0 + /* Nuke the modifies list again, since we don't want to see them */ + g_list_foreach (pack->modifies, + (GFunc)packagedata_destroy, + GINT_TO_POINTER (TRUE)); + g_list_free (pack->modifies); + pack->modifies = NULL; +#endif + + /* Add it to the list of packages to nuke at the end + of this function */ + failed_packages = g_list_prepend (failed_packages, pack); + } + } + + for (iterator = failed_packages; iterator; iterator=g_list_next (iterator)) { + eazel_install_prune_packages (service, + (PackageData*)iterator->data, + packages, NULL); + } + g_list_free (failed_packages); +} + +EazelInstallStatus +ei_install_packages (EazelInstall *service, GList *categories) { + EazelInstallStatus result; + + if (categories == NULL) { + trilobite_debug (_("Reading the install package list %s"), eazel_install_get_package_list (service)); + categories = parse_local_xml_package_list (eazel_install_get_package_list (service), NULL, NULL); + } + + result = EAZEL_INSTALL_NOTHING; + if (categories != NULL) { + /* First, collect all packages in one list */ + GList *packages = categorylist_flatten_to_packagelist (categories); + + /* Now download all the packages */ + if (eazel_install_download_packages (service, TRUE, &packages, NULL)) { + + /* check for packages that are already installed */ + eazel_install_pre_install_packages (service, &packages); + + /* Files downloaded, now install */ + if (eazel_install_do_install_packages (service, packages)) { + result |= EAZEL_INSTALL_INSTALL_OK; + } + } + } + + return result; +} /* end install_new_packages */ + +/* + Download all the packages and keep doing that by recursively + calling eazel_install_download_packages with package->soft_depends + */ +static gboolean +eazel_install_download_packages (EazelInstall *service, + gboolean toplevel, + GList **packages, + GList **failed_packages) +{ + g_assert_not_reached (); + return TRUE; +#if 0 + GList *iterator; + gboolean result = TRUE; + GList *remove_list = NULL; + + g_assert (packages); + g_assert (*packages); + + for (iterator = *packages; (iterator != NULL) && result; iterator = g_list_next (iterator)) { + PackageData* package = (PackageData*)iterator->data; + gboolean fetch_package; + + fetch_package = TRUE; + + trilobite_debug ("init for %s (%s/%s)", package->name, package->version ? package->version : "NO VERSION", + toplevel?"TRUE":"FALSE"); + /* if filename in the package is set, but the file + does not exist, get it anyway */ + if (package->filename) { + trilobite_debug ("Filename set, and file exists = %d", + g_file_test (package->filename, G_FILE_TEST_ISFILE)); + if (g_file_test (package->filename, G_FILE_TEST_ISFILE)) { + /* Don't fetch, but load rpm header and return + ok */ + fetch_package = FALSE; + result = TRUE; + package = eazel_package_system_load_package (service->private->package_system, + package, + package->filename, + PACKAGE_FILL_NO_DIRS_IN_PROVIDES); + } else { + /* The file didn't exist, remove the + leading path and set the filename, plus + toggle the fetch_package to TRUE */ + g_free (package->filename); + package->filename = g_strdup (g_basename (package->filename)); + } + } else if (!eazel_install_get_force (service) && package->version) { + /* If the package has a version set, check that we don't already have + the same or newer installed. This is almost the same check as + in eazel_install_pre_install_package. The reason for two checks is + - first check before download (if possible) + - after download, when we for sure have access to the version, check again + - we do this before do_dependency_check to avoid downloaded soft_deps. + */ + EazelInstallStatus inst_status; + + inst_status = eazel_install_check_existing_packages (service, package); + if (eazel_install_get_downgrade (service) && inst_status == EAZEL_INSTALL_STATUS_DOWNGRADES) { + trilobite_debug (_("Will download %s"), package->name); + /* must download... */ + } else if (inst_status == EAZEL_INSTALL_STATUS_QUO || + inst_status == EAZEL_INSTALL_STATUS_DOWNGRADES) { + /* Nuke the modifies list again, since we don't want to see them */ + g_list_foreach (package->modifies, + (GFunc)packagedata_destroy, + GINT_TO_POINTER (TRUE)); + g_list_free (package->modifies); + package->modifies = NULL; + /* don't fecth the package */ + fetch_package = FALSE; + /* Add it to the list of packages to nuke at the end + of this function */ + remove_list = g_list_prepend (remove_list, package); + trilobite_debug (_("%s already installed"), package->name); + } + } + + if (fetch_package) { + result = eazel_install_fetch_package (service, package); + + if (!result) { + package->status = PACKAGE_CANNOT_OPEN; + remove_list = g_list_prepend (remove_list, package); + } else { +#if 0 + /* If downloaded package has soft_deps, + fetch them by a recursive call */ + if (package->soft_depends) { + result = eazel_install_download_packages (service, + FALSE, + &package->soft_depends, + NULL); + } +#endif + } + } + + if (result) { + package->toplevel = toplevel; + if (package->source_package) { + package->status = PACKAGE_SOURCE_NOT_SUPPORTED; + remove_list = g_list_prepend (remove_list, package); + } + if (strlen ("debug")) { + char *tmp = packagedata_dump (package, TRUE); + fprintf (stderr, "%s", tmp); + g_free (tmp); + } + } + } + + for (iterator = remove_list; iterator; iterator = g_list_next (iterator)) { + PackageData *package = (PackageData*)(iterator->data); + eazel_install_prune_packages (service, package, packages, NULL); + } + + if (failed_packages) { + (*failed_packages) = remove_list; + } + + return result; +#endif +} +#if 0 +/* + This function checks all files in pack->provides, and + checks if another already installed package owns this file. + returns FALSE is there are no conflicts, and TRUE if there + are. + + If there are conflicts because of a related package, + this package is added to *requires. + */ +static gboolean +eazel_install_check_for_file_conflicts (EazelInstall *service, + PackageData *pack, + GList **breaks, + GList **requires) +{ + GList *owners; + GList *iterator; + /* Set optimism to high */ + gboolean result = FALSE; + + g_assert (service); + g_assert (pack); + g_assert (requires); + g_assert (*requires == NULL); + + trilobite_debug ("Checking file conflicts for %s", pack->name); + + for (iterator = pack->provides; iterator; glist_step (iterator)) { + char *filename = (char*)iterator->data; + + /* many packages will supply some dirs, eg /usr/share/locale/../LC_MESSAGES + dirs, so don't check those + + eazel-install-types + (packagedata_fill_from_rpm_header) now does not add + these. This is more safe, as checking the file + could still cause a conflict, if the file was not + on the system but two dirs had the same dir + + if (g_file_test (filename, G_FILE_TEST_ISDIR)) { + continue; + } */ + + owners = eazel_package_system_query (service->private->package_system, + service->private->cur_root, + filename, + EAZEL_PACKAGE_SYSTEM_QUERY_OWNS, + PACKAGE_FILL_NO_DIRS_IN_PROVIDES); + packagedata_list_prune (&owners, pack->modifies, TRUE, TRUE); + + if (g_list_length (owners) > 1) { + GList *pit; + /* FIXME bugzilla.eazel.com 3511: + More than one packages owns this file, + this cannot happen (or should not at least) + */ + trilobite_debug ("***************************************************"); + trilobite_debug ("More than one package owns the file %s", filename); + trilobite_debug ("This is filed as bug 2959"); + trilobite_debug ("Try rpm --rebuilddb"); + for (pit = owners; pit; pit = g_list_next (pit)) { + char *tmp; + PackageData *owner = (PackageData*)(pit->data); + tmp = packagedata_get_readable_name (owner); + trilobite_debug ("a owner is %s", tmp); + g_free (tmp); + } + trilobite_debug ("halting..."); + g_assert_not_reached (); + } else if (g_list_length (owners) == 1) { + PackageData *owner = (PackageData*)owners->data; + + /* If the package owner is already in the breaks list for the package, + or in the *requires, continue */ + if (g_list_find_custom (*breaks, owner->name, + (GCompareFunc)eazel_install_package_name_compare) || + g_list_find_custom (*requires, owner->name, + (GCompareFunc)eazel_install_package_name_compare)) { + /* trilobite_debug ("already breaking %s", owner->name); */ + gtk_object_unref (GTK_OBJECT (owner)); + owner = NULL; + continue; + } + + if (strcmp (pack->name, owner->name)) { + trilobite_debug ("file %s from package %s conflicts with file from package %s", + filename, pack->name, owner->name); + + result = TRUE; + if (eazel_install_check_if_related_package (service, pack, owner)) { + trilobite_debug ("Package %s may be related to %s", + owner->name, pack->name); + g_free (owner->version); + owner->version = g_strdup (pack->version); + (*requires) = g_list_prepend (*requires, owner); + } else { + owner->status = PACKAGE_FILE_CONFLICT; + (*breaks) = g_list_prepend (*breaks, owner); + } + + } else { + /* else it's the same package and it's okay */ + /* so FREE IT YOU SICK MONKEY! */ + gtk_object_unref (GTK_OBJECT (owner)); + } + } + /* free the _simple_query result list */ + g_list_free (owners); + +#ifdef EAZEL_INSTALL_SLIM + /* In the slim, we need to enter the g_main_loop during file check */ + g_main_iteration (FALSE); +#endif + + } + return result; +} +#endif + +static gboolean +eazel_install_do_install_packages (EazelInstall *service, + GList* packages) +{ + gboolean rv = TRUE; + GList* failedfiles = NULL; + + if (packages) { + rv = FALSE; + eazel_install_ensure_deps (service, &packages, &failedfiles); + if (g_list_length (packages)) { + if (eazel_install_start_transaction (service, packages) == 0) { + rv = TRUE; + } + g_list_free (packages); + } + } + + return rv; +} /* end install_packages */ + +static EazelInstallStatus +uninstall_all_packages (EazelInstall *service, + GList *categories) +{ + EazelInstallStatus result = EAZEL_INSTALL_UNINSTALL_OK; + + while (categories) { + CategoryData* cat = categories->data; + GList *failed; + + trilobite_debug (_("Category = %s"), cat->name); + + failed = NULL; + eazel_uninstall_globber (service, &cat->packages, &failed); + + if (eazel_install_start_transaction (service, cat->packages) != 0) { + result = EAZEL_INSTALL_NOTHING; + } + + categories = g_list_next (categories); + } + return result; +} + +EazelInstallStatus +ei_uninstall_packages (EazelInstall *service, + GList* categories) +{ + EazelInstallStatus result = EAZEL_INSTALL_NOTHING; + + result |= uninstall_all_packages (service, categories); + + return result; + +} /* end install_new_packages */ + + +static GList * +ei_get_packages_with_mod_flag (GList *packages, + PackageModification mod) +{ + GList *it; + GList *res; + + res = NULL; + for (it = packages; it; it = g_list_next (it)) { + PackageData *pack; + pack = (PackageData*)it->data; + if (pack->modify_status == mod) { + res = g_list_prepend (res, pack); + } + if (pack->soft_depends) { + res = g_list_concat (res, + ei_get_packages_with_mod_flag (pack->soft_depends, mod)); + } + if (pack->modifies) { + res = g_list_concat (res, + ei_get_packages_with_mod_flag (pack->modifies, mod)); + } + } + return res; +} + +/* Function to prune the uninstall list for elements marked as downgrade */ +static void +ei_check_uninst_vs_downgrade (GList **inst, + GList **down) +{ + GList *it; + GList *remove; + + remove = NULL; + for (it = *inst; it; it = g_list_next (it)) { + GList *entry; + PackageData *pack; + + pack = (PackageData*)it->data; + entry = g_list_find_custom (*down, pack->name, (GCompareFunc)eazel_install_package_name_compare); + if (entry != NULL) { + remove = g_list_prepend (remove, it->data); + } + } + + for (it = remove; it; it = g_list_next (it)) { + (*inst) = g_list_remove (*inst, it->data); + } +} + +static void hest (PackageData *pack, char *str) { + trilobite_debug ("Must %s %s", str, pack->name); +} + +EazelInstallStatus +ei_revert_transaction (EazelInstall *service, + GList *packages) +{ + GList *uninst, *inst, *upgrade, *downgrade; + CategoryData *cat; + GList *categories; + EazelInstallStatus result = EAZEL_INSTALL_NOTHING; + + uninst = ei_get_packages_with_mod_flag (packages, PACKAGE_MOD_INSTALLED); + inst = ei_get_packages_with_mod_flag (packages, PACKAGE_MOD_UNINSTALLED); + upgrade = ei_get_packages_with_mod_flag (packages, PACKAGE_MOD_DOWNGRADED); + downgrade = ei_get_packages_with_mod_flag (packages, PACKAGE_MOD_UPGRADED); + + ei_check_uninst_vs_downgrade (&uninst, &downgrade); + + g_list_foreach (uninst, (GFunc)hest, "uninstall"); + g_list_foreach (inst, (GFunc)hest, "install"); + g_list_foreach (downgrade, (GFunc)hest, "downgrade"); + g_list_foreach (upgrade, (GFunc)hest, "upgrade"); + + cat = categorydata_new (); + categories = g_list_prepend (NULL, cat); + + if (uninst) { + eazel_install_set_uninstall (service, TRUE); + eazel_install_set_downgrade (service, FALSE); + eazel_install_set_update (service, FALSE); + cat->packages = uninst; + result |= ei_uninstall_packages (service, categories); + } + if (inst) { + eazel_install_set_uninstall (service, FALSE); + eazel_install_set_downgrade (service, FALSE); + eazel_install_set_update (service, FALSE); + cat->packages = inst; + result |= ei_install_packages (service, categories); + } + if (downgrade) { + eazel_install_set_uninstall (service, FALSE); + eazel_install_set_downgrade (service, TRUE); + eazel_install_set_update (service, FALSE); + cat->packages = downgrade; + result |= ei_install_packages (service, categories); + } + if (upgrade) { + eazel_install_set_uninstall (service, FALSE); + eazel_install_set_downgrade (service, TRUE); + eazel_install_set_update (service, TRUE); + cat->packages = upgrade; + result |= ei_install_packages (service, categories); + g_list_foreach (upgrade, (GFunc)gtk_object_unref, NULL); + } + + return result; +} + + +void +eazel_install_do_transaction_add_to_transaction (EazelInstall *service, + PackageData *pack) +{ + service->private->transaction = g_list_prepend (service->private->transaction, + pack); +} + +static void +eazel_install_do_transaction_save_report_helper (xmlNodePtr node, + GList *packages) +{ + GList *iterator; + + for (iterator = packages; iterator; iterator = g_list_next (iterator)) { + PackageData *pack; + char *tmp; + pack = (PackageData*)iterator->data; + switch (pack->modify_status) { + case PACKAGE_MOD_INSTALLED: + tmp = g_strdup_printf ("Installed %s", pack->name); + xmlNewChild (node, NULL, "DESCRIPTION", tmp); + g_free (tmp); + break; + case PACKAGE_MOD_UNINSTALLED: + tmp = g_strdup_printf ("Uninstalled %s", pack->name); + xmlNewChild (node, NULL, "DESCRIPTION", tmp); + g_free (tmp); + break; + default: + break; + } + if (pack->modifies) { + eazel_install_do_transaction_save_report_helper (node, pack->modifies); + } + } +} + +static void +eazel_install_do_transaction_save_report (EazelInstall *service) +{ + FILE *outfile; + xmlDocPtr doc; + xmlNodePtr node, root; + char *name = NULL; + + if (eazel_install_get_transaction_dir (service) == NULL) { + g_warning ("Transaction directory not set, not storing transaction report"); + } + + /* Ensure the transaction dir is present */ + if (! g_file_test (eazel_install_get_transaction_dir (service), G_FILE_TEST_ISDIR)) { + int retval; + retval = mkdir (eazel_install_get_transaction_dir (service), 0755); + if (retval < 0) { + if (errno != EEXIST) { + g_warning (_("Could not create transaction directory (%s)! ***\n"), + eazel_install_get_transaction_dir (service)); + return; + } + } + } + + /* Create xml */ + doc = xmlNewDoc ("1.0"); + root = node = xmlNewNode (NULL, "TRANSACTION"); + xmlDocSetRootElement (doc, node); + + /* Make a unique name */ + name = g_strdup_printf ("%s/transaction.%lu", eazel_install_get_transaction_dir (service), + (unsigned long) time (NULL)); + while (g_file_test (name, G_FILE_TEST_ISFILE)) { + g_free (name); + sleep (1); + name = g_strdup_printf ("%s/transaction.%lu", + eazel_install_get_transaction_dir (service), + (unsigned long) time (NULL)); + } + + trilobite_debug (_("Writing transaction to %s"), name); + + /* Open and save */ + outfile = fopen (name, "w"); + xmlAddChild (root, eazel_install_packagelist_to_xml (service->private->transaction, FALSE)); + node = xmlAddChild (node, xmlNewNode (NULL, "DESCRIPTIONS")); + + { + char *tmp; + tmp = g_strdup_printf ("%lu", (unsigned long) time (NULL)); + xmlNewChild (node, NULL, "DATE", tmp); + g_free (tmp); + } + + eazel_install_do_transaction_save_report_helper (node, service->private->transaction); + + xmlDocDump (outfile, doc); + + fclose (outfile); + g_free (name); +} + +/* + This checks, that for a given set of packages, no two packages + contains the same file. + This is done by filling a hashtable with the files from + package->provides (which have full pathname) and link to the + owning package. Before adding a file to the hashtable, lookup the + file first. If result is non-null, problem... + + Did I mention that this function leaks memory like a russian submarine? -robey + */ +static gboolean +eazel_install_do_transaction_all_files_check (EazelInstall *service, + GList **packages) +{ + g_assert_not_reached (); + return FALSE; +#if 0 + gboolean result = TRUE; + GList *iterator; + GList *conflicts = NULL; /* PackageRequirements. ->package is the first found package + that providing a file, ->required is the second file that + has the same file */ + GHashTable *file_to_pack; /* maps from a filename to a packagedata struct */ + + if (eazel_install_get_force (service) || + eazel_install_get_ignore_file_conflicts (service) || + (g_list_length (*packages) == 1 )) { + trilobite_debug ("not performing file conflict check"); + return result; + } + + file_to_pack = g_hash_table_new (g_str_hash, g_str_equal); + + /* Check all the packages */ + for (iterator = *packages; iterator; glist_step (iterator)) { + PackageData *pack = (PackageData*)iterator->data; + GList *file_iterator; + int reported_yet = FALSE; + int other_conflicts = 0; + + /* Check all files provided */ + for (file_iterator = pack->provides; file_iterator; glist_step (file_iterator)) { + char *fname = (char*)file_iterator->data; + /* Lookup and check what happens... */ + PackageData *previous_pack = g_hash_table_lookup (file_to_pack, + fname); + if (previous_pack) { + /* Dang, fname is owned by previous_pack but pack also adds it */ + /* The use of reported_yet && other_conflicts is purely for + debug nicety. It ensures that only one fileconflicts pr + package is printed, whereas the alternative is eg. 200 */ + if (! reported_yet) { + trilobite_debug ("conflict, file %s from package %s is also in %s", + fname, + pack->name, + previous_pack->name); + reported_yet = TRUE; + } else { + other_conflicts++; + } + if (!g_list_find_custom (conflicts, + pack, + (GCompareFunc)eazel_install_requirement_dep_compare)) { + PackageRequirement *req; + + req = packagerequirement_new (previous_pack, pack); + conflicts = g_list_prepend (conflicts, req); + } + } else { + /* File is ok */ + g_hash_table_insert (file_to_pack, + fname, + pack); + } + } + if (other_conflicts) { + trilobite_debug ("(%d other conflicts from the same package... *sigh*)", other_conflicts); + } + } + + for (iterator = conflicts; iterator; glist_step (iterator)) { + PackageRequirement *req = (PackageRequirement*)iterator->data; + + result = FALSE; + /* Need to fail the package here to fully fix bug + FIXME bugzilla.eazel.com 3374: */ + trilobite_debug ("Conflict between %s and %s", req->package->name, req->required->name); + req->package->status = PACKAGE_FILE_CONFLICT; + req->required->status = PACKAGE_FILE_CONFLICT; + Xpackagedata_add_pack_to_breaks (req->package, req->required); + eazel_install_prune_packages (service, req->package, packages, NULL); + } + + return result; +#endif +} + + +static unsigned long +get_total_size_of_packages (const GList *packages) +{ + const GList *iterator; + unsigned long result = 0; + for (iterator = packages; iterator; iterator = g_list_next (iterator)) { + PackageData *pack = (PackageData*)iterator->data; + result += pack->bytesize; + } + return result; +} + +/* A GHRFunc to clean + out the name_to_package hash table +*/ +static gboolean +eazel_install_clean_name_to_package_hash (char *key, + PackageData *pack, + EazelInstall *service) +{ + g_free (key); + return TRUE; +} + +/* This begins the package transaction. + Return value is number of failed packages +*/ + +int +eazel_install_start_transaction (EazelInstall *service, + GList* packages) +{ + TrilobiteRootHelper *root_helper; + int res; + int flag = 0; + + if (g_list_length (packages) == 0) { + return -1; + } + + res = 0; + + if (service->private->downloaded_files) { + /* I need to get the length here, because all_files_check can alter the list */ + int l = g_list_length (packages); + /* Unless we're force installing, check file conflicts */ + if (eazel_install_get_force (service) == FALSE) { + if(!check_md5_on_files (service, packages)) { + res = l; + } + } + } + + if (eazel_install_get_test (service)) { + flag |= EAZEL_PACKAGE_SYSTEM_OPERATION_TEST; + } + if (eazel_install_get_force (service)) { + flag |= EAZEL_PACKAGE_SYSTEM_OPERATION_FORCE; + } + if (eazel_install_get_update (service)) { + flag |= EAZEL_PACKAGE_SYSTEM_OPERATION_UPGRADE; + } + if (eazel_install_get_downgrade (service)) { + flag |= EAZEL_PACKAGE_SYSTEM_OPERATION_DOWNGRADE; + } + + root_helper = gtk_object_get_data (GTK_OBJECT (service), "trilobite-root-helper"); + gtk_object_set_data (GTK_OBJECT (service->private->package_system), + "trilobite-root-helper", root_helper); + + /* Init the hack var to emit the old style progress signals */ + service->private->infoblock [0] = 0; + service->private->infoblock [1] = 0; + service->private->infoblock [2] = 0; + service->private->infoblock [3] = g_list_length (packages); + service->private->infoblock [4] = 0; + service->private->infoblock [5] = get_total_size_of_packages (packages); + + if (eazel_install_emit_preflight_check (service, packages)) { + /* this makes the primary packages appear before their dependencies. very useful for installs + * via the install-view, where only toplevel packages cause the package detail info to update. + */ + packages = g_list_reverse (packages); + + if (eazel_install_get_uninstall (service)) { + eazel_package_system_uninstall (service->private->package_system, + service->private->cur_root, + packages, + flag); + } else { + eazel_package_system_install (service->private->package_system, + service->private->cur_root, + packages, + flag); + } + + eazel_install_do_transaction_save_report (service); + } + + g_list_free (service->private->transaction); + service->private->transaction = NULL; + + g_hash_table_foreach_remove (service->private->name_to_package_hash, + (GHRFunc)eazel_install_clean_name_to_package_hash, + service); + + return res; +} /* end start_transaction */ + + +/* Checks if pack depends on dep, by doing a deep tree search */ +static gboolean +eazel_install_check_if_depends_on (PackageData *pack, + PackageData *dep) +{ + gboolean result = FALSE; + GList *iterator; + + for (iterator = pack->soft_depends; !result && iterator; glist_step (iterator)) { + PackageData *nisse = (PackageData*)iterator->data; + if (nisse == dep) { + result = TRUE; + } else if (eazel_install_check_if_depends_on (nisse, dep)) { + /* trilobite_debug ("nope, recursing"); */ + result = TRUE; + } + } + + return result; +} + +/* + The helper for eazel_install_prune_packages. + If the package is in "pruned", it has already been marked + for pruning. + Otherwise, prune first it's softdepends, then all + packages that depend on it. + */ +static void +eazel_install_prune_packages_helper (EazelInstall *service, + GList **packages, + GList **pruned, + PackageData *pack) +{ + GList *iterator; + char *tmp; + + g_return_if_fail (pack!=NULL); + /* If already pruned, abort */ + if (g_list_find (*pruned, pack) || pack->name==NULL) { + return; + } + tmp = packagedata_get_readable_name (pack); + trilobite_debug (_("Removing package %s (0x%p) %s"), + tmp, + pack, + pack->toplevel ? "(emit fail)" :"()"); + g_free (tmp); + if (pack->toplevel) { + /* We only emit signal for the toplevel packages, + and only delete them. They _destroy function destroys + the entire dep tree */ + eazel_install_emit_install_failed (service, pack); + } + /* Add to list of pruned packages */ + (*pruned) = g_list_prepend (*pruned, pack); + + /* Prune all it's soft_deps */ + for (iterator = pack->soft_depends; iterator; iterator = g_list_next (iterator)) { + PackageData *sub; + sub = (PackageData*)iterator->data; + eazel_install_prune_packages_helper (service, packages, pruned, sub); + } + + /* For all packages in "packages", check if they depend on this */ + for (iterator = *packages; iterator; iterator = g_list_next (iterator)) { + PackageData *super; + + super = (PackageData*)iterator->data; + /* FIXME bugzilla.eazel.com 3542: + This is the cause of 3542. + In this specific case, gnome-print is removed from the toplevel and from + 1st sublevel of soft_deps. + The problem is, that this g_list_find only looks down one level, and does'nt + search the entire tree, duh. + I need a find_custom call that does this the right way */ + if (eazel_install_check_if_depends_on (super, pack)) { + eazel_install_prune_packages_helper (service, packages, pruned, super); + } + } +} + +/* + Used to remove a package "pack" and all + packages in "packages" that depends + on "pack". + + To do this, we need the _helper, which gathers + the stripped files into "pruned". That way, we + can safely traverse without altering + the lists during the for loops (as g_list_remove + will fuck up the for loop). + + This may end in a recursive loop if + the ->soft_depends points to something + upwards in the dep tree (circular dependency) + + First it calls prune_helper for all the given packages, + at each iteration it removes the pruned (from list "pruned") + packages. + + Finally it deallocates all the pruned packages. + +*/ + +static void +eazel_install_prune_packages (EazelInstall *service, + PackageData *pack, + ...) +{ + va_list ap; + GList *pruned; + GList *iterator; + GList **packages; + + g_return_if_fail (pack!=NULL); + + va_start (ap, pack); + + pruned = NULL; + while ( (packages = va_arg (ap, GList **)) != NULL) { + eazel_install_prune_packages_helper (service, + packages, + &pruned, + pack); + for (iterator = pruned; iterator; iterator = g_list_next (iterator)) { + PackageData *pack = (PackageData*)iterator->data; + /* trilobite_debug ("%s pruned", pack->name); */ + (*packages) = g_list_remove (*packages, pack); + }; + } + + /* Note, don't destroy, all packages are destroyed when the + categories are destroyed + for (iterator = pruned; iterator; iterator = g_list_next (iterator)) { + PackageData *pack; + pack = (PackageData*)iterator->data; + gtk_object_unref (GTK_OBJECT (pack)); + }; + */ + + g_list_free (pruned); + + va_end (ap); +} +#if 0 +static void +eazel_install_add_to_extras_foreach (char *key, GList *list, GList **extrapackages) +{ + GList *iterator; + PackageData *dep; + for (iterator = list; iterator; iterator = g_list_next (iterator)) { + dep = (PackageData*)iterator->data; + (*extrapackages) = g_list_prepend (*extrapackages, dep); + } + g_list_free (list); +} +#endif + +/* + This function tests wheter "package" and "dep" + seems to be related in some way. + This is done by checking the package->modifies list for + elements that have same version as dep->version. + I then compare these elements against dep->name, + and if one matches the x-y-z vs dep->name=x-y scheme, + I declare that "package" and "dep" are related +*/ +gboolean +eazel_install_check_if_related_package (EazelInstall *service, + PackageData *package, + PackageData *dep) +{ + /* Pessimisn mode = HIGH */ + gboolean result = FALSE; + GList *potiental_mates; + GList *iterator; + char **dep_name_elements; + + dep_name_elements = g_strsplit (dep->name, "-", 80); + + /* First check, if package modifies a package with the same version + number as dep->version */ + potiental_mates = g_list_find_custom (package->modifies, + dep->version, + (GCompareFunc)eazel_install_package_version_compare); + for (iterator = potiental_mates; iterator; glist_step (iterator)) { + PackageData *modpack = (PackageData*)iterator->data; + + if ((modpack->modify_status == PACKAGE_MOD_UPGRADED) || + (modpack->modify_status == PACKAGE_MOD_DOWNGRADED)) { + char **mod_name_elements; + char *dep_name_iterator; + char *mod_name_iterator; + int cnt = 0; + + mod_name_elements = g_strsplit (modpack->name, "-", 80); + + for (cnt=0; TRUE;cnt++) { + dep_name_iterator = dep_name_elements[cnt]; + mod_name_iterator = mod_name_elements[cnt]; +#if 0 + trilobite_debug ("dep name iterator = \"%s\"", dep_name_iterator); + trilobite_debug ("mod name iterator = \"%s\"", mod_name_iterator); +#endif + if ((dep_name_iterator==NULL) || + (mod_name_iterator==NULL)) { + break; + } + if ((strlen (dep_name_iterator) == strlen (mod_name_iterator)) && + (strcmp (dep_name_iterator, mod_name_iterator)==0)) { + continue; + } + break; + } + if (cnt >= 1) { + trilobite_debug ("%s-%s seems to be a child package of %s-%s, which %s-%s updates", + dep->name, dep->version, + modpack->name, modpack->version, + package->name, package->version); + if (!result) { + result = TRUE; + } else { + trilobite_debug ("but what blows is, the previous also did!!"); + g_assert_not_reached (); + } + } else { + trilobite_debug ("%s-%s is not related to %s-%s", + dep->name, dep->version, + package->name, package->version); + } + g_strfreev (dep_name_elements); + g_strfreev (mod_name_elements); + } + } + return result; +} + +static gboolean +eazel_install_fetch_dependencies (EazelInstall *service, + GList **packages, + GList **extrapackages, + GList **failedpackages, + GList *requirements) +{ + g_assert_not_reached (); + return FALSE; +#if 0 + GList *iterator; + /* Contains the packages downloaded when handling the list of requirements */ + GList *extras_in_this_batch = NULL; + GHashTable *extras; + gboolean fetch_result; + + extras = g_hash_table_new (g_str_hash, g_str_equal); + fetch_result = FALSE; + + trilobite_debug ("%d requirements to be fetched/resolved", g_list_length (requirements)); + for (iterator = requirements; iterator; glist_step (iterator)) { + PackageRequirement *req = (PackageRequirement*)iterator->data; + PackageData *pack = req->package; + PackageData *dep = req->required; + + /* Check to see if the package system happened to file a requirement + for a package that was also failed... */ + if (g_list_find_custom (*failedpackages, + pack, + (GCompareFunc)eazel_install_package_compare)) { + char *tmp; + tmp = packagedata_get_readable_name (pack); + trilobite_debug ("%s already failed, will not download it's requirements", tmp); + g_free (tmp); + gtk_object_unref (GTK_OBJECT (dep)); + continue; + } + + /* We use the unknown status later, to see if + we should set it or not */ + dep->status = PACKAGE_UNKNOWN_STATUS; + + /* Emit the signal here, since then we won't have to make that + call in for every package system (when I say every, we know + I mean "both"...) */ + eazel_install_emit_dependency_check_pre_ei2 (service, pack, dep); + packagedata_add_pack_to_soft_depends (pack, dep); + + fetch_result = eazel_install_fetch_package (service, dep); + + if (fetch_result) { + if (dep->source_package) { + dep->status = PACKAGE_SOURCE_NOT_SUPPORTED; + fetch_result = FALSE; + } + } + + if (fetch_result) { + /* If the package we just downloaded was already in packages, + but we just had a dependency conflict, we're in the funky case, + were pacakge foo is not installed. But the dependecy stuff has caused + it to be downloaded in version x.y, and later in v.w. This means that + the first conflict (causing x.y to be downloaded) now happens again. + */ + if (g_list_find_custom (*packages, + dep->name, + (GCompareFunc)eazel_install_package_name_compare)) { + GList *pack_entry; + + pack_entry = g_list_find_custom (*packages, + dep, + (GCompareFunc)eazel_install_package_other_version_compare); + trilobite_debug ("Circular dependency %s-%s-%s at 0x%p", + dep->name, dep->version, dep->minor, dep); + + if (pack_entry) { + PackageData *evil_package = packagedata_copy ((PackageData*)(pack_entry->data), FALSE); + Xpackagedata_add_pack_to_breaks (dep, evil_package); + trilobite_debug ("Circular dependency caused by %s-%s-%s at 0x%p", + evil_package->name, + evil_package->version, + evil_package->minor, + evil_package); + evil_package->status = PACKAGE_CIRCULAR_DEPENDENCY; + } else { + trilobite_debug ("This is Bad: I cannot set the funky break list"); + } + dep->status = PACKAGE_CIRCULAR_DEPENDENCY; + fetch_result = FALSE; + } + } + + if (fetch_result) { + EazelInstallStatus inst_status; + /* This sets the dep->modifies and checks for a funky case. + This case is sort of like the one above. + If the call returns 0, the following must have happened ; + We had a dependency saying that foo required bar-x.y. + So we download bar and now discover that bar is already installed + in the exact same version (x.y). So that means, another + dependency solving caused us to up/downgrade bar to another + version, and the following dep check then caused a + conflict indicating that we should *not* do this up/downgrade. + + Solution: fail the downgraded package + + I assume the packages have the same name... + */ + inst_status = eazel_install_check_existing_packages (service, dep); + if (inst_status == EAZEL_INSTALL_STATUS_QUO) { + GList *pack_entry; + + trilobite_debug ("package %s required %s", pack->name, dep->name); + trilobite_debug ("This is because some other package was downloaded"); + trilobite_debug ("and crushed this, since %s is already installed", dep->name); + + /* Use name compare here, as we expect the package to have the same name */ + pack_entry = g_list_find_custom (*packages, + dep->name, + (GCompareFunc)eazel_install_package_name_compare); + if (pack_entry) { + /* FIXME bugzilla.eazel.com + I suspect that adding this to adding evil_package to pack's breaks + might yield a more pleasant tree */ + PackageData *evil_package = (PackageData*)pack_entry->data; + Xpackagedata_add_pack_to_breaks (evil_package, dep); + evil_package->status = PACKAGE_BREAKS_DEPENDENCY; + } else { + trilobite_debug ("This is also Bad: I cannot set the funky break list"); + } + dep->status = PACKAGE_CIRCULAR_DEPENDENCY; + fetch_result = FALSE; + } else if (eazel_install_get_downgrade (service)==FALSE && + inst_status == EAZEL_INSTALL_STATUS_DOWNGRADES) { + /* Bad, we're downgrading but not allowed to downgrade */ + fetch_result = FALSE; + } else if (eazel_install_get_update (service)==FALSE && + inst_status == EAZEL_INSTALL_STATUS_UPGRADES) { + /* Bad, we're upgrading but not allowed to upgrade */ + fetch_result = FALSE; + } + + } + + if (fetch_result) { + /* if it succeeds, add to a list of extras for this package + We cannot just put it into extrapackages, as a later dep + might fail, and than we have to fail the package */ + GList *extralist; + + /* Check if a previous requirement download solved this + Note, we don't check till after download, since only a download + will reveal the packagename in case we need to download + using fetch_package using the pack->provides. + This is a paranoia check in addition to a check done + in do_dependency_check, since a dep check might say + that we require two files that are provided by the same + package, and we only want to get the package once. + Eg. nautilus requires libgconf-gtk-1.so and libgconf-1.so, + both provided by gconf, so we fetch gconf twice */ + if (g_list_find_custom (extras_in_this_batch, + dep, + (GCompareFunc)eazel_install_package_compare)) { + trilobite_debug ("already handled %s", dep->name); + packagedata_remove_soft_dep (dep, pack); + dep = NULL; + continue; + } + + /* This maintains a list of extra packages for + a package. So when a requirement D for package A fails, + and we've already downloaded B & C for A, + we can easily find B & D and remove them */ + extralist = g_hash_table_lookup (extras, pack->name); + extralist = g_list_append (extralist, dep); + g_hash_table_insert (extras, pack->name, extralist); + + /* This list contains all the packages added in this call + to fetch_rpm_dependencies. It's used in the initial check, + to avoid that multiple requests for a file results in + multiple downloads */ + extras_in_this_batch = g_list_prepend (extras_in_this_batch, dep); + + pack->status = PACKAGE_PARTLY_RESOLVED; + } else { + /* + If it fails + 1) remove it from the extras hashtable for the package, + thereby ensuring the fetched packages before the fail aren't added + 2) add the package to the list of stuff to remove (deleting it + immediately from packages will cause + eazel_install_match_package_data_from_rpm_conflict + to return zero. This is fine if we then just do a continue, but + this way, we get all the missing deps into pack->soft_depends + 3) add to list of failed packages + */ + GList *extralist; + + pack->status = PACKAGE_DEPENDENCY_FAIL; + if (dep->status == PACKAGE_UNKNOWN_STATUS) { + dep->status = PACKAGE_CANNOT_OPEN; + } + + trilobite_debug ("Fetching %s failed, status %s/%s", + packagedata_get_readable_name (dep), + packagedata_status_enum_to_str (dep->status), + packagedata_modstatus_enum_to_str (dep->modify_status)); + + if (!eazel_install_get_force (service)) { + /* Remove the extra packages for this package */ + extralist = g_hash_table_lookup (extras, pack->name); + /* Remove all the extras from the soft_deps (is this what we want ?) */ + g_list_foreach (extralist, (GFunc)packagedata_remove_soft_dep, pack); + g_list_free (extralist); + g_hash_table_remove (extras, pack->name); + + /* Don't add it to failedpackages more than once */ + if (g_list_find (*failedpackages, pack) == NULL) { + (*failedpackages) = g_list_prepend (*failedpackages, pack); + } + (*packages) = g_list_remove (*packages, pack); + + /* Don't process anymore */ + break; + } + } + } + + /* iterate over all the lists in extras and add to extrapackages */ + g_hash_table_foreach (extras, (GHFunc)eazel_install_add_to_extras_foreach, extrapackages); + g_hash_table_destroy (extras); + g_list_free (extras_in_this_batch); + + if (*failedpackages) { + return FALSE; + } else { + return TRUE; + } +#endif +} + +static void +dump_one_package (PackageData *pack, char *prefix) +{ + char *softprefix, *modprefix, *breakprefix; + char *packname; + + if (pack->name == NULL) { + if (pack->provides && pack->provides->data) { + packname = g_strdup_printf ("[provider of %s]", (char *)(pack->provides->data)); + } else { + packname = g_strdup ("[mystery package]"); + } + } else { + packname = g_strdup_printf ("%s-%s-%s", pack->name, pack->version, pack->minor); + } + + trilobite_debug ("%s%s (stat %s/%s), 0x%08X", + prefix, packname, + packagedata_status_enum_to_str (pack->status), + packagedata_modstatus_enum_to_str (pack->modify_status), + (unsigned int)pack); + g_free (packname); + + softprefix = g_strdup_printf ("%s (s) ", prefix); + breakprefix = g_strdup_printf ("%s (b) ", prefix); + modprefix = g_strdup_printf ("%s (m) ", prefix); + g_list_foreach (pack->soft_depends, (GFunc)dump_one_package, softprefix); + g_list_foreach (pack->modifies, (GFunc)dump_one_package, modprefix); + g_list_foreach (pack->breaks, (GFunc)dump_one_package, breakprefix); + g_free (softprefix); + g_free (modprefix); + g_free (breakprefix); +} + +static void +dump_packages_foreach (PackageData *pack, gpointer unused) +{ + if (pack->toplevel) { + dump_one_package (pack, ""); + } +} + +void +dump_packages (GList *packages) +{ + trilobite_debug ("##### PACKAGE TREE #####"); + g_list_foreach (packages, (GFunc)dump_packages_foreach, NULL); + trilobite_debug ("----- end -----"); +} + +static void +print_package_list (char *str, GList *packages, gboolean show_deps) +{ + GList *iterator; + PackageData *pack; + char *tmp = NULL; + char *dep = " depends on "; + /* char *breaks = " breaks ";*/ + + trilobite_debug ("---------------------------"); + trilobite_debug ("%s", str); + for (iterator = packages; iterator; iterator = g_list_next (iterator)) { + pack = (PackageData*)iterator->data; + if (show_deps) { + GList *it2; + tmp = g_strdup (dep); + it2 = pack->soft_depends; + while (it2) { + char *tmp2; + tmp2 = g_strdup_printf ("%s%s ", tmp , + ((PackageData*)it2->data)->name); + g_free (tmp); + tmp = tmp2; + it2 = g_list_next (it2); + } +/* + tmp = g_strdup (breaks); + it2 = pack->breaks; + while (it2) { + char *tmp2; + PackageData *p2; + p2 = (PackageData*)it2->data; + tmp2 = g_strdup_printf ("%s%s(%db%dd) ", tmp , rpmfilename_from_packagedata (p2), + g_list_length (p2->breaks), + g_list_length (p2->soft_depends)); + g_free (tmp); + tmp = tmp2; + it2 = g_list_next (it2); + } +*/ + } + trilobite_debug ("* %s (%s) %s", + pack->name, + pack->toplevel ? "true" : "", + (tmp && strlen (tmp) > strlen (dep)) ? tmp : ""); + g_free (tmp); + tmp = NULL; + } +} + +/* + Helperfunction to create PackageRequirements for fileconflicts. Should be + used for packagesystems that don't do this (eg. RPM) */ +static void +eazel_install_do_file_conflict_check (EazelInstall *service, + GList **packages, + GList **failedpackages, + GList **requirements) +{ + g_assert_not_reached (); +#if 0 + GList *iterator; + GList *tmp_failed = NULL; + + if (eazel_install_get_ignore_file_conflicts (service) || + eazel_install_get_force (service)) { + trilobite_debug ("not performing file conflict check"); + } + + /* Now do file conflicts on all packages */ + for (iterator = *packages; iterator; glist_step (iterator)) { + PackageData *pack = (PackageData*)iterator->data; + GList *required = NULL; + + /* If we haven't tested conflicts yet */ + if (pack->conflicts_checked == FALSE) { + GList *breaks = NULL; + pack->conflicts_checked = TRUE; + if (eazel_install_check_for_file_conflicts (service, pack, &breaks, &required)) { + if (required) { + /* Create PackageRequirements for all the requirements */ + GList *reqiterator; + for (reqiterator = required;reqiterator;glist_step (reqiterator)) { + PackageData *required_pack = (PackageData*)reqiterator->data; + if (g_list_find_custom (*packages, + required_pack->name, + (GCompareFunc)eazel_install_package_name_compare)) { + trilobite_debug ("but we'e updating it (requirement)"); + /* gtk_object_unref (GTK_OBJECT (broken_package)); */ + } else { + PackageRequirement *req; + req = packagerequirement_new (pack, required_pack); + (*requirements) = g_list_prepend (*requirements, req); + } + } + } + if (breaks) { + GList *break_iterator; + gboolean fail_it = FALSE; + for (break_iterator = breaks; break_iterator; glist_step (break_iterator)) { + PackageData *broken_package = (PackageData*)break_iterator->data; + trilobite_debug ("breaking %s", broken_package->name); + if (g_list_find_custom (*packages, + broken_package->name, + (GCompareFunc)eazel_install_package_name_compare)) { + trilobite_debug ("but we're updating it"); + /* gtk_object_unref (GTK_OBJECT (broken_package)); */ + } else { + fail_it = TRUE; + Xpackagedata_add_pack_to_breaks (pack, broken_package); + } + } + if (fail_it) { + tmp_failed = g_list_prepend (tmp_failed, pack); + } + } + } else { + /* No file conflicts */ + } + } + } + + /* Now clean up */ + for (iterator = tmp_failed; iterator; glist_step (iterator)) { + PackageData *cpack = (PackageData*)(iterator->data); + (*failedpackages) = g_list_prepend (*failedpackages, cpack); + (*packages) = g_list_remove (*packages, cpack); + } +#endif +} + +/* + Use package system to do the dependency check + */ +static void +eazel_install_do_dependency_check (EazelInstall *service, + GList **packages, + GList **failedpackages, + GList **requirements) +{ + eazel_install_do_rpm_dependency_check (service, + packages, + failedpackages, + requirements); + /* RPM's depCheck doens't do fileconflicts, so we do + them ourselves */ + eazel_install_do_file_conflict_check (service, + packages, + failedpackages, + requirements); +} + +/* + Given a glist of PackageData's, ensure_deps_are_fetched checks deps + for them all, if deps fail, fetch the depency and add to packages. + Returns FALSE if outfiles was set, TRUE is all dependencies were satisfied. + If a dep could not be found, that name is added to fails) + */ +static gboolean +eazel_install_ensure_deps (EazelInstall *service, + GList **packages, + GList **failedpackages) +{ + GList *extrapackages = NULL; /* This list contains packages that were added to "packages" */ + gboolean result; + GList *requirements = NULL; /* This list contains the PackageRequirements for the dependecy failures */ + + g_return_val_if_fail (packages != NULL, TRUE); + g_return_val_if_fail (*packages != NULL, TRUE); + + g_return_val_if_fail (g_list_length (*packages)>=1, FALSE); + result = TRUE; + + trilobite_debug ("Into eazel_install_ensure_deps"); + + /* First we load headers and prepare them. + The datastructures depend on the packagesystem, + and are places in service->private->packsys. + */ + + eazel_install_do_dependency_check (service, + packages, + failedpackages, + &requirements); + + if (requirements != NULL) { + GList *iterator; + + extrapackages = NULL; + + /* For all the packages, set state to partly_resolved. */ + for (iterator=*packages; iterator; iterator = g_list_next (iterator)) { + PackageData *pack; + pack = (PackageData*)iterator->data; + pack->status = PACKAGE_PARTLY_RESOLVED; + } + + trilobite_debug ("%d dependency failure(s)", g_list_length (requirements)); + + /* Fetch the needed stuff. + "extrapackages" gets the new packages added, + packages in "failedpackages" are packages moved from + "packages" that could not be resolved. */ + eazel_install_fetch_dependencies (service, + packages, + &extrapackages, + failedpackages, + requirements); + + /* Delete the PackageRequirements. + Note, that we just need to free the structure, both elements + are kept, req->package in extrapackages or failedpackages and + req->required will be in req->package's breaks/soft_depends. + */ + g_list_foreach (requirements, (GFunc)g_free, NULL); + g_list_free (requirements); + + /* Some debug printing */ + dump_packages (*packages); + print_package_list ("Packages that were fetched", extrapackages, FALSE); + print_package_list ("Packages that failed", *failedpackages, TRUE); + } else { + GList *iterator; + + /* Deps are fine, set all packages to resolved */ + for (iterator=*packages; iterator; iterator = g_list_next (iterator)) { + PackageData *pack; + pack = (PackageData*)iterator->data; + pack->status = PACKAGE_RESOLVED; + } + trilobite_debug (_("Dependencies appear ok")); + + if (!eazel_install_do_transaction_all_files_check (service, packages)) { + trilobite_debug (_("But there are file conflicts")); + /* Now recurse into eazel_install_ensure_deps with + the new "packages" list */ + eazel_install_ensure_deps (service, packages, failedpackages); + } else { + trilobite_debug ("Dependencies still appear ok"); + } + + } + + /* If there was failedpackages, prune them from the tree + and the "extrapackages". + We need to strip from "extrapackages" as well, since : + while installing A & B, C was added for A, D was + added for B but B also needs E (but not found). Therefore + we strip D from "extrapackages" and B is stripped + from "packages". Keeping D around would + install a non-needed package + */ + if (*failedpackages) { + GList *iterator; + + for (iterator = *failedpackages; iterator; iterator = g_list_next (iterator)) { + PackageData *pack; + pack = (PackageData*)iterator->data; + trilobite_debug ("calling prune on %s", pack->name); + eazel_install_prune_packages (service, pack, packages, + &extrapackages, NULL); + } + } + /* If there were conflicts, we'll have called fetch_dependencies and might + have downloaded extra packages. So we have to recurse and process these */ + if (extrapackages) { + GList *iterator; + + /* Add to "packages" */ + for (iterator = extrapackages; iterator; iterator = g_list_next (iterator)) { + (*packages) = g_list_append (*packages, iterator->data); + } + g_list_free (extrapackages); + + /* Now recurse into eazel_install_ensure_deps with + the new "packages" list */ + eazel_install_ensure_deps (service, packages, failedpackages); + + /* Now remove the packages that failed from "packages" + and copy them into "failedpackages". */ + for (iterator = *failedpackages; iterator; iterator = g_list_next (iterator)) { + PackageData *pack; + pack = (PackageData*)iterator->data; + (*packages) = g_list_remove (*packages, pack); + } + } + dump_packages (*packages); + + return result; +} + +/* This traverses upwards in the deptree from the initial list, and adds + all packages that will break to "breaks" */ +static void +eazel_uninstall_upward_traverse (EazelInstall *service, + GList **packages, + GList **failed, + GList **breaks) +{ + GList *iterator; + /* + Create set + add all packs from packages to set + dep check + for all break, add to packages and recurse + */ + + trilobite_debug ("in eazel_uninstall_upward_traverse"); + + g_assert (packages!=NULL); + g_assert (*packages!=NULL); + g_assert (breaks!=NULL); + g_assert (*breaks==NULL); + + /* Open the package system */ + + /* Add all packages to the set */ + + for (iterator = *packages; iterator; iterator = g_list_next (iterator)) { + PackageData *pack = (PackageData*)iterator->data; + GList *matches = NULL; + GList *match_iterator; + GList *tmp_breaks = NULL; + GList *break_iterator = NULL; + + trilobite_debug ("checking reqs by %s", rpmname_from_packagedata (pack)); + matches = eazel_package_system_query (service->private->package_system, + service->private->cur_root, + pack, + EAZEL_PACKAGE_SYSTEM_QUERY_REQUIRES, + PACKAGE_FILL_NO_DIRS_IN_PROVIDES); + packagedata_list_prune (&matches, *packages, TRUE, TRUE); + + for (match_iterator = matches; match_iterator; match_iterator = g_list_next (match_iterator)) { + PackageData *requiredby = (PackageData*)match_iterator->data;; + + requiredby->status = PACKAGE_DEPENDENCY_FAIL; + pack->status = PACKAGE_BREAKS_DEPENDENCY; + trilobite_debug ("logic.c: %s requires %s", requiredby->name, pack->name); + + /* If we're already marked it as breaking, go on + if (g_list_find_custom (*breaks, (gpointer)requiredby->name, + (GCompareFunc)eazel_install_package_name_compare)) { + trilobite_debug ("skip %s", requiredby->name); + gtk_object_unref (GTK_OBJECT (requiredby)); + requiredby = NULL; + continue; + } + */ + + /* Guess not, mark it as breaking (and that pack is the offender */ + { + PackageFeatureMissing *breakage = packagefeaturemissing_new (); + packagebreaks_set_package (PACKAGEBREAKS (breakage), requiredby); + packagedata_add_to_breaks (pack, PACKAGEBREAKS (breakage)); + gtk_object_unref (GTK_OBJECT (requiredby)); + } + (*breaks) = g_list_prepend ((*breaks), requiredby); + + /* If the package has not been failed yet (and is a toplevel), + fail it */ + if (!g_list_find_custom (*failed, (gpointer)pack->name, + (GCompareFunc)eazel_install_package_name_compare) && + pack->toplevel) { + (*failed) = g_list_prepend (*failed, pack); + } + } + /* fre the list structure from _simple_query */ + g_list_free (matches); + + if (*breaks) { + eazel_uninstall_upward_traverse (service, breaks, failed, &tmp_breaks); + } + + for (break_iterator = tmp_breaks; break_iterator; break_iterator = g_list_next (break_iterator)) { + (*breaks) = g_list_prepend ((*breaks), break_iterator->data); + } + } + + for (iterator = *failed; iterator; iterator = g_list_next (iterator)) { + (*packages) = g_list_remove (*packages, iterator->data); + } + + trilobite_debug ("out eazel_uninstall_upward_traverse"); +} + +/* This traverses downwards on all requirements in "packages", + checks that their uninstall do _not_ break anything, and + adds thm to requires */ + +static void +eazel_uninstall_downward_traverse (EazelInstall *service, + GList **packages, + GList **failed, + GList **requires) +{ + GList *iterator; + GList *tmp_requires = NULL; + + /* + create set + find all requirements from "packages" + add all packs + requirements from "packages" to set + dep check + for all breaks, remove from requirements + recurse calling eazel_uninstall_downward_traverse (requirements, &tmp) + add all from tmp to requirements + */ + trilobite_debug ("in eazel_uninstall_downward_traverse"); + + /* First iterate across the packages in "packages" */ + for (iterator = *packages; iterator; iterator = g_list_next (iterator)) { + GList *matches = NULL; + PackageData *pack; + GList *match_iterator; + + pack = (PackageData*)iterator->data; + + matches = eazel_package_system_query (service->private->package_system, + service->private->cur_root, + pack->name, + EAZEL_PACKAGE_SYSTEM_QUERY_MATCHES, + PACKAGE_FILL_NO_DIRS_IN_PROVIDES); + trilobite_debug ("%s had %d hits", pack->name, g_list_length (matches)); + + /* Now iterate over all packages that match pack->name */ + for (match_iterator = matches; match_iterator; match_iterator = g_list_next (match_iterator)) { + PackageData *matched_pack; + const char **require_name; + int require_name_count; + Header hd; + int type; + int j; + + matched_pack = (PackageData*)match_iterator->data; + hd = ((Header) matched_pack->packsys_struc); + + if (!headerGetEntry(hd, RPMTAG_REQUIRENAME, &type, (void **) &require_name, + &require_name_count)) { + require_name_count = 0; + } + + trilobite_debug ("requirename count = %d", require_name_count); + + /* No iterate over all packages required by the current package */ + for (j = 0; j < require_name_count; j++) { + if ((*require_name[j] != '/') && + !strstr (require_name[j], ".so")) { + PackageData *tmp_pack = packagedata_new (); + GList *second_matches; + GList *second_match_iterator; + + tmp_pack->name = g_strdup (require_name[j]); + second_matches = + eazel_package_system_query (service->private->package_system, + service->private->cur_root, + tmp_pack, + EAZEL_PACKAGE_SYSTEM_QUERY_REQUIRES, + PACKAGE_FILL_NO_DIRS_IN_PROVIDES); + packagedata_list_prune (&second_matches, *packages, TRUE, TRUE); + packagedata_list_prune (&second_matches, *requires, TRUE, TRUE); + gtk_object_unref (GTK_OBJECT (tmp_pack)); + + /* Iterate over all packages that match the required package */ + for (second_match_iterator = second_matches; + second_match_iterator; + second_match_iterator = g_list_next (second_match_iterator)) { + PackageData *isrequired; + + isrequired = (PackageData*)second_match_iterator->data; + if (g_list_find_custom (*requires, isrequired->name, + (GCompareFunc)eazel_install_package_name_compare) || + g_list_find_custom (*packages, isrequired->name, + (GCompareFunc)eazel_install_package_name_compare)) { + trilobite_debug ("skipped %s", isrequired->name); + gtk_object_unref (GTK_OBJECT (isrequired));\ + isrequired = NULL; + continue; + } + trilobite_debug ("** %s requires %s", pack->name, isrequired->name); + + { + GList *third_matches; + + /* Search for packages + requiring the requirement, excluding + all pacakges from requires and packages */ + third_matches = + eazel_package_system_query (service->private->package_system, + service->private->cur_root, + pack->name, + EAZEL_PACKAGE_SYSTEM_QUERY_REQUIRES, + PACKAGE_FILL_NO_DIRS_IN_PROVIDES); + packagedata_list_prune (&third_matches, + *packages, TRUE, TRUE); + packagedata_list_prune (&third_matches, + *requires, TRUE, TRUE); + packagedata_list_prune (&third_matches, + tmp_requires, TRUE, TRUE); + + if (third_matches) { + trilobite_debug ("skipped %s, others depend on it", + isrequired->name); + print_package_list ("BY", third_matches, FALSE); + g_list_foreach (third_matches, + (GFunc)gtk_object_unref, NULL); + g_list_free (third_matches); + third_matches = NULL; + gtk_object_unref (GTK_OBJECT (isrequired)); + isrequired = NULL; + } else { + trilobite_debug ("Also nuking %s", isrequired->name); + tmp_requires = g_list_prepend (tmp_requires, + isrequired); + } + } + } + g_list_free (second_matches); + } else { + trilobite_debug ("must lookup %s", require_name[j]); + /* FIXME bugzilla.eazel.com 1541: + lookup package "p" that provides requires[j], + if packages that that require "p" are not in "packages" + don't add it, otherwise add to requires */ + } + } + + headerFree (hd); + } + g_list_foreach (matches, (GFunc)gtk_object_unref, NULL); + g_list_free (matches); + matches = NULL; + } + + if (tmp_requires) { + eazel_uninstall_downward_traverse (service, &tmp_requires, failed, requires); + } + + /* Now move the entries in tmp_requires into *requires */ + for (iterator = tmp_requires; iterator; iterator = g_list_next (iterator)) { + (*requires) = g_list_prepend (*requires, iterator->data); + } + g_list_free (tmp_requires); + + trilobite_debug ("out eazel_uninstall_downward_traverse"); +} + +static void +eazel_uninstall_check_for_install (EazelInstall *service, + GList **packages, + GList **failed) +{ + GList *iterator; + GList *remove = NULL; + GList *result = NULL; + + trilobite_debug ("in eazel_uninstall_check_for_install"); + g_assert (packages); + trilobite_debug ("g_list_length (*packages) = %d", g_list_length (*packages)); + for (iterator = *packages; iterator; iterator = g_list_next (iterator)) { + PackageData *pack = (PackageData*)iterator->data; + GList *matches; + + matches = eazel_package_system_query (service->private->package_system, + service->private->cur_root, + pack->name, + EAZEL_PACKAGE_SYSTEM_QUERY_MATCHES, + PACKAGE_FILL_NO_TEXT | PACKAGE_FILL_NO_DEPENDENCIES | PACKAGE_FILL_NO_DIRS_IN_PROVIDES); + /* If it's installed, continue */ + if (matches) { + GList *match_it; + gboolean any = FALSE; + for (match_it = matches; match_it; match_it = g_list_next (match_it)) { + PackageData *matched = (PackageData*)match_it->data; + if (eazel_install_package_matches_versioning (matched, + pack->version, + pack->minor, + EAZEL_SOFTCAT_SENSE_EQ)) { + matched->toplevel = TRUE; + /* mark that at least one matched */ + any = TRUE; + result = g_list_prepend (result, matched); + } else { + gtk_object_unref (GTK_OBJECT (matched)); + } + + } + if (!any) { + pack->status = PACKAGE_CANNOT_OPEN; + remove = g_list_prepend (remove, pack); + } + g_list_free (matches); + continue; + } else { + pack->status = PACKAGE_CANNOT_OPEN; + remove = g_list_prepend (remove, pack); + } + } + + for (iterator = remove; iterator; iterator=g_list_next (iterator)) { + (*packages) = g_list_remove (*packages, iterator->data); + (*failed) = g_list_prepend (*failed, iterator->data); + } + g_list_free (remove); + remove = NULL; + + trilobite_debug ("g_list_length (*packages) = %d", g_list_length (*packages)); + trilobite_debug ("g_list_length (result) = %d", g_list_length (result)); + + g_list_foreach (*packages, (GFunc)gtk_object_unref, NULL); + g_list_free (*packages); + (*packages) = result; + + trilobite_debug ("out eazel_uninstall_check_for_install"); +} + +/* Calls the upward and downward traversal */ +static void +eazel_uninstall_globber (EazelInstall *service, + GList **packages, + GList **failed) +{ + GList *iterator; + GList *tmp; + + /* + call upward with packages + call downward with packages and &tmp + add all from &tmp to packages + */ + + trilobite_debug ("in eazel_uninstall_globber"); + + tmp = NULL; + + eazel_uninstall_check_for_install (service, packages, failed); + for (iterator = *failed; iterator; iterator = g_list_next (iterator)) { + trilobite_debug ("not installed %s", ((PackageData*)iterator->data)->name); + eazel_install_emit_uninstall_failed (service, (PackageData*)iterator->data); + } + + /* If there are still packages and we're not forcing, + do upwards traversel */ + if (*packages && !eazel_install_get_force (service)) { + eazel_uninstall_upward_traverse (service, packages, failed, &tmp); + print_package_list ("FAILED", *failed, TRUE); + for (iterator = *failed; iterator; iterator = g_list_next (iterator)) { + PackageData *pack = (PackageData*)iterator->data; + trilobite_debug ("failed %s", pack->name); + dump_one_package (pack, ""); + eazel_install_emit_uninstall_failed (service, pack); + } + g_list_free (tmp); + } + +/* + I've disabled downwards traverse untill it's done. + + tmp = NULL; + eazel_uninstall_downward_traverse (service, packages, failed, &tmp); + for (iterator = tmp; iterator; iterator = g_list_next (iterator)) { + g_message ("also doing %s", ((PackageData*)iterator->data)->name); + (*packages) = g_list_prepend (*packages, iterator->data); + } + g_list_free (tmp); +*/ + + trilobite_debug ("out eazel_uninstall_glob"); +} diff --git a/components/services/install/lib/eazel-install-logic.h b/components/services/install/lib/eazel-install-logic.h new file mode 100644 index 000000000..597f24fdf --- /dev/null +++ b/components/services/install/lib/eazel-install-logic.h @@ -0,0 +1,51 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper <pepper@eazel.com> + */ + +/* eazel-install - services command line install/update/uninstall + * component. This program will parse the eazel-services-config.xml + * file and install a services generated package-list.xml. + */ + +#ifndef EAZEL_INSTALL_LOGIC_H +#define EAZEL_INSTALL_LOGIC_H + +#include "eazel-package-system-types.h" +#include "eazel-install-protocols.h" +#include "eazel-install-public.h" +#include <eazel-package-system.h> + +EazelInstallOperationStatus ei_install_packages (EazelInstall *service, GList *categories); +EazelInstallOperationStatus ei_uninstall_packages (EazelInstall *service, GList *categories); +EazelInstallOperationStatus ei_revert_transaction (EazelInstall *service, GList *packages); + +gboolean eazel_install_prepare_package_system (EazelInstall *service); +gboolean eazel_install_free_package_system (EazelInstall *service); + +unsigned long eazel_install_get_total_size_of_packages (EazelInstall *service, + const GList *packages); +void eazel_install_do_transaction_add_to_transaction (EazelInstall *service, + PackageData *pack); +gboolean eazel_install_check_if_related_package (EazelInstall *service, + PackageData *package, + PackageData *dep); + +#endif /* EAZEL_INSTALL_LOGIC_H */ diff --git a/components/services/install/lib/eazel-install-rpm-glue.c b/components/services/install/lib/eazel-install-rpm-glue.c new file mode 100644 index 000000000..8816308a3 --- /dev/null +++ b/components/services/install/lib/eazel-install-rpm-glue.c @@ -0,0 +1,470 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * Copyright (C) 1998-1999 James Henstridge + * Copyright (C) 1998 Red Hat Software, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper <pepper@eazel.com> + * Eskil Heyn Olsen <eskil@eazel.com> + */ + +#include "eazel-install-rpm-glue.h" +#include "eazel-install-public.h" +#include "eazel-install-private.h" +#include "eazel-install-logic.h" + +#include <libtrilobite/trilobite-core-utils.h> +#include <libtrilobite/trilobite-md5-tools.h> + +#include <rpm/rpmlib.h> +#include <string.h> +#include <time.h> + +#include <ctype.h> + +#include <errno.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <fcntl.h> +#include <unistd.h> +#ifdef EAZEL_INSTALL_SLIM +#include <sys/wait.h> +#endif + +#include "eazel-package-system.h" + +/* WAAAAAAHH! */ +#include "eazel-package-system-rpm3.h" +#include "eazel-package-system-rpm3-private.h" + +PackageData* packagedata_new_from_rpm_conflict (struct rpmDependencyConflict); +PackageData* packagedata_new_from_rpm_conflict_reversed (struct rpmDependencyConflict); + +PackageData* +packagedata_new_from_rpm_conflict (struct rpmDependencyConflict conflict) +{ + PackageData *result; + + result = packagedata_new (); + + result->name = g_strdup (conflict.needsName); + result->version = (conflict.needsVersion && (strlen (conflict.needsVersion) > 1)) ? g_strdup (conflict.needsVersion) : NULL; + return result; +} + +PackageData* +packagedata_new_from_rpm_conflict_reversed (struct rpmDependencyConflict conflict) +{ + PackageData *result; + + result = packagedata_new (); + + result->name = g_strdup (conflict.byName); + result->version = (conflict.byVersion && (strlen (conflict.byVersion) > 1)) ? g_strdup (conflict.byVersion) : NULL; + return result; +} + +#if 0 +/* + Adds the headers to the package system set + */ +static void +eazel_install_add_to_rpm_set (EazelInstall *service, + rpmTransactionSet set, + GList **packages, + GList **failed) + +{ + GList *iterator; + GList *tmp_failed; + int interface_flags; + + g_assert (packages!=NULL); + g_assert (*packages!=NULL); + + tmp_failed = NULL; + + interface_flags = 0; + if (eazel_install_get_update (service)) { + interface_flags |= INSTALL_UPGRADE; + } + + for (iterator = *packages; iterator; iterator = g_list_next (iterator)) { + PackageData *pack; + int err; + + pack = (PackageData*)iterator->data; + if (!eazel_install_get_uninstall (service)) { + g_assert (pack->packsys_struc); + err = rpmtransAddPackage (set, + ((Header) pack->packsys_struc), + NULL, + NULL, + interface_flags, + NULL); + if (err!=0) { + trilobite_debug ("rpmtransAddPackage (..., %s, ...) = %d", pack->name, err); + if (pack->source_package) { + pack->status = PACKAGE_SOURCE_NOT_SUPPORTED; + } else { + pack->status = PACKAGE_INVALID; + } + /* We cannot remove the thing immediately from packages, as + we're iterating it, so add to a tmp list and nuke later */ + tmp_failed = g_list_prepend (tmp_failed, pack); + } + /* just flailing around here (robey) + if (pack->soft_depends) { + eazel_install_add_to_rpm_set (service, set, &pack->soft_depends, failed); + } + */ + } else { + g_assert_not_reached (); + } + } + /* Remove all failed from packages, and add them to failed */ + if (tmp_failed) { + for (iterator = tmp_failed; iterator; iterator = g_list_next (iterator)) { + if (failed) { + (*failed) = g_list_prepend (*failed, iterator->data); + } + (*packages) = g_list_remove (*packages, iterator->data); + } + g_list_free (tmp_failed); + } +} + +/* Given a filename, it find the + package that has a package in modifies that + provides the given file. */ + +static int +eazel_install_package_modifies_provides_compare (PackageData *pack, + char *name) +{ + GList *ptr = NULL; + ptr = g_list_find_custom (pack->modifies, + (gpointer)name, + (GCompareFunc)eazel_install_package_provides_compare); + if (ptr) { + trilobite_debug ("package %s-%s-%s caused harm to %s", + pack->name, pack->version, pack->minor, + name); + return 0; + } +/* + for (ptr = pack->provides; ptr; ptr = g_list_next (ptr)) { + g_message ("%s strcmp %s = %d", name, (char*)ptr->data, g_strcasecmp (name, (char*)ptr->data)); + } + g_message ("package %s blows %d chunks", pack->name, g_list_length (pack->provides)); +*/ + return -1; +} + +static void +eazel_install_rpm_create_requirement (EazelInstall *service, + PackageData *pack, + PackageData *dep, + GList **requirements) +{ + g_assert (pack && dep); + + /* Check if a previous conflict solve has fixed this conflict. */ + if (g_list_find_custom (*requirements, + dep, + (GCompareFunc)eazel_install_requirement_dep_compare)) { + trilobite_debug ("Already created requirement for %s", dep->name); + packagedata_destroy (dep, FALSE); + dep = NULL; + } else { + PackageRequirement *req; + req = packagerequirement_new (pack, dep); + (*requirements) = g_list_prepend (*requirements, req); + /* debug output code */ + if (dep->name) { + trilobite_debug ("%s requires package %s", pack->name, dep->name); + } else { + trilobite_debug ("%s requires file %s", + pack->name, + (char*)dep->provides->data); + } + } +} +#endif + +/* This is the function to do the RPM system dependency check */ +void +eazel_install_do_rpm_dependency_check (EazelInstall *service, + GList **packages, + GList **failedpackages, + GList **requirements) +{ + g_assert_not_reached (); +#if 0 + int iterator; + rpmTransactionSet set; + int num_conflicts; + struct rpmDependencyConflict *conflicts; + struct rpmDependencyConflict conflict; + rpmdb db; + + trilobite_debug ("eazel_install_do_rpm_dependency_check"); + + g_assert (EAZEL_PACKAGE_SYSTEM_RPM3 (service->private->package_system)->private->dbs); + + eazel_package_system_rpm3_open_dbs (EAZEL_PACKAGE_SYSTEM_RPM3 (service->private->package_system)); + db = (rpmdb)g_hash_table_lookup (EAZEL_PACKAGE_SYSTEM_RPM3 (service->private->package_system)->private->dbs, + service->private->cur_root); + if (!db) { + return; + } + + set = rpmtransCreateSet (db, service->private->cur_root); + eazel_install_add_to_rpm_set (service, set, packages, failedpackages); + + /* Reorder the packages as per. deps and do the dep check */ + rpmdepOrder (set); + rpmdepCheck (set, &conflicts, &num_conflicts); + eazel_package_system_rpm3_close_dbs (EAZEL_PACKAGE_SYSTEM_RPM3 (service->private->package_system)); + + /* FIXME bugzilla.eazel.com 1512 (BUG OBSOLETED, DON'T REOPEN <eskil, 20010129>) + This piece of code is rpm specific. It has some generic algorithm + for doing the dep stuff, but it's rpm entangled */ + + for (iterator = 0; iterator < num_conflicts; iterator++) { + GList *pack_entry = NULL; + PackageData *pack = NULL; + PackageData *dep = NULL; + + conflict = conflicts[iterator]; + + /* Locate the package that caused the conflict */ + pack_entry = g_list_find_custom (*packages, + (char*)conflict.byName, + (GCompareFunc)eazel_install_package_name_compare); + + /* first time through, only do immediate matches */ + if (pack_entry == NULL) { + continue; + } + + pack = (PackageData*)pack_entry->data; + /* Does the conflict look like a file dependency ? */ + if (*conflict.needsName=='/' || strstr (conflict.needsName, ".so")) { + g_message (_("Processing dep for %s, requires library %s"), + pack->name, conflict.needsName); + dep = packagedata_new (); + dep->provides = g_list_append (dep->provides, g_strdup (conflict.needsName)); + } else { + dep = packagedata_new_from_rpm_conflict (conflict); + dep->archtype = g_strdup (pack->archtype); + g_message (_("Processing dep for %s, requires package %s"), + pack->name, + dep->name); + } + + eazel_install_rpm_create_requirement (service, pack, dep, requirements); + } + + /* now iterate the HARD cases, life sucks! */ + for (iterator = 0; iterator < num_conflicts; iterator++) { + GList *pack_entry = NULL; + PackageData *pack = NULL; + PackageData *dep = NULL; + + conflict = conflicts[iterator]; + + /* Locate the package that caused the conflict */ + pack_entry = g_list_find_custom (*packages, + (char*)conflict.byName, + (GCompareFunc)eazel_install_package_name_compare); + if (pack_entry == NULL) { + /* try our brand-new list of required packages, too */ + pack_entry = g_list_find_custom (*requirements, + (char*)conflict.byName, + (GCompareFunc)eazel_install_requirement_dep_name_compare); + if (pack_entry != NULL) { + trilobite_debug (_("package %s is already in requirements, whew!"), conflict.byName); + } + } + if (pack_entry != NULL) { + continue; + } + + /* If we did not find it, we're in a special case conflict */ + switch (conflict.sense) { + case RPMDEP_SENSE_REQUIRES: { + /* Possibly the implest case, we're installing package A, which requires + B that is not installed. */ + g_message (_("%s requires %s"), + conflict.byName, + conflict.needsName); + pack_entry = g_list_find_custom (*packages, + (gpointer)conflict.needsName, + (GCompareFunc)eazel_install_package_name_compare); + if (pack_entry==NULL) { + /* If pack_entry is null, we're in the worse case, where + install A causes file f to disappear, and package conflict.byName + needs f (conflict.needsName). So conflict does not identify which + package caused the conflict */ + trilobite_debug ("pack_entry==NULL, level 2"); + /* + I need to find the package P in "packages" that provides + conflict.needsName, then fail P marking it's status as + PACKAGE_BREAKS_DEPENDENCY, then create PackageData C for + conflict.byName, add to P's depends and mark C's status as + PACKAGE_DEPENDENCY_FAIL. + Then then client can rerun the operation with all the C's as + part of the update + */ + pack_entry = g_list_find_custom (*packages, + (gpointer)conflict.needsName, + (GCompareFunc)eazel_install_package_modifies_provides_compare); + if (pack_entry == NULL) { + trilobite_debug ("pack_entry==NULL, level 3"); + /* Kühl, we probably already moved it to + failed packages */ + pack_entry = g_list_find_custom (*failedpackages, + (gpointer)conflict.needsName, + (GCompareFunc)eazel_install_package_modifies_provides_compare); + if (pack_entry == NULL) { + trilobite_debug ("pack_entry==NULL, level 4"); + /* Still kühl, we're looking for a name... */ + pack_entry = g_list_find_custom (*failedpackages, + (gpointer)conflict.needsName, + (GCompareFunc)eazel_install_package_name_compare); + if (pack_entry == NULL) { + /* Massive debug output before I die.... */ + int a; + GList *ptr; + trilobite_debug ("This was certainly unexpected v5!"); + trilobite_debug ("*********************************"); + trilobite_debug ("Cannot lookup %s for %s", + conflict.needsName, + conflict.byName); + trilobite_debug ("Cannot lookup %s in *packages", + conflict.needsName); + trilobite_debug ("Cannot lookup %s in *failedpackages", + conflict.needsName); + + trilobite_debug ("packages = 0x%p", packages); + trilobite_debug ("*packages = 0x%p", *packages); + trilobite_debug ("failedpackages = 0x%p", failedpackages); + trilobite_debug ("*failedpackages = 0x%p", *failedpackages); + + trilobite_debug ("g_list_length (*packages) = %d", g_list_length (*packages)); + trilobite_debug ("g_list_length (*failedpackages) = %d", g_list_length (*failedpackages)); + a = 0; + for (ptr = *packages; ptr; glist_step (ptr)) { + PackageData *p = (PackageData*)ptr->data; + a++; + trilobite_debug ("(*packages)[%d] = %s-%s-%s", + a, + p->name, + p->version, + p->minor); + } + a = 0; + for (ptr = *failedpackages; ptr; glist_step (ptr)) { + PackageData *p = (PackageData*)ptr->data; + a++; + trilobite_debug ("(*failedpackages)[%d] = %s-%s-%s", + a, + p->name, + p->version, + p->minor); + } + + + g_assert_not_reached (); + } + } + /* If we reach this point, the package + was found in *failedpackages. Otherwise, + we would have hit the g_assert */ + trilobite_debug ("We don't want to redo failing it"); + pack_entry = NULL; + } + } + + if (pack_entry) { + trilobite_debug ("pack_entry found"); + /* Create a packagedata for the dependecy */ + dep = packagedata_new_from_rpm_conflict_reversed (conflict); + pack = (PackageData*)(pack_entry->data); + dep->archtype = g_strdup (pack->archtype); + pack->status = PACKAGE_BREAKS_DEPENDENCY; + dep->status = PACKAGE_DEPENDENCY_FAIL; + g_assert (dep!=NULL); + } else { + trilobite_debug ("pack_enty is NULL, continueing"); + continue; + } + + /* Here I check to see if I'm breaking the -devel package, if so, + request it. It does a pretty generic check to see + if dep is on the form x-z and pack is x[-y] */ + + if (eazel_install_check_if_related_package (service, pack, dep)) { + trilobite_debug ("check_if_related_package returned TRUE"); + g_free (dep->version); + dep->version = g_strdup (pack->version); + } else { + trilobite_debug ("check_if_related_package returned FALSE"); + /* not the devel package, are we in force mode ? */ + if (!eazel_install_get_force (service)) { + /* if not, remove the package */ + packagedata_add_pack_to_breaks (pack, dep); + if (g_list_find (*failedpackages, pack) == NULL) { + (*failedpackages) = g_list_prepend (*failedpackages, pack); + } + (*packages) = g_list_remove (*packages, pack); + } + continue; + } + } + break; + case RPMDEP_SENSE_CONFLICTS: + /* This should be set if there's a file conflict, + but I don't think rpm ever does that... + Because the code below is broken, I've inserted + a g_assert_not_reached (eskil, Sept 2000) + */ + g_assert_not_reached (); + /* If we end here, it's a conflict is going to break something */ + g_warning (_("Package %s conflicts with %s-%s"), + conflict.byName, conflict.needsName, + conflict.needsVersion); + if (g_list_find (*failedpackages, pack) == NULL) { + (*failedpackages) = g_list_prepend (*failedpackages, pack); + } + (*packages) = g_list_remove (*packages, pack); + continue; + break; + } + + eazel_install_rpm_create_requirement (service, pack, dep, requirements); + } + + rpmdepFreeConflicts (conflicts, num_conflicts); + rpmtransFree (set); + trilobite_debug ("eazel_install_do_rpm_dependency_check ended with %d fails and %d requirements", + g_list_length (*failedpackages), + g_list_length (*requirements)); +#endif +} diff --git a/components/services/install/lib/eazel-install-rpm-glue.h b/components/services/install/lib/eazel-install-rpm-glue.h new file mode 100644 index 000000000..5057fb5a1 --- /dev/null +++ b/components/services/install/lib/eazel-install-rpm-glue.h @@ -0,0 +1,50 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper <pepper@eazel.com> + * Eskil Heyn Olsen <eskil@eazel.com> + */ + +/* eazel-install - services command line install/update/uninstall + * component. This program will parse the eazel-services-config.xml + * file and install a services generated package-list.xml. + */ + +#ifndef EAZEL_INSTALL_RPM_GLUE_H +#define EAZEL_INSTALL_RPM_GLUE_H + +#include "eazel-package-system-types.h" +#include "eazel-install-public.h" + +void eazel_install_rpm_set_settings (EazelInstall *service); +void eazel_install_start_transaction_make_rpm_argument_list (EazelInstall *service, + GList **args); +gboolean eazel_install_monitor_rpm_process_pipe (GIOChannel *source, + GIOCondition condition, + EazelInstall *service); +gboolean eazel_install_free_rpm_system (EazelInstall *service); +gboolean eazel_install_prepare_rpm_system(EazelInstall *service); +void eazel_install_do_rpm_dependency_check (EazelInstall *service, + GList **packages, + GList **failedpackages, + GList **requirements); + + + +#endif /* EAZEL_INSTALL_RPM_GLUE_H */ diff --git a/components/services/install/nautilus-view/.cvsignore b/components/services/install/nautilus-view/.cvsignore new file mode 100644 index 000000000..14c2af5d6 --- /dev/null +++ b/components/services/install/nautilus-view/.cvsignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +.deps +.libs +nautilus-service-install-view +Nautilus_View_install.oaf diff --git a/components/services/install/nautilus-view/Makefile.am b/components/services/install/nautilus-view/Makefile.am new file mode 100644 index 000000000..e5613d976 --- /dev/null +++ b/components/services/install/nautilus-view/Makefile.am @@ -0,0 +1,64 @@ +NULL = + +INCLUDES = \ + -DPREFIX=\"$(prefix)\" \ + -DG_LOG_DOMAIN=\"Nautilus-service-install\" \ + -I$(top_srcdir) \ + -I$(top_srcdir)/components/services/install/lib \ + -I$(top_srcdir)/components/services/trilobite \ + -I$(top_srcdir)/components/services/trilobite/libtrilobite \ + -I$(top_builddir)/components/services/install/lib \ + -I$(top_builddir)/components/services/trilobite \ + -I$(top_builddir)/components/services/trilobite/libtrilobite \ + -I$(top_srcdir)/components/services/nautilus-dependent-shared \ + -I$(top_builddir)/components/services/install/lib \ + -I$(top_builddir) \ + $(GCONF_CFLAGS) \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + $(GNOMEUI_CFLAGS) \ + $(VFS_CFLAGS) \ + $(NULL) + +bin_PROGRAMS = nautilus-service-install-view + +noinst_HEADERS = \ + nautilus-service-install.c \ + nautilus-service-install.h \ + nautilus-service-install-view.h \ + callbacks.h \ + forms.h \ + $(NULL) + +nautilus_service_install_view_SOURCES = \ + nautilus-service-install-view.c \ + main.c \ + callbacks.c \ + forms.c \ + $(NULL) + +nautilus_service_install_view_LDADD = \ + $(top_builddir)/libnautilus/libnautilus.la \ + $(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \ + $(top_builddir)/components/services/install/lib/libeazelinstall.la \ + $(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \ + $(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \ + $(top_builddir)/components/services/nautilus-dependent-shared/libnautilusdepshared.a \ + $(BONOBO_LIBS) \ + $(GCONF_LIBS) \ + $(GNOMEUI_LIBS) \ + $(OAF_LIBS) \ + $(AMMONITE_LIBS) \ + $(VFS_LIBS) \ + $(RPM_LIBS) \ + $(NULL) + +oafdir = $(datadir)/oaf +oaf_in_files = \ + Nautilus_View_install.oaf.in \ + $(NULL) +oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) + +@XML_I18N_MERGE_OAF_RULE@ + + +EXTRA_DIST = $(oaf_in_files) $(oaf_DATA) diff --git a/components/services/install/nautilus-view/Nautilus_View_install.oaf.in b/components/services/install/nautilus-view/Nautilus_View_install.oaf.in new file mode 100644 index 000000000..ec7760f45 --- /dev/null +++ b/components/services/install/nautilus-view/Nautilus_View_install.oaf.in @@ -0,0 +1,25 @@ +<oaf_info> + +<oaf_server iid="OAFIID:nautilus_service_install_view_factory:e59e53d1-e3d1-46fe-ae28-3ec5c56b7d32" type="exe" location="nautilus-service-install-view"> + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:GNOME/ObjectFactory:1.0"/> + </oaf_attribute> + <oaf_attribute name="name" type="string" _value="Nautilus Service Install View Factory"/> + <oaf_attribute name="description" type="string" _value="Service Install View Component's Factory"/> +</oaf_server> + +<oaf_server iid="OAFIID:nautilus_service_install_view:886546ca-1115-4ea4-8d30-8cefa2f5070b" type="factory" location="OAFIID:nautilus_service_install_view_factory:e59e53d1-e3d1-46fe-ae28-3ec5c56b7d32"> + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:Bonobo/Unknown:1.0"/> + <item value="IDL:Bonobo/Control:1.0"/> + <item value="IDL:Nautilus/View:1.0"/> + </oaf_attribute> + <oaf_attribute name="name" type="string" _value="Nautilus Service Install View"/> + <oaf_attribute name="description" type="string" _value="Service Install View Component"/> + <oaf_attribute name="bonobo:supported_uri_schemes" type="stringv"> + <item value="eazel-install"/> + </oaf_attribute> + <oaf_attribute name="nautilus:view_as_name" type="string" _value="Install"/> +</oaf_server> + +</oaf_info> diff --git a/components/services/install/nautilus-view/callbacks.c b/components/services/install/nautilus-view/callbacks.c new file mode 100644 index 000000000..e1ef63d12 --- /dev/null +++ b/components/services/install/nautilus-view/callbacks.c @@ -0,0 +1,662 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000, 2001 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper <pepper@eazel.com> + * Robey Pointer <robey@eazel.com> + */ + +#include <config.h> + +#include "nautilus-service-install-view.h" +#include "forms.h" +#include "callbacks.h" +#include "eazel-install-metadata.h" /* eazel_install_configure_check_jump_after_install */ +#include "libtrilobite/libammonite-gtk.h" +#include <stdio.h> +#include <errno.h> +#include <libeazelinstall.h> +#include <libnautilus-extensions/nautilus-label.h> +#include <libnautilus-extensions/nautilus-global-preferences.h> + + +/* do what gnome ought to do automatically */ +static void +reply_callback (int reply, gboolean *answer) +{ + *answer = (reply == 0); +} + +/* keep this info for secret later use */ +void +nautilus_service_install_dependency_check (EazelInstallCallback *cb, const PackageData *package, + const PackageData *needs, NautilusServiceInstallView *view) +{ + char *key, *value; + + /* add to deps hash for later */ + if (g_hash_table_lookup_extended (view->details->deps, needs->name, (void **)&key, (void **)&value)) { + g_hash_table_remove (view->details->deps, key); + g_free (key); + g_free (value); + } + g_hash_table_insert (view->details->deps, g_strdup (needs->name), g_strdup (package->name)); + + /* this stuff flies by so fast, it's probably enough to just say "info" */ + value = g_strdup (_("Getting package information ...")); + show_overall_feedback (view, value); + g_free (value); +} + +/* keep the user up-to-date on the install service's long-ass contemplations */ +void +nautilus_service_install_conflict_check (EazelInstallCallback *cb, const PackageData *pack, + NautilusServiceInstallView *view) +{ + char *out; + + if (view->details->installer == NULL) { + g_warning ("Got conflict check after unref!"); + return; + } + + g_assert (pack->name != NULL); + out = g_strdup_printf (_("Checking \"%s\" for conflicts..."), pack->name); + show_overall_feedback (view, out); + g_free (out); +} + +gboolean +nautilus_service_install_preflight_check (EazelInstallCallback *cb, + EazelInstallCallbackOperation op, + const GList *packages, + int total_bytes, + int total_packages, + NautilusServiceInstallView *view) +{ + gboolean answer; + PackageData *package; + GList *package_list; + GList *iter; + char *out; + char *extra; + unsigned long total_k; + + if (view->details->cancelled) { + /* user has already hit the cancel button */ + view->details->cancelled_before_downloads = TRUE; + return FALSE; + } + + /* assemble initial list of packages to browse */ + package_list = flatten_packagedata_dependency_tree ((GList *)packages); + package_list = g_list_reverse (package_list); + + view->details->download_bytes_total = view->details->download_bytes_sofar = 0; + for (iter = g_list_first (package_list); iter != NULL; iter = g_list_next (iter)) { + package = PACKAGEDATA (iter->data); + view->details->download_bytes_total += (package->filesize > 0 ? package->filesize : package->bytesize); + + if (package->toplevel) { + nautilus_service_install_check_for_desktop_files (view, + cb, + package); + } + } + + /* draw the query box, and spin in gtk_main waiting for an answer */ + make_query_box (view, op, package_list); + gtk_widget_hide (view->details->overall_feedback_text); + + nautilus_view_report_load_complete (view->details->nautilus_view); + gtk_widget_ref (GTK_WIDGET (view)); + while (view->details->preflight_status == PREFLIGHT_UNKNOWN) { + while (gtk_events_pending ()) { + gtk_main_iteration (); + } + } + if (view->details->preflight_status == PREFLIGHT_PANIC_BUTTON) { + /* user destroyed the view! + * hold on to our ref (it's probably the last one) and bail out as quickly as possible. + */ + g_list_free (package_list); + return FALSE; + } + gtk_widget_unref (GTK_WIDGET (view)); + + gtk_widget_hide (view->details->query_box); + nautilus_view_report_load_underway (view->details->nautilus_view); + answer = (view->details->preflight_status == PREFLIGHT_OK) ? TRUE : FALSE; + + if (!answer) { + g_list_free (package_list); + view->details->cancelled = TRUE; + view->details->cancelled_before_downloads = TRUE; + /* EVIL EVIL hack that causes the next dialog to show up instead of being hidden */ + sleep (1); + while (gtk_events_pending ()) + gtk_main_iteration (); + return answer; + } + + total_k = (view->details->download_bytes_total+512)/1024; + /* arbitrary dividing line */ + if (total_k > 4096) { + extra = g_strdup_printf ("%ld MB", (total_k+512)/1024); + } else { + extra = g_strdup_printf ("%ld KB", total_k); + } + + if (g_list_length (package_list) == 1) { + out = g_strdup_printf (_("Downloading 1 package (%s)"), extra); + } else { + out = g_strdup_printf (_("Downloading %d packages (%s)"), g_list_length (package_list), extra); + } + show_overall_feedback (view, out); + g_free (out); + g_free (extra); + + g_list_free (package_list); + view->details->current_package = 0; + return answer; +} + +void +nautilus_service_install_download_progress (EazelInstallCallback *cb, const PackageData *pack, int amount, int total, + NautilusServiceInstallView *view) +{ + char *out; + const char *needed_by; + InstallMessage *im = view->details->current_im; + float fake_amount; + + if (amount > total) { + /* work around temporary EI bug where amount is sometimes total+1k */ + return; + } + + if (view->details->installer == NULL) { + g_warning ("Got download notice after unref!"); + return; + } + + /* install lib better damn well know the name of the package by the time we download it! */ + g_assert (pack->name != NULL); + view->details->downloaded_anything = TRUE; + + if (amount == 0) { + /* could be a redundant zero-trigger for the same rpm... */ + if (view->details->current_rpm && (strcmp (view->details->current_rpm, pack->name) == 0)) { + return; + } + + if (view->details->cylon_timer) { + gtk_timeout_remove (view->details->cylon_timer); + view->details->cylon_timer = 0; + } + + g_free (view->details->current_rpm); + view->details->current_rpm = g_strdup (pack->name); + + if (pack->toplevel) { + update_package_info_display (view, pack, _("Downloading \"%s\"")); + } + + /* new progress message and bar */ + im = view->details->current_im = install_message_new (view, pack->name); + gtk_progress_set_percentage (GTK_PROGRESS (im->progress_bar), 0.0); + out = g_strdup_printf (_("0K of %dK"), total/1024); + nautilus_label_set_text (NAUTILUS_LABEL (im->progress_label), out); + g_free (out); + view->details->last_k = 0; + + needed_by = g_hash_table_lookup (view->details->deps, pack->name); + if (needed_by != NULL) { + out = g_strdup_printf (_("The package \"%s\" requires \"%s\" to run.\nDownloading \"%s\" now."), + needed_by, pack->name, pack->name); + } else { + out = g_strdup_printf (_("Attempting to download package \"%s\"."), pack->name); + } + nautilus_label_set_text (NAUTILUS_LABEL (im->label), out); + g_free (out); + } else if (amount == total) { + /* done! */ + if (view->details->current_rpm == NULL) { + /* redundant 100% signal */ + return; + } + current_progress_bar_complete (view, _("Complete")); + gtk_progress_set_percentage (GTK_PROGRESS (im->progress_bar), 1.0); + needed_by = g_hash_table_lookup (view->details->deps, pack->name); + if (needed_by != NULL) { + out = g_strdup_printf (_("The package \"%s\" requires \"%s\" to run.\n\"%s\" has been successfully downloaded."), + needed_by, pack->name, pack->name); + } else { + out = g_strdup_printf (_("The package \"%s\" has been successfully downloaded."), pack->name); + } + nautilus_label_set_text (NAUTILUS_LABEL (im->label), out); + g_free (out); + g_free (view->details->current_rpm); + view->details->current_rpm = NULL; + view->details->current_im = NULL; + /* update downloaded bytes */ + view->details->download_bytes_sofar += (pack->filesize > 0 ? pack->filesize : pack->bytesize); + gtk_progress_set_percentage (GTK_PROGRESS (view->details->total_progress_bar), + (float) view->details->download_bytes_sofar / + (float) view->details->download_bytes_total); + } else { + /* could be a leftover event, after user hit STOP (in which case, current_im = NULL) */ + if ((im != NULL) && (im->progress_bar != NULL)) { + gtk_progress_set_percentage (GTK_PROGRESS (im->progress_bar), + (float) amount / (float) total); + if ((amount/1024) >= view->details->last_k + 10) { + out = g_strdup_printf (_("%dK of %dK"), amount/1024, total/1024); + nautilus_label_set_text (NAUTILUS_LABEL (im->progress_label), out); + g_free (out); + view->details->last_k = (amount/1024); + } + } + + /* so, for PR3, we are given a "size" field in the softcat XML which is actually + * the size of the decompressed files. so this little hocus-pocus scales the + * actual size (which we know once we start downloading the file) to match the + * previously-assumed size + */ + fake_amount = (float)amount * (float)(pack->filesize > 0 ? pack->filesize : pack->bytesize) / (float)total; + gtk_progress_set_percentage (GTK_PROGRESS (view->details->total_progress_bar), + ((float) view->details->download_bytes_sofar + fake_amount) / + (float) view->details->download_bytes_total); + } +} + +void +nautilus_service_install_download_failed (EazelInstallCallback *cb, const PackageData *pack, + NautilusServiceInstallView *view) +{ + char *out, *tmp; + + /* no longer "loading" anything */ + nautilus_view_report_load_complete (view->details->nautilus_view); + + tmp = packagedata_get_readable_name (pack); + out = g_strdup_printf (_("Download of package \"%s\" failed!"), tmp); + g_free (tmp); + if (view->details->current_im != NULL) { + nautilus_label_set_text (NAUTILUS_LABEL (view->details->current_im->label), out); + } + g_free (out); +} + +static void +previous_install_finished (NautilusServiceInstallView *view) +{ + InstallMessage *im; + char *needed_by; + char *out; + + im = view->details->current_im; + if (im != NULL) { + current_progress_bar_complete (view, _("Complete")); + gtk_progress_set_percentage (GTK_PROGRESS (im->progress_bar), 1.0); + + needed_by = g_hash_table_lookup (view->details->deps, view->details->current_rpm); + if (needed_by != NULL) { + out = g_strdup_printf (_("The package \"%s\" requires \"%s\" to run.\n\"%s\" has been successfully downloaded and installed."), + needed_by, view->details->current_rpm, view->details->current_rpm); + } else { + out = g_strdup_printf (_("\"%s\" has been successfully downloaded and installed."), view->details->current_rpm); + } + nautilus_label_set_text (NAUTILUS_LABEL (im->label), out); + g_free (out); + } + g_free (view->details->current_rpm); + view->details->current_rpm = NULL; + view->details->current_im = NULL; +} + +void +nautilus_service_install_progress (EazelInstallCallback *cb, const PackageData *pack, + int current_package, int total_packages, + int package_progress, int package_total, + int total_progress, int total_total, + NautilusServiceInstallView *view) +{ + InstallMessage *im; + gfloat overall_complete, complete; + char *out; + char *needed_by; + + im = view->details->current_im; + if (current_package != view->details->current_package) { + /* no longer "loading" anything */ + nautilus_view_report_load_complete (view->details->nautilus_view); + + /* starting a new package -- create new progress indicator */ + out = g_strdup_printf (_("Installing package %d of %d"), current_package, total_packages); + show_overall_feedback (view, out); + g_free (out); + + /* new behavior: sometimes the previous package wasn't quite closed out -- do it now */ + if (im != NULL) { + previous_install_finished (view); + } + + /* if you're looking for the place where we notice that one of nautilus's core + * packages is being upgraded, this is it. this is an evil, evil way to do it, + * but nobody's come up with anything better yet. + */ + if (pack->name) { + if ((g_strncasecmp (pack->name, "nautilus", 8) == 0) || + (g_strncasecmp (pack->name, "gnome-vfs", 9) == 0) || + (g_strncasecmp (pack->name, "oaf", 3) == 0)) { + view->details->core_package = TRUE; + } + } + + g_free (view->details->current_rpm); + view->details->current_rpm = g_strdup (pack->name); + view->details->current_im = im = install_message_new (view, pack->name); + gtk_progress_set_percentage (GTK_PROGRESS (im->progress_bar), 0.0); + needed_by = g_hash_table_lookup (view->details->deps, pack->name); + if (needed_by != NULL) { + out = g_strdup_printf (_("The package \"%s\" requires \"%s\" to run.\n\"%s\" is now being installed."), + needed_by, pack->name, pack->name); + } else { + out = g_strdup_printf (_("Now installing package \"%s\"."), pack->name); + } + nautilus_label_set_text (NAUTILUS_LABEL (im->label), out); + g_free (out); + + view->details->current_package = current_package; + + if (pack->toplevel) { + update_package_info_display (view, pack, _("Installing \"%s\"")); + } + } + + complete = (gfloat) package_progress / package_total; + overall_complete = (gfloat) total_progress / total_total; + gtk_progress_set_percentage (GTK_PROGRESS (im->progress_bar), complete); + gtk_progress_set_percentage (GTK_PROGRESS (view->details->total_progress_bar), overall_complete); + out = g_strdup_printf (_("%d%%"), (int)(complete*100.0)); + nautilus_label_set_text (NAUTILUS_LABEL (im->progress_label), out); + g_free (out); + + if ((package_progress == package_total) && (package_total > 0)) { + /* done with another package! */ + previous_install_finished (view); + } +} + +void +nautilus_service_install_failed (EazelInstallCallback *cb, const PackageData *package, NautilusServiceInstallView *view) +{ + char *tmp, *message; + + g_assert (NAUTILUS_IS_SERVICE_INSTALL_VIEW (view)); + + if (package->status == PACKAGE_ALREADY_INSTALLED) { + view->details->already_installed = TRUE; + return; + } + + /* override the "success" result for install_done signal */ + view->details->failures++; + + tmp = packagedata_get_readable_name (package); + message = g_strdup_printf (_("Installation failed on %s"), tmp); + show_overall_feedback (view, message); + g_free (tmp); + g_free (message); + + /* Get the new set of problem cases */ + eazel_install_problem_tree_to_case (view->details->problem, + package, + FALSE, + &(view->details->problem_cases)); +} + +/* most likely OBSOLETE */ +static gboolean +nautilus_service_install_solve_cases (NautilusServiceInstallView *view) +{ + gboolean answer = FALSE; + GtkWidget *toplevel; + GString *messages; + GList *strings; + GtkWidget *dialog; + + messages = g_string_new (""); + + if (view->details->problem_cases) { + GList *iterator; + /* Create string versions to show the user */ + g_string_sprintfa (messages, "%s\n%s\n\n", + _("I ran into problems while installing."), + _("I'd like to try the following :")); + strings = eazel_install_problem_cases_to_string (view->details->problem, + view->details->problem_cases); + for (iterator = strings; iterator; iterator = g_list_next (iterator)) { + g_string_sprintfa (messages, " \xB7 %s\n", (char*)(iterator->data)); + } + g_list_foreach (strings, (GFunc)g_free, NULL); + g_list_free (strings); + g_string_sprintfa (messages, "\n%s", + _("Is this ok ?")); + + toplevel = gtk_widget_get_toplevel (view->details->message_box); + if (GTK_IS_WINDOW (toplevel)) { + dialog = gnome_question_dialog_parented (messages->str, (GnomeReplyCallback)reply_callback, + &answer, GTK_WINDOW (toplevel)); + } else { + dialog = gnome_question_dialog (messages->str, (GnomeReplyCallback)reply_callback, &answer); + } + gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); + gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + g_string_free (messages, TRUE); + } + + return answer; +} + +void +nautilus_service_install_done (EazelInstallCallback *cb, gboolean success, NautilusServiceInstallView *view) +{ + CORBA_Environment ev; + GtkWidget *toplevel; + GtkWidget *dialog; + char *message; + char *name; + GString *real_message; + gboolean answer = FALSE; + gboolean question_dialog; + GList *packlist, *iter; + PackageData *pack; + + g_assert (NAUTILUS_IS_SERVICE_INSTALL_VIEW (view)); + + if (view->details->preflight_status == PREFLIGHT_PANIC_BUTTON) { + /* user actually destroyed us -- panic! */ +g_warning ("done: panic!"); + return; + } + + /* 'success' will be FALSE if even *one* package failed. need to check for that. */ + + packlist = ((CategoryData *) view->details->categories->data)->packages; + +#if 1 + for (iter = g_list_first (packlist); iter != NULL; iter = g_list_next (iter)) { + pack = PACKAGEDATA (iter->data); + trilobite_debug ("package %s status %d", pack->name, pack->status); + } +#endif + + /* no longer "loading" anything */ + nautilus_view_report_load_complete (view->details->nautilus_view); + + gtk_progress_set_percentage (GTK_PROGRESS (view->details->total_progress_bar), success ? 1.0 : 0.0); + + g_free (view->details->current_rpm); + view->details->current_rpm = NULL; + + if (view->details->cancelled) { + message = _("Installation aborted."); + } else if (view->details->already_installed) { + message = _("This package has already been installed."); + } else if (success) { + message = _("Installation complete."); + } else { + /* FIXME 5906: this isn't really working right yet, so fix it later */ + if (1 || ((guint) view->details->failures == g_list_length (packlist))) { + message = _("Installation failed."); + answer = nautilus_service_install_solve_cases (view); + } else { + /* some succeeded; some failed */ + real_message = g_string_new (_("Some packages installed successfully:")); + for (iter = g_list_first (packlist); iter != NULL; iter = g_list_next (iter)) { + pack = PACKAGEDATA (iter->data); + if (pack->status == PACKAGE_RESOLVED) { + name = packagedata_get_readable_name (pack); + g_string_sprintfa (real_message, "\n \xB7 %s", name); + g_free (name); + } + } + g_string_sprintfa (real_message, _("\nSome packages failed:")); + for (iter = g_list_first (packlist); iter != NULL; iter = g_list_next (iter)) { + pack = PACKAGEDATA (iter->data); + if (pack->status != PACKAGE_RESOLVED) { + name = packagedata_get_readable_name (pack); + g_string_sprintfa (real_message, "\n \xB7 %s", name); + g_free (name); + } + } + + message = real_message->str; + g_string_free (real_message, FALSE); + answer = nautilus_service_install_solve_cases (view); + } + } + + show_overall_feedback (view, message); + + if (answer) { + eazel_install_problem_handle_cases (view->details->problem, + view->details->installer, + &(view->details->problem_cases), + &(view->details->categories), + NULL, + NULL); + } else { + real_message = g_string_new (message); + question_dialog = TRUE; + answer = FALSE; + + if (success && view->details->desktop_files && + !view->details->cancelled && + !view->details->already_installed) { + g_string_sprintfa (real_message, "\n%s", nautilus_install_service_locate_menu_entries (view)); + } + if (view->details->cancelled_before_downloads || + view->details->already_installed || + (nautilus_preferences_get_user_level () < NAUTILUS_USER_LEVEL_ADVANCED)) { + /* don't ask about erasing rpms */ + question_dialog = FALSE; + answer = TRUE; + } else if (view->details->downloaded_anything) { + if (view->details->cancelled || view->details->failures) { + g_string_sprintfa (real_message, "\n%s", _("Erase the RPM files?")); + } else { + g_string_sprintfa (real_message, "\n%s", _("Erase the leftover RPM files?")); + } + } else { + question_dialog = FALSE; + } + + toplevel = gtk_widget_get_toplevel (view->details->message_box); + if (GTK_IS_WINDOW (toplevel)) { + if (question_dialog) { + dialog = gnome_question_dialog_parented (real_message->str, + (GnomeReplyCallback)reply_callback, + &answer, GTK_WINDOW (toplevel)); + } else { + dialog = gnome_ok_dialog_parented (real_message->str, GTK_WINDOW (toplevel)); + } + } else { + if (question_dialog) { + dialog = gnome_question_dialog (real_message->str, + (GnomeReplyCallback)reply_callback, &answer); + } else { + dialog = gnome_ok_dialog (real_message->str); + } + } + gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); + gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + g_string_free (real_message, TRUE); + + if (answer) { + CORBA_exception_init (&ev); + eazel_install_callback_delete_files (cb, &ev); + CORBA_exception_free (&ev); + } + + if (success && view->details->core_package) { + message = _("A core package of Nautilus has been\n" + "updated. You should restart Nautilus.\n\n" + "Do you wish to do that now?"); + if (GTK_IS_WINDOW (toplevel)) { + dialog = gnome_question_dialog_parented (message, + (GnomeReplyCallback)reply_callback, + &answer, GTK_WINDOW (toplevel)); + } else { + dialog = gnome_question_dialog (message, (GnomeReplyCallback)reply_callback, + &answer); + } + gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); + gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + + if (answer) { + if (execlp ("nautilus", "nautilus", "--restart", NULL) < 0) { + g_message ("Exec error %s", strerror (errno)); + } + } + } + + /* send them to the predetermined "next" url + * -- but only if they haven't set jump-after-install off + */ + if ((view->details->username != NULL) && + (strcasecmp (view->details->username, EAZELPROXY_USERNAME_ANONYMOUS) == 0)) { + /* send anonymous users elsewhere, so they won't have to login */ + message = g_strdup (NEXT_URL_ANONYMOUS); + } else { + message = g_strdup (NEXT_URL); + } + message = NULL; + if (eazel_install_configure_check_jump_after_install (&message)) { + if (message != NULL) { + nautilus_view_open_location_in_this_window (view->details->nautilus_view, message); + } else { + g_warning ("attemping to go back"); + nautilus_view_go_back (view->details->nautilus_view); + } + } + g_free (message); + } +} diff --git a/components/services/install/nautilus-view/callbacks.h b/components/services/install/nautilus-view/callbacks.h new file mode 100644 index 000000000..4ecb92aa3 --- /dev/null +++ b/components/services/install/nautilus-view/callbacks.h @@ -0,0 +1,53 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000, 2001 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper <pepper@eazel.com> + * Robey Pointer <robey@eazel.com> + */ + +#ifndef _CALLBACKS_H_ +#define _CALLBACKS_H_ + +void nautilus_service_install_conflict_check (EazelInstallCallback *cb, const PackageData *pack, + NautilusServiceInstallView *view); +void nautilus_service_install_dependency_check (EazelInstallCallback *cb, const PackageData *package, + const PackageData *needs, NautilusServiceInstallView *view); +gboolean nautilus_service_install_preflight_check (EazelInstallCallback *cb, + EazelInstallCallbackOperation op, + const GList *packages, + int total_bytes, + int total_packages, + NautilusServiceInstallView *view); +void nautilus_service_install_download_progress (EazelInstallCallback *cb, const PackageData *pack, + int amount, int total, + NautilusServiceInstallView *view); +void nautilus_service_install_download_failed (EazelInstallCallback *cb, const PackageData *pack, + NautilusServiceInstallView *view); +void nautilus_service_install_progress (EazelInstallCallback *cb, const PackageData *pack, + int current_package, int total_packages, + int package_progress, int package_total, + int total_progress, int total_total, + NautilusServiceInstallView *view); +void nautilus_service_install_failed (EazelInstallCallback *cb, const PackageData *package, + NautilusServiceInstallView *view); +void nautilus_service_install_done (EazelInstallCallback *cb, gboolean success, NautilusServiceInstallView *view); + + +#endif /* _CALLBACKS_H_ */ diff --git a/components/services/install/nautilus-view/forms.c b/components/services/install/nautilus-view/forms.c new file mode 100644 index 000000000..3082b2919 --- /dev/null +++ b/components/services/install/nautilus-view/forms.c @@ -0,0 +1,483 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000, 2001 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper <pepper@eazel.com> + * Robey Pointer <robey@eazel.com> + */ + +#include <config.h> + +#include "nautilus-service-install-view.h" +#include "forms.h" +#include "callbacks.h" +#include "eazel-services-header.h" +#include "eazel-services-extensions.h" +#include <stdio.h> +#include <libnautilus-extensions/nautilus-background.h> +#include <libnautilus-extensions/nautilus-label.h> +#include <libnautilus-extensions/nautilus-viewport.h> + + +/* gtk rulez */ +static void +add_padding_to_box (GtkWidget *box, int pad_x, int pad_y) +{ + GtkWidget *filler; + + filler = gtk_label_new (""); + gtk_widget_set_usize (filler, pad_x ? pad_x : 1, pad_y ? pad_y : 1); + gtk_widget_show (filler); + gtk_box_pack_start (GTK_BOX (box), filler, FALSE, FALSE, 0); +} + +static gboolean +line_expose (GtkWidget *widget, GdkEventExpose *event) +{ + gdk_window_clear_area (widget->window, event->area.x, event->area.y, event->area.width, event->area.height); + gdk_gc_set_clip_rectangle (widget->style->fg_gc[widget->state], &event->area); + gdk_draw_line (widget->window, widget->style->fg_gc[widget->state], + event->area.x, widget->allocation.height/2, + event->area.x + event->area.width, widget->allocation.height/2); + gdk_gc_set_clip_rectangle (widget->style->fg_gc[widget->state], NULL); + + return TRUE; +} + +static GtkWidget * +horizontal_line_new (int height) +{ + GtkWidget *line; + NautilusBackground *background; + + line = gtk_drawing_area_new (); + gtk_drawing_area_size (GTK_DRAWING_AREA (line), 100, 1); + gtk_signal_connect (GTK_OBJECT (line), "expose_event", GTK_SIGNAL_FUNC (line_expose), NULL); + gtk_widget_set_usize (line, -2, height); + + background = nautilus_get_widget_background (line); + nautilus_background_set_color (background, EAZEL_SERVICES_BACKGROUND_COLOR_SPEC); + + return line; +} + +void +install_message_destroy (InstallMessage *im) +{ + g_free (im->package_name); + g_free (im); +} + +InstallMessage * +install_message_new (NautilusServiceInstallView *view, const char *package_name) +{ + InstallMessage *im, *im2; + GtkWidget *bogus_label; + GList *iter; + + im = NULL; + + for (iter = g_list_first (view->details->message); iter != NULL; iter = g_list_next (iter)) { + im = (InstallMessage *)(iter->data); + if (strcmp (im->package_name, package_name) == 0) { + break; + } + } + if (iter != NULL) { + /* trash the old one */ + gtk_container_remove (GTK_CONTAINER (view->details->message_box), im->hbox); + if (im->line != NULL) { + gtk_container_remove (GTK_CONTAINER (view->details->message_box), im->line); + } else if (iter->prev) { + /* remove the line from the one above, if present */ + im2 = (InstallMessage *)(iter->prev->data); + gtk_container_remove (GTK_CONTAINER (view->details->message_box), im2->line); + im2->line = NULL; + } + view->details->message = g_list_remove (view->details->message, im); + install_message_destroy (im); + } + + im = g_new0 (InstallMessage, 1); + im->label = eazel_services_label_new (NULL, 0, 0.0, 0.5, 0, 0, + EAZEL_SERVICES_BODY_TEXT_COLOR_RGB, + EAZEL_SERVICES_BACKGROUND_COLOR_RGB, + NULL, -2, FALSE); + nautilus_label_set_justify (NAUTILUS_LABEL (im->label), GTK_JUSTIFY_LEFT); + gtk_widget_show (im->label); + im->progress_bar = gtk_progress_bar_new (); + gtk_progress_bar_set_bar_style (GTK_PROGRESS_BAR (im->progress_bar), GTK_PROGRESS_CONTINUOUS); + gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (im->progress_bar), GTK_PROGRESS_LEFT_TO_RIGHT); + gtk_progress_bar_update (GTK_PROGRESS_BAR (im->progress_bar), 0.0); + gtk_widget_set_usize (im->progress_bar, -2, PROGRESS_BAR_HEIGHT); + gtk_widget_show (im->progress_bar); + + im->progress_label = eazel_services_label_new (NULL, 0, 0.0, 0.0, 0, 0, + EAZEL_SERVICES_BODY_TEXT_COLOR_RGB, + EAZEL_SERVICES_BACKGROUND_COLOR_RGB, + NULL, -2, TRUE); + nautilus_label_set_justify (NAUTILUS_LABEL (im->progress_label), GTK_JUSTIFY_LEFT); + gtk_widget_show (im->progress_label); + + bogus_label = gtk_label_new (""); + gtk_widget_show (bogus_label); + + im->vbox = gtk_vbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (im->vbox), im->progress_bar, FALSE, FALSE, 0); + add_padding_to_box (im->vbox, 0, 5); + gtk_box_pack_start (GTK_BOX (im->vbox), im->progress_label, FALSE, FALSE, 0); + gtk_widget_show (im->vbox); + + im->hbox = gtk_hbox_new (FALSE, 0); + add_padding_to_box (im->hbox, 20, 0); + gtk_box_pack_start (GTK_BOX (im->hbox), im->label, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (im->hbox), bogus_label, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (im->hbox), im->vbox, FALSE, FALSE, 0); + add_padding_to_box (im->hbox, 20, 0); + gtk_widget_show (im->hbox); + + /* show the middle header in case this is the first install message */ + gtk_widget_show (view->details->middle_title); + gtk_widget_show (view->details->total_progress_bar); + +#if 0 + if (g_list_length (view->details->message) == STATUS_ROWS) { + gtk_widget_set_usize (view->details->pane, -2, view->details->pane->allocation.height); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (view->details->pane), + GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + } +#endif + + /* add this, and possibly a separating line, to the message box */ + if (g_list_length (view->details->message) > 0) { + /* draw line */ + im->line = horizontal_line_new (6); + gtk_widget_show (im->line); + gtk_box_pack_end (GTK_BOX (view->details->message_box), im->line, FALSE, FALSE, 0); + } else { + im->line = NULL; + } + gtk_box_pack_end (GTK_BOX (view->details->message_box), im->hbox, FALSE, FALSE, 5); + + gtk_adjustment_changed (gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (view->details->pane))); + + im->package_name = g_strdup (package_name); + view->details->message = g_list_prepend (view->details->message, im); + + /* unbelievable! gtk won't redraw correctly unless we poke it in the ass */ + gtk_widget_queue_resize (view->details->form); + gtk_widget_queue_draw (view->details->form); + + return im; +} + +void +generate_install_form (NautilusServiceInstallView *view) +{ + GtkWidget *temp_box; + GtkWidget *title; + GtkWidget *viewport; + GtkWidget *filler; + NautilusBackground *background; + + /* allocate the parent box to hold everything */ + view->details->form = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (view), view->details->form); + + /* Setup the title */ + title = eazel_services_header_title_new (_("Easy Install")); + gtk_box_pack_start (GTK_BOX (view->details->form), title, FALSE, FALSE, 0); + gtk_widget_show (title); + + /* Add package information */ + + add_padding_to_box (view->details->form, 0, 6); + + /* Package Name */ + temp_box = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (view->details->form), temp_box, FALSE, FALSE, 0); + gtk_widget_show (temp_box); + view->details->package_name = eazel_services_label_new (NULL, 0, 0.0, 0.0, 0, 0, + EAZEL_SERVICES_BODY_TEXT_COLOR_RGB, + EAZEL_SERVICES_BACKGROUND_COLOR_RGB, + NULL, 4, TRUE); + nautilus_label_set_justify (NAUTILUS_LABEL (view->details->package_name), GTK_JUSTIFY_LEFT); + gtk_box_pack_start (GTK_BOX (temp_box), view->details->package_name, FALSE, FALSE, 15); + gtk_widget_show (view->details->package_name); + + /* Package Version */ + temp_box = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (view->details->form), temp_box, FALSE, FALSE, 2); + gtk_widget_show (temp_box); + view->details->package_version = eazel_services_label_new (NULL, 0, 0.0, 0.0, 0, 0, + EAZEL_SERVICES_BODY_TEXT_COLOR_RGB, + EAZEL_SERVICES_BACKGROUND_COLOR_RGB, + NULL, -2, TRUE); + nautilus_label_set_justify (NAUTILUS_LABEL (view->details->package_version), GTK_JUSTIFY_LEFT); + gtk_box_pack_start (GTK_BOX (temp_box), view->details->package_version, FALSE, FALSE, 15); + gtk_widget_show (view->details->package_version); + + add_padding_to_box (view->details->form, 0, 4); + + /* generate the overall progress bar */ + temp_box = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (view->details->form), temp_box, FALSE, FALSE, 2); + gtk_widget_show (temp_box); + view->details->total_progress_bar = gtk_progress_bar_new (); + gtk_widget_set_usize (view->details->total_progress_bar, -2, PROGRESS_BAR_HEIGHT); + add_padding_to_box (temp_box, 30, 0); + gtk_box_pack_start (GTK_BOX (temp_box), view->details->total_progress_bar, FALSE, FALSE, 0); + /* show the progress bar only when ready */ + gtk_widget_hide (view->details->total_progress_bar); + + /* add a label for progress messages, but don't show it until there's a message */ + temp_box = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (view->details->form), temp_box, FALSE, FALSE, 2); + gtk_widget_show (temp_box); + view->details->overall_feedback_text = eazel_services_label_new (NULL, 0, 0.0, 0.0, 0, 0, + EAZEL_SERVICES_BODY_TEXT_COLOR_RGB, + EAZEL_SERVICES_BACKGROUND_COLOR_RGB, + NULL, -2, FALSE); + nautilus_label_set_justify (NAUTILUS_LABEL (view->details->overall_feedback_text), GTK_JUSTIFY_LEFT); + nautilus_label_set_text (NAUTILUS_LABEL (view->details->overall_feedback_text), " "); + gtk_widget_show (view->details->overall_feedback_text); + add_padding_to_box (temp_box, 30, 0); + gtk_box_pack_start (GTK_BOX (temp_box), view->details->overall_feedback_text, TRUE, TRUE, 0); + + add_padding_to_box (view->details->form, 0, 10); + + /* Package Description */ + temp_box = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (view->details->form), temp_box, FALSE, FALSE, 2); + gtk_widget_show (temp_box); + + view->details->package_details = eazel_services_label_new (NULL, 0, 0.0, 0.0, 0, 0, + EAZEL_SERVICES_BODY_TEXT_COLOR_RGB, + EAZEL_SERVICES_BACKGROUND_COLOR_RGB, + NULL, -2, FALSE); + nautilus_label_set_justify (NAUTILUS_LABEL (view->details->package_details), GTK_JUSTIFY_LEFT); + nautilus_label_set_wrap (NAUTILUS_LABEL (view->details->package_details), TRUE); + + gtk_box_pack_start (GTK_BOX (temp_box), view->details->package_details, FALSE, FALSE, 15); + gtk_widget_show (view->details->package_details); + + /* query box: for asking the user questions during the preflight signal */ + view->details->query_box = gtk_vbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (temp_box), view->details->query_box, FALSE, FALSE, 0); + gtk_widget_hide (view->details->query_box); + + /* filler blob to separate the top from the bottom */ + gtk_box_pack_start (GTK_BOX (view->details->form), gtk_label_new (""), TRUE, FALSE, 0); + + /* add a table at the bottom of the screen to hold current progresses */ + view->details->message_box = gtk_vbox_new (FALSE, 0); + filler = gtk_label_new (""); + gtk_widget_show (filler); + gtk_box_pack_end (GTK_BOX (view->details->message_box), filler, TRUE, TRUE, 0); + + view->details->pane = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (view->details->pane), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + viewport = nautilus_viewport_new (NULL, NULL); + gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE); + gtk_container_add (GTK_CONTAINER (view->details->pane), viewport); + gtk_widget_show (viewport); + gtk_container_add (GTK_CONTAINER (viewport), view->details->message_box); + gtk_widget_show (view->details->message_box); + background = nautilus_get_widget_background (viewport); + nautilus_background_set_color (background, EAZEL_SERVICES_BACKGROUND_COLOR_SPEC); + gtk_widget_set_usize (view->details->pane, -2, MESSAGE_BOX_HEIGHT); + gtk_widget_show (view->details->pane); + gtk_box_pack_end (GTK_BOX (view->details->form), view->details->pane, FALSE, FALSE, 2); + + /* Setup the progress header */ + /* FIXME: the middle header is all fubar now, so we just say "messages", but the spec + * shows "progress" over the 2nd column of the message box. it's just too hard to get + * it aligned currently. + */ + view->details->middle_title = eazel_services_header_middle_new (_("Messages"), ""); + gtk_box_pack_end (GTK_BOX (view->details->form), view->details->middle_title, FALSE, FALSE, 0); + /* don't show the progress header until there's still to go there */ + + gtk_widget_show (view->details->form); +} + +/* utility routine to show an error message */ +void +show_overall_feedback (NautilusServiceInstallView *view, char *progress_message) +{ + nautilus_label_set_text (NAUTILUS_LABEL (view->details->overall_feedback_text), progress_message); + gtk_widget_show (view->details->overall_feedback_text); +} + +void +update_package_info_display (NautilusServiceInstallView *view, const PackageData *pack, const char *format) +{ + char *out; + + out = g_strdup_printf (format, pack->name); + nautilus_label_set_text (NAUTILUS_LABEL (view->details->package_name), out); + g_free (out); + + if ((pack->description != NULL) && + (strchr (pack->description, '\n') != NULL)) { + nautilus_label_set_wrap (NAUTILUS_LABEL (view->details->package_details), FALSE); + } else { + nautilus_label_set_wrap (NAUTILUS_LABEL (view->details->package_details), TRUE); + } + nautilus_label_set_text (NAUTILUS_LABEL (view->details->package_details), pack->description); + out = g_strdup_printf (_("Version: %s"), pack->version); + nautilus_label_set_text (NAUTILUS_LABEL (view->details->package_version), out); + g_free (out); +} + +/* replace the current progress bar (in the message box) with a centered label saying "Complete!" */ +void +current_progress_bar_complete (NautilusServiceInstallView *view, const char *text) +{ + /* can't figure out a decent way to do this yet... :( */ + if (view->details->current_im != NULL) { + nautilus_label_set_text (NAUTILUS_LABEL (view->details->current_im->progress_label), text); + gtk_widget_queue_resize (view->details->message_box); + } +} + +static void +button_ok_clicked (GtkWidget *button, NautilusServiceInstallView *view) +{ + view->details->preflight_status = PREFLIGHT_OK; +} + +static void +button_cancel_clicked (GtkWidget *button, NautilusServiceInstallView *view) +{ + view->details->preflight_status = PREFLIGHT_CANCEL; +} + +void +make_query_box (NautilusServiceInstallView *view, EazelInstallCallbackOperation op, GList *package_list) +{ + GtkWidget *top_label; + GtkWidget *bottom_label; + GtkWidget *hbox_list; + GtkWidget *vbox_list; + GtkWidget *list_label; + GtkWidget *hbox_buttons; + GtkWidget *button_ok; + GtkWidget *button_cancel; + char *text; + GList *iter; + unsigned long total_k; + PackageData *package; + int max_width; + GtkRequisition requisition; + + switch (op) { + case EazelInstallCallbackOperation_INSTALL: + text = _("These packages are about to be downloaded and installed:"); + break; + case EazelInstallCallbackOperation_UNINSTALL: + text = _("These packages are about to be uninstalled:"); + break; + case EazelInstallCallbackOperation_REVERT: + text = _("These packages are about to be reverted:"); + break; + default: + text = "???"; + } + top_label = eazel_services_label_new (NULL, 0, 0.0, 0.0, 0, 0, + EAZEL_SERVICES_BODY_TEXT_COLOR_RGB, + EAZEL_SERVICES_BACKGROUND_COLOR_RGB, + NULL, -1, FALSE); + nautilus_label_set_text (NAUTILUS_LABEL (top_label), text); + nautilus_label_set_justify (NAUTILUS_LABEL (top_label), GTK_JUSTIFY_LEFT); + gtk_widget_show (top_label); + + /* build up vbox list of packages */ + vbox_list = gtk_vbox_new (FALSE, 0); + for (iter = g_list_first (package_list); iter != NULL; iter = g_list_next (iter)) { + package = PACKAGEDATA (iter->data); + text = packagedata_get_readable_name (package); + list_label = eazel_services_label_new (NULL, 0, 0.0, 0.0, 0, 0, + EAZEL_SERVICES_BODY_TEXT_COLOR_RGB, + EAZEL_SERVICES_BACKGROUND_COLOR_RGB, + NULL, -1, TRUE); + nautilus_label_set_text (NAUTILUS_LABEL (list_label), text); + nautilus_label_set_justify (NAUTILUS_LABEL (list_label), GTK_JUSTIFY_LEFT); + gtk_widget_show (list_label); + gtk_box_pack_start (GTK_BOX (vbox_list), list_label, FALSE, FALSE, 0); + g_free (text); + } + gtk_widget_show (vbox_list); + + /* hbox around the list to offset it */ + hbox_list = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox_list), vbox_list, FALSE, FALSE, 20); + gtk_widget_show (hbox_list); + + /* bottom label -- confirmation question */ + total_k = (view->details->download_bytes_total+512)/1024; + /* arbitrary dividing line */ + if (total_k > 4096) { + text = g_strdup_printf (_("for a total of %ld MB."), (total_k+512)/1024); + } else { + text = g_strdup_printf (_("for a total of %ld KB."), total_k); + } + bottom_label = eazel_services_label_new (NULL, 0, 0.0, 0.0, 0, 0, + EAZEL_SERVICES_BODY_TEXT_COLOR_RGB, + EAZEL_SERVICES_BACKGROUND_COLOR_RGB, + NULL, -1, FALSE); + nautilus_label_set_text (NAUTILUS_LABEL (bottom_label), text); + nautilus_label_set_justify (NAUTILUS_LABEL (bottom_label), GTK_JUSTIFY_LEFT); + gtk_widget_show (bottom_label); + g_free (text); + + /* buttons */ + button_ok = gtk_button_new_with_label (_("Continue")); + gtk_signal_connect (GTK_OBJECT (button_ok), "clicked", GTK_SIGNAL_FUNC (button_ok_clicked), view); + gtk_widget_show (button_ok); + + button_cancel = gtk_button_new_with_label (_("Cancel")); + gtk_signal_connect (GTK_OBJECT (button_cancel), "clicked", GTK_SIGNAL_FUNC (button_cancel_clicked), view); + gtk_widget_show (button_cancel); + + gtk_widget_size_request (button_ok, &requisition); + max_width = button_ok->requisition.width; + gtk_widget_size_request (button_cancel, &requisition); + if (requisition.width > max_width) { + max_width = requisition.width; + } + gtk_widget_set_usize (button_ok, max_width+10, -2); + gtk_widget_set_usize (button_cancel, max_width+10, -2); + + hbox_buttons = gtk_hbox_new (FALSE, 0); + list_label = gtk_label_new (""); + gtk_widget_show (list_label); + gtk_box_pack_start (GTK_BOX (hbox_buttons), list_label, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (hbox_buttons), button_cancel, FALSE, FALSE, 10); + gtk_box_pack_start (GTK_BOX (hbox_buttons), button_ok, FALSE, FALSE, 0); + gtk_widget_show (hbox_buttons); + + gtk_box_pack_start (GTK_BOX (view->details->query_box), top_label, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (view->details->query_box), hbox_list, FALSE, FALSE, 10); + gtk_box_pack_start (GTK_BOX (view->details->query_box), bottom_label, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (view->details->query_box), hbox_buttons, FALSE, FALSE, 10); + gtk_widget_show (view->details->query_box); + + gtk_container_set_focus_child (GTK_CONTAINER (view->details->form), button_ok); +} diff --git a/components/services/install/nautilus-view/forms.h b/components/services/install/nautilus-view/forms.h new file mode 100644 index 000000000..ab7483a8d --- /dev/null +++ b/components/services/install/nautilus-view/forms.h @@ -0,0 +1,36 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000, 2001 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper <pepper@eazel.com> + * Robey Pointer <robey@eazel.com> + */ + +#ifndef _FORMS_H_ +#define _FORMS_H_ + +void install_message_destroy (InstallMessage *im); +InstallMessage *install_message_new (NautilusServiceInstallView *view, const char *package_name); +void generate_install_form (NautilusServiceInstallView *view); +void show_overall_feedback (NautilusServiceInstallView *view, char *progress_message); +void update_package_info_display (NautilusServiceInstallView *view, const PackageData *pack, const char *format); +void current_progress_bar_complete (NautilusServiceInstallView *view, const char *text); +void make_query_box (NautilusServiceInstallView *view, EazelInstallCallbackOperation op, GList *package_list); + +#endif /* _FORMS_H_ */ diff --git a/components/services/install/nautilus-view/main.c b/components/services/install/nautilus-view/main.c new file mode 100644 index 000000000..2a166098f --- /dev/null +++ b/components/services/install/nautilus-view/main.c @@ -0,0 +1,116 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Maciej Stachowiak <mjs@eazel.com> + * J Shane Culpepper <pepper@eazel.com> + */ + +/* main.c - main function and object activation function for services + content view component. */ + +#include <config.h> +#include <gnome.h> +#include <liboaf/liboaf.h> +#include <bonobo.h> +#include "nautilus-service-install-view.h" +#include <libtrilobite/libammonite.h> +#include <gconf/gconf.h> + +static int object_count = 0; + +static gboolean +quit_timer (void *unused) +{ + gtk_main_quit (); + return FALSE; +} + +static void +service_install_object_destroyed (GtkObject *obj) +{ + object_count--; + if (object_count <= 0) { + /* timing issues: let the install view handle its own shutdown before + * pulling the plug... + */ + gtk_timeout_add (5, quit_timer, NULL); + } +} + +static BonoboObject * +service_install_make_object (BonoboGenericFactory *factory, + const char *iid, + void *closure) +{ + + NautilusServiceInstallView *view; + NautilusView *nautilus_view; + + if (strcmp (iid, "OAFIID:nautilus_service_install_view:886546ca-1115-4ea4-8d30-8cefa2f5070b")) { + return NULL; + } + + view = NAUTILUS_SERVICE_INSTALL_VIEW (gtk_object_new (NAUTILUS_TYPE_SERVICE_INSTALL_VIEW, NULL)); + + object_count++; + + nautilus_view = nautilus_service_install_view_get_nautilus_view (view); + + gtk_signal_connect (GTK_OBJECT (nautilus_view), "destroy", service_install_object_destroyed, NULL); + + return BONOBO_OBJECT (nautilus_view); +} + +int +main (int argc, char *argv[]) +{ + BonoboGenericFactory *factory; + CORBA_ORB orb; + char *registration_id; + + /* Disable session manager connection */ + gnome_client_disable_master_connection (); + + gnomelib_register_popt_table (oaf_popt_options, oaf_get_popt_table_name ()); + orb = oaf_init (argc, argv); + + gnome_init ("nautilus-service-install-view", VERSION, + argc, argv); + gdk_rgb_init (); + + bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL); + gconf_init (argc, argv, NULL); + + ammonite_init (bonobo_poa()); + + /* log to stderr, for now (but leave debug mode off) */ + trilobite_set_log_handler (stderr, G_LOG_DOMAIN); + + registration_id = oaf_make_registration_id ("OAFIID:nautilus_service_install_view_factory:e59e53d1-e3d1-46fe-ae28-3ec5c56b7d32", getenv ("DISPLAY")); + factory = bonobo_generic_factory_new_multi (registration_id, + service_install_make_object, + NULL); + g_free (registration_id); + + do { + bonobo_main (); + } while (object_count > 0); + + return 0; +} diff --git a/components/services/install/nautilus-view/nautilus-service-install-view.c b/components/services/install/nautilus-view/nautilus-service-install-view.c new file mode 100644 index 000000000..5732f046b --- /dev/null +++ b/components/services/install/nautilus-view/nautilus-service-install-view.c @@ -0,0 +1,858 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000, 2001 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper <pepper@eazel.com> + * Robey Pointer <robey@eazel.com> + */ + +#include <config.h> + +#include "nautilus-service-install-view.h" +#include "forms.h" +#include "callbacks.h" + +#include "eazel-services-header.h" +#include "eazel-services-extensions.h" +#include <libeazelinstall.h> +#include "libtrilobite/libtrilobite.h" +#include "libtrilobite/libammonite-gtk.h" + +#include <gnome-xml/tree.h> +#include <libgnomevfs/gnome-vfs-utils.h> +#include <libnautilus-extensions/nautilus-background.h> +#include <libnautilus-extensions/nautilus-gtk-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-macros.h> +#include <libnautilus-extensions/nautilus-glib-extensions.h> +#include <libnautilus-extensions/nautilus-file-utilities.h> +#include <libnautilus-extensions/nautilus-string.h> +#include <libnautilus-extensions/nautilus-label.h> +#include <libnautilus-extensions/nautilus-gdk-extensions.h> +#include <libnautilus-extensions/nautilus-password-dialog.h> +#include <libnautilus-extensions/nautilus-stock-dialogs.h> +#include <libnautilus-extensions/nautilus-viewport.h> +#include <libnautilus-extensions/nautilus-preferences.h> +#include <stdio.h> +#include <fcntl.h> +#include <dirent.h> +#include <unistd.h> +#include <sys/stat.h> + +/* for uname */ +#include <sys/utsname.h> + +#define PASSWORD_PROMPT _("Please enter your root password to continue installing. (This password is not saved or transmitted off your system.)") + +static void nautilus_service_install_view_initialize_class (NautilusServiceInstallViewClass *klass); +static void nautilus_service_install_view_initialize (NautilusServiceInstallView *view); +static void service_install_load_location_callback (NautilusView *nautilus_view, + const char *location, + NautilusServiceInstallView *view); +static void service_install_stop_loading_callback (NautilusView *nautilus_view, + NautilusServiceInstallView *view); + +NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusServiceInstallView, nautilus_service_install_view, GTK_TYPE_EVENT_BOX) + + +static gboolean +deps_destroy_foreach (char *key, char *value) +{ + g_free (key); + g_free (value); + return TRUE; +} + +static void +nautilus_service_install_view_destroy (GtkObject *object) +{ + NautilusServiceInstallView *view; + CORBA_Environment ev; + + view = NAUTILUS_SERVICE_INSTALL_VIEW (object); + if (view->details->preflight_status == PREFLIGHT_UNKNOWN) { + view->details->preflight_status = PREFLIGHT_PANIC_BUTTON; + } + + CORBA_exception_init (&ev); + if (view->details->installer != NULL) { + GNOME_Trilobite_Eazel_Install_stop (eazel_install_callback_corba_objref (view->details->installer), &ev); + } + CORBA_exception_free (&ev); + + if (view->details->root_client != NULL) { + trilobite_root_client_unref (GTK_OBJECT (view->details->root_client)); + } + + if (view->details->installer != NULL) { + /* this will unref the installer too, which will indirectly cause any ongoing download to abort */ + eazel_install_callback_unref (GTK_OBJECT (view->details->installer)); + } + + NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object)); +} + +static void +nautilus_service_install_view_finalize (GtkObject *object) +{ + NautilusServiceInstallView *view; + + view = NAUTILUS_SERVICE_INSTALL_VIEW (object); + + g_free (view->details->uri); + g_free (view->details->current_rpm); + g_free (view->details->remembered_password); + g_hash_table_foreach_remove (view->details->deps, (GHRFunc)deps_destroy_foreach, NULL); + g_hash_table_destroy (view->details->deps); + g_list_foreach (view->details->message, (GFunc)install_message_destroy, NULL); + g_list_free (view->details->message); + g_free (view->details->username); + g_free (view->details); + + NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, finalize, (object)); +} + +static void +nautilus_service_install_view_initialize_class (NautilusServiceInstallViewClass *klass) +{ + + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + + object_class = GTK_OBJECT_CLASS (klass); + widget_class = GTK_WIDGET_CLASS (klass); + parent_class = gtk_type_class (gtk_event_box_get_type ()); + object_class->destroy = nautilus_service_install_view_destroy; + object_class->finalize = nautilus_service_install_view_finalize; +} + +static void +nautilus_service_install_view_initialize (NautilusServiceInstallView *view) +{ + + NautilusBackground *background; + + view->details = g_new0 (NautilusServiceInstallViewDetails, 1); + view->details->nautilus_view = nautilus_view_new (GTK_WIDGET (view)); + gtk_signal_connect (GTK_OBJECT (view->details->nautilus_view), + "load_location", + GTK_SIGNAL_FUNC (service_install_load_location_callback), + view); + gtk_signal_connect (GTK_OBJECT (view->details->nautilus_view), + "stop_loading", + GTK_SIGNAL_FUNC (service_install_stop_loading_callback), + view); + + background = nautilus_get_widget_background (GTK_WIDGET (view)); + nautilus_background_set_color (background, EAZEL_SERVICES_BACKGROUND_COLOR_SPEC); + + view->details->core_package = FALSE; + view->details->deps = g_hash_table_new (g_str_hash, g_str_equal); + + gtk_widget_show (GTK_WIDGET (view)); +} + + +NautilusView * +nautilus_service_install_view_get_nautilus_view (NautilusServiceInstallView *view) +{ + return view->details->nautilus_view; +} + + +static PackageData * +create_package (char *name, int local_file) +{ + struct utsname buf; + PackageData *pack; + + g_assert (name); + + uname (&buf); + pack = packagedata_new (); + if (local_file) { + pack->filename = g_strdup (name); + } else if (strncmp (name, "rpm_id%3D", 9) == 0) { + pack->eazel_id = g_strdup (name+9); + } else if (strncmp (name, "rpm_id=", 7) == 0) { + pack->eazel_id = g_strdup (name+7); + } else if (strncmp (name, "product_id%3D", 13) == 0) { + pack->suite_id = g_strdup_printf ("P:%s", name+13); + } else if (strncmp (name, "product_id=", 11) == 0) { + pack->suite_id = g_strdup_printf ("P:%s", name+11); + } else if (strncmp (name, "suite_id%3D", 11) == 0) { + pack->suite_id = g_strdup_printf ("S:%s", name+11); + } else if (strncmp (name, "suite_id=", 9) == 0) { + pack->suite_id = g_strdup_printf ("S:%s", name+9); + } else if (strncmp (name, "product_name%3D", 15) == 0) { + pack->suite_id = g_strdup_printf ("N:%s", name+15); + } else if (strncmp (name, "product_name=", 13) == 0) { + pack->suite_id = g_strdup_printf ("N:%s", name+13); + } else if (strncmp (name, "suite_name%3D", 13) == 0) { + pack->suite_id = g_strdup_printf ("X:%s", name+13); + } else if (strncmp (name, "suite_name=", 11) == 0) { + pack->suite_id = g_strdup_printf ("X:%s", name+11); + } else { + pack->name = g_strdup (name); + } + pack->archtype = g_strdup (buf.machine); +#ifdef ASSUME_ix86_IS_i386 + if (strlen (pack->archtype)==4 && pack->archtype[0]=='i' && + pack->archtype[1]>='3' && pack->archtype[1]<='9' && + pack->archtype[2]=='8' && pack->archtype[3]=='6') { + g_free (pack->archtype); + pack->archtype = g_strdup ("i386"); + } +#endif + pack->distribution = trilobite_get_distribution (); + pack->toplevel = TRUE; + + return pack; +} + +/* quick & dirty: parse the url into (host, port) and a category list */ +/* format: + * "eazel-install:" [ "//" [ username "@" ] [ "hostname" [ ":" port ] ] "/" ] + * package-name [ "?version=" version ] ( ";" package-name [ "?version=" version ] )* + * + * eazel-install:xfig + * eazel-install://anonymous@/freeamp + * eazel-install://example.com:8888/nautilus?version=1.0;xpdf;sephiroth?version=0.4 + */ +/* returns TRUE if a hostname was parsed from the uri */ +static gboolean +nautilus_install_parse_uri (const char *uri, NautilusServiceInstallView *view, + char **host, int *port, char **username) +{ + char *p, *q, *pnext, *package_name, *host_spec, *rest, *ptr; + GList *packages = NULL; + PackageData *pack; + gboolean result = FALSE; + gboolean another_package; + + view->details->categories = NULL; + + p = strchr (uri, ':'); + if (! p) { + /* bad mojo */ + return result; + } + p++; + + /* "//[user@]host[:port]" spec? */ + if ((*p == '/') && (*(p+1) == '/')) { + p += 2; + + q = strchr (p, '/'); + if (! q) { + q = p + strlen(p); + } + host_spec = g_strndup (p, q - p); + + /* optional "user@" */ + p = strchr (host_spec, '@'); + if (p) { + *p = 0; + g_free (*username); + *username = host_spec; + if (*(p+1)) { + g_free (*host); + *host = g_strdup (p+1); + result = TRUE; + } + } else { + g_free (*host); + *host = host_spec; + result = TRUE; + } + + if (*host) { + /* optional ":port" */ + p = strchr (*host, ':'); + if (p) { + *p = 0; + *port = atoi (p+1); + } + } + + /* push p to past the trailing '/' */ + p = (*q) ? q+1 : q; + } + + /* full path specified? local file instead of server */ + if (*p == '/') { + view->details->using_local_file = 1; + } + + if (*p) { + rest = g_strdup (p); + ptr = rest; + do { + pnext = strchr (ptr, ';'); + if ((pnext != NULL) && (*(pnext+1) != '\0')) { + another_package = TRUE; + *pnext++ = '\0'; + } else { + another_package = FALSE; + } + + trilobite_debug ("package '%s'", ptr); + /* version name specified? */ + q = strchr (ptr, '?'); + if (q) { + *q++ = 0; + if (strncmp (q, "version=", 8) == 0) { + q += 8; + } + } + + package_name = gnome_vfs_unescape_string_for_display (ptr); + pack = create_package (package_name, view->details->using_local_file); + if (q) { + pack->version = g_strdup (q); + } + packages = g_list_prepend (packages, pack); + g_free (package_name); + + if (pnext != NULL) { + ptr = pnext; + } + } while (another_package); + g_free (rest); + } + + trilobite_debug ("host '%s:%d' username '%s'", *host ? *host : "(default)", *host ? *port : 0, + *username ? *username : "(default)"); + + /* add to categories */ + if (packages) { + CategoryData *category; + + category = categorydata_new (); + category->packages = packages; + view->details->categories = g_list_prepend (view->details->categories, category); + } + return result; +} + +void +nautilus_service_install_check_for_desktop_files (NautilusServiceInstallView *view, + EazelInstallCallback *cb, + PackageData *package) +{ + GList *iterator; + + for (iterator = package->provides; iterator; iterator = g_list_next (iterator)) { + char *fname = (char*)(iterator->data); + char *ptr; + + ptr = strrchr (fname, '.'); + if (ptr && ((strcmp (ptr, ".desktop") == 0) || + (strcmp (ptr, ".kdelink") == 0))) { + view->details->desktop_files = g_list_prepend (view->details->desktop_files, + g_strdup (fname)); + } + } +} + +/* Get a description of the application pointed to by a given dentry and path fragment */ +static char* +nautilus_install_service_describe_menu_entry (GnomeDesktopEntry *dentry, + const char *path_prefix, + const char *path_fragment) +{ + char *slash; + char *addition = NULL, *addition_tmp; + char *fragment_tmp; + + char **pieces; + char *so_far; + int i; + char *dir, *file, *menu; + GnomeDesktopEntry *dir_dentry; + + fragment_tmp = g_strdup (path_fragment); + slash = strrchr (fragment_tmp, G_DIR_SEPARATOR); + if (slash != NULL) { + *slash = '\0'; + } + pieces = g_strsplit (fragment_tmp, "/", 128); /* FIXME "/" -> G_DIR_SEPARATOR */ + g_free (fragment_tmp); + so_far = g_strdup (path_prefix); + + for (i=0; pieces[i] != NULL; i++) { + + dir = g_strconcat (so_far, pieces[i], "/", NULL); + file = g_strconcat (dir, ".directory", NULL); + + g_free (so_far); + so_far = dir; + + dir_dentry = gnome_desktop_entry_load (file); + g_free (file); + + menu = NULL; + if (dir_dentry != NULL) { + menu = dir_dentry->name; + } else { + menu = pieces[i]; + } + + if (addition == NULL) { + addition = g_strdup_printf + (_(" \xB7 %s is in the Gnome menu under %s"), + dentry->name, menu); + } else { + addition_tmp = g_strconcat (addition, " / ", dir_dentry->name, NULL); + g_free (addition); + addition = addition_tmp; + } + + /* menu doesn't need to be freed, because it points into another structure */ + + if (dir_dentry != NULL) { + gnome_desktop_entry_free (dir_dentry); + } + } + g_free (so_far); + g_strfreev (pieces); + + if (addition == NULL) { + addition = g_strdup_printf (_(" \xB7 %s is in the Gnome menu.\n"), dentry->name); + } else { + addition_tmp = g_strconcat (addition, ".\n", NULL); + g_free (addition); + addition = addition_tmp; + } + + return addition; + +} + +/* Get the toplevel menu name for the desktop file installed */ +char * +nautilus_install_service_locate_menu_entries (NautilusServiceInstallView *view) +{ + GList *iterator; + char *result; + + result = g_strdup (""); + + for (iterator = view->details->desktop_files; iterator; iterator = g_list_next (iterator)) { + char *fname = (char*)(iterator->data); + char *addition = NULL; + char *tmp; + GnomeDesktopEntry *dentry = gnome_desktop_entry_load (fname); + + if (dentry->is_kde) { + addition = g_strdup_printf (_(" \xB7 %s is in the KDE menu.\n"), dentry->name); + } else { + /* match desktop files against a set of paths that the panel is known to + * put in the menu. */ + char *desktop_prefixes[] = { + "/gnome/apps/", + "/applnk/" + }; + int num_prefixes = 2; + int i; + + for (i=0; i<num_prefixes; i++) { + char *gnomeapp = desktop_prefixes[i]; + char *apps_ptr = strstr (fname, gnomeapp); + if (apps_ptr) { + char *full_prefix = g_strndup (fname, (apps_ptr)-fname + + strlen (gnomeapp)); + addition = nautilus_install_service_describe_menu_entry + (dentry, full_prefix, apps_ptr+strlen (gnomeapp)); + g_free (full_prefix); + if (addition != NULL) { + break; + } + } + } + } + if (addition) { + tmp = g_strdup_printf ("%s%s", result, addition); + g_free (result); + result = tmp; + g_free (addition); + } + gnome_desktop_entry_free (dentry); + } + return result; +} + +/* signal callback -- ask the user for the root password (for installs) */ +static char * +nautilus_service_need_password (GtkObject *object, const char *prompt, NautilusServiceInstallView *view) +{ + char *message = NULL; + GtkWidget *dialog; + gboolean okay; + char *out; + + if (view->details->remembered_password) { + return g_strdup (view->details->remembered_password); + } + + if (view->details->password_attempts > 0) { + message = g_strdup_printf ("%s\n \n%s", PASSWORD_PROMPT, _("Incorrect password.")); + } else { + message = g_strdup (PASSWORD_PROMPT); + } + + dialog = nautilus_password_dialog_new (_("Authenticate as root"), message, prompt, "", TRUE); + okay = nautilus_password_dialog_run_and_block (NAUTILUS_PASSWORD_DIALOG (dialog)); + + if (! okay) { + /* cancel */ + view->details->password_attempts = 0; + view->details->cancelled = TRUE; + out = g_strdup (""); + } else { + out = nautilus_password_dialog_get_password (NAUTILUS_PASSWORD_DIALOG (dialog)); + if (nautilus_password_dialog_get_remember (NAUTILUS_PASSWORD_DIALOG (dialog))) { + view->details->remembered_password = g_strdup (out); + } + } + + gtk_widget_destroy (dialog); + + if (okay) { + view->details->password_attempts++; + } + + g_free (message); + + return out; +} + +/* bad password -- let em try again? */ +static gboolean +nautilus_service_try_again (GtkObject *object, NautilusServiceInstallView *view) +{ + if (view->details->password_attempts == 0) { + /* user hit "cancel" */ + return FALSE; + } + + /* a wrong password shouldn't be remembered :) */ + g_free (view->details->remembered_password); + view->details->remembered_password = NULL; + + if (view->details->password_attempts >= 3) { + /* give up. */ + view->details->password_attempts = 0; + return FALSE; + } + return TRUE; +} + +static TrilobiteRootClient * +set_root_client (BonoboObjectClient *service, NautilusServiceInstallView *view) +{ + TrilobiteRootClient *root_client = NULL; + CORBA_Environment ev; + + CORBA_exception_init (&ev); + + if (bonobo_object_client_has_interface (service, "IDL:Trilobite/PasswordQuery:1.0", &ev)) { + root_client = trilobite_root_client_new (); + if (! trilobite_root_client_attach (root_client, service)) { + g_warning ("unable to attach root client to Trilobite/PasswordQuery!"); + } + + gtk_signal_connect (GTK_OBJECT (root_client), "need_password", + GTK_SIGNAL_FUNC (nautilus_service_need_password), + view); + gtk_signal_connect (GTK_OBJECT (root_client), "try_again", + GTK_SIGNAL_FUNC (nautilus_service_try_again), + view); + } else { + g_warning ("Object does not support IDL:Trilobite/PasswordQuery:1.0"); + } + + CORBA_exception_free (&ev); + return root_client; +} + +static void +nautilus_service_install_view_update_from_uri_finish (NautilusServiceInstallView *view, const char *uri) +{ + PackageData *pack; + CategoryData *category_data; + char *host; + int port; + GNOME_Trilobite_Eazel_Install service; + CORBA_Environment ev; + char *out, *p; + gboolean set_auth; + + /* get default host/port */ + host = g_strdup (trilobite_get_services_address ()); + p = strchr (host, ':'); + if (p != NULL) { + *p = 0; + port = atoi (p+1); + } else { + port = 80; + } + + set_auth = !(nautilus_install_parse_uri (uri, view, &host, &port, &view->details->username)); + + if (! view->details->categories) { + return; + } + + /* NOTE: This adds a libeazelinstall packagedata object to the view */ + pack = (PackageData*) gtk_object_get_data (GTK_OBJECT (view), "packagedata"); + if (pack != NULL) { + /* Destroy the old */ + gtk_object_unref (GTK_OBJECT (pack)); + } + + /* find the package data for the package we're about to install */ + category_data = (CategoryData *) view->details->categories->data; + pack = (PackageData *) category_data->packages->data; + + gtk_object_set_data (GTK_OBJECT (view), "packagedata", pack); + + if (g_list_length (category_data->packages) > 1) { + out = g_strdup_printf (_("Installing packages")); + } else if ((pack->eazel_id != NULL) || (pack->suite_id != NULL)) { + out = g_strdup_printf (_("Installing remote package")); + } else if (pack->name != NULL) { + out = g_strdup_printf (_("Installing \"%s\""), pack->name); + } else { + out = g_strdup_printf (_("Installing some package")); + } + nautilus_label_set_text (NAUTILUS_LABEL (view->details->package_name), out); + g_free (out); + + CORBA_exception_init (&ev); + if (view->details->installer) { + eazel_install_callback_unref (GTK_OBJECT (view->details->installer)); + } + view->details->installer = eazel_install_callback_new (); + if (view->details->installer == NULL) { + GtkWidget *toplevel, *dialog; + char *message; + + nautilus_view_report_load_complete (view->details->nautilus_view); + gtk_widget_hide (view->details->form); + + message = g_strdup (_("The Eazel install service is missing:\nInstalls will not work.")); + toplevel = gtk_widget_get_toplevel (view->details->message_box); + if (GTK_IS_WINDOW (toplevel)) { + dialog = gnome_error_dialog_parented (message, GTK_WINDOW (toplevel)); + } else { + dialog = gnome_error_dialog (message); + } + gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); + gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + return; + } + + view->details->problem = eazel_install_problem_new (); + view->details->root_client = set_root_client (eazel_install_callback_bonobo (view->details->installer), view); + service = eazel_install_callback_corba_objref (view->details->installer); + GNOME_Trilobite_Eazel_Install__set_protocol (service, GNOME_Trilobite_Eazel_PROTOCOL_HTTP, &ev); + GNOME_Trilobite_Eazel_Install__set_server (service, host, &ev); + GNOME_Trilobite_Eazel_Install__set_server_port (service, port, &ev); + GNOME_Trilobite_Eazel_Install__set_auth (service, set_auth, &ev); + + if (view->details->username != NULL) { + GNOME_Trilobite_Eazel_Install__set_username (service, view->details->username, &ev); + } + GNOME_Trilobite_Eazel_Install__set_test_mode (service, FALSE, &ev); + + gtk_signal_connect (GTK_OBJECT (view->details->installer), "dependency_check", + nautilus_service_install_dependency_check, view); + gtk_signal_connect (GTK_OBJECT (view->details->installer), "file_conflict_check", + GTK_SIGNAL_FUNC (nautilus_service_install_conflict_check), view); + gtk_signal_connect (GTK_OBJECT (view->details->installer), "preflight_check", + GTK_SIGNAL_FUNC (nautilus_service_install_preflight_check), view); + gtk_signal_connect (GTK_OBJECT (view->details->installer), "download_progress", + GTK_SIGNAL_FUNC (nautilus_service_install_download_progress), view); + gtk_signal_connect (GTK_OBJECT (view->details->installer), "download_failed", + GTK_SIGNAL_FUNC (nautilus_service_install_download_failed), view); + gtk_signal_connect (GTK_OBJECT (view->details->installer), "install_progress", + nautilus_service_install_progress, view); + gtk_signal_connect (GTK_OBJECT (view->details->installer), "install_failed", + nautilus_service_install_failed, view); + gtk_signal_connect (GTK_OBJECT (view->details->installer), "done", + nautilus_service_install_done, view); + eazel_install_callback_install_packages (view->details->installer, + view->details->categories, + NULL, &ev); + + CORBA_exception_free (&ev); + + show_overall_feedback (view, _("Contacting the Eazel Software Catalog ...")); + + /* might take a while (leave the throbber on) */ +} + +static void /* AmmonitePromptLoginCb */ +user_login_callback ( + gpointer user_data, + const EazelProxy_User *user, + const EazelProxy_AuthnFailInfo *fail_info, + AmmoniteDialogButton button_pressed) +{ + NautilusServiceInstallView *view; + + view = NAUTILUS_SERVICE_INSTALL_VIEW (user_data); + + /* if the view has been destroyed while the callback was gone, just drop everything */ + if (!GTK_OBJECT_DESTROYED (GTK_OBJECT(view))) { + if (fail_info == NULL) { + /* login succeeded */ + nautilus_service_install_view_update_from_uri_finish (view, view->details->uri); + } else { + if (button_pressed == AMMONITE_BUTTON_REGISTER) { + nautilus_view_open_location_in_this_window ( + view->details->nautilus_view, + EAZEL_ACCOUNT_REGISTER_URI); + } else if (button_pressed == AMMONITE_BUTTON_FORGOT) { + nautilus_view_open_location_in_this_window ( + view->details->nautilus_view, + EAZEL_ACCOUNT_FORGOTPW_URI); + } else { + nautilus_view_open_location_in_this_window ( + view->details->nautilus_view, + NEXT_URL_ANONYMOUS); + } + } + } + + gtk_object_unref (GTK_OBJECT(view)); +} + +static void +nautilus_service_install_view_update_from_uri (NautilusServiceInstallView *view, const char *uri) +{ + char *host; + int port; + + host = NULL; + + nautilus_install_parse_uri (uri, view, &host, &port, &view->details->username); + + if (host == NULL) { + /* Ensure that the user is logged in. Note that the "anonymous" user + * will not be prompted + */ + + gtk_object_ref (GTK_OBJECT(view)); + + show_overall_feedback (view, _("Checking for authorization...")); + + /* Cancel a pending login request, if there was one...*/ + ammonite_prompt_login_async_cancel (user_login_callback); + ammonite_do_prompt_login_async (view->details->username, NULL, NULL, view->details->username == NULL ? TRUE: FALSE, view, user_login_callback); + } else { + nautilus_service_install_view_update_from_uri_finish (view, uri); + } + + g_free (host); + host = NULL; +} + +void +nautilus_service_install_view_load_uri (NautilusServiceInstallView *view, + const char *uri) +{ + /* dispose of any old uri and copy in the new one */ + g_free (view->details->uri); + view->details->uri = g_strdup (uri); + + /* dispose of any old form that was installed */ + if (view->details->form != NULL) { + gtk_widget_destroy (view->details->form); + view->details->form = NULL; + } + if (view->details->message) { + g_list_foreach (view->details->message, (GFunc)install_message_destroy, NULL); + g_list_free (view->details->message); + view->details->message = NULL; + } + if (view->details->desktop_files) { + g_list_foreach (view->details->desktop_files, (GFunc)g_free, NULL); + g_list_free (view->details->desktop_files); + view->details->desktop_files = NULL; + } + + /* clear some variables */ + view->details->already_installed = FALSE; + view->details->cancelled = FALSE; + view->details->failures = 0; + view->details->downloaded_anything = FALSE; + + generate_install_form (view); + + nautilus_view_report_load_underway (NAUTILUS_VIEW (view->details->nautilus_view)); + + nautilus_service_install_view_update_from_uri (view, uri); +} + +static void +service_install_load_location_callback (NautilusView *nautilus_view, + const char *location, + NautilusServiceInstallView *view) +{ + + g_assert (nautilus_view == view->details->nautilus_view); + + nautilus_view_report_load_underway (nautilus_view); + + nautilus_service_install_view_load_uri (view, location); +} + +static void +service_install_stop_loading_callback (NautilusView *nautilus_view, NautilusServiceInstallView *view) +{ + GNOME_Trilobite_Eazel_Install service; + CORBA_Environment ev; + int i; + + view->details->cancelled = TRUE; + view->details->preflight_status = PREFLIGHT_CANCEL; + show_overall_feedback (view, _("Aborting package downloads (please wait) ...")); + /* on a fast download, the GUI could get stuck here, constantly updating the download progress */ + for (i = 0; i < 10; i++) { + if (gtk_events_pending ()) { + gtk_main_iteration (); + } else { + i = 11; + } + } + /* have to set these up here, because if they hit STOP before any downloads have started, the + * call to _stop below will freeze until we get the preflight signal later. + */ + + g_assert (nautilus_view == view->details->nautilus_view); + + CORBA_exception_init (&ev); + service = eazel_install_callback_corba_objref (view->details->installer); + GNOME_Trilobite_Eazel_Install_stop (service, &ev); + CORBA_exception_free (&ev); + + show_overall_feedback (view, _("Package download aborted.")); + current_progress_bar_complete (view, _("Aborted")); +} diff --git a/components/services/install/nautilus-view/nautilus-service-install-view.h b/components/services/install/nautilus-view/nautilus-service-install-view.h new file mode 100644 index 000000000..34cf65731 --- /dev/null +++ b/components/services/install/nautilus-view/nautilus-service-install-view.h @@ -0,0 +1,156 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper + */ + +#ifndef NAUTILUS_SERVICE_INSTALL_VIEW_H +#define NAUTILUS_SERVICE_INSTALL_VIEW_H + +#include <libnautilus/nautilus-view.h> +#include <gtk/gtk.h> +#include <eazel-package-system-types.h> +#include <eazel-install-corba-types.h> +#include <eazel-install-corba-callback.h> +#include <eazel-install-problem.h> +#include "libtrilobite/libtrilobite.h" + +typedef struct _NautilusServiceInstallView NautilusServiceInstallView; +typedef struct _NautilusServiceInstallViewClass NautilusServiceInstallViewClass; + +#define NAUTILUS_TYPE_SERVICE_INSTALL_VIEW (nautilus_service_install_view_get_type ()) +#define NAUTILUS_SERVICE_INSTALL_VIEW(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_SERVICE_INSTALL_VIEW, NautilusServiceInstallView)) +#define NAUTILUS_SERVICE_INSTALL_VIEW_CLASS (klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_SERVICE_INSTALL_VIEW, NautilusServiceInstallViewClass)) +#define NAUTILUS_IS_SERVICE_INSTALL_VIEW(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_SERVICE_INSTALL_VIEW)) +#define NAUTILUS_IS_SERVICE_INSTALL_VIEW_CLASS (klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_SERVICE_INSTALL_VIEW)) + +typedef struct _NautilusServiceInstallViewDetails NautilusServiceInstallViewDetails; + +struct _NautilusServiceInstallView { + GtkEventBox parent; + NautilusServiceInstallViewDetails *details; +}; + +struct _NautilusServiceInstallViewClass { + GtkEventBoxClass parent_class; +}; + +typedef struct { + char *package_name; + GtkWidget *label; + GtkWidget *progress_bar; + GtkWidget *progress_label; + GtkWidget *vbox; /* [ progress_bar, progress_label ] */ + GtkWidget *hbox; /* [ label, padding, vbox ] */ + GtkWidget *line; +} InstallMessage; + +typedef enum { + PREFLIGHT_UNKNOWN = 0, + PREFLIGHT_CANCEL, + PREFLIGHT_OK, + PREFLIGHT_PANIC_BUTTON /* view is being destroyed */ +} InstallViewPreflightStatus; + +/* A NautilusContentView's private information. */ +struct _NautilusServiceInstallViewDetails { + char *uri; + NautilusView *nautilus_view; + GtkWidget *form; + GtkWidget *form_title; + GtkWidget *package_name; + GtkWidget *package_details; + GtkWidget *package_summary; + GtkWidget *package_version; + GtkWidget *total_progress_bar; + GtkWidget *overall_feedback_text; + GtkWidget *message_box; + GtkWidget *current_feedback_text; + InstallMessage *current_im; + GtkWidget *pane; + GtkWidget *middle_title; + GtkWidget *query_box; + + char *current_rpm; + int current_package; + char *remembered_password; + int password_attempts; + guint cylon_timer; + int using_local_file; + gboolean cancelled; + gboolean already_installed; + gboolean downloaded_anything; + int failures; + int last_k; /* used to avoid flickering the KB count so much */ + gboolean cancelled_before_downloads; + unsigned long download_bytes_total; + unsigned long download_bytes_sofar; + char *username; + + EazelInstallCallback *installer; + EazelInstallProblem *problem; + TrilobiteRootClient *root_client; + GList *categories; + + gboolean core_package; + + GList *problem_cases; + GList *desktop_files; + + GList *message; /* GList<InstallMessage *> */ + GHashTable *deps; /* package(char *) => package that needs it(char *) */ + + InstallViewPreflightStatus preflight_status; +}; + + +/* number of rows of (label, progressbar) to scroll at the bottom */ +#define STATUS_ROWS 2 + +#define PROGRESS_BAR_HEIGHT 15 +#define MESSAGE_BOX_HEIGHT 110 + +/* This ensures that if the arch is detected as i[3-9]86, the + requested archtype will be set to i386 */ +#define ASSUME_ix86_IS_i386 + +/* send the user here after a completed (success or failure) install */ +#define NEXT_URL_ANONYMOUS "eazel:" +#define NEXT_URL "eazel-services:/catalog" + + +/* GtkObject support */ +GtkType nautilus_service_install_view_get_type (void); + +/* Component embedding support */ +NautilusView *nautilus_service_install_view_get_nautilus_view (NautilusServiceInstallView *view); + +/* URI handling */ +void nautilus_service_install_view_load_uri (NautilusServiceInstallView *view, + const char *uri); + +/* called during preflight to build up a list of .desktop files to scan later */ +void nautilus_service_install_check_for_desktop_files (NautilusServiceInstallView *view, + EazelInstallCallback *cb, + PackageData *package); + +/* probe for what menu the installed package can be found in */ +char *nautilus_install_service_locate_menu_entries (NautilusServiceInstallView *view); + +#endif /* NAUTILUS_SERVICE_INSTALL_VIEW_H */ diff --git a/components/services/install/nautilus-view/nautilus-service-install.c b/components/services/install/nautilus-view/nautilus-service-install.c new file mode 100644 index 000000000..addeaff69 --- /dev/null +++ b/components/services/install/nautilus-view/nautilus-service-install.c @@ -0,0 +1,229 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: Eskil Heyn Olsen <eskil@eazel.com> + */ + +#include "nautilus-service-install.h" +#include <libeazelinstall.h> + +#define OAF_ID "OAFIID:trilobite_eazel_install_service:8ff6e815-1992-437c-9771-d932db3b4a17" + +static void +xnautilus_service_install_download_failed (EazelInstallCallback *service, + const char *name, + NautilusServiceInstallView *view) +{ + fprintf (stdout, "Download of %s FAILED\n", name); +} + +/* + This dumps the entire tree for the failed package. + */ +static void +xnautilus_service_install_failed_helper (EazelInstallCallback *service, + const PackageData *pd, + gchar *indent, + NautilusServiceInstallView *view) +{ + GList *iterator; + + if (pd->toplevel) { + fprintf (stdout, "\n***The package %s failed. Here's the dep tree\n", pd->name); + } + switch (pd->status) { + case PACKAGE_DEPENDENCY_FAIL: + fprintf (stdout, "%s-%s FAILED\n", indent, rpmfilename_from_packagedata (pd)); + break; + case PACKAGE_CANNOT_OPEN: + fprintf (stdout, "%s-%s NOT FOUND\n", indent, rpmfilename_from_packagedata (pd)); + break; + case PACKAGE_SOURCE_NOT_SUPPORTED: + fprintf (stdout, "%s-%s is a source package\n", indent, rpmfilename_from_packagedata (pd)); + break; + case PACKAGE_BREAKS_DEPENDENCY: + fprintf (stdout, "%s-%s breaks\n", indent, rpmfilename_from_packagedata (pd)); + break; + default: + fprintf (stdout, "%s-%s\n", indent, rpmfilename_from_packagedata (pd)); + break; + } + for (iterator = pd->soft_depends; iterator; iterator = iterator->next) { + PackageData *pack; + char *indent2; + indent2 = g_strconcat (indent, iterator->next ? " |" : " " , NULL); + pack = (PackageData*)iterator->data; + xnautilus_service_install_failed_helper (service, pack, indent2, view); + g_free (indent2); + } + for (iterator = pd->breaks; iterator; iterator = iterator->next) { + PackageData *pack; + char *indent2; + indent2 = g_strconcat (indent, iterator->next ? " |" : " " , NULL); + pack = (PackageData*)iterator->data; + xnautilus_service_install_failed_helper (service, pack, indent2, view); + g_free (indent2); + } +} + +static void +xnautilus_service_install_failed (EazelInstallCallback *service, + const PackageData *pd, + NautilusServiceInstallView *view) +{ + nautilus_service_install_failed_helper (service, pd, "", view); +} + + +static void +xnautilus_service_install_dependency_check (EazelInstallCallback *service, + const PackageData *package, + const PackageData *needs, + NautilusServiceInstallView *view) +{ + g_message ("Doing dependency check for %s - need %s\n", package->name, needs->name); +} + +static void +xnautilus_service_install_done (EazelInstallCallback *service, + gboolean result, + NautilusServiceInstallView *view) +{ + char *tmp; + eazel_install_callback_unref (GTK_OBJECT (service)); + + tmp = g_strdup (view->details->uri); + nautilus_service_install_view_load_uri (view, tmp); + g_free (tmp); +} + +void +xnautilus_service_install_view_install_package_callback (GtkWidget *widget, + NautilusServiceInstallView *view) +{ + GList *packages; + GList *categories; + CORBA_Environment ev; + EazelInstallCallback *cb; + + CORBA_exception_init (&ev); + + packages = NULL; + categories = NULL; + + { + char *ptr; + CategoryData *category; + PackageData *pack; + + /* Find the :// of the url and skip to after it */ + ptr = strstr (view->details->uri, "file://"); + ptr += strlen ("file://"); + + /* make a package and add to it to a categorylist */ + pack = packagedata_new (); + pack->filename = g_strdup (ptr); + + category = categorydata_new (); + category->packages = g_list_prepend (NULL, pack); + categories = g_list_prepend (NULL, category); + } + + /* Check that we're on a redhat system */ + if (!check_for_redhat ()) { + fprintf (stderr, "*** This tool can only be used on RedHat.\n"); + } + + cb = eazel_install_callback_new (); + + Trilobite_Eazel_Install__set_protocol (eazel_install_callback_corba_objref (cb), Trilobite_Eazel_PROTOCOL_HTTP, &ev); + if (!check_for_root_user()) { + fprintf (stderr, "*** This tool requires root access, switching to test mode\n"); + Trilobite_Eazel_Install__set_test_mode (eazel_install_callback_corba_objref (cb), TRUE, &ev); + } else { + Trilobite_Eazel_Install__set_test_mode (eazel_install_callback_corba_objref (cb), FALSE, &ev); + } + Trilobite_Eazel_Install__set_tmp_dir (eazel_install_callback_corba_objref (cb), "/tmp/eazel-install", &ev); + Trilobite_Eazel_Install__set_server (eazel_install_callback_corba_objref (cb), "testmachine.eazel.com", &ev); + Trilobite_Eazel_Install__set_server_port (eazel_install_callback_corba_objref (cb), 80, &ev); + + gtk_signal_connect (GTK_OBJECT (cb), "download_progress", nautilus_service_install_download_progress_signal, view); + gtk_signal_connect (GTK_OBJECT (cb), "install_progress", nautilus_service_install_progress_signal, view); + gtk_signal_connect (GTK_OBJECT (cb), "install_failed", nautilus_service_install_failed, view); + gtk_signal_connect (GTK_OBJECT (cb), "download_failed", nautilus_service_install_download_failed, view); + gtk_signal_connect (GTK_OBJECT (cb), "dependency_check", nautilus_service_install_dependency_check, view); + gtk_signal_connect (GTK_OBJECT (cb), "done", nautilus_service_install_done, view); + + eazel_install_callback_install_packages (cb, categories, NULL, &ev); + + CORBA_exception_free (&ev); +} + +void +xnautilus_service_install_view_uninstall_package_callback (GtkWidget *widget, + NautilusServiceInstallView *view) +{ + GList *packages; + GList *categories; + CORBA_Environment ev; + EazelInstallCallback *cb; + + CORBA_exception_init (&ev); + + packages = NULL; + categories = NULL; + + { + CategoryData *category; + PackageData *pack; + pack = gtk_object_get_data (GTK_OBJECT (view), "packagedata"); + + category = categorydata_new (); + category->packages = g_list_prepend (NULL, pack); + categories = g_list_prepend (NULL, category); + } + + /* Check that we're on a redhat system */ + if (!check_for_redhat ()) { + fprintf (stderr, "*** This tool can only be used on RedHat.\n"); + } + + cb = eazel_install_callback_new (); + + Trilobite_Eazel_Install__set_protocol (eazel_install_callback_corba_objref (cb), Trilobite_Eazel_PROTOCOL_HTTP, &ev); + if (!check_for_root_user ()) { + fprintf (stderr, "*** This tool requires root access, switching to test mode\n"); + Trilobite_Eazel_Install__set_test_mode (eazel_install_callback_corba_objref (cb), TRUE, &ev); + } else { + Trilobite_Eazel_Install__set_test_mode (eazel_install_callback_corba_objref (cb), FALSE, &ev); + } + Trilobite_Eazel_Install__set_tmp_dir (eazel_install_callback_corba_objref (cb), "/tmp/eazel-install", &ev); + Trilobite_Eazel_Install__set_server (eazel_install_callback_corba_objref (cb), "testmachine.eazel.com", &ev); + Trilobite_Eazel_Install__set_server_port (eazel_install_callback_corba_objref (cb), 80, &ev); + + gtk_signal_connect (GTK_OBJECT (cb), "download_progress", nautilus_service_install_download_progress_signal, view); + gtk_signal_connect (GTK_OBJECT (cb), "uninstall_progress", nautilus_service_install_progress_signal, view); + gtk_signal_connect (GTK_OBJECT (cb), "uninstall_failed", nautilus_service_install_failed, view); + gtk_signal_connect (GTK_OBJECT (cb), "dependency_check", nautilus_service_install_dependency_check, view); + gtk_signal_connect (GTK_OBJECT (cb), "done", nautilus_service_install_done, view); + + eazel_install_callback_uninstall_packages (cb, categories, NULL, &ev); + + CORBA_exception_free (&ev); +} diff --git a/components/services/install/nautilus-view/nautilus-service-install.h b/components/services/install/nautilus-view/nautilus-service-install.h new file mode 100644 index 000000000..c284779fb --- /dev/null +++ b/components/services/install/nautilus-view/nautilus-service-install.h @@ -0,0 +1,33 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: Eskil Heyn Olsen <eskil@eazel.com> + */ + +#ifndef NAUTILUS_SERVICE_INSTALL_H +#define NAUTILUS_SERVICE_INSTALL_H + +#include "nautilus-service-install-view.h" + +void nautilus_service_install_view_install_package_callback (GtkWidget *widget, + NautilusServiceInstallView *view); +void nautilus_service_install_view_uninstall_package_callback (GtkWidget *widget, + NautilusServiceInstallView *view); + +#endif /* NAUTILUS_SERVICE_INSTALL_H */ diff --git a/components/services/inventory-view/nautilus-inventory-config-page.h b/components/services/inventory-view/nautilus-inventory-config-page.h new file mode 100644 index 000000000..4bfa9dee9 --- /dev/null +++ b/components/services/inventory-view/nautilus-inventory-config-page.h @@ -0,0 +1,57 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Maciej Stachowiak <mjs@eazel.com> + */ + +/* nautilus-inventory-config-page.h - + */ + +#ifndef NAUTILUS_INVENTORY_CONFIG_PAGE_H +#define NAUTILUS_INVENTORY_CONFIG_PAGE_H + +#include <gtk/gtkvbox.h> +#include <libnautilus/nautilus-view.h> + +#define NAUTILUS_TYPE_INVENTORY_CONFIG_PAGE (nautilus_inventory_config_page_get_type ()) +#define NAUTILUS_INVENTORY_CONFIG_PAGE(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_INVENTORY_CONFIG_PAGE, NautilusInventoryConfigPage)) +#define NAUTILUS_INVENTORY_CONFIG_PAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_INVENTORY_CONFIG_PAGE, NautilusInventoryConfigPageClass)) +#define NAUTILUS_IS_INVENTORY_CONFIG_PAGE(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_INVENTORY_CONFIG_PAGE)) +#define NAUTILUS_IS_INVENTORY_CONFIG_PAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_INVENTORY_CONFIG_PAGE)) + +typedef struct NautilusInventoryConfigPage NautilusInventoryConfigPage; +typedef struct NautilusInventoryConfigPageClass NautilusInventoryConfigPageClass; +typedef struct NautilusInventoryConfigPageDetails NautilusInventoryConfigPageDetails; + +struct NautilusInventoryConfigPage { + GtkVBox base; + NautilusInventoryConfigPageDetails *details; +}; + +struct NautilusInventoryConfigPageClass { + GtkVBoxClass base; +}; + +GtkType nautilus_inventory_config_page_get_type (void); + +GtkWidget *nautilus_inventory_config_page_new (NautilusView *view); + +#endif /* NAUTILUS_INVENTORY_CONFIG_PAGE_H */ + diff --git a/components/services/nautilus-dependent-shared/icons/eazel-cloud-logo.png b/components/services/nautilus-dependent-shared/icons/eazel-cloud-logo.png new file mode 100644 index 000000000..573020ab6 Binary files /dev/null and b/components/services/nautilus-dependent-shared/icons/eazel-cloud-logo.png differ diff --git a/components/services/nautilus-dependent-shared/icons/eazel-services-logo.png b/components/services/nautilus-dependent-shared/icons/eazel-services-logo.png new file mode 100644 index 000000000..f5b1a1efd Binary files /dev/null and b/components/services/nautilus-dependent-shared/icons/eazel-services-logo.png differ diff --git a/components/services/nautilus-dependent-shared/icons/service-summary-logo-top.png b/components/services/nautilus-dependent-shared/icons/service-summary-logo-top.png new file mode 100644 index 000000000..fa391a0cb Binary files /dev/null and b/components/services/nautilus-dependent-shared/icons/service-summary-logo-top.png differ diff --git a/components/services/nautilus-dependent-shared/icons/startup-logo.png b/components/services/nautilus-dependent-shared/icons/startup-logo.png new file mode 100644 index 000000000..ed55c4973 Binary files /dev/null and b/components/services/nautilus-dependent-shared/icons/startup-logo.png differ diff --git a/components/services/nautilus-dependent-shared/shared-service-widgets.c b/components/services/nautilus-dependent-shared/shared-service-widgets.c deleted file mode 100644 index c88adcbd9..000000000 --- a/components/services/nautilus-dependent-shared/shared-service-widgets.c +++ /dev/null @@ -1,212 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ - -/* - * Copyright (C) 2000 Eazel, Inc - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Authors: Ramiro Estrugo <ramiro@eazel.com> - * J Shane Culpepper <pepper@eazel.com> - * - */ - -#include <config.h> - -#include "shared-service-widgets.h" - -#include <libnautilus-extensions/nautilus-background.h> -#include <libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h> -#include <libnautilus-extensions/nautilus-gtk-extensions.h> -#include <libnautilus-extensions/nautilus-gtk-macros.h> -#include <libnautilus-extensions/nautilus-glib-extensions.h> -#include <libnautilus-extensions/nautilus-global-preferences.h> -#include <libnautilus-extensions/nautilus-file-utilities.h> -#include <libnautilus-extensions/nautilus-string.h> -#include <libnautilus-extensions/nautilus-font-factory.h> -#include <libnautilus-extensions/nautilus-gdk-extensions.h> -#include <libnautilus-extensions/nautilus-theme.h> - -#include <stdio.h> - -/* private shared helper routine to create an image widget from a pixbuf */ -static GtkWidget* -create_image_widget_from_pixbuf (GdkPixbuf *icon_pixbuf, - const char *tile_icon_name) -{ - GtkWidget *image_widget; - - g_return_val_if_fail (icon_pixbuf || tile_icon_name, NULL); - - image_widget = nautilus_image_new (); - - if (icon_pixbuf != NULL) { - nautilus_image_set_pixbuf (NAUTILUS_IMAGE (image_widget), icon_pixbuf); - } - - if (tile_icon_name != NULL) { - char *tile_icon_path; - - tile_icon_path = nautilus_pixmap_file (tile_icon_name); - - if (tile_icon_path != NULL) { - GdkPixbuf *tile_icon_pixbuf; - tile_icon_pixbuf = gdk_pixbuf_new_from_file (tile_icon_path); - g_free (tile_icon_path); - - if (tile_icon_pixbuf != NULL) { - nautilus_buffered_widget_set_tile_pixbuf (NAUTILUS_BUFFERED_WIDGET (image_widget), tile_icon_pixbuf); - gdk_pixbuf_unref (tile_icon_pixbuf); - } - else { - g_warning ("Could not find the requested tile_icon: %s", tile_icon_path); - } - } - } - - return image_widget; -} - -/* create and return an image widget using a themed nautilus icon name and a tiled background */ -GtkWidget* -create_image_widget (const char *icon_name, const char *tile_icon_name) -{ - GtkWidget *image_widget; - GdkPixbuf *pixbuf; - - g_return_val_if_fail (icon_name || tile_icon_name, NULL); - - pixbuf = NULL; - if (icon_name != NULL) { - char *icon_path; - - icon_path = nautilus_theme_get_image_path (icon_name); - if (icon_path != NULL) { - pixbuf = gdk_pixbuf_new_from_file (icon_path); - g_free (icon_path); - - if (pixbuf == NULL) { - g_warning ("Could not find the requested icon: %s", icon_path); - } - } - } - - /* create the image widget then release the pixbuf*/ - image_widget = create_image_widget_from_pixbuf (pixbuf, tile_icon_name); - if (pixbuf != NULL) { - gdk_pixbuf_unref (pixbuf); - } - return image_widget; -} - -/* create and return an image widget from a uri and a tiled background. - It also pins the image to the specified dimensions */ - -/* FIXME bugzilla.eazel.com 5138 - * this calls gnome-vfs synchronously for an HTTP uri and thus can block - * the UI indefinitely - */ -GtkWidget* -create_image_widget_from_uri (const char *uri, const char *tile_icon_name, - int max_width, int max_height) -{ - GtkWidget *image_widget; - GdkPixbuf *pixbuf, *scaled_pixbuf; - - g_return_val_if_fail (uri || tile_icon_name, NULL); - - /* as an optimization, it can be a local file. If it doesn't start with http://, - just pass it on to create_image_widget */ - if (!nautilus_istr_has_prefix (uri, "http://")) { - return create_image_widget (uri, tile_icon_name); - } - - /* load the image - synchronously, at least at first */ - pixbuf = nautilus_gdk_pixbuf_load (uri); - - /* pin the image to the specified dimensions if necessary */ - if (pixbuf && max_width > 0 && max_height > 0) { - scaled_pixbuf = nautilus_gdk_pixbuf_scale_down_to_fit (pixbuf, max_width, max_height); - gdk_pixbuf_unref (pixbuf); - pixbuf = scaled_pixbuf; - } - - /* create the image widget then release the pixbuf*/ - image_widget = create_image_widget_from_pixbuf (pixbuf, tile_icon_name); - if (pixbuf != NULL) { - gdk_pixbuf_unref (pixbuf); - } - - return image_widget; -} - -/* create a label widget with anti-aliased text and a tiled image background */ -GtkWidget* -create_label_widget (const char *text, - guint font_size, - const char *tile_icon_name, - guint xpad, - guint ypad, - gint horizontal_offset, - gint vertical_offset) -{ - GtkWidget *label; - - g_return_val_if_fail (text != NULL, NULL); - g_return_val_if_fail (font_size > 0, NULL); - - label = nautilus_label_new (text); - - nautilus_label_set_font_from_components (NAUTILUS_LABEL (label), "helvetica", "bold", NULL, NULL); - nautilus_label_set_font_size (NAUTILUS_LABEL (label), font_size); - nautilus_label_set_text_color (NAUTILUS_LABEL (label), NAUTILUS_RGB_COLOR_WHITE); - - if (tile_icon_name != NULL) { - char *tile_icon_path; - - tile_icon_path = nautilus_pixmap_file (tile_icon_name); - - if (tile_icon_path != NULL) { - GdkPixbuf *tile_icon_pixbuf; - tile_icon_pixbuf = gdk_pixbuf_new_from_file (tile_icon_path); - g_free (tile_icon_path); - - if (tile_icon_pixbuf != NULL) { - nautilus_buffered_widget_set_tile_pixbuf (NAUTILUS_BUFFERED_WIDGET (label), tile_icon_pixbuf); - gdk_pixbuf_unref (tile_icon_pixbuf); - } - else { - g_warning ("Could not find the requested tile_icon: %s", tile_icon_path); - } - } - } - - gtk_misc_set_padding (GTK_MISC (label), xpad, ypad); - - nautilus_buffered_widget_set_vertical_offset (NAUTILUS_BUFFERED_WIDGET (label), vertical_offset); - nautilus_buffered_widget_set_horizontal_offset (NAUTILUS_BUFFERED_WIDGET (label), horizontal_offset); - - return label; -} - -/* utility routine to show an error message */ -void -show_feedback (GtkWidget *widget, - char *error_message) -{ - nautilus_label_set_text (NAUTILUS_LABEL (widget), error_message); - gtk_widget_show (widget); -} - diff --git a/components/services/summary/lib/.cvsignore b/components/services/summary/lib/.cvsignore new file mode 100644 index 000000000..b34a31478 --- /dev/null +++ b/components/services/summary/lib/.cvsignore @@ -0,0 +1,4 @@ +.deps +Makefile +Makefile.in +libsummary.a diff --git a/components/services/summary/lib/Makefile.am b/components/services/summary/lib/Makefile.am new file mode 100644 index 000000000..e518e26eb --- /dev/null +++ b/components/services/summary/lib/Makefile.am @@ -0,0 +1,21 @@ +NULL = + +INCLUDES = \ + -DPREFIX=\"$(prefix)\" \ + -DG_LOG_DOMAIN=\"trilobite-eazel-summary\" \ + -DSTANDALONE \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(top_srcdir)/components/services/trilobite \ + $(GNOME_CFLAGS) \ + $(GCONF_CFLAGS) \ + $(GHTTP_CFLAGS) \ + $(NULL) + +noinst_LIBRARIES = libsummary.a + +libsummary_a_SOURCES = \ + eazel-summary-shared.h \ + eazel-summary-shared.c \ + $(NULL) + diff --git a/components/services/summary/lib/eazel-summary-shared.c b/components/services/summary/lib/eazel-summary-shared.c new file mode 100644 index 000000000..5a01e85cb --- /dev/null +++ b/components/services/summary/lib/eazel-summary-shared.c @@ -0,0 +1,326 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: J Shane Culpepper <pepper@eazel.com> + */ + +#include <config.h> + +#include "eazel-summary-shared.h" + +#include <libtrilobite/libtrilobite.h> +#include <gnome.h> +#include <glib.h> +#include <gnome-xml/tree.h> +#include <gnome-xml/parser.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +static GList * build_services_glist_from_xml (xmlNodePtr node); +static GList * build_eazel_news_glist_from_xml (xmlNodePtr node); +static GList * build_update_news_glist_from_xml (xmlNodePtr node); +static SummaryData * summary_data_new (void); +static ServicesData * services_data_new (void); +static EazelNewsData * eazel_news_data_new (void); +static UpdateNewsData * update_news_data_new (void); +static ServicesData * parse_a_service (xmlNodePtr node); +static EazelNewsData * parse_a_eazel_news_item (xmlNodePtr node); +static UpdateNewsData * parse_a_update_news_item (xmlNodePtr node); + + +static SummaryData * +summary_data_new () +{ + SummaryData *return_value; + return_value = g_new0 (SummaryData, 1); + + return_value->services_list = NULL; + return_value->eazel_news_list = NULL; + return_value->update_news_list = NULL; + + return return_value; + +} /* end summary_data_new */ + +static ServicesData * +services_data_new () +{ + ServicesData *return_value; + return_value = g_new0 (ServicesData, 1); + + return_value->name = NULL; + return_value->icon = NULL; + return_value->button_label = NULL; + return_value->description_header = NULL; + return_value->description = NULL; + return_value->enabled = TRUE; + + return return_value; + +} /* end services_data_new */ + +static EazelNewsData * +eazel_news_data_new () +{ + EazelNewsData *return_value; + return_value = g_new0 (EazelNewsData, 1); + + return_value->name = NULL; + return_value->icon = NULL; + return_value->date = NULL; + return_value->message = NULL; + + return return_value; + +} /* end eazel_news_data_new */ + +static UpdateNewsData * +update_news_data_new () +{ + UpdateNewsData *return_value; + return_value = g_new0 (UpdateNewsData, 1); + + return_value->name = NULL; + return_value->version = NULL; + return_value->priority = NULL; + return_value->description = NULL; + return_value->icon = NULL; + return_value->button_label = NULL; + return_value->uri = NULL; + return_value->softcat_uri = NULL; + + return return_value; + +} /* end update_news_data_new */ + +static ServicesData * +parse_a_service (xmlNodePtr node) +{ + ServicesData *return_value; + char *tempbuf; + + return_value = services_data_new (); + + return_value->name = g_strdup (trilobite_xml_get_string (node, "NAME")); + return_value->icon = g_strdup (trilobite_xml_get_string (node, "ICON")); + return_value->button_label = g_strdup (trilobite_xml_get_string (node, "BUTTON_LABEL")); + return_value->uri = g_strdup (trilobite_xml_get_string (node, "URI")); + return_value->description_header = g_strdup (trilobite_xml_get_string (node, "DESCRIPTION_HEADER")); + return_value->description = g_strdup (trilobite_xml_get_string (node, "DESCRIPTION")); + tempbuf = g_strdup (trilobite_xml_get_string (node, "ENABLED")); + if (tempbuf[0] == 'T' || tempbuf[0] == 't') { + return_value->enabled = TRUE; + } + else if (tempbuf[0] == 'F' || tempbuf[0] == 'f') { + return_value->enabled = FALSE; + } + else { + g_warning (_("Could not find a valid boolean value for grey_out!")); + return_value->enabled = FALSE; + } + + return return_value; + +} /* end parse_a_service */ + +static EazelNewsData * +parse_a_eazel_news_item (xmlNodePtr node) +{ + EazelNewsData *return_value; + return_value = eazel_news_data_new (); + + return_value->name = g_strdup (trilobite_xml_get_string (node, "NAME")); + return_value->icon = g_strdup (trilobite_xml_get_string (node, "ICON")); + return_value->date = g_strdup (trilobite_xml_get_string (node, "DATE")); + return_value->message = g_strdup (trilobite_xml_get_string (node, "MESSAGE")); + + return return_value; + +} /* end parse_a_eazel_news_item */ + +static UpdateNewsData * +parse_a_update_news_item (xmlNodePtr node) +{ + UpdateNewsData *return_value; + return_value = update_news_data_new (); + + return_value->name = g_strdup (trilobite_xml_get_string (node, "NAME")); + return_value->version = g_strdup (trilobite_xml_get_string (node, "VERSION")); + return_value->priority = g_strdup (trilobite_xml_get_string (node, "PRIORITY")); + return_value->description = g_strdup (trilobite_xml_get_string (node, "DESCRIPTION")); + return_value->icon = g_strdup (trilobite_xml_get_string (node, "ICON")); + return_value->button_label = g_strdup (trilobite_xml_get_string (node, "BUTTON_LABEL")); + return_value->uri = g_strdup (trilobite_xml_get_string (node, "URI")); + return_value->softcat_uri = g_strdup (trilobite_xml_get_string (node, "SOFTCAT_URI")); + + return return_value; + +} /* end parse_a_update_news_item */ + +static GList * +build_services_glist_from_xml (xmlNodePtr node) +{ + GList *return_value; + xmlNodePtr service; + + return_value = NULL; + service = node->xmlChildrenNode; + if (service == NULL) { + g_warning (_("There is no service data !\n")); + return NULL; + } + + while (service) { + ServicesData *sdata; + + sdata = parse_a_service (service); + return_value = g_list_append (return_value, sdata); + service = service->next; + } + + return return_value; + +} /* end build_services_glist_from_xml */ + +static GList * +build_eazel_news_glist_from_xml (xmlNodePtr node) +{ + GList *return_value; + xmlNodePtr news_item; + + return_value = NULL; + news_item = node->xmlChildrenNode; + if (news_item == NULL) { + g_warning (_("There is no eazel news data !\n")); + return NULL; + } + + while (news_item) { + EazelNewsData *ndata; + + ndata = parse_a_eazel_news_item (news_item); + return_value = g_list_append (return_value, ndata); + news_item = news_item->next; + } + + return return_value; + +} /* end build_eazel_news_glist_from_xml */ + +static GList * +build_update_news_glist_from_xml (xmlNodePtr node) +{ + GList *return_value; + xmlNodePtr news_item; + + return_value = NULL; + news_item = node->xmlChildrenNode; + if (news_item == NULL) { + g_warning (_("There is no eazel news data !\n")); + return NULL; + } + + while (news_item) { + UpdateNewsData *ndata; + + ndata = parse_a_update_news_item (news_item); + return_value = g_list_append (return_value, ndata); + news_item = news_item->next; + } + + return return_value; + +} /* end build_update_news_glist_from_xml */ + + +SummaryData * +parse_summary_xml_file (const char *url) +{ + + SummaryData *return_value; + char *body; + int length; + xmlDocPtr doc; + xmlNodePtr base; + xmlNodePtr child; + + /* fetch remote config file into memory */ + if (! trilobite_fetch_uri (url, &body, &length)) { + g_assert (_("Could not fetch summary configuration !")); + return NULL; + } + + /* <rant> libxml will have a temper tantrum if there is whitespace before the + * * first tag. so we must babysit it. + * */ + while ((length > 0) && (*body <= ' ')) { + body++, length--; + } + + doc = xmlParseMemory (body, length); + if (doc == NULL) { + g_warning ("Invalid data in summary configuration: %s", body); + return NULL; + } + + return_value = summary_data_new (); + + base = doc->root; + + if (base == NULL) { + xmlFreeDoc (doc); + g_warning (_("The summary configuration contains no data!\n")); + return NULL; + } + + if (g_strcasecmp (base->name, "SUMMARY_DATA")) { + g_print (_("Cannot find the SUMMARY_DATA xmlnode!\n")); + xmlFreeDoc (doc); + g_warning (_("Bailing from the SUMMARY_DATA parse!\n")); + return NULL; + } + + child = doc->root->xmlChildrenNode; + + if (child == NULL) { + g_print (_("Could not find any summary configuration data!\n")); + xmlFreeDoc (doc); + g_warning (_("Bailing from summary configuration parse!\n")); + return NULL; + } + + while (child) { + if (g_strcasecmp (child->name, "SERVICES") == 0) { + return_value->services_list = build_services_glist_from_xml (child); + } + if (g_strcasecmp (child->name, "EAZEL_NEWS") == 0) { + return_value->eazel_news_list = build_eazel_news_glist_from_xml (child); + } + if (g_strcasecmp (child->name, "UPDATE_NEWS") == 0) { + return_value->update_news_list = build_update_news_glist_from_xml (child); + } + child = child->next; + } + + return return_value; + +} /* parse_summary_xml_file */ + diff --git a/components/services/summary/lib/eazel-summary-shared.h b/components/services/summary/lib/eazel-summary-shared.h new file mode 100644 index 000000000..8b70a1ad3 --- /dev/null +++ b/components/services/summary/lib/eazel-summary-shared.h @@ -0,0 +1,70 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper + */ + +#ifndef EAZEL_SUMMARY_SHARED_H +#define EAZEL_SUAMMRY_SHARED_H + +#include <libnautilus/nautilus-view.h> +#include <gtk/gtk.h> + +typedef struct _ServicesData ServicesData; +typedef struct _EazelNewsData EazelNewsData; +typedef struct _UpdateNewsData UpdateNewsData; +typedef struct _SummaryData SummaryData; + +struct _ServicesData { + char *name; + char *icon; + char *button_label; + char *uri; + char *description_header; + char *description; + gboolean enabled; +}; + +struct _EazelNewsData { + char *name; + char *icon; + char *date; + char *message; +}; + +struct _UpdateNewsData { + char *name; + char *version; + char *priority; + char *description; + char *icon; + char *button_label; + char *uri; + char *softcat_uri; +}; + +struct _SummaryData { + GList *services_list; + GList *eazel_news_list; + GList *update_news_list; +}; + +SummaryData * parse_summary_xml_file (const char *url); + +#endif /* EAZEL_SUMMARY_SHARED_H */ diff --git a/components/services/summary/nautilus-view/.cvsignore b/components/services/summary/nautilus-view/.cvsignore new file mode 100644 index 000000000..bfcf5f908 --- /dev/null +++ b/components/services/summary/nautilus-view/.cvsignore @@ -0,0 +1,6 @@ +.deps +.libs +Makefile +Makefile.in +nautilus-summary-view +Nautilus_View_services-summary.oaf diff --git a/components/services/summary/nautilus-view/Makefile.am b/components/services/summary/nautilus-view/Makefile.am new file mode 100644 index 000000000..851475050 --- /dev/null +++ b/components/services/summary/nautilus-view/Makefile.am @@ -0,0 +1,64 @@ +include $(top_srcdir)/Makefile.shared + +SUBDIRS = icons + +INCLUDES = \ + -DPREFIX=\"$(prefix)\" \ + -DG_LOG_DOMAIN=\"trilobite-eazel-summary\" \ + -DDATADIR=\"$(datadir)\" \ + -I$(top_srcdir) \ + -I$(top_srcdir)/components/services/nautilus-dependent-shared \ + -I$(top_srcdir)/components/services/trilobite \ + -I$(top_srcdir)/components/services/summary/lib \ + -I$(top_builddir) \ + $(GNOMEUI_CFLAGS) \ + $(GCONF_CFLAGS) \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + $(VFS_CFLAGS) \ + $(NULL) + +uidir = $(datadir)/gnome/ui +ui_DATA = nautilus-summary-view-ui.xml + +bin_PROGRAMS = \ + nautilus-summary-view + +nautilus_summary_view_SOURCES = \ + nautilus-summary-view-private.h \ + nautilus-summary-callbacks.h \ + nautilus-summary-callbacks.c \ + nautilus-summary-menu-items.h \ + nautilus-summary-menu-items.c \ + nautilus-summary-dialogs.h \ + nautilus-summary-dialogs.c \ + nautilus-summary-footer.h \ + nautilus-summary-footer.c \ + nautilus-summary-view.h \ + nautilus-summary-view.c \ + main.c \ + $(NULL) + +nautilus_summary_view_LDADD = \ + $(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \ + $(top_builddir)/components/services/nautilus-dependent-shared/libnautilusdepshared.a \ + $(top_builddir)/components/services/summary/lib/libsummary.a \ + $(top_builddir)/libnautilus/libnautilus.la \ + $(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \ + $(BONOBO_LIBS) \ + $(GNOMEUI_LIBS) \ + $(GCONF_LIBS) \ + $(VFS_LIBS) \ + $(GHTTP_LIBS) \ + $(OAF_LIBS) \ + $(AMMONITE_LIBS) \ + $(NULL) + +oafdir = $(datadir)/oaf +oaf_in_files = \ + Nautilus_View_services-summary.oaf.in \ + $(NULL) +oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) + +@XML_I18N_MERGE_OAF_RULE@ + +EXTRA_DIST = $(oaf_in_files) $(oaf_DATA) $(ui_DATA) diff --git a/components/services/summary/nautilus-view/Nautilus_View_services-summary.oaf.in b/components/services/summary/nautilus-view/Nautilus_View_services-summary.oaf.in new file mode 100644 index 000000000..11d1cb78a --- /dev/null +++ b/components/services/summary/nautilus-view/Nautilus_View_services-summary.oaf.in @@ -0,0 +1,25 @@ +<oaf_info> + +<oaf_server iid="OAFIID:nautilus_summary_view_factory:1b0b1018-e0ca-4f14-8d23-7a134486ab30" type="exe" location="nautilus-summary-view"> + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:GNOME/ObjectFactory:1.0"/> + </oaf_attribute> + <oaf_attribute name="name" type="string" value="Nautilus Service Summary View Factory"/> + <oaf_attribute name="description" type="string" value="Service Summary View Component's Factory"/> +</oaf_server> + +<oaf_server iid="OAFIID:nautilus_summary_view:92811b0e-beb2-49db-858c-19a0dc8517e5" type="factory" location="OAFIID:nautilus_summary_view_factory:1b0b1018-e0ca-4f14-8d23-7a134486ab30"> + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:Bonobo/Unknown:1.0"/> + <item value="IDL:Bonobo/Control:1.0"/> + <item value="IDL:Nautilus/View:1.0"/> + </oaf_attribute> + <oaf_attribute name="name" type="string" value="Nautilus Summary View"/> + <oaf_attribute name="description" type="string" value="Service Summary view component"/> + <oaf_attribute name="bonobo:supported_uri_schemes" type="stringv"> + <item value="eazel"/> + </oaf_attribute> + <oaf_attribute name="nautilus:view_as_name" type="string" value="Summary"/> +</oaf_server> + +</oaf_info> diff --git a/components/services/summary/nautilus-view/icons/.cvsignore b/components/services/summary/nautilus-view/icons/.cvsignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/components/services/summary/nautilus-view/icons/Makefile.am b/components/services/summary/nautilus-view/icons/Makefile.am new file mode 100644 index 000000000..0390c3161 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/Makefile.am @@ -0,0 +1,3 @@ +NULL= + +SUBDIRS = gray_tab_pieces diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/.cvsignore b/components/services/summary/nautilus-view/icons/gray_tab_pieces/.cvsignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/Makefile.am b/components/services/summary/nautilus-view/icons/gray_tab_pieces/Makefile.am new file mode 100644 index 000000000..7ab4d2c21 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/Makefile.am @@ -0,0 +1,22 @@ +NULL= + +graytabdir = $(datadir)/pixmaps/nautilus/gray_tab_pieces + +graytab_DATA = \ + active-fill.png \ + active-inactive-bridge.png \ + active-left-bumper.png \ + active-prelight-bridge.png \ + active-right-bumper.png \ + fill-background.png \ + inactive-active-bridge.png \ + inactive-fill.png \ + inactive-left-bumper.png \ + inactive-right-bumper.png \ + prelight-active-bridge.png \ + prelight-fill.png \ + prelight-left-bumper.png \ + prelight-right-bumper.png \ + $(NULL) + +EXTRA_DIST = $(graytab_DATA) diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-fill.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-fill.png new file mode 100644 index 000000000..ac9eb69e0 Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-fill.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-inactive-bridge.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-inactive-bridge.png new file mode 100644 index 000000000..ff59ce82e Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-inactive-bridge.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-left-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-left-bumper.png new file mode 100644 index 000000000..6415636e1 Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-left-bumper.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-prelight-bridge.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-prelight-bridge.png new file mode 100644 index 000000000..bbc44617a Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-prelight-bridge.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-right-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-right-bumper.png new file mode 100644 index 000000000..2d3243c0d Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-right-bumper.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/fill-background.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/fill-background.png new file mode 100644 index 000000000..b9efe3c36 Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/fill-background.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-active-bridge.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-active-bridge.png new file mode 100644 index 000000000..daf841544 Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-active-bridge.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-fill.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-fill.png new file mode 100644 index 000000000..3922d04a4 Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-fill.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-left-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-left-bumper.png new file mode 100644 index 000000000..5a72fecec Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-left-bumper.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-right-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-right-bumper.png new file mode 100644 index 000000000..561efe6ba Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-right-bumper.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-active-bridge.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-active-bridge.png new file mode 100644 index 000000000..f3d54954c Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-active-bridge.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-fill.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-fill.png new file mode 100644 index 000000000..46a9412c8 Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-fill.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-left-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-left-bumper.png new file mode 100644 index 000000000..7f35cf75c Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-left-bumper.png differ diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-right-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-right-bumper.png new file mode 100644 index 000000000..e87c6bf4a Binary files /dev/null and b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-right-bumper.png differ diff --git a/components/services/summary/nautilus-view/main.c b/components/services/summary/nautilus-view/main.c new file mode 100644 index 000000000..6f6d74da6 --- /dev/null +++ b/components/services/summary/nautilus-view/main.c @@ -0,0 +1,118 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Maciej Stachowiak <mjs@eazel.com> + * J Shane Culpepper <pepper@eazel.com> + */ + +/* main.c - main function and object activation function for services + content view component. */ + +#include <config.h> +#include <gnome.h> +#include <liboaf/liboaf.h> +#include <bonobo.h> +#include "nautilus-summary-view.h" +#include <gconf/gconf.h> +#include <libtrilobite/libammonite.h> +#include <libtrilobite/trilobite-core-messaging.h> + +static int object_count =0; + +static void +summary_object_destroyed (GtkObject *obj) +{ + object_count--; + if (object_count <= 0) { + gtk_main_quit (); + } +} + +static BonoboObject* +summary_make_object (BonoboGenericFactory *factory, + const char *iid, + void *closure) +{ + + NautilusSummaryView* view; + NautilusView* nautilus_view; + + if (strcmp (iid, "OAFIID:nautilus_summary_view:92811b0e-beb2-49db-858c-19a0dc8517e5")) { + return NULL; + } + + view = NAUTILUS_SUMMARY_VIEW (gtk_object_new (NAUTILUS_TYPE_SUMMARY_VIEW, NULL)); + + object_count++; + + nautilus_view = nautilus_summary_view_get_nautilus_view (view); + + gtk_signal_connect (GTK_OBJECT (nautilus_view), "destroy", summary_object_destroyed, NULL); + + printf ("Returning new object %p\n", nautilus_view); + + return BONOBO_OBJECT (nautilus_view); +} + +int +main (int argc, char *argv[]) +{ + + BonoboGenericFactory *factory; + CORBA_ORB orb; + char *registration_id; + +#ifdef ENABLE_NLS /* sadly we need this ifdef because otherwise the following get empty statement warnings */ + bindtextdomain (PACKAGE, GNOMELOCALEDIR); + textdomain (PACKAGE); +#endif + + /* Disable session manager connection */ + gnome_client_disable_master_connection (); + + gnomelib_register_popt_table (oaf_popt_options, oaf_get_popt_table_name ()); + orb = oaf_init (argc, argv); + + gnome_init ("nautilus-summary-view", VERSION, + argc, argv); + + gdk_rgb_init (); + + bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL); + + gconf_init (argc, argv, NULL); + + ammonite_init (bonobo_poa()); + + trilobite_set_log_handler (NULL, G_LOG_DOMAIN); + + registration_id = oaf_make_registration_id ("OAFIID:nautilus_summary_view_factory:1b0b1018-e0ca-4f14-8d23-7a134486ab30", getenv ("DISPLAY")); + + factory = bonobo_generic_factory_new_multi (registration_id, + summary_make_object, + NULL); + + g_free (registration_id); + + do { + bonobo_main (); + } while (object_count > 0); + + return 0; +} diff --git a/components/services/summary/nautilus-view/nautilus-summary-callbacks.c b/components/services/summary/nautilus-view/nautilus-summary-callbacks.c new file mode 100644 index 000000000..5ef9e42d3 --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-callbacks.c @@ -0,0 +1,321 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: J Shane Culpepper <pepper@eazel.com> + */ + +#include <config.h> + +#include <libgnomeui/gnome-stock.h> +#include <stdio.h> +#include <unistd.h> + +#include <orb/orbit.h> +#include <liboaf/liboaf.h> +#include <bonobo/bonobo-main.h> + +#include <libnautilus-extensions/nautilus-caption-table.h> +#include <libtrilobite/eazelproxy.h> +#include <libtrilobite/libammonite.h> +#include <libtrilobite/trilobite-redirect.h> + +#include "nautilus-summary-view.h" +#include "eazel-summary-shared.h" +#include "nautilus-summary-dialogs.h" +#include "nautilus-summary-menu-items.h" +#include "nautilus-summary-callbacks.h" +#include "nautilus-summary-view-private.h" + +#define notDEBUG_PEPPER 1 + +static void authn_cb_succeeded (const EazelProxy_User *user, + gpointer state, + CORBA_Environment *ev); +static void authn_cb_failed (const EazelProxy_User *user, + const EazelProxy_AuthnFailInfo *info, + gpointer state, + CORBA_Environment *ev); + + +/* Be careful not to invoke another HTTP request; this call is + * invoked from a two-way CORBA call from ammonite + */ +static void +authn_cb_succeeded (const EazelProxy_User *user, gpointer state, CORBA_Environment *ev) +{ + NautilusSummaryView *view; + gint timeout; + + view = NAUTILUS_SUMMARY_VIEW (state); + + g_assert (Pending_Login == view->details->pending_operation); + + view->details->pending_operation = Pending_None; + + timeout = gtk_timeout_add (0, logged_in_callback, view); + + bonobo_object_unref (BONOBO_OBJECT (view->details->nautilus_view)); +} + +/* Be careful not to invoke another HTTP request; this call is + * invoked from a two-way CORBA call from ammonite + */ +static void +authn_cb_failed (const EazelProxy_User *user, const EazelProxy_AuthnFailInfo *info, gpointer state, CORBA_Environment *ev) +{ + NautilusSummaryView *view; + + view = NAUTILUS_SUMMARY_VIEW (state); + + g_assert (Pending_Login == view->details->pending_operation); + + view->details->pending_operation = Pending_None; + + view->details->logged_in = FALSE; + + update_menu_items (view, FALSE); + + if (info && ( info->code == EAZELPROXY_AUTHN_FAIL_NETWORK + || info->code == EAZELPROXY_AUTHN_FAIL_SERVER)) { + nautilus_summary_login_failure_dialog (view, _("I'm sorry, network problems are preventing you from connecting to Eazel Services.")); + view->details->attempt_number = 0; + view->details->current_attempt = initial; + } else if (info && ( info->code == EAZELPROXY_AUTHN_FAIL_USER_NOT_ACTIVATED)) { + /* FIXME we really should use the services alert icon here, eh? */ + nautilus_summary_login_failure_dialog (view, _("Your Eazel Services account has not yet been activated. " + "You can't log into Eazel Services until you activate your account.\n\n" + "Please check your email for activation instructions.")); + view->details->attempt_number = 0; + view->details->current_attempt = initial; + } else if (info && ( info->code == EAZELPROXY_AUTHN_FAIL_USER_DISABLED)) { + /* FIXME we really should use the services alert icon here, eh? */ + nautilus_summary_login_failure_dialog (view, _("Your Eazel Service User Account has been temporarily disabled.\n\n" + "Please try again in a few minutes, or contact Eazel support if this problem continues.")); + view->details->attempt_number = 0; + view->details->current_attempt = initial; + } else { + /* Most likely error: bad username or password */ + + view->details->attempt_number++; + + /* FIXME it would be best to display an error dialog + * explaining the problem and offering at least an "I forgot + * my password" button (and possibly a "Register" button as well) + * In any vase, the dialog that's here is insufficient + */ + +#if 0 + if (view->details->attempt_number > 0 && view->details->attempt_number < 5) { +#endif + view->details->current_attempt = retry; + generate_login_dialog (view); +#if 0 + } else { + nautilus_summary_login_failure_dialog (view, _("We're sorry, but your name and password are still not recognized.")); + view->details->attempt_number = 0; + view->details->current_attempt = initial; + } +#endif + } + + bonobo_object_unref (BONOBO_OBJECT (view->details->nautilus_view)); +} + +/* callback to handle the login button. Right now only does a simple redirect. */ +void +login_button_cb (GtkWidget *button, NautilusSummaryView *view) +{ + char *user_name; + char *password; + EazelProxy_AuthnInfo *authinfo; + CORBA_Environment ev; + + AmmoniteAuthCallbackWrapperFuncs cb_funcs = { + authn_cb_succeeded, authn_cb_failed + }; + + CORBA_exception_init (&ev); + + g_assert (Pending_None == view->details->pending_operation); + + /* FIXME this doesn't actually handle the case when user_control is NIL + * very well. No callback is generated, so no user feedback is generated + * and the summary view is left in an illegal state + */ + + if (CORBA_OBJECT_NIL != view->details->user_control) { + view->details->authn_callback = ammonite_auth_callback_wrapper_new (bonobo_poa(), &cb_funcs, view); + + user_name = nautilus_caption_table_get_entry_text (NAUTILUS_CAPTION_TABLE (view->details->caption_table), 0); + password = nautilus_caption_table_get_entry_text (NAUTILUS_CAPTION_TABLE (view->details->caption_table), 1); + + authinfo = EazelProxy_AuthnInfo__alloc (); + authinfo->username = CORBA_string_dup (user_name); + authinfo->password = CORBA_string_dup (password); + user_name = NULL; + password = NULL; + + authinfo->services_redirect_uri = CORBA_string_dup (""); + authinfo->services_login_path = CORBA_string_dup (""); + + /* Ref myself until the callback returns */ + bonobo_object_ref (BONOBO_OBJECT (view->details->nautilus_view)); + + view->details->pending_operation = Pending_Login; + + EazelProxy_UserControl_authenticate_user ( + view->details->user_control, + authinfo, TRUE, + view->details->authn_callback, &ev + ); + + if (CORBA_NO_EXCEPTION != ev._major) { + g_warning ("Exception during EazelProxy login"); + /* FIXME bugzilla.eazel.com 2745: cleanup after fail here */ + } + + + } + + CORBA_exception_free (&ev); +} + +/* callback to handle the logout button. Right now only does a simple redirect. */ +void +logout_button_cb (GtkWidget *button, NautilusSummaryView *view) +{ + CORBA_Environment ev; + EazelProxy_UserList *users; + CORBA_unsigned_long i; + gint timeout; + CORBA_exception_init (&ev); + + if (CORBA_OBJECT_NIL != view->details->user_control) { + /* Get list of currently active users */ + + users = EazelProxy_UserControl_get_active_users ( + view->details->user_control, &ev + ); + + if (CORBA_NO_EXCEPTION != ev._major) { + g_message ("Exception while logging out user"); + return; + } + + /* Log out the current default user */ + for (i = 0; i < users->_length ; i++) { + EazelProxy_User *cur; + + cur = users->_buffer + i; + + if (cur->is_default) { + g_message ("Logging out user '%s'", cur->user_name); + EazelProxy_UserControl_logout_user ( + view->details->user_control, + cur->proxy_port, &ev + ); + break; + } + } + + CORBA_free (users); + } + + timeout = gtk_timeout_add (0, logged_out_callback, view); + + CORBA_exception_free (&ev); +} + +gint +logged_in_callback (gpointer raw) +{ + NautilusSummaryView *view; + + view = NAUTILUS_SUMMARY_VIEW (raw); + view->details->logged_in = TRUE; + + update_menu_items (view, TRUE); + nautilus_view_open_location_in_this_window + (view->details->nautilus_view, "eazel:"); + + return (FALSE); +} + + +gint +logged_out_callback (gpointer raw) +{ + NautilusSummaryView *view; + + view = NAUTILUS_SUMMARY_VIEW (raw); + view->details->logged_in = FALSE; + + update_menu_items (view, FALSE); + nautilus_view_open_location_in_this_window + (view->details->nautilus_view, "eazel:"); + + return (FALSE); +} + +/* callback to handle the maintenance button. Right now only does a simple redirect. */ +void +preferences_button_cb (GtkWidget *button, NautilusSummaryView *view) +{ + char *url; + url = NULL; + + url = trilobite_redirect_lookup (PREFERENCES_KEY); + if (!url) { + g_error ("Failed to load Registration url!"); + } + + nautilus_view_open_location_in_this_window + (view->details->nautilus_view, url); + g_free (url); + +} + +/* callback to handle the forgotten password button. */ +void +forgot_password_button_cb (GtkWidget *button, NautilusSummaryView *view) +{ + + nautilus_view_open_location_in_this_window + (view->details->nautilus_view, SUMMARY_CHANGE_PWD_FORM); + +} + +/* callback to handle the register button. Right now only does a simple redirect. */ +void +register_button_cb (GtkWidget *button, NautilusSummaryView *view) +{ + char *url; + url = NULL; + + url = trilobite_redirect_lookup (REGISTER_KEY); + if (!url) { + g_error ("Failed to load Registration url!"); + } + + nautilus_view_open_location_in_this_window + (view->details->nautilus_view, url); + g_free (url); + +} diff --git a/components/services/summary/nautilus-view/nautilus-summary-callbacks.h b/components/services/summary/nautilus-view/nautilus-summary-callbacks.h new file mode 100644 index 000000000..78bace9ef --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-callbacks.h @@ -0,0 +1,40 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper + */ + +#ifndef NAUTILUS_SUMMARY_CALLBACKS_H +#define NAUTILUS_SUMMARY_CALLBACKS_H + +void login_button_cb (GtkWidget *button, + NautilusSummaryView *view); +void preferences_button_cb (GtkWidget *button, + NautilusSummaryView *view); +void logout_button_cb (GtkWidget *button, + NautilusSummaryView *view); +void register_button_cb (GtkWidget *button, + NautilusSummaryView *view); +void forgot_password_button_cb (GtkWidget *button, + NautilusSummaryView *view); +gint logged_in_callback (gpointer raw); +gint logged_out_callback (gpointer raw); + +#endif /* NAUTILUS_SUMMARY_CALLBACKS_H */ + diff --git a/components/services/summary/nautilus-view/nautilus-summary-dialogs.c b/components/services/summary/nautilus-view/nautilus-summary-dialogs.c new file mode 100644 index 000000000..3734432de --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-dialogs.c @@ -0,0 +1,276 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: J Shane Culpepper <pepper@eazel.com> + */ + +#include <config.h> + +#include <libnautilus-extensions/nautilus-caption-table.h> +#include <libnautilus-extensions/nautilus-stock-dialogs.h> +#include <libnautilus-extensions/nautilus-background.h> +#include <libnautilus-extensions/nautilus-string.h> +#include <libnautilus-extensions/nautilus-gnome-extensions.h> +#include <libnautilus-extensions/nautilus-file-utilities.h> +#include <libnautilus-extensions/nautilus-image.h> + +#include <libgnomeui/gnome-stock.h> +#include <stdio.h> +#include <unistd.h> + +#include <orb/orbit.h> +#include <liboaf/liboaf.h> +#include <libtrilobite/trilobite-redirect.h> +#include <libtrilobite/eazelproxy.h> +#include <libtrilobite/libammonite.h> + +#include "nautilus-summary-view.h" +#include "eazel-services-extensions.h" +#include "eazel-summary-shared.h" +#include "eazel-services-extensions.h" +#include "nautilus-summary-callbacks.h" +#include "nautilus-summary-dialogs.h" +#include "nautilus-summary-view-private.h" + +#define notDEBUG_PEPPER 1 + + +static void error_dialog_cancel_cb (GtkWidget *button, + NautilusSummaryView *view); +static GtkWindow *get_window_from_summary_view (NautilusSummaryView *view); +static void set_dialog_parent (NautilusSummaryView *view, + GnomeDialog *dialog); +static void name_or_password_field_activated (GtkWidget *caption_table, + int active_entry, + gpointer user_data); + +void +nautilus_summary_login_failure_dialog (NautilusSummaryView *view, const char *message) +{ + nautilus_show_error_dialog (message, + _("Eazel Service Login Error"), + get_window_from_summary_view (view)); +} + +void +generate_error_dialog (NautilusSummaryView *view, const char *message) +{ + GnomeDialog *dialog; + + dialog = nautilus_show_error_dialog (message, + _("Service Error"), + get_window_from_summary_view (view)); + gtk_signal_connect (GTK_OBJECT (dialog), + "destroy", + error_dialog_cancel_cb, + view); +} + +void +generate_login_dialog (NautilusSummaryView *view) +{ + GnomeDialog *dialog; + GtkWidget *hbox; + GtkWidget *image; + GtkWidget *message; + GtkWidget *caption_hbox; + char *message_text; + char *image_name; + char *button_text; + + dialog = NULL; + image = NULL; + + if (view->details->attempt_number == 0) { + button_text = g_strdup (_("Register Now")); + } else { + button_text = g_strdup (_("Help")); + } + + /* if the dialog is still open, then close it and open a new one */ + if (view->details->login_dialog != NULL) { + gnome_dialog_close (GNOME_DIALOG (view->details->login_dialog)); + view->details->login_dialog = NULL; + } + + dialog = GNOME_DIALOG (gnome_dialog_new (_("Services Login"), button_text, + GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL)); + + /* TODO: replace all reference to dialog in this code with view->details->login_dialog */ + view->details->login_dialog = dialog; + + gtk_signal_connect (GTK_OBJECT (dialog), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroyed), + &view->details->login_dialog); + gtk_container_set_border_width (GTK_CONTAINER (dialog), GNOME_PAD); + gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, FALSE, FALSE); + + view->details->caption_table = nautilus_caption_table_new (LOGIN_DIALOG_ROW_COUNT); + gtk_widget_show (view->details->caption_table); + + nautilus_caption_table_set_row_info (NAUTILUS_CAPTION_TABLE (view->details->caption_table), + LOGIN_DIALOG_NAME_ROW, + _("Username:"), + "", + TRUE, + FALSE); + + nautilus_caption_table_set_row_info (NAUTILUS_CAPTION_TABLE (view->details->caption_table), + LOGIN_DIALOG_PASSWORD_ROW, + _("Password:"), + "", + FALSE, + FALSE); + + switch (view->details->current_attempt) { + case initial: + image_name = "big_services_icon.png"; + message_text = _("Please log in to Eazel services"); + break; + case retry: + image_name = "serv_dialog_alert.png"; + message_text = _("Your user name or password were not correct. Please try again."); + break; + default: + g_assert_not_reached(); + image_name = "big_services_icon.png"; + message_text = _("Please log in to Eazel services"); + break; + } + + image = eazel_services_image_new (image_name, NULL, 0); + nautilus_image_set_background_mode (NAUTILUS_IMAGE (image), NAUTILUS_SMOOTH_BACKGROUND_GTK); + + hbox = gtk_hbox_new (FALSE, 5); + gtk_widget_show (hbox); + + if (image) { + gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); + gtk_widget_show (image); + } + + gtk_box_set_spacing (GTK_BOX (dialog->vbox), 4); + + message = gtk_label_new (message_text); + gtk_label_set_justify (GTK_LABEL (message), GTK_JUSTIFY_LEFT); + gtk_label_set_line_wrap (GTK_LABEL (message), TRUE); + nautilus_gtk_label_make_bold (GTK_LABEL (message)); + gtk_widget_show (message); + + /* right justify the caption table box */ + caption_hbox = gtk_hbox_new (FALSE, 0); + gtk_widget_show (caption_hbox); + gtk_widget_set_usize (view->details->caption_table, 260, -1); + gtk_box_pack_end (GTK_BOX (caption_hbox), view->details->caption_table, FALSE, FALSE, 0); + + gtk_box_pack_start (GTK_BOX (hbox), message, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (dialog->vbox), hbox, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (dialog->vbox), caption_hbox, FALSE, FALSE, 0); + + gtk_container_set_border_width (GTK_CONTAINER (view->details->caption_table), 4); + + gtk_widget_show (dialog->vbox); + + gnome_dialog_set_close (dialog, TRUE); + set_dialog_parent (view, dialog); + + gnome_dialog_set_default (dialog, LOGIN_DIALOG_OK_BUTTON_INDEX); + gtk_signal_connect (GTK_OBJECT (view->details->caption_table), "activate", + name_or_password_field_activated, + nautilus_gnome_dialog_get_button_by_index (dialog, LOGIN_DIALOG_OK_BUTTON_INDEX)); + nautilus_caption_table_entry_grab_focus (NAUTILUS_CAPTION_TABLE (view->details->caption_table), LOGIN_DIALOG_NAME_ROW); + + if (view->details->attempt_number == 0) { + gnome_dialog_button_connect (dialog, LOGIN_DIALOG_REGISTER_BUTTON_INDEX, GTK_SIGNAL_FUNC (register_button_cb), view); + } else { + gnome_dialog_button_connect (dialog, LOGIN_DIALOG_REGISTER_BUTTON_INDEX, GTK_SIGNAL_FUNC (forgot_password_button_cb), view); + } + + gnome_dialog_button_connect (dialog, LOGIN_DIALOG_OK_BUTTON_INDEX, GTK_SIGNAL_FUNC (login_button_cb), view); + + gnome_dialog_set_close (dialog, TRUE); + gtk_widget_show (GTK_WIDGET (dialog)); +} + +void +widget_set_nautilus_background_color (GtkWidget *widget, const char *color) +{ + NautilusBackground *background; + + g_return_if_fail (GTK_IS_WIDGET (widget)); + g_return_if_fail (color != NULL); + + background = nautilus_get_widget_background (widget); + + nautilus_background_reset (background); + nautilus_background_set_color (background, color); + +} + +/* callback to handle cancel error_dialog button. */ +static void +error_dialog_cancel_cb (GtkWidget *button, NautilusSummaryView *view) +{ + char *user_home; + user_home = nautilus_get_user_main_directory (); + nautilus_view_open_location_in_this_window (view->details->nautilus_view, user_home); + g_free (user_home); +} + +static GtkWindow * +get_window_from_summary_view (NautilusSummaryView *view) +{ + GtkWidget *parent_window; + + g_assert (NAUTILUS_IS_SUMMARY_VIEW (view)); + + parent_window = gtk_widget_get_ancestor (GTK_WIDGET (view), GTK_TYPE_WINDOW); + if (parent_window == NULL) { + return NULL; + } + + return GTK_WINDOW (parent_window); +} + +static void +set_dialog_parent (NautilusSummaryView *view, GnomeDialog *dialog) +{ + GtkWindow *parent_window; + + g_assert (NAUTILUS_IS_SUMMARY_VIEW (view)); + g_assert (GNOME_IS_DIALOG (dialog)); + + parent_window = get_window_from_summary_view (view); + if (parent_window != NULL) { + gnome_dialog_set_parent (dialog, parent_window); + } +} + +static void +name_or_password_field_activated (GtkWidget *caption_table, int active_entry, gpointer user_data) +{ + g_assert (NAUTILUS_IS_CAPTION_TABLE (caption_table)); + g_assert (GTK_IS_BUTTON (user_data)); + + /* auto-click "OK" button when password activated (via Enter key) */ + if (active_entry == LOGIN_DIALOG_OK_BUTTON_INDEX) { + nautilus_gtk_button_auto_click (GTK_BUTTON (user_data)); + } +} + diff --git a/components/services/summary/nautilus-view/nautilus-summary-dialogs.h b/components/services/summary/nautilus-view/nautilus-summary-dialogs.h new file mode 100644 index 000000000..a979d5499 --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-dialogs.h @@ -0,0 +1,36 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper + */ + +#ifndef NAUTILUS_SUMMARY_DIALOGS_H +#define NAUTILUS_SUMMARY_DIALOGS_H + +void nautilus_summary_login_failure_dialog (NautilusSummaryView *view, + const char *message); + +void generate_error_dialog (NautilusSummaryView *view, + const char *message); +void generate_login_dialog (NautilusSummaryView *view); +void widget_set_nautilus_background_color (GtkWidget *widget, + const char *color); + +#endif /* NAUTILUS_SUMMARY_DIALOGS_H */ + diff --git a/components/services/summary/nautilus-view/nautilus-summary-footer.c b/components/services/summary/nautilus-view/nautilus-summary-footer.c new file mode 100644 index 000000000..22bbf2fdf --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-footer.c @@ -0,0 +1,111 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: J Shane Culpepper <pepper@eazel.com> + */ + +#include <config.h> + +#include <bonobo/bonobo-control.h> +#include <libgnomevfs/gnome-vfs-utils.h> + +#include <libnautilus-extensions/nautilus-background.h> +#include <libnautilus-extensions/nautilus-bonobo-extensions.h> +#include <libnautilus-extensions/nautilus-caption-table.h> +#include <libnautilus-extensions/nautilus-file-utilities.h> +#include <libnautilus-extensions/nautilus-font-factory.h> +#include <libnautilus-extensions/nautilus-gdk-extensions.h> +#include <libnautilus-extensions/nautilus-glib-extensions.h> +#include <libnautilus-extensions/nautilus-global-preferences.h> +#include <libnautilus-extensions/nautilus-gnome-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-macros.h> +#include <libnautilus-extensions/nautilus-stock-dialogs.h> +#include <libnautilus-extensions/nautilus-string.h> +#include <libnautilus-extensions/nautilus-tabs.h> + +#include <libgnomeui/gnome-stock.h> +#include <stdio.h> +#include <unistd.h> + +#include <orb/orbit.h> +#include <liboaf/liboaf.h> +#include <libtrilobite/trilobite-redirect.h> +#include <libtrilobite/eazelproxy.h> +#include <libtrilobite/libammonite.h> +#include <bonobo/bonobo-main.h> + +#include "nautilus-summary-view.h" +#include "eazel-summary-shared.h" + +#include "eazel-services-footer.h" +#include "eazel-services-header.h" +#include "eazel-services-extensions.h" + +#include "nautilus-summary-callbacks.h" +#include "nautilus-summary-dialogs.h" +#include "nautilus-summary-footer.h" +#include "nautilus-summary-view-private.h" + +#define notDEBUG_TEST 1 +#define notDEBUG_PEPPER 1 + + +void +footer_item_clicked_callback (GtkWidget *widget, int index, gpointer callback_data) +{ + NautilusSummaryView *view; + + g_return_if_fail (NAUTILUS_IS_SUMMARY_VIEW (callback_data)); + g_return_if_fail (index >= FOOTER_REGISTER_OR_PREFERENCES); + g_return_if_fail (index <= FOOTER_PRIVACY_STATEMENT); + + view = NAUTILUS_SUMMARY_VIEW (callback_data); + + switch (index) { + case FOOTER_REGISTER_OR_PREFERENCES: + if (!view->details->logged_in) { + register_button_cb (NULL, view); + } else { + preferences_button_cb (NULL, view); + } + break; + + case FOOTER_LOGIN_OR_LOGOUT: + if (!view->details->logged_in) { + generate_login_dialog (view); + } else { + logout_button_cb (NULL, view); + } + break; + + case FOOTER_TERMS_OF_USER: + nautilus_view_open_location_in_this_window (view->details->nautilus_view, SUMMARY_TERMS_OF_USE_URI); + break; + + case FOOTER_PRIVACY_STATEMENT: + nautilus_view_open_location_in_this_window (view->details->nautilus_view, SUMMARY_PRIVACY_STATEMENT_URI); + break; + + default: + g_assert_not_reached (); + break; + } +} diff --git a/components/services/summary/nautilus-view/nautilus-summary-footer.h b/components/services/summary/nautilus-view/nautilus-summary-footer.h new file mode 100644 index 000000000..6980c14bb --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-footer.h @@ -0,0 +1,31 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper + */ + +#ifndef NAUTILUS_SUMMARY_FOOTER_H +#define NAUTILUS_SUMMARY_FOOTER_H + +void footer_item_clicked_callback (GtkWidget *widget, + int index, + gpointer callback_data); + +#endif /* NAUTILUS_SUMMARY_FOOTER_H */ + diff --git a/components/services/summary/nautilus-view/nautilus-summary-menu-items.c b/components/services/summary/nautilus-view/nautilus-summary-menu-items.c new file mode 100644 index 000000000..4869b458d --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-menu-items.c @@ -0,0 +1,187 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: J Shane Culpepper <pepper@eazel.com> + */ + +#include <config.h> + +#include <gnome-xml/tree.h> +#include <bonobo/bonobo-control.h> +#include <libgnomevfs/gnome-vfs-utils.h> + +#include <libnautilus-extensions/nautilus-background.h> +#include <libnautilus-extensions/nautilus-bonobo-extensions.h> +#include <libnautilus-extensions/nautilus-caption-table.h> +#include <libnautilus-extensions/nautilus-file-utilities.h> +#include <libnautilus-extensions/nautilus-font-factory.h> +#include <libnautilus-extensions/nautilus-gdk-extensions.h> +#include <libnautilus-extensions/nautilus-glib-extensions.h> +#include <libnautilus-extensions/nautilus-global-preferences.h> +#include <libnautilus-extensions/nautilus-gnome-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-macros.h> +#include <libnautilus-extensions/nautilus-stock-dialogs.h> +#include <libnautilus-extensions/nautilus-string.h> +#include <libnautilus-extensions/nautilus-tabs.h> + +#include <libgnomeui/gnome-stock.h> +#include <stdio.h> +#include <unistd.h> + +#include <orb/orbit.h> +#include <liboaf/liboaf.h> +#include <libtrilobite/trilobite-redirect.h> +#include <libtrilobite/eazelproxy.h> +#include <libtrilobite/libammonite.h> +#include <bonobo/bonobo-main.h> + +#include "nautilus-summary-view.h" +#include "eazel-summary-shared.h" + +#include "eazel-services-footer.h" +#include "eazel-services-header.h" +#include "eazel-services-extensions.h" + +#include "nautilus-summary-callbacks.h" +#include "nautilus-summary-dialogs.h" +#include "nautilus-summary-menu-items.h" +#include "nautilus-summary-view-private.h" + +#define notDEBUG_PEPPER 1 + +static void bonobo_register_callback (BonoboUIComponent *ui, + gpointer user_data, + const char *verb); +static void bonobo_login_callback (BonoboUIComponent *ui, + gpointer user_data, + const char *verb); +static void bonobo_logout_callback (BonoboUIComponent *ui, + gpointer user_data, + const char *verb); +static void bonobo_preferences_callback (BonoboUIComponent *ui, + gpointer user_data, + const char *verb); + + +/* update the visibility of the menu items according to the login state */ +void +update_menu_items (NautilusSummaryView *view, gboolean logged_in) +{ + BonoboUIComponent *ui; + + ui = bonobo_control_get_ui_component + (nautilus_view_get_bonobo_control + (view->details->nautilus_view)); + + nautilus_bonobo_set_hidden (ui, + "/commands/Register", + logged_in); + + nautilus_bonobo_set_hidden (ui, + "/commands/Login", + logged_in); + + nautilus_bonobo_set_hidden (ui, + "/commands/Preferences", + !logged_in); + + nautilus_bonobo_set_hidden (ui, + "/commands/Logout", + !logged_in); +} + +/* this routine is invoked when the view is activated to merge in our menu items */ +void +merge_bonobo_menu_items (BonoboControl *control, gboolean state, gpointer user_data) +{ + NautilusSummaryView *view; + BonoboUIVerb verbs [] = { + BONOBO_UI_VERB ("Register", bonobo_register_callback), + BONOBO_UI_VERB ("Login", bonobo_login_callback), + BONOBO_UI_VERB ("Logout", bonobo_logout_callback), + BONOBO_UI_VERB ("Preferences", bonobo_preferences_callback), + BONOBO_UI_VERB_END + }; + + g_assert (BONOBO_IS_CONTROL (control)); + + view = NAUTILUS_SUMMARY_VIEW (user_data); + + if (state) { + gboolean logged_in; + char * user_name; + + nautilus_view_set_up_ui (view->details->nautilus_view, + DATADIR, + "nautilus-summary-view-ui.xml", + "nautilus-summary-view"); + + bonobo_ui_component_add_verb_list_with_data + (bonobo_control_get_ui_component (control), verbs, view); + + user_name = ammonite_get_default_user_username (); + logged_in = (NULL != user_name); + update_menu_items (view, logged_in); + g_free (user_name); + } + + /* Note that we do nothing if state is FALSE. Nautilus content + * views are never explicitly deactivated + */ +} + +/* here are the callbacks to handle bonobo menu items */ +static void +bonobo_register_callback (BonoboUIComponent *ui, gpointer user_data, const char *verb) +{ + NautilusSummaryView *view; + + view = NAUTILUS_SUMMARY_VIEW (user_data); + register_button_cb (NULL, view); +} + +static void +bonobo_login_callback (BonoboUIComponent *ui, gpointer user_data, const char *verb) +{ + NautilusSummaryView *view; + + view = NAUTILUS_SUMMARY_VIEW (user_data); + generate_login_dialog (view); +} + +static void +bonobo_logout_callback (BonoboUIComponent *ui, gpointer user_data, const char *verb) +{ + NautilusSummaryView *view; + + view = NAUTILUS_SUMMARY_VIEW (user_data); + logout_button_cb (NULL, view); +} + +static void +bonobo_preferences_callback (BonoboUIComponent *ui, gpointer user_data, const char *verb) +{ + NautilusSummaryView *view; + + view = NAUTILUS_SUMMARY_VIEW (user_data); + preferences_button_cb (NULL, view); +} + diff --git a/components/services/summary/nautilus-view/nautilus-summary-menu-items.h b/components/services/summary/nautilus-view/nautilus-summary-menu-items.h new file mode 100644 index 000000000..f3379cf7d --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-menu-items.h @@ -0,0 +1,33 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper + */ + +#ifndef NAUTILUS_SUMMARY_MENU_ITEMS_H +#define NAUTILUS_SUMMARY_MENU_ITEMS_H + +void merge_bonobo_menu_items (BonoboControl *control, + gboolean state, + gpointer user_data); +void update_menu_items (NautilusSummaryView *view, + gboolean logged_in); + +#endif /* NAUTILUS_SUMMARY_MENU_ITEMS_H */ + diff --git a/components/services/summary/nautilus-view/nautilus-summary-view-private.h b/components/services/summary/nautilus-view/nautilus-summary-view-private.h new file mode 100644 index 000000000..2aad3c5b8 --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-view-private.h @@ -0,0 +1,144 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper + */ + +#ifndef NAUTILUS_SUMMARY_VIEW_PRIVATE_H +#define NAUTILUS_SUMMARY_VIEW_PRIVATE_H + +#include <libtrilobite/libammonite.h> + +#include <gnome.h> + +#define DEFAULT_SUMMARY_BACKGROUND_COLOR_SPEC "rgb:FFFF/FFFF/FFFF" +#define DEFAULT_SUMMARY_BACKGROUND_COLOR_RGB NAUTILUS_RGB_COLOR_WHITE +#define DEFAULT_SUMMARY_TEXT_COLOR_RGB NAUTILUS_RGB_COLOR_BLACK + +#define URL_REDIRECT_TABLE_HOME "eazel-services://anonymous/services/urls" +#define URL_REDIRECT_TABLE_HOME_2 "eazel-services:/services/urls" +#define SUMMARY_CONFIG_XML "eazel-services://anonymous/services" +#define SUMMARY_CONFIG_XML_2 "eazel-services:/services" + +#define SUMMARY_TERMS_OF_USE_URI "eazel-services://anonymous/aboutus/terms_of_use" +#define SUMMARY_PRIVACY_STATEMENT_URI "eazel-services://anonymous/aboutus/privacy" +#define SUMMARY_CHANGE_PWD_FORM "eazel-services://anonymous/account/login/lost_pwd_form" + +#define SUMMARY_XML_KEY "eazel_summary_xml" +#define URL_REDIRECT_TABLE "eazel_url_table_xml" +#define REGISTER_KEY "eazel_service_register" +#define PREFERENCES_KEY "eazel_service_account_maintenance" + +#define GOTO_BUTTON_LABEL _("Go There") +#define SOFTCAT_GOTO_BUTTON_LABEL _("More Info") +#define INSTALL_GOTO_BUTTON_LABEL _("Install") + +#define MAX_IMAGE_WIDTH 50 +#define MAX_IMAGE_HEIGHT 50 + +#define FOOTER_REGISTER_OR_PREFERENCES 0 +#define FOOTER_LOGIN_OR_LOGOUT 1 +#define FOOTER_TERMS_OF_USER 2 +#define FOOTER_PRIVACY_STATEMENT 3 + + +enum { + LOGIN_DIALOG_NAME_ROW, + LOGIN_DIALOG_PASSWORD_ROW, + LOGIN_DIALOG_ROW_COUNT +}; + +enum { + LOGIN_DIALOG_REGISTER_BUTTON_INDEX, + LOGIN_DIALOG_OK_BUTTON_INDEX, + LOGIN_DIALOG_CANCEL_BUTTON +}; + +typedef struct _ServicesButtonCallbackData ServicesButtonCallbackData; + +typedef enum { + Pending_None, + Pending_Login, +} SummaryPendingOperationType; + +typedef enum { + initial, + retry, + fail, +} SummaryLoginAttemptType; + + +struct _ServicesButtonCallbackData { + NautilusView *nautilus_view; + char *uri; +}; + +/* A NautilusContentView's private information. */ +struct _NautilusSummaryViewDetails { + char *uri; + NautilusView *nautilus_view; + SummaryData *xml_data; + + /* Parent form and title */ + GtkWidget *form; + GtkWidget *header; + GtkWidget *news_pane; + GtkWidget *news_item_vbox; + GtkWidget *services_list_pane; + GtkWidget *services_list_vbox; + GtkWidget *featured_downloads_pane; + GtkWidget *featured_downloads_vbox; + GtkWidget *footer; + + /* Login State */ + char *user_name; + volatile gboolean logged_in; + GtkWidget *caption_table; + SummaryLoginAttemptType current_attempt; + int attempt_number; + + /* EazelProxy -- for logging in/logging out */ + EazelProxy_UserControl user_control; + SummaryPendingOperationType pending_operation; + EazelProxy_AuthnCallback authn_callback; + + /* Login Frame Widgets */ + GnomeDialog *login_dialog; + GtkWidget *username_label; + GtkWidget *password_label; + GtkWidget *username_entry; + GtkWidget *password_entry; + /* Buttons available if user is not logged in */ + GtkWidget *login_button; + GtkWidget *login_label; + GtkWidget *register_button; + GtkWidget *register_label; + /* Buttons available if user is logged in */ + GtkWidget *preferences_button; + GtkWidget *preferences_label; + GtkWidget *logout_button; + GtkWidget *logout_label; + +}; + + +#endif /* NAUTILUS_SUMMARY_VIEW_PRIVATE_H */ + + + diff --git a/components/services/summary/nautilus-view/nautilus-summary-view-ui.xml b/components/services/summary/nautilus-view/nautilus-summary-view-ui.xml new file mode 100644 index 000000000..6c9e0f5b9 --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-view-ui.xml @@ -0,0 +1,26 @@ +<Root> +<menu> + <placeholder name="Services Placeholder"> + <submenu name="Services"> + <placeholder name="Service Items"> + <menuitem name="Register" + _label="_Register for Eazel Services" + _tip="Go to the Eazel Services Registration Form" + verb="Register"/> + <menuitem name="Login" + _label="_Log in to Eazel Services" + _tip="Show the log-in dialog box" + verb="Login"/> + <menuitem name="Preferences" + _label="Service _Preferences" + _tip="Configure your service preferences" + verb="Preferences"/> + <menuitem name="Logout" + _label="_Log out from Eazel Services" + _tip="Log out from Eazel Services" + verb="Logout"/> + </placeholder> + </submenu> + </placeholder> +</menu> +</Root> diff --git a/components/services/summary/nautilus-view/nautilus-summary-view.c b/components/services/summary/nautilus-view/nautilus-summary-view.c new file mode 100644 index 000000000..1e4d5f560 --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-view.c @@ -0,0 +1,912 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: J Shane Culpepper <pepper@eazel.com> + */ + +#include <config.h> + + +#include "nautilus-summary-view.h" + +#include "eazel-summary-shared.h" +#include "nautilus-summary-view-private.h" + +#include "nautilus-summary-callbacks.h" +#include "nautilus-summary-menu-items.h" +#include "nautilus-summary-dialogs.h" +#include "nautilus-summary-footer.h" + +#include "eazel-services-footer.h" +#include "eazel-services-header.h" +#include "eazel-services-extensions.h" + +#include <libnautilus-extensions/nautilus-background.h> +#include <libnautilus-extensions/nautilus-bonobo-extensions.h> +#include <libnautilus-extensions/nautilus-file-utilities.h> +#include <libnautilus-extensions/nautilus-gdk-extensions.h> +#include <libnautilus-extensions/nautilus-glib-extensions.h> +#include <libnautilus-extensions/nautilus-gnome-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-macros.h> +#include <libnautilus-extensions/nautilus-stock-dialogs.h> +#include <libnautilus-extensions/nautilus-tabs.h> +#include <libnautilus-extensions/nautilus-label.h> +#include <libnautilus-extensions/nautilus-viewport.h> + + +#include <liboaf/liboaf.h> +#include <libtrilobite/trilobite-redirect.h> +#include <libtrilobite/eazelproxy.h> +#include <libtrilobite/libammonite.h> + +#include <bonobo/bonobo-control.h> + +#include <gnome.h> +#include <libgnomeui/gnome-stock.h> +#include <stdio.h> +#include <unistd.h> + +#define notDEBUG_TEST 1 +#define notDEBUG_PEPPER 1 + +#ifdef DEBUG_TEST + #undef URL_REDIRECT_TABLE_HOME + #define URL_REDIRECT_TABLE_HOME "http://localhost/redirects.xml" +#endif + +#define SUMMARY_TEXT_HEADER_SIZE_REL (0) +#define SUMMARY_TEXT_BODY_SIZE_REL (-2) + + + + + +static void nautilus_summary_view_initialize_class (NautilusSummaryViewClass *klass); +static void nautilus_summary_view_initialize (NautilusSummaryView *view); +static void nautilus_summary_view_destroy (GtkObject *object); +static void summary_load_location_callback (NautilusView *nautilus_view, + const char *location, + NautilusSummaryView *view); +static void generate_summary_form (NautilusSummaryView *view); +static GtkWidget *generate_eazel_news_entry_row (NautilusSummaryView *view, + void *data); +static GtkWidget * generate_service_entry_row (NautilusSummaryView *view, + void *data); +static GtkWidget * generate_update_news_entry_row (NautilusSummaryView *view, + void *data); +static void summary_view_button_callback (GtkWidget *button, + ServicesButtonCallbackData *cbdata); + +NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusSummaryView, nautilus_summary_view, GTK_TYPE_EVENT_BOX) + +static const char *footer_online_items[] = +{ + N_("Register"), + N_("Login"), + N_("Terms of Use"), + N_("Privacy Statement") +}; + +static const char *footer_offline_items[] = +{ + N_("Account Preferences"), + N_("Logout"), + N_("Terms of Use"), + N_("Privacy Statement") +}; + +static void +update_header (NautilusSummaryView *view) +{ + char *text; + + if (view->details->logged_in) { + g_free (view->details->user_name); + view->details->user_name = ammonite_get_default_user_username (); + text = g_strdup_printf (_("Welcome, %s!"), view->details->user_name); + eazel_services_header_set_left_text (EAZEL_SERVICES_HEADER (view->details->header), text); + g_free (text); + } else { + eazel_services_header_set_left_text (EAZEL_SERVICES_HEADER (view->details->header), + _("You are not logged in")); + } +} + +static void +create_header (NautilusSummaryView *view) +{ + view->details->header = eazel_services_header_title_new (""); + update_header (view); +} + + +static void +update_footer (NautilusSummaryView *view) +{ + if (view->details->logged_in) { + eazel_services_footer_update (EAZEL_SERVICES_FOOTER (view->details->footer), + footer_offline_items, + NAUTILUS_N_ELEMENTS (footer_offline_items)); + } else { + eazel_services_footer_update (EAZEL_SERVICES_FOOTER (view->details->footer), + footer_online_items, + NAUTILUS_N_ELEMENTS (footer_online_items)); + } +} + +static void +create_footer (NautilusSummaryView *view) +{ + view->details->footer = eazel_services_footer_new (); + + gtk_signal_connect (GTK_OBJECT (view->details->footer), "item_clicked", + GTK_SIGNAL_FUNC (footer_item_clicked_callback), view); + + update_footer (view); +} + + + +/* callback to handle the goto a service button. */ +static void +summary_view_button_callback (GtkWidget *button, + ServicesButtonCallbackData *cbdata) +{ + + nautilus_view_open_location_in_this_window (cbdata->nautilus_view, cbdata->uri); +} + +static GtkWidget * +summary_view_button_new (char *label_text, + NautilusView *view, + char *uri) +{ + GtkWidget *button; + GtkWidget *label; + ServicesButtonCallbackData *cbdata; + + cbdata = g_new0 (ServicesButtonCallbackData, 1); + + button = gtk_button_new (); + /* FIXME: hardcoded width! */ + gtk_widget_set_usize (button, 80, -1); + + label = gtk_label_new (label_text); + gtk_widget_show (label); + gtk_container_add (GTK_CONTAINER (button), label); + + cbdata->nautilus_view = view; + cbdata->uri = uri; + + /* FIXME: g_free won't free all the data */ + gtk_signal_connect_full (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (summary_view_button_callback), NULL, + cbdata, g_free, FALSE, FALSE); + + return button; +} + +static GtkWidget * +summary_view_item_label_new (char *label_text, + int relative_font_size, + gboolean bold) +{ + GtkWidget *label; + + label = eazel_services_label_new (label_text, + 0, 0.5, 0.5, 0, 0, + DEFAULT_SUMMARY_TEXT_COLOR_RGB, + DEFAULT_SUMMARY_BACKGROUND_COLOR_RGB, + NULL, + relative_font_size, + bold); + nautilus_label_set_wrap (NAUTILUS_LABEL (label), TRUE); + nautilus_label_set_justify (NAUTILUS_LABEL (label), GTK_JUSTIFY_LEFT); + gtk_misc_set_alignment (GTK_MISC (label), 0, 0); + nautilus_label_set_adjust_wrap_on_resize (NAUTILUS_LABEL (label), TRUE); + + return label; +} + + +static GtkWidget * +summary_view_item_large_header_label_new (char *label_text) +{ + return summary_view_item_label_new (label_text, + SUMMARY_TEXT_HEADER_SIZE_REL, + TRUE); +} + +static GtkWidget * +summary_view_item_header_label_new (char *label_text) +{ + return summary_view_item_label_new (label_text, + SUMMARY_TEXT_BODY_SIZE_REL, + TRUE); +} + +static GtkWidget * +summary_view_item_body_label_new (char *label_text) +{ + return summary_view_item_label_new (label_text, + SUMMARY_TEXT_BODY_SIZE_REL, + FALSE); +} + +static void +append_hseparator_to_vbox (GtkWidget *vbox) +{ + GtkWidget *separator; + + separator = gtk_hseparator_new (); + gtk_widget_show (separator); + gtk_box_pack_start (GTK_BOX (vbox), + separator, FALSE, FALSE, 8); + +} + + +static GtkWidget * +generate_eazel_news_entry_row (NautilusSummaryView *view, + void *data) +{ + GtkWidget *news_row; + GtkWidget *item_vbox; + GtkWidget *icon_box; + GtkWidget *icon; + GtkWidget *date_label; + GtkWidget *news_item_label; + EazelNewsData *news_node; + + news_node = data; + news_row = gtk_hbox_new (FALSE, 0); + + /* Generate first box with icon */ + icon_box = gtk_vbox_new (FALSE, 2); + gtk_widget_show (icon_box); + gtk_box_pack_start (GTK_BOX (news_row), icon_box, FALSE, FALSE, 3); + + icon = eazel_services_image_new_from_uri (news_node->icon, + NULL, + DEFAULT_SUMMARY_BACKGROUND_COLOR_RGB, + MAX_IMAGE_WIDTH, MAX_IMAGE_HEIGHT); + gtk_widget_show (icon); + gtk_box_pack_start (GTK_BOX (icon_box), icon, 0, 0, 0); + + /* generate second box with bold type date and the actual contents */ + item_vbox = gtk_vbox_new (FALSE, 0); + gtk_widget_show (item_vbox); + gtk_box_pack_start (GTK_BOX (news_row), item_vbox, TRUE, TRUE, 2); + + /* Date */ + date_label = summary_view_item_header_label_new (news_node->date); + gtk_widget_show (date_label); + + gtk_box_pack_start (GTK_BOX (item_vbox), date_label, FALSE, FALSE, 2); + + /* Message */ + news_item_label = summary_view_item_body_label_new (news_node->message); + gtk_widget_show (news_item_label); + gtk_box_pack_start (GTK_BOX (item_vbox), news_item_label, TRUE, TRUE, 2); + + return news_row; +} + + +typedef GtkWidget * (*SummaryViewItemCreateFunction) (NautilusSummaryView *view, + void *data); + +static void +summary_view_update_pane (NautilusSummaryView *view, + GtkWidget *vbox, + GList *data, + SummaryViewItemCreateFunction item_create) +{ + GtkWidget *item; + GList *node; + + /* clear existing news. */ + gtk_container_foreach (GTK_CONTAINER (vbox), + (GtkCallback) gtk_widget_destroy, NULL); + + /* build the eazel news table from the xml file */ + for (node = data; node != NULL; node = node->next) { + item = (*item_create) (view, node->data); + + gtk_widget_show (item); + gtk_box_pack_start (GTK_BOX (vbox), + GTK_WIDGET (item), + FALSE, FALSE, 0); + + if (node->next != NULL) { + append_hseparator_to_vbox (vbox); + } + } +} + +static GtkWidget * +summary_view_create_pane (NautilusSummaryView *view, + GtkWidget **vbox) +{ + GtkWidget *pane; + GtkWidget *viewport; + + pane = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (pane), + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + + viewport = nautilus_viewport_new (NULL, NULL); + widget_set_nautilus_background_color (viewport, DEFAULT_SUMMARY_BACKGROUND_COLOR_SPEC); + + gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE); + gtk_widget_show (viewport); + gtk_container_add (GTK_CONTAINER (pane), viewport); + + /* create the parent update news box and a table to hold the labels and text entries */ + *vbox = gtk_vbox_new (FALSE, 0); + gtk_widget_show (*vbox); + gtk_container_add (GTK_CONTAINER (viewport), *vbox); + + return pane; +} + + +static void +update_news_pane (NautilusSummaryView *view) +{ + summary_view_update_pane (view, + view->details->news_item_vbox, + view->details->xml_data->eazel_news_list, + generate_eazel_news_entry_row); + + /* FIXME: leak */ + g_list_free (view->details->xml_data->eazel_news_list); +} + + +static void +create_news_pane (NautilusSummaryView *view) +{ + view->details->news_pane = summary_view_create_pane + (view, &view->details->news_item_vbox); + update_news_pane (view); +} + + +static GtkWidget * +generate_service_entry_row (NautilusSummaryView *view, + void *data) +{ + GtkWidget *services_row; + GtkWidget *icon_box; + GtkWidget *icon; + GtkWidget *service_name; + GtkWidget *service_description; + GtkWidget *description_vbox; + GtkWidget *button_vbox; + GtkWidget *button_hbox; + GtkWidget *button; + ServicesData *services_node; + + services_node = data; + + services_row = gtk_hbox_new (FALSE, 0); + + /* Generate first box with service icon */ + icon_box = gtk_vbox_new (FALSE, 4); + gtk_box_pack_start (GTK_BOX (services_row), icon_box, FALSE, FALSE, 2); + + gtk_widget_show (icon_box); + + icon = eazel_services_image_new_from_uri (services_node->icon, + NULL, + DEFAULT_SUMMARY_BACKGROUND_COLOR_RGB, + MAX_IMAGE_WIDTH, + MAX_IMAGE_HEIGHT); + gtk_widget_show (icon); + gtk_box_pack_start (GTK_BOX (icon_box), icon, FALSE, FALSE, 0); + + /* insert a few pixels of space here */ + + /* Generate second box with service title and summary */ + description_vbox = gtk_vbox_new (FALSE, 0); + gtk_widget_show (description_vbox); + gtk_box_pack_start (GTK_BOX (services_row), description_vbox, TRUE, TRUE, 0); + + /* Header */ + service_name = summary_view_item_header_label_new (services_node->description_header); + gtk_widget_show (service_name); + gtk_box_pack_start (GTK_BOX (description_vbox), service_name, FALSE, FALSE, 2); + + /* Body */ + service_description = summary_view_item_body_label_new (services_node->description); + gtk_widget_show (service_description); + gtk_box_pack_start (GTK_BOX (description_vbox), service_description, FALSE, FALSE, 2); + + /* Add the redirect button to the third box */ + button_vbox = gtk_vbox_new (TRUE, 0); + gtk_widget_show (button_vbox); + gtk_box_pack_end (GTK_BOX (services_row), button_vbox, FALSE, FALSE, 2); + + button_hbox = gtk_hbox_new (FALSE, 0); + gtk_widget_show (button_hbox); + gtk_box_pack_start (GTK_BOX (button_vbox), button_hbox, FALSE, FALSE, 2); + + button = summary_view_button_new (GOTO_BUTTON_LABEL, + view->details->nautilus_view, + services_node->uri); + gtk_widget_show (button); + gtk_box_pack_end (GTK_BOX (button_hbox), button, FALSE, FALSE, 3); + + /* FIXME: respect enabled field */ + + return services_row; +} + + +static void +update_services_list_pane (NautilusSummaryView *view) +{ + summary_view_update_pane (view, + view->details->services_list_vbox, + view->details->xml_data->services_list, + generate_service_entry_row); + + /* FIXME: leak */ + g_list_free (view->details->xml_data->services_list); +} + +static void +create_services_list_pane (NautilusSummaryView *view) +{ + view->details->services_list_pane = summary_view_create_pane + (view, &view->details->services_list_vbox); + update_services_list_pane (view); +} + + +static GtkWidget * +generate_update_news_entry_row (NautilusSummaryView *view, + void *data) +{ + GtkWidget *update_row; + GtkWidget *icon_box; + GtkWidget *icon; + GtkWidget *description_vbox; + GtkWidget *name_label; + GtkWidget *description_label; + GtkWidget *version_label; + GtkWidget *button_vbox; + GtkWidget *more_info_button_hbox; + GtkWidget *more_info_button; + GtkWidget *install_button_hbox; + GtkWidget *install_button; + char *version_text; + UpdateNewsData *update_node; + + update_node = data; + update_row = gtk_hbox_new (FALSE, 0); + + /* Generate first box with icon */ + icon_box = gtk_vbox_new (FALSE, 4); + gtk_widget_show (icon_box); + gtk_box_pack_start (GTK_BOX (update_row), icon_box, FALSE, FALSE, 0); + + icon = eazel_services_image_new_from_uri (update_node->icon, + NULL, + DEFAULT_SUMMARY_BACKGROUND_COLOR_RGB, + MAX_IMAGE_WIDTH, + MAX_IMAGE_HEIGHT); + + gtk_widget_show (icon); + gtk_box_pack_start (GTK_BOX (icon_box), icon, FALSE, FALSE, 0); + + /* Generate second box with update title, summary, and version */ + description_vbox = gtk_vbox_new (FALSE, 0); + gtk_widget_show (description_vbox); + gtk_box_pack_start (GTK_BOX (update_row), description_vbox, TRUE, TRUE, 0); + + /* Header */ + + name_label = summary_view_item_large_header_label_new (update_node->name); + gtk_widget_show (name_label); + gtk_box_pack_start (GTK_BOX (description_vbox), name_label, FALSE, FALSE, 4); + + /* Body */ + + description_label = summary_view_item_body_label_new (update_node->description); + gtk_widget_show (description_label); + gtk_box_pack_start (GTK_BOX (description_vbox), description_label, FALSE, FALSE, 4); + + /* Version */ + + if (update_node->version != NULL) { + version_text = g_strdup_printf (_("Version: %s"), update_node->version); + } else { + version_text = g_strdup (""); + } + version_label = summary_view_item_header_label_new (version_text); + gtk_widget_show (version_label); + gtk_box_pack_start (GTK_BOX (description_vbox), version_label, FALSE, FALSE, 0); + g_free (version_text); + + /* Add the redirect button and softcat button to the third box */ + button_vbox = gtk_vbox_new (FALSE, 0); + gtk_widget_show (button_vbox); + gtk_box_pack_end (GTK_BOX (update_row), button_vbox, FALSE, FALSE, 0); + + more_info_button_hbox = gtk_hbox_new (TRUE, 0); + gtk_widget_show (more_info_button_hbox); + gtk_box_pack_start (GTK_BOX (button_vbox), more_info_button_hbox, FALSE, FALSE, 4); + + + more_info_button = summary_view_button_new (SOFTCAT_GOTO_BUTTON_LABEL, + view->details->nautilus_view, + update_node->softcat_uri); + gtk_widget_show (more_info_button); + gtk_box_pack_start (GTK_BOX (more_info_button_hbox), more_info_button, FALSE, FALSE, 4); + + + install_button_hbox = gtk_hbox_new (TRUE, 0); + gtk_widget_show (install_button_hbox); + gtk_box_pack_start (GTK_BOX (button_vbox), install_button_hbox, FALSE, FALSE, 4); + + install_button = summary_view_button_new (INSTALL_GOTO_BUTTON_LABEL, + view->details->nautilus_view, + update_node->uri); + gtk_widget_show (install_button); + gtk_box_pack_start (GTK_BOX (install_button_hbox), install_button, FALSE, FALSE, 4); + + return update_row; +} + +static void +update_featured_downloads_pane (NautilusSummaryView *view) +{ + summary_view_update_pane (view, + view->details->featured_downloads_vbox, + view->details->xml_data->update_news_list, + generate_update_news_entry_row); + + /* FIXME: leak */ + g_list_free (view->details->xml_data->update_news_list); +} + + +static void +create_featured_downloads_pane (NautilusSummaryView *view) +{ + view->details->featured_downloads_pane = summary_view_create_pane + (view, &view->details->featured_downloads_vbox); + update_featured_downloads_pane (view); +} + + +static void +generate_summary_form (NautilusSummaryView *view) +{ + GtkWidget *notebook; + GtkWidget *notebook_tabs; + GtkWidget *notebook_vbox; + + if (view->details->form != NULL) { + gtk_container_remove (GTK_CONTAINER (view), view->details->form); + view->details->form = NULL; + } + +#ifdef DEBUG_pepper + g_print ("Start summary view load.\n"); + +#endif + /* allocate the parent box to hold everything */ + view->details->form = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (view), view->details->form); + + /* setup the title */ +#ifdef DEBUG_pepper + g_print ("Start title load.\n"); +#endif + + create_header (view); + + gtk_box_pack_start (GTK_BOX (view->details->form), view->details->header, FALSE, FALSE, 0); + gtk_widget_show (view->details->header); +#ifdef DEBUG_pepper + g_print ("end title load.\n"); +#endif + + +#ifdef DEBUG_pepper + g_print ("start news load.\n"); +#endif + + create_news_pane (view); + gtk_box_pack_start (GTK_BOX (view->details->form), view->details->news_pane, TRUE, TRUE, 0); + gtk_widget_show (view->details->news_pane); + + +#ifdef DEBUG_pepper + g_print ("end news load.\n"); +#endif + + /* add a set of tabs to control the notebook page switching */ +#ifdef DEBUG_pepper + g_print ("start tab load.\n"); +#endif + notebook_tabs = nautilus_tabs_new (); + gtk_widget_show (notebook_tabs); + gtk_box_pack_start (GTK_BOX (view->details->form), notebook_tabs, FALSE, FALSE, 0); + + /* Create the notebook container for services */ + notebook = gtk_notebook_new (); + gtk_widget_show (notebook); + gtk_box_pack_start (GTK_BOX (view->details->form), notebook, TRUE, TRUE, 0); + + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE); + + /* add the tab */ + nautilus_tabs_add_tab (NAUTILUS_TABS (notebook_tabs), _("Services"), 0); +#ifdef DEBUG_pepper + g_print ("end tab load.\n"); +#endif + + /* Create the Services Listing Box */ +#ifdef DEBUG_pepper + g_print ("start services load.\n"); +#endif + create_services_list_pane (view); + gtk_widget_show (view->details->services_list_pane); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), view->details->services_list_pane, NULL); + +#ifdef DEBUG_pepper + g_print ("end services load.\n"); +#endif + + /* Create the notebook container for updates */ +#ifdef DEBUG_pepper + g_print ("start updates load.\n"); +#endif + /* add a set of tabs to control the updates page switching */ + notebook_vbox = gtk_vbox_new (FALSE, 0); + gtk_widget_show (notebook_vbox); + notebook_tabs = nautilus_tabs_new (); + gtk_widget_show (notebook_tabs); + gtk_box_pack_start (GTK_BOX (notebook_vbox), notebook_tabs, FALSE, FALSE, 0); + + notebook = gtk_notebook_new (); + gtk_widget_show (notebook); + gtk_container_add (GTK_CONTAINER (notebook_vbox), notebook); + gtk_box_pack_start (GTK_BOX (view->details->form), notebook_vbox, TRUE, TRUE, 0); + + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE); + + /* add the tab */ + nautilus_tabs_add_tab (NAUTILUS_TABS (notebook_tabs), _("Featured Downloads"), 0); + + /* Create the Update News Frame */ + create_featured_downloads_pane (view); + + gtk_widget_show (view->details->featured_downloads_pane); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), view->details->featured_downloads_pane, NULL); + +#ifdef DEBUG_pepper + g_print ("end updates load.\n"); + + g_print ("start footer load.\n"); +#endif + + create_footer (view); + gtk_widget_show (view->details->footer); + + gtk_box_pack_start (GTK_BOX (view->details->form), + view->details->footer, + FALSE, FALSE, 0); + +#ifdef DEBUG_pepper + g_print ("end footer load.\n"); +#endif + + /* Finally, show the form that hold everything */ + gtk_widget_show (view->details->form); +#ifdef DEBUG_pepper + g_print ("Load summary view end.\n"); +#endif +} + + + +static void +nautilus_summary_view_initialize_class (NautilusSummaryViewClass *klass) +{ + + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + + object_class = GTK_OBJECT_CLASS (klass); + widget_class = GTK_WIDGET_CLASS (klass); + parent_class = gtk_type_class (gtk_event_box_get_type ()); + object_class->destroy = nautilus_summary_view_destroy; + +} + +static void +nautilus_summary_view_initialize (NautilusSummaryView *view) +{ + CORBA_Environment ev; + + CORBA_exception_init (&ev); + + view->details = g_new0 (NautilusSummaryViewDetails, 1); + view->details->nautilus_view = nautilus_view_new (GTK_WIDGET (view)); + gtk_signal_connect (GTK_OBJECT (view->details->nautilus_view), + "load_location", + GTK_SIGNAL_FUNC (summary_load_location_callback), + view); + + view->details->user_control = ammonite_get_user_control (); + + if (CORBA_NO_EXCEPTION != ev._major) { + /* FIXME bugzilla.eazel.com 2740: user should be warned that Ammonite may not be installed */ + g_warning ("Couldn't instantiate eazel-proxy\n"); + view->details->user_control = CORBA_OBJECT_NIL; + } + + /* get notified when we are activated so we can merge in our menu items */ + gtk_signal_connect (GTK_OBJECT (nautilus_view_get_bonobo_control + (view->details->nautilus_view)), + "activate", + merge_bonobo_menu_items, + view); + + gtk_widget_show (GTK_WIDGET (view)); + + CORBA_exception_free (&ev); + +} + +static void +nautilus_summary_view_destroy (GtkObject *object) +{ + + NautilusSummaryView *view; + CORBA_Environment ev; + + CORBA_exception_init (&ev); + + view = NAUTILUS_SUMMARY_VIEW (object); + + if (view->details->uri) { + g_free (view->details->uri); + } + + /* FIXME: what the hell, we can't assert this here */ + g_assert (Pending_None == view->details->pending_operation); + + g_free (view->details); + + NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object)); + + CORBA_exception_free (&ev); + +} + +NautilusView * +nautilus_summary_view_get_nautilus_view (NautilusSummaryView *view) +{ + + return view->details->nautilus_view; + +} + +void +nautilus_summary_view_load_uri (NautilusSummaryView *view, + const char *uri) +{ + char *url; + char *user_name; + gboolean got_url_table; + + url = NULL; + + /* set up some sanity values for error control */ + view->details->attempt_number = 0; + view->details->current_attempt = initial; + + /* dispose of any old uri and copy in the new one */ + g_free (view->details->uri); + view->details->uri = g_strdup (uri); + + /* get xml data and verify network connections */ +#ifdef DEBUG_pepper + g_print ("start load\n"); +#endif + + user_name = ammonite_get_default_user_username (); + view->details->logged_in = (NULL != user_name); + g_free (user_name); + user_name = NULL; + +#ifdef DEBUG_pepper + g_print ("start xml table fetch\n"); +#endif + got_url_table = trilobite_redirect_fetch_table + (view->details->logged_in + ? URL_REDIRECT_TABLE_HOME_2 + : URL_REDIRECT_TABLE_HOME); + + if (!got_url_table) { + /* FIXME bugzilla.eazel.com 3743: + * We should do more to figure out why this failed so we can + * present a much more helpful message. There are several different + * reasons why it might have failed. + */ + generate_error_dialog + (view, _("Unable to connect to Eazel's server. " + "The server might be unavailable right now, " + "or your computer might be configured incorrectly." + "You could try again later.")); + } else { +#ifdef DEBUG_pepper + g_print ("end xml table fetch\n"); + /* fetch and parse the xml file */ + g_print ("start xml config fetch\n"); +#endif + url = trilobite_redirect_lookup (SUMMARY_XML_KEY); + if (!url) { + g_assert ("Failed to get summary xml home !\n"); + } + view->details->xml_data = parse_summary_xml_file (url); + g_free (url); + if (view->details->xml_data == NULL) { + generate_error_dialog + (view, _("Found problem with data on Eazel servers. " + "Please contact support@eazel.com.")); + } else { +#ifdef DEBUG_pepper + g_print ("end xml config fetch\n"); + g_print ("start summary draw\n"); +#endif + generate_summary_form (view); +#ifdef DEBUG_pepper + g_print ("end summary draw\n"); +#endif + if (!view->details->logged_in) { + generate_login_dialog (view); + } + } + } +} + +static void +summary_load_location_callback (NautilusView *nautilus_view, + const char *location, + NautilusSummaryView *view) +{ + g_assert (nautilus_view == view->details->nautilus_view); + + nautilus_view_report_load_underway (nautilus_view); + + nautilus_view_set_title (nautilus_view, "Eazel Services"); + + nautilus_summary_view_load_uri (view, location); + + nautilus_view_report_load_complete (nautilus_view); +} diff --git a/components/services/summary/nautilus-view/nautilus-summary-view.h b/components/services/summary/nautilus-view/nautilus-summary-view.h new file mode 100644 index 000000000..094b92d4d --- /dev/null +++ b/components/services/summary/nautilus-view/nautilus-summary-view.h @@ -0,0 +1,60 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper + */ + +#ifndef NAUTILUS_SUMMARY_VIEW_H +#define NAUTILUS_SUMMARY_VIEW_H + +#include <libnautilus/nautilus-view.h> +#include <gtk/gtk.h> + +typedef struct _NautilusSummaryView NautilusSummaryView; +typedef struct _NautilusSummaryViewClass NautilusSummaryViewClass; + +#define NAUTILUS_TYPE_SUMMARY_VIEW (nautilus_summary_view_get_type ()) +#define NAUTILUS_SUMMARY_VIEW(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_SUMMARY_VIEW, NautilusSummaryView)) +#define NAUTILUS_SUMMARY_VIEW_CLASS (klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_SUMMARY_VIEW, NautilusSummaryViewClass)) +#define NAUTILUS_IS_SUMMARY_VIEW(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_SUMMARY_VIEW)) +#define NAUTILUS_IS_SUMMARY_VIEW_CLASS (klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_SUMMARY_VIEW)) + +typedef struct _NautilusSummaryViewDetails NautilusSummaryViewDetails; + +struct _NautilusSummaryView { + GtkEventBox parent; + NautilusSummaryViewDetails *details; +}; + +struct _NautilusSummaryViewClass { + GtkVBoxClass parent_class; +}; + +/* GtkObject support */ +GtkType nautilus_summary_view_get_type (void); + +/* Component embedding support */ +NautilusView *nautilus_summary_view_get_nautilus_view (NautilusSummaryView *view); + +/* URI handling */ +void nautilus_summary_view_load_uri (NautilusSummaryView *view, + const char *uri); + +#endif /* NAUTILUS_SUMMARY_VIEW_H */ + diff --git a/components/services/summary/nautilus-view/tests/README b/components/services/summary/nautilus-view/tests/README new file mode 100644 index 000000000..b8ff1482f --- /dev/null +++ b/components/services/summary/nautilus-view/tests/README @@ -0,0 +1,7 @@ +To use these tests do the following: +su - root +cp *.xml /home/httpd/html or wherever the root of your webserver lives. +set #define DEBUG_TEST 1 +rebuild the summary view and install. +It will probably fail right now if you don't have access to services.eazel.com +since several of the remote images live there. diff --git a/components/services/summary/nautilus-view/tests/redirects.xml b/components/services/summary/nautilus-view/tests/redirects.xml new file mode 100644 index 000000000..197477d18 --- /dev/null +++ b/components/services/summary/nautilus-view/tests/redirects.xml @@ -0,0 +1,56 @@ +<?xml version="1.0"?> +<location_data> + <location> + <name>eazel_summary_service</name> + <uri>eazel:</uri> + </location> + <location> + <name>eazel_install_service</name> + <uri>eazel-install:</uri> + </location> + <location> + <name>eazel_softcat_service</name> + <uri>eazel-services://anonymous/catalog</uri> + </location> + <location> + <name>eazel_vault_service</name> + <uri>eazel-services:/account/register/form</uri> + </location> + <location> + <name>eazel_service_register</name> + <uri>eazel-services://anonymous/account/register/form</uri> + </location> + <location> + <name>eazel_services_information</name> + <uri>http://services.eazel.com:7001/services/info</uri> + </location> + <location> + <name>eazel_change_password</name> + <uri>eazel-pw:</uri> + </location> + <location> + <name>eazel_summary_xml</name> + <uri>http://localhost/services.xml</uri> + </location> + <location> + <name>eazel_url_table_xml</name> + <uri>http://localhost/redirects.xml</uri> + </location> + <location> + <name>eazel_install_depend_query</name> + <uri>http://services.eazel.com:7001/catalog/find</uri> + </location> + <location> + <name>eazel_service_account_maintenance</name> + <uri>eazel-services:/account/preferences/form</uri> + </location> + <location> + <name>web_search</name> + <uri>http://services.eazel.com:8888/services/websearch</uri> + </location> + <location> + <name>install_help</name> + <uri>http://services.eazel.com:8888/support/nautilus/install</uri> + </location> +</location_data> + diff --git a/components/services/summary/nautilus-view/tests/services.xml b/components/services/summary/nautilus-view/tests/services.xml new file mode 100644 index 000000000..a1689d4bf --- /dev/null +++ b/components/services/summary/nautilus-view/tests/services.xml @@ -0,0 +1,330 @@ +<?xml version="1.0"?> +<SUMMARY_DATA> + <SERVICES> + <SERVICE> + <NAME>eazel_vault_service</NAME> + <ICON>http://services.eazel.com/images/services/vault-service-icon.png</ICON> + <BUTTON_LABEL>Registered users only</BUTTON_LABEL> + <URI>eazel-services://anonymous/account/register/form</URI> + <DESCRIPTION_HEADER>Eazel Online Storage</DESCRIPTION_HEADER> + <DESCRIPTION>A file repository accessible from browsers and integrated with Nautilus.</DESCRIPTION> + <ENABLED>false</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_time_sync_service</NAME> + <ICON>http://services.eazel.com/images/services/time-sync-service-icon.png</ICON> + <BUTTON_LABEL>To time sync!</BUTTON_LABEL> + <URI>eazel:</URI> + <DESCRIPTION_HEADER>The Time Sync Service</DESCRIPTION_HEADER> + <DESCRIPTION>Automatic clock settings so that your time is always right.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_inventory_service</NAME> + <ICON>http://services.eazel.com/images/services/inventory-service-icon.png</ICON> + <BUTTON_LABEL>To client inventory!</BUTTON_LABEL> + <URI>eazel:</URI> + <DESCRIPTION_HEADER>The Inventory Control Service</DESCRIPTION_HEADER> + <DESCRIPTION>Keep your inventory up to date all day every day.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + <SERVICE> + <NAME>eazel_softcat_service</NAME> + <ICON>http://services.eazel.com/images/services/softcat-service-icon.png</ICON> + <BUTTON_LABEL>To software catalog</BUTTON_LABEL> + <URI>http://services.eazel.com:7001/catalog</URI> + <DESCRIPTION_HEADER>The Software Catalog</DESCRIPTION_HEADER> + <DESCRIPTION>Collection of RPMs available for installation using the unique Eazel Software Installer.</DESCRIPTION> + <ENABLED>true</ENABLED> + </SERVICE> + </SERVICES> + <EAZEL_NEWS> + <ITEM> + <NAME>In the news</NAME> + <ICON>services-warning.png</ICON> + <DATE>10/18/00</DATE> + <MESSAGE>There is no news.</MESSAGE> + </ITEM> + </EAZEL_NEWS> + <UPDATE_NEWS> + <UPDATE> + <NAME>Nescape Communicator</NAME> + <PRIORITY>Useless</PRIORITY> + <VERSION>4.77</VERSION> + <DESCRIPTION>Netscape's web browser is god's gift to the world. It will freeze your machine and suck hours of time away from important things. It sort of works but most of the time it won't. Get your copy now!</DESCRIPTION> + <ICON>netscape.png</ICON> + <URI>eazel-install:netscape</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>DeRIAA</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>1.0b</VERSION> + <DESCRIPTION>The latest must-have utility eliminates the RIAA from existence with only minimal configuration required.</DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + <UPDATE> + <NAME>Ed</NAME> + <PRIORITY>Severe</PRIORITY> + <VERSION>0.2-13</VERSION> + <DESCRIPTION>Ed is a line oriented tesxt editor, used to create, display, and modify text files (both interactively and via shell scripts). For most purposes, ed has been replaced in normal usage by full-screen editors (emacs and vi, for example). Ed was the original UNIX editor, and may be used by some programs </DESCRIPTION> + <ICON>http://services.eazel.com/images/softcat/ed.png</ICON> + <URI>eazel-install:DeRIAA</URI> + <SOFTCAT_URI>eazel-services://anonymous/catalog/details?id=14&name=Text+Editors&package_id=1905</SOFTCAT_URI> + <BUTTON_LABEL>More Info!</BUTTON_LABEL> + </UPDATE> + </UPDATE_NEWS> +</SUMMARY_DATA> + diff --git a/components/services/vault/.cvsignore b/components/services/vault/.cvsignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/components/services/vault/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/components/services/vault/Makefile.am b/components/services/vault/Makefile.am new file mode 100644 index 000000000..7d966a946 --- /dev/null +++ b/components/services/vault/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = command-line diff --git a/components/services/vault/command-line/.cvsignore b/components/services/vault/command-line/.cvsignore new file mode 100644 index 000000000..49bfbd656 --- /dev/null +++ b/components/services/vault/command-line/.cvsignore @@ -0,0 +1,5 @@ +.deps +.libs +Makefile +Makefile.in +eazel-vault diff --git a/components/services/vault/command-line/Makefile.am b/components/services/vault/command-line/Makefile.am new file mode 100644 index 000000000..12ffa4804 --- /dev/null +++ b/components/services/vault/command-line/Makefile.am @@ -0,0 +1,34 @@ +NULL = + +INCLUDES = \ + -DPREFIX=\"$(prefix)\" \ + -DG_LOG_DOMAIN=\"trilobite-eazel-vault-service\" \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(top_srcdir)/components/services/trilobite \ + -I$(top_srcdir)/components/services/vault/lib \ + $(GNOMEUI_CFLAGS) \ + $(GCONF_CFLAGS) \ + $(NULL) + +bin_PROGRAMS = \ + eazel-vault + +noinst_HEADERS = \ + vault-operations.h \ + $(NULL) + +eazel_vault_SOURCES = \ + main.c \ + vault-operations.c \ + $(NULL) + +eazel_vault_LDADD = \ + $(BONOBO_LIBS) \ + $(GNOMEUI_LIBS) \ + $(GCONF_LIBS) \ + $(VFS_LIBS) \ + $(OAF_LIBS) \ + $(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \ + $(NULL) + diff --git a/components/services/vault/command-line/main.c b/components/services/vault/command-line/main.c new file mode 100644 index 000000000..eeded1ef3 --- /dev/null +++ b/components/services/vault/command-line/main.c @@ -0,0 +1,129 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: Ian McKellar <yakk@yakk.net.au> + * + */ + +#include <config.h> +#include <glib.h> +#include <popt-gnome.h> +#include <string.h> +#include <stdlib.h> +#include "vault-operations.h" + +#define _(X) X // eek! FIXME bugzilla.eazel.com 2591 + +gchar *vault_location; +gboolean debug = FALSE; +gchar *operation = NULL; + +static const struct poptOption options[] = { + {"debug", 'd', POPT_ARG_NONE, &debug, 0, _("Enable debugging"), NULL}, + {"uri", 'u', POPT_ARG_STRING, &vault_location, 0, _("Vault location"), NULL}, + {NULL, '\0', 0, NULL, 0} /* end the list */ +}; + +static void valid_ops() { + gint vopnum = 0; + struct VaultOperation *vop; + + g_print(_("Valid operations:")); + for(;;) { + vop = &vault_operations[vopnum++]; + if(vop->name == NULL) { + g_print(".\n"); + return; + } + g_print(" %s", vop->name); + } +} + +int main (int argc, char *argv[]) { + poptContext pctx = poptGetContext("eazel-vault", argc, argv, + options, 0); + gint opt; + gint vopnum = 0; + struct VaultOperation *vop; + + vault_location = g_strdup("http://localhost/webdav/"); /* load from gconf */ + + while ( (opt = poptGetNextOpt (pctx)) >= 0) { + switch (opt) { + case 'd': + debug = TRUE; + break; + case 'u': + g_free(vault_location); + vault_location = g_strdup(poptGetArg(pctx)); + } + } + + operation = g_strdup(poptGetArg(pctx)); + +#if 0 + g_print("vault_location = `%s'\n", vault_location); + g_print("debug = `%d'\n", debug); + g_print("operation = `%s'\n", operation); +#endif + + if(operation == NULL) { + g_print(_("Error: No operation supplied\n")); + valid_ops(); + exit(1); + } + + for(;;) { + vop = &vault_operations[vopnum++]; + if(vop->name == NULL) { + g_print(_("Error: Invalid operation supplied (%s)\n"), operation); + valid_ops(); + exit(1); + } + if(!g_strcasecmp(vop->name, operation)) { + /* we've found a matching operation */ + GList *args = NULL; + gint argcount = 0; + gchar *arg; + while((arg = poptGetArg(pctx))) { + argcount++; + args = g_list_append(args, arg); + } + if(argcount <= vop->maxargs && argcount >= vop->minargs) { + GnomeVFSResult result; + gchar *error_context = "eazel-vault"; + + poptFreeContext (pctx); + gnome_vfs_init (); + result = (vop->function)(args, vault_location, debug, &error_context); + if(result != GNOME_VFS_OK) { + g_print("%s: %s\n", error_context, gnome_vfs_result_to_string(result)); + } + return result; + } else { + g_print(_("Error: Invalid syntax\nSyntax: %s\n"), vop->syntax); + exit(1); + } + + } + + } + + return 0; +}; diff --git a/components/services/vault/command-line/vault-operations.c b/components/services/vault/command-line/vault-operations.c new file mode 100644 index 000000000..c9c2b60ce --- /dev/null +++ b/components/services/vault/command-line/vault-operations.c @@ -0,0 +1,251 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: Ian McKellar <yakk@yakk.net.au> + * + */ + +#include <config.h> +#include <string.h> +#include <unistd.h> +#include <glib.h> +#include <string.h> +#include "vault-operations.h" + +static GnomeVFSResult vault_list(GList *args, gchar *uri, gboolean debug, gchar **error_context); +static GnomeVFSResult vault_upload(GList *args, gchar *uri, gboolean debug, gchar **error_context); +static GnomeVFSResult vault_download(GList *args, gchar *uri, gboolean debug, gchar **error_context); +static GnomeVFSResult vault_move(GList *args, gchar *uri, gboolean debug, gchar **error_context); +static GnomeVFSResult vault_delete(GList *args, gchar *uri, gboolean debug, gchar **error_context); + +struct VaultOperation vault_operations[] = { + {"list", "list [<remote path>]", 0, 1, vault_list}, + {"ls", "ls [<remote path>]", 0, 1, vault_list}, + {"upload", "upload <local path> [<remote path>]", 1, 2, vault_upload}, + {"download", "download <remote path> [<local path>]", 1, 2, vault_download}, + {"move", "move <from> <to>", 2, 2, vault_move}, + {"mv", "mv <from> <to>", 2, 2, vault_move}, + {"rename", "rename <from> <to>", 2, 2, vault_move}, + {"delete", "delete <file>", 1, 1, vault_delete}, + {NULL, NULL, 0, 0, NULL} +}; + + +static GnomeVFSResult +vault_list(GList *args, gchar *uri, gboolean debug, gchar **error_context) { + GnomeVFSResult result; + GList *list, *element; + GnomeVFSFileInfo *info; + gchar *text_uri; + + if (args != NULL) { + text_uri = g_strconcat(uri, args->data, NULL); + } else { + text_uri = uri; + } + + result = gnome_vfs_directory_list_load (&list, text_uri, (GNOME_VFS_FILE_INFO_GET_MIME_TYPE | GNOME_VFS_FILE_INFO_FORCE_FAST_MIME_TYPE | GNOME_VFS_FILE_INFO_FOLLOW_LINKS), NULL); + + if (result != GNOME_VFS_OK) { + return result; + } + + for (element = list; element != NULL; element = element->next) { + info = element->data; + g_print ("%s %10d %20s %s\n", + info->type==GNOME_VFS_FILE_TYPE_DIRECTORY ? "Folder" : "File ", + (gint) info->size, + info->mime_type, + info->name); + } + + return GNOME_VFS_OK; +} + + + +static gchar *make_local_uri(gchar *fn, gchar *remote) { + gchar buffer[PATH_MAX+1]; + + g_assert(fn || remote); + + if(fn == NULL && remote != NULL) fn = g_basename(remote); + if(fn[0] != '/') { + getcwd(buffer, PATH_MAX); + fn = g_strconcat(buffer, "/", fn, NULL); + } + + if(fn[strlen(fn)-1] == '/' && remote) + fn = g_strconcat(fn, g_basename(remote), NULL); + + return g_strconcat("file://", fn, NULL); +} + +static gchar *make_remote_uri(gchar *uri, gchar *fn, gchar *local) { + if(fn) + uri = g_strconcat(uri, fn, NULL); + + if(uri[strlen(uri)-1] == '/' && local) + uri = g_strconcat(uri, g_basename(local), NULL); + + return uri; +} + + +static GnomeVFSResult vault_upload(GList *args, gchar *uri, gboolean debug, gchar **error_context) { + GnomeVFSResult result; + GnomeVFSHandle *whandle, *rhandle; + gchar *remote_uri; + gchar *local_uri; + gchar buffer[1025]; + + local_uri = make_local_uri(args->data, NULL); + + args = args->next; + + remote_uri = make_remote_uri(uri, args?args->data:NULL, local_uri); + + g_print("local: %s\n", local_uri); + g_print("remote: %s\n", remote_uri); + + result = gnome_vfs_open (&rhandle, local_uri, GNOME_VFS_OPEN_READ); + if(result != GNOME_VFS_OK) return result; + + result = gnome_vfs_open (&whandle, remote_uri, GNOME_VFS_OPEN_WRITE); + if(result != GNOME_VFS_OK) return result; + + while(result == GNOME_VFS_OK) { + GnomeVFSFileSize bytes = 1024, bytes_read; + + result = gnome_vfs_read (rhandle, buffer, bytes, &bytes_read); + if(result != GNOME_VFS_OK) return result; + + if(bytes_read == 0) break; + + g_print("%d=\n", (gint)bytes_read); + + result = gnome_vfs_write (whandle, buffer, bytes_read, &bytes); + if(result != GNOME_VFS_OK) return result; + + g_print("%d-\n", (gint)bytes); + } + + result = gnome_vfs_close(rhandle); + result = gnome_vfs_close(whandle); /* we especially need to do this for HTTP */ + + + return result; +} + + +static GnomeVFSResult vault_download(GList *args, gchar *uri, gboolean debug, gchar **error_context) { + GnomeVFSResult result; + GnomeVFSHandle *whandle, *rhandle; + gchar *remote_uri; + gchar *local_uri; + gchar buffer[1025]; + + remote_uri = make_remote_uri(uri, args->data, NULL); + + args = args->next; + + local_uri = make_local_uri(args?args->data:NULL, remote_uri); + + g_print("local: %s\n", local_uri); + g_print("remote: %s\n", remote_uri); + + result = gnome_vfs_open (&rhandle, remote_uri, GNOME_VFS_OPEN_READ); + if(result != GNOME_VFS_OK) { + *error_context = remote_uri; + return result; + } + + result = gnome_vfs_create (&whandle, local_uri, GNOME_VFS_OPEN_WRITE, TRUE, 0600); + if(result != GNOME_VFS_OK) { + *error_context = local_uri; + return result; + } + + while(result == GNOME_VFS_OK) { + GnomeVFSFileSize bytes = 1024, bytes_read; + + result = gnome_vfs_read (rhandle, buffer, bytes, &bytes_read); + if(result != GNOME_VFS_OK) { + *error_context = "read"; + return result; + } + + if(bytes_read == 0) break; + + g_print("%d=\n", (gint)bytes_read); + + result = gnome_vfs_write (whandle, buffer, bytes_read, &bytes); + if(result != GNOME_VFS_OK) { + *error_context = "write"; + return result; + } + + g_print("%d-\n", (gint)bytes); + } + + result = gnome_vfs_close(rhandle); + result = gnome_vfs_close(whandle); /* we especially need to do this for HTTP */ + + + return result; +} + + +static GnomeVFSResult vault_move(GList *args, gchar *uri, gboolean debug, gchar **error_context) { + GnomeVFSResult result; + gchar *uri1, *uri2; + + uri1 = make_remote_uri(uri, args->data, NULL); + + args = args->next; + + uri2 = make_remote_uri(uri, args->data, NULL); + + g_print("from: %s\n", uri1); + g_print("to: %s\n", uri2); + + result = gnome_vfs_move (uri1, uri2, TRUE); + if(result != GNOME_VFS_OK) { + *error_context = g_strdup_printf("move %s to %s", uri1, uri2); + return result; + } + return result; +} + + +static GnomeVFSResult vault_delete(GList *args, gchar *uri, gboolean debug, gchar **error_context) { + GnomeVFSResult result; + gchar *uri1; + + uri1 = make_remote_uri(uri, args->data, NULL); + + g_print("deleting: %s\n", uri1); + + result = gnome_vfs_unlink (uri1); + if(result != GNOME_VFS_OK) { + *error_context = uri1; + return result; + } + return result; +} diff --git a/components/services/vault/command-line/vault-operations.h b/components/services/vault/command-line/vault-operations.h new file mode 100644 index 000000000..57039e0fe --- /dev/null +++ b/components/services/vault/command-line/vault-operations.h @@ -0,0 +1,36 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: Ian McKellar <yakk@yakk.net.au> + * + */ + +#include <config.h> +#include <glib.h> +#include <libgnomevfs/gnome-vfs.h> + +struct VaultOperation { + gchar *name; + gchar *syntax; + gint minargs; + gint maxargs; + GnomeVFSResult (* function)(GList *args, gchar *uri, gboolean debug, gchar **error_context); +}; + +extern struct VaultOperation vault_operations[]; diff --git a/components/text/services/english_to_french.xml b/components/text/services/english_to_french.xml new file mode 100644 index 000000000..897ccf5d4 --- /dev/null +++ b/components/text/services/english_to_french.xml @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<service label="Translate from English to French" source="document" template="http://dellbert.differnet.com/catalog/FetchBabel.cgi?lang=en_fr&text=%s" tooltip="Translate this document from English to French using BabelFish"/> diff --git a/components/text/services/french_to_english.xml b/components/text/services/french_to_english.xml new file mode 100644 index 000000000..2df40fa92 --- /dev/null +++ b/components/text/services/french_to_english.xml @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<service label="Translate from French to English" source="document" +template="http://dellbert.differnet.com/catalog/FetchBabel.cgi?lang=fr_en&text=%s" tooltip="Translate this document from French to English using BabelFish"/> diff --git a/components/throbber/nautilus-throbber.c b/components/throbber/nautilus-throbber.c index 806ec864e..fb2a20efe 100644 --- a/components/throbber/nautilus-throbber.c +++ b/components/throbber/nautilus-throbber.c @@ -107,7 +107,8 @@ nautilus_throbber_initialize_class (NautilusThrobberClass *throbber_class) enum { THROBBING, - LOCATION + LOCATION, + CONFIGURATION } MyArgs; @@ -143,8 +144,12 @@ get_bonobo_properties (BonoboPropertyBag *bag, BONOBO_ARG_SET_STRING (arg, ""); } + break; } + case CONFIGURATION: + BONOBO_ARG_SET_STRING (arg, ""); + break; default: g_warning ("Unhandled arg %d", arg_id); break; @@ -177,6 +182,13 @@ set_bonobo_properties (BonoboPropertyBag *bag, break; } + /* respond to configuration calls by starting the throbber */ + case CONFIGURATION: + { + nautilus_throbber_start (throbber); + break; + } + default: g_warning ("Unhandled arg %d", arg_id); break; @@ -289,6 +301,9 @@ nautilus_throbber_initialize (NautilusThrobber *throbber) "Throbber active", 0); bonobo_property_bag_add (throbber->details->property_bag, "location", LOCATION, BONOBO_ARG_STRING, NULL, "associated URL", 0); + + bonobo_property_bag_add (throbber->details->property_bag, "configuration", CONFIGURATION, BONOBO_ARG_STRING, NULL, + "Throbber image source", BONOBO_PROPERTY_WRITEABLE); /* allocate the pixmap that holds the image */ nautilus_throbber_load_images (throbber); diff --git a/components/vcard/.cvsignore b/components/vcard/.cvsignore new file mode 100644 index 000000000..3c5d6aaee --- /dev/null +++ b/components/vcard/.cvsignore @@ -0,0 +1,5 @@ +.deps +.libs +Makefile +Makefile.in +nautilus-vcard diff --git a/components/vcard/Makefile.am b/components/vcard/Makefile.am new file mode 100644 index 000000000..9f1f47427 --- /dev/null +++ b/components/vcard/Makefile.am @@ -0,0 +1,48 @@ +NULL = + +SUBDIRS = + +INCLUDES = \ + -DPREFIX=\"$(prefix)\" \ + -DG_LOG_DOMAIN=\"Nautilus-VCard\" \ + -DDATADIR=\""$(datadir)"\" \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(top_builddir)/libnautilus \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + $(GNOMEUI_CFLAGS) \ + $(GCONF_CFLAGS) \ + $(OAF_CFLAGS) \ + $(BONOBO_CFLAGS) \ + $(VFS_CFLAGS) + +oafdir = $(datadir)/oaf +oaf_DATA = \ + nautilus-vcard.oaf + + +bin_PROGRAMS = \ + nautilus-vcard + +nautilus_vcard_SOURCES = \ + + vcard.c \ + vcard.h \ + nautilus-vcard.c \ + nautilus-vcard.h \ + main.c + +nautilus_vcard_LDADD = \ + $(top_builddir)/libnautilus/libnautilus.la \ + $(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \ + $(BONOBO_LIBS) \ + $(GNOMEUI_LIBS) \ + $(GCONF_LIBS) \ + $(VFS_LIBS) \ + $(GNORBA_LIBS) + +OBJECT_DIRECTORY_LIBS = $(GNOME_LIBS) $(OAF_LIBS) + +EXTRA_DIST = \ + $(oaf_DATA) \ + $(NULL) diff --git a/components/vcard/main.c b/components/vcard/main.c new file mode 100644 index 000000000..32dff3253 --- /dev/null +++ b/components/vcard/main.c @@ -0,0 +1,120 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Andy Hertzfeld + */ + +/* main.c - main function and object activation function for the vcard component. */ + +#include <config.h> +#include "nautilus-vcard.h" + +#include <bonobo.h> +#include <gnome.h> +#include <libgnomevfs/gnome-vfs.h> +#include <libnautilus-extensions/nautilus-debug.h> +#include <liboaf/liboaf.h> + +static int object_count = 0; + +static void +vcard_object_destroyed(GtkObject *obj) +{ + object_count--; + if (object_count <= 0) { + gtk_main_quit (); + } +} + +static BonoboObject * +vcard_make_object (BonoboGenericFactory *factory, + const char *iid, + void *closure) +{ + NautilusVCard *vcard; + BonoboObject *bonobo_control; + + if (strcmp (iid, "OAFIID:nautilus_vcard")) { + return NULL; + } + + vcard = NAUTILUS_VCARD (gtk_object_new (NAUTILUS_TYPE_VCARD, NULL)); + + object_count++; + + bonobo_control = nautilus_vcard_get_control (vcard); + + gtk_signal_connect (GTK_OBJECT (bonobo_control), "destroy", vcard_object_destroyed, NULL); + return bonobo_control; +} + +int +main (int argc, char *argv[]) +{ + BonoboGenericFactory *factory; + CORBA_ORB orb; + char *registration_id; + + /* Make criticals and warnings stop in the debugger if + * NAUTILUS_DEBUG is set. Unfortunately, this has to be done + * explicitly for each domain. + */ + if (g_getenv ("NAUTILUS_DEBUG") != NULL) { + nautilus_make_warnings_and_criticals_stop_in_debugger + (G_LOG_DOMAIN, g_log_domain_glib, + "Bonobo", + "Gdk", + "GnomeUI", + "GnomeVFS", + "GnomeVFS-CORBA", + "GnomeVFS-pthread", + "Gtk", + "Gdk-Pixbuf", + "Nautilus", + "Nautilus-Authenticate", + "Nautilus-Tree", + "ORBit", + NULL); + } + + gnome_init_with_popt_table("nautilus-vcard", VERSION, + argc, argv, + oaf_popt_options, 0, NULL); + + orb = oaf_init (argc, argv); + + bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL); + + /* initialize gnome-vfs, etc */ + g_thread_init (NULL); + gnome_vfs_init (); + + registration_id = oaf_make_registration_id ("OAFIID:nautilus_vcard_factory", getenv ("DISPLAY")); + factory = bonobo_generic_factory_new_multi (registration_id, + vcard_make_object, + NULL); + g_free (registration_id); + + + do { + bonobo_main (); + } while (object_count > 0); + + return 0; +} diff --git a/components/vcard/nautilus-vcard.c b/components/vcard/nautilus-vcard.c new file mode 100644 index 000000000..9b9d45c8d --- /dev/null +++ b/components/vcard/nautilus-vcard.c @@ -0,0 +1,578 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + +/* + * Copyright (C) 2000 Eazel, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Author: Andy Hertzfeld <andy@eazel.com> + * + */ + +/* this is the implementation of the vcard component, which display a vcard graphically + */ + +#include <config.h> +#include <gnome.h> +#include <liboaf/liboaf.h> + +#include <bonobo.h> + +#include "vcard.h" +#include "nautilus-vcard.h" + +#include <gnome-xml/parser.h> +#include <gnome-xml/xmlmemory.h> + +#include <libgnomevfs/gnome-vfs.h> + +#include <libnautilus/nautilus-view.h> + +#include <libnautilus-extensions/nautilus-file-utilities.h> +#include <libnautilus-extensions/nautilus-gdk-extensions.h> +#include <libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h> +#include <libnautilus-extensions/nautilus-glib-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-macros.h> +#include <libnautilus-extensions/nautilus-scalable-font.h> +#include <libnautilus-extensions/nautilus-string.h> +#include <libnautilus-extensions/nautilus-xml-extensions.h> +#include <libnautilus-extensions/nautilus-font-factory.h> + +/* private instance variables */ +struct _NautilusVCardDetails { + char *vcard_uri; + char *vcard_data; + + NautilusReadFileHandle *load_file_handle; + NautilusPixbufLoadHandle *load_image_handle; + + BonoboObject *control; + NautilusScalableFont *font; + + GdkPixbuf *logo; +}; + +static void nautilus_vcard_initialize_class (NautilusVCardClass *klass); +static void nautilus_vcard_initialize (NautilusVCard *view); +static void nautilus_vcard_destroy (GtkObject *object); + +static void nautilus_vcard_draw (GtkWidget *widget, GdkRectangle *box); +static int nautilus_vcard_expose (GtkWidget *widget, GdkEventExpose *event); +static gboolean nautilus_vcard_button_press_event (GtkWidget *widget, GdkEventButton *event); +static gboolean nautilus_vcard_motion_event (GtkWidget *widget, GdkEventMotion *event); +static gboolean nautilus_vcard_leave_event (GtkWidget *widget, GdkEventCrossing *event); +static void nautilus_vcard_size_request (GtkWidget *widget, GtkRequisition *request); + +static void nautilus_vcard_set_uri (NautilusVCard *vcard, const char *uri); + + +NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusVCard, + nautilus_vcard, + GTK_TYPE_EVENT_BOX) + +#define MINIMUM_DRAW_SIZE 4 + +static void +nautilus_vcard_initialize_class (NautilusVCardClass *klass) +{ + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + + object_class = GTK_OBJECT_CLASS (klass); + widget_class = GTK_WIDGET_CLASS (klass); + + object_class->destroy = nautilus_vcard_destroy; + + widget_class->draw = nautilus_vcard_draw; + widget_class->expose_event = nautilus_vcard_expose; + widget_class->button_press_event = nautilus_vcard_button_press_event; + widget_class->motion_notify_event = nautilus_vcard_motion_event; + widget_class->leave_notify_event = nautilus_vcard_leave_event; + widget_class->size_request = nautilus_vcard_size_request; +} + +/* routines to handle setting and getting the configuration properties of the Bonobo control */ + +enum { + CONFIGURATION +} MyArgs; + + +static void +get_bonobo_properties (BonoboPropertyBag *bag, + BonoboArg *arg, + guint arg_id, + CORBA_Environment *ev, + gpointer user_data) +{ + NautilusVCard *vcard = NAUTILUS_VCARD (user_data); + + switch (arg_id) { + + case CONFIGURATION: + { + BONOBO_ARG_SET_STRING (arg, vcard->details->vcard_uri); + break; + } + + default: + g_warning ("Unhandled arg %d", arg_id); + break; + } +} + +static void +set_bonobo_properties (BonoboPropertyBag *bag, + const BonoboArg *arg, + guint arg_id, + CORBA_Environment *ev, + gpointer user_data) +{ + NautilusVCard *vcard = NAUTILUS_VCARD (user_data); + + switch (arg_id) { + + case CONFIGURATION: + { + char *uri; + + uri = BONOBO_ARG_GET_STRING (arg); + nautilus_vcard_set_uri (vcard, uri); + + break; + } + + default: + g_warning ("Unhandled arg %d", arg_id); + break; + } +} + +/* initialize ourselves by connecting to the location change signal and allocating our subviews */ +static void +nautilus_vcard_initialize (NautilusVCard *vcard) +{ + GtkWidget *frame; + BonoboPropertyBag *property_bag; + + vcard->details = g_new0 (NautilusVCardDetails, 1); + + /* set up the font */ + vcard->details->font = NAUTILUS_SCALABLE_FONT (nautilus_scalable_font_new ("helvetica", "medium", NULL, NULL)); + + /* receive mouse motion events */ + gtk_widget_add_events (GTK_WIDGET (vcard), GDK_POINTER_MOTION_MASK); + + /* embed it into a frame */ + frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type(GTK_FRAME (frame), GTK_SHADOW_OUT); + gtk_widget_show (frame); + gtk_container_add (GTK_CONTAINER (frame), GTK_WIDGET (vcard)); + + /* make the bonobo control */ + vcard->details->control = (BonoboObject*) bonobo_control_new (GTK_WIDGET (frame)); + + /* attach a property bag with the configure property */ + property_bag = bonobo_property_bag_new (get_bonobo_properties, set_bonobo_properties, vcard); + bonobo_control_set_properties (BONOBO_CONTROL(vcard->details->control),property_bag); + bonobo_object_unref (BONOBO_OBJECT (property_bag)); + + bonobo_property_bag_add (property_bag, "configuration", CONFIGURATION, BONOBO_ARG_STRING, NULL, + "VCard Configuration", BONOBO_PROPERTY_WRITEABLE); + + /* show the view itself */ + gtk_widget_show (GTK_WIDGET (vcard)); +} + + +static void +nautilus_vcard_destroy (GtkObject *object) +{ + NautilusVCard *vcard; + + vcard = NAUTILUS_VCARD (object); + g_free (vcard->details->vcard_uri); + g_free (vcard->details->vcard_data); + + if (vcard->details->load_file_handle != NULL) { + nautilus_read_file_cancel (vcard->details->load_file_handle); + } + + if (vcard->details->load_image_handle != NULL) { + nautilus_cancel_gdk_pixbuf_load (vcard->details->load_image_handle); + } + + + if (vcard->details->logo != NULL) { + gdk_pixbuf_unref (vcard->details->logo); + } + + if (vcard->details->font) { + gtk_object_unref (GTK_OBJECT (vcard->details->font)); + } + + g_free (vcard->details); + + NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object)); +} + +/* get associated Bonobo control */ +BonoboObject * +nautilus_vcard_get_control (NautilusVCard *vcard) +{ + return vcard->details->control; +} + +static void +vcard_logo_callback (GnomeVFSResult error, GdkPixbuf *pixbuf, gpointer callback_data) +{ + NautilusVCard *vcard; + GdkPixbuf *scaled_pixbuf; + + vcard = NAUTILUS_VCARD (callback_data); + vcard->details->load_image_handle = NULL; + + if (vcard->details->logo) { + gdk_pixbuf_unref (vcard->details->logo); + } + + if (pixbuf != NULL) { + gdk_pixbuf_ref (pixbuf); + + scaled_pixbuf = nautilus_gdk_pixbuf_scale_down_to_fit (pixbuf, 128, 80); + gdk_pixbuf_unref (pixbuf); + vcard->details->logo = scaled_pixbuf; + gtk_widget_queue_draw (GTK_WIDGET (vcard)); + } +} + +/* completion routine invoked when we've loaded the vcard file uri. */ + +static void +vcard_read_done_callback (GnomeVFSResult result, + GnomeVFSFileSize file_size, + char *file_contents, + gpointer callback_data) +{ + char *logo_uri; + NautilusVCard *vcard; + + vcard = NAUTILUS_VCARD (callback_data); + vcard->details->load_file_handle = NULL; + + /* make sure the read was successful */ + if (result != GNOME_VFS_OK) { + g_assert (file_contents == NULL); + return; + } + + /* free old data if any */ + if (vcard->details->vcard_data) { + g_free (vcard->details->vcard_data); + } + + /* set up the vcard data */ + vcard->details->vcard_data = g_realloc (file_contents, file_size + 1); + vcard->details->vcard_data[file_size] = '\0'; + + /* extract the image uri and, if found, load it asynchronously */ + logo_uri = vcard_logo (vcard->details->vcard_data); + g_message ("logo uri is %s", logo_uri); + if (logo_uri != NULL) { + vcard->details->load_image_handle = nautilus_gdk_pixbuf_load_async (logo_uri, vcard_logo_callback, vcard); + g_free (logo_uri); + } + + /* schedule a redraw to reflect the new contents */ + gtk_widget_queue_draw (GTK_WIDGET (vcard)); +} + +/* load the vcard asynchronously */ +static void +load_vcard (NautilusVCard *vcard) +{ + /* load the uri asynchrounously, calling a completion routine when completed */ + vcard->details->load_file_handle = nautilus_read_entire_file_async (vcard->details->vcard_uri, vcard_read_done_callback, vcard); +} + +/* set the uri and load it */ +static void +nautilus_vcard_set_uri (NautilusVCard *vcard, const char *uri) +{ + + if (nautilus_strcmp (vcard->details->vcard_uri, uri) == 0) { + return; + } + + if (vcard->details->vcard_uri != NULL) { + g_free (vcard->details->vcard_uri); + vcard->details->vcard_uri = NULL; + } + + if (uri != NULL) { + vcard->details->vcard_uri = g_strdup (uri); + load_vcard (vcard); + } +} + +/* convenience routine to composite an image with the proper clipping */ +static void +vcard_pixbuf_composite (GdkPixbuf *source, GdkPixbuf *destination, int x_offset, int y_offset, int alpha) +{ + int source_width, source_height, dest_width, dest_height; + double float_x_offset, float_y_offset; + + source_width = gdk_pixbuf_get_width (source); + source_height = gdk_pixbuf_get_height (source); + dest_width = gdk_pixbuf_get_width (destination); + dest_height = gdk_pixbuf_get_height (destination); + + float_x_offset = x_offset; + float_y_offset = y_offset; + + /* clip to the destination size */ + if ((x_offset + source_width) > dest_width) { + source_width = dest_width - x_offset; + } + if ((y_offset + source_height) > dest_height) { + source_height = dest_height - y_offset; + } + + gdk_pixbuf_composite (source, destination, x_offset, y_offset, source_width, source_height, + float_x_offset, float_y_offset, 1.0, 1.0, GDK_PIXBUF_ALPHA_BILEVEL, alpha); +} + + + +/* draw the logo image */ +static int +draw_vcard_logo_image (NautilusVCard *vcard, GdkPixbuf *pixbuf, int offset) +{ + GtkWidget *widget; + int logo_width, logo_height; + int v_offset; + + widget = GTK_WIDGET (vcard); + v_offset = offset; + + if (vcard->details->logo != NULL) { + logo_width = gdk_pixbuf_get_width (vcard->details->logo); + logo_height = gdk_pixbuf_get_height (vcard->details->logo); + + vcard_pixbuf_composite (vcard->details->logo, pixbuf, 2, v_offset, 255); + v_offset += logo_height + 2; + } + + return v_offset; +} + +/* draw the name and title */ +static int +draw_vcard_name_and_title (NautilusVCard *vcard, GdkPixbuf *pixbuf, int v_offset) +{ + int name_width, name_height, title_width, title_height; + int name_len, title_len; + char *name, *title; + GtkWidget *widget; + + if (vcard->details->font == NULL) { + return v_offset; + } + + widget = GTK_WIDGET (vcard); + + /* extract the name and title */ + name = vcard_full_name (vcard->details->vcard_data); + title = vcard_title (vcard->details->vcard_data); + + /* first, measure the name */ + if (name != NULL) { + name_len = strlen (name); + nautilus_scalable_font_measure_text (vcard->details->font, + 18, 18, + name, name_len, + &name_width, + &name_height); + + /* draw the name into the pixbuf using anti-aliased text */ + nautilus_scalable_font_draw_text (vcard->details->font, pixbuf, + 4, v_offset, + NULL, + 18, 18, + name, name_len, + NAUTILUS_RGB_COLOR_BLACK, + NAUTILUS_OPACITY_FULLY_OPAQUE); + v_offset += name_height + 4; + + g_free (name); + + if (title != NULL) { + title_len = strlen (title); + nautilus_scalable_font_measure_text (vcard->details->font, + 14, 14, + title, title_len, + &title_width, + &title_height); + + /* draw the name into the pixbuf using anti-aliased text */ + nautilus_scalable_font_draw_text (vcard->details->font, pixbuf, + 4, v_offset, + NULL, + 14, 14, + title, title_len, + NAUTILUS_RGB_COLOR_BLACK, + NAUTILUS_OPACITY_FULLY_OPAQUE); + v_offset += title_height + 4; + + g_free (title); + } + } + return v_offset; +} + +/* draw the addresses and phone numbers associated with the vcard */ +static int +draw_vcard_addresses (NautilusVCard *vcard, GdkPixbuf *pixbuf, int v_offset) +{ + return v_offset; +} + +/* handle drawing the control */ +static void +nautilus_vcard_draw (GtkWidget *widget, GdkRectangle *box) +{ + NautilusVCard *control; + GdkPixbuf *temp_pixbuf; + int width, height, v_offset; + + /* allocate a pixbuf to draw into */ + width = widget->allocation.width; + height = widget->allocation.height; + + + temp_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height); + + g_return_if_fail (widget != NULL); + g_return_if_fail (NAUTILUS_IS_VCARD (widget)); + + control = NAUTILUS_VCARD (widget); + + /* draw the background */ + nautilus_gdk_pixbuf_fill_rectangle_with_color (temp_pixbuf, NULL, 0xFFEFEFEF); + + /* draw the logo, if any */ + v_offset = draw_vcard_logo_image (control, temp_pixbuf, 2); + + /* draw the name and title */ + v_offset = draw_vcard_name_and_title (control, temp_pixbuf, v_offset); + + v_offset += 6; + /* draw the addresses */ + v_offset = draw_vcard_addresses (control, temp_pixbuf, v_offset); + + /* blit the resultingpixbuf to the drawable, then release it */ + gdk_pixbuf_render_to_drawable_alpha (temp_pixbuf, + widget->window, + 0, 0, + widget->allocation.x, widget->allocation.y, + width, height, + GDK_PIXBUF_ALPHA_BILEVEL, 128, + GDK_RGB_DITHER_MAX, + 0, 0); + + gdk_pixbuf_unref (temp_pixbuf); +} + +/* handle expose events */ +static int +nautilus_vcard_expose (GtkWidget *widget, GdkEventExpose *event) +{ + GdkRectangle box; + g_return_val_if_fail (widget != NULL, FALSE); + g_return_val_if_fail (NAUTILUS_IS_VCARD (widget), FALSE); + + box.x = 0; box.y = 0; + box.width = widget->allocation.width; + box.height = widget->allocation.height; + + nautilus_vcard_draw (widget, &box); + return FALSE; +} + + +/* handle mouse motion events by maintaining the prelight state */ +static gboolean +nautilus_vcard_motion_event (GtkWidget *widget, GdkEventMotion *event) +{ + int x, y; + int which_item, item_count; + NautilusVCard *vcard; + + vcard = NAUTILUS_VCARD (widget); + + gtk_widget_get_pointer (widget, &x, &y); + which_item = 0; + item_count = 0; + + if (which_item < 0 || which_item >= item_count) { + which_item = -1; + } + return TRUE; +} + +/* handle size requests by requesting a fixed size */ +static void +nautilus_vcard_size_request (GtkWidget *widget, GtkRequisition *request) +{ + request->width = 220; + request->height = 140; +} + +/* handle leave events by cancelling any prelighting */ +static gboolean +nautilus_vcard_leave_event (GtkWidget *widget, GdkEventCrossing *event) +{ + NautilusVCard *vcard; + + vcard = NAUTILUS_VCARD (widget); + return TRUE; +} + +/* handle button press events */ +static gboolean +nautilus_vcard_button_press_event (GtkWidget *widget, GdkEventButton *event) +{ + GList *selected_item; + NautilusVCard *vcard; + char *command; + int result, which_item; + + vcard = NAUTILUS_VCARD (widget); + if (event->y < widget->allocation.y) { + command = g_strdup_printf ("nautilus %s", vcard->details->vcard_uri); + result = system (command); + g_free (command); + } else { + which_item = (event->y - widget->allocation.y ) / 16; + if (which_item < 0) { + selected_item = 0; + + } + } + + return FALSE; +} + diff --git a/components/vcard/nautilus-vcard.h b/components/vcard/nautilus-vcard.h new file mode 100644 index 000000000..4a742dd26 --- /dev/null +++ b/components/vcard/nautilus-vcard.h @@ -0,0 +1,54 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * Copyright (C) 2000 Eazel, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Andy Hertzfeld + */ + +/* header file for the vcard component */ + +#ifndef NAUTILUS_VCARD_H +#define NAUTILUS_VCARD_H + +#include <bonobo.h> +#include <gtk/gtkeventbox.h> +typedef struct _NautilusVCard NautilusVCard; +typedef struct _NautilusVCardClass NautilusVCardClass; + +#define NAUTILUS_TYPE_VCARD (nautilus_vcard_get_type ()) +#define NAUTILUS_VCARD(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_VCARD, NautilusVCard)) +#define NAUTILUS_VCARD_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_VCARD, NautilusVCardClass)) +#define NAUTILUS_IS_VCARD(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_VCARD)) +#define NAUTILUS_IS_VCARD_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_VCARD)) + +typedef struct _NautilusVCardDetails NautilusVCardDetails; + +struct _NautilusVCard { + GtkEventBox parent; + NautilusVCardDetails *details; +}; + +struct _NautilusVCardClass { + GtkEventBoxClass parent_class; +}; + +/* GtkObject support */ +GtkType nautilus_vcard_get_type (void); +BonoboObject* nautilus_vcard_get_control (NautilusVCard *vcard); + +#endif /* NAUTILUS_VCARD_H */ diff --git a/components/vcard/nautilus-vcard.oaf b/components/vcard/nautilus-vcard.oaf new file mode 100644 index 000000000..bb6edd1ea --- /dev/null +++ b/components/vcard/nautilus-vcard.oaf @@ -0,0 +1,20 @@ +<oaf_info> + +<oaf_server iid="OAFIID:nautilus_vcard_factory" type="exe" location="nautilus-rss-control"> +<oaf_attribute name="repo_ids" type="stringv"> +<item value="IDL:Bonobo/GenericFactory:1.0"/> +</oaf_attribute> +<oaf_attribute name="name" type="string" value="vcard factory"/> +<oaf_attribute name="description" type="string" value="vcard object factory"/> +</oaf_server> + +<oaf_server iid="OAFIID:nautilus_vcard" type="factory" location="OAFIID:nautilus_vcard_factory"> +<oaf_attribute name="repo_ids" type="stringv"> +<item value="IDL:Bonobo/Control:1.0"/> +<item value="IDL:Bonobo/Unknown:1.0"/> +</oaf_attribute> +<oaf_attribute name="name" type="string" value="vcard"/> +<oaf_attribute name="description" type="string" value="nautilus vcard object"/> +</oaf_server> + +</oaf_info> diff --git a/components/vcard/vcard.c b/components/vcard/vcard.c new file mode 100644 index 000000000..58000315e --- /dev/null +++ b/components/vcard/vcard.c @@ -0,0 +1,276 @@ +/* ad hoc vcard parsing routines for prototyping - replace with something better soon + * + * Copyright (C) 1999 Andy Hertzfeld + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <gnome.h> +#include <ctype.h> + +#include "vcard.h" + +char * vcard_full_name (gchar* vcard) + { + gchar full_name[2048]; + gchar *temp_str = strstr(vcard, "FN:"); + if (temp_str) + { + gint str_len; + gchar *end_pos = strchr(temp_str, '\n'); + if (!end_pos) + end_pos = temp_str + strlen(temp_str); + + str_len = end_pos - temp_str - 3; + memcpy(full_name, temp_str + 3, str_len); + full_name[str_len] = '\0'; + return g_strdup (full_name); + } + else + return NULL; + } + +char * vcard_title (gchar* vcard) + { + gchar title[2048]; + gchar *temp_str = strstr(vcard, "TITLE:"); + if (temp_str) + { + gint str_len; + gchar *end_pos = strchr(temp_str, '\n'); + if (!end_pos) + end_pos = temp_str + strlen(temp_str); + + str_len = end_pos - temp_str - 6; + memcpy(title, temp_str + 6, str_len); + title[str_len] = '\0'; + return g_strdup (title); + } + else + return NULL; + } + +char * vcard_logo (gchar* vcard) + { + gchar logo[2048]; + gchar *temp_str = strstr(vcard, "LOGO;VALUE=uri:"); + if (temp_str) + { + gint str_len; + gchar *end_pos = strchr(temp_str, '\n'); + if (!end_pos) + end_pos = temp_str + strlen(temp_str); + + str_len = end_pos - temp_str - 15; + memcpy(logo, temp_str + 15, str_len); + logo[str_len] = '\0'; + return g_strdup (logo); + } + else + return NULL; + } + +char * vcard_postal (gchar* vcard) + { + gchar postal[2048]; + gchar *temp_str = strstr(vcard, "ADR;"); + if (temp_str) + { + gchar *skip_pos = strchr(temp_str, ':'); + if (skip_pos) + { + gint str_len; + gchar *end_pos = strchr(skip_pos, '\n'); + if (!end_pos) + end_pos = skip_pos + strlen(skip_pos); + + str_len = end_pos - skip_pos - 1; + memcpy(postal, skip_pos + 1, str_len); + postal[str_len] = '\0'; + return g_strdup (postal); + } + else + return NULL; + } + else + return NULL; + } + +char * vcard_streetaddress(gchar* vcard) + { + gchar streetaddress[2048]; + gchar *temp_str = strstr(vcard, "ADR;"); + if (temp_str) + { + gchar *skip_pos = strchr(temp_str, ':'); + if (skip_pos) + { + gint str_len; + gchar *end_pos; + gint semi_count = 0; + + /* to extract the street address, count up two semi-colons, then scan until the next one */ + + while (*skip_pos && (semi_count < 2)) + { + if (*skip_pos++ == ';') + semi_count += 1; + } + + end_pos = strchr(skip_pos, ';'); + if (!end_pos) + end_pos = skip_pos + strlen(skip_pos); + + str_len = end_pos - skip_pos; + + memcpy(streetaddress, skip_pos, str_len); + streetaddress[str_len] = '\0'; + return g_strdup (streetaddress); + } + else + return NULL; + } + else + return NULL; + } + +char * vcard_city_state_zip(gchar* vcard) + { + gchar city[2048]; + gchar *temp_str = strstr(vcard, "ADR;"); + if (temp_str) + { + gchar *skip_pos = strchr(temp_str, ':'); + if (skip_pos) + { + gint str_len; + gchar *end_pos; + gint semi_count = 0; + + /* to extract the city, state and zip, count up 3 semi-colons */ + + while (*skip_pos && (semi_count < 3)) + { + if (*skip_pos++ == ';') + semi_count += 1; + } + + end_pos = skip_pos + strlen(skip_pos); + + str_len = end_pos - skip_pos; + memcpy(city, skip_pos, str_len); + city[str_len] = '\0'; + return g_strdup (city); + } + else + return NULL; + } + else + return NULL; + } + +char * vcard_company(gchar* vcard) + { + gchar company[2048]; + gchar *temp_str = strstr(vcard, "ORG:"); + if (temp_str) + { + gint str_len; + gchar *end_pos = strchr(temp_str, '\n'); + if (!end_pos) + end_pos = temp_str + strlen(temp_str); + + str_len = end_pos - temp_str - 4; + memcpy(company, temp_str + 4, str_len); + company[str_len] = '\0'; + return g_strdup (company); + } + else + return NULL; + } + +char * vcard_email(gchar* vcard) + { + return NULL; + } + +char * vcard_fax(gchar* vcard) + { + return NULL; + } + +char * vcard_web(gchar* vcard) + { + return NULL; + } + +/* this routine returns a cr-delimited list of all the phone, email and web addresses it can find */ + +char * vcard_address_list(gchar* vcard) + { + gchar *next_line, *scan_ptr; + gchar temp_card[16384]; + + strcpy(temp_card, vcard); + + /* iterate through the vcard text, extracting the fields that we're interested in and building the returned list */ + + next_line = strtok(temp_card, "\n"); + while (next_line != NULL) + { + /* skip over leading blanks, and find the tag delimiter */ + + next_line = g_strchug(next_line); + scan_ptr = next_line; + + while (isalpha (*scan_ptr)) + scan_ptr++; + + if ((*scan_ptr == ';') || (*scan_ptr == ':')) + { + gchar delimiter = *scan_ptr; + *scan_ptr = '\0'; + + /* see if it's one of the tags that we collect */ + + if (!strcmp(next_line, "TEL") || !strcmp(next_line, "EMAIL") || !strcmp(next_line, "URL")) + { + gchar temp_address[2048]; + + /* it matched, s prepare the output string and append it to the result */ + + if (delimiter == ':') + sprintf(temp_address, "%s||%s\n", next_line, scan_ptr + 1); + else + { + gchar *sub_type_ptr; + + scan_ptr += 1; + sub_type_ptr = scan_ptr; + while ((*scan_ptr != ':') && (*scan_ptr != '\0')) + scan_ptr += 1; + *scan_ptr = '\0'; + sprintf(temp_address, "%s|%s|%s\n", next_line, sub_type_ptr, scan_ptr + 1); + } + /* + strcat(address_list, temp_address); + */ + } + } + next_line = strtok(NULL, "\n"); + } + + return NULL; + } diff --git a/components/vcard/vcard.h b/components/vcard/vcard.h new file mode 100644 index 000000000..0eeaff8b2 --- /dev/null +++ b/components/vcard/vcard.h @@ -0,0 +1,15 @@ + +/* ad hoc vcard parsing routines - replace with something better sometime */ + +char * vcard_full_name (gchar* vcard); +char * vcard_title(gchar* vcard); +char * vcard_postal(gchar* vcard); +char * vcard_email(gchar* vcard); +char * vcard_fax(gchar* vcard); +char * vcard_web(gchar* vcard); +char * vcard_logo(gchar* vcard); +char * vcard_streetaddress(gchar* vcard); +char * vcard_city_state_zip(gchar* vcard); +char * vcard_company(gchar* vcard); +char * vcard_address_list(gchar* vcard); + diff --git a/configure.in b/configure.in index c94b80b3d..4660afac5 100644 --- a/configure.in +++ b/configure.in @@ -1029,6 +1029,7 @@ components/notes/Makefile components/rpmview/Makefile components/sample/Makefile components/mozilla/Makefile +components/rss-control/Makefile components/services/Makefile components/services/trilobite/Makefile components/services/trilobite/idl/Makefile @@ -1064,6 +1065,7 @@ components/loser/Makefile components/loser/content/Makefile components/loser/sidebar/Makefile components/tree/Makefile +components/vcard/Makefile po/Makefile.in intl/Makefile test/Makefile diff --git a/data/emblems/secret.png b/data/emblems/secret.png new file mode 100644 index 000000000..b25780673 Binary files /dev/null and b/data/emblems/secret.png differ diff --git a/data/emblems/shared.png b/data/emblems/shared.png new file mode 100644 index 000000000..e94bdaa25 Binary files /dev/null and b/data/emblems/shared.png differ diff --git a/data/top/.cvsignore b/data/top/.cvsignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/data/top/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/data/top/.nautilus-metafile.xml b/data/top/.nautilus-metafile.xml new file mode 100644 index 000000000..9485ad19c --- /dev/null +++ b/data/top/.nautilus-metafile.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<directory icons_auto_layout="false" background_color="rgb:FFFF/FFFF/FFFF-rgb:FFFF/9999/3333:h" icon_list_zoom_level="3" sidebar_buttons="button=Edit Links...;script=#linksets"> + <file name="Computer.link" icon_position="251,216"/> + <file name="Gnumeric.link" icon_position="437,370"/> + <file name="Netscape.link" icon_position="363,372"/> + <file name="Services.link" icon_position="397,217"/> + <file name="The Gimp.link" icon_position="508,368"/> +</directory> diff --git a/data/top/Clock b/data/top/Clock new file mode 100644 index 000000000..866bcc726 --- /dev/null +++ b/data/top/Clock @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<nautilus_object nautilus_link="Nautilus Link" custom_icon="computer" link="hardware:overview" +control_moniker="OAFIID:Bonobo_Sample_Clock" control_data=""/> diff --git a/data/top/Computer b/data/top/Computer new file mode 100644 index 000000000..3aa737b3f --- /dev/null +++ b/data/top/Computer @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<nautilus_object nautilus_link="Nautilus Link" custom_icon="computer" link="hardware:overview"/> diff --git a/data/top/Makefile.am b/data/top/Makefile.am new file mode 100644 index 000000000..ba482cd22 --- /dev/null +++ b/data/top/Makefile.am @@ -0,0 +1,13 @@ +NULL= + +topdir = $(datadir)/nautilus/top + +top_DATA = \ + .nautilus-metafile.xml \ + Clock \ + Computer \ + Services \ + Slashdot \ + $(NULL) + +EXTRA_DIST = $(top_DATA) diff --git a/data/top/Services b/data/top/Services new file mode 100644 index 000000000..ff4cc302e --- /dev/null +++ b/data/top/Services @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<nautilus_object nautilus_link="Nautilus Link" custom_icon="hand" link="eazel:"/> diff --git a/data/top/Slashdot b/data/top/Slashdot new file mode 100644 index 000000000..5534e86b5 --- /dev/null +++ b/data/top/Slashdot @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<nautilus_object nautilus_link="Nautilus Link" custom_icon="computer" link="hardware:overview" +control_moniker="OAFIID:nautilus_rss_control:1230" control_data="http://www.slashdot.org/slashdot.rdf"/> diff --git a/icons/Makefile.am b/icons/Makefile.am index 9b8518b73..0d289ec71 100644 --- a/icons/Makefile.am +++ b/icons/Makefile.am @@ -22,6 +22,7 @@ icon_DATA =\ bubble-LR.png \ bubble-UL.png \ bubble-UR.png \ + bullet.png \ chit_frame.png \ colors.png \ computer.png \ @@ -43,6 +44,7 @@ icon_DATA =\ emblem-important.svg \ emblem-new.svg \ emblem-noread.svg \ + emblem-note.png \ emblem-nowrite.svg \ emblem-ohno.svg \ emblem-personal.svg \ diff --git a/icons/crux_eggplant/i-regular-192-aa.png b/icons/crux_eggplant/i-regular-192-aa.png new file mode 100644 index 000000000..658266848 Binary files /dev/null and b/icons/crux_eggplant/i-regular-192-aa.png differ diff --git a/icons/crux_eggplant/i-regular-192.png b/icons/crux_eggplant/i-regular-192.png new file mode 100644 index 000000000..b7dc5105a Binary files /dev/null and b/icons/crux_eggplant/i-regular-192.png differ diff --git a/icons/crux_eggplant/i-regular-72-aa.png b/icons/crux_eggplant/i-regular-72-aa.png new file mode 100644 index 000000000..d367dd0a3 Binary files /dev/null and b/icons/crux_eggplant/i-regular-72-aa.png differ diff --git a/icons/crux_eggplant/i-regular-72.png b/icons/crux_eggplant/i-regular-72.png new file mode 100644 index 000000000..18ed9292d Binary files /dev/null and b/icons/crux_eggplant/i-regular-72.png differ diff --git a/icons/crux_eggplant/i-regular-96-aa.png b/icons/crux_eggplant/i-regular-96-aa.png new file mode 100644 index 000000000..ca7ce557c Binary files /dev/null and b/icons/crux_eggplant/i-regular-96-aa.png differ diff --git a/icons/crux_eggplant/i-regular-96.png b/icons/crux_eggplant/i-regular-96.png new file mode 100644 index 000000000..cc0ff0258 Binary files /dev/null and b/icons/crux_eggplant/i-regular-96.png differ diff --git a/icons/crux_eggplant/i-regular-aa.png b/icons/crux_eggplant/i-regular-aa.png new file mode 100644 index 000000000..f7f015818 Binary files /dev/null and b/icons/crux_eggplant/i-regular-aa.png differ diff --git a/icons/crux_eggplant/i-regular.png b/icons/crux_eggplant/i-regular.png new file mode 100644 index 000000000..506c4def6 Binary files /dev/null and b/icons/crux_eggplant/i-regular.png differ diff --git a/icons/eazel-logo.gif b/icons/eazel-logo.gif new file mode 100644 index 000000000..b9c13966d Binary files /dev/null and b/icons/eazel-logo.gif differ diff --git a/icons/emblem-note.png b/icons/emblem-note.png new file mode 100644 index 000000000..54681aea6 Binary files /dev/null and b/icons/emblem-note.png differ diff --git a/icons/emblem-secret.svg b/icons/emblem-secret.svg new file mode 100644 index 000000000..9d6cd65ff --- /dev/null +++ b/icons/emblem-secret.svg @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd" [ + <!ENTITY st0 "fill-rule:nonzero;clip-rule:nonzero;fill:#FFFFFF;stroke:#000000;stroke-miterlimit:4;"> + <!ENTITY st1 "fill:#3F3997;"> + <!ENTITY st2 "stroke:none;"> +]> +<svg width="55pt" height="20pt" viewBox="0 0 55 20" xml:space="preserve"> + <g id="Layer_x0020_1" style="&st0;"> + <g style="&st2;"> + <path style="&st1;" d="M55,16c0,2.209-1.97,4-4.399,4H4.4C1.971,20,0,18.209,0,16V4c0-2.209,1.971-4,4.4-4h46.2C53.03,0,55,1.791,55,4v12z"/> + <g> + <path d="M10.051,7.591H7.113V6.699c0-0.417-0.037-0.682-0.11-0.795C6.929,5.789,6.806,5.732,6.634,5.732c-0.187,0-0.328,0.077-0.424,0.231s-0.144,0.387-0.144,0.7c0,0.402,0.056,0.705,0.168,0.908c0.107,0.204,0.404,0.451,0.892,0.743 + c1.398,0.839,2.279,1.526,2.644,2.06c0.364,0.535,0.546,1.395,0.546,2.583c0,0.864-0.102,1.5-0.304,1.909s-0.593,0.752-1.172,1.029c-0.58,0.277-1.254,0.416-2.023,0.416c-0.844,0-1.565-0.16-2.162-0.479s-0.987-0.726-1.172-1.22 + c-0.185-0.493-0.277-1.194-0.277-2.102v-0.793h2.938v1.466c0,0.452,0.041,0.742,0.122,0.871c0.082,0.13,0.227,0.194,0.434,0.194s0.362-0.082,0.463-0.246s0.152-0.408,0.152-0.731c0-0.711-0.099-1.176-0.295-1.395c-0.201-0.219-0.692-0.587-1.473-1.104 + C4.768,10.249,4.25,9.871,3.996,9.636C3.741,9.401,3.531,9.077,3.364,8.663c-0.167-0.415-0.25-0.943-0.25-1.587c0-0.928,0.118-1.607,0.355-2.037c0.237-0.429,0.62-0.765,1.148-1.007c0.529-0.242,1.168-0.363,1.916-0.363c0.818,0,1.516,0.132,2.092,0.397 + S9.583,4.664,9.77,5.065s0.281,1.084,0.281,2.047v0.479z"/> + <path d="M12.166,3.919h5.266v2.438h-2.109v2.297h1.969v2.313h-1.969v2.656h2.312v2.438h-5.469V3.919z"/> + <path d="M26.784,9.201h-3.156V7.102c0-0.61-0.034-0.991-0.101-1.143c-0.067-0.151-0.215-0.227-0.444-0.227c-0.258,0-0.422,0.092-0.492,0.277c-0.069,0.185-0.104,0.583-0.104,1.196v5.622c0,0.589,0.035,0.972,0.104,1.151c0.07,0.18,0.226,0.27,0.47,0.27 + c0.233,0,0.386-0.091,0.458-0.271c0.072-0.181,0.108-0.604,0.108-1.269v-1.523h3.156v0.473c0,1.258-0.089,2.149-0.266,2.676c-0.177,0.525-0.569,0.986-1.176,1.383c-0.607,0.396-1.355,0.594-2.244,0.594c-0.924,0-1.686-0.168-2.285-0.502 + c-0.599-0.335-0.996-0.799-1.191-1.391s-0.292-1.482-0.292-2.671V8.203c0-0.874,0.03-1.53,0.09-1.967c0.06-0.438,0.238-0.858,0.535-1.263c0.297-0.405,0.709-0.723,1.236-0.956s1.132-0.349,1.816-0.349c0.929,0,1.695,0.179,2.299,0.539 + c0.604,0.358,1.001,0.806,1.191,1.341c0.189,0.536,0.285,1.369,0.285,2.5v1.151z"/> + <path d="M28.774,3.919h2.233c1.489,0,2.497,0.058,3.024,0.172c0.527,0.115,0.957,0.409,1.29,0.882c0.332,0.473,0.499,1.228,0.499,2.263c0,0.946-0.118,1.581-0.354,1.906c-0.234,0.325-0.697,0.521-1.387,0.585c0.625,0.155,1.045,0.362,1.26,0.622 + s0.348,0.498,0.4,0.716c0.053,0.217,0.08,0.815,0.08,1.794v3.2h-2.938v-4.031c0-0.648-0.052-1.051-0.153-1.206c-0.102-0.154-0.368-0.231-0.8-0.231v5.469h-3.156V3.919z M31.931,5.998v2.703c0.352,0,0.599-0.048,0.74-0.146s0.213-0.415,0.213-0.95V6.936 + c0-0.385-0.068-0.638-0.205-0.758s-0.387-0.18-0.748-0.18z"/> + <path d="M37.906,3.919h5.266v2.438h-2.109v2.297h1.969v2.313h-1.969v2.656h2.312v2.438h-5.469V3.919z"/> + <path d="M51.306,3.919v2.438h-1.875v9.704h-3.156V6.357h-1.859V3.919h6.891z"/> + </g> + </g> + </g> +</svg> diff --git a/icons/emblem-shared.svg b/icons/emblem-shared.svg new file mode 100644 index 000000000..fda3ea4fc --- /dev/null +++ b/icons/emblem-shared.svg @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd" [ + <!ENTITY st0 "fill:none;stroke:#006532;stroke-width:3.2992;"> + <!ENTITY st1 "fill:#9ED67D;stroke:#006532;stroke-width:3.2992;"> + <!ENTITY st2 "fill:#3EA639;stroke:none;"> + <!ENTITY st3 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;"> +]> +<svg width="42" height="26pt" viewBox="0 0 426 26" xml:space="preserve"> + <g id="Layer_x0020_1" style="&st3;"> + <g> + <g> + <g> + <path style="&st1;" d="M12.976,24.304c6.256,0,11.33-5.071,11.33-11.328c0-6.257-5.074-11.328-11.33-11.328c-6.256,0-11.329,5.071-11.329,11.328c0,6.257,5.072,11.328,11.329,11.328z"/> + </g> + </g> + <g> + <g> + <path style="&st1;" d="M27.18,24.323c6.257,0,11.329-5.072,11.329-11.329c0-6.256-5.072-11.328-11.329-11.328S15.851,6.738,15.851,12.994c0,6.257,5.072,11.329,11.329,11.329z"/> + </g> + </g> + <path style="&st2;" d="M20.711,4.288c-1.686,1.467-3.447,3.959-3.665,5.719c-0.221,1.76-0.735,2.492-0.295,4.546c0.442,2.052,0.88,3.444,1.76,4.546c0.879,1.099,1.906,2.053,2.126,2.272s0.073,0.073,1.467-2.272c1.393-2.348,1.832-3.959,1.832-5.939 + s-0.66-4.619-1.026-5.719c-0.366-1.099-2.199-3.153-2.199-3.153z"/> + <g> + <g> + <path style="&st0;" d="M12.976,24.304c6.256,0,11.33-5.071,11.33-11.328c0-6.257-5.074-11.328-11.33-11.328c-6.256,0-11.329,5.071-11.329,11.328c0,6.257,5.072,11.328,11.329,11.328z"/> + </g> + </g> + <g> + <g> + <path style="&st0;" d="M27.18,24.323c6.257,0,11.329-5.072,11.329-11.329c0-6.256-5.072-11.328-11.329-11.328S15.851,6.738,15.851,12.994c0,6.257,5.072,11.329,11.329,11.329z"/> + </g> + </g> + </g> + </g> +</svg> diff --git a/icons/hand.svg b/icons/hand.svg new file mode 100644 index 000000000..74715796d --- /dev/null +++ b/icons/hand.svg @@ -0,0 +1,22 @@ +<svg width="95" height="82"> + <!-- Service_hand.eps converted by ill2svg.pl --> + <defs> + </defs> + <g> <!-- Layer: Layer 1 --> + <g style="fill: #000000"> + <path d="M9.726 43.049C9.726 43.049 17.055 35.471 17.217 31.182C17.448 25.053 16.985 21.963 22.315 19.029C25.965 17.018 33.943 15.405 37.294 13.791C40.644 12.176 46.378 4.782 47.818 1.653C48.745 -0.362 50.183 1.493 51.262 2.517C53.135 4.292 53.871 6.332 53.935 8.577C54.017 11.367 50.744 16.275 48.976 18.104C47.929 19.186 51.572 18.008 53.762 18.44C55.951 18.87 58.2 19.768 58.547 18.774C59.323 16.554 63.323 12.946 64.361 12.221C68.932 9.026 71.424 13.127 72.617 11.993C71.361 13.187 78.72 6.326 84.479 8.34C85.968 8.86 90.073 5.727 92.937 7.612C94.791 8.832 94.205 12.074 93.218 13.623C92.231 15.172 90.424 15.877 87.511 17.2C84.598 18.521 80.171 20.985 79.297 21.571C77.344 22.882 72.638 28.826 69.851 32.977C67.264 36.828 68.69 35.023 66.333 36.985C62.319 40.326 45.103 39.585 42.889 40.817C40.676 42.049 39.667 44.707 38.593 48.125C37.236 52.448 36.11 56.505 34.453 58.377C31.896 61.266 25.91 60.065 22.286 57.684C18.661 55.302 10.281 52.818 9.336 49.146C8.392 45.472 9.726 43.049 9.726 43.049z"/> + </g> + <g style="fill: #ffffff"> + <path d="M19.735 34.179C20.227 30.94 16.253 40.316 11.802 44.443C10.796 45.375 18.47 53.017 23.297 54.589C27.999 56.122 29.985 56.816 31.325 56.17C32.665 55.524 33.389 53.771 35.04 50.003C36.577 46.497 38.696 43.37 37.793 43.722C34.656 44.947 27.845 43.81 25.064 40.611C22.283 37.409 19.477 35.872 19.735 34.179z"/> + </g> + <g style="fill: #ffbf7f"> + <path d="M23.924 20.601C22.349 21.657 20.544 21.982 20.059 25.601C19.682 28.418 21.422 32.54 22.624 34.521C23.826 36.501 28.007 39.522 30.663 39.893C33.319 40.264 36.214 42.502 38.541 40.307C40.868 38.112 43.201 37.812 47.604 37.012C52.007 36.211 59.944 37.091 62.535 35.1C65.125 33.108 63.971 27.802 64.779 24.853C65.587 21.904 66.419 17.293 67.669 15.947C68.919 14.601 70.284 12.292 68.447 12.765C66.611 13.237 65.122 12.716 61.926 17.394C59.66 20.712 58.325 22.597 57.899 26.683C57.592 29.642 53.75 27.166 50.691 25.946C48.442 25.049 47.743 25.138 45.673 25.641C43.603 26.143 39.86 26.196 43.688 24.946C53.246 21.825 55.363 27.244 55.591 25.319C55.705 24.356 57.865 21.522 56.249 21.204C48.952 19.767 41.494 21.233 43.963 19.694C49.233 16.411 47.194 17.147 49.868 13.959C53.295 9.873 51.238 4.298 49.576 4.274C47.913 4.25 45.802 10.372 42.6 12.755C39.136 15.332 41.206 14.831 37.096 16.068C32.986 17.306 25.234 19.722 23.924 20.601z"/> + <!-- 0 N --> + <path d="M32.119 19.789M66.639 31.966C66.957 34.446 73.435 22.084 75.529 19.919C77.551 17.829 84.173 13.358 83.235 11.582C82.295 9.805 79.168 9.27 74.226 13.447C70.588 16.522 71.001 17.892 69.577 19.734C68.793 20.749 66.141 28.078 66.639 31.966z"/> + <path d="M81.386 17.51C80.06 18.739 90.972 13.537 91.262 13.162C92.686 11.32 92.794 8.46 89.994 8.819C87.195 9.178 86.118 10.027 85.681 10.32C85.245 10.613 86.178 10.494 86.184 12.39C86.19 14.286 82.869 16.134 81.386 17.51z"/> + </g> + <g style="fill: #000000"> + <path d="M10.282 43.689C10.282 43.689 8.38 41.799 7.363 43.115C6.346 44.43 1.708 54.509 0.812 56.758C-0.086 59.007 3.964 57.303 5.698 61.586C7.432 65.87 10.817 66.384 14.293 67.599C17.769 68.813 17.14 73.162 19.365 75.723C21.59 78.284 25.453 82.531 27.667 81.299C29.88 80.067 38.463 61.758 37.665 59.389C35.751 53.706 33.609 59.197 27.305 58.107C21 57.018 18.955 55.857 16.263 53.356C13.571 50.856 10.282 43.689 10.282 43.689z"/> + </g> + </g> +</svg> diff --git a/icons/i-directory-192.png b/icons/i-directory-192.png new file mode 100644 index 000000000..ff6b0ebeb Binary files /dev/null and b/icons/i-directory-192.png differ diff --git a/icons/nautilus-logo.png b/icons/nautilus-logo.png new file mode 100644 index 000000000..3af114566 Binary files /dev/null and b/icons/nautilus-logo.png differ diff --git a/libnautilus-extensions/Makefile.am b/libnautilus-extensions/Makefile.am index de210c64a..2705dbf38 100644 --- a/libnautilus-extensions/Makefile.am +++ b/libnautilus-extensions/Makefile.am @@ -56,6 +56,7 @@ nautilus_metafile_server_idl_sources = \ libnautilus_extensions_la_SOURCES = \ $(nautilus_metafile_server_idl_sources) \ + nautilus-annotation.c \ nautilus-art-extensions.c \ nautilus-art-gtk-extensions.c \ nautilus-background-canvas-group.c \ @@ -169,6 +170,7 @@ libnautilus_extensions_la_SOURCES = \ # Everything is private for now noinst_HEADERS = \ + nautilus-annotation.h \ nautilus-art-extensions.h \ nautilus-art-gtk-extensions.h \ nautilus-background-canvas-group.h \ diff --git a/libnautilus-extensions/bug-5712-pr3-workaround--gdk-pixbuf-drawable.c b/libnautilus-extensions/bug-5712-pr3-workaround--gdk-pixbuf-drawable.c new file mode 100644 index 000000000..7c8b32c86 --- /dev/null +++ b/libnautilus-extensions/bug-5712-pr3-workaround--gdk-pixbuf-drawable.c @@ -0,0 +1,1196 @@ +/* FIXME bugzilla.eazel.com 5813: + * As soon as gtk 1.2.9 is released, this hack needs to be exorcised. + */ + +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* GdkPixbuf library - convert X drawable information to RGB + * + * Copyright (C) 1999 Michael Zucchi + * + * Authors: Michael Zucchi <zucchi@zedzone.mmc.com.au> + * Cody Russell <bratsche@gnome.org> + * Federico Mena-Quintero <federico@gimp.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include <config.h> +#include <stdio.h> +#include <string.h> +#include "bug-5712-pr3-workaround--gdk-pixbuf-private.h" + +#if (G_BYTE_ORDER == G_LITTLE_ENDIAN) +#define LITTLE +#endif +#define d(x) + + + +static guint32 mask_table[] = { + 0x00000000, 0x00000001, 0x00000003, 0x00000007, + 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, + 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff, + 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, + 0x0000ffff, 0x0001ffff, 0x0003ffff, 0x0007ffff, + 0x000fffff, 0x001fffff, 0x003fffff, 0x007fffff, + 0x00ffffff, 0x01ffffff, 0x03ffffff, 0x07ffffff, + 0x0fffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, + 0xffffffff +}; + + + +/* + convert 1 bits-pixel data + no alpha +*/ +static void +rgb1 (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + guint8 *s; + register guint8 data; + guint8 *o; + guint8 *srow = image->mem, *orow = pixels; + + d (printf ("1 bits/pixel\n")); + + /* convert upto 8 pixels/time */ + /* its probably not worth trying to make this run very fast, who uses + 1 bit displays anymore? */ + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + + for (xx = 0; xx < width; xx ++) { + data = srow[xx >> 3] >> (7 - (xx & 7)) & 1; + *o++ = colormap->colors[data].red; + *o++ = colormap->colors[data].green; + *o++ = colormap->colors[data].blue; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 1 bits/pixel data + with alpha +*/ +static void +rgb1a (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + guint8 *s; + register guint8 data; + guint8 *o; + guint8 *srow = image->mem, *orow = pixels; + guint32 remap[2]; + + d (printf ("1 bits/pixel\n")); + + /* convert upto 8 pixels/time */ + /* its probably not worth trying to make this run very fast, who uses + 1 bit displays anymore? */ + width = image->width; + height = image->height; + bpl = image->bpl; + + for (xx = 0; xx < 2; xx++) { +#ifdef LITTLE + remap[xx] = 0xff000000 + | colormap->colors[xx].blue << 16 + | colormap->colors[xx].green << 8 + | colormap->colors[xx].red; +#else + remap[xx] = 0xff + | colormap->colors[xx].red << 24 + | colormap->colors[xx].green << 16 + | colormap->colors[xx].blue << 8; +#endif + } + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + + for (xx = 0; xx < width; xx ++) { + data = srow[xx >> 3] >> (7 - (xx & 7)) & 1; + *o++ = remap[data]; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 8 bits/pixel data + no alpha +*/ +static void +rgb8 (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + guint32 mask; + register guint32 data; + guint8 *srow = image->mem, *orow = pixels; + register guint8 *s; + register guint8 *o; + + width = image->width; + height = image->height; + bpl = image->bpl; + + d (printf ("8 bit, no alpha output\n")); + + mask = mask_table[image->depth]; + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + for (xx = 0; xx < width; xx++) { + data = *s++ & mask; + *o++ = colormap->colors[data].red; + *o++ = colormap->colors[data].green; + *o++ = colormap->colors[data].blue; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 8 bits/pixel data + with alpha +*/ +static void +rgb8a (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + guint32 mask; + register guint32 data; + guint32 remap[256]; + register guint8 *s; /* read 2 pixels at once */ + register guint32 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + d (printf ("8 bit, with alpha output\n")); + + mask = mask_table[image->depth]; + + for (xx = 0; xx < colormap->size; xx++) { +#ifdef LITTLE + remap[xx] = 0xff000000 + | colormap->colors[xx].blue << 16 + | colormap->colors[xx].green << 8 + | colormap->colors[xx].red; +#else + remap[xx] = 0xff + | colormap->colors[xx].red << 24 + | colormap->colors[xx].green << 16 + | colormap->colors[xx].blue << 8; +#endif + } + + for (yy = 0; yy < height; yy++) { + s = srow; + o = (guint32 *) orow; + for (xx = 0; xx < width; xx ++) { + data = *s++ & mask; + *o++ = remap[data]; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 16 bits/pixel data + no alpha + data in lsb format +*/ +static void +rgb565lsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint32 *s; /* read 2 pixels at once */ +#else + register guint8 *s; /* read 2 pixels at once */ +#endif + register guint16 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint32 *) srow; +#else + s = srow; +#endif + o = (guint16 *) orow; + for (xx = 1; xx < width; xx += 2) { + register guint32 data; +#ifdef LITTLE + data = *s++; + *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13 + | (data & 0x7e0) << 5 | (data & 0x600) >> 1; + *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2 + | (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21; + *o++ = (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25 + | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10; +#else + /* swap endianness first */ + data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + s += 4; + *o++ = (data & 0xf800) | (data & 0xe000) >> 5 + | (data & 0x7e0) >> 3 | (data & 0x600) >> 9; + *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6 + | (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29; + *o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17 + | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18; +#endif + } + /* check for last remaining pixel */ + if (width & 1) { + register guint16 data; +#ifdef LITTLE + data = *((short *) s); +#else + data = *((short *) s); + data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); +#endif + ((char *) o)[0] = ((data >> 8) & 0xf8) | ((data >> 13) & 0x7); + ((char *) o)[1] = ((data >> 3) & 0xfc) | ((data >> 9) & 0x3); + ((char *) o)[2] = ((data << 3) & 0xf8) | ((data >> 2) & 0x7); + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 16 bits/pixel data + no alpha + data in msb format +*/ +static void +rgb565msb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint8 *s; /* need to swap data order */ +#else + register guint32 *s; /* read 2 pixels at once */ +#endif + register guint16 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = srow; +#else + s = (guint32 *) srow; +#endif + o = (guint16 *) orow; + for (xx = 1; xx < width; xx += 2) { + register guint32 data; +#ifdef LITTLE + /* swap endianness first */ + data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + s += 4; + *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13 + | (data & 0x7e0) << 5 | (data & 0x600) >> 1; + *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2 + | (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21; + *o++ = (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25 + | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10; +#else + data = *s++; + *o++ = (data & 0xf800) | (data & 0xe000) >> 5 + | (data & 0x7e0) >> 3 | (data & 0x600) >> 9; + *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6 + | (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29; + *o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17 + | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18; +#endif + } + /* check for last remaining pixel */ + if (width & 1) { + register guint16 data; +#ifdef LITTLE + data = *((short *) s); + data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); +#else + data = *((short *) s); +#endif + ((char *) o)[0] = ((data >> 8) & 0xf8) | ((data >> 13) & 0x7); + ((char *) o)[1] = ((data >> 3) & 0xfc) | ((data >> 9) & 0x3); + ((char *) o)[2] = ((data << 3) & 0xf8) | ((data >> 2) & 0x7); + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 16 bits/pixel data + with alpha + data in lsb format +*/ +static void +rgb565alsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint16 *s; /* read 1 pixels at once */ +#else + register guint8 *s; +#endif + register guint32 *o; + + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint16 *) srow; +#else + s = (guint8 *) srow; +#endif + o = (guint32 *) orow; + for (xx = 0; xx < width; xx ++) { + register guint32 data; + /* rrrrrggg gggbbbbb -> rrrrrRRR ggggggGG bbbbbBBB aaaaaaaa */ + /* little endian: aaaaaaaa bbbbbBBB ggggggGG rrrrrRRR */ +#ifdef LITTLE + data = *s++; + *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13 + | (data & 0x7e0) << 5 | (data & 0x600) >> 1 + | (data & 0x1f) << 19 | (data & 0x1c) << 14 + | 0xff000000; +#else + /* swap endianness first */ + data = s[0] | s[1] << 8; + s += 2; + *o++ = (data & 0xf800) << 16 | (data & 0xe000) << 11 + | (data & 0x7e0) << 13 | (data & 0x600) << 7 + | (data & 0x1f) << 11 | (data & 0x1c) << 6 + | 0xff; +#endif + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 16 bits/pixel data + with alpha + data in msb format +*/ +static void +rgb565amsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint8 *s; +#else + register guint16 *s; /* read 1 pixels at once */ +#endif + register guint32 *o; + + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { + s = srow; + o = (guint32 *) orow; + for (xx = 0; xx < width; xx ++) { + register guint32 data; + /* rrrrrggg gggbbbbb -> rrrrrRRR gggggg00 bbbbbBBB aaaaaaaa */ + /* little endian: aaaaaaaa bbbbbBBB gggggg00 rrrrrRRR */ +#ifdef LITTLE + /* swap endianness first */ + data = s[0] | s[1] << 8; + s += 2; + *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13 + | (data & 0x7e0) << 5 | (data & 0x600) >> 1 + | (data & 0x1f) << 19 | (data & 0x1c) << 14 + | 0xff000000; +#else + data = *s++; + *o++ = (data & 0xf800) << 16 | (data & 0xe000) << 11 + | (data & 0x7e0) << 13 | (data & 0x600) << 7 + | (data & 0x1f) << 11 | (data & 0x1c) << 6 + | 0xff; +#endif + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 15 bits/pixel data + no alpha + data in lsb format +*/ +static void +rgb555lsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint32 *s; /* read 2 pixels at once */ +#else + register guint8 *s; /* read 2 pixels at once */ +#endif + register guint16 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint32 *) srow; +#else + s = srow; +#endif + o = (guint16 *) orow; + for (xx = 1; xx < width; xx += 2) { + register guint32 data; +#ifdef LITTLE + data = *s++; + *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12 + | (data & 0x3e0) << 6 | (data & 0x380) << 1; + *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2 + | (data & 0x7c000000) >> 15 | (data & 0x70000000) >> 20; + *o++ = (data & 0x3e00000) >> 18 | (data & 0x3800000) >> 23 + | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10; +#else + /* swap endianness first */ + data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + s += 4; + *o++ = (data & 0x7c00) << 1 | (data & 0x7000) >> 4 + | (data & 0x3e0) >> 2 | (data & 0x380) >> 7; + *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6 + | (data & 0x7c000000) >> 23 | (data & 0x70000000) >> 28; + *o++ = (data & 0x3e00000) >> 10 | (data & 0x3800000) >> 15 + | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18; +#endif + } + /* check for last remaining pixel */ + if (width & 1) { + register guint16 data; +#ifdef LITTLE + data = *((short *) s); +#else + data = *((short *) s); + data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); +#endif + ((char *) o)[0] = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12; + ((char *) o)[1] = (data & 0x3e0) >> 2 | (data & 0x380) >> 7; + ((char *) o)[2] = (data & 0x1f) << 3 | (data & 0x1c) >> 2; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 15 bits/pixel data + no alpha + data in msb format +*/ +static void +rgb555msb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint8 *s; /* read 2 pixels at once */ +#else + register guint32 *s; /* read 2 pixels at once */ +#endif + register guint16 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { + s = srow; + o = (guint16 *) orow; + for (xx = 1; xx < width; xx += 2) { + register guint32 data; +#ifdef LITTLE + /* swap endianness first */ + data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + s += 4; + *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12 + | (data & 0x3e0) << 6 | (data & 0x380) << 1; + *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2 + | (data & 0x7c000000) >> 15 | (data & 0x70000000) >> 20; + *o++ = (data & 0x3e00000) >> 18 | (data & 0x3800000) >> 23 + | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10; +#else + data = *s++; + *o++ = (data & 0x7c00) << 1 | (data & 0x7000) >> 4 + | (data & 0x3e0) >> 2 | (data & 0x380) >> 7; + *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6 + | (data & 0x7c000000) >> 23 | (data & 0x70000000) >> 28; + *o++ = (data & 0x3e00000) >> 10 | (data & 0x3800000) >> 15 + | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18; +#endif + } + /* check for last remaining pixel */ + if (width & 1) { + register guint16 data; +#ifdef LITTLE + data = *((short *) s); + data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); +#else + data = *((short *) s); +#endif + ((char *) o)[0] = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12; + ((char *) o)[1] = (data & 0x3e0) >> 2 | (data & 0x380) >> 7; + ((char *) o)[2] = (data & 0x1f) << 3 | (data & 0x1c) >> 2; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 15 bits/pixel data + with alpha + data in lsb format +*/ +static void +rgb555alsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint16 *s; /* read 1 pixels at once */ +#else + register guint8 *s; +#endif + register guint32 *o; + + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint16 *) srow; +#else + s = srow; +#endif + o = (guint32 *) orow; + for (xx = 0; xx < width; xx++) { + register guint32 data; + /* rrrrrggg gggbbbbb -> rrrrrRRR gggggGGG bbbbbBBB aaaaaaaa */ + /* little endian: aaaaaaaa bbbbbBBB gggggGGG rrrrrRRR */ +#ifdef LITTLE + data = *s++; + *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12 + | (data & 0x3e0) << 6 | (data & 0x380) << 1 + | (data & 0x1f) << 19 | (data & 0x1c) << 14 + | 0xff000000; +#else + /* swap endianness first */ + data = s[0] | s[1] << 8; + s += 2; + *o++ = (data & 0x7c00) << 17 | (data & 0x7000) << 12 + | (data & 0x3e0) << 14 | (data & 0x380) << 9 + | (data & 0x1f) << 11 | (data & 0x1c) << 6 + | 0xff; +#endif + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 15 bits/pixel data + with alpha + data in msb format +*/ +static void +rgb555amsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint16 *s; /* read 1 pixels at once */ +#else + register guint8 *s; +#endif + register guint32 *o; + + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint16 *) srow; +#else + s = srow; +#endif + o = (guint32 *) orow; + for (xx = 0; xx < width; xx++) { + register guint32 data; + /* rrrrrggg gggbbbbb -> rrrrrRRR gggggGGG bbbbbBBB aaaaaaaa */ + /* little endian: aaaaaaaa bbbbbBBB gggggGGG rrrrrRRR */ +#ifdef LITTLE + /* swap endianness first */ + data = s[0] | s[1] << 8; + s += 2; + *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12 + | (data & 0x3e0) << 6 | (data & 0x380) << 1 + | (data & 0x1f) << 19 | (data & 0x1c) << 14 + | 0xff000000; +#else + data = *s++; + *o++ = (data & 0x7c00) << 17 | (data & 0x7000) << 12 + | (data & 0x3e0) << 14 | (data & 0x380) << 9 + | (data & 0x1f) << 11 | (data & 0x1c) << 6 + | 0xff; +#endif + } + srow += bpl; + orow += rowstride; + } +} + + +static void +rgb888alsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + + guint8 *s; /* for byte order swapping */ + guint8 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + d (printf ("32 bits/pixel with alpha\n")); + + /* lsb data */ + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + for (xx = 0; xx < width; xx++) { + *o++ = s[2]; + *o++ = s[1]; + *o++ = s[0]; + *o++ = 0xff; + s += 4; + } + srow += bpl; + orow += rowstride; + } +} + +static void +rgb888lsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + + guint8 *srow = image->mem, *orow = pixels; + guint8 *o, *s; + + width = image->width; + height = image->height; + bpl = image->bpl; + + d (printf ("32 bit, lsb, no alpha\n")); + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + for (xx = 0; xx < width; xx++) { + *o++ = s[2]; + *o++ = s[1]; + *o++ = s[0]; + s += 4; + } + srow += bpl; + orow += rowstride; + } +} + +static void +rgb888amsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + + guint8 *srow = image->mem, *orow = pixels; +#ifdef LITTLE + guint32 *o; + guint32 *s; +#else + guint8 *s; /* for byte order swapping */ + guint8 *o; +#endif + + d (printf ("32 bit, msb, with alpha\n")); + + width = image->width; + height = image->height; + bpl = image->bpl; + + /* msb data */ + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint32 *) srow; + o = (guint32 *) orow; +#else + s = srow; + o = orow; +#endif + for (xx = 0; xx < width; xx++) { +#ifdef LITTLE + *o++ = s[1]; + *o++ = s[2]; + *o++ = s[3]; + *o++ = 0xff; + s += 4; +#else + *o++ = (*s << 8) | 0xff; /* untested */ + s++; +#endif + } + srow += bpl; + orow += rowstride; + } +} + +static void +rgb888msb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + + guint8 *srow = image->mem, *orow = pixels; + guint8 *s; + guint8 *o; + + d (printf ("32 bit, msb, no alpha\n")); + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + for (xx = 0; xx < width; xx++) { + *o++ = s[1]; + *o++ = s[2]; + *o++ = s[3]; + s += 4; + } + srow += bpl; + orow += rowstride; + } +} + +/* + This should work correctly with any display/any endianness, but will probably + run quite slow +*/ +static void +convert_real_slow (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *cmap, int alpha) +{ + int xx, yy; + int width, height; + int bpl; + guint8 *srow = image->mem, *orow = pixels; + guint8 *s; + guint8 *o; + guint32 pixel; + GdkVisual *v; + guint8 component; + int i; + + width = image->width; + height = image->height; + bpl = image->bpl; + v = gdk_colormap_get_visual(cmap); + + d(printf("rgb mask/shift/prec = %x:%x:%x %d:%d:%d %d:%d:%d\n", + v->red_mask, v->green_mask, v->blue_mask, + v->red_shift, v->green_shift, v->blue_shift, + v->red_prec, v->green_prec, v->blue_prec)); + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + for (xx = 0; xx < width; xx++) { + pixel = gdk_image_get_pixel(image, xx, yy); + switch (v->type) { + /* I assume this is right for static & greyscale's too? */ + case GDK_VISUAL_STATIC_GRAY: + case GDK_VISUAL_GRAYSCALE: + case GDK_VISUAL_STATIC_COLOR: + case GDK_VISUAL_PSEUDO_COLOR: + *o++ = cmap->colors[pixel].red; + *o++ = cmap->colors[pixel].green; + *o++ = cmap->colors[pixel].blue; + break; + case GDK_VISUAL_TRUE_COLOR: + /* This is odd because it must sometimes shift left (otherwise + I'd just shift >> (*_shift - 8 + *_prec + <0-7>). This logic + should work for all bit sizes/shifts/etc. */ + component = 0; + for (i = 24; i < 32; i += v->red_prec) + component |= ((pixel & v->red_mask) << (32 - v->red_shift - v->red_prec)) >> i; + *o++ = component; + component = 0; + for (i = 24; i < 32; i += v->green_prec) + component |= ((pixel & v->green_mask) << (32 - v->green_shift - v->green_prec)) >> i; + *o++ = component; + component = 0; + for (i = 24; i < 32; i += v->blue_prec) + component |= ((pixel & v->blue_mask) << (32 - v->blue_shift - v->blue_prec)) >> i; + *o++ = component; + break; + case GDK_VISUAL_DIRECT_COLOR: + *o++ = cmap->colors[((pixel & v->red_mask) << (32 - v->red_shift - v->red_prec)) >> 24].red; + *o++ = cmap->colors[((pixel & v->green_mask) << (32 - v->green_shift - v->green_prec)) >> 24].green; + *o++ = cmap->colors[((pixel & v->blue_mask) << (32 - v->blue_shift - v->blue_prec)) >> 24].blue; + break; + } + if (alpha) + *o++ = 0xff; + } + srow += bpl; + orow += rowstride; + } +} + +typedef void (* cfunc) (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *cmap); + +static cfunc convert_map[] = { + rgb1,rgb1,rgb1a,rgb1a, + rgb8,rgb8,rgb8a,rgb8a, + rgb555lsb,rgb555msb,rgb555alsb,rgb555amsb, + rgb565lsb,rgb565msb,rgb565alsb,rgb565amsb, + rgb888lsb,rgb888msb,rgb888alsb,rgb888amsb +}; + +/* + perform actual conversion + + If we can, try and use the optimised code versions, but as a default + fallback, and always for direct colour, use the generic/slow but complete + conversion function. +*/ +static void +rgbconvert (GdkImage *image, guchar *pixels, int rowstride, int alpha, GdkColormap *cmap) +{ + int index = (image->byte_order == GDK_MSB_FIRST) | (alpha != 0) << 1; + int bank=5; /* default fallback converter */ + GdkVisual *v = gdk_colormap_get_visual(cmap); + + d(printf("masks = %x:%x:%x\n", v->red_mask, v->green_mask, v->blue_mask)); + d(printf("image depth = %d, bpp = %d\n", image->depth, image->bpp)); + + switch (v->type) { + /* I assume this is right for static & greyscale's too? */ + case GDK_VISUAL_STATIC_GRAY: + case GDK_VISUAL_GRAYSCALE: + case GDK_VISUAL_STATIC_COLOR: + case GDK_VISUAL_PSEUDO_COLOR: + switch (image->bpp) { + case 1: + bank = 0; + break; + case 8: + bank = 1; + break; + } + break; + case GDK_VISUAL_TRUE_COLOR: + switch (image->depth) { + case 15: + if (v->red_mask == 0x7c00 && v->green_mask == 0x3e0 && v->blue_mask == 0x1f + && image->bpp == 16) + bank = 2; + break; + case 16: + if (v->red_mask == 0xf800 && v->green_mask == 0x7e0 && v->blue_mask == 0x1f + && image->bpp == 16) + bank = 3; + break; + case 24: + case 32: + if (v->red_mask == 0xff0000 && v->green_mask == 0xff00 && v->blue_mask == 0xff + && image->bpp == 32) + bank = 4; + break; + } + break; + case GDK_VISUAL_DIRECT_COLOR: + /* always use the slow version */ + break; + } + + d(printf("converting using conversion function in bank %d\n", bank)); + + if (bank==5) { + convert_real_slow(image, pixels, rowstride, cmap, alpha); + } else { + index |= bank << 2; + (* convert_map[index]) (image, pixels, rowstride, cmap); + } +} + + +/* Exported functions */ + +/** + * gdk_pixbuf_get_from_drawable: + * @dest: Destination pixbuf, or NULL if a new pixbuf should be created. + * @src: Source drawable. + * @cmap: A colormap if @src is a pixmap. If it is a window, this argument will + * be ignored. + * @src_x: Source X coordinate within drawable. + * @src_y: Source Y coordinate within drawable. + * @dest_x: Destination X coordinate in pixbuf, or 0 if @dest is NULL. + * @dest_y: Destination Y coordinate in pixbuf, or 0 if @dest is NULL. + * @width: Width in pixels of region to get. + * @height: Height in pixels of region to get. + * + * Transfers image data from a Gdk drawable and converts it to an RGB(A) + * representation inside a GdkPixbuf. + * + * If the drawable @src is a pixmap, then a suitable colormap must be specified, + * since pixmaps are just blocks of pixel data without an associated colormap. + * If the drawable is a window, the @cmap argument will be ignored and the + * window's own colormap will be used instead. + * + * If the specified destination pixbuf @dest is #NULL, then this function will + * create an RGB pixbuf with 8 bits per channel and no alpha, with the same size + * specified by the @width and @height arguments. In this case, the @dest_x and + * @dest_y arguments must be specified as 0, otherwise the function will return + * #NULL. If the specified destination pixbuf is not NULL and it contains alpha + * information, then the filled pixels will be set to full opacity. + * + * If the specified drawable is a pixmap, then the requested source rectangle + * must be completely contained within the pixmap, otherwise the function will + * return #NULL. + * + * If the specified drawable is a window, then it must be viewable, i.e. all of + * its ancestors up to the root window must be mapped. Also, the specified + * source rectangle must be completely contained within the window and within + * the screen. If regions of the window are obscured by noninferior windows, the + * contents of those regions are undefined. The contents of regions obscured by + * inferior windows of a different depth than that of the source window will also + * be undefined. + * + * Return value: The same pixbuf as @dest if it was non-NULL, or a newly-created + * pixbuf with a reference count of 1 if no destination pixbuf was specified; in + * the latter case, NULL will be returned if not enough memory could be + * allocated for the pixbuf to be created. + **/ +GdkPixbuf * NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, + GdkDrawable *src, GdkColormap *cmap, + int src_x, int src_y, + int dest_x, int dest_y, + int width, int height); + + +GdkImage* NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_image_get (GdkWindow *window, + gint x, + gint y, + gint width, + gint height); + +GdkPixbuf * +NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, + GdkDrawable *src, GdkColormap *cmap, + int src_x, int src_y, + int dest_x, int dest_y, + int width, int height) +{ + GdkWindowType window_type; + int src_width, src_height; + GdkImage *image; + int rowstride, bpp, alpha; + + /* General sanity checks */ + + g_return_val_if_fail (src != NULL, NULL); + + window_type = gdk_window_get_type (src); + + if (window_type == GDK_WINDOW_PIXMAP) + g_return_val_if_fail (cmap != NULL, NULL); + else + /* FIXME: this is not perfect, since is_viewable() only tests + * recursively up the Gdk parent window tree, but stops at + * foreign windows or Gdk toplevels. I.e. if a window manager + * unmapped one of its own windows, this won't work. + */ + g_return_val_if_fail (gdk_window_is_viewable (src), NULL); + + if (!dest) + g_return_val_if_fail (dest_x == 0 && dest_y == 0, NULL); + else { + g_return_val_if_fail (dest->colorspace == GDK_COLORSPACE_RGB, NULL); + g_return_val_if_fail (dest->n_channels == 3 || dest->n_channels == 4, NULL); + g_return_val_if_fail (dest->bits_per_sample == 8, NULL); + } + + /* Coordinate sanity checks */ + + gdk_window_get_size (src, &src_width, &src_height); + + g_return_val_if_fail (src_x >= 0 && src_y >= 0, NULL); + g_return_val_if_fail (src_x + width <= src_width && src_y + height <= src_height, NULL); + + if (dest) { + g_return_val_if_fail (dest_x >= 0 && dest_y >= 0, NULL); + g_return_val_if_fail (dest_x + width <= dest->width, NULL); + g_return_val_if_fail (dest_y + height <= dest->height, NULL); + } + + if (window_type != GDK_WINDOW_PIXMAP) { + int ret; + int src_xorigin, src_yorigin; + int screen_width, screen_height; + int screen_srcx, screen_srcy; + + ret = gdk_window_get_origin (src, &src_xorigin, &src_yorigin); + g_return_val_if_fail (ret != FALSE, NULL); + + screen_width = gdk_screen_width (); + screen_height = gdk_screen_height (); + + screen_srcx = src_xorigin + src_x; + screen_srcy = src_yorigin + src_y; + + g_return_val_if_fail (screen_srcx >= 0 && screen_srcy >= 0, NULL); + g_return_val_if_fail (screen_srcx + width <= screen_width, NULL); + g_return_val_if_fail (screen_srcy + height <= screen_height, NULL); + } + + /* Get Image in ZPixmap format (packed bits). */ + image = NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_image_get (src, src_x, src_y, width, height); + if (!image) + return NULL; + + /* Create the pixbuf if needed */ + if (!dest) { + dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height); + if (!dest) { + gdk_image_destroy(image); + return NULL; + } + } + + /* Get the colormap if needed */ + if (window_type != GDK_WINDOW_PIXMAP) + cmap = gdk_window_get_colormap (src); + + alpha = dest->has_alpha; + rowstride = dest->rowstride; + bpp = alpha ? 4 : 3; + + /* we offset into the image data based on the position we are retrieving from */ + rgbconvert (image, dest->pixels + + (dest_y * rowstride) + (dest_x * bpp), + rowstride, + alpha, + cmap); + + gdk_image_destroy(image); + + return dest; +} diff --git a/libnautilus-extensions/bug-5712-pr3-workaround--gdk-pixbuf-private.h b/libnautilus-extensions/bug-5712-pr3-workaround--gdk-pixbuf-private.h new file mode 100644 index 000000000..c1159dc7c --- /dev/null +++ b/libnautilus-extensions/bug-5712-pr3-workaround--gdk-pixbuf-private.h @@ -0,0 +1,109 @@ +/* FIXME bugzilla.eazel.com 5813: + * As soon as gtk 1.2.9 is released, this hack needs to be exorcised. + */ + +/* GdkPixbuf library - Private declarations + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Mark Crichton <crichton@gimp.org> + * Miguel de Icaza <miguel@gnu.org> + * Federico Mena-Quintero <federico@gimp.org> + * Havoc Pennington <hp@redhat.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef GDK_PIXBUF_PRIVATE_H +#define GDK_PIXBUF_PRIVATE_H + +#include <gdk-pixbuf/gdk-pixbuf.h> + + + +/* Private part of the GdkPixbuf structure */ +struct _GdkPixbuf { + /* Reference count */ + int ref_count; + + /* Color space */ + GdkColorspace colorspace; + + /* Number of channels, alpha included */ + int n_channels; + + /* Bits per channel */ + int bits_per_sample; + + /* Size */ + int width, height; + + /* Offset between rows */ + int rowstride; + + /* The pixel array */ + guchar *pixels; + + /* Destroy notification function; it is supposed to free the pixel array */ + GdkPixbufDestroyNotify destroy_fn; + + /* User data for the destroy notification function */ + gpointer destroy_fn_data; + + /* Last unref handler, determines whether the pixbuf should be finalized */ + GdkPixbufLastUnref last_unref_fn; + + /* User data for the last unref handler */ + gpointer last_unref_fn_data; + + /* Do we have an alpha channel? */ + guint has_alpha : 1; +}; + +/* Private part of the GdkPixbufFrame structure */ +struct _GdkPixbufFrame { + /* The pixbuf with this frame's image data */ + GdkPixbuf *pixbuf; + + /* Offsets for overlaying onto the animation's area */ + int x_offset; + int y_offset; + + /* Frame duration in ms */ + int delay_time; + + /* Overlay mode */ + GdkPixbufFrameAction action; +}; + +/* Private part of the GdkPixbufAnimation structure */ +struct _GdkPixbufAnimation { + /* Reference count */ + int ref_count; + + /* Number of frames */ + int n_frames; + + /* List of GdkPixbufFrame structures */ + GList *frames; + + /* bounding box size */ + int width, height; +}; + + + +#endif diff --git a/libnautilus-extensions/bug-5712-pr3-workaround--gdkimage.c b/libnautilus-extensions/bug-5712-pr3-workaround--gdkimage.c new file mode 100644 index 000000000..f16822a2c --- /dev/null +++ b/libnautilus-extensions/bug-5712-pr3-workaround--gdkimage.c @@ -0,0 +1,133 @@ +/* FIXME bugzilla.eazel.com 5813: + * As soon as gtk 1.2.9 is released, this hack needs to be exorcised. + */ + + +/* GDK - The GIMP Drawing Kit + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* + * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + +#include <config.h> + +#include <errno.h> +#include <stdlib.h> +#include <sys/types.h> + +#include <gdk/gdk.h> +#include <gdk/gdkprivate.h> + +static void gdk_image_put_normal (GdkDrawable *drawable, + GdkGC *gc, + GdkImage *image, + gint xsrc, + gint ysrc, + gint xdest, + gint ydest, + gint width, + gint height); + +GdkImage* NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_image_get (GdkWindow *window, + gint x, + gint y, + gint width, + gint height); + +GdkImage* +NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_image_get (GdkWindow *window, + gint x, + gint y, + gint width, + gint height) +{ + GdkImage *image; + GdkImagePrivate *private; + GdkWindowPrivate *win_private; + XImage *ximage; + + g_return_val_if_fail (window != NULL, NULL); + + win_private = (GdkWindowPrivate *) window; + if (win_private->destroyed) + return NULL; + + ximage = XGetImage (gdk_display, + win_private->xwindow, + x, y, width, height, + AllPlanes, ZPixmap); + + if (ximage == NULL) + return NULL; + + private = g_new (GdkImagePrivate, 1); + image = (GdkImage*) private; + + private->xdisplay = gdk_display; + private->image_put = gdk_image_put_normal; + private->ximage = ximage; + image->type = GDK_IMAGE_NORMAL; + image->visual = gdk_window_get_visual (window); + image->width = width; + image->height = height; + image->depth = private->ximage->depth; + + image->mem = private->ximage->data; + image->bpl = private->ximage->bytes_per_line; + image->bpp = private->ximage->bits_per_pixel; + image->byte_order = private->ximage->byte_order; + + return image; +} + +static void +gdk_image_put_normal (GdkDrawable *drawable, + GdkGC *gc, + GdkImage *image, + gint xsrc, + gint ysrc, + gint xdest, + gint ydest, + gint width, + gint height) +{ + GdkWindowPrivate *drawable_private; + GdkImagePrivate *image_private; + GdkGCPrivate *gc_private; + + g_return_if_fail (drawable != NULL); + g_return_if_fail (image != NULL); + g_return_if_fail (gc != NULL); + + drawable_private = (GdkWindowPrivate*) drawable; + if (drawable_private->destroyed) + return; + image_private = (GdkImagePrivate*) image; + gc_private = (GdkGCPrivate*) gc; + + g_return_if_fail (image->type == GDK_IMAGE_NORMAL); + + XPutImage (drawable_private->xdisplay, drawable_private->xwindow, + gc_private->xgc, image_private->ximage, + xsrc, ysrc, xdest, ydest, width, height); +} diff --git a/libnautilus-extensions/nautilus-annotation.c b/libnautilus-extensions/nautilus-annotation.c new file mode 100644 index 000000000..6547e1b15 --- /dev/null +++ b/libnautilus-extensions/nautilus-annotation.c @@ -0,0 +1,897 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- + + nautilus-annotation.c: routines for getting and setting xml-based annotations associated + with the digest of a file. + + Copyright (C) 2001 Eazel, Inc. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Author: Andy Hertzfeld <andy@eazel.com> +*/ + +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5Context structure, pass it to md5_init, call md5_update as + * needed on buffers full of bytes, and then call md5_Final, which + * will fill a supplied 16-byte array with the digest. + */ + +/* parts of this file are : + * Written March 1993 by Branko Lankester + * Modified June 1993 by Colin Plumb for altered md5.c. + * Modified October 1995 by Erik Troan for RPM + */ + +#include <config.h> +#include "nautilus-annotation.h" + +#include "nautilus-file-utilities.h" +#include "nautilus-file.h" +#include "nautilus-file-private.h" +#include "nautilus-global-preferences.h" +#include "nautilus-metadata.h" +#include "nautilus-preferences.h" +#include "nautilus-string.h" +#include "nautilus-xml-extensions.h" +#include <gnome-xml/parser.h> +#include <gnome-xml/xmlmemory.h> +#include <libgnome/gnome-util.h> +#include <libgnomevfs/gnome-vfs.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +/* icon selection callback function. */ +typedef void (* NautilusCalculateDigestCallback) (NautilusFile *file, char *file_digest); +typedef struct NautilusDigestFileHandle NautilusDigestFileHandle; + +typedef struct { + guint32 buf[4]; + guint32 bits[2]; + guchar in[64]; + int doByteReverse; +} MD5Context ; + +struct NautilusDigestFileHandle { + GnomeVFSAsyncHandle *handle; + NautilusCalculateDigestCallback callback; + NautilusFile *file; + char *buffer; + gboolean opened; + MD5Context digest_context; +}; + +#define READ_CHUNK_SIZE 65536 +#define SERVER_URI_TEMPLATE "http://dellbert.differnet.com/get_notes.cgi?ids=%s" + + +static GList* annotation_request_queue = NULL; +static GHashTable *files_awaiting_annotation = NULL; + +static void md5_transform (guint32 buf[4], const guint32 in[16]); + +static int _ie = 0x44332211; +static union _endian { int i; char b[4]; } *_endian = (union _endian *)&_ie; +#define IS_BIG_ENDIAN() (_endian->b[0] == '\x44') +#define IS_LITTLE_ENDIAN() (_endian->b[0] == '\x11') + + +/* + * Note: this code is harmless on little-endian machines. + */ +static void +_byte_reverse (guchar *buf, guint32 longs) +{ + guint32 t; + do { + t = (guint32) ((guint32) buf[3] << 8 | buf[2]) << 16 | + ((guint32) buf[1] << 8 | buf[0]); + *(guint32 *) buf = t; + buf += 4; + } while (--longs); +} + +/** + * md5_init: Initialise an md5 context object + * @ctx: md5 context + * + * Initialise an md5 buffer. + * + **/ +static void +md5_init (MD5Context *ctx) +{ + ctx->buf[0] = 0x67452301; + ctx->buf[1] = 0xefcdab89; + ctx->buf[2] = 0x98badcfe; + ctx->buf[3] = 0x10325476; + + ctx->bits[0] = 0; + ctx->bits[1] = 0; + + if (IS_BIG_ENDIAN()) + ctx->doByteReverse = 1; + else + ctx->doByteReverse = 0; +} + + + +/** + * md5_update: add a buffer to md5 hash computation + * @ctx: conetxt object used for md5 computaion + * @buf: buffer to add + * @len: buffer length + * + * Update context to reflect the concatenation of another buffer full + * of bytes. Use this to progressively construct an md5 hash. + **/ +static void +md5_update (MD5Context *ctx, const guchar *buf, guint32 len) +{ + guint32 t; + + /* Update bitcount */ + + t = ctx->bits[0]; + if ((ctx->bits[0] = t + ((guint32) len << 3)) < t) + ctx->bits[1]++; /* Carry from low to high */ + ctx->bits[1] += len >> 29; + + t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ + + /* Handle any leading odd-sized chunks */ + + if (t) { + guchar *p = (guchar *) ctx->in + t; + + t = 64 - t; + if (len < t) { + memcpy (p, buf, len); + return; + } + memcpy (p, buf, t); + if (ctx->doByteReverse) + _byte_reverse (ctx->in, 16); + md5_transform (ctx->buf, (guint32 *) ctx->in); + buf += t; + len -= t; + } + /* Process data in 64-byte chunks */ + + while (len >= 64) { + memcpy (ctx->in, buf, 64); + if (ctx->doByteReverse) + _byte_reverse (ctx->in, 16); + md5_transform (ctx->buf, (guint32 *) ctx->in); + buf += 64; + len -= 64; + } + + /* Handle any remaining bytes of data. */ + + memcpy (ctx->in, buf, len); +} + + +/* + * Final wrapup - pad to 64-byte boundary with the bit pattern + * 1 0* (64-bit count of bits processed, MSB-first) + */ +/** + * md5_final: copy the final md5 hash to a bufer + * @digest: 16 bytes buffer + * @ctx: context containing the calculated md5 + * + * copy the final md5 hash to a bufer + **/ +static void +md5_final (MD5Context *ctx, guchar digest[16]) +{ + guint32 count; + guchar *p; + + /* Compute number of bytes mod 64 */ + count = (ctx->bits[0] >> 3) & 0x3F; + + /* Set the first char of padding to 0x80. This is safe since there is + always at least one byte free */ + p = ctx->in + count; + *p++ = 0x80; + + /* Bytes of padding needed to make 64 bytes */ + count = 64 - 1 - count; + + /* Pad out to 56 mod 64 */ + if (count < 8) { + /* Two lots of padding: Pad the first block to 64 bytes */ + memset (p, 0, count); + if (ctx->doByteReverse) + _byte_reverse (ctx->in, 16); + md5_transform (ctx->buf, (guint32 *) ctx->in); + + /* Now fill the next block with 56 bytes */ + memset (ctx->in, 0, 56); + } else { + /* Pad block to 56 bytes */ + memset (p, 0, count - 8); + } + if (ctx->doByteReverse) + _byte_reverse (ctx->in, 14); + + /* Append length in bits and transform */ + ((guint32 *) ctx->in)[14] = ctx->bits[0]; + ((guint32 *) ctx->in)[15] = ctx->bits[1]; + + md5_transform (ctx->buf, (guint32 *) ctx->in); + if (ctx->doByteReverse) + _byte_reverse ((guchar *) ctx->buf, 4); + memcpy (digest, ctx->buf, 16); +} + + +/* The four core functions - F1 is optimized somewhat */ + +/* #define F1(x, y, z) (x & y | ~x & z) */ +#define F1(x, y, z) (z ^ (x & (y ^ z))) +#define F2(x, y, z) F1(z, x, y) +#define F3(x, y, z) (x ^ y ^ z) +#define F4(x, y, z) (y ^ (x | ~z)) + +/* This is the central step in the MD5 algorithm. */ +#define MD5STEP(f, w, x, y, z, data, s) \ + ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x ) + +/* + * The core of the MD5 algorithm, this alters an existing MD5 hash to + * reflect the addition of 16 longwords of new data. md5_Update blocks + * the data and converts bytes into longwords for this routine. + */ +static void +md5_transform (guint32 buf[4], const guint32 in[16]) +{ + register guint32 a, b, c, d; + + a = buf[0]; + b = buf[1]; + c = buf[2]; + d = buf[3]; + + MD5STEP (F1, a, b, c, d, in[0] + 0xd76aa478, 7); + MD5STEP (F1, d, a, b, c, in[1] + 0xe8c7b756, 12); + MD5STEP (F1, c, d, a, b, in[2] + 0x242070db, 17); + MD5STEP (F1, b, c, d, a, in[3] + 0xc1bdceee, 22); + MD5STEP (F1, a, b, c, d, in[4] + 0xf57c0faf, 7); + MD5STEP (F1, d, a, b, c, in[5] + 0x4787c62a, 12); + MD5STEP (F1, c, d, a, b, in[6] + 0xa8304613, 17); + MD5STEP (F1, b, c, d, a, in[7] + 0xfd469501, 22); + MD5STEP (F1, a, b, c, d, in[8] + 0x698098d8, 7); + MD5STEP (F1, d, a, b, c, in[9] + 0x8b44f7af, 12); + MD5STEP (F1, c, d, a, b, in[10] + 0xffff5bb1, 17); + MD5STEP (F1, b, c, d, a, in[11] + 0x895cd7be, 22); + MD5STEP (F1, a, b, c, d, in[12] + 0x6b901122, 7); + MD5STEP (F1, d, a, b, c, in[13] + 0xfd987193, 12); + MD5STEP (F1, c, d, a, b, in[14] + 0xa679438e, 17); + MD5STEP (F1, b, c, d, a, in[15] + 0x49b40821, 22); + + MD5STEP (F2, a, b, c, d, in[1] + 0xf61e2562, 5); + MD5STEP (F2, d, a, b, c, in[6] + 0xc040b340, 9); + MD5STEP (F2, c, d, a, b, in[11] + 0x265e5a51, 14); + MD5STEP (F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); + MD5STEP (F2, a, b, c, d, in[5] + 0xd62f105d, 5); + MD5STEP (F2, d, a, b, c, in[10] + 0x02441453, 9); + MD5STEP (F2, c, d, a, b, in[15] + 0xd8a1e681, 14); + MD5STEP (F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); + MD5STEP (F2, a, b, c, d, in[9] + 0x21e1cde6, 5); + MD5STEP (F2, d, a, b, c, in[14] + 0xc33707d6, 9); + MD5STEP (F2, c, d, a, b, in[3] + 0xf4d50d87, 14); + MD5STEP (F2, b, c, d, a, in[8] + 0x455a14ed, 20); + MD5STEP (F2, a, b, c, d, in[13] + 0xa9e3e905, 5); + MD5STEP (F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); + MD5STEP (F2, c, d, a, b, in[7] + 0x676f02d9, 14); + MD5STEP (F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); + + MD5STEP (F3, a, b, c, d, in[5] + 0xfffa3942, 4); + MD5STEP (F3, d, a, b, c, in[8] + 0x8771f681, 11); + MD5STEP (F3, c, d, a, b, in[11] + 0x6d9d6122, 16); + MD5STEP (F3, b, c, d, a, in[14] + 0xfde5380c, 23); + MD5STEP (F3, a, b, c, d, in[1] + 0xa4beea44, 4); + MD5STEP (F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); + MD5STEP (F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); + MD5STEP (F3, b, c, d, a, in[10] + 0xbebfbc70, 23); + MD5STEP (F3, a, b, c, d, in[13] + 0x289b7ec6, 4); + MD5STEP (F3, d, a, b, c, in[0] + 0xeaa127fa, 11); + MD5STEP (F3, c, d, a, b, in[3] + 0xd4ef3085, 16); + MD5STEP (F3, b, c, d, a, in[6] + 0x04881d05, 23); + MD5STEP (F3, a, b, c, d, in[9] + 0xd9d4d039, 4); + MD5STEP (F3, d, a, b, c, in[12] + 0xe6db99e5, 11); + MD5STEP (F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); + MD5STEP (F3, b, c, d, a, in[2] + 0xc4ac5665, 23); + + MD5STEP (F4, a, b, c, d, in[0] + 0xf4292244, 6); + MD5STEP (F4, d, a, b, c, in[7] + 0x432aff97, 10); + MD5STEP (F4, c, d, a, b, in[14] + 0xab9423a7, 15); + MD5STEP (F4, b, c, d, a, in[5] + 0xfc93a039, 21); + MD5STEP (F4, a, b, c, d, in[12] + 0x655b59c3, 6); + MD5STEP (F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); + MD5STEP (F4, c, d, a, b, in[10] + 0xffeff47d, 15); + MD5STEP (F4, b, c, d, a, in[1] + 0x85845dd1, 21); + MD5STEP (F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); + MD5STEP (F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); + MD5STEP (F4, c, d, a, b, in[6] + 0xa3014314, 15); + MD5STEP (F4, b, c, d, a, in[13] + 0x4e0811a1, 21); + MD5STEP (F4, a, b, c, d, in[4] + 0xf7537e82, 6); + MD5STEP (F4, d, a, b, c, in[11] + 0xbd3af235, 10); + MD5STEP (F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); + MD5STEP (F4, b, c, d, a, in[9] + 0xeb86d391, 21); + + buf[0] += a; + buf[1] += b; + buf[2] += c; + buf[3] += d; +} + + + +/* When close is complete, there's no more work to do. */ +static void +digest_file_close_callback (GnomeVFSAsyncHandle *handle, + GnomeVFSResult result, + gpointer callback_data) +{ +} + +/* Close the file and then tell the caller we succeeded, handing off + * the buffer to the caller. + */ +static void +digest_file_completed (NautilusDigestFileHandle *digest_handle) +{ + guchar digest_result[16]; + char digest_string [33]; + char* hex_string = "0123456789abcdef"; + int index, result_index; + int current_value; + + if (digest_handle->opened) { + + gnome_vfs_async_close (digest_handle->handle, + digest_file_close_callback, + NULL); + } + + /* Invoke the callback to continue processing the annotation */ + md5_final (&digest_handle->digest_context, digest_result); + + /* make a hex string for the digest result */ + digest_string[32] = '\0'; + for (index = 0; index < 32; index++) { + current_value = digest_result[index >> 1]; + if (index & 1) { + result_index = current_value & 15; + } else { + result_index = (current_value >> 4) & 15; + } + + digest_string[index] = hex_string[result_index]; + } + + (* digest_handle->callback) (digest_handle->file, &digest_string[0]); + + nautilus_file_unref (digest_handle->file); + g_free (digest_handle->buffer); + g_free (digest_handle); +} + +/* Tell the caller we failed. */ +static void +digest_file_failed (NautilusDigestFileHandle *digest_handle, GnomeVFSResult result) +{ + if (digest_handle->opened) { + gnome_vfs_async_close (digest_handle->handle, + digest_file_close_callback, + NULL); + } + g_free (digest_handle->buffer); + + (* digest_handle->callback) (digest_handle->file, NULL); + nautilus_file_unref (digest_handle->file); + g_free (digest_handle); +} + +/* Here is the callback from the file read routine, where we actually accumulate the checksum */ +static void +calculate_checksum_callback (GnomeVFSAsyncHandle *handle, + GnomeVFSResult result, + gpointer buffer, + GnomeVFSFileSize bytes_requested, + GnomeVFSFileSize bytes_read, + gpointer callback_data) +{ + NautilusDigestFileHandle *digest_handle; + + /* Do a few reality checks. */ + g_assert (bytes_requested == READ_CHUNK_SIZE); + + digest_handle = callback_data; + g_assert (digest_handle->handle == handle); + g_assert (bytes_read <= bytes_requested); + + /* Check for a failure. */ + if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) { + digest_file_failed (digest_handle, result); + return; + } + + /* accumulate the recently read data into the checksum */ + md5_update (&digest_handle->digest_context, buffer, bytes_read); + + /* Read more unless we are at the end of the file. */ + if (bytes_read > 0 && result == GNOME_VFS_OK) { + gnome_vfs_async_read (digest_handle->handle, + digest_handle->buffer, + READ_CHUNK_SIZE, + calculate_checksum_callback, + digest_handle); + } else { + digest_file_completed (digest_handle); + } +} + +/* Once the open is finished, read a first chunk. */ +static void +read_file_open_callback (GnomeVFSAsyncHandle *handle, + GnomeVFSResult result, + gpointer callback_data) +{ + NautilusDigestFileHandle *digest_handle; + + digest_handle = callback_data; + g_assert (digest_handle->handle == handle); + + /* Handle the failure case. */ + if (result != GNOME_VFS_OK) { + digest_file_failed (digest_handle, result); + return; + } + + /* read in the first chunk of the file */ + digest_handle->opened = TRUE; + gnome_vfs_async_read (digest_handle->handle, + digest_handle->buffer, + READ_CHUNK_SIZE, + calculate_checksum_callback, + digest_handle); +} + + +/* calculate the digest for the passed-in file asynchronously, invoking the passed in + * callback when the calculation has been completed. + */ +static NautilusDigestFileHandle* +calculate_file_digest (NautilusFile *file, NautilusCalculateDigestCallback callback) +{ + NautilusDigestFileHandle *handle; + char *uri; + + /* allocate a digest-handle structure to keep our state */ + + handle = g_new0 (NautilusDigestFileHandle, 1); + uri = nautilus_file_get_uri (file); + + handle->callback = callback; + handle->opened = FALSE; + handle->file = file; + nautilus_file_ref (file); + + /* allocate the buffer */ + handle->buffer = g_malloc (READ_CHUNK_SIZE); + + /* initialize the MD5 stuff */ + md5_init (&handle->digest_context); + + /* open the file */ + gnome_vfs_async_open (&handle->handle, + uri, + GNOME_VFS_OPEN_READ, + read_file_open_callback, + handle); + g_free (uri); + return handle; +} + +/* given a digest, retrieve an associated file object from the hash table */ +static NautilusFile * +get_file_from_digest (const char *digest) +{ + if (files_awaiting_annotation == NULL) { + return NULL; + } + + return g_hash_table_lookup (files_awaiting_annotation, digest); +} + +/* given a digest value, return the path to it in the local cache */ +static char * +get_annotation_path (const char *digest) +{ + char *user_directory, *annotation_directory; + char *annotation_path, *directory_uri; + + user_directory = nautilus_get_user_directory (); + annotation_directory = nautilus_make_path (user_directory, "annotations"); + annotation_path = nautilus_make_path (annotation_directory, digest); + + /* create the annotation directory if it doesn't exist */ + if (!g_file_exists (annotation_directory)) { + directory_uri = gnome_vfs_get_uri_from_local_path (annotation_directory); + gnome_vfs_make_directory (directory_uri, + GNOME_VFS_PERM_USER_ALL + | GNOME_VFS_PERM_GROUP_ALL + | GNOME_VFS_PERM_OTHER_READ); + g_free (directory_uri); + } + + /* free up the intermediate strings and return the complete path */ + g_free (user_directory); + g_free (annotation_directory); + + return annotation_path; +} + +/* look up the passed-in digest in the local annotation cache */ +static char * +look_up_local_annotation (NautilusFile *file, const char *digest) +{ + GnomeVFSResult result; + int file_size; + char *uri, *path, *file_data; + + path = get_annotation_path (digest); + if (g_file_exists (path)) { + /* load the file and return it */ + uri = gnome_vfs_get_uri_from_local_path (path); + result = nautilus_read_entire_file (uri, &file_size, &file_data); + g_free (uri); + g_free (path); + if (result == GNOME_VFS_OK) { + return file_data; + } else { + return NULL; + } + } + g_free (path); + return NULL; +} + +static gboolean +has_local_annotation (const char *digest) +{ + gboolean has_annotation; + char *path; + + path = get_annotation_path (digest); + has_annotation = g_file_exists (path); + + g_free (path); + return has_annotation; +} + +/* utility routine to add the passed-in xml node to the file associated with the passed-in + * digest. If there isn't a file, create one + */ +static void +add_annotations_to_file (xmlNodePtr node_ptr, const char *digest) +{ + char *digest_path; + xmlDocPtr document; + + digest_path = get_annotation_path (digest); + + /* save the subtree as a new document, by making a new document and adding the new node */ + document = xmlNewDoc ("1.0"); + xmlDocSetRootElement (document, node_ptr); + + /* save the xml tree as a file in the cache area */ + xmlSaveFile (digest_path, document); + + xmlFreeDoc (document); + g_free (digest_path); +} + +/* remember the file object by adding it to a hash table */ +static void +remember_file (NautilusFile *file, const char *digest) +{ + nautilus_file_ref (file); + + if (files_awaiting_annotation == NULL) { + files_awaiting_annotation = g_hash_table_new (g_str_hash, g_str_equal); + /* g_atexit (annotations_file_table_free); */ + } + + g_hash_table_insert (files_awaiting_annotation, g_strdup (digest), file); +} + +/* forget a file when we're done with it by removing it from the table */ +static void +forget_file (const char *digest) +{ + NautilusFile *file; + if (files_awaiting_annotation == NULL) { + return; + } + + file = g_hash_table_lookup (files_awaiting_annotation, digest); + if (file != NULL) { + nautilus_file_unref (file); + g_hash_table_remove (files_awaiting_annotation, digest); + } +} + +/* completion routine invoked when we've loaded the an annotation file from the service. + * We must parse it, and walk through it to save the annotations in the local cache. + */ +static void +got_annotations_callback (GnomeVFSResult result, + GnomeVFSFileSize file_size, + char *file_contents, + gpointer callback_data) +{ + NautilusFile *file; + xmlDocPtr annotations; + xmlNodePtr next_annotation, item; + xmlNodePtr saved_annotation; + int annotation_count; + char *buffer, *digest, *info_str; + time_t date_stamp; + + /* exit if there was an error */ + if (result != GNOME_VFS_OK) { + g_assert (file_contents == NULL); + return; + } + + /* inexplicably, the gnome-xml parser requires a zero-terminated array, so add the null at the end. */ + buffer = g_realloc (file_contents, file_size + 1); + buffer[file_size] = '\0'; + annotations = xmlParseMemory (buffer, file_size); + g_free (buffer); + + /* iterate through the xml document, handling each annotation entry */ + if (annotations != NULL) { + next_annotation = xmlDocGetRootElement (annotations)->childs; + while (next_annotation != NULL) { + if (nautilus_strcmp (next_annotation->name, "annotations") == 0) { + /* get the digest associated with the annotations */ + digest = xmlGetProp (next_annotation, "digest"); + if (digest != NULL) { + /* count the number of annotations contained in the node */ + annotation_count = 0; + item = next_annotation->childs; + while (item != NULL) { + if (nautilus_strcmp (item->name, "annotation") == 0) { + annotation_count += 1; + } + item = item->next; + } + + /* write the annotation out to our cache area, if necessary */ + if (annotation_count > 0) { + saved_annotation = xmlCopyNode (next_annotation, TRUE); + add_annotations_to_file (saved_annotation, digest); + } + + /* retrieve the file object, and update it's count and time stamp */ + + file = get_file_from_digest (digest); + time (&date_stamp); + info_str = g_strdup_printf ("%lu:%d", date_stamp, annotation_count); + + nautilus_file_set_metadata (file, NAUTILUS_METADATA_KEY_NOTES_INFO, NULL, info_str); + g_free (info_str); + + /* issue the changed signal */ + nautilus_file_emit_changed (file); + + /* remove the file from the hash table and unref it */ + forget_file (digest); + xmlFree (digest); + } + } + next_annotation = next_annotation->next; + } + + + /* free the xml document */ + xmlFreeDoc (annotations); + } +} + +/* format the request, and send it to the server */ +/* the first cut implementation simply sends the digests as a cgi parameter, + * but soon we'll want use SOAP or XML-RPC + */ +static void +fetch_annotations_from_server (void) +{ + GString *temp_string; + GList *current_entry, *save_entry; + char *uri; + + /* check to see if there are enough requests, or a long enough delay since the last one */ + + current_entry = annotation_request_queue; + save_entry = current_entry; + annotation_request_queue = NULL; + + /* simple cgi-based request format passed the digests as part of the uri, so + * gather the variable parts + */ + temp_string = g_string_new (""); + while (current_entry != NULL) { + g_string_append (temp_string, (char*) current_entry->data); + if (current_entry->next != NULL) { + g_string_append (temp_string, ","); + } + current_entry = current_entry->next; + } + + + uri = g_strdup_printf (SERVER_URI_TEMPLATE, temp_string->str); + g_string_free (temp_string, TRUE); + nautilus_g_list_free_deep (save_entry); + + /* read the result from the server asynchronously */ + nautilus_read_entire_file_async (uri, got_annotations_callback, NULL); + g_free (uri); +} + + +/* ask the server for an annotation asynchronously */ +static void +get_annotation_from_server (NautilusFile *file, const char *file_digest) +{ + /* see if there's a request for this one already pending - if so, we can return */ + if (get_file_from_digest (file_digest) != NULL) { + return; + } + + /* add the request to the queue, and kick it off it there's enough of them */ + annotation_request_queue = g_list_prepend (annotation_request_queue, g_strdup (file_digest)); + + remember_file (file, file_digest); + fetch_annotations_from_server (); +} + +/* callback that's invokes when we've finished calculating the file's digest. Remember + * it in the metadata, and look up the associated annotation + */ +static void +got_file_digest (NautilusFile *file, const char *file_digest) +{ + + if (file_digest == NULL) { + return; + } + + /* save the digest in the file metadata */ + nautilus_file_set_metadata (file, NAUTILUS_METADATA_KEY_FILE_DIGEST, NULL, file_digest); + + /* lookup the annotations associated with the file. If there is one, flag the change and we're done */ + if (has_local_annotation (file_digest)) { + nautilus_file_emit_changed (file); + return; + } + + /* there isn't a local annotation, so ask the server for one */ + get_annotation_from_server (file, file_digest); + return; +} + +/* return the annotation associated with a file. If we haven't inspected this file yet, + * return NULL but queue a request for an annotation lookup, which will be processed + * asynchronously and issue a "file_changed" signal if any is found. + */ +char *nautilus_annotation_get_annotation (NautilusFile *file) +{ + char *digest; + char *annotations; + char *digest_info; + + /* if it's a directory, return NULL, at least until we figure out how to handle directory + * annotations + */ + if (nautilus_file_is_directory (file)) { + return NULL; + } + + /* see if there's a digest available in metadata */ + digest = nautilus_file_get_metadata (file, NAUTILUS_METADATA_KEY_FILE_DIGEST, NULL); + + /* there isn't a digest, so start a request for one going, and return NULL */ + if (digest == NULL) { + calculate_file_digest (file, (NautilusCalculateDigestCallback) got_file_digest); + return NULL; + } + + /* there's a digest, so we if we have the annotations for the file cached locally */ + annotations = look_up_local_annotation (file, digest); + if (annotations != NULL) { + g_free (digest); + return annotations; + } + + /* we don't have a local annotation, so queue a request from the server, if we haven't already tried */ + /* soon, we'll inspect the time stamp, and look it up anyway if it's too old */ + + digest_info = nautilus_file_get_metadata (file, NAUTILUS_METADATA_KEY_NOTES_INFO, NULL); + if (digest_info == NULL) { + get_annotation_from_server (file, digest); + } else { + g_free (digest_info); + } + + g_free (digest); + return NULL; +} + +/* return the number of annotations associated with the passed in file. If we don't know, + * return 0, but queue a request like above + */ +int nautilus_annotation_has_annotation (NautilusFile *file) +{ + char *digest_info, *digits, *temp_str; + int count; + + digest_info = nautilus_file_get_metadata (file, NAUTILUS_METADATA_KEY_NOTES_INFO, NULL); + + if (digest_info != NULL) { + digits = strrchr (digest_info, ':'); + count = atoi (digits + 1); + g_free (digest_info); + return count; + } else { + /* initiate fetching the annotations from the server */ + temp_str = nautilus_annotation_get_annotation (file); + g_free (temp_str); + } + g_free (digest_info); + return 0; +} + +/* add an annotation to a file */ +void nautilus_annotation_add_annotation (NautilusFile *file, const char *new_annotation) +{ +} + +/* remove an annotation from a file */ +void nautilus_annotation_remove_annotation (NautilusFile *file, int which_annotation) +{ +} + diff --git a/libnautilus-extensions/nautilus-annotation.h b/libnautilus-extensions/nautilus-annotation.h new file mode 100644 index 000000000..fff76d6e6 --- /dev/null +++ b/libnautilus-extensions/nautilus-annotation.h @@ -0,0 +1,38 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- + + nautilus-annotation.h: routines for getting and setting xml-based annotations associated + with the digest of a file. + + Copyright (C) 2000 Eazel, Inc. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Authors: Andy Hertzfeld <andy@eazel.com> +*/ + +#ifndef NAUTILUS_ANNOTATION_H +#define NAUTILUS_ANNOTATION_H + +#include <glib.h> +#include <libnautilus-extensions/nautilus-file.h> +#include <libnautilus-extensions/nautilus-metadata.h> + +char *nautilus_annotation_get_annotation (NautilusFile *file); +int nautilus_annotation_has_annotation (NautilusFile *file); +void nautilus_annotation_add_annotation (NautilusFile *file, const char *new_annotation); +void nautilus_annotation_remove_annotation (NautilusFile *file, int which_annotation); + +#endif /* NAUTILUS_ANNOTATION_H */ diff --git a/libnautilus-extensions/nautilus-file-utilities.c b/libnautilus-extensions/nautilus-file-utilities.c index 52caa9b1b..5debc64be 100644 --- a/libnautilus-extensions/nautilus-file-utilities.c +++ b/libnautilus-extensions/nautilus-file-utilities.c @@ -1015,7 +1015,7 @@ nautilus_get_user_main_directory (void) /* If this fails to create the directory, nautilus_application_startup will * notice and refuse to launch. */ - + /* install the default link sets */ nautilus_link_set_install (user_main_directory, "apps"); nautilus_link_set_install (user_main_directory, "home"); diff --git a/libnautilus-extensions/nautilus-file.c b/libnautilus-extensions/nautilus-file.c index 384b53dee..c840cd7b4 100644 --- a/libnautilus-extensions/nautilus-file.c +++ b/libnautilus-extensions/nautilus-file.c @@ -25,6 +25,7 @@ #include <config.h> #include "nautilus-file.h" +#include "nautilus-annotation.h" #include "nautilus-directory-metafile.h" #include "nautilus-directory-notify.h" #include "nautilus-directory-private.h" @@ -1499,6 +1500,11 @@ prepend_automatic_emblem_names (NautilusFile *file, { /* Prepend in reverse order. */ + if (nautilus_annotation_has_annotation (file) > 0) { + names = g_list_prepend + (names, g_strdup (NAUTILUS_FILE_EMBLEM_ANNOTATION)); + g_message ("got annotation for %s", nautilus_file_get_uri (file)); + } if (nautilus_file_is_in_trash (file)) { names = g_list_prepend (names, g_strdup (NAUTILUS_FILE_EMBLEM_NAME_TRASH)); diff --git a/libnautilus-extensions/nautilus-file.h b/libnautilus-extensions/nautilus-file.h index a8593c534..d74172b5d 100644 --- a/libnautilus-extensions/nautilus-file.h +++ b/libnautilus-extensions/nautilus-file.h @@ -71,6 +71,7 @@ typedef enum { #define NAUTILUS_FILE_EMBLEM_NAME_CANT_READ "noread" #define NAUTILUS_FILE_EMBLEM_NAME_CANT_WRITE "nowrite" #define NAUTILUS_FILE_EMBLEM_NAME_TRASH "trash" +#define NAUTILUS_FILE_EMBLEM_ANNOTATION "note" typedef void (*NautilusFileCallback) (NautilusFile *file, gpointer callback_data); diff --git a/libnautilus-extensions/nautilus-icon-canvas-item.c b/libnautilus-extensions/nautilus-icon-canvas-item.c index 399cade1d..240f2f923 100644 --- a/libnautilus-extensions/nautilus-icon-canvas-item.c +++ b/libnautilus-extensions/nautilus-icon-canvas-item.c @@ -3,7 +3,6 @@ /* Nautilus - Icon canvas item class for icon container. * * Copyright (C) 2000 Eazel, Inc - * * Author: Andy Hertzfeld <andy@eazel.com> * * This library is free software; you can redistribute it and/or @@ -31,6 +30,7 @@ #include <gtk/gtksignal.h> #include <gdk-pixbuf/gdk-pixbuf.h> #include <libgnome/gnome-i18n.h> +#include <libgnomeui/gnome-canvas-rect-ellipse.h> #include <libgnomeui/gnome-canvas-util.h> #include <libgnomeui/gnome-icon-text.h> #include <libart_lgpl/art_rgb.h> @@ -54,9 +54,6 @@ #include "nautilus-smooth-text-layout.h" #include "nautilus-smooth-text-layout-cache.h" -/* Comment this out if the new smooth fonts code give you problems - * This isnt meant to be permanent. Its just a precaution. - */ #define EMBLEM_SPACING 2 /* gap between bottom of icon and start of text box */ @@ -80,6 +77,14 @@ struct NautilusIconCanvasItemDetails { GdkFont *font; NautilusEmblemAttachPoints *attach_points; + /* stuff for controls; if this gets too big, we'll put it in a separate struct */ + GtkWidget *control; /* optional Bonobo control*/ + guint control_destroy_id; + + /* stuff for annotations */ + GnomeCanvasItem *annotation; + int note_state; + /* Size of the text at current font. */ int text_width; int text_height; @@ -93,7 +98,7 @@ struct NautilusIconCanvasItemDetails { guint is_highlighted_for_drop : 1; guint show_stretch_handles : 1; guint is_prelit : 1; - + guint in_control_destroy : 1; gboolean is_renaming; /* Font stuff whilst in smooth mode */ @@ -112,7 +117,7 @@ enum { ARG_EDITABLE_TEXT, ARG_ADDITIONAL_TEXT, ARG_FONT, - ARG_HIGHLIGHTED_FOR_SELECTION, + ARG_HIGHLIGHTED_FOR_SELECTION, ARG_HIGHLIGHTED_AS_KEYBOARD_FOCUS, ARG_HIGHLIGHTED_FOR_DROP, ARG_MODIFIER, @@ -127,6 +132,14 @@ typedef enum { TOP_SIDE } RectangleSide; +typedef enum { + NO_HIT, + ICON_HIT, + LABEL_HIT, + STRETCH_HANDLE_HIT, + EMBLEM_HIT +} HitType; + typedef struct { NautilusIconCanvasItem *icon_item; ArtIRect icon_rect; @@ -219,7 +232,10 @@ static gboolean hit_test_stretch_handle (NautilusIconCanvasIt const ArtIRect *canvas_rect); static gboolean icon_canvas_item_is_smooth (const NautilusIconCanvasItem *icon_item); - +static gboolean hit_test (NautilusIconCanvasItem *icon_item, + const ArtIRect *canvas_rect, + HitType *hit_type, + int *hit_index); NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusIconCanvasItem, nautilus_icon_canvas_item, GNOME_TYPE_CANVAS_ITEM) @@ -334,6 +350,11 @@ nautilus_icon_canvas_item_destroy (GtkObject *object) gdk_font_unref (details->font); } + if (details->control && !details->in_control_destroy) { + gtk_signal_disconnect (GTK_OBJECT (details->control), details->control_destroy_id); + gtk_widget_destroy (details->control); + } + gtk_object_unref (GTK_OBJECT (icon_item->details->smooth_font)); icon_item->details->smooth_font = NULL; @@ -365,6 +386,43 @@ nautilus_icon_canvas_item_invalidate_label_size (NautilusIconCanvasItem *item) item->details->text_height = -1; } +/* abstraction layer for icon width and height, to separate it from pixbuf with and height */ +static int +nautilus_icon_canvas_item_get_icon_width (NautilusIconCanvasItem *item) +{ + GtkRequisition size_requisition; + double scale_factor = GNOME_CANVAS_ITEM (item)->canvas->pixels_per_unit; + + if (item->details->control != NULL) { + gtk_widget_size_request (item->details->control, &size_requisition); + return size_requisition.width * scale_factor; + } + + if (item->details->pixbuf == NULL) { + return NAUTILUS_ICON_SIZE_STANDARD; + } + + return gdk_pixbuf_get_width (item->details->pixbuf); +} + +static int +nautilus_icon_canvas_item_get_icon_height (NautilusIconCanvasItem *item) +{ + GtkRequisition size_requisition; + double scale_factor = GNOME_CANVAS_ITEM (item)->canvas->pixels_per_unit; + + if (item->details->control != NULL) { + gtk_widget_size_request (item->details->control, &size_requisition); + return size_requisition.height * scale_factor; + } + if (item->details->pixbuf == NULL) { + return NAUTILUS_ICON_SIZE_STANDARD; + } + + return gdk_pixbuf_get_height (item->details->pixbuf); +} + + /* Set_arg handler for the icon item. */ static void nautilus_icon_canvas_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) @@ -447,8 +505,7 @@ nautilus_icon_canvas_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) case ARG_SMOOTH_FONT_SIZE: nautilus_icon_canvas_item_set_smooth_font_size (NAUTILUS_ICON_CANVAS_ITEM (object), GTK_VALUE_UINT (*arg)); - break; - + break; default: g_warning ("nautilus_icons_view_item_item_set_arg on unknown argument"); return; @@ -457,12 +514,27 @@ nautilus_icon_canvas_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (object)); } +/* handler for the control's destroy signal */ +static void +do_control_destroy (GtkObject *object, gpointer data) +{ + NautilusIconCanvasItemDetails *details; + + details = NAUTILUS_ICON_CANVAS_ITEM (data)->details; + + details->in_control_destroy = TRUE; + + gtk_object_destroy (GTK_OBJECT (data)); +} + /* Get_arg handler for the icon item */ static void nautilus_icon_canvas_item_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) { NautilusIconCanvasItemDetails *details; + GnomeCanvasItem *item; + item = GNOME_CANVAS_ITEM (object); details = NAUTILUS_ICON_CANVAS_ITEM (object)->details; switch (arg_id) { @@ -510,12 +582,27 @@ GdkPixbuf * nautilus_icon_canvas_item_get_image (NautilusIconCanvasItem *item) { NautilusIconCanvasItemDetails *details; - + int width, height; + GdkPixbuf *pixbuf; + g_return_val_if_fail (NAUTILUS_IS_ICON_CANVAS_ITEM (item), NULL); details = item->details; - return details->pixbuf; + if (details->control) { + width = details->control->allocation.width; + height = details->control->allocation.height; + pixbuf = nautilus_gdk_pixbuf_get_from_window_safe (details->control->window, + details->control->allocation.x, + details->control->allocation.y, + details->control->allocation.width, + details->control->allocation.height); + } else { + pixbuf = details->pixbuf; + gdk_pixbuf_ref (pixbuf); + } + + return pixbuf; } void @@ -617,6 +704,12 @@ recompute_bounding_box (NautilusIconCanvasItem *icon_item) item->y1 = top_left.y; item->x2 = bottom_right.x; item->y2 = bottom_right.y; + + if (icon_item->details->control) + gtk_layout_move (GTK_LAYOUT (item->canvas), icon_item->details->control, + item->x1 + item->canvas->zoom_xofs, + item->y1 + item->canvas->zoom_yofs); + } static void @@ -631,13 +724,16 @@ compute_text_rectangle (NautilusIconCanvasItem *item, text_rect->y1 = text_rect->y0 + item->details->text_height; } + void nautilus_icon_canvas_item_update_bounds (NautilusIconCanvasItem *item) { ArtIRect before, after, emblem_rect; EmblemLayout emblem_layout; GdkPixbuf *emblem_pixbuf; - + GtkRequisition size_requisition; + int item_width, item_height; + /* Compute new bounds. */ nautilus_gnome_canvas_item_get_current_canvas_bounds (GNOME_CANVAS_ITEM (item), &before); @@ -664,6 +760,16 @@ nautilus_icon_canvas_item_update_bounds (NautilusIconCanvasItem *item) art_irect_union (&item->details->emblem_rect, &item->details->emblem_rect, &emblem_rect); } + /* if there is an embedded control, make a size request and size accordingly */ + if (item->details->control) { + /* size the control appropriately */ + gtk_widget_size_request (item->details->control, &size_requisition); + item_width = size_requisition.width * GNOME_CANVAS_ITEM (item)->canvas->pixels_per_unit; + item_height = size_requisition.height * GNOME_CANVAS_ITEM (item)->canvas->pixels_per_unit; + + gtk_widget_set_usize (item->details->control, item_width, item_height); + } + /* Send out the bounds_changed signal and queue a redraw. */ nautilus_gnome_canvas_request_redraw_rectangle (GNOME_CANVAS_ITEM (item)->canvas, &before); @@ -805,7 +911,7 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item, canvas_item = GNOME_CANVAS_ITEM (item); if (drawable != NULL) { - icon_width = details->pixbuf == NULL ? 0 : gdk_pixbuf_get_width (details->pixbuf); + icon_width = details->pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_width (item); gc = gdk_gc_new (canvas_item->canvas->layout.bin_window); gdk_gc_get_values (gc, &save_gc); } @@ -1121,6 +1227,7 @@ emblem_layout_next (EmblemLayout *layout, /* Advance to the next emblem. */ layout->emblem = layout->emblem->next; + layout->index += 1; attach_points = layout->icon_item->details->attach_points; if (attach_points != NULL) { @@ -1131,8 +1238,6 @@ emblem_layout_next (EmblemLayout *layout, x = layout->icon_rect.x0 + attach_points->points[layout->index].x; y = layout->icon_rect.y0 + attach_points->points[layout->index].y; - layout->index += 1; - /* Return the rectangle and pixbuf. */ *emblem_pixbuf = pixbuf; emblem_rect->x0 = x - width / 2; @@ -1207,11 +1312,17 @@ emblem_layout_next (EmblemLayout *layout, /* Return the rectangle and pixbuf. */ *emblem_pixbuf = pixbuf; - emblem_rect->x0 = x - width / 2; - emblem_rect->y0 = y - height / 2; + if (layout->icon_item->details->control) { + emblem_rect->x0 = x; + emblem_rect->y0 = y; + } else { + emblem_rect->x0 = x - width / 2; + emblem_rect->y0 = y - height / 2; + } + emblem_rect->x1 = emblem_rect->x0 + width; emblem_rect->y1 = emblem_rect->y0 + height; - + return TRUE; } @@ -1326,10 +1437,6 @@ nautilus_icon_canvas_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, icon_item = NAUTILUS_ICON_CANVAS_ITEM (item); details = icon_item->details; - /* Draw the pixbuf. */ - if (details->pixbuf == NULL) { - return; - } /* Compute icon rectangle in drawable coordinates. */ icon_rect = icon_item->details->canvas_rect; @@ -1337,12 +1444,29 @@ nautilus_icon_canvas_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, icon_rect.y0 -= y; icon_rect.x1 -= x; icon_rect.y1 -= y; + /* draw the icon or widget */ + if (icon_item->details->control) { + gtk_widget_queue_draw (icon_item->details->control); + } else { + if (details->pixbuf != NULL) { + + /* Compute icon rectangle in drawable coordinates. */ + get_icon_canvas_rectangle (icon_item, &icon_rect); + icon_rect.x0 -= x; + icon_rect.y0 -= y; + icon_rect.x1 -= x; + icon_rect.y1 -= y; + + /* if the pre-lit or selection flag is set, make a pre-lit or darkened pixbuf and draw that instead */ + temp_pixbuf = map_pixbuf (icon_item); + draw_pixbuf (temp_pixbuf, drawable, icon_rect.x0, icon_rect.y0); + + if (temp_pixbuf != details->pixbuf) { + gdk_pixbuf_unref (temp_pixbuf); + } + + } - /* if the pre-lit or selection flag is set, make a pre-lit or darkened pixbuf and draw that instead */ - temp_pixbuf = map_pixbuf (icon_item); - draw_pixbuf (temp_pixbuf, drawable, icon_rect.x0, icon_rect.y0); - if (temp_pixbuf != details->pixbuf) { - gdk_pixbuf_unref (temp_pixbuf); } /* Draw the emblem pixbufs. */ @@ -1427,7 +1551,7 @@ draw_or_measure_label_text_aa (NautilusIconCanvasItem *item, if (destination_pixbuf == NULL ) { icon_width = 0; } else { - icon_width = details->pixbuf == NULL ? 0 : gdk_pixbuf_get_width (details->pixbuf); + icon_width = details->pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_width (item); } max_text_width = floor (nautilus_icon_canvas_item_get_max_text_width (item)); @@ -1702,15 +1826,21 @@ nautilus_icon_canvas_item_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf) gnome_canvas_buf_ensure_buf (buf); buf->is_bg = FALSE; } - - /* draw the icon */ - nautilus_gnome_canvas_draw_pixbuf (buf, temp_pixbuf, icon_rect.x0, icon_rect.y0); - - if (temp_pixbuf != icon_item->details->pixbuf) { - gdk_pixbuf_unref (temp_pixbuf); + + /* draw the icon or widget */ + if (icon_item->details->control) { + gtk_widget_queue_draw (icon_item->details->control); + } else { + nautilus_gnome_canvas_draw_pixbuf (buf, temp_pixbuf, icon_rect.x0, icon_rect.y0); + + if (temp_pixbuf != icon_item->details->pixbuf) { + gdk_pixbuf_unref (temp_pixbuf); + } } - - /* draw the emblems */ + + /* draw the emblems */ + get_icon_canvas_rectangle (icon_item, &icon_rect); + emblem_layout_reset (&emblem_layout, icon_item, &icon_rect); while (emblem_layout_next (&emblem_layout, &emblem_pixbuf, &emblem_rect)) { nautilus_gnome_canvas_draw_pixbuf (buf, emblem_pixbuf, emblem_rect.x0, emblem_rect.y0); @@ -1724,6 +1854,77 @@ nautilus_icon_canvas_item_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf) draw_label_text_aa (icon_item, buf, icon_rect.x0, icon_rect.y1, x_delta); } +/* create an annotation for the emblem designated by the passed-in index */ +static void +create_annotation (NautilusIconCanvasItem *icon_item, int emblem_index) +{ + uint fill_color, outline_color; + double top, left, bottom, right; + ArtDRect icon_rect; + + /* compute the position for the top left of the annotation */ + + nautilus_icon_canvas_item_get_icon_rectangle (icon_item, &icon_rect); + left = icon_rect.x0 + 8.0; + top = icon_rect.y0 + 8.0; + right = left + 220.0; + bottom = top + 24.0; + + fill_color = 0xDDDD99E0; + outline_color = 0x000000FF; + + g_message ("making note - %f %f %f %f", left, top, right, bottom); + + icon_item->details->annotation = gnome_canvas_item_new + (gnome_canvas_root (GNOME_CANVAS_ITEM (icon_item)->canvas), + gnome_canvas_rect_get_type (), + "x1", left, + "y1", top, + "x2", right, + "y2", bottom, + "fill_color_rgba", fill_color, + "outline_color_rgba", outline_color, + "width_pixels", 1, + NULL); + + gnome_canvas_item_raise_to_top (icon_item->details->annotation); +} + +/* remove any annotation that's showing */ +static void +remove_annotation (NautilusIconCanvasItem *icon_item) +{ + if (icon_item->details->annotation != NULL) { + g_message ("remove annotation"); + + gtk_object_destroy (GTK_OBJECT (icon_item->details->annotation)); + icon_item->details->annotation = NULL; + icon_item->details->note_state = 0; + + } +} + +/* manage showing and hiding annotations, based on mouse-over the passed-in emblem */ +static void +nautilus_icon_canvas_item_set_note_state (NautilusIconCanvasItem *icon_item, int new_state) +{ + /* nothing to do if nothing changed */ + if (new_state == icon_item->details->note_state) { + return; + } + /* get rid of the old annotation, if there was one */ + if (icon_item->details->annotation) { + remove_annotation (icon_item); + } + + /* create a new annotation, if necessary */ + if (new_state > 0) { + create_annotation (icon_item, new_state); + } + + icon_item->details->note_state = new_state; +} + /* handle events */ @@ -1731,7 +1932,12 @@ static int nautilus_icon_canvas_item_event (GnomeCanvasItem *item, GdkEvent *event) { NautilusIconCanvasItem *icon_item; - + GdkEventMotion *motion_event; + ArtIRect hit_rect; + ArtDRect world_rect; + HitType hit_type; + int hit_index, emblem_state; + icon_item = NAUTILUS_ICON_CANVAS_ITEM (item); switch (event->type) { @@ -1778,10 +1984,28 @@ nautilus_icon_canvas_item_event (GnomeCanvasItem *item, GdkEvent *event) icon_item->details->is_prelit = FALSE; icon_item->details->is_active = 0; icon_item->details->is_highlighted_for_drop = FALSE; + remove_annotation (icon_item); gnome_canvas_item_request_update (item); } return TRUE; + + case GDK_MOTION_NOTIFY: + motion_event = (GdkEventMotion*) event; + + world_rect.x0 = motion_event->x; + world_rect.y0 = motion_event->y; + world_rect.x1 = world_rect.x0 + 1.0; + world_rect.y1 = world_rect.y0 + 1.0; + + nautilus_gnome_canvas_world_to_canvas_rectangle + (GNOME_CANVAS_ITEM (item)->canvas, &world_rect, &hit_rect); + /* hit-test so we can handle tooltips for emblems */ + hit_test (icon_item, &hit_rect, &hit_type, &hit_index); + emblem_state = hit_type == EMBLEM_HIT ? hit_index : 0; + nautilus_icon_canvas_item_set_note_state (icon_item, emblem_state); + return TRUE; + default: /* Don't eat up other events; icon container might use them. */ return FALSE; @@ -1835,9 +2059,10 @@ hit_test_pixbuf (GdkPixbuf *pixbuf, const ArtIRect *pixbuf_location, const ArtIR } static gboolean -hit_test (NautilusIconCanvasItem *icon_item, const ArtIRect *canvas_rect) +hit_test (NautilusIconCanvasItem *icon_item, const ArtIRect *canvas_rect, HitType *hit_type, int *hit_index) { NautilusIconCanvasItemDetails *details; + ArtIRect icon_rect; ArtIRect emblem_rect; EmblemLayout emblem_layout; GdkPixbuf *emblem_pixbuf; @@ -1851,12 +2076,25 @@ hit_test (NautilusIconCanvasItem *icon_item, const ArtIRect *canvas_rect) return FALSE; } + /* default to -1, which means nothing was hit */ + if (hit_index != NULL) { + *hit_index = -1; + } + /* Check for hits in the stretch handles. */ if (hit_test_stretch_handle (icon_item, canvas_rect)) { + if (hit_type != NULL) { + *hit_type = STRETCH_HANDLE_HIT; + } return TRUE; } /* Check for hit in the icon. If we're highlighted for dropping, anywhere in the rect is OK */ + get_icon_canvas_rectangle (icon_item, &icon_rect); + if (hit_type != NULL) { + *hit_type = ICON_HIT; + } + if (icon_item->details->is_highlighted_for_drop) { if (nautilus_art_irect_hits_irect (&icon_item->details->canvas_rect, canvas_rect)) { return TRUE; @@ -1870,6 +2108,9 @@ hit_test (NautilusIconCanvasItem *icon_item, const ArtIRect *canvas_rect) /* Check for hit in the text. */ if (nautilus_art_irect_hits_irect (&details->text_rect, canvas_rect) && !icon_item->details->is_renaming) { + if (hit_type != NULL) { + *hit_type = LABEL_HIT; + } return TRUE; } @@ -1877,10 +2118,21 @@ hit_test (NautilusIconCanvasItem *icon_item, const ArtIRect *canvas_rect) emblem_layout_reset (&emblem_layout, icon_item, &icon_item->details->canvas_rect); while (emblem_layout_next (&emblem_layout, &emblem_pixbuf, &emblem_rect)) { if (hit_test_pixbuf (emblem_pixbuf, &emblem_rect, canvas_rect)) { + if (hit_type != NULL) { + *hit_type = EMBLEM_HIT; + } + if (hit_index != NULL) { + *hit_index = emblem_layout.index; + } return TRUE; } } - + + /* there wasn't a hit, so indicate that */ + if (hit_type != NULL) { + *hit_type = NO_HIT; + } + return FALSE; } @@ -1896,7 +2148,7 @@ nautilus_icon_canvas_item_point (GnomeCanvasItem *item, double x, double y, int canvas_rect.y0 = cy; canvas_rect.x1 = cx + 1; canvas_rect.y1 = cy + 1; - if (hit_test (NAUTILUS_ICON_CANVAS_ITEM (item), &canvas_rect)) { + if (hit_test (NAUTILUS_ICON_CANVAS_ITEM (item), &canvas_rect, NULL, NULL)) { return 0.0; } else { /* This value means not hit. @@ -1935,8 +2187,8 @@ nautilus_icon_canvas_item_bounds (GnomeCanvasItem *item, icon_rect.x1 = 0; icon_rect.y1 = 0; } else { - icon_rect.x1 = gdk_pixbuf_get_width (details->pixbuf); - icon_rect.y1 = gdk_pixbuf_get_height (details->pixbuf); + icon_rect.x1 = nautilus_icon_canvas_item_get_icon_width (icon_item); + icon_rect.y1 = nautilus_icon_canvas_item_get_icon_height (icon_item); } /* Compute text rectangle. */ @@ -1982,8 +2234,8 @@ nautilus_icon_canvas_item_get_icon_rectangle (NautilusIconCanvasItem *item, pixbuf = item->details->pixbuf; pixels_per_unit = GNOME_CANVAS_ITEM (item)->canvas->pixels_per_unit; - rect->x1 = rect->x0 + (pixbuf == NULL ? 0 : gdk_pixbuf_get_width (pixbuf)) / pixels_per_unit; - rect->y1 = rect->y0 + (pixbuf == NULL ? 0 : gdk_pixbuf_get_height (pixbuf)) / pixels_per_unit; + rect->x1 = rect->x0 + (pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_width (item)) / pixels_per_unit; + rect->y1 = rect->y0 + (pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_height (item)) / pixels_per_unit; } /* Get the rectangle of the icon only, in canvas coordinates. */ @@ -2009,8 +2261,8 @@ get_icon_canvas_rectangle (NautilusIconCanvasItem *item, pixbuf = item->details->pixbuf; - rect->x1 = rect->x0 + (pixbuf == NULL ? 0 : gdk_pixbuf_get_width (pixbuf)); - rect->y1 = rect->y0 + (pixbuf == NULL ? 0 : gdk_pixbuf_get_height (pixbuf)); + rect->x1 = rect->x0 + (pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_width (item)); + rect->y1 = rect->y0 + (pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_height (item)); } void @@ -2106,10 +2358,15 @@ nautilus_icon_canvas_item_hit_test_stretch_handles (NautilusIconCanvasItem *item gboolean nautilus_icon_canvas_item_hit_test_rectangle (NautilusIconCanvasItem *item, const ArtIRect *canvas_rect) { + g_return_val_if_fail (NAUTILUS_IS_ICON_CANVAS_ITEM (item), FALSE); g_return_val_if_fail (canvas_rect != NULL, FALSE); - return hit_test (item, canvas_rect); +/* + nautilus_gnome_canvas_world_to_canvas_rectangle + (GNOME_CANVAS_ITEM (item)->canvas, world_rect, &canvas_rect); +*/ + return hit_test (item, canvas_rect, NULL, NULL); } const char * @@ -2167,6 +2424,41 @@ nautilus_icon_canvas_item_set_smooth_font (NautilusIconCanvasItem *icon_item, } } +GtkWidget * +nautilus_icon_canvas_item_get_control (NautilusIconCanvasItem *icon_item) +{ + return icon_item->details->control; +} + +void +nautilus_icon_canvas_item_set_control (NautilusIconCanvasItem *icon_item, GtkWidget *control) +{ + GnomeCanvasItem *item; + + if (icon_item->details->control == control) { + return; + } + + item = GNOME_CANVAS_ITEM (icon_item); + if (icon_item->details->control) { + gtk_signal_disconnect (GTK_OBJECT (icon_item->details->control), icon_item->details->control_destroy_id); + gtk_container_remove (GTK_CONTAINER (item->canvas), icon_item->details->control); + icon_item->details->control = NULL; + } + + if (control) { + icon_item->details->control = control; + icon_item->details->control_destroy_id = gtk_signal_connect (GTK_OBJECT (control), + "destroy", + (GtkSignalFunc) do_control_destroy, + item); + gtk_widget_show (control); + gtk_layout_put (GTK_LAYOUT (item->canvas), control, + item->x1 + item->canvas->zoom_xofs, + item->y1 + item->canvas->zoom_yofs); + } +} + void nautilus_icon_canvas_item_set_smooth_font_size (NautilusIconCanvasItem *icon_item, guint font_size) diff --git a/libnautilus-extensions/nautilus-icon-canvas-item.h b/libnautilus-extensions/nautilus-icon-canvas-item.h index 312efd69d..5d943323a 100644 --- a/libnautilus-extensions/nautilus-icon-canvas-item.h +++ b/libnautilus-extensions/nautilus-icon-canvas-item.h @@ -80,6 +80,10 @@ const char *nautilus_icon_canvas_item_get_editable_text (NautilusIconCanv void nautilus_icon_canvas_item_set_renaming (NautilusIconCanvasItem *icon_item, gboolean state); +GtkWidget * nautilus_icon_canvas_item_get_control (NautilusIconCanvasItem *icon_item); +void nautilus_icon_canvas_item_set_control (NautilusIconCanvasItem *icon_item, + GtkWidget *control); + /* geometry and hit testing */ gboolean nautilus_icon_canvas_item_hit_test_rectangle (NautilusIconCanvasItem *item, diff --git a/libnautilus-extensions/nautilus-icon-container.c b/libnautilus-extensions/nautilus-icon-container.c index 153e6c4f4..66a5b5ba5 100644 --- a/libnautilus-extensions/nautilus-icon-container.c +++ b/libnautilus-extensions/nautilus-icon-container.c @@ -164,6 +164,7 @@ enum { CONTEXT_CLICK_SELECTION, MIDDLE_CLICK, GET_CONTAINER_URI, + GET_ICON_CONTROL, GET_ICON_IMAGES, GET_ICON_TEXT, GET_ICON_URI, @@ -3136,6 +3137,16 @@ nautilus_icon_container_initialize_class (NautilusIconContainerClass *class) gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); + signals[GET_ICON_CONTROL] + = gtk_signal_new ("get_icon_control", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (NautilusIconContainerClass, + get_icon_control), + gtk_marshal_NONE__POINTER_POINTER, + GTK_TYPE_NONE, 2, + GTK_TYPE_POINTER, + GTK_TYPE_POINTER); signals[GET_ICON_IMAGES] = gtk_signal_new ("get_icon_images", GTK_RUN_LAST, @@ -3708,9 +3719,10 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, GdkPixbuf *pixbuf, *emblem_pixbuf, *saved_pixbuf; GList *emblem_scalable_icons, *emblem_pixbufs, *p; char *editable_text, *additional_text; + GtkWidget *embedded_control; GdkFont *font; guint smooth_font_size; - + if (icon == NULL) { return; } @@ -3742,8 +3754,7 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, nautilus_scalable_icon_unref (scalable_icon); - /* in the rare case an image is too small, scale it up */ - + /* in the rare case an image is too small, scale it up */ width = gdk_pixbuf_get_width (pixbuf); height = gdk_pixbuf_get_height (pixbuf); if (width < min_image_size || height < min_image_size) { @@ -3751,9 +3762,11 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, /* don't let it exceed the maximum width in the other dimension */ scale_factor = MIN (scale_factor, max_image_size / width); scale_factor = MIN (scale_factor, max_image_size / height); - + scaled_width = floor (width * scale_factor + .5); scaled_height = floor (height * scale_factor + .5); + + /* scale the image to the calculated size */ saved_pixbuf = pixbuf; pixbuf = gdk_pixbuf_scale_simple (pixbuf, scaled_width, scaled_height, GDK_INTERP_BILINEAR); gdk_pixbuf_unref (saved_pixbuf); @@ -3782,13 +3795,22 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, emblem_pixbufs = g_list_reverse (emblem_pixbufs); nautilus_scalable_icon_list_free (emblem_scalable_icons); + /* get the embedded control, if any */ + embedded_control = nautilus_icon_canvas_item_get_control (icon->item); + if (embedded_control == NULL) { + gtk_signal_emit (GTK_OBJECT (container), + signals[GET_ICON_CONTROL], + icon->data, + &embedded_control); + } + /* Get both editable and non-editable icon text */ gtk_signal_emit (GTK_OBJECT (container), signals[GET_ICON_TEXT], icon->data, &editable_text, &additional_text); - + /* If name of icon being renamed was changed from elsewhere, end renaming mode. * Alternatively, we could replace the characters in the editable text widget * with the new name, but that could cause timing problems if the user just @@ -3813,6 +3835,8 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, "smooth_font", details->smooth_label_font, NULL); + nautilus_icon_canvas_item_set_control (icon->item, embedded_control); + nautilus_icon_canvas_item_set_image (icon->item, pixbuf); nautilus_icon_canvas_item_set_attach_points (icon->item, &attach_points); nautilus_icon_canvas_item_set_emblems (icon->item, emblem_pixbufs); diff --git a/libnautilus-extensions/nautilus-icon-container.h b/libnautilus-extensions/nautilus-icon-container.h index 7528fa8d5..d15e5c576 100644 --- a/libnautilus-extensions/nautilus-icon-container.h +++ b/libnautilus-extensions/nautilus-icon-container.h @@ -107,6 +107,10 @@ typedef struct { gboolean (* get_stored_icon_position) (NautilusIconContainer *container, NautilusIconData *data, NautilusIconPosition *position); + void + (* get_icon_control) (NautilusIconContainer *container, + NautilusIconData *data, + GtkWidget **control); NautilusScalableIcon * (* get_icon_images) (NautilusIconContainer *container, NautilusIconData *data, diff --git a/libnautilus-extensions/nautilus-icon-dnd.c b/libnautilus-extensions/nautilus-icon-dnd.c index 7b2896201..778774d77 100644 --- a/libnautilus-extensions/nautilus-icon-dnd.c +++ b/libnautilus-extensions/nautilus-icon-dnd.c @@ -1300,6 +1300,7 @@ nautilus_icon_dnd_begin_drag (NautilusIconContainer *container, &pixmap_for_dragged_file, &mask_for_dragged_file, NAUTILUS_STANDARD_ALPHA_THRESHHOLD); + gdk_pixbuf_unref (pixbuf); /* compute the image's offset */ nautilus_icon_canvas_item_get_icon_rectangle diff --git a/libnautilus-extensions/nautilus-labeled-image.c b/libnautilus-extensions/nautilus-labeled-image.c index f7cfeb44c..97a64d18f 100644 --- a/libnautilus-extensions/nautilus-labeled-image.c +++ b/libnautilus-extensions/nautilus-labeled-image.c @@ -44,6 +44,7 @@ #define DEFAULT_X_ALIGNMENT 0.5 #define DEFAULT_Y_ALIGNMENT 0.5 + /* Arguments */ enum { @@ -710,7 +711,7 @@ nautilus_labeled_image_get_image_bounds (const NautilusLabeledImage *labeled_ima GtkRequisition image_requisition; ArtIRect image_bounds; ArtIRect content_bounds; - + g_return_val_if_fail (NAUTILUS_IS_LABELED_IMAGE (labeled_image), NAUTILUS_ART_IRECT_EMPTY); if (labeled_image->details->fill) { diff --git a/libnautilus-extensions/nautilus-link.c b/libnautilus-extensions/nautilus-link.c index bddcc36e1..cb3f4e2e8 100644 --- a/libnautilus-extensions/nautilus-link.c +++ b/libnautilus-extensions/nautilus-link.c @@ -311,6 +311,35 @@ nautilus_link_local_get_additional_text (const char *path) (path, NAUTILUS_METADATA_KEY_EXTRA_TEXT); } +void nautilus_link_local_get_component_info (const char *path, + char **control_moniker, char **control_data) +{ + xmlDoc *document; + const char *mime_type; + + *control_moniker = NULL; + *control_data = NULL; + + /* Check mime type. Exit if it is not a nautilus link */ + mime_type = gnome_vfs_get_file_mime_type (path, NULL, FALSE); + if (strcmp (mime_type, "application/x-nautilus-link") != 0) { + return; + } + + document = xmlParseFile (path); + if (document != NULL) { + *control_moniker = xml_get_root_property (document, + NAUTILUS_METADATA_KEY_CONTROL_MONIKER); + + *control_data = xml_get_root_property (document, + NAUTILUS_METADATA_KEY_CONTROL_DATA); + + xmlFreeDoc (document); + } +} + + + /* utility to return the local pathname of a cached icon, given the leaf name */ /* if the icons directory hasn't been created yet, create it */ static char * diff --git a/libnautilus-extensions/nautilus-link.h b/libnautilus-extensions/nautilus-link.h index 88882ccb5..b9596eb7d 100644 --- a/libnautilus-extensions/nautilus-link.h +++ b/libnautilus-extensions/nautilus-link.h @@ -76,14 +76,21 @@ gboolean nautilus_link_local_set_link_uri (const char * none. Despite the fact that it takes a URI parameter, works only if * the file is local and does sync. I/O. */ -char * nautilus_link_local_get_additional_text (const char *path); +char * nautilus_link_local_get_additional_text (const char *path); /* Returns the image associated with a link file. Despite the fact * that it takes a URI parameter, works only if the file is local and * does sync. I/O on the link, although it does async. on the image * and caches if the image is remote. */ -char * nautilus_link_local_get_image_uri (const char *path); +char * nautilus_link_local_get_image_uri (const char *path); + +/* returns the moniker of the component associated with a link file, as well as configuration data. + * It works only if the file is local and does sync. I/O. + */ +void nautilus_link_local_get_component_info (const char *path, + char **control_moniker, + char **control_data); /* Returns the link type of a link file. * Works only if the file is local and does sync. I/O diff --git a/libnautilus-extensions/nautilus-metadata.h b/libnautilus-extensions/nautilus-metadata.h index 00f96a2da..70681853f 100644 --- a/libnautilus-extensions/nautilus-metadata.h +++ b/libnautilus-extensions/nautilus-metadata.h @@ -72,6 +72,12 @@ #define NAUTILUS_METADATA_KEY_ICON_SCALE "icon_scale" #define NAUTILUS_METADATA_KEY_CUSTOM_ICON "custom_icon" +#define NAUTILUS_METADATA_KEY_FILE_DIGEST "digest" +#define NAUTILUS_METADATA_KEY_NOTES_INFO "notes_info" + +#define NAUTILUS_METADATA_KEY_CONTROL_MONIKER "control_moniker" +#define NAUTILUS_METADATA_KEY_CONTROL_DATA "control_data" + /* per link file */ #define NAUTILUS_METADATA_KEY_EXTRA_TEXT "extra_text" diff --git a/libnautilus-extensions/nautilus-text-layout.c b/libnautilus-extensions/nautilus-text-layout.c new file mode 100644 index 000000000..d76a1e678 --- /dev/null +++ b/libnautilus-extensions/nautilus-text-layout.c @@ -0,0 +1,349 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* nautilus-text-layout.c - Functions to layout text. + + Copyright (C) 1999, 2000 Eazel, Inc. + + The Gnome Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Gnome Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the Gnome Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Authors: Ramiro Estrugo <ramiro@eazel.com> +*/ + +#include <config.h> +#include "nautilus-text-layout.h" +#include "nautilus-string.h" +#include "nautilus-gdk-extensions.h" +#include "nautilus-gdk-pixbuf-extensions.h" + +/* + * The following text_layout stuff was shamelessly plundered + * from libgnomeui/gnome-icon-text.[ch] by Federico Mena. + * + * It was hacked to use NautilusScalableFont and GdkPixbuf + * instead of GdkFont and GdkDrawable. We want to use the + * same layout algorithm in Nautilus so that both the smooth + * and not smooth text rendering cases have predictably + * similar result. + * + * I also made some minor Nautilus-like style changes. -re + * + */ +static void +text_layout_free_row (gpointer data, + gpointer user_data) +{ + NautilusTextLayoutRow *row; + + if (data) { + row = data; + g_free (row->text); + g_free (row); + } +} + +/** + * nautilus_text_layout_free: + * @ti: An icon text info structure. + * + * Frees a &NautilusTextLayout structure. You should call this instead of + * freeing the structure yourself. + */ +void +nautilus_text_layout_free (NautilusTextLayout *text_layout) +{ + g_list_foreach (text_layout->rows, text_layout_free_row, NULL); + g_list_free (text_layout->rows); + g_free (text_layout); +} + +/** + * nautilus_text_layout_new: + * @font: Name of the font that will be used to render the text. + * @text: Text to be formatted. + * @separators: Separators used for word wrapping, can be NULL. + * @max_width: Width in pixels to be used for word wrapping. + * @confine: Whether it is mandatory to wrap at @max_width. + * + * Creates a new &NautilusTextLayout structure by wrapping the specified + * text. If non-NULL, the @separators argument defines a set of characters + * to be used as word delimiters for performing word wrapping. If it is + * NULL, then only spaces will be used as word delimiters. + * + * The @max_width argument is used to specify the width at which word + * wrapping will be performed. If there is a very long word that does not + * fit in a single line, the @confine argument can be used to specify + * whether the word should be unconditionally split to fit or whether + * the maximum width should be increased as necessary. + * + * Return value: A newly-created &NautilusTextLayout structure. + */ +NautilusTextLayout * +nautilus_text_layout_new (const NautilusScalableFont *font, + int font_size, + const char *text, + const char *separators, + int max_width, + gboolean confine) +{ + NautilusTextLayout *text_layout; + NautilusTextLayoutRow *row; + const char *row_end; + const char *s, *word_start, *word_end, *old_word_end; + char *sub_text; + int i, w_len; + int w; + const char *text_iter; + int text_len, separators_len; + + g_return_val_if_fail (font != NULL, NULL); + g_return_val_if_fail (font_size > 0, NULL); + g_return_val_if_fail (text != NULL, NULL); + g_return_val_if_fail (nautilus_strlen (text) > 0, NULL); + + if (!separators) + separators = " "; + + text_len = strlen (text); + + separators_len = strlen (separators); + + text_layout = g_new (NautilusTextLayout, 1); + + text_layout->rows = NULL; + text_layout->font = font; + text_layout->font_size = font_size; + text_layout->width = 0; + text_layout->height = 0; + text_layout->baseline_skip = font_size; + + word_end = NULL; + + text_iter = text; + while (*text_iter) { + for (row_end = text_iter; *row_end != 0 && *row_end != '\n'; row_end++); + + /* Accumulate words from this row until they don't fit in the max_width */ + + s = text_iter; + + while (s < row_end) { + word_start = s; + old_word_end = word_end; + for (word_end = word_start; *word_end; word_end++) { + const char *p; + for (p = separators; *p; p++) { + if (*word_end == *p) + goto found; + } + } + found: + if (word_end < row_end) + word_end++; + + if (nautilus_scalable_font_text_width (font, font_size, text_iter, word_end - text_iter) > max_width) { + if (word_start == text_iter) { + if (confine) { + /* We must force-split the word. Look for a proper + * place to do it. + */ + + w_len = word_end - word_start; + + for (i = 1; i < w_len; i++) { + w = nautilus_scalable_font_text_width (font, font_size, word_start, i); + if (w > max_width) { + if (i == 1) + /* Shit, not even a single character fits */ + max_width = w; + else + break; + } + } + + /* Create sub-row with the chars that fit */ + + sub_text = g_strndup (word_start, i - 1); + + row = g_new (NautilusTextLayoutRow, 1); + row->text = sub_text; + row->text_length = i - 1; + row->width = nautilus_scalable_font_text_width (font, font_size, + sub_text, + strlen (sub_text)); + + text_layout->rows = g_list_append (text_layout->rows, row); + + if (row->width > text_layout->width) + text_layout->width = row->width; + + text_layout->height += text_layout->baseline_skip; + + /* Bump the text pointer */ + + text_iter += i - 1; + s = text_iter; + + continue; + } else + max_width = nautilus_scalable_font_text_width (font, font_size, word_start, word_end - word_start); + + continue; /* Retry split */ + } else { + word_end = old_word_end; /* Restore to region that does fit */ + break; /* Stop the loop because we found something that doesn't fit */ + } + } + + s = word_end; + } + + /* Append row */ + + if (text_iter == row_end) { + /* We are on a newline, so append an empty row */ + + text_layout->rows = g_list_append (text_layout->rows, NULL); + text_layout->height += text_layout->baseline_skip / 2; + + /* Next! */ + + text_iter = row_end + 1; + } else { + /* Create subrow and append it to the list */ + + int sub_len; + sub_len = word_end - text_iter; + + sub_text = g_strndup (text_iter, sub_len); + + row = g_new (NautilusTextLayoutRow, 1); + row->text = sub_text; + row->text_length = sub_len; + row->width = nautilus_scalable_font_text_width (font, font_size, sub_text, sub_len); + + text_layout->rows = g_list_append (text_layout->rows, row); + + if (row->width > text_layout->width) + text_layout->width = row->width; + + text_layout->height += text_layout->baseline_skip; + + /* Next! */ + + text_iter = word_end; + } + } + + return text_layout; +} + +/** + * nautilus_text_layout_paint: + * @ti: An icon text info structure. + * @drawable: Target drawable. + * @gc: GC used to render the string. + * @x: Left coordinate for text. + * @y: Upper coordinate for text. + * @just: Justification for text. + * + * Paints the formatted text in the icon text info structure onto a drawable. + * This is just a sample implementation; applications can choose to use other + * rendering functions. + */ +void +nautilus_text_layout_paint (const NautilusTextLayout *text_layout, + GdkPixbuf *destination_pixbuf, + int x, + int y, + GtkJustification justification, + guint32 color, + gboolean underlined) +{ + GList *item; + const NautilusTextLayoutRow *row; + int xpos; + + g_return_if_fail (text_layout != NULL); + g_return_if_fail (destination_pixbuf != NULL); + g_return_if_fail (justification >= GTK_JUSTIFY_LEFT && justification <= GTK_JUSTIFY_FILL); + + /* FIXME bugzilla.eazel.com 5087: Make sure the color we are fed is opaque. The real solution is + * to fix the callers. + */ + color = NAUTILUS_RGBA_COLOR_PACK (NAUTILUS_RGBA_COLOR_GET_R (color), + NAUTILUS_RGBA_COLOR_GET_G (color), + NAUTILUS_RGBA_COLOR_GET_B (color), + NAUTILUS_OPACITY_FULLY_OPAQUE); + + for (item = text_layout->rows; item; item = item->next) { + if (item->data) { + row = item->data; + + switch (justification) { + case GTK_JUSTIFY_LEFT: + xpos = 0; + break; + + case GTK_JUSTIFY_RIGHT: + xpos = text_layout->width - row->width; + break; + + case GTK_JUSTIFY_CENTER: + xpos = (text_layout->width - row->width) / 2; + break; + + default: + /* Anyone care to implement GTK_JUSTIFY_FILL? */ + g_warning ("Justification type %d not supported. Using left-justification.", + (int) justification); + xpos = 0; + } + + nautilus_scalable_font_draw_text (text_layout->font, + destination_pixbuf, + x + xpos, + y, + NULL, + text_layout->font_size, + row->text, + row->text_length, + color, + NAUTILUS_OPACITY_FULLY_OPAQUE); + + /* Underline the text if needed */ + if (underlined) { + ArtIRect underline_rect; + + /* FIXME bugzilla.eazel.com 2865: This underlining code should + * take into account the baseline for the rendered string rather + * that doing the '-2' nonsense. + */ + nautilus_art_irect_assign (&underline_rect, + x + xpos, + y + text_layout->font_size - 2, + row->width, + 1); + + nautilus_gdk_pixbuf_fill_rectangle_with_color (destination_pixbuf, + &underline_rect, + color); + } + + y += text_layout->baseline_skip; + } else + y += text_layout->baseline_skip / 2; + } +} diff --git a/libnautilus-extensions/nautilus-text-layout.h b/libnautilus-extensions/nautilus-text-layout.h new file mode 100644 index 000000000..02a419828 --- /dev/null +++ b/libnautilus-extensions/nautilus-text-layout.h @@ -0,0 +1,84 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* nautilus-text-layout.h - Functions to layout text. + + Copyright (C) 1999, 2000 Eazel, Inc. + + The Gnome Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Gnome Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the Gnome Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Authors: Ramiro Estrugo <ramiro@eazel.com> +*/ + +#ifndef NAUTILUS_TEXT_LAYOUT_H +#define NAUTILUS_TEXT_LAYOUT_H + +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <libgnome/gnome-defs.h> +#include <libnautilus-extensions/nautilus-scalable-font.h> +#include <libart_lgpl/art_rect.h> + +BEGIN_GNOME_DECLS + +/* + * The following text_layout stuff was shamelessly plundered + * from libgnomeui/gnome-icon-text.[ch] by Federico Mena. + * + * It was hacked to use NautilusScalableFont and GdkPixbuf + * instead of GdkFont and GdkDrawable. We want to use the + * same layout algorithm in Nautilus so that both the smooth + * and not smooth text rendering cases have predictably + * similar result. + * + * I also made some minor Nautilus-like style changes. -re + + */ +typedef struct +{ + char *text; + int width; + guint text_length; +} NautilusTextLayoutRow; + +typedef struct +{ + GList *rows; + const NautilusScalableFont *font; + int font_size; + int width; + int height; + int baseline_skip; +} NautilusTextLayout; + +NautilusTextLayout *nautilus_text_layout_new (const NautilusScalableFont *font, + int font_size, + const char *text, + const char *separators, + int max_width, + gboolean confine); +void nautilus_text_layout_paint (const NautilusTextLayout *text_info, + GdkPixbuf *pixbuf, + int x, + int y, + GtkJustification justification, + guint32 color, + gboolean underlined); +void nautilus_text_layout_free (NautilusTextLayout *text_info); + +END_GNOME_DECLS + +#endif /* NAUTILUS_TEXT_LAYOUT_H */ + + diff --git a/libnautilus-private/Makefile.am b/libnautilus-private/Makefile.am index de210c64a..2705dbf38 100644 --- a/libnautilus-private/Makefile.am +++ b/libnautilus-private/Makefile.am @@ -56,6 +56,7 @@ nautilus_metafile_server_idl_sources = \ libnautilus_extensions_la_SOURCES = \ $(nautilus_metafile_server_idl_sources) \ + nautilus-annotation.c \ nautilus-art-extensions.c \ nautilus-art-gtk-extensions.c \ nautilus-background-canvas-group.c \ @@ -169,6 +170,7 @@ libnautilus_extensions_la_SOURCES = \ # Everything is private for now noinst_HEADERS = \ + nautilus-annotation.h \ nautilus-art-extensions.h \ nautilus-art-gtk-extensions.h \ nautilus-background-canvas-group.h \ diff --git a/libnautilus-private/bug-5712-pr3-workaround--gdk-pixbuf-drawable.c b/libnautilus-private/bug-5712-pr3-workaround--gdk-pixbuf-drawable.c new file mode 100644 index 000000000..7c8b32c86 --- /dev/null +++ b/libnautilus-private/bug-5712-pr3-workaround--gdk-pixbuf-drawable.c @@ -0,0 +1,1196 @@ +/* FIXME bugzilla.eazel.com 5813: + * As soon as gtk 1.2.9 is released, this hack needs to be exorcised. + */ + +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* GdkPixbuf library - convert X drawable information to RGB + * + * Copyright (C) 1999 Michael Zucchi + * + * Authors: Michael Zucchi <zucchi@zedzone.mmc.com.au> + * Cody Russell <bratsche@gnome.org> + * Federico Mena-Quintero <federico@gimp.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include <config.h> +#include <stdio.h> +#include <string.h> +#include "bug-5712-pr3-workaround--gdk-pixbuf-private.h" + +#if (G_BYTE_ORDER == G_LITTLE_ENDIAN) +#define LITTLE +#endif +#define d(x) + + + +static guint32 mask_table[] = { + 0x00000000, 0x00000001, 0x00000003, 0x00000007, + 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, + 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff, + 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, + 0x0000ffff, 0x0001ffff, 0x0003ffff, 0x0007ffff, + 0x000fffff, 0x001fffff, 0x003fffff, 0x007fffff, + 0x00ffffff, 0x01ffffff, 0x03ffffff, 0x07ffffff, + 0x0fffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, + 0xffffffff +}; + + + +/* + convert 1 bits-pixel data + no alpha +*/ +static void +rgb1 (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + guint8 *s; + register guint8 data; + guint8 *o; + guint8 *srow = image->mem, *orow = pixels; + + d (printf ("1 bits/pixel\n")); + + /* convert upto 8 pixels/time */ + /* its probably not worth trying to make this run very fast, who uses + 1 bit displays anymore? */ + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + + for (xx = 0; xx < width; xx ++) { + data = srow[xx >> 3] >> (7 - (xx & 7)) & 1; + *o++ = colormap->colors[data].red; + *o++ = colormap->colors[data].green; + *o++ = colormap->colors[data].blue; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 1 bits/pixel data + with alpha +*/ +static void +rgb1a (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + guint8 *s; + register guint8 data; + guint8 *o; + guint8 *srow = image->mem, *orow = pixels; + guint32 remap[2]; + + d (printf ("1 bits/pixel\n")); + + /* convert upto 8 pixels/time */ + /* its probably not worth trying to make this run very fast, who uses + 1 bit displays anymore? */ + width = image->width; + height = image->height; + bpl = image->bpl; + + for (xx = 0; xx < 2; xx++) { +#ifdef LITTLE + remap[xx] = 0xff000000 + | colormap->colors[xx].blue << 16 + | colormap->colors[xx].green << 8 + | colormap->colors[xx].red; +#else + remap[xx] = 0xff + | colormap->colors[xx].red << 24 + | colormap->colors[xx].green << 16 + | colormap->colors[xx].blue << 8; +#endif + } + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + + for (xx = 0; xx < width; xx ++) { + data = srow[xx >> 3] >> (7 - (xx & 7)) & 1; + *o++ = remap[data]; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 8 bits/pixel data + no alpha +*/ +static void +rgb8 (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + guint32 mask; + register guint32 data; + guint8 *srow = image->mem, *orow = pixels; + register guint8 *s; + register guint8 *o; + + width = image->width; + height = image->height; + bpl = image->bpl; + + d (printf ("8 bit, no alpha output\n")); + + mask = mask_table[image->depth]; + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + for (xx = 0; xx < width; xx++) { + data = *s++ & mask; + *o++ = colormap->colors[data].red; + *o++ = colormap->colors[data].green; + *o++ = colormap->colors[data].blue; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 8 bits/pixel data + with alpha +*/ +static void +rgb8a (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + guint32 mask; + register guint32 data; + guint32 remap[256]; + register guint8 *s; /* read 2 pixels at once */ + register guint32 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + d (printf ("8 bit, with alpha output\n")); + + mask = mask_table[image->depth]; + + for (xx = 0; xx < colormap->size; xx++) { +#ifdef LITTLE + remap[xx] = 0xff000000 + | colormap->colors[xx].blue << 16 + | colormap->colors[xx].green << 8 + | colormap->colors[xx].red; +#else + remap[xx] = 0xff + | colormap->colors[xx].red << 24 + | colormap->colors[xx].green << 16 + | colormap->colors[xx].blue << 8; +#endif + } + + for (yy = 0; yy < height; yy++) { + s = srow; + o = (guint32 *) orow; + for (xx = 0; xx < width; xx ++) { + data = *s++ & mask; + *o++ = remap[data]; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 16 bits/pixel data + no alpha + data in lsb format +*/ +static void +rgb565lsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint32 *s; /* read 2 pixels at once */ +#else + register guint8 *s; /* read 2 pixels at once */ +#endif + register guint16 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint32 *) srow; +#else + s = srow; +#endif + o = (guint16 *) orow; + for (xx = 1; xx < width; xx += 2) { + register guint32 data; +#ifdef LITTLE + data = *s++; + *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13 + | (data & 0x7e0) << 5 | (data & 0x600) >> 1; + *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2 + | (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21; + *o++ = (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25 + | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10; +#else + /* swap endianness first */ + data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + s += 4; + *o++ = (data & 0xf800) | (data & 0xe000) >> 5 + | (data & 0x7e0) >> 3 | (data & 0x600) >> 9; + *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6 + | (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29; + *o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17 + | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18; +#endif + } + /* check for last remaining pixel */ + if (width & 1) { + register guint16 data; +#ifdef LITTLE + data = *((short *) s); +#else + data = *((short *) s); + data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); +#endif + ((char *) o)[0] = ((data >> 8) & 0xf8) | ((data >> 13) & 0x7); + ((char *) o)[1] = ((data >> 3) & 0xfc) | ((data >> 9) & 0x3); + ((char *) o)[2] = ((data << 3) & 0xf8) | ((data >> 2) & 0x7); + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 16 bits/pixel data + no alpha + data in msb format +*/ +static void +rgb565msb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint8 *s; /* need to swap data order */ +#else + register guint32 *s; /* read 2 pixels at once */ +#endif + register guint16 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = srow; +#else + s = (guint32 *) srow; +#endif + o = (guint16 *) orow; + for (xx = 1; xx < width; xx += 2) { + register guint32 data; +#ifdef LITTLE + /* swap endianness first */ + data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + s += 4; + *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13 + | (data & 0x7e0) << 5 | (data & 0x600) >> 1; + *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2 + | (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21; + *o++ = (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25 + | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10; +#else + data = *s++; + *o++ = (data & 0xf800) | (data & 0xe000) >> 5 + | (data & 0x7e0) >> 3 | (data & 0x600) >> 9; + *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6 + | (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29; + *o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17 + | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18; +#endif + } + /* check for last remaining pixel */ + if (width & 1) { + register guint16 data; +#ifdef LITTLE + data = *((short *) s); + data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); +#else + data = *((short *) s); +#endif + ((char *) o)[0] = ((data >> 8) & 0xf8) | ((data >> 13) & 0x7); + ((char *) o)[1] = ((data >> 3) & 0xfc) | ((data >> 9) & 0x3); + ((char *) o)[2] = ((data << 3) & 0xf8) | ((data >> 2) & 0x7); + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 16 bits/pixel data + with alpha + data in lsb format +*/ +static void +rgb565alsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint16 *s; /* read 1 pixels at once */ +#else + register guint8 *s; +#endif + register guint32 *o; + + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint16 *) srow; +#else + s = (guint8 *) srow; +#endif + o = (guint32 *) orow; + for (xx = 0; xx < width; xx ++) { + register guint32 data; + /* rrrrrggg gggbbbbb -> rrrrrRRR ggggggGG bbbbbBBB aaaaaaaa */ + /* little endian: aaaaaaaa bbbbbBBB ggggggGG rrrrrRRR */ +#ifdef LITTLE + data = *s++; + *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13 + | (data & 0x7e0) << 5 | (data & 0x600) >> 1 + | (data & 0x1f) << 19 | (data & 0x1c) << 14 + | 0xff000000; +#else + /* swap endianness first */ + data = s[0] | s[1] << 8; + s += 2; + *o++ = (data & 0xf800) << 16 | (data & 0xe000) << 11 + | (data & 0x7e0) << 13 | (data & 0x600) << 7 + | (data & 0x1f) << 11 | (data & 0x1c) << 6 + | 0xff; +#endif + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 16 bits/pixel data + with alpha + data in msb format +*/ +static void +rgb565amsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint8 *s; +#else + register guint16 *s; /* read 1 pixels at once */ +#endif + register guint32 *o; + + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { + s = srow; + o = (guint32 *) orow; + for (xx = 0; xx < width; xx ++) { + register guint32 data; + /* rrrrrggg gggbbbbb -> rrrrrRRR gggggg00 bbbbbBBB aaaaaaaa */ + /* little endian: aaaaaaaa bbbbbBBB gggggg00 rrrrrRRR */ +#ifdef LITTLE + /* swap endianness first */ + data = s[0] | s[1] << 8; + s += 2; + *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13 + | (data & 0x7e0) << 5 | (data & 0x600) >> 1 + | (data & 0x1f) << 19 | (data & 0x1c) << 14 + | 0xff000000; +#else + data = *s++; + *o++ = (data & 0xf800) << 16 | (data & 0xe000) << 11 + | (data & 0x7e0) << 13 | (data & 0x600) << 7 + | (data & 0x1f) << 11 | (data & 0x1c) << 6 + | 0xff; +#endif + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 15 bits/pixel data + no alpha + data in lsb format +*/ +static void +rgb555lsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint32 *s; /* read 2 pixels at once */ +#else + register guint8 *s; /* read 2 pixels at once */ +#endif + register guint16 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint32 *) srow; +#else + s = srow; +#endif + o = (guint16 *) orow; + for (xx = 1; xx < width; xx += 2) { + register guint32 data; +#ifdef LITTLE + data = *s++; + *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12 + | (data & 0x3e0) << 6 | (data & 0x380) << 1; + *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2 + | (data & 0x7c000000) >> 15 | (data & 0x70000000) >> 20; + *o++ = (data & 0x3e00000) >> 18 | (data & 0x3800000) >> 23 + | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10; +#else + /* swap endianness first */ + data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + s += 4; + *o++ = (data & 0x7c00) << 1 | (data & 0x7000) >> 4 + | (data & 0x3e0) >> 2 | (data & 0x380) >> 7; + *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6 + | (data & 0x7c000000) >> 23 | (data & 0x70000000) >> 28; + *o++ = (data & 0x3e00000) >> 10 | (data & 0x3800000) >> 15 + | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18; +#endif + } + /* check for last remaining pixel */ + if (width & 1) { + register guint16 data; +#ifdef LITTLE + data = *((short *) s); +#else + data = *((short *) s); + data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); +#endif + ((char *) o)[0] = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12; + ((char *) o)[1] = (data & 0x3e0) >> 2 | (data & 0x380) >> 7; + ((char *) o)[2] = (data & 0x1f) << 3 | (data & 0x1c) >> 2; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 15 bits/pixel data + no alpha + data in msb format +*/ +static void +rgb555msb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint8 *s; /* read 2 pixels at once */ +#else + register guint32 *s; /* read 2 pixels at once */ +#endif + register guint16 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { + s = srow; + o = (guint16 *) orow; + for (xx = 1; xx < width; xx += 2) { + register guint32 data; +#ifdef LITTLE + /* swap endianness first */ + data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; + s += 4; + *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12 + | (data & 0x3e0) << 6 | (data & 0x380) << 1; + *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2 + | (data & 0x7c000000) >> 15 | (data & 0x70000000) >> 20; + *o++ = (data & 0x3e00000) >> 18 | (data & 0x3800000) >> 23 + | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10; +#else + data = *s++; + *o++ = (data & 0x7c00) << 1 | (data & 0x7000) >> 4 + | (data & 0x3e0) >> 2 | (data & 0x380) >> 7; + *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6 + | (data & 0x7c000000) >> 23 | (data & 0x70000000) >> 28; + *o++ = (data & 0x3e00000) >> 10 | (data & 0x3800000) >> 15 + | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18; +#endif + } + /* check for last remaining pixel */ + if (width & 1) { + register guint16 data; +#ifdef LITTLE + data = *((short *) s); + data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); +#else + data = *((short *) s); +#endif + ((char *) o)[0] = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12; + ((char *) o)[1] = (data & 0x3e0) >> 2 | (data & 0x380) >> 7; + ((char *) o)[2] = (data & 0x1f) << 3 | (data & 0x1c) >> 2; + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 15 bits/pixel data + with alpha + data in lsb format +*/ +static void +rgb555alsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint16 *s; /* read 1 pixels at once */ +#else + register guint8 *s; +#endif + register guint32 *o; + + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint16 *) srow; +#else + s = srow; +#endif + o = (guint32 *) orow; + for (xx = 0; xx < width; xx++) { + register guint32 data; + /* rrrrrggg gggbbbbb -> rrrrrRRR gggggGGG bbbbbBBB aaaaaaaa */ + /* little endian: aaaaaaaa bbbbbBBB gggggGGG rrrrrRRR */ +#ifdef LITTLE + data = *s++; + *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12 + | (data & 0x3e0) << 6 | (data & 0x380) << 1 + | (data & 0x1f) << 19 | (data & 0x1c) << 14 + | 0xff000000; +#else + /* swap endianness first */ + data = s[0] | s[1] << 8; + s += 2; + *o++ = (data & 0x7c00) << 17 | (data & 0x7000) << 12 + | (data & 0x3e0) << 14 | (data & 0x380) << 9 + | (data & 0x1f) << 11 | (data & 0x1c) << 6 + | 0xff; +#endif + } + srow += bpl; + orow += rowstride; + } +} + +/* + convert 15 bits/pixel data + with alpha + data in msb format +*/ +static void +rgb555amsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + +#ifdef LITTLE + register guint16 *s; /* read 1 pixels at once */ +#else + register guint8 *s; +#endif + register guint32 *o; + + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint16 *) srow; +#else + s = srow; +#endif + o = (guint32 *) orow; + for (xx = 0; xx < width; xx++) { + register guint32 data; + /* rrrrrggg gggbbbbb -> rrrrrRRR gggggGGG bbbbbBBB aaaaaaaa */ + /* little endian: aaaaaaaa bbbbbBBB gggggGGG rrrrrRRR */ +#ifdef LITTLE + /* swap endianness first */ + data = s[0] | s[1] << 8; + s += 2; + *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12 + | (data & 0x3e0) << 6 | (data & 0x380) << 1 + | (data & 0x1f) << 19 | (data & 0x1c) << 14 + | 0xff000000; +#else + data = *s++; + *o++ = (data & 0x7c00) << 17 | (data & 0x7000) << 12 + | (data & 0x3e0) << 14 | (data & 0x380) << 9 + | (data & 0x1f) << 11 | (data & 0x1c) << 6 + | 0xff; +#endif + } + srow += bpl; + orow += rowstride; + } +} + + +static void +rgb888alsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + + guint8 *s; /* for byte order swapping */ + guint8 *o; + guint8 *srow = image->mem, *orow = pixels; + + width = image->width; + height = image->height; + bpl = image->bpl; + + d (printf ("32 bits/pixel with alpha\n")); + + /* lsb data */ + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + for (xx = 0; xx < width; xx++) { + *o++ = s[2]; + *o++ = s[1]; + *o++ = s[0]; + *o++ = 0xff; + s += 4; + } + srow += bpl; + orow += rowstride; + } +} + +static void +rgb888lsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + + guint8 *srow = image->mem, *orow = pixels; + guint8 *o, *s; + + width = image->width; + height = image->height; + bpl = image->bpl; + + d (printf ("32 bit, lsb, no alpha\n")); + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + for (xx = 0; xx < width; xx++) { + *o++ = s[2]; + *o++ = s[1]; + *o++ = s[0]; + s += 4; + } + srow += bpl; + orow += rowstride; + } +} + +static void +rgb888amsb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + + guint8 *srow = image->mem, *orow = pixels; +#ifdef LITTLE + guint32 *o; + guint32 *s; +#else + guint8 *s; /* for byte order swapping */ + guint8 *o; +#endif + + d (printf ("32 bit, msb, with alpha\n")); + + width = image->width; + height = image->height; + bpl = image->bpl; + + /* msb data */ + for (yy = 0; yy < height; yy++) { +#ifdef LITTLE + s = (guint32 *) srow; + o = (guint32 *) orow; +#else + s = srow; + o = orow; +#endif + for (xx = 0; xx < width; xx++) { +#ifdef LITTLE + *o++ = s[1]; + *o++ = s[2]; + *o++ = s[3]; + *o++ = 0xff; + s += 4; +#else + *o++ = (*s << 8) | 0xff; /* untested */ + s++; +#endif + } + srow += bpl; + orow += rowstride; + } +} + +static void +rgb888msb (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *colormap) +{ + int xx, yy; + int width, height; + int bpl; + + guint8 *srow = image->mem, *orow = pixels; + guint8 *s; + guint8 *o; + + d (printf ("32 bit, msb, no alpha\n")); + + width = image->width; + height = image->height; + bpl = image->bpl; + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + for (xx = 0; xx < width; xx++) { + *o++ = s[1]; + *o++ = s[2]; + *o++ = s[3]; + s += 4; + } + srow += bpl; + orow += rowstride; + } +} + +/* + This should work correctly with any display/any endianness, but will probably + run quite slow +*/ +static void +convert_real_slow (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *cmap, int alpha) +{ + int xx, yy; + int width, height; + int bpl; + guint8 *srow = image->mem, *orow = pixels; + guint8 *s; + guint8 *o; + guint32 pixel; + GdkVisual *v; + guint8 component; + int i; + + width = image->width; + height = image->height; + bpl = image->bpl; + v = gdk_colormap_get_visual(cmap); + + d(printf("rgb mask/shift/prec = %x:%x:%x %d:%d:%d %d:%d:%d\n", + v->red_mask, v->green_mask, v->blue_mask, + v->red_shift, v->green_shift, v->blue_shift, + v->red_prec, v->green_prec, v->blue_prec)); + + for (yy = 0; yy < height; yy++) { + s = srow; + o = orow; + for (xx = 0; xx < width; xx++) { + pixel = gdk_image_get_pixel(image, xx, yy); + switch (v->type) { + /* I assume this is right for static & greyscale's too? */ + case GDK_VISUAL_STATIC_GRAY: + case GDK_VISUAL_GRAYSCALE: + case GDK_VISUAL_STATIC_COLOR: + case GDK_VISUAL_PSEUDO_COLOR: + *o++ = cmap->colors[pixel].red; + *o++ = cmap->colors[pixel].green; + *o++ = cmap->colors[pixel].blue; + break; + case GDK_VISUAL_TRUE_COLOR: + /* This is odd because it must sometimes shift left (otherwise + I'd just shift >> (*_shift - 8 + *_prec + <0-7>). This logic + should work for all bit sizes/shifts/etc. */ + component = 0; + for (i = 24; i < 32; i += v->red_prec) + component |= ((pixel & v->red_mask) << (32 - v->red_shift - v->red_prec)) >> i; + *o++ = component; + component = 0; + for (i = 24; i < 32; i += v->green_prec) + component |= ((pixel & v->green_mask) << (32 - v->green_shift - v->green_prec)) >> i; + *o++ = component; + component = 0; + for (i = 24; i < 32; i += v->blue_prec) + component |= ((pixel & v->blue_mask) << (32 - v->blue_shift - v->blue_prec)) >> i; + *o++ = component; + break; + case GDK_VISUAL_DIRECT_COLOR: + *o++ = cmap->colors[((pixel & v->red_mask) << (32 - v->red_shift - v->red_prec)) >> 24].red; + *o++ = cmap->colors[((pixel & v->green_mask) << (32 - v->green_shift - v->green_prec)) >> 24].green; + *o++ = cmap->colors[((pixel & v->blue_mask) << (32 - v->blue_shift - v->blue_prec)) >> 24].blue; + break; + } + if (alpha) + *o++ = 0xff; + } + srow += bpl; + orow += rowstride; + } +} + +typedef void (* cfunc) (GdkImage *image, guchar *pixels, int rowstride, GdkColormap *cmap); + +static cfunc convert_map[] = { + rgb1,rgb1,rgb1a,rgb1a, + rgb8,rgb8,rgb8a,rgb8a, + rgb555lsb,rgb555msb,rgb555alsb,rgb555amsb, + rgb565lsb,rgb565msb,rgb565alsb,rgb565amsb, + rgb888lsb,rgb888msb,rgb888alsb,rgb888amsb +}; + +/* + perform actual conversion + + If we can, try and use the optimised code versions, but as a default + fallback, and always for direct colour, use the generic/slow but complete + conversion function. +*/ +static void +rgbconvert (GdkImage *image, guchar *pixels, int rowstride, int alpha, GdkColormap *cmap) +{ + int index = (image->byte_order == GDK_MSB_FIRST) | (alpha != 0) << 1; + int bank=5; /* default fallback converter */ + GdkVisual *v = gdk_colormap_get_visual(cmap); + + d(printf("masks = %x:%x:%x\n", v->red_mask, v->green_mask, v->blue_mask)); + d(printf("image depth = %d, bpp = %d\n", image->depth, image->bpp)); + + switch (v->type) { + /* I assume this is right for static & greyscale's too? */ + case GDK_VISUAL_STATIC_GRAY: + case GDK_VISUAL_GRAYSCALE: + case GDK_VISUAL_STATIC_COLOR: + case GDK_VISUAL_PSEUDO_COLOR: + switch (image->bpp) { + case 1: + bank = 0; + break; + case 8: + bank = 1; + break; + } + break; + case GDK_VISUAL_TRUE_COLOR: + switch (image->depth) { + case 15: + if (v->red_mask == 0x7c00 && v->green_mask == 0x3e0 && v->blue_mask == 0x1f + && image->bpp == 16) + bank = 2; + break; + case 16: + if (v->red_mask == 0xf800 && v->green_mask == 0x7e0 && v->blue_mask == 0x1f + && image->bpp == 16) + bank = 3; + break; + case 24: + case 32: + if (v->red_mask == 0xff0000 && v->green_mask == 0xff00 && v->blue_mask == 0xff + && image->bpp == 32) + bank = 4; + break; + } + break; + case GDK_VISUAL_DIRECT_COLOR: + /* always use the slow version */ + break; + } + + d(printf("converting using conversion function in bank %d\n", bank)); + + if (bank==5) { + convert_real_slow(image, pixels, rowstride, cmap, alpha); + } else { + index |= bank << 2; + (* convert_map[index]) (image, pixels, rowstride, cmap); + } +} + + +/* Exported functions */ + +/** + * gdk_pixbuf_get_from_drawable: + * @dest: Destination pixbuf, or NULL if a new pixbuf should be created. + * @src: Source drawable. + * @cmap: A colormap if @src is a pixmap. If it is a window, this argument will + * be ignored. + * @src_x: Source X coordinate within drawable. + * @src_y: Source Y coordinate within drawable. + * @dest_x: Destination X coordinate in pixbuf, or 0 if @dest is NULL. + * @dest_y: Destination Y coordinate in pixbuf, or 0 if @dest is NULL. + * @width: Width in pixels of region to get. + * @height: Height in pixels of region to get. + * + * Transfers image data from a Gdk drawable and converts it to an RGB(A) + * representation inside a GdkPixbuf. + * + * If the drawable @src is a pixmap, then a suitable colormap must be specified, + * since pixmaps are just blocks of pixel data without an associated colormap. + * If the drawable is a window, the @cmap argument will be ignored and the + * window's own colormap will be used instead. + * + * If the specified destination pixbuf @dest is #NULL, then this function will + * create an RGB pixbuf with 8 bits per channel and no alpha, with the same size + * specified by the @width and @height arguments. In this case, the @dest_x and + * @dest_y arguments must be specified as 0, otherwise the function will return + * #NULL. If the specified destination pixbuf is not NULL and it contains alpha + * information, then the filled pixels will be set to full opacity. + * + * If the specified drawable is a pixmap, then the requested source rectangle + * must be completely contained within the pixmap, otherwise the function will + * return #NULL. + * + * If the specified drawable is a window, then it must be viewable, i.e. all of + * its ancestors up to the root window must be mapped. Also, the specified + * source rectangle must be completely contained within the window and within + * the screen. If regions of the window are obscured by noninferior windows, the + * contents of those regions are undefined. The contents of regions obscured by + * inferior windows of a different depth than that of the source window will also + * be undefined. + * + * Return value: The same pixbuf as @dest if it was non-NULL, or a newly-created + * pixbuf with a reference count of 1 if no destination pixbuf was specified; in + * the latter case, NULL will be returned if not enough memory could be + * allocated for the pixbuf to be created. + **/ +GdkPixbuf * NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, + GdkDrawable *src, GdkColormap *cmap, + int src_x, int src_y, + int dest_x, int dest_y, + int width, int height); + + +GdkImage* NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_image_get (GdkWindow *window, + gint x, + gint y, + gint width, + gint height); + +GdkPixbuf * +NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, + GdkDrawable *src, GdkColormap *cmap, + int src_x, int src_y, + int dest_x, int dest_y, + int width, int height) +{ + GdkWindowType window_type; + int src_width, src_height; + GdkImage *image; + int rowstride, bpp, alpha; + + /* General sanity checks */ + + g_return_val_if_fail (src != NULL, NULL); + + window_type = gdk_window_get_type (src); + + if (window_type == GDK_WINDOW_PIXMAP) + g_return_val_if_fail (cmap != NULL, NULL); + else + /* FIXME: this is not perfect, since is_viewable() only tests + * recursively up the Gdk parent window tree, but stops at + * foreign windows or Gdk toplevels. I.e. if a window manager + * unmapped one of its own windows, this won't work. + */ + g_return_val_if_fail (gdk_window_is_viewable (src), NULL); + + if (!dest) + g_return_val_if_fail (dest_x == 0 && dest_y == 0, NULL); + else { + g_return_val_if_fail (dest->colorspace == GDK_COLORSPACE_RGB, NULL); + g_return_val_if_fail (dest->n_channels == 3 || dest->n_channels == 4, NULL); + g_return_val_if_fail (dest->bits_per_sample == 8, NULL); + } + + /* Coordinate sanity checks */ + + gdk_window_get_size (src, &src_width, &src_height); + + g_return_val_if_fail (src_x >= 0 && src_y >= 0, NULL); + g_return_val_if_fail (src_x + width <= src_width && src_y + height <= src_height, NULL); + + if (dest) { + g_return_val_if_fail (dest_x >= 0 && dest_y >= 0, NULL); + g_return_val_if_fail (dest_x + width <= dest->width, NULL); + g_return_val_if_fail (dest_y + height <= dest->height, NULL); + } + + if (window_type != GDK_WINDOW_PIXMAP) { + int ret; + int src_xorigin, src_yorigin; + int screen_width, screen_height; + int screen_srcx, screen_srcy; + + ret = gdk_window_get_origin (src, &src_xorigin, &src_yorigin); + g_return_val_if_fail (ret != FALSE, NULL); + + screen_width = gdk_screen_width (); + screen_height = gdk_screen_height (); + + screen_srcx = src_xorigin + src_x; + screen_srcy = src_yorigin + src_y; + + g_return_val_if_fail (screen_srcx >= 0 && screen_srcy >= 0, NULL); + g_return_val_if_fail (screen_srcx + width <= screen_width, NULL); + g_return_val_if_fail (screen_srcy + height <= screen_height, NULL); + } + + /* Get Image in ZPixmap format (packed bits). */ + image = NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_image_get (src, src_x, src_y, width, height); + if (!image) + return NULL; + + /* Create the pixbuf if needed */ + if (!dest) { + dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height); + if (!dest) { + gdk_image_destroy(image); + return NULL; + } + } + + /* Get the colormap if needed */ + if (window_type != GDK_WINDOW_PIXMAP) + cmap = gdk_window_get_colormap (src); + + alpha = dest->has_alpha; + rowstride = dest->rowstride; + bpp = alpha ? 4 : 3; + + /* we offset into the image data based on the position we are retrieving from */ + rgbconvert (image, dest->pixels + + (dest_y * rowstride) + (dest_x * bpp), + rowstride, + alpha, + cmap); + + gdk_image_destroy(image); + + return dest; +} diff --git a/libnautilus-private/bug-5712-pr3-workaround--gdk-pixbuf-private.h b/libnautilus-private/bug-5712-pr3-workaround--gdk-pixbuf-private.h new file mode 100644 index 000000000..c1159dc7c --- /dev/null +++ b/libnautilus-private/bug-5712-pr3-workaround--gdk-pixbuf-private.h @@ -0,0 +1,109 @@ +/* FIXME bugzilla.eazel.com 5813: + * As soon as gtk 1.2.9 is released, this hack needs to be exorcised. + */ + +/* GdkPixbuf library - Private declarations + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Mark Crichton <crichton@gimp.org> + * Miguel de Icaza <miguel@gnu.org> + * Federico Mena-Quintero <federico@gimp.org> + * Havoc Pennington <hp@redhat.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef GDK_PIXBUF_PRIVATE_H +#define GDK_PIXBUF_PRIVATE_H + +#include <gdk-pixbuf/gdk-pixbuf.h> + + + +/* Private part of the GdkPixbuf structure */ +struct _GdkPixbuf { + /* Reference count */ + int ref_count; + + /* Color space */ + GdkColorspace colorspace; + + /* Number of channels, alpha included */ + int n_channels; + + /* Bits per channel */ + int bits_per_sample; + + /* Size */ + int width, height; + + /* Offset between rows */ + int rowstride; + + /* The pixel array */ + guchar *pixels; + + /* Destroy notification function; it is supposed to free the pixel array */ + GdkPixbufDestroyNotify destroy_fn; + + /* User data for the destroy notification function */ + gpointer destroy_fn_data; + + /* Last unref handler, determines whether the pixbuf should be finalized */ + GdkPixbufLastUnref last_unref_fn; + + /* User data for the last unref handler */ + gpointer last_unref_fn_data; + + /* Do we have an alpha channel? */ + guint has_alpha : 1; +}; + +/* Private part of the GdkPixbufFrame structure */ +struct _GdkPixbufFrame { + /* The pixbuf with this frame's image data */ + GdkPixbuf *pixbuf; + + /* Offsets for overlaying onto the animation's area */ + int x_offset; + int y_offset; + + /* Frame duration in ms */ + int delay_time; + + /* Overlay mode */ + GdkPixbufFrameAction action; +}; + +/* Private part of the GdkPixbufAnimation structure */ +struct _GdkPixbufAnimation { + /* Reference count */ + int ref_count; + + /* Number of frames */ + int n_frames; + + /* List of GdkPixbufFrame structures */ + GList *frames; + + /* bounding box size */ + int width, height; +}; + + + +#endif diff --git a/libnautilus-private/bug-5712-pr3-workaround--gdkimage.c b/libnautilus-private/bug-5712-pr3-workaround--gdkimage.c new file mode 100644 index 000000000..f16822a2c --- /dev/null +++ b/libnautilus-private/bug-5712-pr3-workaround--gdkimage.c @@ -0,0 +1,133 @@ +/* FIXME bugzilla.eazel.com 5813: + * As soon as gtk 1.2.9 is released, this hack needs to be exorcised. + */ + + +/* GDK - The GIMP Drawing Kit + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* + * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + +#include <config.h> + +#include <errno.h> +#include <stdlib.h> +#include <sys/types.h> + +#include <gdk/gdk.h> +#include <gdk/gdkprivate.h> + +static void gdk_image_put_normal (GdkDrawable *drawable, + GdkGC *gc, + GdkImage *image, + gint xsrc, + gint ysrc, + gint xdest, + gint ydest, + gint width, + gint height); + +GdkImage* NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_image_get (GdkWindow *window, + gint x, + gint y, + gint width, + gint height); + +GdkImage* +NAUTILUS_BUG_5712_PR3_WORKAROUND__gdk_image_get (GdkWindow *window, + gint x, + gint y, + gint width, + gint height) +{ + GdkImage *image; + GdkImagePrivate *private; + GdkWindowPrivate *win_private; + XImage *ximage; + + g_return_val_if_fail (window != NULL, NULL); + + win_private = (GdkWindowPrivate *) window; + if (win_private->destroyed) + return NULL; + + ximage = XGetImage (gdk_display, + win_private->xwindow, + x, y, width, height, + AllPlanes, ZPixmap); + + if (ximage == NULL) + return NULL; + + private = g_new (GdkImagePrivate, 1); + image = (GdkImage*) private; + + private->xdisplay = gdk_display; + private->image_put = gdk_image_put_normal; + private->ximage = ximage; + image->type = GDK_IMAGE_NORMAL; + image->visual = gdk_window_get_visual (window); + image->width = width; + image->height = height; + image->depth = private->ximage->depth; + + image->mem = private->ximage->data; + image->bpl = private->ximage->bytes_per_line; + image->bpp = private->ximage->bits_per_pixel; + image->byte_order = private->ximage->byte_order; + + return image; +} + +static void +gdk_image_put_normal (GdkDrawable *drawable, + GdkGC *gc, + GdkImage *image, + gint xsrc, + gint ysrc, + gint xdest, + gint ydest, + gint width, + gint height) +{ + GdkWindowPrivate *drawable_private; + GdkImagePrivate *image_private; + GdkGCPrivate *gc_private; + + g_return_if_fail (drawable != NULL); + g_return_if_fail (image != NULL); + g_return_if_fail (gc != NULL); + + drawable_private = (GdkWindowPrivate*) drawable; + if (drawable_private->destroyed) + return; + image_private = (GdkImagePrivate*) image; + gc_private = (GdkGCPrivate*) gc; + + g_return_if_fail (image->type == GDK_IMAGE_NORMAL); + + XPutImage (drawable_private->xdisplay, drawable_private->xwindow, + gc_private->xgc, image_private->ximage, + xsrc, ysrc, xdest, ydest, width, height); +} diff --git a/libnautilus-private/nautilus-annotation.c b/libnautilus-private/nautilus-annotation.c new file mode 100644 index 000000000..6547e1b15 --- /dev/null +++ b/libnautilus-private/nautilus-annotation.c @@ -0,0 +1,897 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- + + nautilus-annotation.c: routines for getting and setting xml-based annotations associated + with the digest of a file. + + Copyright (C) 2001 Eazel, Inc. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Author: Andy Hertzfeld <andy@eazel.com> +*/ + +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5Context structure, pass it to md5_init, call md5_update as + * needed on buffers full of bytes, and then call md5_Final, which + * will fill a supplied 16-byte array with the digest. + */ + +/* parts of this file are : + * Written March 1993 by Branko Lankester + * Modified June 1993 by Colin Plumb for altered md5.c. + * Modified October 1995 by Erik Troan for RPM + */ + +#include <config.h> +#include "nautilus-annotation.h" + +#include "nautilus-file-utilities.h" +#include "nautilus-file.h" +#include "nautilus-file-private.h" +#include "nautilus-global-preferences.h" +#include "nautilus-metadata.h" +#include "nautilus-preferences.h" +#include "nautilus-string.h" +#include "nautilus-xml-extensions.h" +#include <gnome-xml/parser.h> +#include <gnome-xml/xmlmemory.h> +#include <libgnome/gnome-util.h> +#include <libgnomevfs/gnome-vfs.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +/* icon selection callback function. */ +typedef void (* NautilusCalculateDigestCallback) (NautilusFile *file, char *file_digest); +typedef struct NautilusDigestFileHandle NautilusDigestFileHandle; + +typedef struct { + guint32 buf[4]; + guint32 bits[2]; + guchar in[64]; + int doByteReverse; +} MD5Context ; + +struct NautilusDigestFileHandle { + GnomeVFSAsyncHandle *handle; + NautilusCalculateDigestCallback callback; + NautilusFile *file; + char *buffer; + gboolean opened; + MD5Context digest_context; +}; + +#define READ_CHUNK_SIZE 65536 +#define SERVER_URI_TEMPLATE "http://dellbert.differnet.com/get_notes.cgi?ids=%s" + + +static GList* annotation_request_queue = NULL; +static GHashTable *files_awaiting_annotation = NULL; + +static void md5_transform (guint32 buf[4], const guint32 in[16]); + +static int _ie = 0x44332211; +static union _endian { int i; char b[4]; } *_endian = (union _endian *)&_ie; +#define IS_BIG_ENDIAN() (_endian->b[0] == '\x44') +#define IS_LITTLE_ENDIAN() (_endian->b[0] == '\x11') + + +/* + * Note: this code is harmless on little-endian machines. + */ +static void +_byte_reverse (guchar *buf, guint32 longs) +{ + guint32 t; + do { + t = (guint32) ((guint32) buf[3] << 8 | buf[2]) << 16 | + ((guint32) buf[1] << 8 | buf[0]); + *(guint32 *) buf = t; + buf += 4; + } while (--longs); +} + +/** + * md5_init: Initialise an md5 context object + * @ctx: md5 context + * + * Initialise an md5 buffer. + * + **/ +static void +md5_init (MD5Context *ctx) +{ + ctx->buf[0] = 0x67452301; + ctx->buf[1] = 0xefcdab89; + ctx->buf[2] = 0x98badcfe; + ctx->buf[3] = 0x10325476; + + ctx->bits[0] = 0; + ctx->bits[1] = 0; + + if (IS_BIG_ENDIAN()) + ctx->doByteReverse = 1; + else + ctx->doByteReverse = 0; +} + + + +/** + * md5_update: add a buffer to md5 hash computation + * @ctx: conetxt object used for md5 computaion + * @buf: buffer to add + * @len: buffer length + * + * Update context to reflect the concatenation of another buffer full + * of bytes. Use this to progressively construct an md5 hash. + **/ +static void +md5_update (MD5Context *ctx, const guchar *buf, guint32 len) +{ + guint32 t; + + /* Update bitcount */ + + t = ctx->bits[0]; + if ((ctx->bits[0] = t + ((guint32) len << 3)) < t) + ctx->bits[1]++; /* Carry from low to high */ + ctx->bits[1] += len >> 29; + + t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ + + /* Handle any leading odd-sized chunks */ + + if (t) { + guchar *p = (guchar *) ctx->in + t; + + t = 64 - t; + if (len < t) { + memcpy (p, buf, len); + return; + } + memcpy (p, buf, t); + if (ctx->doByteReverse) + _byte_reverse (ctx->in, 16); + md5_transform (ctx->buf, (guint32 *) ctx->in); + buf += t; + len -= t; + } + /* Process data in 64-byte chunks */ + + while (len >= 64) { + memcpy (ctx->in, buf, 64); + if (ctx->doByteReverse) + _byte_reverse (ctx->in, 16); + md5_transform (ctx->buf, (guint32 *) ctx->in); + buf += 64; + len -= 64; + } + + /* Handle any remaining bytes of data. */ + + memcpy (ctx->in, buf, len); +} + + +/* + * Final wrapup - pad to 64-byte boundary with the bit pattern + * 1 0* (64-bit count of bits processed, MSB-first) + */ +/** + * md5_final: copy the final md5 hash to a bufer + * @digest: 16 bytes buffer + * @ctx: context containing the calculated md5 + * + * copy the final md5 hash to a bufer + **/ +static void +md5_final (MD5Context *ctx, guchar digest[16]) +{ + guint32 count; + guchar *p; + + /* Compute number of bytes mod 64 */ + count = (ctx->bits[0] >> 3) & 0x3F; + + /* Set the first char of padding to 0x80. This is safe since there is + always at least one byte free */ + p = ctx->in + count; + *p++ = 0x80; + + /* Bytes of padding needed to make 64 bytes */ + count = 64 - 1 - count; + + /* Pad out to 56 mod 64 */ + if (count < 8) { + /* Two lots of padding: Pad the first block to 64 bytes */ + memset (p, 0, count); + if (ctx->doByteReverse) + _byte_reverse (ctx->in, 16); + md5_transform (ctx->buf, (guint32 *) ctx->in); + + /* Now fill the next block with 56 bytes */ + memset (ctx->in, 0, 56); + } else { + /* Pad block to 56 bytes */ + memset (p, 0, count - 8); + } + if (ctx->doByteReverse) + _byte_reverse (ctx->in, 14); + + /* Append length in bits and transform */ + ((guint32 *) ctx->in)[14] = ctx->bits[0]; + ((guint32 *) ctx->in)[15] = ctx->bits[1]; + + md5_transform (ctx->buf, (guint32 *) ctx->in); + if (ctx->doByteReverse) + _byte_reverse ((guchar *) ctx->buf, 4); + memcpy (digest, ctx->buf, 16); +} + + +/* The four core functions - F1 is optimized somewhat */ + +/* #define F1(x, y, z) (x & y | ~x & z) */ +#define F1(x, y, z) (z ^ (x & (y ^ z))) +#define F2(x, y, z) F1(z, x, y) +#define F3(x, y, z) (x ^ y ^ z) +#define F4(x, y, z) (y ^ (x | ~z)) + +/* This is the central step in the MD5 algorithm. */ +#define MD5STEP(f, w, x, y, z, data, s) \ + ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x ) + +/* + * The core of the MD5 algorithm, this alters an existing MD5 hash to + * reflect the addition of 16 longwords of new data. md5_Update blocks + * the data and converts bytes into longwords for this routine. + */ +static void +md5_transform (guint32 buf[4], const guint32 in[16]) +{ + register guint32 a, b, c, d; + + a = buf[0]; + b = buf[1]; + c = buf[2]; + d = buf[3]; + + MD5STEP (F1, a, b, c, d, in[0] + 0xd76aa478, 7); + MD5STEP (F1, d, a, b, c, in[1] + 0xe8c7b756, 12); + MD5STEP (F1, c, d, a, b, in[2] + 0x242070db, 17); + MD5STEP (F1, b, c, d, a, in[3] + 0xc1bdceee, 22); + MD5STEP (F1, a, b, c, d, in[4] + 0xf57c0faf, 7); + MD5STEP (F1, d, a, b, c, in[5] + 0x4787c62a, 12); + MD5STEP (F1, c, d, a, b, in[6] + 0xa8304613, 17); + MD5STEP (F1, b, c, d, a, in[7] + 0xfd469501, 22); + MD5STEP (F1, a, b, c, d, in[8] + 0x698098d8, 7); + MD5STEP (F1, d, a, b, c, in[9] + 0x8b44f7af, 12); + MD5STEP (F1, c, d, a, b, in[10] + 0xffff5bb1, 17); + MD5STEP (F1, b, c, d, a, in[11] + 0x895cd7be, 22); + MD5STEP (F1, a, b, c, d, in[12] + 0x6b901122, 7); + MD5STEP (F1, d, a, b, c, in[13] + 0xfd987193, 12); + MD5STEP (F1, c, d, a, b, in[14] + 0xa679438e, 17); + MD5STEP (F1, b, c, d, a, in[15] + 0x49b40821, 22); + + MD5STEP (F2, a, b, c, d, in[1] + 0xf61e2562, 5); + MD5STEP (F2, d, a, b, c, in[6] + 0xc040b340, 9); + MD5STEP (F2, c, d, a, b, in[11] + 0x265e5a51, 14); + MD5STEP (F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); + MD5STEP (F2, a, b, c, d, in[5] + 0xd62f105d, 5); + MD5STEP (F2, d, a, b, c, in[10] + 0x02441453, 9); + MD5STEP (F2, c, d, a, b, in[15] + 0xd8a1e681, 14); + MD5STEP (F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); + MD5STEP (F2, a, b, c, d, in[9] + 0x21e1cde6, 5); + MD5STEP (F2, d, a, b, c, in[14] + 0xc33707d6, 9); + MD5STEP (F2, c, d, a, b, in[3] + 0xf4d50d87, 14); + MD5STEP (F2, b, c, d, a, in[8] + 0x455a14ed, 20); + MD5STEP (F2, a, b, c, d, in[13] + 0xa9e3e905, 5); + MD5STEP (F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); + MD5STEP (F2, c, d, a, b, in[7] + 0x676f02d9, 14); + MD5STEP (F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); + + MD5STEP (F3, a, b, c, d, in[5] + 0xfffa3942, 4); + MD5STEP (F3, d, a, b, c, in[8] + 0x8771f681, 11); + MD5STEP (F3, c, d, a, b, in[11] + 0x6d9d6122, 16); + MD5STEP (F3, b, c, d, a, in[14] + 0xfde5380c, 23); + MD5STEP (F3, a, b, c, d, in[1] + 0xa4beea44, 4); + MD5STEP (F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); + MD5STEP (F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); + MD5STEP (F3, b, c, d, a, in[10] + 0xbebfbc70, 23); + MD5STEP (F3, a, b, c, d, in[13] + 0x289b7ec6, 4); + MD5STEP (F3, d, a, b, c, in[0] + 0xeaa127fa, 11); + MD5STEP (F3, c, d, a, b, in[3] + 0xd4ef3085, 16); + MD5STEP (F3, b, c, d, a, in[6] + 0x04881d05, 23); + MD5STEP (F3, a, b, c, d, in[9] + 0xd9d4d039, 4); + MD5STEP (F3, d, a, b, c, in[12] + 0xe6db99e5, 11); + MD5STEP (F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); + MD5STEP (F3, b, c, d, a, in[2] + 0xc4ac5665, 23); + + MD5STEP (F4, a, b, c, d, in[0] + 0xf4292244, 6); + MD5STEP (F4, d, a, b, c, in[7] + 0x432aff97, 10); + MD5STEP (F4, c, d, a, b, in[14] + 0xab9423a7, 15); + MD5STEP (F4, b, c, d, a, in[5] + 0xfc93a039, 21); + MD5STEP (F4, a, b, c, d, in[12] + 0x655b59c3, 6); + MD5STEP (F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); + MD5STEP (F4, c, d, a, b, in[10] + 0xffeff47d, 15); + MD5STEP (F4, b, c, d, a, in[1] + 0x85845dd1, 21); + MD5STEP (F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); + MD5STEP (F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); + MD5STEP (F4, c, d, a, b, in[6] + 0xa3014314, 15); + MD5STEP (F4, b, c, d, a, in[13] + 0x4e0811a1, 21); + MD5STEP (F4, a, b, c, d, in[4] + 0xf7537e82, 6); + MD5STEP (F4, d, a, b, c, in[11] + 0xbd3af235, 10); + MD5STEP (F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); + MD5STEP (F4, b, c, d, a, in[9] + 0xeb86d391, 21); + + buf[0] += a; + buf[1] += b; + buf[2] += c; + buf[3] += d; +} + + + +/* When close is complete, there's no more work to do. */ +static void +digest_file_close_callback (GnomeVFSAsyncHandle *handle, + GnomeVFSResult result, + gpointer callback_data) +{ +} + +/* Close the file and then tell the caller we succeeded, handing off + * the buffer to the caller. + */ +static void +digest_file_completed (NautilusDigestFileHandle *digest_handle) +{ + guchar digest_result[16]; + char digest_string [33]; + char* hex_string = "0123456789abcdef"; + int index, result_index; + int current_value; + + if (digest_handle->opened) { + + gnome_vfs_async_close (digest_handle->handle, + digest_file_close_callback, + NULL); + } + + /* Invoke the callback to continue processing the annotation */ + md5_final (&digest_handle->digest_context, digest_result); + + /* make a hex string for the digest result */ + digest_string[32] = '\0'; + for (index = 0; index < 32; index++) { + current_value = digest_result[index >> 1]; + if (index & 1) { + result_index = current_value & 15; + } else { + result_index = (current_value >> 4) & 15; + } + + digest_string[index] = hex_string[result_index]; + } + + (* digest_handle->callback) (digest_handle->file, &digest_string[0]); + + nautilus_file_unref (digest_handle->file); + g_free (digest_handle->buffer); + g_free (digest_handle); +} + +/* Tell the caller we failed. */ +static void +digest_file_failed (NautilusDigestFileHandle *digest_handle, GnomeVFSResult result) +{ + if (digest_handle->opened) { + gnome_vfs_async_close (digest_handle->handle, + digest_file_close_callback, + NULL); + } + g_free (digest_handle->buffer); + + (* digest_handle->callback) (digest_handle->file, NULL); + nautilus_file_unref (digest_handle->file); + g_free (digest_handle); +} + +/* Here is the callback from the file read routine, where we actually accumulate the checksum */ +static void +calculate_checksum_callback (GnomeVFSAsyncHandle *handle, + GnomeVFSResult result, + gpointer buffer, + GnomeVFSFileSize bytes_requested, + GnomeVFSFileSize bytes_read, + gpointer callback_data) +{ + NautilusDigestFileHandle *digest_handle; + + /* Do a few reality checks. */ + g_assert (bytes_requested == READ_CHUNK_SIZE); + + digest_handle = callback_data; + g_assert (digest_handle->handle == handle); + g_assert (bytes_read <= bytes_requested); + + /* Check for a failure. */ + if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) { + digest_file_failed (digest_handle, result); + return; + } + + /* accumulate the recently read data into the checksum */ + md5_update (&digest_handle->digest_context, buffer, bytes_read); + + /* Read more unless we are at the end of the file. */ + if (bytes_read > 0 && result == GNOME_VFS_OK) { + gnome_vfs_async_read (digest_handle->handle, + digest_handle->buffer, + READ_CHUNK_SIZE, + calculate_checksum_callback, + digest_handle); + } else { + digest_file_completed (digest_handle); + } +} + +/* Once the open is finished, read a first chunk. */ +static void +read_file_open_callback (GnomeVFSAsyncHandle *handle, + GnomeVFSResult result, + gpointer callback_data) +{ + NautilusDigestFileHandle *digest_handle; + + digest_handle = callback_data; + g_assert (digest_handle->handle == handle); + + /* Handle the failure case. */ + if (result != GNOME_VFS_OK) { + digest_file_failed (digest_handle, result); + return; + } + + /* read in the first chunk of the file */ + digest_handle->opened = TRUE; + gnome_vfs_async_read (digest_handle->handle, + digest_handle->buffer, + READ_CHUNK_SIZE, + calculate_checksum_callback, + digest_handle); +} + + +/* calculate the digest for the passed-in file asynchronously, invoking the passed in + * callback when the calculation has been completed. + */ +static NautilusDigestFileHandle* +calculate_file_digest (NautilusFile *file, NautilusCalculateDigestCallback callback) +{ + NautilusDigestFileHandle *handle; + char *uri; + + /* allocate a digest-handle structure to keep our state */ + + handle = g_new0 (NautilusDigestFileHandle, 1); + uri = nautilus_file_get_uri (file); + + handle->callback = callback; + handle->opened = FALSE; + handle->file = file; + nautilus_file_ref (file); + + /* allocate the buffer */ + handle->buffer = g_malloc (READ_CHUNK_SIZE); + + /* initialize the MD5 stuff */ + md5_init (&handle->digest_context); + + /* open the file */ + gnome_vfs_async_open (&handle->handle, + uri, + GNOME_VFS_OPEN_READ, + read_file_open_callback, + handle); + g_free (uri); + return handle; +} + +/* given a digest, retrieve an associated file object from the hash table */ +static NautilusFile * +get_file_from_digest (const char *digest) +{ + if (files_awaiting_annotation == NULL) { + return NULL; + } + + return g_hash_table_lookup (files_awaiting_annotation, digest); +} + +/* given a digest value, return the path to it in the local cache */ +static char * +get_annotation_path (const char *digest) +{ + char *user_directory, *annotation_directory; + char *annotation_path, *directory_uri; + + user_directory = nautilus_get_user_directory (); + annotation_directory = nautilus_make_path (user_directory, "annotations"); + annotation_path = nautilus_make_path (annotation_directory, digest); + + /* create the annotation directory if it doesn't exist */ + if (!g_file_exists (annotation_directory)) { + directory_uri = gnome_vfs_get_uri_from_local_path (annotation_directory); + gnome_vfs_make_directory (directory_uri, + GNOME_VFS_PERM_USER_ALL + | GNOME_VFS_PERM_GROUP_ALL + | GNOME_VFS_PERM_OTHER_READ); + g_free (directory_uri); + } + + /* free up the intermediate strings and return the complete path */ + g_free (user_directory); + g_free (annotation_directory); + + return annotation_path; +} + +/* look up the passed-in digest in the local annotation cache */ +static char * +look_up_local_annotation (NautilusFile *file, const char *digest) +{ + GnomeVFSResult result; + int file_size; + char *uri, *path, *file_data; + + path = get_annotation_path (digest); + if (g_file_exists (path)) { + /* load the file and return it */ + uri = gnome_vfs_get_uri_from_local_path (path); + result = nautilus_read_entire_file (uri, &file_size, &file_data); + g_free (uri); + g_free (path); + if (result == GNOME_VFS_OK) { + return file_data; + } else { + return NULL; + } + } + g_free (path); + return NULL; +} + +static gboolean +has_local_annotation (const char *digest) +{ + gboolean has_annotation; + char *path; + + path = get_annotation_path (digest); + has_annotation = g_file_exists (path); + + g_free (path); + return has_annotation; +} + +/* utility routine to add the passed-in xml node to the file associated with the passed-in + * digest. If there isn't a file, create one + */ +static void +add_annotations_to_file (xmlNodePtr node_ptr, const char *digest) +{ + char *digest_path; + xmlDocPtr document; + + digest_path = get_annotation_path (digest); + + /* save the subtree as a new document, by making a new document and adding the new node */ + document = xmlNewDoc ("1.0"); + xmlDocSetRootElement (document, node_ptr); + + /* save the xml tree as a file in the cache area */ + xmlSaveFile (digest_path, document); + + xmlFreeDoc (document); + g_free (digest_path); +} + +/* remember the file object by adding it to a hash table */ +static void +remember_file (NautilusFile *file, const char *digest) +{ + nautilus_file_ref (file); + + if (files_awaiting_annotation == NULL) { + files_awaiting_annotation = g_hash_table_new (g_str_hash, g_str_equal); + /* g_atexit (annotations_file_table_free); */ + } + + g_hash_table_insert (files_awaiting_annotation, g_strdup (digest), file); +} + +/* forget a file when we're done with it by removing it from the table */ +static void +forget_file (const char *digest) +{ + NautilusFile *file; + if (files_awaiting_annotation == NULL) { + return; + } + + file = g_hash_table_lookup (files_awaiting_annotation, digest); + if (file != NULL) { + nautilus_file_unref (file); + g_hash_table_remove (files_awaiting_annotation, digest); + } +} + +/* completion routine invoked when we've loaded the an annotation file from the service. + * We must parse it, and walk through it to save the annotations in the local cache. + */ +static void +got_annotations_callback (GnomeVFSResult result, + GnomeVFSFileSize file_size, + char *file_contents, + gpointer callback_data) +{ + NautilusFile *file; + xmlDocPtr annotations; + xmlNodePtr next_annotation, item; + xmlNodePtr saved_annotation; + int annotation_count; + char *buffer, *digest, *info_str; + time_t date_stamp; + + /* exit if there was an error */ + if (result != GNOME_VFS_OK) { + g_assert (file_contents == NULL); + return; + } + + /* inexplicably, the gnome-xml parser requires a zero-terminated array, so add the null at the end. */ + buffer = g_realloc (file_contents, file_size + 1); + buffer[file_size] = '\0'; + annotations = xmlParseMemory (buffer, file_size); + g_free (buffer); + + /* iterate through the xml document, handling each annotation entry */ + if (annotations != NULL) { + next_annotation = xmlDocGetRootElement (annotations)->childs; + while (next_annotation != NULL) { + if (nautilus_strcmp (next_annotation->name, "annotations") == 0) { + /* get the digest associated with the annotations */ + digest = xmlGetProp (next_annotation, "digest"); + if (digest != NULL) { + /* count the number of annotations contained in the node */ + annotation_count = 0; + item = next_annotation->childs; + while (item != NULL) { + if (nautilus_strcmp (item->name, "annotation") == 0) { + annotation_count += 1; + } + item = item->next; + } + + /* write the annotation out to our cache area, if necessary */ + if (annotation_count > 0) { + saved_annotation = xmlCopyNode (next_annotation, TRUE); + add_annotations_to_file (saved_annotation, digest); + } + + /* retrieve the file object, and update it's count and time stamp */ + + file = get_file_from_digest (digest); + time (&date_stamp); + info_str = g_strdup_printf ("%lu:%d", date_stamp, annotation_count); + + nautilus_file_set_metadata (file, NAUTILUS_METADATA_KEY_NOTES_INFO, NULL, info_str); + g_free (info_str); + + /* issue the changed signal */ + nautilus_file_emit_changed (file); + + /* remove the file from the hash table and unref it */ + forget_file (digest); + xmlFree (digest); + } + } + next_annotation = next_annotation->next; + } + + + /* free the xml document */ + xmlFreeDoc (annotations); + } +} + +/* format the request, and send it to the server */ +/* the first cut implementation simply sends the digests as a cgi parameter, + * but soon we'll want use SOAP or XML-RPC + */ +static void +fetch_annotations_from_server (void) +{ + GString *temp_string; + GList *current_entry, *save_entry; + char *uri; + + /* check to see if there are enough requests, or a long enough delay since the last one */ + + current_entry = annotation_request_queue; + save_entry = current_entry; + annotation_request_queue = NULL; + + /* simple cgi-based request format passed the digests as part of the uri, so + * gather the variable parts + */ + temp_string = g_string_new (""); + while (current_entry != NULL) { + g_string_append (temp_string, (char*) current_entry->data); + if (current_entry->next != NULL) { + g_string_append (temp_string, ","); + } + current_entry = current_entry->next; + } + + + uri = g_strdup_printf (SERVER_URI_TEMPLATE, temp_string->str); + g_string_free (temp_string, TRUE); + nautilus_g_list_free_deep (save_entry); + + /* read the result from the server asynchronously */ + nautilus_read_entire_file_async (uri, got_annotations_callback, NULL); + g_free (uri); +} + + +/* ask the server for an annotation asynchronously */ +static void +get_annotation_from_server (NautilusFile *file, const char *file_digest) +{ + /* see if there's a request for this one already pending - if so, we can return */ + if (get_file_from_digest (file_digest) != NULL) { + return; + } + + /* add the request to the queue, and kick it off it there's enough of them */ + annotation_request_queue = g_list_prepend (annotation_request_queue, g_strdup (file_digest)); + + remember_file (file, file_digest); + fetch_annotations_from_server (); +} + +/* callback that's invokes when we've finished calculating the file's digest. Remember + * it in the metadata, and look up the associated annotation + */ +static void +got_file_digest (NautilusFile *file, const char *file_digest) +{ + + if (file_digest == NULL) { + return; + } + + /* save the digest in the file metadata */ + nautilus_file_set_metadata (file, NAUTILUS_METADATA_KEY_FILE_DIGEST, NULL, file_digest); + + /* lookup the annotations associated with the file. If there is one, flag the change and we're done */ + if (has_local_annotation (file_digest)) { + nautilus_file_emit_changed (file); + return; + } + + /* there isn't a local annotation, so ask the server for one */ + get_annotation_from_server (file, file_digest); + return; +} + +/* return the annotation associated with a file. If we haven't inspected this file yet, + * return NULL but queue a request for an annotation lookup, which will be processed + * asynchronously and issue a "file_changed" signal if any is found. + */ +char *nautilus_annotation_get_annotation (NautilusFile *file) +{ + char *digest; + char *annotations; + char *digest_info; + + /* if it's a directory, return NULL, at least until we figure out how to handle directory + * annotations + */ + if (nautilus_file_is_directory (file)) { + return NULL; + } + + /* see if there's a digest available in metadata */ + digest = nautilus_file_get_metadata (file, NAUTILUS_METADATA_KEY_FILE_DIGEST, NULL); + + /* there isn't a digest, so start a request for one going, and return NULL */ + if (digest == NULL) { + calculate_file_digest (file, (NautilusCalculateDigestCallback) got_file_digest); + return NULL; + } + + /* there's a digest, so we if we have the annotations for the file cached locally */ + annotations = look_up_local_annotation (file, digest); + if (annotations != NULL) { + g_free (digest); + return annotations; + } + + /* we don't have a local annotation, so queue a request from the server, if we haven't already tried */ + /* soon, we'll inspect the time stamp, and look it up anyway if it's too old */ + + digest_info = nautilus_file_get_metadata (file, NAUTILUS_METADATA_KEY_NOTES_INFO, NULL); + if (digest_info == NULL) { + get_annotation_from_server (file, digest); + } else { + g_free (digest_info); + } + + g_free (digest); + return NULL; +} + +/* return the number of annotations associated with the passed in file. If we don't know, + * return 0, but queue a request like above + */ +int nautilus_annotation_has_annotation (NautilusFile *file) +{ + char *digest_info, *digits, *temp_str; + int count; + + digest_info = nautilus_file_get_metadata (file, NAUTILUS_METADATA_KEY_NOTES_INFO, NULL); + + if (digest_info != NULL) { + digits = strrchr (digest_info, ':'); + count = atoi (digits + 1); + g_free (digest_info); + return count; + } else { + /* initiate fetching the annotations from the server */ + temp_str = nautilus_annotation_get_annotation (file); + g_free (temp_str); + } + g_free (digest_info); + return 0; +} + +/* add an annotation to a file */ +void nautilus_annotation_add_annotation (NautilusFile *file, const char *new_annotation) +{ +} + +/* remove an annotation from a file */ +void nautilus_annotation_remove_annotation (NautilusFile *file, int which_annotation) +{ +} + diff --git a/libnautilus-private/nautilus-annotation.h b/libnautilus-private/nautilus-annotation.h new file mode 100644 index 000000000..fff76d6e6 --- /dev/null +++ b/libnautilus-private/nautilus-annotation.h @@ -0,0 +1,38 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- + + nautilus-annotation.h: routines for getting and setting xml-based annotations associated + with the digest of a file. + + Copyright (C) 2000 Eazel, Inc. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Authors: Andy Hertzfeld <andy@eazel.com> +*/ + +#ifndef NAUTILUS_ANNOTATION_H +#define NAUTILUS_ANNOTATION_H + +#include <glib.h> +#include <libnautilus-extensions/nautilus-file.h> +#include <libnautilus-extensions/nautilus-metadata.h> + +char *nautilus_annotation_get_annotation (NautilusFile *file); +int nautilus_annotation_has_annotation (NautilusFile *file); +void nautilus_annotation_add_annotation (NautilusFile *file, const char *new_annotation); +void nautilus_annotation_remove_annotation (NautilusFile *file, int which_annotation); + +#endif /* NAUTILUS_ANNOTATION_H */ diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c index 52caa9b1b..5debc64be 100644 --- a/libnautilus-private/nautilus-file-utilities.c +++ b/libnautilus-private/nautilus-file-utilities.c @@ -1015,7 +1015,7 @@ nautilus_get_user_main_directory (void) /* If this fails to create the directory, nautilus_application_startup will * notice and refuse to launch. */ - + /* install the default link sets */ nautilus_link_set_install (user_main_directory, "apps"); nautilus_link_set_install (user_main_directory, "home"); diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c index 384b53dee..c840cd7b4 100644 --- a/libnautilus-private/nautilus-file.c +++ b/libnautilus-private/nautilus-file.c @@ -25,6 +25,7 @@ #include <config.h> #include "nautilus-file.h" +#include "nautilus-annotation.h" #include "nautilus-directory-metafile.h" #include "nautilus-directory-notify.h" #include "nautilus-directory-private.h" @@ -1499,6 +1500,11 @@ prepend_automatic_emblem_names (NautilusFile *file, { /* Prepend in reverse order. */ + if (nautilus_annotation_has_annotation (file) > 0) { + names = g_list_prepend + (names, g_strdup (NAUTILUS_FILE_EMBLEM_ANNOTATION)); + g_message ("got annotation for %s", nautilus_file_get_uri (file)); + } if (nautilus_file_is_in_trash (file)) { names = g_list_prepend (names, g_strdup (NAUTILUS_FILE_EMBLEM_NAME_TRASH)); diff --git a/libnautilus-private/nautilus-file.h b/libnautilus-private/nautilus-file.h index a8593c534..d74172b5d 100644 --- a/libnautilus-private/nautilus-file.h +++ b/libnautilus-private/nautilus-file.h @@ -71,6 +71,7 @@ typedef enum { #define NAUTILUS_FILE_EMBLEM_NAME_CANT_READ "noread" #define NAUTILUS_FILE_EMBLEM_NAME_CANT_WRITE "nowrite" #define NAUTILUS_FILE_EMBLEM_NAME_TRASH "trash" +#define NAUTILUS_FILE_EMBLEM_ANNOTATION "note" typedef void (*NautilusFileCallback) (NautilusFile *file, gpointer callback_data); diff --git a/libnautilus-private/nautilus-icon-canvas-item.c b/libnautilus-private/nautilus-icon-canvas-item.c index 399cade1d..240f2f923 100644 --- a/libnautilus-private/nautilus-icon-canvas-item.c +++ b/libnautilus-private/nautilus-icon-canvas-item.c @@ -3,7 +3,6 @@ /* Nautilus - Icon canvas item class for icon container. * * Copyright (C) 2000 Eazel, Inc - * * Author: Andy Hertzfeld <andy@eazel.com> * * This library is free software; you can redistribute it and/or @@ -31,6 +30,7 @@ #include <gtk/gtksignal.h> #include <gdk-pixbuf/gdk-pixbuf.h> #include <libgnome/gnome-i18n.h> +#include <libgnomeui/gnome-canvas-rect-ellipse.h> #include <libgnomeui/gnome-canvas-util.h> #include <libgnomeui/gnome-icon-text.h> #include <libart_lgpl/art_rgb.h> @@ -54,9 +54,6 @@ #include "nautilus-smooth-text-layout.h" #include "nautilus-smooth-text-layout-cache.h" -/* Comment this out if the new smooth fonts code give you problems - * This isnt meant to be permanent. Its just a precaution. - */ #define EMBLEM_SPACING 2 /* gap between bottom of icon and start of text box */ @@ -80,6 +77,14 @@ struct NautilusIconCanvasItemDetails { GdkFont *font; NautilusEmblemAttachPoints *attach_points; + /* stuff for controls; if this gets too big, we'll put it in a separate struct */ + GtkWidget *control; /* optional Bonobo control*/ + guint control_destroy_id; + + /* stuff for annotations */ + GnomeCanvasItem *annotation; + int note_state; + /* Size of the text at current font. */ int text_width; int text_height; @@ -93,7 +98,7 @@ struct NautilusIconCanvasItemDetails { guint is_highlighted_for_drop : 1; guint show_stretch_handles : 1; guint is_prelit : 1; - + guint in_control_destroy : 1; gboolean is_renaming; /* Font stuff whilst in smooth mode */ @@ -112,7 +117,7 @@ enum { ARG_EDITABLE_TEXT, ARG_ADDITIONAL_TEXT, ARG_FONT, - ARG_HIGHLIGHTED_FOR_SELECTION, + ARG_HIGHLIGHTED_FOR_SELECTION, ARG_HIGHLIGHTED_AS_KEYBOARD_FOCUS, ARG_HIGHLIGHTED_FOR_DROP, ARG_MODIFIER, @@ -127,6 +132,14 @@ typedef enum { TOP_SIDE } RectangleSide; +typedef enum { + NO_HIT, + ICON_HIT, + LABEL_HIT, + STRETCH_HANDLE_HIT, + EMBLEM_HIT +} HitType; + typedef struct { NautilusIconCanvasItem *icon_item; ArtIRect icon_rect; @@ -219,7 +232,10 @@ static gboolean hit_test_stretch_handle (NautilusIconCanvasIt const ArtIRect *canvas_rect); static gboolean icon_canvas_item_is_smooth (const NautilusIconCanvasItem *icon_item); - +static gboolean hit_test (NautilusIconCanvasItem *icon_item, + const ArtIRect *canvas_rect, + HitType *hit_type, + int *hit_index); NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusIconCanvasItem, nautilus_icon_canvas_item, GNOME_TYPE_CANVAS_ITEM) @@ -334,6 +350,11 @@ nautilus_icon_canvas_item_destroy (GtkObject *object) gdk_font_unref (details->font); } + if (details->control && !details->in_control_destroy) { + gtk_signal_disconnect (GTK_OBJECT (details->control), details->control_destroy_id); + gtk_widget_destroy (details->control); + } + gtk_object_unref (GTK_OBJECT (icon_item->details->smooth_font)); icon_item->details->smooth_font = NULL; @@ -365,6 +386,43 @@ nautilus_icon_canvas_item_invalidate_label_size (NautilusIconCanvasItem *item) item->details->text_height = -1; } +/* abstraction layer for icon width and height, to separate it from pixbuf with and height */ +static int +nautilus_icon_canvas_item_get_icon_width (NautilusIconCanvasItem *item) +{ + GtkRequisition size_requisition; + double scale_factor = GNOME_CANVAS_ITEM (item)->canvas->pixels_per_unit; + + if (item->details->control != NULL) { + gtk_widget_size_request (item->details->control, &size_requisition); + return size_requisition.width * scale_factor; + } + + if (item->details->pixbuf == NULL) { + return NAUTILUS_ICON_SIZE_STANDARD; + } + + return gdk_pixbuf_get_width (item->details->pixbuf); +} + +static int +nautilus_icon_canvas_item_get_icon_height (NautilusIconCanvasItem *item) +{ + GtkRequisition size_requisition; + double scale_factor = GNOME_CANVAS_ITEM (item)->canvas->pixels_per_unit; + + if (item->details->control != NULL) { + gtk_widget_size_request (item->details->control, &size_requisition); + return size_requisition.height * scale_factor; + } + if (item->details->pixbuf == NULL) { + return NAUTILUS_ICON_SIZE_STANDARD; + } + + return gdk_pixbuf_get_height (item->details->pixbuf); +} + + /* Set_arg handler for the icon item. */ static void nautilus_icon_canvas_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) @@ -447,8 +505,7 @@ nautilus_icon_canvas_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) case ARG_SMOOTH_FONT_SIZE: nautilus_icon_canvas_item_set_smooth_font_size (NAUTILUS_ICON_CANVAS_ITEM (object), GTK_VALUE_UINT (*arg)); - break; - + break; default: g_warning ("nautilus_icons_view_item_item_set_arg on unknown argument"); return; @@ -457,12 +514,27 @@ nautilus_icon_canvas_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (object)); } +/* handler for the control's destroy signal */ +static void +do_control_destroy (GtkObject *object, gpointer data) +{ + NautilusIconCanvasItemDetails *details; + + details = NAUTILUS_ICON_CANVAS_ITEM (data)->details; + + details->in_control_destroy = TRUE; + + gtk_object_destroy (GTK_OBJECT (data)); +} + /* Get_arg handler for the icon item */ static void nautilus_icon_canvas_item_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) { NautilusIconCanvasItemDetails *details; + GnomeCanvasItem *item; + item = GNOME_CANVAS_ITEM (object); details = NAUTILUS_ICON_CANVAS_ITEM (object)->details; switch (arg_id) { @@ -510,12 +582,27 @@ GdkPixbuf * nautilus_icon_canvas_item_get_image (NautilusIconCanvasItem *item) { NautilusIconCanvasItemDetails *details; - + int width, height; + GdkPixbuf *pixbuf; + g_return_val_if_fail (NAUTILUS_IS_ICON_CANVAS_ITEM (item), NULL); details = item->details; - return details->pixbuf; + if (details->control) { + width = details->control->allocation.width; + height = details->control->allocation.height; + pixbuf = nautilus_gdk_pixbuf_get_from_window_safe (details->control->window, + details->control->allocation.x, + details->control->allocation.y, + details->control->allocation.width, + details->control->allocation.height); + } else { + pixbuf = details->pixbuf; + gdk_pixbuf_ref (pixbuf); + } + + return pixbuf; } void @@ -617,6 +704,12 @@ recompute_bounding_box (NautilusIconCanvasItem *icon_item) item->y1 = top_left.y; item->x2 = bottom_right.x; item->y2 = bottom_right.y; + + if (icon_item->details->control) + gtk_layout_move (GTK_LAYOUT (item->canvas), icon_item->details->control, + item->x1 + item->canvas->zoom_xofs, + item->y1 + item->canvas->zoom_yofs); + } static void @@ -631,13 +724,16 @@ compute_text_rectangle (NautilusIconCanvasItem *item, text_rect->y1 = text_rect->y0 + item->details->text_height; } + void nautilus_icon_canvas_item_update_bounds (NautilusIconCanvasItem *item) { ArtIRect before, after, emblem_rect; EmblemLayout emblem_layout; GdkPixbuf *emblem_pixbuf; - + GtkRequisition size_requisition; + int item_width, item_height; + /* Compute new bounds. */ nautilus_gnome_canvas_item_get_current_canvas_bounds (GNOME_CANVAS_ITEM (item), &before); @@ -664,6 +760,16 @@ nautilus_icon_canvas_item_update_bounds (NautilusIconCanvasItem *item) art_irect_union (&item->details->emblem_rect, &item->details->emblem_rect, &emblem_rect); } + /* if there is an embedded control, make a size request and size accordingly */ + if (item->details->control) { + /* size the control appropriately */ + gtk_widget_size_request (item->details->control, &size_requisition); + item_width = size_requisition.width * GNOME_CANVAS_ITEM (item)->canvas->pixels_per_unit; + item_height = size_requisition.height * GNOME_CANVAS_ITEM (item)->canvas->pixels_per_unit; + + gtk_widget_set_usize (item->details->control, item_width, item_height); + } + /* Send out the bounds_changed signal and queue a redraw. */ nautilus_gnome_canvas_request_redraw_rectangle (GNOME_CANVAS_ITEM (item)->canvas, &before); @@ -805,7 +911,7 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item, canvas_item = GNOME_CANVAS_ITEM (item); if (drawable != NULL) { - icon_width = details->pixbuf == NULL ? 0 : gdk_pixbuf_get_width (details->pixbuf); + icon_width = details->pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_width (item); gc = gdk_gc_new (canvas_item->canvas->layout.bin_window); gdk_gc_get_values (gc, &save_gc); } @@ -1121,6 +1227,7 @@ emblem_layout_next (EmblemLayout *layout, /* Advance to the next emblem. */ layout->emblem = layout->emblem->next; + layout->index += 1; attach_points = layout->icon_item->details->attach_points; if (attach_points != NULL) { @@ -1131,8 +1238,6 @@ emblem_layout_next (EmblemLayout *layout, x = layout->icon_rect.x0 + attach_points->points[layout->index].x; y = layout->icon_rect.y0 + attach_points->points[layout->index].y; - layout->index += 1; - /* Return the rectangle and pixbuf. */ *emblem_pixbuf = pixbuf; emblem_rect->x0 = x - width / 2; @@ -1207,11 +1312,17 @@ emblem_layout_next (EmblemLayout *layout, /* Return the rectangle and pixbuf. */ *emblem_pixbuf = pixbuf; - emblem_rect->x0 = x - width / 2; - emblem_rect->y0 = y - height / 2; + if (layout->icon_item->details->control) { + emblem_rect->x0 = x; + emblem_rect->y0 = y; + } else { + emblem_rect->x0 = x - width / 2; + emblem_rect->y0 = y - height / 2; + } + emblem_rect->x1 = emblem_rect->x0 + width; emblem_rect->y1 = emblem_rect->y0 + height; - + return TRUE; } @@ -1326,10 +1437,6 @@ nautilus_icon_canvas_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, icon_item = NAUTILUS_ICON_CANVAS_ITEM (item); details = icon_item->details; - /* Draw the pixbuf. */ - if (details->pixbuf == NULL) { - return; - } /* Compute icon rectangle in drawable coordinates. */ icon_rect = icon_item->details->canvas_rect; @@ -1337,12 +1444,29 @@ nautilus_icon_canvas_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, icon_rect.y0 -= y; icon_rect.x1 -= x; icon_rect.y1 -= y; + /* draw the icon or widget */ + if (icon_item->details->control) { + gtk_widget_queue_draw (icon_item->details->control); + } else { + if (details->pixbuf != NULL) { + + /* Compute icon rectangle in drawable coordinates. */ + get_icon_canvas_rectangle (icon_item, &icon_rect); + icon_rect.x0 -= x; + icon_rect.y0 -= y; + icon_rect.x1 -= x; + icon_rect.y1 -= y; + + /* if the pre-lit or selection flag is set, make a pre-lit or darkened pixbuf and draw that instead */ + temp_pixbuf = map_pixbuf (icon_item); + draw_pixbuf (temp_pixbuf, drawable, icon_rect.x0, icon_rect.y0); + + if (temp_pixbuf != details->pixbuf) { + gdk_pixbuf_unref (temp_pixbuf); + } + + } - /* if the pre-lit or selection flag is set, make a pre-lit or darkened pixbuf and draw that instead */ - temp_pixbuf = map_pixbuf (icon_item); - draw_pixbuf (temp_pixbuf, drawable, icon_rect.x0, icon_rect.y0); - if (temp_pixbuf != details->pixbuf) { - gdk_pixbuf_unref (temp_pixbuf); } /* Draw the emblem pixbufs. */ @@ -1427,7 +1551,7 @@ draw_or_measure_label_text_aa (NautilusIconCanvasItem *item, if (destination_pixbuf == NULL ) { icon_width = 0; } else { - icon_width = details->pixbuf == NULL ? 0 : gdk_pixbuf_get_width (details->pixbuf); + icon_width = details->pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_width (item); } max_text_width = floor (nautilus_icon_canvas_item_get_max_text_width (item)); @@ -1702,15 +1826,21 @@ nautilus_icon_canvas_item_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf) gnome_canvas_buf_ensure_buf (buf); buf->is_bg = FALSE; } - - /* draw the icon */ - nautilus_gnome_canvas_draw_pixbuf (buf, temp_pixbuf, icon_rect.x0, icon_rect.y0); - - if (temp_pixbuf != icon_item->details->pixbuf) { - gdk_pixbuf_unref (temp_pixbuf); + + /* draw the icon or widget */ + if (icon_item->details->control) { + gtk_widget_queue_draw (icon_item->details->control); + } else { + nautilus_gnome_canvas_draw_pixbuf (buf, temp_pixbuf, icon_rect.x0, icon_rect.y0); + + if (temp_pixbuf != icon_item->details->pixbuf) { + gdk_pixbuf_unref (temp_pixbuf); + } } - - /* draw the emblems */ + + /* draw the emblems */ + get_icon_canvas_rectangle (icon_item, &icon_rect); + emblem_layout_reset (&emblem_layout, icon_item, &icon_rect); while (emblem_layout_next (&emblem_layout, &emblem_pixbuf, &emblem_rect)) { nautilus_gnome_canvas_draw_pixbuf (buf, emblem_pixbuf, emblem_rect.x0, emblem_rect.y0); @@ -1724,6 +1854,77 @@ nautilus_icon_canvas_item_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf) draw_label_text_aa (icon_item, buf, icon_rect.x0, icon_rect.y1, x_delta); } +/* create an annotation for the emblem designated by the passed-in index */ +static void +create_annotation (NautilusIconCanvasItem *icon_item, int emblem_index) +{ + uint fill_color, outline_color; + double top, left, bottom, right; + ArtDRect icon_rect; + + /* compute the position for the top left of the annotation */ + + nautilus_icon_canvas_item_get_icon_rectangle (icon_item, &icon_rect); + left = icon_rect.x0 + 8.0; + top = icon_rect.y0 + 8.0; + right = left + 220.0; + bottom = top + 24.0; + + fill_color = 0xDDDD99E0; + outline_color = 0x000000FF; + + g_message ("making note - %f %f %f %f", left, top, right, bottom); + + icon_item->details->annotation = gnome_canvas_item_new + (gnome_canvas_root (GNOME_CANVAS_ITEM (icon_item)->canvas), + gnome_canvas_rect_get_type (), + "x1", left, + "y1", top, + "x2", right, + "y2", bottom, + "fill_color_rgba", fill_color, + "outline_color_rgba", outline_color, + "width_pixels", 1, + NULL); + + gnome_canvas_item_raise_to_top (icon_item->details->annotation); +} + +/* remove any annotation that's showing */ +static void +remove_annotation (NautilusIconCanvasItem *icon_item) +{ + if (icon_item->details->annotation != NULL) { + g_message ("remove annotation"); + + gtk_object_destroy (GTK_OBJECT (icon_item->details->annotation)); + icon_item->details->annotation = NULL; + icon_item->details->note_state = 0; + + } +} + +/* manage showing and hiding annotations, based on mouse-over the passed-in emblem */ +static void +nautilus_icon_canvas_item_set_note_state (NautilusIconCanvasItem *icon_item, int new_state) +{ + /* nothing to do if nothing changed */ + if (new_state == icon_item->details->note_state) { + return; + } + /* get rid of the old annotation, if there was one */ + if (icon_item->details->annotation) { + remove_annotation (icon_item); + } + + /* create a new annotation, if necessary */ + if (new_state > 0) { + create_annotation (icon_item, new_state); + } + + icon_item->details->note_state = new_state; +} + /* handle events */ @@ -1731,7 +1932,12 @@ static int nautilus_icon_canvas_item_event (GnomeCanvasItem *item, GdkEvent *event) { NautilusIconCanvasItem *icon_item; - + GdkEventMotion *motion_event; + ArtIRect hit_rect; + ArtDRect world_rect; + HitType hit_type; + int hit_index, emblem_state; + icon_item = NAUTILUS_ICON_CANVAS_ITEM (item); switch (event->type) { @@ -1778,10 +1984,28 @@ nautilus_icon_canvas_item_event (GnomeCanvasItem *item, GdkEvent *event) icon_item->details->is_prelit = FALSE; icon_item->details->is_active = 0; icon_item->details->is_highlighted_for_drop = FALSE; + remove_annotation (icon_item); gnome_canvas_item_request_update (item); } return TRUE; + + case GDK_MOTION_NOTIFY: + motion_event = (GdkEventMotion*) event; + + world_rect.x0 = motion_event->x; + world_rect.y0 = motion_event->y; + world_rect.x1 = world_rect.x0 + 1.0; + world_rect.y1 = world_rect.y0 + 1.0; + + nautilus_gnome_canvas_world_to_canvas_rectangle + (GNOME_CANVAS_ITEM (item)->canvas, &world_rect, &hit_rect); + /* hit-test so we can handle tooltips for emblems */ + hit_test (icon_item, &hit_rect, &hit_type, &hit_index); + emblem_state = hit_type == EMBLEM_HIT ? hit_index : 0; + nautilus_icon_canvas_item_set_note_state (icon_item, emblem_state); + return TRUE; + default: /* Don't eat up other events; icon container might use them. */ return FALSE; @@ -1835,9 +2059,10 @@ hit_test_pixbuf (GdkPixbuf *pixbuf, const ArtIRect *pixbuf_location, const ArtIR } static gboolean -hit_test (NautilusIconCanvasItem *icon_item, const ArtIRect *canvas_rect) +hit_test (NautilusIconCanvasItem *icon_item, const ArtIRect *canvas_rect, HitType *hit_type, int *hit_index) { NautilusIconCanvasItemDetails *details; + ArtIRect icon_rect; ArtIRect emblem_rect; EmblemLayout emblem_layout; GdkPixbuf *emblem_pixbuf; @@ -1851,12 +2076,25 @@ hit_test (NautilusIconCanvasItem *icon_item, const ArtIRect *canvas_rect) return FALSE; } + /* default to -1, which means nothing was hit */ + if (hit_index != NULL) { + *hit_index = -1; + } + /* Check for hits in the stretch handles. */ if (hit_test_stretch_handle (icon_item, canvas_rect)) { + if (hit_type != NULL) { + *hit_type = STRETCH_HANDLE_HIT; + } return TRUE; } /* Check for hit in the icon. If we're highlighted for dropping, anywhere in the rect is OK */ + get_icon_canvas_rectangle (icon_item, &icon_rect); + if (hit_type != NULL) { + *hit_type = ICON_HIT; + } + if (icon_item->details->is_highlighted_for_drop) { if (nautilus_art_irect_hits_irect (&icon_item->details->canvas_rect, canvas_rect)) { return TRUE; @@ -1870,6 +2108,9 @@ hit_test (NautilusIconCanvasItem *icon_item, const ArtIRect *canvas_rect) /* Check for hit in the text. */ if (nautilus_art_irect_hits_irect (&details->text_rect, canvas_rect) && !icon_item->details->is_renaming) { + if (hit_type != NULL) { + *hit_type = LABEL_HIT; + } return TRUE; } @@ -1877,10 +2118,21 @@ hit_test (NautilusIconCanvasItem *icon_item, const ArtIRect *canvas_rect) emblem_layout_reset (&emblem_layout, icon_item, &icon_item->details->canvas_rect); while (emblem_layout_next (&emblem_layout, &emblem_pixbuf, &emblem_rect)) { if (hit_test_pixbuf (emblem_pixbuf, &emblem_rect, canvas_rect)) { + if (hit_type != NULL) { + *hit_type = EMBLEM_HIT; + } + if (hit_index != NULL) { + *hit_index = emblem_layout.index; + } return TRUE; } } - + + /* there wasn't a hit, so indicate that */ + if (hit_type != NULL) { + *hit_type = NO_HIT; + } + return FALSE; } @@ -1896,7 +2148,7 @@ nautilus_icon_canvas_item_point (GnomeCanvasItem *item, double x, double y, int canvas_rect.y0 = cy; canvas_rect.x1 = cx + 1; canvas_rect.y1 = cy + 1; - if (hit_test (NAUTILUS_ICON_CANVAS_ITEM (item), &canvas_rect)) { + if (hit_test (NAUTILUS_ICON_CANVAS_ITEM (item), &canvas_rect, NULL, NULL)) { return 0.0; } else { /* This value means not hit. @@ -1935,8 +2187,8 @@ nautilus_icon_canvas_item_bounds (GnomeCanvasItem *item, icon_rect.x1 = 0; icon_rect.y1 = 0; } else { - icon_rect.x1 = gdk_pixbuf_get_width (details->pixbuf); - icon_rect.y1 = gdk_pixbuf_get_height (details->pixbuf); + icon_rect.x1 = nautilus_icon_canvas_item_get_icon_width (icon_item); + icon_rect.y1 = nautilus_icon_canvas_item_get_icon_height (icon_item); } /* Compute text rectangle. */ @@ -1982,8 +2234,8 @@ nautilus_icon_canvas_item_get_icon_rectangle (NautilusIconCanvasItem *item, pixbuf = item->details->pixbuf; pixels_per_unit = GNOME_CANVAS_ITEM (item)->canvas->pixels_per_unit; - rect->x1 = rect->x0 + (pixbuf == NULL ? 0 : gdk_pixbuf_get_width (pixbuf)) / pixels_per_unit; - rect->y1 = rect->y0 + (pixbuf == NULL ? 0 : gdk_pixbuf_get_height (pixbuf)) / pixels_per_unit; + rect->x1 = rect->x0 + (pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_width (item)) / pixels_per_unit; + rect->y1 = rect->y0 + (pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_height (item)) / pixels_per_unit; } /* Get the rectangle of the icon only, in canvas coordinates. */ @@ -2009,8 +2261,8 @@ get_icon_canvas_rectangle (NautilusIconCanvasItem *item, pixbuf = item->details->pixbuf; - rect->x1 = rect->x0 + (pixbuf == NULL ? 0 : gdk_pixbuf_get_width (pixbuf)); - rect->y1 = rect->y0 + (pixbuf == NULL ? 0 : gdk_pixbuf_get_height (pixbuf)); + rect->x1 = rect->x0 + (pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_width (item)); + rect->y1 = rect->y0 + (pixbuf == NULL ? 0 : nautilus_icon_canvas_item_get_icon_height (item)); } void @@ -2106,10 +2358,15 @@ nautilus_icon_canvas_item_hit_test_stretch_handles (NautilusIconCanvasItem *item gboolean nautilus_icon_canvas_item_hit_test_rectangle (NautilusIconCanvasItem *item, const ArtIRect *canvas_rect) { + g_return_val_if_fail (NAUTILUS_IS_ICON_CANVAS_ITEM (item), FALSE); g_return_val_if_fail (canvas_rect != NULL, FALSE); - return hit_test (item, canvas_rect); +/* + nautilus_gnome_canvas_world_to_canvas_rectangle + (GNOME_CANVAS_ITEM (item)->canvas, world_rect, &canvas_rect); +*/ + return hit_test (item, canvas_rect, NULL, NULL); } const char * @@ -2167,6 +2424,41 @@ nautilus_icon_canvas_item_set_smooth_font (NautilusIconCanvasItem *icon_item, } } +GtkWidget * +nautilus_icon_canvas_item_get_control (NautilusIconCanvasItem *icon_item) +{ + return icon_item->details->control; +} + +void +nautilus_icon_canvas_item_set_control (NautilusIconCanvasItem *icon_item, GtkWidget *control) +{ + GnomeCanvasItem *item; + + if (icon_item->details->control == control) { + return; + } + + item = GNOME_CANVAS_ITEM (icon_item); + if (icon_item->details->control) { + gtk_signal_disconnect (GTK_OBJECT (icon_item->details->control), icon_item->details->control_destroy_id); + gtk_container_remove (GTK_CONTAINER (item->canvas), icon_item->details->control); + icon_item->details->control = NULL; + } + + if (control) { + icon_item->details->control = control; + icon_item->details->control_destroy_id = gtk_signal_connect (GTK_OBJECT (control), + "destroy", + (GtkSignalFunc) do_control_destroy, + item); + gtk_widget_show (control); + gtk_layout_put (GTK_LAYOUT (item->canvas), control, + item->x1 + item->canvas->zoom_xofs, + item->y1 + item->canvas->zoom_yofs); + } +} + void nautilus_icon_canvas_item_set_smooth_font_size (NautilusIconCanvasItem *icon_item, guint font_size) diff --git a/libnautilus-private/nautilus-icon-canvas-item.h b/libnautilus-private/nautilus-icon-canvas-item.h index 312efd69d..5d943323a 100644 --- a/libnautilus-private/nautilus-icon-canvas-item.h +++ b/libnautilus-private/nautilus-icon-canvas-item.h @@ -80,6 +80,10 @@ const char *nautilus_icon_canvas_item_get_editable_text (NautilusIconCanv void nautilus_icon_canvas_item_set_renaming (NautilusIconCanvasItem *icon_item, gboolean state); +GtkWidget * nautilus_icon_canvas_item_get_control (NautilusIconCanvasItem *icon_item); +void nautilus_icon_canvas_item_set_control (NautilusIconCanvasItem *icon_item, + GtkWidget *control); + /* geometry and hit testing */ gboolean nautilus_icon_canvas_item_hit_test_rectangle (NautilusIconCanvasItem *item, diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c index 153e6c4f4..66a5b5ba5 100644 --- a/libnautilus-private/nautilus-icon-container.c +++ b/libnautilus-private/nautilus-icon-container.c @@ -164,6 +164,7 @@ enum { CONTEXT_CLICK_SELECTION, MIDDLE_CLICK, GET_CONTAINER_URI, + GET_ICON_CONTROL, GET_ICON_IMAGES, GET_ICON_TEXT, GET_ICON_URI, @@ -3136,6 +3137,16 @@ nautilus_icon_container_initialize_class (NautilusIconContainerClass *class) gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); + signals[GET_ICON_CONTROL] + = gtk_signal_new ("get_icon_control", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (NautilusIconContainerClass, + get_icon_control), + gtk_marshal_NONE__POINTER_POINTER, + GTK_TYPE_NONE, 2, + GTK_TYPE_POINTER, + GTK_TYPE_POINTER); signals[GET_ICON_IMAGES] = gtk_signal_new ("get_icon_images", GTK_RUN_LAST, @@ -3708,9 +3719,10 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, GdkPixbuf *pixbuf, *emblem_pixbuf, *saved_pixbuf; GList *emblem_scalable_icons, *emblem_pixbufs, *p; char *editable_text, *additional_text; + GtkWidget *embedded_control; GdkFont *font; guint smooth_font_size; - + if (icon == NULL) { return; } @@ -3742,8 +3754,7 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, nautilus_scalable_icon_unref (scalable_icon); - /* in the rare case an image is too small, scale it up */ - + /* in the rare case an image is too small, scale it up */ width = gdk_pixbuf_get_width (pixbuf); height = gdk_pixbuf_get_height (pixbuf); if (width < min_image_size || height < min_image_size) { @@ -3751,9 +3762,11 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, /* don't let it exceed the maximum width in the other dimension */ scale_factor = MIN (scale_factor, max_image_size / width); scale_factor = MIN (scale_factor, max_image_size / height); - + scaled_width = floor (width * scale_factor + .5); scaled_height = floor (height * scale_factor + .5); + + /* scale the image to the calculated size */ saved_pixbuf = pixbuf; pixbuf = gdk_pixbuf_scale_simple (pixbuf, scaled_width, scaled_height, GDK_INTERP_BILINEAR); gdk_pixbuf_unref (saved_pixbuf); @@ -3782,13 +3795,22 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, emblem_pixbufs = g_list_reverse (emblem_pixbufs); nautilus_scalable_icon_list_free (emblem_scalable_icons); + /* get the embedded control, if any */ + embedded_control = nautilus_icon_canvas_item_get_control (icon->item); + if (embedded_control == NULL) { + gtk_signal_emit (GTK_OBJECT (container), + signals[GET_ICON_CONTROL], + icon->data, + &embedded_control); + } + /* Get both editable and non-editable icon text */ gtk_signal_emit (GTK_OBJECT (container), signals[GET_ICON_TEXT], icon->data, &editable_text, &additional_text); - + /* If name of icon being renamed was changed from elsewhere, end renaming mode. * Alternatively, we could replace the characters in the editable text widget * with the new name, but that could cause timing problems if the user just @@ -3813,6 +3835,8 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container, "smooth_font", details->smooth_label_font, NULL); + nautilus_icon_canvas_item_set_control (icon->item, embedded_control); + nautilus_icon_canvas_item_set_image (icon->item, pixbuf); nautilus_icon_canvas_item_set_attach_points (icon->item, &attach_points); nautilus_icon_canvas_item_set_emblems (icon->item, emblem_pixbufs); diff --git a/libnautilus-private/nautilus-icon-container.h b/libnautilus-private/nautilus-icon-container.h index 7528fa8d5..d15e5c576 100644 --- a/libnautilus-private/nautilus-icon-container.h +++ b/libnautilus-private/nautilus-icon-container.h @@ -107,6 +107,10 @@ typedef struct { gboolean (* get_stored_icon_position) (NautilusIconContainer *container, NautilusIconData *data, NautilusIconPosition *position); + void + (* get_icon_control) (NautilusIconContainer *container, + NautilusIconData *data, + GtkWidget **control); NautilusScalableIcon * (* get_icon_images) (NautilusIconContainer *container, NautilusIconData *data, diff --git a/libnautilus-private/nautilus-icon-dnd.c b/libnautilus-private/nautilus-icon-dnd.c index 7b2896201..778774d77 100644 --- a/libnautilus-private/nautilus-icon-dnd.c +++ b/libnautilus-private/nautilus-icon-dnd.c @@ -1300,6 +1300,7 @@ nautilus_icon_dnd_begin_drag (NautilusIconContainer *container, &pixmap_for_dragged_file, &mask_for_dragged_file, NAUTILUS_STANDARD_ALPHA_THRESHHOLD); + gdk_pixbuf_unref (pixbuf); /* compute the image's offset */ nautilus_icon_canvas_item_get_icon_rectangle diff --git a/libnautilus-private/nautilus-labeled-image.c b/libnautilus-private/nautilus-labeled-image.c index f7cfeb44c..97a64d18f 100644 --- a/libnautilus-private/nautilus-labeled-image.c +++ b/libnautilus-private/nautilus-labeled-image.c @@ -44,6 +44,7 @@ #define DEFAULT_X_ALIGNMENT 0.5 #define DEFAULT_Y_ALIGNMENT 0.5 + /* Arguments */ enum { @@ -710,7 +711,7 @@ nautilus_labeled_image_get_image_bounds (const NautilusLabeledImage *labeled_ima GtkRequisition image_requisition; ArtIRect image_bounds; ArtIRect content_bounds; - + g_return_val_if_fail (NAUTILUS_IS_LABELED_IMAGE (labeled_image), NAUTILUS_ART_IRECT_EMPTY); if (labeled_image->details->fill) { diff --git a/libnautilus-private/nautilus-link.c b/libnautilus-private/nautilus-link.c index bddcc36e1..cb3f4e2e8 100644 --- a/libnautilus-private/nautilus-link.c +++ b/libnautilus-private/nautilus-link.c @@ -311,6 +311,35 @@ nautilus_link_local_get_additional_text (const char *path) (path, NAUTILUS_METADATA_KEY_EXTRA_TEXT); } +void nautilus_link_local_get_component_info (const char *path, + char **control_moniker, char **control_data) +{ + xmlDoc *document; + const char *mime_type; + + *control_moniker = NULL; + *control_data = NULL; + + /* Check mime type. Exit if it is not a nautilus link */ + mime_type = gnome_vfs_get_file_mime_type (path, NULL, FALSE); + if (strcmp (mime_type, "application/x-nautilus-link") != 0) { + return; + } + + document = xmlParseFile (path); + if (document != NULL) { + *control_moniker = xml_get_root_property (document, + NAUTILUS_METADATA_KEY_CONTROL_MONIKER); + + *control_data = xml_get_root_property (document, + NAUTILUS_METADATA_KEY_CONTROL_DATA); + + xmlFreeDoc (document); + } +} + + + /* utility to return the local pathname of a cached icon, given the leaf name */ /* if the icons directory hasn't been created yet, create it */ static char * diff --git a/libnautilus-private/nautilus-link.h b/libnautilus-private/nautilus-link.h index 88882ccb5..b9596eb7d 100644 --- a/libnautilus-private/nautilus-link.h +++ b/libnautilus-private/nautilus-link.h @@ -76,14 +76,21 @@ gboolean nautilus_link_local_set_link_uri (const char * none. Despite the fact that it takes a URI parameter, works only if * the file is local and does sync. I/O. */ -char * nautilus_link_local_get_additional_text (const char *path); +char * nautilus_link_local_get_additional_text (const char *path); /* Returns the image associated with a link file. Despite the fact * that it takes a URI parameter, works only if the file is local and * does sync. I/O on the link, although it does async. on the image * and caches if the image is remote. */ -char * nautilus_link_local_get_image_uri (const char *path); +char * nautilus_link_local_get_image_uri (const char *path); + +/* returns the moniker of the component associated with a link file, as well as configuration data. + * It works only if the file is local and does sync. I/O. + */ +void nautilus_link_local_get_component_info (const char *path, + char **control_moniker, + char **control_data); /* Returns the link type of a link file. * Works only if the file is local and does sync. I/O diff --git a/libnautilus-private/nautilus-metadata.h b/libnautilus-private/nautilus-metadata.h index 00f96a2da..70681853f 100644 --- a/libnautilus-private/nautilus-metadata.h +++ b/libnautilus-private/nautilus-metadata.h @@ -72,6 +72,12 @@ #define NAUTILUS_METADATA_KEY_ICON_SCALE "icon_scale" #define NAUTILUS_METADATA_KEY_CUSTOM_ICON "custom_icon" +#define NAUTILUS_METADATA_KEY_FILE_DIGEST "digest" +#define NAUTILUS_METADATA_KEY_NOTES_INFO "notes_info" + +#define NAUTILUS_METADATA_KEY_CONTROL_MONIKER "control_moniker" +#define NAUTILUS_METADATA_KEY_CONTROL_DATA "control_data" + /* per link file */ #define NAUTILUS_METADATA_KEY_EXTRA_TEXT "extra_text" diff --git a/libnautilus-private/nautilus-text-layout.c b/libnautilus-private/nautilus-text-layout.c new file mode 100644 index 000000000..d76a1e678 --- /dev/null +++ b/libnautilus-private/nautilus-text-layout.c @@ -0,0 +1,349 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* nautilus-text-layout.c - Functions to layout text. + + Copyright (C) 1999, 2000 Eazel, Inc. + + The Gnome Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Gnome Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the Gnome Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Authors: Ramiro Estrugo <ramiro@eazel.com> +*/ + +#include <config.h> +#include "nautilus-text-layout.h" +#include "nautilus-string.h" +#include "nautilus-gdk-extensions.h" +#include "nautilus-gdk-pixbuf-extensions.h" + +/* + * The following text_layout stuff was shamelessly plundered + * from libgnomeui/gnome-icon-text.[ch] by Federico Mena. + * + * It was hacked to use NautilusScalableFont and GdkPixbuf + * instead of GdkFont and GdkDrawable. We want to use the + * same layout algorithm in Nautilus so that both the smooth + * and not smooth text rendering cases have predictably + * similar result. + * + * I also made some minor Nautilus-like style changes. -re + * + */ +static void +text_layout_free_row (gpointer data, + gpointer user_data) +{ + NautilusTextLayoutRow *row; + + if (data) { + row = data; + g_free (row->text); + g_free (row); + } +} + +/** + * nautilus_text_layout_free: + * @ti: An icon text info structure. + * + * Frees a &NautilusTextLayout structure. You should call this instead of + * freeing the structure yourself. + */ +void +nautilus_text_layout_free (NautilusTextLayout *text_layout) +{ + g_list_foreach (text_layout->rows, text_layout_free_row, NULL); + g_list_free (text_layout->rows); + g_free (text_layout); +} + +/** + * nautilus_text_layout_new: + * @font: Name of the font that will be used to render the text. + * @text: Text to be formatted. + * @separators: Separators used for word wrapping, can be NULL. + * @max_width: Width in pixels to be used for word wrapping. + * @confine: Whether it is mandatory to wrap at @max_width. + * + * Creates a new &NautilusTextLayout structure by wrapping the specified + * text. If non-NULL, the @separators argument defines a set of characters + * to be used as word delimiters for performing word wrapping. If it is + * NULL, then only spaces will be used as word delimiters. + * + * The @max_width argument is used to specify the width at which word + * wrapping will be performed. If there is a very long word that does not + * fit in a single line, the @confine argument can be used to specify + * whether the word should be unconditionally split to fit or whether + * the maximum width should be increased as necessary. + * + * Return value: A newly-created &NautilusTextLayout structure. + */ +NautilusTextLayout * +nautilus_text_layout_new (const NautilusScalableFont *font, + int font_size, + const char *text, + const char *separators, + int max_width, + gboolean confine) +{ + NautilusTextLayout *text_layout; + NautilusTextLayoutRow *row; + const char *row_end; + const char *s, *word_start, *word_end, *old_word_end; + char *sub_text; + int i, w_len; + int w; + const char *text_iter; + int text_len, separators_len; + + g_return_val_if_fail (font != NULL, NULL); + g_return_val_if_fail (font_size > 0, NULL); + g_return_val_if_fail (text != NULL, NULL); + g_return_val_if_fail (nautilus_strlen (text) > 0, NULL); + + if (!separators) + separators = " "; + + text_len = strlen (text); + + separators_len = strlen (separators); + + text_layout = g_new (NautilusTextLayout, 1); + + text_layout->rows = NULL; + text_layout->font = font; + text_layout->font_size = font_size; + text_layout->width = 0; + text_layout->height = 0; + text_layout->baseline_skip = font_size; + + word_end = NULL; + + text_iter = text; + while (*text_iter) { + for (row_end = text_iter; *row_end != 0 && *row_end != '\n'; row_end++); + + /* Accumulate words from this row until they don't fit in the max_width */ + + s = text_iter; + + while (s < row_end) { + word_start = s; + old_word_end = word_end; + for (word_end = word_start; *word_end; word_end++) { + const char *p; + for (p = separators; *p; p++) { + if (*word_end == *p) + goto found; + } + } + found: + if (word_end < row_end) + word_end++; + + if (nautilus_scalable_font_text_width (font, font_size, text_iter, word_end - text_iter) > max_width) { + if (word_start == text_iter) { + if (confine) { + /* We must force-split the word. Look for a proper + * place to do it. + */ + + w_len = word_end - word_start; + + for (i = 1; i < w_len; i++) { + w = nautilus_scalable_font_text_width (font, font_size, word_start, i); + if (w > max_width) { + if (i == 1) + /* Shit, not even a single character fits */ + max_width = w; + else + break; + } + } + + /* Create sub-row with the chars that fit */ + + sub_text = g_strndup (word_start, i - 1); + + row = g_new (NautilusTextLayoutRow, 1); + row->text = sub_text; + row->text_length = i - 1; + row->width = nautilus_scalable_font_text_width (font, font_size, + sub_text, + strlen (sub_text)); + + text_layout->rows = g_list_append (text_layout->rows, row); + + if (row->width > text_layout->width) + text_layout->width = row->width; + + text_layout->height += text_layout->baseline_skip; + + /* Bump the text pointer */ + + text_iter += i - 1; + s = text_iter; + + continue; + } else + max_width = nautilus_scalable_font_text_width (font, font_size, word_start, word_end - word_start); + + continue; /* Retry split */ + } else { + word_end = old_word_end; /* Restore to region that does fit */ + break; /* Stop the loop because we found something that doesn't fit */ + } + } + + s = word_end; + } + + /* Append row */ + + if (text_iter == row_end) { + /* We are on a newline, so append an empty row */ + + text_layout->rows = g_list_append (text_layout->rows, NULL); + text_layout->height += text_layout->baseline_skip / 2; + + /* Next! */ + + text_iter = row_end + 1; + } else { + /* Create subrow and append it to the list */ + + int sub_len; + sub_len = word_end - text_iter; + + sub_text = g_strndup (text_iter, sub_len); + + row = g_new (NautilusTextLayoutRow, 1); + row->text = sub_text; + row->text_length = sub_len; + row->width = nautilus_scalable_font_text_width (font, font_size, sub_text, sub_len); + + text_layout->rows = g_list_append (text_layout->rows, row); + + if (row->width > text_layout->width) + text_layout->width = row->width; + + text_layout->height += text_layout->baseline_skip; + + /* Next! */ + + text_iter = word_end; + } + } + + return text_layout; +} + +/** + * nautilus_text_layout_paint: + * @ti: An icon text info structure. + * @drawable: Target drawable. + * @gc: GC used to render the string. + * @x: Left coordinate for text. + * @y: Upper coordinate for text. + * @just: Justification for text. + * + * Paints the formatted text in the icon text info structure onto a drawable. + * This is just a sample implementation; applications can choose to use other + * rendering functions. + */ +void +nautilus_text_layout_paint (const NautilusTextLayout *text_layout, + GdkPixbuf *destination_pixbuf, + int x, + int y, + GtkJustification justification, + guint32 color, + gboolean underlined) +{ + GList *item; + const NautilusTextLayoutRow *row; + int xpos; + + g_return_if_fail (text_layout != NULL); + g_return_if_fail (destination_pixbuf != NULL); + g_return_if_fail (justification >= GTK_JUSTIFY_LEFT && justification <= GTK_JUSTIFY_FILL); + + /* FIXME bugzilla.eazel.com 5087: Make sure the color we are fed is opaque. The real solution is + * to fix the callers. + */ + color = NAUTILUS_RGBA_COLOR_PACK (NAUTILUS_RGBA_COLOR_GET_R (color), + NAUTILUS_RGBA_COLOR_GET_G (color), + NAUTILUS_RGBA_COLOR_GET_B (color), + NAUTILUS_OPACITY_FULLY_OPAQUE); + + for (item = text_layout->rows; item; item = item->next) { + if (item->data) { + row = item->data; + + switch (justification) { + case GTK_JUSTIFY_LEFT: + xpos = 0; + break; + + case GTK_JUSTIFY_RIGHT: + xpos = text_layout->width - row->width; + break; + + case GTK_JUSTIFY_CENTER: + xpos = (text_layout->width - row->width) / 2; + break; + + default: + /* Anyone care to implement GTK_JUSTIFY_FILL? */ + g_warning ("Justification type %d not supported. Using left-justification.", + (int) justification); + xpos = 0; + } + + nautilus_scalable_font_draw_text (text_layout->font, + destination_pixbuf, + x + xpos, + y, + NULL, + text_layout->font_size, + row->text, + row->text_length, + color, + NAUTILUS_OPACITY_FULLY_OPAQUE); + + /* Underline the text if needed */ + if (underlined) { + ArtIRect underline_rect; + + /* FIXME bugzilla.eazel.com 2865: This underlining code should + * take into account the baseline for the rendered string rather + * that doing the '-2' nonsense. + */ + nautilus_art_irect_assign (&underline_rect, + x + xpos, + y + text_layout->font_size - 2, + row->width, + 1); + + nautilus_gdk_pixbuf_fill_rectangle_with_color (destination_pixbuf, + &underline_rect, + color); + } + + y += text_layout->baseline_skip; + } else + y += text_layout->baseline_skip / 2; + } +} diff --git a/libnautilus-private/nautilus-text-layout.h b/libnautilus-private/nautilus-text-layout.h new file mode 100644 index 000000000..02a419828 --- /dev/null +++ b/libnautilus-private/nautilus-text-layout.h @@ -0,0 +1,84 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* nautilus-text-layout.h - Functions to layout text. + + Copyright (C) 1999, 2000 Eazel, Inc. + + The Gnome Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Gnome Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the Gnome Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Authors: Ramiro Estrugo <ramiro@eazel.com> +*/ + +#ifndef NAUTILUS_TEXT_LAYOUT_H +#define NAUTILUS_TEXT_LAYOUT_H + +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <libgnome/gnome-defs.h> +#include <libnautilus-extensions/nautilus-scalable-font.h> +#include <libart_lgpl/art_rect.h> + +BEGIN_GNOME_DECLS + +/* + * The following text_layout stuff was shamelessly plundered + * from libgnomeui/gnome-icon-text.[ch] by Federico Mena. + * + * It was hacked to use NautilusScalableFont and GdkPixbuf + * instead of GdkFont and GdkDrawable. We want to use the + * same layout algorithm in Nautilus so that both the smooth + * and not smooth text rendering cases have predictably + * similar result. + * + * I also made some minor Nautilus-like style changes. -re + + */ +typedef struct +{ + char *text; + int width; + guint text_length; +} NautilusTextLayoutRow; + +typedef struct +{ + GList *rows; + const NautilusScalableFont *font; + int font_size; + int width; + int height; + int baseline_skip; +} NautilusTextLayout; + +NautilusTextLayout *nautilus_text_layout_new (const NautilusScalableFont *font, + int font_size, + const char *text, + const char *separators, + int max_width, + gboolean confine); +void nautilus_text_layout_paint (const NautilusTextLayout *text_info, + GdkPixbuf *pixbuf, + int x, + int y, + GtkJustification justification, + guint32 color, + gboolean underlined); +void nautilus_text_layout_free (NautilusTextLayout *text_info); + +END_GNOME_DECLS + +#endif /* NAUTILUS_TEXT_LAYOUT_H */ + + diff --git a/nautilus-clean.sh b/nautilus-clean.sh index bbdc458b7..d6b86c357 100755 --- a/nautilus-clean.sh +++ b/nautilus-clean.sh @@ -96,6 +96,7 @@ nautilus-summary-view \ nautilus-text-view \ nautilus-throbber \ nautilus-tree-view \ +nautilus-vcard \ trilobite-eazel-install-service \ trilobite-eazel-time-view \ " diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c index e6f48aeb9..4b83c9212 100644 --- a/src/file-manager/fm-icon-view.c +++ b/src/file-manager/fm-icon-view.c @@ -28,6 +28,7 @@ #include "fm-desktop-icon-view.h" #include "fm-error-reporting.h" #include "fm-icon-text-window.h" +#include <bonobo/bonobo-widget.h> #include <bonobo/bonobo-ui-util.h> #include <ctype.h> #include <errno.h> @@ -43,6 +44,7 @@ #include <libgnomevfs/gnome-vfs-uri.h> #include <libgnomevfs/gnome-vfs-utils.h> #include <libgnomevfs/gnome-vfs-xfer.h> +#include <libnautilus-extensions/nautilus-annotation.h> #include <libnautilus-extensions/nautilus-background.h> #include <libnautilus-extensions/nautilus-bonobo-extensions.h> #include <libnautilus-extensions/nautilus-directory-background.h> @@ -1677,6 +1679,38 @@ get_icon_images_callback (NautilusIconContainer *container, return nautilus_icon_factory_get_icon_for_file (file, modifier, smooth_graphics); } +/* return the Bonobo control associated with the icon, if any */ +static void +get_icon_control_callback (NautilusIconContainer *container, + NautilusFile *file, + GtkWidget **control, + FMIconView *icon_view) +{ + Bonobo_UIContainer ui_container; + char *control_moniker, *control_data; + char *uri, *path; + *control = NULL; + + if (nautilus_file_is_nautilus_link (file)) { + uri = nautilus_file_get_uri (file); + path = gnome_vfs_get_local_path_from_uri (uri); + if (path != NULL) { + nautilus_link_local_get_component_info (path, &control_moniker, &control_data); + if (control_moniker && strlen (control_moniker) > 0) { + ui_container = fm_directory_view_get_bonobo_ui_container (FM_DIRECTORY_VIEW (icon_view)); + *control = bonobo_widget_new_control (control_moniker, ui_container); + g_free (control_moniker); + } + if (control_data && strlen (control_data) > 0) { + bonobo_widget_set_property (BONOBO_WIDGET (*control), "configuration", control_data, NULL); + g_free (control_data); + } + g_free (path); + } + g_free (uri); + } +} + static char * get_icon_uri_callback (NautilusIconContainer *container, NautilusFile *file, @@ -1731,6 +1765,7 @@ get_icon_text_callback (NautilusIconContainer *container, { char *actual_uri, *path; char *attribute_names; + char *annotations; char **text_array; int i , slot_index; char *attribute_string; @@ -1741,6 +1776,10 @@ get_icon_text_callback (NautilusIconContainer *container, g_assert (additional_text != NULL); g_assert (FM_IS_ICON_VIEW (icon_view)); + /* fetch the annotations */ + annotations = nautilus_annotation_get_annotation (file); + g_free (annotations); + /* In the smallest zoom mode, no text is drawn. */ if (fm_icon_view_get_zoom_level (icon_view) == NAUTILUS_ZOOM_LEVEL_SMALLEST) { *editable_text = NULL; @@ -1748,7 +1787,7 @@ get_icon_text_callback (NautilusIconContainer *container, /* Strip the suffix for nautilus object xml files. */ *editable_text = nautilus_file_get_name (file); } - + /* Handle link files specially. */ if (nautilus_file_is_nautilus_link (file)) { /* FIXME bugzilla.eazel.com 2531: Does sync. I/O and works only locally. */ @@ -2079,6 +2118,10 @@ create_icon_container (FMIconView *icon_view) "get_icon_images", GTK_SIGNAL_FUNC (get_icon_images_callback), icon_view); + gtk_signal_connect (GTK_OBJECT (icon_container), + "get_icon_control", + GTK_SIGNAL_FUNC (get_icon_control_callback), + icon_view); gtk_signal_connect (GTK_OBJECT (icon_container), "get_icon_uri", GTK_SIGNAL_FUNC (get_icon_uri_callback), diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c index 595fe5e02..51cf9dc82 100644 --- a/src/nautilus-information-panel.c +++ b/src/nautilus-information-panel.c @@ -619,6 +619,9 @@ uri_is_local_image (const char *uri) return TRUE; } +/* routine to handle a list of uris is dropped on the sidebar; case out based on the part + * of the sidebar it was dropped on + */ static void receive_dropped_uri_list (NautilusSidebar *sidebar, int x, int y, @@ -772,7 +775,6 @@ receive_dropped_color (NautilusSidebar *sidebar, } /* handle receiving a dropped keyword */ - static void receive_dropped_keyword (NautilusSidebar *sidebar, int x, int y, @@ -784,6 +786,7 @@ receive_dropped_keyword (NautilusSidebar *sidebar, nautilus_sidebar_update_appearance (sidebar); } +/* general handler for dropped items - case out on the type of the dropped item */ static void nautilus_sidebar_drag_data_received (GtkWidget *widget, GdkDragContext *context, int x, int y, @@ -1258,7 +1261,6 @@ add_command_buttons (NautilusSidebar *sidebar, GList *application_list) * somehow. We can do a search and replace on the "%s" * part instead, which should work. */ - /* Get the local path, if there is one */ file_path = gnome_vfs_get_local_path_from_uri (sidebar->details->uri); if (file_path == NULL) { @@ -1423,6 +1425,7 @@ nautilus_sidebar_update_buttons (NautilusSidebar *sidebar) } else { gtk_widget_show (GTK_WIDGET (sidebar->details->button_box_centerer)); } + } static void diff --git a/src/nautilus-property-browser.c b/src/nautilus-property-browser.c index 9c8426fd6..943f017fe 100644 --- a/src/nautilus-property-browser.c +++ b/src/nautilus-property-browser.c @@ -198,6 +198,8 @@ static void element_clicked_callback (GtkWidget #define MAX_ICON_WIDTH 63 #define MAX_ICON_HEIGHT 63 #define COLOR_SQUARE_SIZE 48 +#define MAX_EMBLEM_HEIGHT 52 +#define STANDARD_BUTTON_IMAGE_HEIGHT 42 #define LABELED_IMAGE_SPACING 2 #define IMAGE_TABLE_X_SPACING 6 diff --git a/src/nautilus-sidebar-tabs.c b/src/nautilus-sidebar-tabs.c index faa2d9907..121ef4a4e 100644 --- a/src/nautilus-sidebar-tabs.c +++ b/src/nautilus-sidebar-tabs.c @@ -440,10 +440,11 @@ int nautilus_sidebar_tabs_hit_test (NautilusSidebarTabs *sidebar_tabs, int x, in /* loop through the items, seeing it the passed in point is in one of the rectangles */ tab_item = (TabItem*) current_item->data; + /* if (!tab_item->visible && current_item->next) { tab_item = (TabItem*) current_item->next->data; } - + */ result = -1; while (current_item != NULL) { tab_item = (TabItem*) current_item->data; @@ -1342,8 +1343,9 @@ nautilus_sidebar_tabs_select_tab (NautilusSidebarTabs *sidebar_tabs, int which_t for (next_tab = sidebar_tabs->details->tab_items; next_tab != NULL; next_tab = next_tab->next) { TabItem *item = next_tab->data; + item->visible = (item->notebook_page != which_tab); - item->prelit = FALSE; + item->prelit = FALSE; } recalculate_size(sidebar_tabs); diff --git a/src/nautilus-sidebar.c b/src/nautilus-sidebar.c index 595fe5e02..51cf9dc82 100644 --- a/src/nautilus-sidebar.c +++ b/src/nautilus-sidebar.c @@ -619,6 +619,9 @@ uri_is_local_image (const char *uri) return TRUE; } +/* routine to handle a list of uris is dropped on the sidebar; case out based on the part + * of the sidebar it was dropped on + */ static void receive_dropped_uri_list (NautilusSidebar *sidebar, int x, int y, @@ -772,7 +775,6 @@ receive_dropped_color (NautilusSidebar *sidebar, } /* handle receiving a dropped keyword */ - static void receive_dropped_keyword (NautilusSidebar *sidebar, int x, int y, @@ -784,6 +786,7 @@ receive_dropped_keyword (NautilusSidebar *sidebar, nautilus_sidebar_update_appearance (sidebar); } +/* general handler for dropped items - case out on the type of the dropped item */ static void nautilus_sidebar_drag_data_received (GtkWidget *widget, GdkDragContext *context, int x, int y, @@ -1258,7 +1261,6 @@ add_command_buttons (NautilusSidebar *sidebar, GList *application_list) * somehow. We can do a search and replace on the "%s" * part instead, which should work. */ - /* Get the local path, if there is one */ file_path = gnome_vfs_get_local_path_from_uri (sidebar->details->uri); if (file_path == NULL) { @@ -1423,6 +1425,7 @@ nautilus_sidebar_update_buttons (NautilusSidebar *sidebar) } else { gtk_widget_show (GTK_WIDGET (sidebar->details->button_box_centerer)); } + } static void diff --git a/user-guide/C/Makefile.am b/user-guide/C/Makefile.am new file mode 100644 index 000000000..f7ebd3835 --- /dev/null +++ b/user-guide/C/Makefile.am @@ -0,0 +1,42 @@ +NULL= + +LANG=C + +DOC_MODULE=nautilus +OMFFILE=nautilus-C.omf +SGMLFILE=nautilus.sgml +SGML_DIR=$(datadir)/gnome/help +OMF_DIR=$(top_srcdir)/omf-install + +TARGET_DIR=$(SGML_DIR)/$(DOC_MODULE)/$(LANG)/ + +EXTRA_DIST = $(OMFFILE) + +all: omf + +omf: $(OMFFILE) + -scrollkeeper-preinstall $(DESTDIR)$(TARGET_DIR)$(SGMLFILE) $(OMFFILE) $(OMF_DIR)/$(OMFFILE) + + +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) + installfiles=`echo $(srcdir)/sgml/*.sgml \ + $(srcdir)/img/*.png \ + $(srcdir)/html/*.html`; \ + if test "$$installfiles" = '$(srcdir)/sgml/*.sgml'; \ + then echo '-- Nothing to install' ; \ + else \ + for i in $$installfiles; do \ + basefile=`basename $$i`; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR)$$basefile; \ + done; \ + fi + +dist-hook: + mkdir $(distdir)/sgml + mkdir $(distdir)/html + mkdir $(distdir)/img + -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml + -cp $(srcdir)/img/*.png $(distdir)/img + -cp $(srcdir)/html/*.html $(distdir)/html + diff --git a/user-guide/C/html/.cvsignore b/user-guide/C/html/.cvsignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/user-guide/C/html/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/user-guide/C/html/license.html b/user-guide/C/html/license.html new file mode 100644 index 000000000..31fa3e49b --- /dev/null +++ b/user-guide/C/html/license.html @@ -0,0 +1,153 @@ +<HTML +><HEAD +><TITLE +>License +

        Nautilus

         

        License

        This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later + version. +

        This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +

        You may obtain a copy of the + GNU General Public License from the Free + Software Foundation by visiting their Web site or by writing to +

            Free Software Foundation, Inc.
        +    59 Temple Place - Suite 330
        +    BostonMA 02111-1307
        +    USA
        +   

        +


         
          
        + diff --git a/user-guide/C/img/.cvsignore b/user-guide/C/img/.cvsignore new file mode 100644 index 000000000..e4e5f6c8b --- /dev/null +++ b/user-guide/C/img/.cvsignore @@ -0,0 +1 @@ +*~ \ No newline at end of file diff --git a/user-guide/C/img/ch1-README.png b/user-guide/C/img/ch1-README.png new file mode 100644 index 000000000..8c4a3a282 Binary files /dev/null and b/user-guide/C/img/ch1-README.png differ diff --git a/user-guide/C/img/ch1-cnn.png b/user-guide/C/img/ch1-cnn.png new file mode 100644 index 000000000..022c280de Binary files /dev/null and b/user-guide/C/img/ch1-cnn.png differ diff --git a/user-guide/C/img/ch1-complex-search.png b/user-guide/C/img/ch1-complex-search.png new file mode 100644 index 000000000..d56fe9ee9 Binary files /dev/null and b/user-guide/C/img/ch1-complex-search.png differ diff --git a/user-guide/C/img/ch1-connect.png b/user-guide/C/img/ch1-connect.png new file mode 100644 index 000000000..9daad6061 Binary files /dev/null and b/user-guide/C/img/ch1-connect.png differ diff --git a/user-guide/C/img/ch1-duplicate.png b/user-guide/C/img/ch1-duplicate.png new file mode 100644 index 000000000..e356c35ce Binary files /dev/null and b/user-guide/C/img/ch1-duplicate.png differ diff --git a/user-guide/C/img/ch1-google.png b/user-guide/C/img/ch1-google.png new file mode 100644 index 000000000..af56b613b Binary files /dev/null and b/user-guide/C/img/ch1-google.png differ diff --git a/user-guide/C/img/ch1-hardware.png b/user-guide/C/img/ch1-hardware.png new file mode 100644 index 000000000..32d9ea8f6 Binary files /dev/null and b/user-guide/C/img/ch1-hardware.png differ diff --git a/user-guide/C/img/ch1-history.png b/user-guide/C/img/ch1-history.png new file mode 100644 index 000000000..f47381ede Binary files /dev/null and b/user-guide/C/img/ch1-history.png differ diff --git a/user-guide/C/img/ch1-home-john.png b/user-guide/C/img/ch1-home-john.png new file mode 100644 index 000000000..6ccb107cd Binary files /dev/null and b/user-guide/C/img/ch1-home-john.png differ diff --git a/user-guide/C/img/ch1-home.png b/user-guide/C/img/ch1-home.png new file mode 100644 index 000000000..e4082f37f Binary files /dev/null and b/user-guide/C/img/ch1-home.png differ diff --git a/user-guide/C/img/ch1-icon-view-150.png b/user-guide/C/img/ch1-icon-view-150.png new file mode 100644 index 000000000..c556b44e5 Binary files /dev/null and b/user-guide/C/img/ch1-icon-view-150.png differ diff --git a/user-guide/C/img/ch1-icon-view-demo.png b/user-guide/C/img/ch1-icon-view-demo.png new file mode 100644 index 000000000..9e79fef17 Binary files /dev/null and b/user-guide/C/img/ch1-icon-view-demo.png differ diff --git a/user-guide/C/img/ch1-inadequate-permissions.png b/user-guide/C/img/ch1-inadequate-permissions.png new file mode 100644 index 000000000..9db7d0b45 Binary files /dev/null and b/user-guide/C/img/ch1-inadequate-permissions.png differ diff --git a/user-guide/C/img/ch1-list-mydoc.png b/user-guide/C/img/ch1-list-mydoc.png new file mode 100644 index 000000000..6b2ed455f Binary files /dev/null and b/user-guide/C/img/ch1-list-mydoc.png differ diff --git a/user-guide/C/img/ch1-music-control.png b/user-guide/C/img/ch1-music-control.png new file mode 100644 index 000000000..61a4aa7d1 Binary files /dev/null and b/user-guide/C/img/ch1-music-control.png differ diff --git a/user-guide/C/img/ch1-nautiluslogo.png b/user-guide/C/img/ch1-nautiluslogo.png new file mode 100644 index 000000000..be1973f92 Binary files /dev/null and b/user-guide/C/img/ch1-nautiluslogo.png differ diff --git a/user-guide/C/img/ch1-new-window.png b/user-guide/C/img/ch1-new-window.png new file mode 100644 index 000000000..3de1ace8e Binary files /dev/null and b/user-guide/C/img/ch1-new-window.png differ diff --git a/user-guide/C/img/ch1-open-with.png b/user-guide/C/img/ch1-open-with.png new file mode 100644 index 000000000..f594bc174 Binary files /dev/null and b/user-guide/C/img/ch1-open-with.png differ diff --git a/user-guide/C/img/ch1-panel.png b/user-guide/C/img/ch1-panel.png new file mode 100644 index 000000000..6427677bb Binary files /dev/null and b/user-guide/C/img/ch1-panel.png differ diff --git a/user-guide/C/img/ch1-permissions.png b/user-guide/C/img/ch1-permissions.png new file mode 100644 index 000000000..822a81a04 Binary files /dev/null and b/user-guide/C/img/ch1-permissions.png differ diff --git a/user-guide/C/img/ch1-pluck.png b/user-guide/C/img/ch1-pluck.png new file mode 100644 index 000000000..36f5e27c2 Binary files /dev/null and b/user-guide/C/img/ch1-pluck.png differ diff --git a/user-guide/C/img/ch1-samba.png b/user-guide/C/img/ch1-samba.png new file mode 100644 index 000000000..8d08b6df9 Binary files /dev/null and b/user-guide/C/img/ch1-samba.png differ diff --git a/user-guide/C/img/ch1-slash.png b/user-guide/C/img/ch1-slash.png new file mode 100644 index 000000000..30de5702c Binary files /dev/null and b/user-guide/C/img/ch1-slash.png differ diff --git a/user-guide/C/img/ch1-toolbar.png b/user-guide/C/img/ch1-toolbar.png new file mode 100644 index 000000000..e63a07324 Binary files /dev/null and b/user-guide/C/img/ch1-toolbar.png differ diff --git a/user-guide/C/img/ch1-toshiba.png b/user-guide/C/img/ch1-toshiba.png new file mode 100644 index 000000000..3e8fe69c2 Binary files /dev/null and b/user-guide/C/img/ch1-toshiba.png differ diff --git a/user-guide/C/img/ch1-tree-demo.png b/user-guide/C/img/ch1-tree-demo.png new file mode 100644 index 000000000..7f017a9b1 Binary files /dev/null and b/user-guide/C/img/ch1-tree-demo.png differ diff --git a/user-guide/C/img/ch1-tree-doc-1.png b/user-guide/C/img/ch1-tree-doc-1.png new file mode 100644 index 000000000..715742c3b Binary files /dev/null and b/user-guide/C/img/ch1-tree-doc-1.png differ diff --git a/user-guide/C/img/ch1-tree-doc.png b/user-guide/C/img/ch1-tree-doc.png new file mode 100644 index 000000000..9f9b9e5c8 Binary files /dev/null and b/user-guide/C/img/ch1-tree-doc.png differ diff --git a/user-guide/C/img/ch1-tree-etc.png b/user-guide/C/img/ch1-tree-etc.png new file mode 100644 index 000000000..ebf24e220 Binary files /dev/null and b/user-guide/C/img/ch1-tree-etc.png differ diff --git a/user-guide/C/img/ch1-tree-slash.png b/user-guide/C/img/ch1-tree-slash.png new file mode 100644 index 000000000..68b1d67a6 Binary files /dev/null and b/user-guide/C/img/ch1-tree-slash.png differ diff --git a/user-guide/C/img/ch1-view-as.png b/user-guide/C/img/ch1-view-as.png new file mode 100644 index 000000000..294cd1705 Binary files /dev/null and b/user-guide/C/img/ch1-view-as.png differ diff --git a/user-guide/C/img/ch1-zoom-control.png b/user-guide/C/img/ch1-zoom-control.png new file mode 100644 index 000000000..aacc5ceba Binary files /dev/null and b/user-guide/C/img/ch1-zoom-control.png differ diff --git a/user-guide/C/img/ch2-colors.png b/user-guide/C/img/ch2-colors.png new file mode 100644 index 000000000..86bf2b579 Binary files /dev/null and b/user-guide/C/img/ch2-colors.png differ diff --git a/user-guide/C/img/ch2-edit-settings-folder.png b/user-guide/C/img/ch2-edit-settings-folder.png new file mode 100644 index 000000000..bce20c3d0 Binary files /dev/null and b/user-guide/C/img/ch2-edit-settings-folder.png differ diff --git a/user-guide/C/img/ch2-emblems.png b/user-guide/C/img/ch2-emblems.png new file mode 100644 index 000000000..cd8cf7efd Binary files /dev/null and b/user-guide/C/img/ch2-emblems.png differ diff --git a/user-guide/C/img/ch2-home-john-mydoc.png b/user-guide/C/img/ch2-home-john-mydoc.png new file mode 100644 index 000000000..785b9114f Binary files /dev/null and b/user-guide/C/img/ch2-home-john-mydoc.png differ diff --git a/user-guide/C/img/ch2-icon-captions-alone.png b/user-guide/C/img/ch2-icon-captions-alone.png new file mode 100644 index 000000000..491a871ce Binary files /dev/null and b/user-guide/C/img/ch2-icon-captions-alone.png differ diff --git a/user-guide/C/img/ch2-icon-captions.png b/user-guide/C/img/ch2-icon-captions.png new file mode 100644 index 000000000..f133ed28f Binary files /dev/null and b/user-guide/C/img/ch2-icon-captions.png differ diff --git a/user-guide/C/img/ch2-john.png b/user-guide/C/img/ch2-john.png new file mode 100644 index 000000000..18cbe6e84 Binary files /dev/null and b/user-guide/C/img/ch2-john.png differ diff --git a/user-guide/C/img/ch2-music.png b/user-guide/C/img/ch2-music.png new file mode 100644 index 000000000..bc7bc932f Binary files /dev/null and b/user-guide/C/img/ch2-music.png differ diff --git a/user-guide/C/img/ch2-open-with-other.png b/user-guide/C/img/ch2-open-with-other.png new file mode 100644 index 000000000..09ca51299 Binary files /dev/null and b/user-guide/C/img/ch2-open-with-other.png differ diff --git a/user-guide/C/img/ch2-open-with.png b/user-guide/C/img/ch2-open-with.png new file mode 100644 index 000000000..7ace76d16 Binary files /dev/null and b/user-guide/C/img/ch2-open-with.png differ diff --git a/user-guide/C/img/ch2-photos-john.png b/user-guide/C/img/ch2-photos-john.png new file mode 100644 index 000000000..f583b2805 Binary files /dev/null and b/user-guide/C/img/ch2-photos-john.png differ diff --git a/user-guide/C/img/ch2-right-click-open-with.png b/user-guide/C/img/ch2-right-click-open-with.png new file mode 100644 index 000000000..39654e7f4 Binary files /dev/null and b/user-guide/C/img/ch2-right-click-open-with.png differ diff --git a/user-guide/C/img/ch2-search-settings.png b/user-guide/C/img/ch2-search-settings.png new file mode 100644 index 000000000..10bba2ebf Binary files /dev/null and b/user-guide/C/img/ch2-search-settings.png differ diff --git a/user-guide/C/img/ch2-ski-intermediate-menu.png b/user-guide/C/img/ch2-ski-intermediate-menu.png new file mode 100644 index 000000000..7f9dc9412 Binary files /dev/null and b/user-guide/C/img/ch2-ski-intermediate-menu.png differ diff --git a/user-guide/C/img/ch2-theme-eazel.png b/user-guide/C/img/ch2-theme-eazel.png new file mode 100644 index 000000000..943b7ed0b Binary files /dev/null and b/user-guide/C/img/ch2-theme-eazel.png differ diff --git a/user-guide/C/img/ch2-view-layout-menu.png b/user-guide/C/img/ch2-view-layout-menu.png new file mode 100644 index 000000000..3094ebf84 Binary files /dev/null and b/user-guide/C/img/ch2-view-layout-menu.png differ diff --git a/user-guide/C/img/ch3-account-info.png b/user-guide/C/img/ch3-account-info.png new file mode 100644 index 000000000..81f40e99f Binary files /dev/null and b/user-guide/C/img/ch3-account-info.png differ diff --git a/user-guide/C/img/ch3-online-storage.png b/user-guide/C/img/ch3-online-storage.png new file mode 100644 index 000000000..a26c7e3f3 Binary files /dev/null and b/user-guide/C/img/ch3-online-storage.png differ diff --git a/user-guide/C/img/ch3-package-titles.png b/user-guide/C/img/ch3-package-titles.png new file mode 100644 index 000000000..d4a9e3ca5 Binary files /dev/null and b/user-guide/C/img/ch3-package-titles.png differ diff --git a/user-guide/C/img/ch3-sign-up.png b/user-guide/C/img/ch3-sign-up.png new file mode 100644 index 000000000..823f2aa0a Binary files /dev/null and b/user-guide/C/img/ch3-sign-up.png differ diff --git a/user-guide/C/img/ch3-welcome-screen.png b/user-guide/C/img/ch3-welcome-screen.png new file mode 100644 index 000000000..213758fcf Binary files /dev/null and b/user-guide/C/img/ch3-welcome-screen.png differ diff --git a/user-guide/C/img/custicon.png b/user-guide/C/img/custicon.png new file mode 100644 index 000000000..a6acb6cbf Binary files /dev/null and b/user-guide/C/img/custicon.png differ diff --git a/user-guide/C/img/full.png b/user-guide/C/img/full.png new file mode 100644 index 000000000..4970c6b73 Binary files /dev/null and b/user-guide/C/img/full.png differ diff --git a/user-guide/C/img/install-update.png b/user-guide/C/img/install-update.png new file mode 100644 index 000000000..cd2e9db44 Binary files /dev/null and b/user-guide/C/img/install-update.png differ diff --git a/user-guide/C/img/install-user-level.png b/user-guide/C/img/install-user-level.png new file mode 100644 index 000000000..5b092f86e Binary files /dev/null and b/user-guide/C/img/install-user-level.png differ diff --git a/user-guide/C/img/locbar.png b/user-guide/C/img/locbar.png new file mode 100644 index 000000000..0716ae5af Binary files /dev/null and b/user-guide/C/img/locbar.png differ diff --git a/user-guide/C/img/player.png b/user-guide/C/img/player.png new file mode 100644 index 000000000..53fc9248a Binary files /dev/null and b/user-guide/C/img/player.png differ diff --git a/user-guide/C/img/prefmenu.png b/user-guide/C/img/prefmenu.png new file mode 100644 index 000000000..dd53ded37 Binary files /dev/null and b/user-guide/C/img/prefmenu.png differ diff --git a/user-guide/C/img/sidebar.png b/user-guide/C/img/sidebar.png new file mode 100644 index 000000000..eb2156531 Binary files /dev/null and b/user-guide/C/img/sidebar.png differ diff --git a/user-guide/C/img/viewmenu.png b/user-guide/C/img/viewmenu.png new file mode 100644 index 000000000..0ec4a5894 Binary files /dev/null and b/user-guide/C/img/viewmenu.png differ diff --git a/user-guide/C/nautilus-C.omf b/user-guide/C/nautilus-C.omf new file mode 100644 index 000000000..eecff047c --- /dev/null +++ b/user-guide/C/nautilus-C.omf @@ -0,0 +1,14 @@ + + + + + The Nautilus User Guide + + + GNOME|Core Desktop + + + + + + diff --git a/user-guide/C/sgml/.cvsignore b/user-guide/C/sgml/.cvsignore new file mode 100644 index 000000000..e4e5f6c8b --- /dev/null +++ b/user-guide/C/sgml/.cvsignore @@ -0,0 +1 @@ +*~ \ No newline at end of file diff --git a/user-guide/C/sgml/chapter-1.sgml b/user-guide/C/sgml/chapter-1.sgml new file mode 100644 index 000000000..a512d2fba --- /dev/null +++ b/user-guide/C/sgml/chapter-1.sgml @@ -0,0 +1,995 @@ + + File Management + + + + This chapter presents the basic elements of the + Nautilus file manager, and its basic file functions + and features. Nautilus is designed to make file + management transparent and intuitive-and, in + the process, more productive. + + + + Chapter One is presented in five sections: + + + + Launching Nautilus + + + + Nautilus Elements + + + + Navigating and Viewing Your System + + + + Navigating the Network + + + + Manipulating Files + + + + + + + + + + Launching Nautilus + + + Nautilus can be launched from three locations: + from the GNOME main menu, where the Nautilus + menu item can be found under Applications; from + the GNOME desktop itself; or from the Panel. + + +
        + Nautilus Icon + +
        + + + If you wish to put the Nautilus icon (Figure 1), on + your desktop, select the Nautilus menu item and, + holding down the left mouse button, drag it to the + desktop. + + + + Probably the easiest way to launch Nautilus is + from the GNOME panel (Figure 2). To place the + icon there, drag the menu item, as above, to an + empty space on the panel at the bottom of the + screen. This method has the advantage of speed: + the panel is nearly always present, and is at most + only a click away. The icon itself needs only one + click to launch Nautilus. + + +
        + The Nautilus Icon on the Panel, between Netscape and the Pager + +
        + + + To launch Nautilus, click once on the menu item, + or panel icon, or twice on the desktop icon. + + +
        + + + Nautilus Elements + + + The major elements of the Nautilus file manager + include, in the upper part, the menu bar, tool bar + and location bar, and below, the sidebar and the + main window (Figure 3). + + + + The menu bar is used to access the pull-down + menus, which are the most complete source of + Nautilus tools and features. The tool bar provides + quick access to Nautilus most common + navigation and search tools, and Eazel Services. + The location bar displays system directory + location, LAN location, and Internet location- + depending on where Nautilus is looking at the + given moment. + + + + The main window is the main viewing area for the + systems directories and files, as well as the area + where directories and files are generally manipu- + lated. It is capable of showing files in several + formats, and includes file information such as + size, type, and date last modified. + + +
        + Main Nautilus Elements + +
        + + + The sidebar provides a tree view of directories + and sub-directories, as well as a history view + (recently viewed files and directories), and a + variety of Linux help documents. + + +
        + + + Navigating and Viewing The System + + + + Nautilus offers several methods to navigate the + system. Typing a directory address into the + location bar will point Nautilus toward that + location. The directional arrows on the tool bar + provide a simpler method to navigate back, + forward, and up through the system: they function + exactly as in a browser. Clicking on a directory + icon in the main window will open that directory. + Finally, clicking the collapsible branches of the + sidebars tree view allows the user to graphically + view and navigate the directory tree. + + + + The file manager minimizes the necessity of + opening applications by identifying many file + types graphically. Viewer components allow + several common document types to be displayed + without launching a separate application, and a + zoom feature provides one-click zooming in and + out in the main window. Sound files in certain + common formats can even be previewed by + simply passing the mouse over the file icon. + + + + The Initial Screen and Hardware Overview + + + The first screen to appear (Figure 4), shows the + contents of your home directory (note: the first screen + will be the Nautilus sub-directory if the Beginner mode was + selected). In this example, + the user has logged in under their own name- + John-so the home directory is /home/john. + Linux follows the UNIX convention for home + directories: if the user had logged in as Susan, the + home directory would be /home/susan; when + logged in as the root user, the home directory is root. + + + + The file manager identifies this directory in two + ways: as a traditional command line directory + address in the location bar, and as a captioned + folder icon in the sidebar. + + +
        + The Start Screen + +
        + + + Among the contents of the screen are a Nautilus + folder. This folder, when clicked, takes the user to + /home/john/Nautilus, Figure 5. Among the + contents of the folder are: a small HTML file + containing information about Nautilus; a services + icon which, when double-clicked, takes you + directly to Eazel Services (covered in Chapter + Three), and a computer icon which leads to a + Hardware Overview of your system, Figure 6. + + +
        + The Contents of /home/john/Nautilus, with the Computer and + Services Icons. + +
        + + + The hardware overview shows the details of the + computers central processor unit, including the + manufacturer, the model, the calculated speed in + MHz and the cache size. It also shows the amount + of system RAM, and the models of the hard + drive(s) and CD player. + + +
        + Hardware Overview, Showing an AMD Processor and 55MB of RAM + +
        + +
        + + + Using the Navigation, Refresh and Home Buttons + + + The navigation buttons on the left side of the tool + bar-Back, Forward, Up, Refresh and Home-are + used in a similar way to the navigation buttons on + a web browser (Figure 7). + + +
        + Navigation Arrows on the Tool Bar + +
        + + + The three left-most buttons allow navigation + through the file system by both time and + direction. + + + + The back and forward buttons allow the user to + revisit directories and files which the user has + already accessed during the current session. This + is navigation through time. The previous example + illustrates this: clicking on the back button from + the hardware overview screen will take the user + back to the /home/john screen, but once there, + the back button will be dimmed out: there is no + further back in time to go in this session. + + + + Similarly, clicking the forward button at this point + would take the user once again to the /home/ + john/Nautilus screen. + + + + The up button navigates upward through the + directory hierarchy. This is navigation by + direction. As an example, in the previous section + it is impossible-solely with the back button-to + go up through the file system further than /home/ + john. However, by clicking the up button, the user + can navigate first to /home, and then all the way + to /. + + + + Clicking the refresh button refreshes the view of + the current directory. + + + + The home button will always take the user to the + current sessions home directory. If the user has + logged on as root, then the home button, when + clicked, will open /root. If the user has logged on + as Laura, the directory opened will be /home/ + laura. Note: if the user is running in Beginner mode, + clicking the home button will open the Nautilus sub-directory. + This is, as are so many features in + Nautilus, customizable-see Chapter Two. + + +
        + + + Viewing as Icons, or as a List + + + Although directories and files are by default + viewed, in the main window, as icons, there is + some advantage to viewing them as a list. At a + normal magnification level, more information will + be displayed in list view, such as the files type + and modification date. To change the view style, + click on the View as Icons button, to the bottom-right + of the tool bar (Figure 8), and choose List. + + +
        + View as Icons Button + +
        + + + The list view still includes representative icons, + but the extra space used by the extra description + means the icons must be minimized. The Date + Modified column is particularly clear, with + descriptive terms used where the latest modifi- + cation of the file or directory is within the last + week (Figure 9). + + + +
        + List View, with Descriptive Dates under Date Modified + +
        + + +
        + + + + Using Tree View in the Sidebar + + + Tree view refers to a collapsible list of directories, + sub-directories and files. In Nautilus, it is + available in the sidebar. The advantage of tree + view is that it allows the user to clearly observe + the directory structure at a glance, thus simplifying + directory and file administration. + + + + To activate tree view, click the Tree tab at the + bottom of the sidebar screen. At first, the tree + may be collapsed, showing a single folder (Figure + 10). + + +
        + Collapsed Tree View at Root + +
        + + + To expand the directory structure, click once on + the right arrow pointing toward the folder. The + arrow will immediately point down, and the root + directories appear in the sidebar. Clicking any + sub-directory arrow will expand that sub- + directory, but not automatically expand the view + in the main window. Notice in Figure 11 that + although the tree in the sidebar is expanded to /T/ + ARCHIVE/Redhat/ETC, the main window and + the location bar are still showing the folders + within /home/john. + + + + (Also notice that, when necessary, vertical and + horizontal scroll bars appear automatically on the + sidebar panels). + + +
        + Different Views and Different Directories in Different Panels: Tree + View of /T/ARCHIVE/Redhat/ETC on the Left, Icon View of /home/john + on the Right. + +
        + + + To synchronize the displays-that is, to display + the contents of the same directory in both the + sidebar and the main window-simply click on + the desired folder icon in the sidebars tree view + (Figure 12). In this illustration, the user has + clicked on the icon representing the directory + /demo in the sidebar. Both the location bar and + the main window now reflect this location, with + the main window displaying the contents of the + demo directory in icon view. + + +
        + Different Views but Identical Directories: Tree View of /demo on + the Left, Icon View of /demo on the Right. + +
        + + + Exploring the directory tree within the sidebar + alone is usually faster than exploring it within the + main window. To expand directories without + updating the main window, click on the small + right arrows in tree view. In the example shown in + Figure 13, the /etc directory has been expanded, + as has the /X11 subdirectory. Beneath that are + several more subdirectories, and the XF86Config + file, which configures the X server. + + +
        + Expanded Directories in Tree View + +
        + + + There may be times when the directory tree is so + expanded, the user may lose sight of the upper + branches. In such a situation, the user can either + scroll with the horizontal scroll bar at the bottom + of the sidebar, or, by holding down the left mouse + button, enlarge the sidebar by dragging its right- + hand edge into the main window area. + + +
        + + + + Zooming in the Main Window + + + In a screen crowded with directory and file icons, + the user may wish to zoom in to confirm a file + name or type. The zoom feature enables this + within the main window. + + + + Figure 14 is an example of a screen crowded with + icons; it is the doc sub-directory containing the + XFree86 server documentation for various + graphics cards. + + + +
        + A Cluttered Main Window + +
        + + + Somewhere in the window is the README file + for the Chips & Technology graphics card. To use + the zoom feature to find this more easily, the user + simply clicks on the + sign of the zoom control + to the right of the location bar (Figure 15). + + + +
        + The Zoom Control + +
        + + + The result-shown in Figure 16, after two clicks + on the + sign, bringing magnification up to + 150%-is a far more easily read display, with the + various graphics card types clearly identifiable. + The Chips & Technology README file is on the + left. This example also shows how greater magnification + leads to more file and directory information displayed. + + + +
        + The View Enlarged to 150% + +
        + + + There may be times, especially on computers with + large displays, when, instead of using the vertical + scroll bar to find a file or directory, it may be + faster to zoom out, and view a larger area. To do + this, click on the minus sign to the left of the plus + sign. + + +
        + + + Viewing and Opening Files Within Nautilus + + + Certain common file types can be identified, read, + or, in the case of music files, heard, from within + Nautilus, without having to open the files application. + + + + Graphics files of many common types are represented as thumbnails--realistic iconic representations of their content. To inspect them more closely, without opening their related application, + the user can enlarge them using the zoom feature. + + + + Other types of files use different viewing + methods. Many text files can be read just by + clicking on them once in the main window. This is + both faster than opening up a separate console, or + application, and it also uses fewer system + resources. Figure 17 shows an example using the + README.chips file. + + +
        + Displaying a README Text File in the Main Window + +
        + + + Common types of music files can be heard via + your computers sound system by simply hovering + over the files icon with the mouse. For more + control, the view button to the right of the + location bar can be set to View as Music. The + main window will display the music files only, by + track, title, artist, bitrate and time, and also show + a button-activated music player (Figure 18). + + +
        + Music Player and an MP3 File + +
        + + + Table 1 lists file types that can be viewed, or + listened to, within Nautilus, without the necessity + of opening their normal applications. + + + + + + + + View + File Types + + + + + Icon/entry + Files and Folders + + + + + List + Files and Folders + + + + + Music + MP3 + + + + + Web Page + HTML, including MAN pages, info pages and DocBook SGML + + + + + Text + ASCII Text Files and HTML source + + + + + Image + JPEG, PNG, etc. + + + + + Package + RPM Packages + + + + +
        + +
        + + + Launching Applications within Nautilus + + + Files can be opened, edited, and saved by + launching their applications from within Nautilus. + This is accomplished by positioning the mouse + over the file, and clicking the right button. In the + menu that appears, clicking on Open With + brings up a sub-menu of application choices, from + which the user can choose. Figure 19 shows an + example, where a graphics file has been selected + and opened with The Gimp. + + + +
        + Opening a Graphic File by Launching its Application from within + Nautilus + +
        + +
        + +
        + + + + Navigating the Network + + + Nautilus has full network capability, both on the + LAN and on the Internet. It can connect to FTP + and web servers, local and remote, and to + mounted Samba shares. + + + + Nautilus unique design includes elements of a + web browser as well as a traditional file manager. + As a result, Nautilus can browse the web, and + also graphically browse the machines of a typical + mixed corporate LAN running a combination of + Windows, Linux and UNIX machines. + + + + Nautilus primary methods of connection are + shown in Figure 20. + + +
        + Methods of Connection in a Mixed Environment + +
        + + + Navigating the LAN via FTP + + + Nautilus connects to a mixed LAN via local FTP + and mounted Samba shares. + + + + To connect to a local Linux or UNIX FTP server, + type in the complete host name of that + machine in the location bar. As an example, to + connect to a machine called toshiba.jpl, the user + would type: + +ftp://toshiba.jpl + + and hit Enter. In Figure 21, the user has logged in + anonymously to the /home/ftp directory of + toshiba.jpl. + + + +
        + FTP login to a Linux Machine on the LAN + +
        + + + In this example, red emblems signifying read and + write protected folders appear in the main + windows. This confirms the anonymous login. An + attempt to view the contents of a read protected + folder, for example, /bin, results in the screen + shown in Figure 22. + + + +
        + Inadequate Permissions + +
        + +
        + + + Navigating the LAN via Samba + + + To connect to a Windows machine on the LAN, + the user must first be running Samba and have + configured the Windows machine, and must + finally have mounted the Samba mountpoint on + the host machine. + + + + Once configured, typing in the mountpoint in the + location bar reveals the directories and files on + the Windows machine. In the example in Figure + 23, the user has navigated to the /samba + directory on the Windows machine accessed + through the HP mountpoint. + + + +
        + Accessing a Windows Machine on a Mixed LAN, via a Samba + Mountpoint + +
        + +
        + + + Navigating the Internet + + + Nautilus connects to the Internet in the same way + as a web browser. Both FTP sites and web sites + are accessed by simply typing the URL into the + location bar. Figure 24 gives an illustration, the + users having connected to www.cnn.com. + + + +
        + Nautilus as Web Browser + +
        + +
        + + + + The Sidebar History and Bookmarks + + + When viewing the web, the navigation tools on + the tool bar function as they do on any browser. In + addition, both the History tab at the bottom of the + sidebar, and the Go drop-down menu, provide a + session history of local and remote accesses + (Figure 25). + + + +
        + The Sidebar History and Go Menu + +
        + + + Bookmarks can also lead to local and remote + machines, Samba shares and web sites. They are + found by clicking on Bookmarks on the menu bar, + where the menu items for adding and editing + bookmarks are also located. + + +
        +
        + + + Manipulating Files + + Manipulating directories and files is one of the + most basic of all file manager features. Nautilus + can be used to graphically move, copy, duplicate, + rename and delete files, and to create new and + rename existing directories. It can also be used as + a search engine, on the local machine, the LAN, + and the web. Finally, in Nautilus the user can + graphically change a files permissions-a great + advance over the command line CHMOD method. + + + + Moving and Copying Files + + + These two file management activities are + performed by opening two Nautilus windows, one + for the source location and one for the destination. + + + + Open a new Nautilus window by clicking on File + on the menu bar, and choosing the first menu + item: New Window (Figure 26). + + + +
        + Opening a New Window in Nautilus + +
        + + + + To move a file, simply drag it from the source + window to the destination window, with the left + mouse button depressed. For options, drag the file + with the right mouse button: this gives the choices + of either moving or copying the file, or of + creating a link. + + + + An example of a successful file copy operation is + shown in Figure 27. The pluck.wav file has been + copied from the /home/john directory (the + source), in the lower-right Nautilus window, to + the /home/john/music directory, in the upper-left + Nautilus window. + + + +
        + The Successful Copy of a File from /home/john to /home/john/ + music + +
        + +
        + + + Duplicating, Renaming and Deleting Files, and Creating + Directories + + + Duplicating a file is accomplished by either + clicking on the file with the right mouse button, + and selecting Duplicate, or by first selecting the + file and then selecting Duplicate from the File + pull-down menu on the menu bar (Figure 28). + Notice in the illustration that the duplicate file is + identified by the tag (copy) next to the file name. + + + +
        + Successful Duplication of the testement.jpg File + +
        + + + + Renaming a file is accomplished in a similar + manner. Choose the same menu by either means, + and click on Rename. Then simply type the new + name into the file caption. + + + + Deleting a file, in Nautilus, means moving it to + the trash folder which Nautilus creates upon + installation. A file may be deleted either by + dragging and dropping it into the trash folder, or + by selecting the file, opening the same menu as + above, and choosing Move to Trash. + + + + Note that moving a file to the trash folder does + not delete it from the system. It is still available, + and can still be retrieved, in case the user has + trashed it mistakenly. Permanent file deletion is + accomplished by clicking the Empty Trash item in + the File menu. + + + + A new subdirectory can be created (and/or + renamed), anywhere in the directory tree, by + selecting the parent directory and then pulling + down the File menu from the menu bar. Click on + New Folder, and the new subdirectory is created. + Just type in the name and hit the Enter key. + + +
        + + + File Find and Web Search + + + Nautilus' two search features, found on the tool + bar, enable the user both to find files on the local + machine and on mounted Samba shares, and to + locate information on the web. + + + + To search for a file either locally or on a Samba + LAN, click the Find button on the tool bar, and + type in the name of the desired file. Then click + the Find Them button. + + + + This is the simplest form of file search, but by + clicking the More Options button-several + times-no fewer than seven search variables + become available. Each variable in turn has its + own set of constraints. In this way it is possible to + narrow down, or refine a search very precisely + (Figure 29). + + +
        + File Searching Expanded to the Maximum Degree Possible + +
        + + + To search for information on the web, click on + the Web Search button on the tool bar. Nautilus is + transformed into a web browser, and Google is + presented in the main window (Figure 30). + + + +
        + The Google Search Engine, Launched from within Nautilus. + +
        + +
        + + + Changing File Permissions + + + To change a file's permissions, click with the + right mouse button on the file, and choose Show + Properties from the menu. The dialog box which + appears has three tabs. Choose the one labelled: + Permissions (Figure 31). Both the file's owner + and group settings can be changed, as can the + read, write, and execute permissions for each setting. + The text view and numeric view of the result + are automatically updated at the bottom of the box. + + +
        + Changing File Permissions Graphically + +
        + +
        + + + Getting Help + + + This Users Manual is available from both the + Help item on the menu bar, and from the Help + Contents tab at the bottom of the sidebar. + + + + In addition to this manual, the Help Contents tab + provides easy access to many other Linux help + files in several different formats. + + + + + +
        + + +
        + diff --git a/user-guide/C/sgml/chapter-2.sgml b/user-guide/C/sgml/chapter-2.sgml new file mode 100644 index 000000000..d073b3157 --- /dev/null +++ b/user-guide/C/sgml/chapter-2.sgml @@ -0,0 +1,475 @@ + + Customizing the Nautilus Interface + + + + Nautilus has been designed to be highly configurable, + both to suit the desire of users for customized decor, + and to suit the needs of users at + different levels of expertise. + + + + Chapter two is presented in four sections: + + + + Choosing and Customizing User Settings + + + + Customizing File Layout and Icon Appearance + + + + Configuring Applications + + + + Customizing Nautilus Appearance + + + + + + + + Choosing and Customizing User Settings + + + User settings + control performance and design variables, as well + as certain appearance variables that are related + more toward system function than simple decor. + + + + There are three levels of user settings to choose + from: beginner, intermediate, and advanced; the + level of information displayed increasing with + each step. In addition, the two higher-level + settings are both highly customizable. + + + + Accessing and Choosing User Settings + + + To access user settings, click the colored icon on + the far right of the menu bar (Figure 1). + + + +
        + Accessing User Settings + +
        + + + The drop-down menu presents the three levels of + choices, and the choice of customizing the inter- + mediate and advanced levels. + + + + Figure 2 and 3 present the most obvious of the + differences between the default beginner or intermediate, + and the advanced display settings. In + both cases Nautilus is looking at the /home/john + directory. Home directories typically have a + number of hidden files. In Figure 2, at the + beginner (or intermediate) setting, only four + directories are visible. In Figure 3, at the + advanced setting, an additional 15 hidden directories + are visible. + + + + +
        + Four Directories Visible at the Intermediate User Setting + +
        + +
        + The Same Directory at the Advanced User Setting, Showing Fifteen + Hidden Files + +
        + +
        + + + Editing User Settings + + + The Edit Settings menu item, which is used to edit + the intermediate and advanced user levels, + presents the same choices for both. The choices + are listed under six headings: + + + + + Folder Views + + + + Sidebar Panels + + + + Appearance + + + + Speed Trade-offs + + + + Search + + + + Navigation + + + + + + + Figure 4 shows the choices in the first heading: + Folder Views. Here the user can choose to have + Nautilus open a file in a separate window, activate + items with a single or a double click, and display + hidden and backup files. + + +
        + Customizing Directory Views + +
        + + + The next heading down the list, Sidebar Panels, + lets the user choose which panels should appear in + the sidebar. Appearance, the third heading, allows + the user to choose between smoother (but + slower) graphics, or rough edges and speed. It + also allows a choice of fonts with which to + display file names and other information. + + + + Search (Figure 5), lets users configure the file + manager to search for files by text only, or also by + their properties (slower), to optionally do slow, + complete searches, and to change, if desired, + Nautilus default web search location. + + + + The Navigation heading allows the user to change + the local machines default home location, and + also allows the user to setup an HTTP proxy. + + +
        + Customizing Search Features: Complexity, Speed and Location + +
        + +
        +
        + + + Customizing File Layout and Icon Appearance + + + The layout of files in the main window can be a + major factor in the ease and speed of file identification. + The default method of laying out files, + alphabetically according to file names, is appropriate + under certain conditions, i.e.: when the + files in a directory are all of a similar type, with + well designed names following a similar pattern. + However, file identification using this layout can + be tedious and difficult in a directory holding + large numbers of files of disparate types, and + without an obvious naming convention. + + + + Choices in File Layout + + + Nautilus addresses this issue by giving the user + several choices of file layout. Figure 6 shows the + Lay out items pull-down sub-menu (under View), the + range of layout choices available, and a directory + with several different file types arranged alpha- + betically. + + + +
        + Layout Choices, and an Unoptimized Alphabetical Layout + +
        + + In this example, a more sensible layout would be + by type. The result of this choice of layout + is shown in Figure 7. + + +
        + A More Logical Layout, by Type + +
        + + + Once a method of layout is chosen, the presentation + can be further optimized with the Use + Tighter Layout and Reversed Order options. + + +
        + + + Customizing Icon Captions + + + Icon captions and appearance can also be + adjusted. A file caption must always start with the + file name; however, both the type of information + and the order of information displayed beneath + file names can be manipulated. + + + + The Icon Captions menu item is found under Edit + on the tool bar. When clicked, it displays the Icon + Captions menu, Figure 8. + + + +
        + Determining the Order of Icon Information + +
        + + + + The three menu-buttons reflect the order of information + displayed in the icon caption. Each button + displays identical information, from file size to + MIME type, ten types of information in all. The + type chosen by the top button will appear first, + beneath the file name, the type chosen by the + second will appear next, etc. Figure 9 shows an + enlarged file image (to 400%), with the captioned + information reflecting the order in the accompanying + Icon Caption sub-menu. + + + +
        + Size, Date Modified, Type + +
        + + +
        + + + Differentiating a Directory with a Customized Icon + + + The actual appearance of an icon can be replaced + by another useful if, for instance, you want to + identify a certain directory by the type of files it + contains. The method used is to drag and drop the + icon in the main window which you want for a + replacement, to the icon in the sidebar that you + want to replace. An example can be seen in Figure + 10, where an icon representing a portrait of + Beethoven has been used to identify the music + directory. + + +
        + Identifying a Folder with Another Files Icon + +
        + +
        + + + Adding Emblems + + + Icon appearance can also be enhanced by the use + of emblems. Click on a file with the right mouse + button, and choose Show Properties. In the + resulting properties window, click the middle tab, + Emblems. Any and all of the emblems may be + added to a files iconic appearance. In the + example shown in Figure 11, the Draft emblem + has been added to a text file. + + +
        + Adding an Emblem to an Icon + +
        + +
        +
        + + + Configuring Applications + + + As we have seen in Chapter One, a file can easily + be opened by its application from within Nautilus, + relieving the user of the tedious extra steps of + first starting the application, then finding the + desired file. Nautilus does this by assigning + certain adefault applications to certain file types. + This too is customizable by the user. + + + + Clicking on a file--in the example below, a JPEG + file--with the right mouse button, brings up a + menu with the item, Open With. Moving the + mouse pointer to this opens a sub-menu (Figure 12). + + +
        + The Open With Sub-Menu + +
        + + + + In this example, Nautilus offers to open the file + with its default image viewer, or the user can + choose another viewer or application. + + + + Suppose the user wanted to customize Nautilus to + always open JPEG files with The Gimp (which is + both a viewer and an editor). In this case, the user + would click Other Application. + + + + The Open with Other window which appears + (Figure 13), shows the user the current application(s) + setup for opening files. + + +
        + Choosing an Application + +
        + + + In Figure 13, The Gimp is present, but is not in + the menu for opening JPEG files. To place it in + the menu and make sure it is used as the default + viewer for JPEG files, click the Modify button, + and choose the second selection (Figure 14). + + +
        + Modifying the Default Application for Opening a File + +
        + + + A deeper level of configuration can be obtained + by clicking the Go There button on the Open with + Other menu. That opens the GNOME Control + Center to the File Types and Programs screen. For + an explanation of how to associate programs with + certain file types, see the GNOME Users Guide. + + +
        + + + Customizing Nautilus Appearance + + + Many users are not content to stare at a default + desktop decor: they want to customize it + according to taste. For this, a wide range of + backgrounds, colors, emblems and themes is + available, and, should the user wish, they can add + their own. + + + + Backgrounds, Colors and Emblems + + + To change the desktop decor, click on Edit on the + menu bar, and choose Customize. The Nautilus + Customization Options window appears. + + + + Each background, color, and emblem can be + applied by simply dragging it to the desire + window or file with the mouse. In the example in + Figure 15, the satin background has been applied + to the main window, while the color ruby has been + dragged and dropped into the sidebar. Finally, the + file pluck.wav has been embelished with a + green, heart-shaped Favorite emblem. + + + +
        + Color and Textures to the Users Taste + +
        + +
        + + + Themes + + + The simplest way to change an overall look, is + to change the theme. Several themes are + available; clicking on Change Appearance in the + Edit menu brings up the Nautilus Theme Selector. + + + + Selecting one of the four different themes applies + the new theme while the selector window is still + open, allowing the user to preview the new + design. In Figure 16, the Eazel theme has been + selected, changing backgrounds on the sidebar + and the main window, and also the icons on the + tool bar. + + + +
        + The <emphasis>Eazel</emphasis> Theme, with the Nautilus Theme Selector + Window + +
        + + +
        + +
        + +
        diff --git a/user-guide/C/sgml/chapter-3.sgml b/user-guide/C/sgml/chapter-3.sgml new file mode 100644 index 000000000..8171290fc --- /dev/null +++ b/user-guide/C/sgml/chapter-3.sgml @@ -0,0 +1,226 @@ + + Nautilus and Eazel Services + + + + Eazel Services are an Internet-based suite of tools + designed to simplify system management in + Linux. Nautilus and Eazel Services work together: + one complements the other. This chapter presents + a description of Eazel Services available for + the preview release two. + + + + For this release, Services will include: + + + + + Eazel Software Catalog + + + + Eazel Software Installer + + + + Eazel Online Storage + + + + + + + + Accessing Services + + + There are several ways to access Eazel Services. + When starting Nautilus for the first time, the user + is asked if they wish to learn about, sign up, or + log on to Services (Figure 1). + + + +
        + Signing Up for Eazel Services Upon Starting Nautilus + +
        + + + + On a routine basis, Services can be reached by + simply clicking the Services icon on the Nautilus + toolbar. Alternatively, they can be reached + through any web browser, from www.eazel.com. + + +
        + + + Registration and Login + + + Registration--for this preview release--is not required for the + software catalog, but is for online storage. + + Registration is the same from Nautilus or from any browser. The + screen is divided into three sections: the required fields to open + an account (Figure 2); the optional personal profile section, and + the optional computing environment section. + + +
        + Required Account Information in Registration + +
        + + + + The user completes the process by activating their account with the + instructions sent in a validation e-mail. The instructions are sent + almost instantaneously. + + + + Logging in can be accomplished either from the greeting page which + follows account validation, from clicking services in Nautilus, or + from the Eazel website, www.eazel.com. + + + + The Welcome screen, Figure 3, is organized into three basic sections. + The top section has links for reaching the Eazel support page, for + changing user preferences, and for logging out. + + + + The support page has a number of FAQs and other help features. The + preferences link allows the user to change or update personal and + computer preferences, and even passwords. + + +
        + The Welcome Screen, Showing Online Storage and Software Catalog + + +
        + + + + The second section down is devoted to Online Storage, and has links to + the users private and public storage folder. + + + + The third section allows the user to either browse or search the Eazel + software catalog. + + + + +
        + + + Eazel Software Catalog + + + The Software Catalog is an on-line catalog of + Linux software, both Open Source and commercial, that should + install and work properly--in this preview release--on a Redhat 6.0 + to 6.2 system. + + + + The software is in RPM format. + + + + The user is able to select software by either browsing the online + catalog by category, or by searching for a specific package with a + keyword. Both catalog browsing and searching can be further refined + by specifying a Redhat distribution version. + + + + When browsing, the user is presented with thirteen different categories, from Communications to Text Editors. Selecting the first, for example, opens a separate screen dedicated to communications software (Figure 4), with a list of package titles and short summaries. + + +
        + Package Titles and Summaries + +
        + + + + Selecting the package title takes the user to a further screen, giving + more complete information, including the version and release number, + the source and vendor, a more complete description, package size, etc. + + + + Pressing the download button sets up a download of the selected package + --in RPM format--to the users home directory. + + +
        + + + Eazel Software Installer + + + The Software Installer, which functions when accessing Services through Nautilus, takes into account your distribution, + version, and current system, and installs not only + the chosen programs, but also automatically + installs the necessary dependencies. + + + + This is all accomplished with the help of a client- + side inventory program built into Nautilus-- + making Nautilus an integral part of Eazel + Services. + + + + + + Eazel Online Storage + + + Each user is provided initially with 25MB of free storage space, in two folders, private and public. + + + + Online Storage is more than just a one-directory + file repository. Users can create online folders-- + even entire directory trees. They can upload and + download files, and Nautilus users can copy or + move entire folders from their own system to + Eazel Online Storage, and back again. + + + + Clicking on either the Private or Public folder icon takes the user to the Online Storage screen (Figure 5). + + +
        + The Online Storage Screen + +
        + + + From here, the user can see immediately which files they have in + storage, and how much space they have left available. They may also + choose to create a sub-folder, to upload or download files, or to + copy, move, or delete selected items. + + + +
        + + +
        diff --git a/user-guide/C/sgml/fdl.sgml b/user-guide/C/sgml/fdl.sgml new file mode 100644 index 000000000..43fcdf201 --- /dev/null +++ b/user-guide/C/sgml/fdl.sgml @@ -0,0 +1,647 @@ + + + + GNU Free Documentation License + + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or + other written document free in the sense of + freedom: to assure everyone the effective freedom to copy and + redistribute it, with or without modifying it, either + commercially or noncommercially. Secondarily, this License + preserves for the author and publisher a way to get credit for + their work, while not being considered responsible for + modifications made by others. + + + + This License is a kind of copyleft, which means + that derivative works of the document must themselves be free in + the same sense. It complements the GNU General Public License, + which is a copyleft license designed for free software. + + + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same + freedoms that the software does. But this License is not limited + to software manuals; it can be used for any textual work, + regardless of subject matter or whether it is published as a + printed book. We recommend this License principally for works + whose purpose is instruction or reference. + + + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work that contains a + notice placed by the copyright holder saying it can be + distributed under the terms of this License. The + Document, below, refers to any such manual or + work. Any member of the public is a licensee, and is addressed + as you. + + + + A Modified Version of the Document means any work + containing the Document or a portion of it, either copied + verbatim, or with modifications and/or translated into another + language. + + + + A Secondary Section is a named appendix or a + front-matter section of the Document that deals exclusively + with the relationship of the publishers or authors of the + Document to the Document's overall subject (or to related + matters) and contains nothing that could fall directly within + that overall subject. (For example, if the Document is in part a + textbook of mathematics, a Secondary Section may not explain any + mathematics.) The relationship could be a matter of historical + connection with the subject or with related matters, or of + legal, commercial, philosophical, ethical or political position + regarding them. + + + + The Invariant Sections are certain Secondary Sections whose titles + are designated, as being those of Invariant Sections, in the + notice that says that the Document is released under this + License. + + + + The Cover Texts are certain short passages of + text that are listed, as Front-Cover Texts or Back-Cover Texts, + in the notice that says that the Document is released under this + License. + + + + A Transparent copy of the Document means a machine-readable + copy, represented in a format whose specification is available + to the general public, whose contents can be viewed and edited + directly and straightforwardly with generic text editors or (for + images composed of pixels) generic paint programs or (for + drawings) some widely available drawing editor, and that is + suitable for input to text formatters or for automatic + translation to a variety of formats suitable for input to text + formatters. A copy made in an otherwise Transparent file format + whose markup has been designed to thwart or discourage + subsequent modification by readers is not Transparent. A copy + that is not Transparent is called + Opaque. + + + + Examples of suitable formats for Transparent copies include + plain ASCII without markup, Texinfo input format, LaTeX input + format, SGML or XML using a publicly available DTD, and + standard-conforming simple HTML designed for human + modification. Opaque formats include PostScript, PDF, + proprietary formats that can be read and edited only by + proprietary word processors, SGML or XML for which the DTD + and/or processing tools are not generally available, and the + machine-generated HTML produced by some word processors for + output purposes only. + + + + The Title Page means, for a printed book, the + title page itself, plus such following pages as are needed to + hold, legibly, the material this License requires to appear in + the title page. For works in formats which do not have any title + page as such, Title Page means the text near the + most prominent appearance of the work's title, preceding the + beginning of the body of the text. + + + + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that + you add no other conditions whatsoever to those of this + License. You may not use technical measures to obstruct or + control the reading or further copying of the copies you make or + distribute. However, you may accept compensation in exchange for + copies. If you distribute a large enough number of copies you + must also follow the conditions in section 3. + + + + You may also lend copies, under the same conditions stated + above, and you may publicly display copies. + + + + + 3. COPYING IN QUANTITY + + If you publish printed copies of the Document numbering more than 100, + and the Document's license notice requires Cover Texts, you must enclose + the copies in covers that carry, clearly and legibly, all these + Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also + clearly and legibly identify you as the publisher of these + copies. The front cover must present the full title with all + words of the title equally prominent and visible. You may add + other material on the covers in addition. Copying with changes + limited to the covers, as long as they preserve the title of the + Document and satisfy these + conditions, can be treated as verbatim copying in other + respects. + + + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + + + If you publish or distribute Opaque copies of the Document numbering more than 100, + you must either include a machine-readable Transparent copy along with + each Opaque copy, or state in or with each Opaque copy a + publicly-accessible computer-network location containing a + complete Transparent copy of the Document, free of added + material, which the general network-using public has access to + download anonymously at no charge using public-standard network + protocols. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of Opaque + copies in quantity, to ensure that this Transparent copy will + remain thus accessible at the stated location until at least one + year after the last time you distribute an Opaque copy (directly + or through your agents or retailers) of that edition to the + public. + + + + It is requested, but not required, that you contact the authors + of the Document well before + redistributing any large number of copies, to give them a chance + to provide you with an updated version of the Document. + + + + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document under the conditions of + sections 2 and 3 above, provided that you release + the Modified Version under precisely this License, with the + Modified Version filling the role of the Document, thus + licensing distribution and modification of the Modified Version + to whoever possesses a copy of it. In addition, you must do + these things in the Modified Version: + + + + + + A + + Use in the Title + Page (and on the covers, if any) a title distinct + from that of the Document, and from those of + previous versions (which should, if there were any, be + listed in the History section of the Document). You may + use the same title as a previous version if the original + publisher of that version gives permission. + + + + + + + B + + List on the Title + Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the + Modified Version, + together with at least five of the principal authors of + the Document (all of + its principal authors, if it has less than five). + + + + + + + C + + State on the Title + Page the name of the publisher of the Modified Version, as the + publisher. + + + + + + + D + + Preserve all the copyright notices of the Document. + + + + + + + E + + Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + + + + + + F + + Include, immediately after the copyright notices, a + license notice giving the public permission to use the + Modified Version under + the terms of this License, in the form shown in the + Addendum below. + + + + + + + G + + Preserve in that license notice the full lists of Invariant Sections and + required Cover + Texts given in the Document's license notice. + + + + + + + H + + Include an unaltered copy of this License. + + + + + + + I + + Preserve the section entitled History, and + its title, and add to it an item stating at least the + title, year, new authors, and publisher of the Modified Version as given on + the Title Page. If + there is no section entitled History in the + Document, create one + stating the title, year, authors, and publisher of the + Document as given on its Title Page, then add an item + describing the Modified Version as stated in the previous + sentence. + + + + + + + J + + Preserve the network location, if any, given in the Document for public access + to a Transparent + copy of the Document, and likewise the network locations + given in the Document for previous versions it was based + on. These may be placed in the History + section. You may omit a network location for a work that + was published at least four years before the Document + itself, or if the original publisher of the version it + refers to gives permission. + + + + + + + K + + In any section entitled Acknowledgements or + Dedications, preserve the section's title, + and preserve in the section all the substance and tone of + each of the contributor acknowledgements and/or + dedications given therein. + + + + + + + L + + Preserve all the Invariant + Sections of the Document, unaltered in their + text and in their titles. Section numbers or the + equivalent are not considered part of the section titles. + + + + + + + M + + Delete any section entitled + Endorsements. Such a section may not be + included in the Modified + Version. + + + + + + + N + + Do not retitle any existing section as + Endorsements or to conflict in title with + any Invariant + Section. + + + + + + + If the Modified Version + includes new front-matter sections or appendices that qualify as + Secondary Sections and + contain no material copied from the Document, you may at your + option designate some or all of these sections as invariant. To + do this, add their titles to the list of Invariant Sections in the + Modified Version's license notice. These titles must be + distinct from any other section titles. + + + + You may add a section entitled Endorsements, + provided it contains nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + + + You may add a passage of up to five words as a Front-Cover Text, and a passage + of up to 25 words as a Back-Cover Text, to the end of + the list of Cover Texts + in the Modified Version. + Only one passage of Front-Cover Text and one of Back-Cover Text + may be added by (or through arrangements made by) any one + entity. If the Document + already includes a cover text for the same cover, previously + added by you or by arrangement made by the same entity you are + acting on behalf of, you may not add another; but you may + replace the old one, on explicit permission from the previous + publisher that added the old one. + + + + The author(s) and publisher(s) of the Document do not by this License + give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version . + + + + + 5. COMBINING DOCUMENTS + + You may combine the Document + with other documents released under this License, under the + terms defined in section 4 + above for modified versions, provided that you include in the + combination all of the Invariant + Sections of all of the original documents, unmodified, + and list them all as Invariant Sections of your combined work in + its license notice. + + + + The combined work need only contain one copy of this License, + and multiple identical Invariant + Sections may be replaced with a single copy. If there are + multiple Invariant Sections with the same name but different + contents, make the title of each such section unique by adding + at the end of it, in parentheses, the name of the original + author or publisher of that section if known, or else a unique + number. Make the same adjustment to the section titles in the + list of Invariant Sections in the license notice of the combined + work. + + + + In the combination, you must combine any sections entitled + History in the various original documents, + forming one section entitled History; likewise + combine any sections entitled Acknowledgements, + and any sections entitled Dedications. You must + delete all sections entitled Endorsements. + + + + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other documents + released under this License, and replace the individual copies + of this License in the various documents with a single copy that + is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the + documents in all other respects. + + + + You may extract a single document from such a collection, and + dispbibute it individually under this License, provided you + insert a copy of this License into the extracted document, and + follow this License in all other respects regarding verbatim + copying of that document. + + + + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with + other separate and independent documents or works, in or on a + volume of a storage or distribution medium, does not as a whole + count as a Modified Version + of the Document, provided no compilation copyright is claimed + for the compilation. Such a compilation is called an + aggregate, and this License does not apply to the + other self-contained works thus compiled with the Document , on + account of their being thus compiled, if they are not themselves + derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one + quarter of the entire aggregate, the Document's Cover Texts may + be placed on covers that surround only the Document within the + aggregate. Otherwise they must appear on covers around the whole + aggregate. + + + + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with + translations requires special permission from their copyright + holders, but you may include translations of some or all + Invariant Sections in addition to the original versions of these + Invariant Sections. You may include a translation of this + License provided that you also include the original English + version of this License. In case of a disagreement between the + translation and the original English version of this License, + the original English version will prevail. + + + + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document except as expressly + provided for under this License. Any other attempt to copy, + modify, sublicense or distribute the Document is void, and will + automatically terminate your rights under this License. However, + parties who have received copies, or rights, from you under this + License will not have their licenses terminated so long as such + parties remain in full compliance. + + + + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software + Foundation may publish new, revised versions of the GNU + Free Documentation License from time to time. Such new versions + will be similar in spirit to the present version, but may differ + in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. + + + + Each version of the License is given a distinguishing version + number. If the Document + specifies that a particular numbered version of this License + or any later version applies to it, you have the + option of following the terms and conditions either of that + specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If + the Document does not specify a version number of this License, + you may choose any version ever published (not as a draft) by + the Free Software Foundation. + + + + + Addendum + + To use this License in a document you have written, include a copy of + the License in the document and put the following copyright and + license notices just after the title page: + + +
        + + Copyright © YEAR YOUR NAME. + + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License, Version 1.1 or any later version published by the + Free Software Foundation; with the Invariant Sections being LIST + THEIR TITLES, with the Front-Cover Texts being LIST, + and with the Back-Cover + Texts being LIST. A copy of the license is included in + the section entitled GNU Free Documentation + License. + +
        + + + If you have no Invariant + Sections, write with no Invariant Sections + instead of saying which ones are invariant. If you have no + Front-Cover Texts, write + no Front-Cover Texts instead of + Front-Cover Texts being LIST; likewise for Back-Cover Texts. + + + + If your document contains nontrivial examples of program code, + we recommend releasing these examples in parallel under your + choice of free software license, such as the GNU General Public + License, to permit their use in free software. + +
        +
        + + + + + + diff --git a/user-guide/C/sgml/install.sgml b/user-guide/C/sgml/install.sgml new file mode 100644 index 000000000..eec406a21 --- /dev/null +++ b/user-guide/C/sgml/install.sgml @@ -0,0 +1,190 @@ + + Installation + + + + Nautilus will be the default file manager for + GNOME 1.4. So for users of that version of + GNOME, no special Nautilus installation will be + necessary. + + + + For other users, Nautilus can be downloaded from + the Eazel Nautilus website. Instructions for this + follow the system requirements section, below. + + + + System Requirements for Running Nautilus + + + The minimum system requirements for running + the Nautilus preview release two are: + + + + Hardware + + + + + x86 compatible processor (200mHz minimum). + + + + 64MB RAM recommended. + + + + + 60MB hard drive space. + + + + 500MB of additional space, if you have to install GNOME. + + + + + + + + + Software + + + + + + + RedHat Linux 6.2 (others may work, but this is the preview test + platform). + + + + GNOME 1.2 (Components for GNOME will be downloaded by the Eazel + Installer if needed). + + + + Mozilla-5.0-M18-4 (downloaded by the Eazel Installer if needed). + + + + + + + + + + Download and Install Instructions for the Nautilus Preview + Release Two + + First, make sure you have enough hard disk space, + and are running the correct version of Linux, and + of GNOME. + + + + The Eazel site for downloading Nautilus is + http://download.eazel.com. + + + + Once at the site: + + + Fill out the simple registration form. + + + Save the Eazel Installer in your tmp directory. + + + + Open a terminal window, and type: /tmp + + + + Next, type: sh ./nautilus-installer.sh + + + + When prompted, enter your systems root password. + + + + The Nautilus installation wizard will launch. Read the + requirements and click Begin. + + + + + + + When the installation is finished, start Nautilus by + opening the GNOME main menu, opening the + Applications sub-menu, and clicking on the + Nautilus icon. + + + + + Initial Screens + + + When you start Nautilus for the first time, there + are several initial screens. The first is simply a + welcome screen. The second, however, lets you + select your initial user level (Figure 1) + + +
        + Selecting an Initial User Level + +
        + + + The different user levels primarily control the + amount of system and file detail that Nautilus + displays. Check the level you feel is right for you, + and click on the Next button. + + + + The following screen gives you an opportunity to + learn about Eazel Services, to sign up for them + immediately, to login to Services if you are + already a member, or to skip exploring Services at + this time. + + + + Nautilus and Eazel Services are covered in + Chapter Three of this manual. + + +
        + The Nautilus Update Screen + +
        + + + The next screen (Figure 2), offers to automatically + contact Eazel Services to verify your + Internet connection and download the latest + Nautilus updates. Check the appropriate box and + click the Next button. The update procedure is + automatic. + + + + At the final screen click the Finish button to + complete the install. After a moment or two the + Nautilus file manager will start. + + + +
        + +
        diff --git a/user-guide/C/sgml/intro.sgml b/user-guide/C/sgml/intro.sgml new file mode 100644 index 000000000..6d5a84a31 --- /dev/null +++ b/user-guide/C/sgml/intro.sgml @@ -0,0 +1,144 @@ + + Introduction - Nautilus Preview Release Two + + + + Nautilus is the new file manager for GNOME, the + emerging desktop of choice for both Linux and + UNIX. Some of Nautilus features include: + + + + Graphic representation of files, with file icons displaying + actual file content: images, text, music, etc. + + + + A variety of interface customizations, from the practical-- + adjusting the amount of file data displayed according to + user-level--to the decorative: backgrounds, themes and + colors. + + + + Mixed network (Linux and Windows) access, and Internet + browsing, from within Nautilus. + + + + + + + + This manual describes the Nautilus Preview + Release 2. The first production release will ship + with GNOME 1.4 + + + + Manual Organization + + + This manual is a step-by-step guide to Nautilus + features. The organization is: + + + + This Introduction. + + + + An Installation section. + + + + Chapter One, concentrating on fundamental file operations. + + + + Chapter Two, presenting the range of system customization + options available in Nautilus. + + + + Chapter Three, describing how Nautilus is integrated into + Eazel Services, how to use them, and their benefits. + + + + + + + + + + Free Software + + + Like Linux and GNOME, Nautilus is Free Software, a method + of software distribution which encourages innovation, improvement + and timely bug fixes, and to which Eazel, Inc., the Nautilus + maintainer, is committed. + + + + Fundamentally, the General Public License (or + GPL, under which Linux, GNOME and Nautilus + are licensed), insists that an application must always + be accompanied by its source code, that the + code can be freely modified, and that the user (or + purchaser) of software distributed under this license + agrees to in turn distribute their own source + code under the same license, when distributing, or + selling, a modified application. + + + + + It can be seen that distributing software under the + GPL license does not prohibit selling software, + and in fact many companies do sell Linux distributions + and applications. The license does insist + on the free sharing, and distribution, of source + code. And it is this open code distribution + policy which the Free Software movement believes + will eventually result in more innovatory, less + troublesome, and more useful software. + + + + + + Nautilus History + + + Nautilus can trace its Free Software lineage back + to the text-based Midnight Commander file man- + ager (still available on some Linux distributions). + The X Window version followed. Developing + from that base, Eazel has produced in Nautilus a + next-generation GUI that integrates file management, + web browsing, and system management. + + + + + + + + Supported Platforms and Distributions + + + Although initially developed on the Red Hat Linux 6.2 + platform, Nautilus is being written for + cross-platform and multi-version operability in + short, to operate on every platform that GNOME + will operate on. + + + + + + + + diff --git a/user-guide/C/sgml/model.sgml b/user-guide/C/sgml/model.sgml new file mode 100644 index 000000000..d1b05f2a5 --- /dev/null +++ b/user-guide/C/sgml/model.sgml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + +
        + + +
        + + + + + + + + + + + + + + + + + + + +
        + +
        \ No newline at end of file diff --git a/user-guide/C/sgml/nautilus.sgml b/user-guide/C/sgml/nautilus.sgml new file mode 100644 index 000000000..5e680cc1b --- /dev/null +++ b/user-guide/C/sgml/nautilus.sgml @@ -0,0 +1,1086 @@ + + + + + + + Nautilus User's Manual + v1.0 + + + Vera + Horiuchi + + + + vera@eazel.com + + + + + + + + 2001 + Eazel Inc. + + + + + + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation + License, Version 1.1 or any later version + published by the Free Software Foundation with no Invariant Sections, + no Front-Cover Texts, and no Back-Cover Texts. A copy of the license + can be found here. + + + Many of the names used by companies to distinguish their products and + services are claimed as trademarks. Where those names appear in any + GNOME documentation, and those trademarks are made aware to the members + of the GNOME Documentation Project, the names have been printed in caps + or initial caps. + + + + + + This is version 1.0 of the Nautilus User's Manual. + + + + + + + + + + +Introducing Nautilus + +Nautilus is the window to the network user enviroment. It integrates your access to files, applications, media, Internet-based resources, and the Web. + +Nautilus is an open source project developed under the GNU Public License (GPL) and is a core component of the GNOME desktop project. Eazel is a founding member of the GNOME Foundation. + + + +The Nautilus Window + + +
        +The Nautilus Window + +Diagram of Nautilus + + + +
        + + +
        + + + +Adding Nautilus to the Panel + + +Try this +To keep Nautilus easily available, add its icon to the GNOME panel: + + + +Open the GNOME main menu (represented by the footprint icon). +Choose Programs; then choose Applications and select Nautilus. +Drag the Nautilus icon to the GNOME panel. + + + + +
        + + + +What's On Your Computer? + +Nautilus is part of the GNOME desktop environment. It lets you view, copy, move, rename, and delete files and folders. This section explains how to use Nautilus to keep track of folders and files on your own machine, and on the Internet. + + +Viewing Your Home Folder +Navigating Your Computer's Files and Folders +Viewing and Opening Files +Navigating the Internet +Viewing Your Navigation History +Bookmarking Your Favorite Locations + + + + + + +Viewing Your Home Folder + +When you first launch Nautilus, you'll be in your home folder. Three areas of the Nautilus window contain information about your folder: + + +The sidebar panel, which contains a folder icon representing your folder +The right-hand (main) panel, where you see icons representing the items in your folder +The location bar, which contains your folder's path name + + + + + + +Navigating Your Files and Folders + +You can move around in your files and folders using the navigation buttons in the toolbar and the icons in the Nautilus window. + + +Try this + + + +To view your home folder, click the Home button. +To move to the folder that contains your home folder -- that is, to move one folder up in the hierarchy - click the Up button. +To go back, click the Back button. +To view the contents of any folder, double-click its icon (normally a folder icon). +If you think that the contents of a folder have changed while you've been viewing it, click the Refresh button to update the information. + + + + + + + + + +The Tree View + +You can get an overview of all of your computer's files and folders using the Tree view. Many people find it faster to navigate using the Tree rather than selecting and opening folders. + +To see the Tree view, click the Tree tab at the bottom of the sidebar. Click the tab again to put the Tree view away. + +Note: If you don't see a tab for Tree view, right-click the sidebar and choose Tree. + +The starting point - the top of the tree - is the root directory, represented by a slash (/). Click the disclosure triangle next to the root directory to open or close the list of all your computer's folders and files. The items on your computer are arranged hierarchically. The root directory may also list network locations in addition to locations on your own computer. + + +Try this + + + +To open or close a folder in Tree view, click its triangle. +To display the contents of a folder in the right-hand panel, click the folder's name in the tree. + + + + + + + + + +Viewing and Opening Files + +Icon View + +The first time you launch Nautilus, you see folders and files represented as icons. This is the default view. + +If you have changed the view and want to return to icon view, click the "View as" menu and choose View as Icons. + +
        +View Menu + +Screenshot of view menu + + + +
        + +List View + +To see the contents of a folder as a list, click the "View as" menu and choose View as List. + +To sort the items displayed in list view, click the column headers (Name, Size, Type, and Date Modified). + + +Zooming In or Out + +You can enlarge or reduce the size of items in either list or icon view, and stretch individual icons in icon view. + +To enlarge or reduce all of the icons: + + +Click the plus (+) and minus (-) symbols in the Location bar. To return to the original size, open the View menu and choose Normal Size. + + +To stretch an individual icon: + + +Click the "View as" menu and choose View as Icons. +Click to select the icon you want to stretch. +Open the Edit menu and choose Stretch Icon. A box appears around the icon, with "handles" in each corner. +Click and drag the handles to resize the icon. To cancel the stretch and return the icon to its original size, press the Esc key on your keyboard. + + +To return an icon to its original size: + + +Select the icon; then open the Edit menu and choose Restore Icon's Original Size. + + + +Viewing Individual Files + +You can preview many files in the Nautilus window just by looking at their icons in the right-hand panel - you don't need to open the files. + +Text files: The icons for most text files display the files' first few words or lines of text. If you enlarge a text file's icon by zooming or stretching, you can see more of the text. + +Image files: The icons for most image files appear as thumbnails -- small versions of the file. + +Music files: You can preview common types of music files by positioning the mouse pointer over the icons. Music plays as long as the pointer is over a music file's icon. + +You can also use the Nautilus window as a viewer for many types of files: + + +Some files, such as most text files, automatically appear in the Nautilus window when you double-click their icons. +Some files open in their applications for editing instead of opening for viewing. For such files, right-click the icon and choose Open With.Then choose Text Viewer, Image Viewer, or another viewer, as appropriate. + + +Note: You can control whether an individual file opens in Nautilus to be viewed, or opens in an application. See Setting Up Helper Applications. + +Here are some of the file types for which the Nautilus window can act as a viewer: + + + + + +Music +MP3 (for MP3 files located on your hard disk), AIFF, MPEG, WAV, RIFF + + +Text +ASCII text files, HTML files + + +Image +JPEG, PNG, GIF, XPM, SVG (without interactive features) + + +Package +RPM (for RPM files located on your hard disk) + + + + + + +Opening Individual Files + +There are several ways to open files in Nautilus: + + +Double-click the file's icon (unless you've change your preference so a single-click activates items) +Click the file's icon, open the File menu, and choose Open or Open With +Right-click the file's icon and choose one of the Open or Open With options + + +Note: You can control whether an individual file opens in Nautilus to be viewed, or opens in an application. If the application you want to use is not listed, you can add it to the list. See Setting Up Helper Applications. + +
        + + + +Viewing and Playing MP3 Files + +If you have a folder that contains MP3 music files, you should try the "View As Music" option. + + +Try this + + + +Go to your folder containing MP3 files. +Click the "View as" menu and choose View as Music. + + + + + +
        +View Menu + +Screenshot of View Menu + + + +
        + +Only the MP3 files in your folder are visible in this view. For each file, you see a listing of tracks, titles, artists, bit rates, and playing times. + +There's also a music player at the bottom of the window: + +
        +Music Player + +Screenshot of Music Player + + + +
        + +If you wish, you can choose a cover image to be displayed for your music folder: + + +Go to your folder containing MP3 files. +Click the "View as" menu and choose View as Music. +Click the Set Cover Image button in the bottom right corner of the Nautilus window. +Browse to find the graphic you want to use; then select it. +Click OK. + + +
        + + + + +Navigating the Internet + +You can use Nautilus as a browser for viewing web pages and FTP sites. + +To view a web page, type its URL (address) in the Location bar. For instance, to connect to Eazel's web site, you type + + +www.eazel.com + +in the Location bar, and then press Enter. + +
        +Location Bar + +Screenshot of Location Bar + + + +
        + +When you're viewing a web page, Nautilus gives you additional choices of web browsers in case you want to use a full-feature web browser. To select a different browser, click one of the buttons in the sidebar. + + + +
        + + + +Viewing Your Navigation History + +As you navigate your own computer as well as the Internet, you may want to return to a page, file, or folder you've previously viewed. You can view your history in three ways: + + +Open the Go menu. The bottom section of the menu lists the things you've viewed during the current session. +Click the History tab at the bottom of the sidebar. (To put the History list away, click the tab again.) +Right-click the Back or Forward buttons. + + +You can have Nautilus clear the locations you've previously visted. This removes the previous locations listed in the Go menu, the History tab, and under the Back and Forward buttons. + +To clear the list of previously visited locations: + + +Open the Go menu and choose Forget History. + + + + + + +Bookmarking Your Favorite Locations + +You will probably discover that you frequently visit certain locations - web pages, folders on your computer, and favorite photos or text files. +You can bookmark these items in Nautilus, so you can return to them easily. + +Creating a Bookmark + +To bookmark an item: + + +Go to the item you want to bookmark. You can bookmark any item displayed in Nautilus. +Open the Bookmarks menu and choose Add Bookmark. + + +To use your bookmarks, open the Bookmarks menu and choose an item. + +The Built-In Bookmarks + +Nautilus comes with some built-in bookmarks arranged in folders in the Bookmarks menu. They take you to the web sites of organizations and companies of interest to Linux users. + +If your user level is set to Intermediate or Advanced, you can turn off the built-in bookmarks: + + +Open the Preferences menu and choose Preferences. +In the left-hand column of the Preferences dialog box, click Navigation. +Select "Don't include the built-in bookmarks." +Click OK. + + + +Editing Your Bookmarks + +You can rename a bookmark, change the information about its location, or remove it altogether: + + +Open the Bookmarks menu and choose Edit Bookmarks. +Select the bookmark you want to edit. +Type a new name or location for the bookmark, or click Remove. +When you're done editing bookmarks, close the dialog box. + + + + + +
        + + + +Searching Your Computer and the Internet + +Nautilus provides a Find feature for locating files and directories on your own computer and a Web Search feature for finding web pages. + + +Finding Items on Your Computer +Searching the Internet + + + + + +Finding Items on Your Computer + +Nautilus includes Medusa, an indexing daemon (utility) that makes it possible to search the files on your hard disk not just by file name, creator, file type, and so forth, but also by content. + +To find an item on your hard disk (Beginner user level): + + +Click the Find button in the toolbar. +Enter the name of the item you want to find in the search field. +Click Find Them. + + + +To find an item on your hard disk (Intermediate and Advanced user level): + + +Click the Find button in the toolbar. +From the two pop-up menus, choose criteria to define your search. The options are explained below. +(Optional) To further narrow your search, click More Options and choose additional criteria. +Enter the item you want to find - a particular file name, modification date, and so forth - in the search field. +Click Find Them. + + + + + + + + +Search Criterion +Modifier +Search Field or List + + + +Name: Nautilus will search the names of files on your hard disk. +Specify if the file(s) found should have names that contain, begin with, or end with the characters you type. You can also choose "matches glob" or "matches regexp" to do Linux wildcard searches. +Enter part or all of the file name you want to find. + + + +Content: Nautilus will search the content of files on your hard disk. +Specify if the file(s) found should have content that includes any, all, some, or none of the word or phrase you type. +Enter a word or phrase you want to search for in the content of the files on your hard disk. + + + +Type: Nautilus will search for the file type(s) you specify. +Choose "is" or "is not" to include or exclude file types from the search. +Choose a file type from the pop-up menu. + + + +Size +Specify if the file(s) found should be larger or smaller than the number you type. +Type a size, in Kbytes. + + + +With Emblem +Specify if the file(s) found should be marked with, or not marked with, a particular emblem. +Choose an emblem. + + + +Last Modified +Choose an option to narrow down the last modification date of the files to be found. +Enter a date. The current date is filled in by default, but you can delete it and type any date you want. + + + +Owned By +Choose "is" or "is not" to include or exclude files owned by a particular group. +Enter the name of a user group that owns files on your system. + + + + + + + + + + + + + +Searching the Internet + +To search for pages on the Web, click the Web Search button in the toolbar. Eazel's search page appears. Type the word or phrase for which you want to search, and click Search. + +You can choose a search engine from the ones listed at the top of the search box. For instance, choose Google by clicking the Google link. + + + + + + + + +Managing Your Files and Folders + +This section explains how to use Nautilus to organize your files and folders. It includes: + + +Moving and Copying Files and Folders +Creating a New Folder +Duplicating Files and Folders +Renaming Files and Folders +Deleting Files and Folders +Changing File Permissions + + + + +Moving and Copying Files and Folders + +The easiest way to move a file or folder is to work with two Nautilus windows. + +To move a file or folder to a new location, do this: + + +Open the File menu and choose New Window. You now have two Nautilus windows. +In one window, locate the file or folder you want to move. In the other window, locate the destination folder. +Using the left mouse button, click the file or folder you want to move and drag it to the other window. + + +Note: If your hard disk is divided into volumes, dragging a file or folder from one volume to another copies the file or folder rather than moving it. + +To copy a file or folder to a new folder while retaining the original, do this: + + +Open the File menu and choose New Window. You now have two Nautilus windows. +In one window, locate the file or folder you want to copy. In the other window, locate the destination folder. +Using the left mouse button, click the item you want to copy. +Using the right mouse button, drag the item to the destination folder. A pop-up menu appears. +Choose Copy Here to place a copy of the item in the destination folder. Choose Link Here to create a link to the item. + + + + + + +Creating a New Folder + +You can create a new folder anywhere in the folder hierarchy on your computer, as long as you have appropriate permissions. + +Do this: + + +Go to the folder that will contain the new folder. (In the main window, double-click the folder's icon.) +Open the File menu and choose New Folder. + + +Nautilus creates a new folder inside the current folder. It has the name "untitled folder." You can rename the new folder. + + + + + +Duplicating Files and Folders + +To duplicate an item, do this: + + +Click to select the item you want to duplicate. +Open the File menu and choose Duplicate. + + +A copy of the item is added to the current folder. + + + + + +Renaming Files and Folders + +To rename an item, do this: + + +Click to select the item you want to rename. +Open the File menu and choose Rename. The icon's label now has a text box around it. +Type a new name for the item. + + + + + + +Deleting Files and Folders + +To delete an item, do this: + + +Click to select the item you want to delete. +Open the File menu and choose Move to Trash. +To empty the trash, open the File menu and choose Empty Trash. (Empty the trash only if you're sure you want to permanently delete the items in it!) + + + + + + +Changing File Permissions + +You can change permissions for folders and files you own. If you're logged in as root (for experts only), you can change permissions for any folders and files on your computer. + + +Click to select the item for which you want to change permissions. +Open the File menu and choose Show Properties. The Properties dialog box opens for the file or folder you selected. +Click the Permissions tab. +From the File Group menu, choose the group (users) that can own this file or folder. +In the table, click to put a checkmark under each type of permission you want to grant. For instance, you can give the owner and users in the group permission to read (view), write (edit), and execute files in the group. (Execute is for programs.) You can give others permission to read files, but not write to them. +When you are done managing permissions, close the dialog box. + + + + + + + + + +Customizing Nautilus + +You can customize Nautilus in many ways so its appearance and behavior meets your needs and taste. This section explains how. + + +Adjusting Beginner, Intermediate, and Advanced Settings +Setting Preferences +Showing and Hiding Bars +Choosing a File Layout +Changing Themes and Backgrounds +Customizing Icons and Icon Captions +Setting up Helper Applications (File Types) + + + + +Adjusting Beginner, Intermediate, and Advanced Settings + +When you first lanched Nautilus, you were asked to choose your user level: Beginner, Intermediate, or Advanced. You can change your user level at any time. + +To change your user level: + + +Open the Preferences menu and choose the level you want. + + +
        +Preferences Menu + +Screenshot of Preferences Menu + + + +
        + +One way to see the difference between the levels is to go to your home directory and then compare what you see as you select each level in turn. Be sure to return to the level with which you're comfortable when you're done. + +
        + + + +Setting Preferences + +If your user level is set to Intermediate or Advanced, you can customize preferences: + + +Open the Preferences menu and choose Preferences. +From the left column in the Preferences dialog, choose the type of settings you want to adjust (for instance, Folder Views). +Adjust each group of settings as desired, following the instructions in the Preferences dialog box. +When you are finished setting preferences, click OK. + + + + + + +Showing and Hiding Bars + +The Nautilus window shows these bars by default: + + +Sidebar +Toolbar +Location Bar +Status Bar (at the bottom of the window) + + +You may want to hide one or more of them to save space on your screen. + +To hide a bar, open the View menu and click one of the options in the second section. For instance, to hide the Sidebar, click Hide Sidebar. + +If you want to see the bar again, open the View menu and choose one of the Show options. + +Note: If you hide a bar in your Nautilus window, and then open another Nautilus window, the bar is not hidden in the new window. To specify which bars should be hidden or displayed in new windows: + + +Open the Preferences menu and choose Edit Beginner, Intermediate, or Advanced Preferences (whichever is available). +In the left column of the Preferences dialog box, click Appearance. +Under Views, de-select any bars you want hidden in new windows. +Click OK. + + + + + + +Choosing a File Layout + + +File Layout in Icon View + +To change the layout for the files you're viewing, open the View menu and choose Lay Out Items. Then choose how you want the files arranged: + + +Manually - You can drag icons to arrange them as you like. +by Name - The files appear alphabetically by name. +by Type - All directory (folder) icons are grouped, followed by files arranged in groups such as text, image, and so on. +by Size - Files are displayed from largest to smallest. +by Modification Date - The most recently modified files appear first. +by Emblems - If you've added emblems to icons, the files are grouped according to emblems (files without emblems are at the end). +Tighter Layout - Icons are closer together. +Reversed Order - Reverses the order for the option you've chosen. + + + +File Layout in List View + +In list view, you can change the layout of files by clicking the column headings. For instance, to arrange files by type, click the Type column heading. + +See also Viewing and Opening Files. + + + + + +Changing Themes and Backgrounds + +You can customize the décor of your Nautilus window by choosing an overall theme and by changing the background color or image of specific objects. + + +Choosing a New Theme + + +Open the Edit menu and choose Change Appearance. +Choose one of the themes. The appearance changes immediately, so you can see how the theme looks. +When you are finished, close the dialog box. + + + +Changing Backgound Patterns and Colors + + +Open the Edit menu and choose Backgrounds and Emblems. +In the Backgrounds and Emblems dialog box, choose Patterns or Colors. +Drag a tile to a part of the Nautilus window. For instance, change the color of the sidebar by dragging the yellow tile. +When you're finished, click Done. + + +Note: The Backgrounds and Emblems dialog also lets you drag emblems to attach to individual file and folder icons. + + +Adding and Removing Background Patterns and Colors + +If your user level is set to Intermediate or Advanced, you can add and remove patterns and colors to the customization choices. + +Any image file can be a new background pattern. To add a pattern: + + +Open the Edit menu and choose Backgrounds and Emblems. +In the Backgrounds and Emblems dialog box, choose Patterns. +Click Add a New Pattern. +Use the Directories and Files lists to find the image file you want to use. +Select the image file and click OK. The image is added as a tile to the pattern options. + + +To add a new color to the background color choices: + + +Open the Edit menu and choose Backgrounds and Emblems. +In the Backgrounds and Emblems dialog box, choose Colors. +Click Add a New Color. +On the color wheel, click the color you want to use and click OK. The color is added as a tile to the color choices. + + +To remove a pattern or color: + + +Open the Edit menu and choose Backgrounds and Emblems. +In the Backgrounds and Emblems dialog box, choose Patterns or Colors. +Click Remove a Pattern or Remove a Color. +Any patterns or colors you have previous added are displayed. Click the one(s) you want to remove. +Click Done. + + + + + + +Customizing Icons and Icon Captions + +Icons appear with information in their captions - normally the directory name and number of items for directories and the name and size for files. If you zoom in for a closer look at icons, more information appears. + +Customizing Icon Captions + +You can specify which information to show for icons and change the order of the information: + + +Open the Edit menu and choose Icon Captions. +Click the first button and choose from the list. The information you choose will be the first thing shown below icons, after the filename. +Repeat step 2 for the second and third buttons. +When you are done customizing icon captions, close the dialog box. + + + +Customizing an Icon + +You can change the icon for an individual folder or file, giving it a custom icon: + + +Make sure you aren't viewing the Tree, Notes, History, or Help tabs in the sidebar. (To "put away" a tab, click it.) +Double-click the item you want to customize, so its icon is displayed in the sidebar. +Drag a thumbnail image to the icon. The image replaces the icon. + + +
        +Creating a Custom Icon + +Screenshot of Custom Icon + + + +
        + +Tip: You may want to work with two Nautilus windows when you customize a directory's icon. Open the File menu and choose New Window. You can drag a thumbnail image from one window to the directory you're customizing in the other window. + + +Adding Emblems to Icons + +Emblems let you tag individual files as "urgent," "favorite," and so forth. To add an emblem to an icon: + + +Make sure that the folder or file to which you want to add an emblem is visible in the Nautilus window. You can be in Icon or List view. +Open the Edit menu and choose Backgrounds and Emblems. +In the Backgrounds and Emblems dialog box, choose Emblems. +Select an emblem and drag it to the icon you want to customize. +Click Done. + + +You can add as many emblems as you like. + +Tip: You can use emblems to organize your files. For instance, attach "ohno!" emblems to the files that need immediate attention; then open the View menu and choose Lay Out Items by Emblems. The files with "ohno!" emblems are displayed at the top in icon view and first in list view. + +
        + +
        + + + + + +Setting up File Handlers (MIME Types) + +There are several ways to open and view files in Nautilus: + + +Double-click the file's icon (unless you've change your preference so a single-click activates items) +Click the file's icon, open the File menu, and choose Open or Open With +Right-click the file's icon and choose one of the Open or Open With options + + +When you choose Open With, you see a list of applications that can open that particular file. You also have the choices "Other Applications" and "Other Viewer," which let you open or view the file using an application that's not in the list. + +You can customize the options for viewing and opening files. This section explains how. + + +Adding and Removing Applications and Viewers +Changing the Default Viewer or Application +Configuring Additional Applications (Advanced) +Adding a New MIME Type (Advanced) + + + + + +Adding and Removing Applications and Viewers + +You can modify the list of applications you see when you choose Open With: + + +Click to select the file for which you want to change the Open options. +Open the File menu and choose Open With; then choose Other Application. The Open With Other dialog box appears. Its lists all the applications currently set as able to open this particular type of file. Some applications in the list are tagged as "in the menu" for this file type, others are tagged as "not in the menu." +Select an application in the list and click Modify. The Modify dialog box appears. +Choose the option you want. You can choose to add or remove the application from the menu for this particular file, or for all files of this type. +Click OK. +In the Open With Other dialog box, click Done. (If you want to open the file now, click Choose.) + + +To modify the list of viewers you see when you choose Open With, follow steps 1-6 above, but choose "Other Viewer" instead of "Other Application" in step 2. + + + + + +Changing the Default Viewer or Application + +The default application or viewer opens a file automatically when you select the file and choose Open from the File menu. To specify the default: + + +Click to select the file for which you want to change the default. +Open the File menu and choose Open With; then choose Other Application. The Open With Other dialog box appears. +Select the application you want to use as the default and click Modify. The Modify dialog box appears. +Choose the option you want. You can choose to use the application as the default for this particular file, or for all files of this type. +Click OK. +In the Open With Other dialog box, click Done. (If you want to open the file now, click Choose.) + + +To change the default viewer, follow steps 1-6 above, but choose "Other Viewer" instead of "Other Application" in step 2. + + + + + +Configuring Additional Applications (Advanced) + +The Open With Other dialog box (described above) lists all applications currently configured to open a file. There may be additional applications on your computer that can open the file, but aren't in the list. You can configure additional applications so they appear in the list. + + +Click to select the file for which you want to configure a new application. +Open the File menu and choose Open With; then choose Other Application. The Open With Other dialog box appears. +Under File Types and Programs, click Go There. The GNOME Control Center opens, with the File Types and Programs preferences displayed. +In the list, find the file type for the file you're working with. For instance, if you're confuring an additional application for a plain text file, locate the entry for plain text files in the list. (Clicking the column headers sorts the list.) +Once you find the file type, click to select it. +Under Default Action, click Edit List. The Edit Applications List dialog box appears. +Click Add Application. The New Application dialog box appears. +Type the application's name and the command that launches the application. The command is the same as the command you'd type if you were launching the application from a Linux command line. +Click OK to dismiss the New Application dialog box. +Click OK to dismiss the Edit Applications List dialog box. +Click OK in the File Types and Programs preferences. + + +To edit the name or command for an application, follow steps 1-11 but click Edit Application instead of Add Application in step 7. + + + + + +Adding a New MIME Type(Advanced) + +You can set up default applications for new file types that are not currently configured on your system. + +First, add the new file type: + + +Open the GNOME main menu and choose Programs: Settings: GNOME Control Center. +Choose File Types and Programs in the GNOME Control Center's left-hand column. +Click Add New Mime Type. +In the Add Mime Type dialog box, enter the Mime type and a description. For instance, if you have a new type of image file of type "alf" (alfie files), you'd enter "alf" as the Mime type and "Alfie image" as the description. +Click OK. Your new Mime type is added to the list. + + +Second, associate a file extension and icon with the new type: + + +Select your new Mime type in the list and click Change File Extensions. +Type a file extension (for instance, ".alf" for the "alfie" image files in the example) and click OK. +To specify the default icon for files of this type, click Change Icon. Choose an icon and click OK. + + +Third, defined the application(s) that can open files of this type: + + +Select your new Mime type in the list. +Under Default Action, click Edit List. The Edit Applications List dialog box appears. +Click Add Application. The New Application dialog box appears. +Type the application's name and the command that launches the application. The command is the same as the command you'd type if you were launching the application from a Linux command line. +Click OK to dismiss the New Application dialog box. +Click OK to dismiss the Edit Applications List dialog box. +Click OK in the File Types and Programs preferences. + + + + + + + + + +Eazel Services + +Eazel Services are Internet-based tools designed to simplify system management for Linux users. Nautilus and Eazel Services work together to make your life easier. + +Eazel Services include: + + +Free online storage for file backup +File sharing +Eazel's Software Catalog with easy installation of software titles. +Nautilus Installer + + +Registering with Eazel + +When you first launched Eazel, you were asked if you wanted to register for Eazel Services. If you registered at that time, click the Services button in the Nautilus window and log in, using your user name and password. + +If you have not already registered, click the Services button to see a registration screen. Follow the steps for registering. + + + +
        + -- cgit v1.2.1