From 2e5b2bbb530b642dda56b332cfd93810ac415098 Mon Sep 17 00:00:00 2001 From: nobody Date: Tue, 1 Apr 2003 17:15:53 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'EVOLUTION_1_2_4'. svn path=/tags/EVOLUTION_1_2_4/; revision=20614 --- shell/ChangeLog | 2553 +------------------------- shell/Evolution-ShellComponent.idl | 7 +- shell/Evolution-ShellComponentDnd.idl | 2 +- shell/Evolution-Storage.idl | 3 +- shell/Makefile.am | 157 +- shell/e-component-info.c | 10 +- shell/e-corba-storage-registry.c | 117 +- shell/e-shell-config-default-folders.c | 100 +- shell/e-shell-folder-title-bar.c | 272 +-- shell/e-shell-settings-dialog.c | 98 +- shell/e-shell-shared-folder-picker-dialog.c | 200 +- shell/e-shell-user-creatable-items-handler.c | 97 +- shell/e-shortcuts.c | 265 ++- shell/e-storage-set-view.c | 369 ++-- shell/e-storage.c | 146 +- shell/main.c | 387 ++-- 16 files changed, 1100 insertions(+), 3683 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index d4f8e00991..38e20819f4 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,746 +1,21 @@ -2003-04-01 Not Zed +2003-03-04 Rodney Dawes - [#40474] + * shell/Evolution-Offline.idl: + * shell/Evolution-Session.idl: + * shell/Evolution-ShellComponent.idl: + * shell/Evolution-ShellComponentDnd.idl: + * shell/Evolution-Storage.idl: Fix #includes - * e-config-upgrade.c (gconf_remap_list[]): The summary settings - start at "My-Evolution", not "/My-Evolution". - (import_bonobo_config): Same for mail summary settings, and hex - decode the string for the strlist. Add a few extra debug - printf's. - -2003-03-28 Ettore Perazzoli - - [#40377] - - * main.c (kill_old_wombat): New. - (kill_wombat): New. - (idle_cb): Call kill_old_wombat(). - -2003-03-27 Ettore Perazzoli - - * e-shell-offline-handler.c (update_dialog_tree_view): Renamed - from update_dialog_clist, Ported to GtkTreeView. - (update_dialog_tree_view_hash_foreach): Likewise. - - * glade/e-active-connection-dialog.glade: Rename - "active_connection_clist" to "active_connection_treeview". - -2003-03-27 Not Zed - - * e-shell-about-box.c: Make Radek's surname correct, Doulík, - inserted utf8 into the name string. For bug #17034. - -2003-03-26 Ettore Perazzoli - - * e-shell-view.c (e_shell_view_construct): Pass "evolution-1.4" as - the app name to bonobo_ui_util_set_ui() instead of "evolution". - -2003-03-26 Ettore Perazzoli - - [Shell part of #7153.] - - * e-local-storage.c (load_folder): Call e_storage_new_folder() - instead of new_folder() here so the folder doesn't get added to - the EvolutionStorage. Since the EvolutionStorage has its own - CORBAfied copy of the folder info [sigh] and it can't be updated, - we have to set up the EvolutionStorage after setup_stock_folders() - has been called. - (setup_corba_storage): New function to set up the CORBA storage. - (load_all_folders): Call setup_corba_storage() after - setup_stock_folders(). - -2003-03-25 Not Zed - - * e-shell-settings-dialog.c (set_dialog_size): Use - set_default_size instead of size_request so we allow the user to - resize the window. Also try using 60x30 rather than 72x35 as the - approximate font cell size. For bug #39706. - -2003-03-25 Dan Winship - - * e-folder-dnd-bridge.c: Update for e_notice move. - * e-setup.c: Likewise - * e-shell-folder-commands.c: Likewise - * e-shell-folder-creation-dialog.c: Likewise - * e-shell-offline-sync.c: Likewise - * e-shell-shared-folder-picker-dialog.c: Likewise - * e-shell-view-menu.c: Likewise - * e-shell.c: Likewise - * evolution-shell-component-utils.c: Likewise - - * Makefile.am (libeshell_la_LIBADD): libeshell depends on - libeutil. - - * e-corba-storage.c: Fix warnings - - * glade/evolution-startup-wizard.glade: Fix colors again - -2003-03-25 Dan Winship - - * Evolution-ShellComponent.idl (interactive): add a "new_view_xid" - arg, so the component has a window id to make use of as a parent - if it needs to pop up a dialog. - - * e-shell.c (set_interactive): Pass the new_view_xid when going - interactive. - (e_shell_set_interactive): Remove this since it wasn't being used, - and couldn't be used for anything except lying to the components. - - * evolution-shell-component.c - (evolution_shell_component_class_init): Update "interactive" - signal definition - (impl_interactive): Update prototype and signal emission - - * e-shell-marshal.list (NONE:BOOL,INT): add - -2003-03-21 Dan Winship - - * e-corba-storage.c (async_open_folder_idle): If we get a second - request to open a folder we're already waiting for, don't send a - second CORBA request, just remember the additional request. - (async_open_cb): Call the callbacks for all pending requests for - this folder. - (init): grumble-grumble-non-g_new0-using-people-grumbe - -2003-03-20 JP Rosevear - - * e-shell-view-menu.c: remove unused command - -2003-03-19 Not Zed - - * e-config-upgrade.c (e_config_upgrade): Added some more doco just - to make it clear how it was intended to be used/expanded. - -2003-03-18 Ettore Perazzoli - - * importer/evolution-importer.c - (impl_GNOME_Evolution_Importer_loadFile): Get a physical_uri arg - instead of a folderpath arg. - - * importer/evolution-importer-client.c - (evolution_importer_client_load_file): Get a physical_uri arg. - - * e-shell-importer.c (start_import): Get a physical_uri arg - instead of a folderpath. - (folder_selected): Updated accordingly. - -2003-03-19 Ettore Perazzoli - - * e-shell-importer.c (get_name_from_component_info): Look for the - "evolution:menu_name" property instead of "evolution:menu-name". - [#39692] - -2003-03-19 Ettore Perazzoli - - * evolution-folder-selector-button.c (set_folder): If you can't - get a pixbuf icon for the folder's type, do not crash. [#39599] - - * e-shell.c (impl_Shell__get_displayName): Removed. [#38974] - (e_shell_class_init): Do not install anymore. - - * Evolution-Shell.idl: Remove displayName attribute. - -2003-03-18 Ettore Perazzoli - - * importer/evolution-importer.c - (impl_GNOME_Evolution_Importer_loadFile): Get a physical_uri arg - instead of a folderpath arg. - - * importer/evolution-importer-client.c - (evolution_importer_client_load_file): Get a physical_uri arg. - - * e-shell-importer.c (start_import): Get a physical_uri arg - instead of a folderpath. - (folder_selected): Updated accordingly. - -2003-03-14 Dan Winship - - * e-storage.c (e_storage_get_has_subfolders): Add - (e_storage_declare_has_subfolders): Rename from - e_storage_has_subfolders to make it clearer that this is a setter, - not a getter. (Can't call it e_storage_set_has_subfolders because - that sounds like it belongs in e-storage-set.) - - * e-corba-storage.c (impl_StorageListener_notifyHasSubfolders): - update for e_storage_declare_has_subfolders name change - (get_folder): Override the default EStorage implementation: if - asked for a folder under a not-yet-expanded folder, attempt to - force the parent(s) to expand so that the child is available. - Fixes part of #30415 - -2003-03-14 Dan Winship - - * Evolution-Storage.idl (asyncOpenFolder): add a Bonobo::Listener - to this like the other async interfaces, rather than having a - hacky way to signal failure. - - * evolution-storage.c (impl_Storage_asyncOpenFolder): Update to - take a listener and emit it as part of the signal - (evolution_storage_class_init): update OPEN_FOLDER signal - prototype. - - * e-shell-marshal.list (NONE:POINTER,STRING): add, for changed - EvolutionStorage open_folder signal - - * e-storage.c (e_storage_async_open_folder): add a callback arg - (impl_async_open_folder): call the callback with NOTIMPLEMENTED. - (class_init): remove the CLOSE_FOLDER signal - (e_storage_has_subfolders): Don't emit CLOSE_FOLDER since it - doesn't exist any more, and this function is used for that side - effect any more anyway. - - * e-corba-storage.c (async_open_folder): add the callback arg and - create a proper closure. - (async_open_folder_idle): Call the callback in case of error. - Create a listener and pass that to the CORBA call. - (async_open_cb): Listener callback. - - * e-storage-set.c (storage_set_view_folder_opened): Pass a - callback to e_storage_async_open_folder. - (async_open_cb): emit CLOSE_FOLDER if the open failed - (storage_close_folder_cb): Remove this since the signal no longer - exists. - -2003-03-11 Dan Winship - - * e-shell-startup-wizard.c (start_wizard): If the wizard factory - returns NULL, we'll get a NIL wizard but no exception. Deal with - that case. (ie, try the next wizard). - (finish_func): Simplify for e-timezone-dialog changes. - (prepare_timezone_page): If there is already a timezone set in - gconf, set the map to point to it. (For connector autoconfig.) - -2003-03-07 Not Zed - - ** reverted the following patch from ettore, this is a gnome 2.2 - api change, and shouldn't be used yet. - - * e-shell.c (impl_finalize): Use - bonobo_activation_unregister_active_server() instead of - bonobo_activation_active_server_unregister(). - (e_shell_construct): Use - bonobo_activation_register_active_server() instead of - bonobo_activation_active_server_register(). - -2003-03-04 Not Zed - - * main.c (show_development_warning): Separated the current stable - version number from the warning prompt, and fixed a minor - grammatical error. For bug #38775. - -2003-03-06 Ettore Perazzoli - - * e-shell.c (impl_Shell_selectUserFolder): At least for now, - disable the nasty XWMHints trick to fool WMs; it is not needed now - that everything is in-proc. - -2003-03-06 Ettore Perazzoli - - * e-shell-utils.c (e_shell_folder_name_is_valid): Do not allow - names with a "#" in them either. - -2003-03-06 Ettore Perazzoli - - * e-shell-view.c (update_other_users_folder_items_sensitivity): - New function to toggle the "open other user's folder" menu item - sensitivity on or off depending on whether there are any storages - that actually support that. - (storage_set_removed_storage_callback): New callback for the - EStorageSet's "removed_storage" signal; it updates the sensitivity - if necessary. - (storage_set_new_storage_callback): Likewise, new callback for the - EStorageSet's "new_storage" signal. - (e_shell_view_construct): Connect these two signal callbacks here. - Also, call update_other_users_folder_items_sensitivity() to set up - the initial sensitivity of the menu item. - (update_for_current_uri): Add a missing EStorageSetView cast here. - -2003-03-06 Ettore Perazzoli - - [#34371] - - * e-shell-shared-folder-picker-dialog.c - (folder_name_entry_changed_callback): New callback to set the - sensitivity of the OK button according to whether the folder name - entry is empty or not. - (show_dialog): Connect here. Pop up an error message if no user - is selected. - -2003-03-06 Ettore Perazzoli - - * e-shell.c (impl_finalize): Use - bonobo_activation_unregister_active_server() instead of - bonobo_activatino_active_server_unregister(). - (e_shell_construct): Use - bonobo_activation_register_active_server() instead of - bonobo_activation_active_server_register(). - -2003-03-06 Ettore Perazzoli - - * e-shell-importer.c (IN): Use G_GNUC_FUNCTION instead of - __FUNCTION__. - (OUT): Likewise. - -2003-03-06 Ettore Perazzoli - - Patch from Not Zed : - - * main.c (show_development_warning): Separated the current stable - version number from the warning prompt, and fixed a minor - grammatical error. For bug #38775. - -2003-03-06 Ettore Perazzoli - - * e-config-upgrade.c (import_bonobo_config): Protect from val - being NULL when printf()ing -- should fix #39096 (Solaris-specific - crash). - -2003-03-05 Ettore Perazzoli - - * e-shell-view-menu.c: Added icon for "/popups/NewPopup/Folder". - -2003-03-05 Ettore Perazzoli - - * importer/Makefile.am (BUILT_SOURCES): $(IDL_GENERATED), not - $(IDL_GENERATED_H). - (CLEANFILES): Make the same as $(BUILT_SOURCES). - (GNOME_Evolution_Importer-impl.o): Removed useless rule. - -2003-03-04 Mike Kestner - - * e-shell-view.c (update_for_current_uri): only set current - folder when the folder_path is different from the current folder. - -2003-03-04 Ettore Perazzoli - - * e-folder-dnd-bridge.c (find_matching_target_for_drag_context): - Handle p->data as a GdkAtom instead of a GdkAtom *. - (handle_data_received_non_path): Set the target member of the - corba_data struct to be the name of the atom. - - * e-storage-set-view.c (impl_tree_drag_data_get): Pass the name of - the atom instead of the atom itself. - - * Evolution-ShellComponentDnd.idl: Changed the type of Data.target - to string. - -2003-03-03 Ettore Perazzoli - - * glade/e-shell-shared-folder-picker-dialog.glade: Swap Cancel/OK - buttons as per the HIG. Also added proper response_ids. - -2003-03-03 Ettore Perazzoli - - * evolution-folder-selector-button.c (impl_finalize): Protect - against priv->possible_types being NULL. - -2003-02-27 Rodney Dawes - - * Makefile.am (evolution_SOURCES): Add e-config-upgrade.h - -2003-02-26 Chris Toshok - - * e-folder-list.c (e_folder_list_parse_xml): make this more robust - - only assume it's a folderlistitem node if the name of the node - is "folder". - -2003-02-26 Jeffrey Stedfast - - * e-config-upgrade.c: Change the type of load_http_images to INT - rather than BOOL. Fixes bug #38767. - -2003-02-26 Dan Winship - - * e-shell-startup-wizard.c (start_wizard): New routine to attempt - to start each available startup wizard in priority order, and - return once it has successfully started one. (Allows Connector, - etc, to override the mailer startup wizard.) - (make_corba_dialog_pages): Use it. - -2003-02-26 Not Zed - - * apps_evolution_shell.schemas: Added a key for - /apps/evolution/version - seems the best place to put it. This - should not return any value if unset, so i'm not sure if this is - the right mechanism ... - - * e-config-upgrade.c: Upgrade settings from earlier versions of - evolution. - - * main.c (upgrade_from_1_0_if_needed): Removed. - (main): Call e_config_upgrade before going into gmainloop. - (main): Turn off the --force-upgrade option, since it doesn't work - yet ... - -2003-02-25 Dan Winship - - * Evolution-Wizard.idl: Change this to let the Wizard provide an - array of title/icon/control triplets, instead of just controls, so - the shell doesn't need to know the name of each page a priori. - - * glade/evolution-startup-wizard.glade: Remove the mailer-specific - pages, which are now inserted at run time based on info from the - mailer. - - * evolution-wizard.c: Update for new idl. - (evolution_wizard_new): Now takes no arguments. - (evolution_wizard_add_page): New function to add page info to the - wizard. - - * e-shell-startup-wizard.c: Various renamings to make this - slightly less mailer-centric, though it still explicitly launches - the mailer startup wizard. - (make_corba_page): Replaces make_identity_page, make_receive_page, - etc. Uses the new Wizard idl to generically create a page and - insert it into the druid. - (e_shell_startup_wizard_create): Update - -2003-02-25 Dan Winship - - * e-shell-startup-wizard.c (connect_page, make_importer_page): Use - g_signal_connect_after to connect to the "prepare" signal to work - around a GnomeDruidPageStandard bug (b.g.o 81869) - (e_shell_startup_wizard_create): Remove the "return TRUE" that was - added here a while back to disable the startup wizard. - - * glade/evolution-startup-wizard.glade: Change "Next" and "Finish" - in the text to "Forward" and "Apply" to match the gnome 2 druid - buttons. - -2003-02-24 Rodney Dawes - - * e-shell-view.c: Doh, forgot to remove the e-gray-bar.h include - -2003-02-24 Rodney Dawes - - * Makefile.am: We don't need e-gray-bar.[ch] anymore - * e-gray-bar.[ch]: Remove these unused files now - * e-shell-folder-title-bar.c: We are themeable now!!!! - Use GtkArrows now instead of pixmaps - Get rid of the hardcoded colors - Add an expose_event to paint a flat box for the background - * e-shell-view.c: Don't need e-gray-bar anymore - -2003-02-24 Ettore Perazzoli - - * evolution-shell-component.c (impl_populateFolderContextMenu): - Don't release_unref the corba_uih since - bonobo_ui_component_set_container() takes ownership of the object - without reffing it. - -2003-02-24 Ettore Perazzoli - - * glade/e-active-connection-dialog.glade: Update dialog to use - stock response IDs. - -2003-02-20 Not Zed - - * main.c (upgrade_from_1_0_if_needed): fix the conf keys, currently unused. - - * e-shell.c (save_settings_for_component): lower-case the config prefix. - -2003-02-20 Dan Winship - - * Makefile.am (evolution_LDADD): - s/libemiscwidgets.a/libemiscwidgets.la/ and likewise for - libetimezonedialog - -2003-02-18 Ettore Perazzoli - - * e-shortcuts.c (shortcut_item_new): Get the name from the name, - not the type. Fixes #37952, pointed out by Lonnie Borntreger. - -2003-02-17 Chris Toshok - - * e-shortcuts.c (load_shortcuts): plug memory leak - free path. - -2003-02-13 Ettore Perazzoli - - [Ported SIGSEGV signal redirection hack from mail/.] - - * main.c (segv_redirect): New, SIGSEGV signal handler. - (setup_segv_redirect): New function to set it up. - (main): Call setup_segv_redirect(). - -2003-02-12 Ettore Perazzoli - - * e-setup.c (DEFAULT_USER_PATH): Look into evolution/$BASE_VERSION - instead of evolution-$BASE_VERSION. - -2003-02-11 Joe Shaw - - * main.c (show_development_warning): Suggest people use 1.2.x instead - of 1.0.x. - -2003-02-09 Larry Ewing - - * e-local-storage.c (remove_folder_directory): fix length calculation. - (create_folder_directory): remove alloca usage, clears up crash. - -2003-02-07 Larry Ewing - - * e-shell-folder-creation-dialog.c - (folder_name_entry_activate_cb): add an activate handler that - returns a response OK if the OK response would be active. - -2003-02-06 Dan Winship - - * evolution-test-component.c (main): s/PACKAGE/GETTEXT_PACKAGE/ in - gettext init. - -2003-02-06 Not Zed - - * e-shortcuts-view.c (class_init): use POINTER_STRING_BOOL for - activate_shortcut. - - * e-shell-marshal.list: Added NONE,STRING,BOOL, and - POINTER,STRING,BOOL, removed POINTER,STRING,INT - - * evolution-shell-view.c (evolution_shell_view_class_init): Use - STRING_BOOL for the set_message signal to match rest of command. - - * e-shell-marshal.list: Added NONE,STRING,STRING,STRING - - * evolution-shell-component.c - (evolution_shell_component_class_init): Change the - user_create_new_item marshaller to STRING_STRING_STRING to match - the rest of the call. The 'new' button should work now. - - * e-setup.c (copy_default_stuff): We want to copy whats in the - default user dir, not the default user dir. - -2003-02-05 Dan Winship - - * Makefile.am (INCLUDES): Define EVOLUTION_IMAGES using - $(imagesdir). Define EVOLUTION_GLADEDIR using $(gladedir) - (eshellincludedir): Define in terms of $(privincludedir) - (evolution_LDFLAGS): Remove this. gmodule-2's LDFLAGS include the - equivalent of -export-dynamic for us. - (serverdir, etspecdir): Remove. Defined in configure.in now. - - * e-folder.c: #include - * e-corba-config-page.c: Likewise - * e-shell-config.c: Likewise - * e-shell-folder-creation-dialog.c: Likewise - * e-shell-folder-title-bar.c: Likewise - * e-shell-startup-wizard.c: Likewise - * evolution-activity-client.c: Likewise. - * evolution-shell-component-client.c: Likewise - * evolution-shell-component-utils.c: Likewise - * evolution-storage.c: Likewise - * evolution-test-component.c: Likewise - - * e-shortcuts-view.c (destroy_group_cb): Remove unused variable - - * importer/Makefile.am (INCLUDES): Remove -I$(includedir). Define - EVOLUTION_GLADEDIR using $(gladedir). - (libevolution_importerincludedir): Define in terms of - $(privincludedir) - (gladedir): Removed. Defined in configure.in now. - - * glade/Makefile.am (gladedir): Likewise - -2003-02-05 Dan Winship - - * importer/evolution-intelligent-importer.c: - s/BonoboXObject/BonoboObject/ - - * e-folder-list.c (e_folder_list_class_init): - s/glade_gnome_init/glade_init/ - - * main.c (main): Likewise - -2003-02-05 Not Zed - - * e-shell-startup-wizard.c (start_importers): re-enable. - (prepare_importer_page): re-enable importer code. - - * e-shell-importer.c (druid_finish_button_change): removed, since - its not such a hack to change anymore. Dunno how to get an icon - on it tho, without a stock button. - (show_import_wizard): Change the apply button to "Import" here. - -2003-01-28 Not Zed - - * e-local-storage.c (create_folder_directory): We can't use - pointer arithmetic with g_path_get_*, so adjust code accordingly. - -2003-01-16 Not Zed - - * e-shell-startup-wizard.c (e_shell_startup_wizard_create): Hook - onto finish instead of next on the last page. - -2003-01-28 Ettore Perazzoli - - * Makefile.am ($(SELECT_NAMES_IDL_GENERATED_C)): No need for the - @true command. - ($(IDL_GENERATED_C)): Likewise. - (e-shell-marshal.h, e-shell-marshal.c): Use different names for - the .tmp files so these can be generated in parallel. - - * importer/Makefile.am (GNOME_Evolution_Importer-impl.o): Remove - unused rule. - ($(IDL_GENERATED_C)): Remove useless @true command. - (BUILT_SOURCES): Put the .h generated files in here as well. - -2003-01-28 Ettore Perazzoli - - * Makefile.am (Evolution-impl.o): Removed unused rule. - -2003-01-28 Ettore Perazzoli - - * importer/Makefile.am: Make this work with parallel make as well. - -2003-01-28 Ettore Perazzoli - - * Makefile.am: Use a little trick for the IDL compilation so that - it works with parallel makes. - -2003-01-28 Ettore Perazzoli - - * e-shell.c (e_shell_construct): Use - bonobo_activation_server_register() instead of - bonobo_activation_register_active_server() again, since we want to - be able to build against bonobo-activation 2.0 and the latter is - 2.2-specific. - (impl_finalize): Likewise, use - bonobo_activation_active_server_unregister() instead of - bonobo_activation_unregister_active_server(). - -2003-01-27 Ettore Perazzoli - - * e-shell-importer.c (choose_importer_from_list): Set - GTK_RESPONSE_OK as the default response. - - * Makefile.am (INCLUDES): Add -DGNOME_DISABLE_DEPRECATED, - -DBONOBO_DISABLE_DEPRECATED. - - * e-shortcuts.c (update_shortcut_and_emit_signal): Use - g_signal_emit() instead of gtk_signal_emit(). - - * e-shortcuts-view.c (destroy_group_cb): Port from GnomeMessageBox - to GtkMessageDialog. - - * e-shell.c (get_icon_path_for_component_info): Use - gnome_program_locate_file() instead of gnome_pixmap_file(). - (impl_finalize): Use bonobo_activation_unregister_active_server() - instead of bonobo_activation_active_server_register(). - (e_shell_construct): Use - bonobo_activation_register_active_server() instead of - bonobo_activation_active_server_register(). - - * e-shell-view-menu.c (command_submit_bug): Use e_notice(). - (launch_pilot_settings): Use g_find_program_in_path() instead of - gnome_is_program_in_path(). - (command_submit_bug): Likewise. - - * e-shell-utils.c (get_icon_path): Use g_file_test() instead of - g_file_exists(). - - * e-shell-startup-wizard.c (prepare_importer_page): Port from - GnomeMessageBox to GtkMessageDialog. - - * e-shell-shared-folder-picker-dialog.c (show_dialog): Update for - GtkDialog. - (progress_dialog_close_callback): Removed. - (progress_dialog_clicked_callback): Removed. - (progress_dialog_response_callback): New. - (create_progress_dialog): Ported to GnomeDialog. - - * e-shell-offline-sync.c: Add member parent_window to struct - SyncData. - (e_shell_offline_sync_all_folders): Set it from the parent_window - arg. - (progress_dialog_close_callback): Removed. - (progress_dialog_clicked_callback): Removed. - (progress_dialog_response_callback): New. - (setup_dialog): Create a GtkDialog instead of a GnomeDialog. - (sync_folder): Updated for GtkDialog. - - * e-shell-offline-handler.c (dialog_handle_ok): Make it get a - GtkDialog instead of a GnomeDialog. - (dialog_handle_cancel): Likewise. - (dialog_clicked_cb): Removed. - (dialog_response_cb): New. - (pop_up_confirmation_dialog): Connect the new dialog_response_cb() - instead of the old dialog_clicked_cb(). Removed - gnome_dialog_set_default() call. - - * e-shell-folder-creation-dialog.c (dialog_response_cb): Make - first arg a GtkDialog, not a GnomeDialog. - - * e-shell-folder-commands.c (e_shell_command_delete_folder): - Expect delete_dialog() to return a GtkResponseType. - (delete_dialog): Ported to GtkMessageDialog; Return a - GtkResponseType. - - * e-shell-config-default-folders.c - (e_shell_config_default_folders_create_widget): Removed unused - variable. - - * e-setup.c (check_evolution_directory): Remove Evolution - directory installation message. - (e_setup): Remove check for the Executive-Summary directory. - - * e-local-storage.c (create_folder_directory): Use g_file_test() - instead of g_file_exists(). - - * evolution-shell-component-utils.c (e_pixmaps_update): Use - g_build_filename() of g_concat_dir_and_file(). - * e-folder-dnd-bridge.c (handle_data_received_path): Likewise. - * e-local-folder.c (construct_loading_metadata): Likewise. - (save_metadata): Likewise. - * e-local-storage.c (remove_folder_directory): Likewise. - (append_xfer_item_list): Likewise. - * e-setup.c (check_dir_recur): Likewise. - (e_shell_rm_dir): Likewise. - (setup_bonobo_conf_private_directory): Likewise. - * e-shell-folder-commands.c - (folder_selection_dialog_folder_selected_callback): Likewise. - (e_shell_command_rename_folder): Likewise. - * e-shell-folder-creation-dialog.c (dialog_response_cb): Likewise. - * e-shell-settings-dialog.c (load_pages): Likewise. - * e-shell-utils.c (get_icon_path): Likewise. - * e-shell.c (setup_local_storage): Likewise. - (get_icon_path_for_component_info): Likewise. - (e_shell_construct): Likewise. - * main.c (main): Likewise. - -2003-01-27 Ettore Perazzoli - - * e-shell-about-box.c (timeout_callback): Pass a the context's - language to pango_context_get_metrics() instead of NULL, so the - heights are computed correctly. - -2003-01-27 Ettore Perazzoli - - * evolution-shell-component.c (owner_ping_callback): #if 0'ed out - for now, since it seems to cause trouble for local components. - (setup_owner_pinging): Likewise. +2003-01-31 Ettore Perazzoli * e-shell-user-creatable-items-handler.c (get_default_action_for_view): Return default_menu_item [instead of NULL] if there is no view displayed. [#32736] -2003-01-23 Ettore Perazzoli - - * e-shell-folder-title-bar.c (get_max_clipped_label_width): Use - clipped_label->layout instead of creating a new PangoLayout; this - way we respect the actual font being used. - -2003-01-23 Ettore Perazzoli - - * e-shell-view.c (create_label_for_empty_page): Update for new - args to e_clipped_label_new(). - - * e-shell-folder-title-bar.c (e_shell_folder_title_bar_construct): - Make the title label bold and larger using the new args to - e_clipped_label_new(). - 2002-01-23 Ettore Perazzoli - [Port fix for #34129 from evolution-1-2-branch, unread count in - shortcut bar doesn't update properly.] + [Fix #34129, unread count in shortcut bar doesn't update + properly.] * e-shortcuts.c (update_shortcuts_by_path): Use e_shell_parse_uri() so we handle default shortcuts properly as @@ -750,1790 +25,74 @@ for pointing out the brokenness of this code.] -2003-01-23 Ettore Perazzoli - - * e-shell-about-box.c: Update copyright year. - -2003-01-22 Ettore Perazzoli - - * Makefile.am: Install the shell executable as - evolution-$(BASE_VERSION) using an install-exec-local hack. Also - put libeshell in $(privlibdir) instead of $(libdir). - (eshellincludedir): Version using $(BASE_VERSION). - (INCLUDES): Update for the new locations of things. - (etspecdir): Likewise. - - * e-shell-view.c (e_shell_view_construct): Get evolution.xml from - EVOLUTION_UIDIR. - - * importer/Makefile.am: Install libevolution-importer in - $(privlibdir) instead of $(libdir). - (INCLUDES): Updated for the new versioned paths. Define - EVOLUTION_UIDIR. - (libevolution_importerincludedir): Version using $(BASE_VERSION). - (gladedir): Likewise. - - * glade/Makefile.am (gladedir): Version using $(BASE_VERSION). +2002-12-17 Frederic Crozat - * e-setup.c (DEFAULT_USER_PATH): New #define. - (check_evolution_directory): Use it. - (copy_default_stuff): Likewise. Also, remove old shortcuts.xml - removal cruft. + * e-shell-settings-dialog.c: (page_new): + oaf returns locale encoded strings, not UTF-8 ones. -2003-01-17 Chris Toshok - - * e-shell-settings-dialog.c (set_dialog_size): pass - pango_context_get_language (context) to - pango_context_get_metrics. - -2003-01-14 Ettore Perazzoli - - * e-shell-folder-selection-dialog.c - (e_shell_folder_selection_dialog_construct): Make dialog - New/Cancel/OK to match HIG. - - * glade/e-shell-folder-creation-dialog.glade: Swap Cancel/OK - buttons to match HIG. - - * e-shell-importer.c (choose_importer_from_list): Make dialog - Cancel/OK to match HIG. - - * e-shell-folder-selection-dialog.c - (e_shell_folder_selection_dialog_construct): Make dialog Cancel/OK - to match HIG. - - * e-shell-view.c: Do not #include "e-bonobo-widget.h". - -2003-01-14 Ettore Perazzoli - - * Makefile.am (EXTRA_DIST): Add $(schema_DATA) here. - -2003-01-14 Rodney Dawes +2002-12-13 Chris Toshok - * e-shell-view.c: Use GtkPaned instead of EPaned + [ fixes bug #35394 ] -2003-01-13 Dan Winship - - * s/BonoboXObject/BonoboObject/ (for BONOBO_DISABLE_DEPRECATED) - -2003-01-10 Ettore Perazzoli + * e-shell-shared-folder-picker-dialog.c (setup_name_selector): + return the SelectNames corba interface too. + (show_dialog): unref the corba interface when closing the dialog. - * evolution-shell-component.c (impl_setOwner): Don't duplicate the - shell object here before passing to evolution_shell_client_new(). +2002-12-05 Chris Toshok - * evolution-shell-client.c (evolution_shell_client_construct): - Dupliate the @corba_shell before storing into the - EvolutionShellClientPrivate struct. + * e-shell-config-default-folders.c: use "contacts", + "contacts/ldap" as the accepted contacts types, so it'll allow + both normal and ldap contact folders. - * e-shell-config-default-folders.c - (e_shell_config_default_folders_create_widget): Do not duplicate - the shell's CORBA objref. +2002-11-26 Ettore Perazzoli - * e-shell-config-autocompletion.c - (e_shell_config_autocompletion_create_widget): Do not duplicate - the shell's CORBA objref. + * main.c (kill_old_wombat): New function to kill running wombat + processes whose version is different from ours, using the + WombatInterfaceCheck interface. + (kill_wombat): New. + (idle_cb): Invoke kill_old_wombat(). -2003-01-10 Dan Winship + * e-storage-set-view.c (path_free_func): New GHFunc to free keys. + (impl_destroy): g_hash_table_foreach() it on + priv->path_to_etree_node befor destroying the hash table. + (e_storage_set_view_set_show_checkboxes): Unref the state object. - * e-storage-set-view.c (popup_folder_menu): Make this work again. + * e-shell-user-creatable-items-handler.c + (append_xml_for_menu_item): Free return value from + bonobo_ui_util_pixbuf_to_xml(). -2003-01-10 Ettore Perazzoli + * e-shell-folder-title-bar.c (create_pixmap_widget_from_xpm): + Unref the pixbuf. - * e-shell-view.c (e_shell_view_save_defaults): Save the expansion - state of the EStorageSetView. - (setup_defaults): Load the expansion state. + * e-corba-storage-registry.c (listener_notify): CORBA_free the + name string. -2003-01-10 Ettore Perazzoli + * e-storage.c (e_storage_has_subfolders): Free local variable + pseudofolder_path. - * e-shell.c (e_shell_request_close_view): Make the view save its - settings as the default ones if it's the last one. +2002-11-25 Dan Winship - * e-shell-view-menu.c (command_quit): Make this view save its - settings as the defaults before quitting. + * e-shell-settings-dialog.c (page_new): e_get_language_list now + returns language codes that actually work with oaf, making the + U_()s here redundant. -2003-01-10 Ettore Perazzoli + * e-component-info.c (get_i18n_value): Remove code to turn "fr_FR" + into "fr", since e_get_language_list will return both now. - * main.c (main): Generate the URI list from the popt context - fetched from the GnomeProgram object. +2002-11-12 Frederic Crozat - * e-shell-view.c (setup_defaults): Removed @setup_default_uri arg. - Don't load any URI here. - (e_shell_view_construct): Open the URI here instead. + reviewed by: Ettore Perazzoli -2003-01-10 Ettore Perazzoli + * e-shell-settings-dialog.c: (page_new): Ensure we get + an UTF-8 translated string. - * e-shell.c (parse_default_uri): Remove bogus is_default check. +2002-11-06 Ettore Perazzoli -2003-01-10 Ettore Perazzoli - - * e-setup.c (set_default_folder_physical_uri_from_path): New - function. - (e_setup_check_config): Call it for each of the *_path keys. Do - not set the default for *_path keys as those come from the GConf - schema anyways. - -2003-01-10 Ettore Perazzoli - - * apps_evolution_shell.schemas: Set defaults for - /apps/evolution/shell/default_folders/... . - - * e-shortcuts-view.c (pop_up_right_click_menu_for_group): Destroy - the popup_menu with gtk_widget_destroy() instead of - gtk_widget_unref(). - -2003-01-10 Not Zed - - * evolution-config-control.c (impl_apply): remove cast to - GTK_OBJECT, it isn't, nor needed. - -2003-01-09 Chris Toshok - - * e-shell-settings-dialog.c (set_dialog_size): use - pango_layout_get_pixel_size here instead of - pango_layout_get_width, which returns 0 (unless it's been set by - the user before, I believe). - -2003-01-09 Ettore Perazzoli - - * evolution-shell-client.c (impl_dispose): Properly reset - activity_interface to NULL. - (evolution_shell_client_construct): Ref the shell object here. - - * e-shell.c (view_weak_notify): Ref the shell since it's being - passed to notify_no_views_left_idle_cb as the data. - (notify_no_views_left_idle_cb): Only unref the shell here. - -2003-01-08 Not Zed - - * e-shell-settings-dialog.c (set_dialog_size): dont unref the - pango context, get_context() doesn't create a ref. - -2003-01-08 Ettore Perazzoli - - * Makefile.am: Images are now in $(datadir)/evolution/images - instead of $(datadir)/images/evolution. - - * e-folder-list.c (e_folder_list_class_init): Remove - "EFolderList::" prefix from the properties. - -2003-01-08 Ettore Perazzoli - - * Makefile.am (evolution_LDFLAGS): -export-dynamic so custom - widgets in libglade work. - -2003-01-07 Dan Winship - - * main.c (main): setup gettext - -2003-01-06 Not Zed - - * evolution-folder-selector-button.c (set_folder): dont - double-free storage_lname. - -2003-01-06 Dan Winship - - * Makefile.am: Remove idldir definition. (It's defined in - configure.in now). - - * importer/Makefile.am: Likewise - -2002-12-19 Ettore Perazzoli - - [With this commit, the shell compiles without deprecated GLib/GTK+ - functions, except for a couple of places were we use GtkCList.] - - * Makefile.am (INCLUDES): Add `-DG_DISABLE_DEPRECATED - -DGTK_DISABLE_DEPRECATED'. - - * evolution-test-component.c (create_new_folder_selector): No - gtk_window_set_policy(). - - * main.c (quit_box_new): gtk_window_set_resizable() instead of - gtk_window_set_policy(). - (view_map_callback): g_signal_handlers_disconnect_by_func() - instead of gtk_signal_disconnect_by_func(). - (main): No need to push the GdkRGB visual/cmap anymore. - (new_view_created_callback): Likewise. - - * e-task-widget.c: Renamed member pixmap of ETaskWidgetPrivate to - `image'. - (init): Updated accordingly. - (e_task_widget_construct): Use GtkImage, not GtkPixmap. - - * e-storage.c (class_init): Converted from gtk_signal_new() to - g_signal_new(). - - * e-storage-set.c (class_init): Converted from gtk_signal_new() to - g_signal_new(). - - * e-storage-set-view.c - (setup_folder_properties_items_if_corba_storage_clicked): - g_string_append_printf() instead of g_string_sprintfa(). - (class_init): Converted from gtk_signal_new() to g_signal_new(). - (setup_folder_changed_callbacks): Use - e_signal_connect_while_alive() and - e_signal_connect_full_while_alive(). - - * e-splash.c (e_splash_construct): gtk_window_set_resizable() - instead of gtk_window_set_policy(). - - * e-shortcuts.c: Do not #include e-unicode.h. - (shortcut_item_update): Use g_path_get_basename() instead of - g_basename(). - (e_shortcuts_add_default_shortcuts): No need to de-utfize strings. - (e_shortcuts_add_default_group): Same here. - - * e-shortcuts-view.c: Do not #include . - (class_init): Converted from gtk_signal_new() to g_signal_new(). - (destroy_group_cb): No need to convert the text from UTF8. - - * e-shell.c (impl_dispose): g_signal_handlers_disconnect_by_func() - instead of gtk_signal_disconnect_by_func(). - (class_init): Use g_signal_new() instead of gtk_signal_new(). - - * e-shell-view.c: Do not #include e-unicode.h. Renamed member - offline_toggle_pixmap to offline_toggle_image in - EShellViewPrivate. - (update_folder_title_bar): No need to de-UTF8-ize the title. - (cleanup_delayed_selection): - g_signal_handlers_disconnect_by_func() instead of - gtk_signal_disconnect_by_func(). - (ui_engine_add_hint_callback): gtk_label_set_text(), not - gtk_label_set(). - (class_init): Use g_signal_new() instead of gtk_signal_new(). - (update_for_current_uri): No need to convert the title from UTF8. - (setup_offline_toggle): Changed to set up a GtkImage, not a - GtkPixmap. - (update_offline_toggle_status): Accordingly (gtk_image* instead of - gtk_pixmap*). - (set_current_notebook_page): gtk_notebook_set_current_page(), not - gtk_notebook_set_page(). - (get_storage_set_path_from_uri): g_ascii_strncasecmp() instead of - g_strncasecmp(). - (folder_bar_popup_map_callback): Use - e_signal_connect_while_alive() instead of - gtk_signal_connect_while_alive(). - (e_shell_view_construct): Likewise. - (display_uri): g_signal_connect_after() instead of - gtk_signal_connect_full(). - (update_for_current_uri): - g_signal_handlers_{block,unblock}_by_func() instead of - gtk_signal_handler_{block,unblock}_by_func(). - - * e-shell-view-menu.c (command_about_box): - gtk_window_set_resizable() instead of gtk_window_set_policy(). - - * e-shell-utils.c (get_mini_name): g_path_get_basename() instead - of g_basename(). - - * e-shell-user-creatable-items-handler.c - (append_xml_for_menu_item): g_string_append_printf() instead of - g_string_sprintfa(). - (create_menu_xml): Likewise. - - * e-shell-shared-folder-picker-dialog.c: Do not #include - e-unicode.h. - (progress_bar_timeout_callback): Expect a GtkProgressBar data and - just use gtk_progress_bar_pulse(). - (create_progress_dialog): gtk_window_set_resizable() instead of - gtk_window_set_policy(). No gtk_progress_set_activity_mode(). - (setup_server_option_menu): Just use - gtk_menu_item_new_with_label() instead of - e_utf8_gtk_menu_item_new_with_label(). - - * e-shell-settings-dialog.c (set_dialog_size): Ported to Pango. - - * e-shell-offline-sync.c - (impl_SyncFolderProgressListener_updateProgress): - gtk_progress_set_fraction() instead of - gtk_progress_bar_set_percentage(). - (sync_folder): Likewise. - (setup_dialog): gtk_window_set_resizable() instead of - gtk_window_set_policy(). - (sync_folder): No gtk_progress_set_activity_mode(). - - * e-shell-offline-handler.c: #undef {G,GTK}_DISABLE_DEPRECATED - here for now (need to port from GtkCList). - (class_init): Use g_signal_new() - - * e-shell-importer.c: #undef {G,GTK}_DISABLE_DEPRECATED here for - now (need to port from GtkCList). - - * e-shell-folder-title-bar.c (create_image_widget_from_xpm): - Renamed from create_pixmap_widget_from_xpm(); handle GtkImage - instead of GtkPixmap. - (new_empty_image_widget): Renamed from new_empty_pixmap_widget(); - return a GtkImage instead of a GtkPixmap. - (add_navigation_buttons): Updated accordingly; so use GtkImages - instead of GtkPixmaps. - (e_shell_folder_title_bar_construct): Likewise. - (e_shell_folder_title_bar_set_icon): Use gtk_image_* instead of - gtk_pixmap_* on the image widgets. - (class_init): Converted to use g_signal_new() instead of - gtk_signal_new(). - (e_shell_folder_title_bar_new): No need for pushing the GdkRGB - visual/cmap anymore. - - * e-shell-folder-selection-dialog.c (check_folder_type_valid): - Just use strcmp instead of strcasecmp(). - (class_init): g_signal_new() instead of gtk_signal_new(). - (e_shell_folder_selection_dialog_construct): Removed call to - gtk_window_set_policy(). - - * e-shell-folder-creation-dialog.c - (type_with_display_name_compare_func): Changed to use - g_utf8_casefold(). - - * e-shell-folder-commands.c: Do not #include e-unicode.h. - (e_shell_command_rename_folder): g_path_get_dirname() instead of - g_dirname(). - (folder_selection_dialog_folder_selected_callback): - g_path_get_basename() instead of g_basename(). - (rename_cb): Likewise. - (delete_dialog): Do not convert from UTF8 for display purposes. - (e_shell_command_rename_folder): Likewise. - - * e-shell-about-box.c (timeout_callback): Ported to Pango and use - gdk_window_invalidate_rect() instead of gtk_widget_draw(). - - * e-setup.c (check_evolution_directory): Use - gtk_window_set_resizable() instead of gtk_window_set_policy(). - - * e-local-storage.c: Do not include e-unicode.h. - (create_folder): Use g_path_get_basename() instead of - g_basename(). - (create_folder_directory): Likewise. - (remove_folder_directory): Likewise. - (append_xfer_item_list): Likewise. - - * e-local-folder.c (construct_loading_metadata): Use - g_path_get_basename() instead of g_basename(). - - * e-folder-dnd-bridge.c (handle_evolution_path_drag_motion): Use - g_path_get_basename() instead of g_basename(). - - * e-corba-storage-registry.c: G_STRUCT_OFFSET instead of - GTK_STRUCT_OFFSET. - - * e-corba-shortcuts.c: G_STRUCT_OFFSET instead of - GTK_STRUCT_OFFSET. - - * e-component-registry.c - (sleep_with_g_main_loop_timeout_callback): g_main_loop_* instead - of g_main_*. - (sleep_with_g_main_loop): Likewise. - - * e-activity-handler.c: G_STRUCT_OFFSET instead of - GTK_STRUCT_OFFSET. - - * evolution-wizard.c (evolution_wizard_class_init): g_signal_new() - instead of gtk_signal_new(). - - * evolution-storage-listener.c (class_init): g_signal_new() - instead of gtk_signal_new(). - - * evolution-shell-view.c (class_init): g_signal_new() instead of - gtk_signal_new(). - - * evolution-shell-component-dnd.c: G_STRUCT_OFFSET instead of - GTK_STRUCT_OFFSET. - - * evolution-shell-component.c: G_STRUCT_OFFSET instead of - GTK_STRUCT_OFFSET. - - * evolution-session.c: G_STRUCT_OFFSET instead of - GTK_STRUCT_OFFSET. - - * evolution-folder-selector-button.c: Do not include e-unicode.h. - (set_folder): No need to convert from UTF8 to locale encoding - anymore. Removed unused variable. - - * evolution-config-control.c (class_init): Use g_signal_new() - instead of gtk_signal_new(). - - * evolution-activity-client.c (class_init): Use g_signal_new() - instead of gtk_signal_new(). - - * e-folder-list.c: Do not include e-unicode.h. Use E_MAKE_TYPE(). - (e_folder_list_get_type): Removed explicit implementation of this. - (e_folder_list_set_arg): Removed. - (e_folder_list_get_arg): Removed. - (e_folder_list_set_property): New. - (e_folder_list_get_property): New. - (e_folder_list_destroy): Removed. - (e_folder_list_dispose): New. - (e_folder_list_class_init): Updated accordingly. - - * e-folder.c (impl_save_info): Use G_OBJECT_TYPE_NAME() instead of - gtk_type_name(). - (impl_load_info): Likewise. - (impl_remove): Likewise. - (class_init): Use g_signal_new() instead of gtk_signal_new(). - -2002-12-16 Jeffrey Stedfast - - * e-shell-importer.c: Don't #include "e-util/e-html-utils.h" as - we don't use it. - -2002-12-13 Chris Toshok - - [ fixes bug #35394 ] - - * e-shell-shared-folder-picker-dialog.c (setup_name_selector): - return the SelectNames corba interface too. - (show_dialog): unref the corba interface when closing the dialog. - -2002-12-05 Chris Toshok - - * e-shell-config-default-folders.c: use "contacts", - "contacts/ldap" as the accepted contacts types, so it'll allow - both normal and ldap contact folders. - -2002-12-04 Ettore Perazzoli - - * e-component-registry.c (component_free): Only invoke - wait_for_corba_object_to_die on components that are out-of-proc. - -2002-11-27 Not Zed - - * main.c (show_development_warning): changed to use a gtkdialog - instead of a gnome one. - (warning_dialog_response_callback): clicked->response. - - * e-shell-folder-selection-dialog.c: Include gtk/gtkstock.h - - * e-shell-folder-creation-dialog.c: include gnome-dialog.h - (dialog_response_cb): gtk_entry_get_text now returns const. Dont - free result. - - * e-setup.c: include gnome-messagebox.h - - * *.c: (re)run fix.sh over all, for e_notice changes & pick up - some deprecated functions. - - * e-shell-shared-folder-picker-dialog.c - (shared_folder_discovery_callback): reformat e_notice call for - script. - - * e-shell-offline-sync.c - (impl_SyncFolderProgressListener_reportFailure): Fix e_notice - call, we weren't passing type in. - - * e-shell-folder-commands.c (xfer_result_callback): changed around - slightly to save some processing & allow a script to run. - (e_shell_command_rename_folder): reformat e_notice call to help script. - Include gnome-messagebox.h - -2002-11-25 Dan Winship - - * e-shell-settings-dialog.c (page_new): e_get_language_list now - returns language codes that actually work with oaf, making the - _()s here redundant. - - * e-component-info.c (get_i18n_value): Remove code to turn "fr_FR" - into "fr", since e_get_language_list will return both now. - -2002-11-25 Ettore Perazzoli - - * apps_evolution_shell.schemas: Fix -> typo. - -2002-11-25 Ettore Perazzoli - - * e-shell-offline-sync.c (e_shell_offline_sync_all_folders): - Filled in, use GConf. - (cleanup): Re-enabled again. - (sync_folder): Likewise. - (progress_dialog_close_callback): Likewise. - (progress_dialog_clicked_callback): Likewise. - (setup_dialog): Likewise. - (setup_progress_listener): Likewise. - (impl_SyncFolderProgressListener_reportFailure): Likewise. - (impl_SyncFolderProgressListener_reportSuccess): Likewise. - (impl_SyncFolderProgressListener_updateProgress): Likewise. - (progress_listener_servant_free): Likewise. - (progress_listener_servant_new): Likewise. - -2002-11-25 Ettore Perazzoli - - * evolution-storage-set-view.c - (impl_StorageSetView__set_checkedFolders): Updated to pass a - GSList to e_storage_set_view_set_checkboxes_list() [instead of a - GList]. - (impl_StorageSetView__get_checkedFolders): Likewise with the - return value from e_storage_set_view_get_checkboxes_list(). - - * e-shell-config-offline.c (config_control_apply_callback): Filled - in, using GConf. - (init_storage_set_view_status_from_config): Likewise. - - * e-storage-set-view.c (e_storage_set_view_get_checkboxes_list): - Return a GSList instead of a GList. - (essv_add_to_list): Update for the GSList. - (e_storage_set_view_set_checkboxes_list): Get a GSList instead of - a GList. - - * apps_evolution_shell.schemas: Added - /schemas/apps/evolution/shell/offline/folder_paths. - -2002-11-20 Ettore Perazzoli - - * main.c (idle_cb): Set displayed_any in the case when we are - calling e_shell_create_view(). Also initialize displayed_any to - FALSE earlier so we dont' end up opening two views at startup by - default. - -2002-11-20 Ettore Perazzoli - - * e-shell-folder-selection-dialog.c (impl_dispose): Save the - expansion state for the EStorageSetView here. - (impl_finalize): Instead of here. - -2002-11-20 Chris Toshok - - * e-folder-list.c (e_folder_list_class_init): use e_shell_ - marshallers, and make sure STRING parameters map to *_STRING* - marshallers. - - * evolution-wizard.c (evolution_wizard_class_init): same. - - * evolution-storage.c (class_init): same. - - * evolution-storage-set-view-listener.c (class_init): same. - - * evolution-storage-listener.c (class_init): same. - - * evolution-shell-view.c (class_init): same. - - * evolution-session.c (class_init): same. - - * evolution-folder-selector-button.c (class_init): same. - - * evolution-config-control.c (class_init): same. - - * evolution-activity-client.c (class_init): same. - - * e-storage-set.c (class_init): same. - - * e-shortcuts.c (class_init): same. - - * e-shortcuts-view.c (class_init): same. - - * e-shell.c (class_init): same. - - * e-shell-view.c (class_init): same. - - * e-shell-offline-handler.c (class_init): same. - - * e-shell-folder-title-bar.c (class_init): same. - - * e-shell-folder-selection-dialog.c (class_init): same. - - * e-folder.c (class_init): same. - - * e-shell-marshal.list: add all the STRING marshallers. - -2002-11-20 Not Zed - - * e-shell-importer.c (prepare_intelligent_page): gnome message box - -> gtk message dialog. - (prepare_intelligent_page): Fix the signature on this. This could - NEVER have worked. - -2002-11-19 Ettore Perazzoli - - * main.c (upgrade_from_1_0_if_needed): Disabled for now. - - * e-shell-startup-wizard.c: Removed member config_listener from - struct SWData. - (e_shell_startup_wizard_create): Updated accordingly, just use - GConf, checking the /apps/evolution/mail/account-list key. - (finish_func): Use GConf. - - * e-shell-config-default-folders.c: Removed member config_listener - in struct EvolutionDefaultFolderConfig. - (e_shell_config_default_folders_create_widget): Do not initialize - here. GConfified the paths. - (config_control_destroy_notify): No unref of the config_listener - anymore. - (config_control_apply_cb): Use GConf. - (setup_folder_selector): Likewise. - - * e-shell-config-autocompletion.c: Removed member config_listener - from EvolutionAutocompletionConfig. - (config_control_destroy_notify): Do not unref. - (config_control_apply_callback): Use a GConfClient. - - * e-folder-list.c (e_folder_list_init): Add missing cast. - - * main.c (show_development_warning): Use GConf. - - * e-setup.c (e_setup_check_config): Removed arg @listener. - GConfified. - - * e-shell-view.c (e_shell_view_save_defaults): New. - (e_shell_view_save_settings): Removed. - (e_shell_view_load_settings): Removed. - (setup_defaults): New helper function. - (e_shell_view_construct): New arg @uri. - (e_shell_view_new): New arg @uri. - - * e-shell.c: Removed member config_listener in struct - EShellPrivate. - (impl_dispose): Do not unref. - (init): Do not initialize. - (get_config_start_offline): New helper function. - (e_shell_construct): Use this to get the startup mode in case - E_SHELL_STARTUP_LINE_MODE_CONFIG. - (save_misc_settings): Changed to use GConfClient instead of - EConfigListener. - (e_shell_create_view_from_settings): Removed. - (e_shell_restore_from_settings): Removed. - (e_shell_get_config_listener): Removed. - (e_shell_disconnect_db): Removed. - (parse_default_uri): Use GConf. - - * main.c (idle_cb): Simplified the logic here. Always assume that - the view will be created with the default folder open by just - using e_shell_create_view(). - -2002-11-19 Not Zed - - * e-shell-shared-folder-picker-dialog.c (show_dialog): Pass type - to bonobo_widget::set_property. - -2002-11-18 Not Zed - - * e-shell-view-menu.c (file_verbs[]): re-enable importer wizard. - - * importer/importer.c (dialog_response_cb): from clicked_cb. - (start_import): gtkdialogise. - - * e-shell-importer.c: removed redundant header. - (create_html): Removed utf8 from locale stuff. - (get_name_from_component_info): oaf->bonobo activation. - (get_iid_for_filetype): " - (create_plugin_menu): Likewise, and change oafiid to bonoboiid - (get_intelligent_importers): " - (prepare_intelligent_page): " - (show_import_wizard): add null domain to glade_xml_new. - (choose_importer_from_list): gtkdialogise. - (dialog_response_cb): changed from dialog_clicked_cb. - (start_import): gtkdialogise. - (show_error): use gtk message box. - (error_response_cb): callback to close error box. - (show_import_wizard): gnome_druid_page_start/finish -> - gnome_druid_page_edge. - (prepare_file_page): - (filename_changed): set HELP button insensitive. - (create_plugin_menu): casts for warnings and fix a typo, - set_data->set_data_full. - (import_druid_finish): folder_selection_dialog api change(?), - allow create. - (dialog_weak_notify): renamed from close_dialog(). - (show_import_wizard): remove gnome_dialog_close_hides -> its a - gtkwindow anyway(!). - - * Makefile.am (evolution_LDADD): Added back importer. - (evolution_SOURCES): Added back importer. - - * importer/intelligent.c (get_intelligent_importers): - bonobo-activationised. - (create_gui): gtkdialogise. - (intelligent_importer_init): gtkdialogise. - (create_gui): remove gnome_util_user_home(). - (intelligent_importer_init): " - - * importer/evolution-importer.c (finalise): from destroy. - (evolution_importer_new): type_new->object_new. - - * importer/evolution-importer-listener.c (finalise): from destroy. - (evolution_importer_listener_new): type_new->object_new. - - * importer/evolution-importer-client.c (destroy): removed, as it - wasn't used anyway. - (evolution_importer_client_new): g_object_new. - (finalise): added, tho doesn't do anythign yet, should it unref - the client->objref? This whole class doesn't seem much use. - - * importer/evolution-importer-client.h: removed - bonobo-object-client, change to g_object. - - * importer/*.[ch]: ran fix script over everything. - - * importer/evolution-intelligent-importer.c: gobjectise. - (finalise): renamed from destroy. - (evolution_intelligent_importer_new): gtk_type_new -> g_object_new - -2002-11-18 Chris Toshok - - * importer/import.glade: run libglade-convert. - -2002-11-16 Chris Toshok - - * e-folder-list.c (e_folder_list_init): force the scrolled table - to be shown, apparently a bug in libglade2. - - * e-shell-config-default-folders.c (setup_folder_selector): same, - but with the evolution-folder-selector-button's. - -2002-11-16 Chris Toshok - - * e-shell-settings-dialog.c (load_pages): init the corba exception - before loading each config page, so previous errors don't make - subsequence pages to fail to load. - -2002-11-15 Ettore Perazzoli - - * Makefile.am: Added rule to generate - GNOME_Evolution_Shell.server.in from - GNOME_Evolution_Shell.server.in.in, substituting @BINDIR@. - - * GNOME_Evolution_Shell.server.in.in: Renamed from - GNOME_Evolution_Shell.server.in. Prepend @BINDIR@ to the location - of the executable. - -2002-11-15 Ettore Perazzoli - - * evolution-storage.c (impl_finalize): Fix typo; p -> sp. - -2002-11-15 Ettore Perazzoli - - * e-activity-handler.c (impl_operationStarted): No need to check - for priv being NULL here anymore. - (impl_operationProgressing): Likewise. - (impl_operationFinished): Likewise. - (impl_requestDialog): Likewise. - - * evolution-folder-selector-button.c (clicked): Use - g_object_add_weak_pointer() on the parent_window instead of using - GTK_OBJECT_DESTROYED(). - -2002-11-15 Ettore Perazzoli - - * e-shell-startup-wizard.c (e_shell_startup_wizard_create): For - now, always return TRUE. - -2002-11-14 Ettore Perazzoli - - * evolution-shell-client.c (class_init): Pass the right parent - type to gtk_type_class(). - -2002-11-14 Ettore Perazzoli - - * e-shell-user-creatable-items-handler.c, - * e-shell-user-creatable-items-handler.c: Changed into a GObject - subclass instead of a GtkObject subclass. - - * e-component-registry.c, - * e-component-registri.h: Changed into a GObject subclass instead - of a GtkObject subclass. - - * evolution-shell-view.c (impl_ShellView_set_message): Remove - bogus GTK_OBJECT() cast in call to g_signal_emit(). - (impl_ShellView_unset_message): Likewise. - (impl_ShellView_change_current_view): Likewise. - (impl_ShellView_set_title): Likewise. - - * e-shell-view.c (init): Ref/sink the GtkTooltips. - - * e-uri-schema-registry.c (schema_handler_free): g_object_unref() - on the component instead of bonobo_object_unref(). - -2002-11-14 Ettore Perazzoli - - * main.c (no_views_left_cb): Use bonobo_main_quit() instead of - gtk_main_quit(). - (shell_weak_notify): Likewise. - (idle_cb): Likewise. - - * e-shell.c (notify_no_views_left_idle_cb): New idle function to - emit the "no_views_left" signal. - (view_weak_notify): Put it on the idle loop instead of firing the - signal here. - - * e-task-widget.c (e_task_widget_construct): Ref/sink the - GtkTooltips object. - -2002-11-14 Ettore Perazzoli - - * e-shell.c (save_settings_for_views): Removed. - (e_shell_save_settings): Do not call it here. - -2002-11-14 Ettore Perazzoli - - * e-storage-set-view.c (impl_dispose): NULL priv->ui_component - after unreffing it. - -2002-11-14 Ettore Perazzoli - - * evolution-shell-component-client.c (destroy_listener_interface): - Avoid freeing the servant for now, it looks like something is - messed up and this causes a crash on exit. - - * evolution-storage-set-view-listener.c (impl_finalize): Do not - invoke POA_GNOME_Evolution_StorageSetViewListener__fini(). - - * evolution-storage-listener.c (impl_finalize): Do not invoke - POA_GNOME_Evolution_StorageListener__fini(). - - * e-shell-offline-sync.c (progress_listener_servant_free): Do not - invoke POA_GNOME_Evolution_SyncFolderProgressListener__fini(). - - * e-shell-offline-handler.c (progress_listener_servant_free): Do - not invoke POA_GNOME_Evolution_OfflineProgressListener__fini(). - - * e-corba-storage.c (impl_dispose): Do not invoke - POA_GNOME_Evolution_StorageListener__fini(). - - * evolution-shell-component-client.c (destroy_listener_interface): - Do not invoke POA_GNOME_Evolution_ShellComponentListener__fini(). - -2002-11-14 Ettore Perazzoli - - * main.c (quit_box_destroyed_callback): Removed. - (no_views_left_cb): Use g_object_add_weak_pointer() instad of - connecting to the "destroy" signal. - (destroy_cb): Removed. - (shell_weak_notify): New. - (idle_cb): Use g_object_weak_ref() on the shell object instead of - connecting to the "destroy" signal. - - * evolution-test-component.c (dialog_destroy_callback): Removed. - (dialog_weak_notify): New. - (create_new_folder_selector): Use g_object_weak_ref() on the - dialog instead of connecting the "destroy" signal. - - * e-shortcuts.c (view_destroyed_cb): Removed. - (view_weak_notify): New. - (e_shortcuts_new_view): g_object_weak_ref() the new view instead - of connecting the "destroy" signal. - (impl_dispose): Free the ->views and g_object_weak_unref() all the - items. - - * e-shell.c (view_destroy_cb): Removed. - (view_weak_notify): New. - (create_view): Use g_object_weak_ref() on the newly created view - instead of connecting to the "destroy" signal. - (impl_dispose): g_object_weak_unref() the views. - (e_shell_show_settings): Use g_object_add_weak_pointer() on the - settings_dialog instead of connecting to the "destroy" signal. - (settings_dialog_destroy_cb): Removed. - - * e-shell-shared-folder-picker-dialog.c - (progress_bar_weak_notify): New. - (progress_bar_destroy_callback): Removed. - (create_progress_dialog): Use g_object_weak_ref() on the progress - bar object instead of connecting to its "destroy" signal. - (shell_destroy_callback): Removed. - (shell_view_destroy_callback): Removed. - (storage_destroy_callback): Removed. - (shell_weak_notify): New. - (shell_view_weak_notify): New. - (storage_weak_notify): New. - (discover_folder): Use g_object_weak_ref() on the shell, parent, - storage objects instead of connecting to their "destroy" signals. - - * e-shell-importer.c: Removed member destroyed from - ImporterComponentData. - (import_cb): Instead of checking if ->destroyed is TRUE, check if - ->dialog is NULL to decide whether the dialog has been destroyed - or not. - (dialog_destroy_cb): Removed. - (start_import): Use g_object_weak_ref() on the dialog object - instead of connecting to its "destroy" signal. - (dialog_close): Removed. - (dialog_weak_notify): New. - (show_import_wizard): Use g_object_weak_ref() on the dialog object - instead of connecting to its "destroy" signal. - (import_druid_destroy): New. - (import_druid_weak_notify): New. - (show_import_wizard): Use g_object_weak_ref() on the druid object - instead of connecting to its "destroy" signal. - - * e-shell-folder-selection-dialog.c - (e_shell_folder_selection_dialog_construct): g_object_weak_ref() - the shell object instead of connecting to its "destroy" signal. - - * e-shell-folder-creation-dialog.c (dialog_destroy_cb): Removed. - (dialog_destroy_notify): New. - (e_shell_show_folder_creation_dialog): g_object_weak_ref() the - dialog instead of connecting to its "destroy" signal. - (shell_destroy_cb): Removed. - (shell_destroy_notify): New. - (e_shell_show_folder_creation_dialog): g_object_weak_ref() the - shell object instead of connecting to its "destroy" signal. - - * e-shell-config-offline.c (config_control_destroy_callback): - Removed. - (config_control_destroy_notify): New. - (e_shell_config_offline_create_widget): g_object_weak_ref() the - config_control instead of connecting to its "destroy" signal. - - * e-shell-config-default-folders.c - (config_control_destroy_callback): Removed. - (config_control_destroy_notify): New. - (e_shell_config_default_folders_create_widget): - g_object_weak_ref() instead of connecting to the "destroy" signal. - - * e-shell-config-autocompletion.c (config_control_destroy_notify): - New. - (config_control_destroy_callback): Removed. - (e_shell_config_autocompletion_create_widget): - g_object_weak_ref() instead of connecting to the "destroy" signal. - - * e-activity-handler.c (task_bar_destroy_cb): Removed. - (task_bar_destroy_notify): New. - (e_activity_handler_attach_task_bar): Weak_ref the task_bar using - task_bar_destroy_notify. - (impl_dispose): Weak_unref the task bars in priv->task_bars. - -2002-11-13 Ettore Perazzoli - - * e-shell-startup-wizard.c: Change type of member etd in - TimezoneDialogPage to GObject from GtkObject. - (make_timezone_page): Cast to G_OBJECT() not GTK_OBJECT(). - -2002-11-13 Ettore Perazzoli - - * e-shell-startup-wizard.c (e_shell_startup_wizard_create): - Connect finish_func to the "next" signal for now, since GnomeDruid - seems to be borked. - - * e-uri-schema-registry.c (schema_handler_new): g_object_ref() - @component instead of bonobo_object_ref(). - - * e-local-storage.c (create_folder): g_object_ref() for the - component_client, instead of bonobo_object_ref(). - (remove_folder_step): Likewise. - -2002-11-13 Not Zed - - * evolution-storage.c: remove GTK_OBJECT cast and other GTK stuff. - - * evolution-storage.h: this is a gobject not a gtkobject, fix cast - macros, and get_type call. - -2002-11-11 Chris Toshok - - * e-task-widget.c (impl_finalize): need to assign priv here, fixes - a crash. - -2002-11-11 Ettore Perazzoli - - * e-shell.c (impl_dispose): Do unref the config_listener here [I - fixed the finalize crash we were getting]. - -2002-11-11 Ettore Perazzoli - - * e-storage-set-view.c (impl_finalize): Protect against - priv->checkboxes being NULL. - -2002-11-11 Ettore Perazzoli - - * e-component-registry.c: Make separate dispose/finalize overrides - of just overriding destroy. - * e-corba-config-page.c: Likewise. - * e-corba-storage.c: Likewise. - * e-folder-type-registry.c: Likewise. - * e-folder.c: Likewise. - * e-history.c: Likewise. - * e-local-folder.c: Likewise. - * e-local-storage.c: Likewise. - * e-shell-folder-selection-dialog.c: Likewise. - * e-shell-folder-title-bar.c: Likewise. - * e-shell-offline-handler.c: Likewise. - * e-shell-settings-dialog.c: Likewise. - * e-shell-user-creatable-items-handler.c: Likewise. - * e-shell-view.c: Likewise. - * e-shortcuts-view-model.c: Likewise. - * e-shortcuts-view.c: Likewise. - * e-shortcuts.c: Likewise. - * e-storage-set-view.c: Likewise. - * e-storage-set.c: Likewise. - * e-storage.c: Likewise. - * e-task-bar.c: Likewise. - * e-task-widget.c: Likewise. - * e-uri-schema-registry.c: Likewise. - * evolution-activity-client.c: Likewise. - * evolution-folder-selector-button.c: Likewise. - * evolution-storage-listener.c: Likewise. - * evolution-storage-set-view-listener.c: Likewise. - * evolution-test-component.c: Likewise. - -2002-11-08 Rodrigo Moya - - * importer/Makefile.am: use correctly IDL flags. - -2002-11-07 Chris Toshok - - * e-task-widget.c (impl_destroy): guard against multiple calls. - fixes a crash whenever a task finishes (the addressbook finishing - loading, etc.). - - * e-shell-marshal.list: add NONE:BOOL for - evolution-shell-component. - - * evolution-shell-component.c (class_init): register the signals - with g_signal_new. - -2002-11-05 Ettore Perazzoli - - * e-shell.c (e_shell_show_settings): Allow type being NULL. - -2002-11-05 Ettore Perazzoli - - * e-local-storage.c (load_folder): Do add folders with an unknown - type. - -2002-11-05 Ettore Perazzoli - - * glade/e-shell-folder-creation-dialog.glade (ok_button): Set - response_id to GTK_RESPONSE_OK. - (cancel_button): Likewise, with GTK_RESPONSE_CANCEL. - - * e-shell-folder-creation-dialog.h, - e-shell-folder-creation-dialog.c: Ported to GtkDialog. - -2002-11-05 Ettore Perazzoli - - * e-folder-list.c: Use g_object_get_data() instead of - gtk_object_get_data(). - * e-shell-config-default-folders.c: Likewise. - * e-shell-folder-creation-dialog.c: Likewise. - * e-shell-importer.c: Likewise. - * e-shell-shared-folder-picker-dialog.c: Likewise. - * e-shell-user-creatable-items-handler.c: Likewise. - * e-shell-view.c: Likewise. - * e-shell.c: Likewise. - * e-storage.c: Likewise. - -2002-11-05 Ettore Perazzoli - - * e-activity-handler.c: Split finalize/dispose. - * e-corba-shortcuts.c: Likewise. - * e-corba-storage-registry.c: Likewise. - * e-shell-about-box.c: Likewise. - * e-shell.c: Likewise. - * e-splash.c: Likewise. - * evolution-config-control.c: Likewise. - * evolution-session.c: Likewise. - * evolution-shell-component.c: Likewise. - * evolution-shell-view.c: Likewise. - * evolution-storage-set-view.c: Likewise. - * evolution-storage.c: Likewise. - * evolution-wizard.c: Likewise. - -2002-11-05 Ettore Perazzoli - - * All: g_object_unref instead of bonobo_object_unref for the - EvolutionShellComponentClient and EvolutionShellClient interfaces. - -2002-11-05 Ettore Perazzoli - - * evolution-shell-client.c (impl_dispose): New. - (impl_finalize): New. - (destroy): Removed. - (class_init): Install dispose, finalize handlers. - - * All: Use evolution_shell_client_corba_objref() or - evolution_shell_component_client_corba_objref() instead of - BONOBO_OBJREF() or bonobo_object_corba_objref() where needed. - - * e-folder-type-registry.c (set_handler): Use g_object_ref() for - the handler, not bonobo_object_ref(). - (folder_type_free): Likewise for unref. - - * evolution-shell-component-client.c - (evolution_shell_component_client_corba_objref): New. - (impl_dispose): Moved from impl_destroy; only unref things. - (impl_finalize) New. - (class_init): Install dispose/finalize. - (evolution_shell_component_client_get_dnd_source_interface): Use - priv->corba_objref instead of bonobo_object_corba_objref() since - we are not a BonoboObject anymore. - (evolution_shell_component_client_get_dnd_destination_interface): - Likewise. - (evolution_shell_component_client_get_offline_interface): Likewise. - (evolution_shell_component_client_set_owner): Likewise. - (evolution_shell_component_client_unset_owner): Likewise. - (evolution_shell_component_client_create_view): Likewise. - (evolution_shell_component_client_handle_external_uri): Likewise. - (evolution_shell_component_client_async_create_folder): Likewise. - (evolution_shell_component_client_async_xfer_folder): Likewise. - (evolution_shell_component_client_populate_folder_context_menu): Likewise. - (evolution_shell_component_client_unpopulate_folder_context_menu): Likewise. - - * e-component-registry.c (register_component): Use - evolution_shell_component_client_corba_objref(). - (e_component_registry_restart_component): Likewise. - (component_free): Likewise. - - * evolution-shell-component-client.c: g_object_new() instead of gtk_type_new(). - * e-component-registry.c: Likewise. - * e-corba-config-page.c - * e-folder-list.c: Likewise. - * e-folder-type-registry.c: Likewise. - * e-folder.c: Likewise. - * e-gray-bar.c: Likewise. - * e-history.c: Likewise. - * e-local-folder.c: Likewise. - * e-local-folder.c: Likewise. - * e-local-storage.c: Likewise. - * e-shell-about-box.c: Likewise. - * e-shell-config-default-folders.c: Likewise. - * e-shell-folder-selection-dialog.c: Likewise. - * e-shell-folder-title-bar.c: Likewise. - * e-shell-offline-handler.c: Likewise. - * e-shell-settings-dialog.c: Likewise. - * e-shell-user-creatable-items-handler.c: Likewise. - * e-shell-view.c: Likewise. - * e-shortcuts-view-model.c: Likewise. - * e-shortcuts-view.c: Likewise. - * e-shortcuts.c: Likewise. - * e-splash.c: Likewise. - * e-storage-set-view.c: Likewise. - * e-storage-set.c: Likewise. - * e-storage.c: Likewise. - * e-task-bar.c: Likewise. - * e-task-widget.c: Likewise. - * e-uri-schema-registry.c: Likewise. - * evolution-activity-client.c: Likewise. - * evolution-folder-selector-button.c: Likewise. - * evolution-shell-client.c: Likewise. - * evolution-shell-view.c: Likewise. - * evolution-storage-listener.c: Likewise. - * evolution-storage-set-view-listener.c: Likewise. - * evolution-storage-set-view.c: Likewise. - * evolution-wizard.c: Likewise. - - * GNOME_Evolution_TestComponent.server: Renamed from - GNOME_Evolution_TestComponent.oaf. - - * evolution-test-component.c (spit_out_shortcuts): Use - BONOBO_EX_REPOID(). - (create_new_folder_selector): Ported to use GtkDialog instead of - GnomeDialog. - (storage_cancel_discover_shared_folder_callback): Add missing - G_OBJECT() cast. - (shared_folder_discovery_timeout_callback): Likewise. - (storage_discover_shared_folder_callback): Likewise. - (timeout_callback_2): Likewise. - (timeout_callback_1): Likewise. - (shared_folder_discovery_timeout_callback): Use - g_object_get_data() instead of gtk_object_get_data(). - (storage_cancel_discover_shared_folder_callback): Likewise. - (timeout_callback_2): Likewise. - (timeout_callback_2): g_timeout_add() instead of - gtk_timeout_add(). - (create_view_fn): Likewise. - (timeout_callback_1): Likewise. - (timeout_callback_1): Pass NULL as the error arg to - gdk_pixbuf_new_from_file(). - (register_component): Use bonobo-activation instead of OAF. - - * e-shell-about-box.c (impl_destroy): Removed. - (impl_finalize): New. - (class_init): Install finalize handler, not destroy. - - * e-shell-view-menu.c (command_about_box): Use a GtkWindow again. - Set the GTK_WINDOW_TYPE_HINT_DIALOG hint. - - * e-shell-about-box.c (e_shell_about_box_construct): Removed. - -2002-11-04 Ettore Perazzoli - - * e-shell-folder-commands.c (e_shell_command_copy_folder): Pass - TRUE for arg allow_creation to - e_shell_folder_selection_dialog_new(). - (e_shell_command_move_folder): Likewise. - * e-shell-view-menu.c (command_goto_folder): Likewise. - (command_new_shortcut): Likewise. - * e-shell.c (impl_Shell_selectUserFolder): Likewise. - - * e-shell-folder-selection-dialog.c - (e_shell_folder_selection_dialog_set_allow_creation): Removed. - (e_shell_folder_selection_dialog_get_allow_creation): Removed. - (e_shell_folder_selection_dialog_new): New arg allow_creation. - (e_shell_folder_selection_dialog_construct): Likewise. Also, do - set priv->shell. - - * e-shell-folder-selection-dialog.h, - e-shell-folder-selection-dialog.c: Port to GtkDialog. - -2002-11-04 Ettore Perazzoli - - * e-folder-type-registry.c - (e_folder_type_registry_get_handler_for_type): Remove warning for - when the type is unknown. - (e_folder_type_registry_type_is_user_creatable): Likewise. - (e_folder_type_registry_get_display_name_for_type): Likewise. - (e_folder_type_registry_get_description_for_type): Likewise. - (e_folder_type_registry_get_exported_dnd_types_for_type): - Likewise. - (e_folder_type_registry_get_accepted_dnd_types_for_type): - Likewise. - (e_folder_type_registry_unregister_type): Likewise. - (e_folder_type_registry_get_icon_name_for_type): Likewise. - (e_folder_type_registry_get_icon_for_type): Likewise. - (set_handler): Removed warning here too. - -2002-11-04 Ettore Perazzoli - - * e-folder-list.c: Replace gtk_signal_emit() with g_signal_emit(). - * e-folder.c: Likewise. - * e-shell-folder-selection-dialog.c: Likewise. - * e-shell-folder-title-bar.c: Likewise. - * e-shell-offline-handler.c: Likewise. - * e-shell-view.c: Likewise. - * e-shortcuts-view.c: Likewise. - * e-shortcuts.c: Likewise. - * e-storage-set-view.c: Likewise. - * e-storage-set.c: Likewise. - * e-storage.c: Likewise. - * evolution-activity-client.c: Likewise. - * evolution-folder-selector-button.c: Likewise. - * evolution-storage-listener.c: Likewise. - * evolution-storage-set-view-listener.c: Likewise. - -2002-11-04 Ettore Perazzoli - - * e-folder-list.c: Use g_object_set_data() instead of - gtk_object_set_data(). - * e-shell-config-default-folders.c: Likewise. - * e-shell-folder-creation-dialog.c: Likewise. - * e-shell-importer.c: Likewise. - * e-shell-shared-folder-picker-dialog.c: Likewise. - * e-shell-user-creatable-items-handler.c: Likewise. - * e-shell-view.c: Likewise. - * e-shell.c: Likewise. - * e-storage-set-view.c: Likewise. - * e-storage.c: Likewise. - * evolution-test-component.c: Likewise. - - * e-storage-set-view.c (e_storage_set_view_construct): Use - g_object_weakref() instead of gtk_object_weakref() for the - ui_container. - (ui_container_destroy_notify): Add param where_the_object_was to - match the GWeakNotify prototype. - - * e-shell.c: Use g_signal_emit() instead of gtk_signal_emit(). - -2002-11-03 Ettore Perazzoli - - * glade/e-active-connection-dialog.glade: Converted to Glade2 - format. - * glade/evolution-startup-wizard.glade: Likewise. - * glade/e-shell-shared-folder-picker-dialog.glade: Likewise. - * glade/e-shell-folder-creation-dialog.glade: Likewise. - * glade/e-shell-config-default-folders.glade: Likewise. - * glade/e-folder-list.glade: Likewise. - -2002-11-03 Ettore Perazzoli - - * *.c, *.h: Changed all gtk_object_refs()/gtk_object_unrefs() into - g_object_refs()/g_object_unrefs() and all gtk_signal_connect_*() - into g_signal_connect_*(). [Except for some case where we have - gtk_signal_connect_full() or gtk_signal_connect_while_alive() - calls that cannot be trivially ported to use the g_signal_* - functions, we'll have to fix those later.] - - * e-splash.c (impl_finalize): Finalize implementation, copied over - from impl_destroy. - (impl_destroy): Removed. - (class_init): Override finalize, not destroy. - - * e-activity-handler.c: Ported from GtkObject to GObject. - * evolution-storage.c: Likewise. - * e-corba-shortcuts.c: Likewise. - * evolution-session.h: Likewise. - * evolution-config-control.c: Likewise. - * evolution-shell-component-dnd.c: Likewise. - * evolution-shell-component.c: Likewise. - * evolution-shell-view.c: Likewise. - * evolution-storage-set-view.c: Likewise. - * evolution-wizard.c: Likewise. - -2002-11-03 Ettore Perazzoli - - * e-component-info.c: Updated for libxml2. - * e-shortcuts.c: Likewise. - * e-folder-list.c: Likewise. - * e-local-folder.c: Likewise. - -2002-11-03 Ettore Perazzoli - - * GNOME_Evolution_Shell.server.in: Renamed from - GNOME_Evolution_Shell.oaf.in. - - * Makefile.am: Port from OAF to bonobo-activation. - (INCLUDES): Define SYSCONFDIR, DATADIR, LIBDIR. - - * main.c (main): Use gnome_program_init(). - - * e-corba-storage-registry.c (e_corba_storage_registry_new): - g_object_new(), not gtk_type_new(). - (impl_finalize): New, ported over from destroy. - (destroy): Removed. - (class_init): Install finalize handler, not destroy handler, since - we are not a GtkObject anymore. - - * e-corba-storage.c (e_corba_storage_new): g_object_new(), not - gtk_type_new(). - - * e-shell.c (class_init): Override finalize, not destroy. - (impl_finalize): Finalize implementation, basically the old - destroy renamed. - (e_shell_new): g_object_new(), not gtk_type_new(). - (class_init): Use e_shell_marshal_NONE__INT for - line_status_changed instead of using an ENUM. - (e_shell_construct): Use g_signal_connect_object() instead of - gtk_signal_connect_while_alive(). - - * e-setup.c (e_setup): Do not unref local_folder if NULL. - - * e-folder.c (init): Make not floating. - (e_folder_construct): No need to make it floating here anymore. - - * e-shell.c (impl_Shell_selectUserFolder): For now don't set - dialog parent from xid. - - * main.c (no_views_left_cb): Add missing GTK_SIGNAL_FUNC() cast. - (new_view_created_callback): Likewise. - (warning_dialog_clicked_callback): Update to use the - EConfigListener from the shell instead of bonobo-conf. - (show_development_warning): Likewise. - (upgrade_from_1_0_if_needed): BONOBO_EX_ID -> BONOBO_EX_REPOID. - (idle_cb): Use bonobo-activation and BONOBO_EX_REPOID(). - (main): Cleaned up the various things that are unneeded in GNOME - 2. - (upgrade_from_1_0_if_needed): Use EConfigListener. - - * evolution-storage-set-view.h, evolution-storage-set-view.c: - BonoboXObjectified. - - * e-storage.c (class_init): GLIB2-ified and made to use - e-shell-marshal.h. - (ES_CLASS): Use GTK_OBJECT_GET_CLASS(). - (e_storage_new_folder): Added missing GTK_SIGNAL_FUNC() prototype. - - * e-storage-set.c (class_init): GLIB2-ified and made to use - e-shell-marshal.h. - - * e-storage-set-view.c (popup_folder_menu): For now, do not add - the pop-up since we lack bonobo_ui_container_get_win() and I am - not sure how to work around it. - (popup_folder_menu): Pass self as the for_widget arg to - gnome_popup_menu_do_popup_modal(). - (class_init): GLIB2-ified, and got to use e-shell-marshal.h. - (marshal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING): Removed. - (impl_tree_drag_data_get): Don't set the selection for now -- we - have to fix the CORBA target stuff to match GTK 2. - (e_storage_set_view_construct): Pass NULL as the opt_ev arg to - bonobo_ui_component_set_container(). - - * e-splash.c: #include - instead of . - (e_splash_new): Pass NULL as the error arg to - gdk_pixbuf_new_from_file(). - - * e-shortcuts.c (class_init): GLIB2-ified. Also use the - e-shell-marshal marshallers. - (e_shortcuts_new_view): Add missing GTK_SIGNAL_FUNC() cast. - - * e-shortcuts-view.c: Use GTK_STOCK_* stuff instead of - GNOME_STOCK_* stuff. - (pop_up_right_click_menu_for_group): Pass self as the for_widget - arg to gnome_popup_menu_do_popup_modal(). - (pop_up_right_click_menu_for_shortcut): Likewise. - (class_init): GLIB2-ified. - - * e-shell.c: Do not #include or - #include . - (set_interactive): Use BONOBO_EX_REPOID(). - (setup_local_storage): Use _() not U_(). - (destroy): Use gtk_widget_destroy() instead of - gtk_object_destroy() on priv->settings_dialog. - (class_init): GLIB2-ized. - (init): Initialize config_listener member. - (get_icon_path_for_component_info): Port to bonobo-activation from - OAF. - (setup_components): Likewise. - (destroy): Likewise. - (e_shell_construct): Use e_setup_check_config(), not - e_setup_check_db (). Use the e_config_listener instead of - bonobo-conf. - (save_settings_for_views): Likewise. - (save_misc_settings): Likewise. - (e_shell_restore_from_settings): Likewise. - (parse_default_uri): Likewise. - (e_shell_component_maybe_crashed): Pass NULL for opt_ev arg to - bonobo_unkown_ping() - (e_shell_component_maybe_crashed): Use - bonobo_engine_deregister_dead_components() instead of - bonobo_window_deregister_component_by_ref() which is no more. - (e_shell_send_receive): BONOBO_EX_REPOID() instead of - BONOBO_EX_ID(). - (e_shell_get_config_listener): Return the config_listener. - - * e-shell-view.c (find_inbox_in_storage): Use _() instead of U_(). - (load_images): Pass NULL as the error arg to - gdk_pixbuf_new_from_file(). - (load_images): Likewise. - (find_inbox_in_storage): Work around the lack of - g_utf8_strcasecmp() in glib-2.0. - (class_init): GLIB2-ified. Also, use the marshallers in - e-shell-marshal.h. - (pop_up_folder_bar): Use gtk_window_move()/gtk_widget_show() - instead gtk_widget_popup(). - (unmerge_on_error): Work around the death of - bonobo_ui_component_get_win() and - bonobo_window_deregister_component_by_ref(). - (e_shell_view_construct): Pass NULL as the uic arg to - bonobo_window_construct(). Add missing GTK_SIGNAL_FUNC() cast. - Match the new BonoboWindow behavior wrt the UIContainer and the - new opt_ev args. - (display_uri): Use bonobo_ui_engine_freeze() and - bonobo_ui_engine_thaw() since bonobo_window_freeze() and - bonobo_window_thaw() got axed [sigh]. - (e_shell_view_save_settings): Use EConfigListener. - (e_shell_view_load_settings): Likewise. - (get_view_for_uri): Use bonobo_widget_new_control_from_objref() - instead of e_bonobo_widget_new_control_from_objref(). - - * e-shell-view-menu.c (command_help_faq): Pass NULL for the error - arg to gnome_url_show(). - (command_about_box): Use GtkDialog instead of a GtkWindow of a - type GTK_WINDOW_DIALOG [which does not exist anymore]. - (command_xml_dump): Removed. - (menu_do_misc): Do not add the corresponding verb. - - * e-shell-user-creatable-items-handler.c (execute_verb): Use - BONOBO_EX_REPOID(). - - * e-shell-startup-wizard.c: Remove id member from SWData. Replace - member db with config_listener. - (e_shell_startup_wizard_create): Initialize config_listener. - (make_mail_dialog_pages): Do not set the listener id here. - (druid_event_notify_cb): Pass FALSE as the help_sensitive arg to - gnome_druid_set_buttons_sensitive(). - (e_shell_startup_wizard_create): Likewise. - (make_mail_dialog_pages): Use bonobo-activation instead of OAF. - (get_intelligent_importers): Likewise. - (prepare_importer_page): Likewise. - (start_importers): Do nothing here for now. - (finish_func): Constify local variable displayname. - (finish_func): Updated to use the config_listener instead of the - bono-conf db. - (prepare_importer_page): Do not actually run the importer yet. - (e_shell_startup_wizard_create): Pass NULL as the domain arg to - glade_xml_new(). Use the config_listener. - - * e-shell-shared-folder-picker-dialog.c (user_clicked): - BONOBO_EX_REPOID() instead of BONOBO_EX_ID(). - (setup_name_selector): Likewise. - (setup_name_selector): Use bonobo-activation. - (show_dialog): Pass NULL as the domain arg to glade_xml_new(). - (setup_name_selector): Add a missing GTK_SIGNAL_FUNC() cast. - - * e-shell-settings-dialog.c: #include - . Use - Bonobo_ActivationProperty instead of OAF_Property. - (set_dialog_size): Use gtk_style_get_font() to get the font from - the widget->style. - (load_pages): Converted to use bonobo-activation instead of OAF. - Pass NULL as the error arg to gdk_pixbuf_new_from_file(). - - * e-shell-offline-sync.c (sync_folder): BONOBO_EX_REPOID(), not - BONOBO_EX_ID(). - (e_shell_offline_sync_all_folders): For now, avoid doing anything - [see changes to e-shell-config-offline.c below]. - (setup_progress_listener): #if 0 for now. - (setup_dialog): Likewise. - (sync_folder): Likewise. - (cleanup): Likewise. - (progress_listener_servant_free): Likewise. - (progress_listener_servant_new): Likewise. - (impl_SyncFolderProgressListener_updateProgress): Likewise. - (impl_SyncFolderProgressListener_reportSuccess): Likewise. - (impl_SyncFolderProgressListener_reportFailure): Likewise. - (progress_dialog_close_callback): Likewise. - (progress_dialog_clicked_callback): Likewise. - - * e-shell-offline-handler.c (prepare_for_offline): Use - BONOBO_EX_REPOID(). - (pop_up_confirmation_dialog): Pass NULL as the domain arg to - glade_xml_new(). - (class_init): GLIB2-ified. - - * Makefile.am: Do not compile e-shell-importer.c, - e-shell-importer.h for now. - - * e-shell-folder-title-bar.c (get_max_clipped_label_width): Use - gtk_style_get_font() to retrieve the font. - (class_init): GLIB2-ified. - (e_shell_folder_title_bar_construct): Get {x,y}thickness from - widget->style, not from widget->style->klass. - - * e-shell-folder-selection-dialog.c: #include , - and . - (class_init): GLIB2-ified. - - * e-shell-folder-creation-dialog.c: No , - add some GTK includes. - (e_shell_show_folder_creation_dialog): Pass NULL as the domain arg - to glade_xml_new(). Added missing GTK_SIGNAL_FUNC() cast. - - * e-shell-folder-commands.c: Do not #include - and #include - . - - * e-shell-config-default-folders.c: Replace member db in - EvolutionDefaultFolderConfig with config_listener. - (e_shell_config_default_folders_create_widget): Init here. - (config_control_destroy_cb): Unref here. - (config_control_apply_cb): Use EConfigListener instead of - BonoboConf. - (setup_folder_selector): Likewise. - (e_shell_config_default_folders_create_widget): Pass NULL as the - domain arg to glade_xml_new(). - - * e-shell-config-offline.c (config_control_apply_callback): For - now, do not change the configuration. [Needs to be ported to - EConfigListener or something, but we were storing a sequence using - typecodes here and there is no trivial way to do that right now.] - (init_storage_set_view_status_from_config): Likewise, do not - retrieve the configuration here. - - * e-shell-marshal.list: Removed duplicates, added a bunch new - marshallers. - -2002-11-02 Ettore Perazzoli - - * e-shell-config-autocompletion.c: No bonobo-conf; removed member - db in struct EvolutionAutocompletionConfig and replaced with a - config_listener arg. - (e_shell_config_autocompletion_create_widget): Init it here. - (config_control_destroy_callback): Unref it here. - (config_control_apply_callback): Updated to use the - config_listener. - - * e-shell-config.c (e_shell_config_factory_register): Use - bonobo_generic_factory_new() instead of - bonobo_generic_factory_new_multi(). - - * e-shell-about-box.c (impl_realize): Pass NULL as the error arg - to gdk_pixbuf_new_from_file(). - (timeout_callback): Use gtk_style_get_font() to retrieve the - style's font instead of style->font. - (impl_draw): Removed. - (impl_expose_event): Do the drawing of the pixmap here. - - * e-setup.c (e_setup_check_db): Removed. - (e_setup_check_config): New, version using EConfigListener instead - of bonobo-conf. - - * e-setup.h: #include "e-util/e-config-listener.h" instead of - . - - * e-local-storage.c (construct): Use _() instead of U_(). - (setup_stock_folders): Likewise. - - * e-icon-factory.c (load_icon): Pass NULL as the error arg to - gdk_pixbuf_new_from_file(). - - * e-folder-type-registry.c (folder_type_new): Pass NULL as the - error arg to gdk_pixbuf_new_from_file(). - - * e-folder-dnd-bridge.c (find_matching_target_for_drag_context): - GdkAtom is not an integer anymore; update accordingly. - - * e-corba-storage.c (async_folder_cb): Constified args - appropriately to match BonoboListenerCallbackFn. - (async_folder_discovery_cb): Likewise. - (cancel_discover_shared_folder): BONOBO_EX_ID() -> - BONOBO_EX_REPOID(). - (e_corba_storage_show_folder_properties): Likewise. - - * e-corba-storage-registry.h, e-corba-storage-registry.c: - BonoboXObjectified. - - * e-corba-config-page.c: Removed member listener_id in struct - ECorbaConfigPagePrivate. - (init): Don't init. - (setup_listener): Bonobo_EventSource_addListener doesn't return an - ID anymore. - (impl_destroy): Just pass the listener to - Bonobo_EventSource_removeListener. - (setup_listener): BONOBO_EX_REPOID() instead of BONOBO_EX_ID(). - (impl_apply): Likewise. - (listener_event_callback): Constified args appropriately to match - BonoboListenerCallbackFn. - (e_corba_config_page_construct): Likewise. - - * e-component-registry.c (wait_for_corba_object_to_die): Pass NULL - for the exception arg to bonobo_unknown_ping(). - - * e-shell-view.h: , not - . - - * e-shell.c: Replace member db in EShellPrivate with an - EConfigListener config_listener. - (destroy): Do not call e_shell_disconnect_db(). Unref - EConfigListener. Destroy settings_dialog if not NULL. Pass - config_listener to e_setup_check_db(). - (e_shell_get_config_db): Removed. - (e_shell_get_config_listener): New. - (e_shell_construct): Set up the config_listener, instead of the - Bonobo_ConfigDatabase. - - * e-shell.h: #include - instead of . No - . - - * e-component-registry.c: #include - instead of . - - * e-activity-handler.c (task_widget_button_press_event_callback): - Use BONOBO_EX() and BONOBO_EX_REPOID(). - (impl_operationStarted): Don't use GTK_OBJECT_DESTROYED() [needs - to be fixed later]. - (impl_operationProgressing): Likewise. - (impl_operationFinished): Likewise. - (impl_requestDialog): Likewise. - - * evolution-wizard.c (evolution_wizard_class_init): GLIB2-ified. - - * evolution-wizard.h: Remove BEGIN_GNOME_DECLS/END_GNOME_DECLS. - - * evolution-storage.c: Chagned to use generated marshallers - instead of custom ones or GAL's. - - * eshell-marshal.list: New. - * Makefile.am: Added rule to build eshell-marshal.[ch] and link - them in. - - * evolution-storage.h, evolution-storage.c: BonoboXObjectified. - - * evolution-storage-set-view-listener.c (class_init): GLIB2-ified. - - * evolution-storage-listener.c (class_init): GLIB2-ified. - - * evolution-shell-view.h, evolution-shell-view.c: - BonoboXObjectified. - - * evolution-shell-component-utils.c: #include - . - (e_pixmaps_update): Pass NULL as the error arg to - gdk_pixbuf_new_from_file(). - (e_activation_failure_dialog): Bonobo_GeneralError instead of - OAF_GeneralError. - (e_get_activation_failure_msg): Likewise. - - * evolution-shell-component-dnd.h, evolution-shell-component-dnd.c: - BonoboXObjectified. - - * evolution-shell-component.c: #include . - (owner_ping_callback): Pass NULL for the opt_ev arg to - bonobo_unknown_ping(). - (impl_populateFolderContextMenu): Pass NULL for the opt_ev arg to - bonobo_ui_component_set_container(). - (class_init): GLIB2-ified. - - * e-component-registry.c (component_free): Use g_object_unref() on - the EvolutionShellComponentClient instead of - bonobo_object_unref(). - (register_component): Likewise. - (component_new): Likewise, use g_object_ref() instead of - bonobo_object_ref(). - - * evolution-shell-component-client.c: New member corba_objref in - EvolutionShellComponentClientPrivate. - (init): Init to CORBA_OBJECT_NIL. - (impl_destroy): Unref. Also CORBA_OBJECT_NILify all the pointers - to unreffed objects. - (corba_exception_to_result): Use BONOBO_EX_REPOID(ev) instead of - ev->_repo_id. - (evolution_shell_component_client_construct): Set the corba_objref - pointer, do not call bonobo_object_client_construct(). - (evolution_shell_component_client_new): Use - bonobo_activation_activate_from_id() here instead of - oaf_activate_from_id(). - - * evolution-shell-component-client.h, - evolution-shell-component-client.c: Derive from GObject instead of - BonoboObjectClient. - - * evolution-shell-client.c - (evolution_shell_client_create_storage_set_view): Use - BONOBO_EX_REPOID() instead of BONOBO_EX_ID(). - - * evolution-folder-selector-button.c (destroy): g_object_unref the - EvolutionShellClient instead of bonobo_object_unref(). - (evolution_folder_selector_button_construct): Likewise. - - * e-folder-list.c (e_folder_list_destroy): g_object_unref the - EvolutionShellClient instead of bonobo_object_unref(). - (e_folder_list_construct): g_object_ref the EvolutionShellClient - instead of bonobo_object_ref(). - - * evolution-shell-client.c: New member corba_objref in - EvolutionShellClientPrivate. - (init): Init to CORBA_OBJECT_NIL. - (destroy): Unref/release. - (query_shell_interface): Use BONOBO_EX() and BONOBO_EX_REPOID() - instead of ._major and ._repo_id. - (destroy): Likewise. - (evolution_shell_client_get_local_storage): Likewise. - - * evolution-shell-client.h: Derive from GObject instead of - BonoboObjectClient. - - * evolution-session.c (corba_class_init): Get klass arg. - (class_init): Pass klass arg. GLIB2-ified. - (evolution_session_construct): Removed. - (evolution_session_new): Just return what gtk_type_new() returns. - - * evolution-session.h, evolution-session.c: Derive from - BonoboXObject. - - * evolution-folder-selector-button.c (init): Make icon a GtkImage - instead of a BonoboUIToolbarIcon. - (set_folder, class_init): GLIB2-ified. - - * evolution-config-control.c (class_init): GLIB2-ified. - - * evolution-activity-client.c (corba_update_progress): Use - BONOBO_EX_REPOID() instead of ._major and ._repo_id. - (evolution_activity_client_request_dialog): Likewise. - (impl_destroy): Likewise. - (class_init): GLIB2-ified. - - * e-folder-list.c: #include and #include - . - (e_folder_list_destroy): bonobo_object_unref(), not - bonobo_object_client_unref(). - (e_folder_list_init): Pass NULL as the domain to glade_xml_new(). - - * e-folder-list.h: #include . - - * e-folder.c (impl_remove): Renamed from remove(). - (impl_get_physical_uri): Renamed from get_physical_uri(). - (impl_load_info): Renamed from load_info(). - (impl_save_info): Renamed from save_info(). - (class_init): GLIB2-ified. - - * Evolution-Session.idl: #include , not . - * Evolution-Offline.idl: Likewise. - * Evolution-ShellComponent.idl: Likewise. - * Evolution-ShellComponentDnd.idl: Likewise. - * Evolution-Storage.idl: Likewise. - - * Makefile.am: Do not compile the importer directory for now. - - * evolution-wizard.c (evolution_wizard_set_buttons_sensitive): - ORBit2-ize type names. - (evolution_wizard_set_show_finish): Likewise. - (evolution_wizard_set_page): Likewise. + * main.c (show_development_warning): Removed. + (warning_dialog_clicked_callback): Removed. + (view_map_callback): Removed. + (new_view_created_callback): Removed. + (idle_cb): Don't connect. 2002-10-28 Ettore Perazzoli diff --git a/shell/Evolution-ShellComponent.idl b/shell/Evolution-ShellComponent.idl index 90cd6fa57d..bb9b4ae682 100644 --- a/shell/Evolution-ShellComponent.idl +++ b/shell/Evolution-ShellComponent.idl @@ -88,11 +88,8 @@ module Evolution { /* Notify the component of whether the shell is currently * running in interactive mode or not. (I.e. basically, - * whether there are any Evolution windows on the screen.) - * @new_view_xid is an X Window ID ("None" if - * @now_interactive is FALSE) */ - void interactive (in boolean now_interactive, - in unsigned long new_view_xid); + * whether there are any Evolution windows on the screen.) */ + void interactive (in boolean now_interactive); /* Send debugging output to the file specified. */ void debug (in string log_path); diff --git a/shell/Evolution-ShellComponentDnd.idl b/shell/Evolution-ShellComponentDnd.idl index baf715f0f7..064f233417 100644 --- a/shell/Evolution-ShellComponentDnd.idl +++ b/shell/Evolution-ShellComponentDnd.idl @@ -26,7 +26,7 @@ module ShellComponentDnd { struct Data { short format; - string target; + short target; sequence bytes; }; diff --git a/shell/Evolution-Storage.idl b/shell/Evolution-Storage.idl index 2d6928938b..26313b6825 100644 --- a/shell/Evolution-Storage.idl +++ b/shell/Evolution-Storage.idl @@ -82,8 +82,7 @@ module Evolution { in Bonobo::Listener listener); /* Open remote nodes. */ - void asyncOpenFolder (in string path, - in Bonobo::Listener listener); + void asyncOpenFolder (in string path); /* Set unread count. */ void updateFolder (in string path, diff --git a/shell/Makefile.am b/shell/Makefile.am index defd6266c3..7c5900ce09 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -1,28 +1,20 @@ SUBDIRS = glade importer -INCLUDES = \ - -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED \ - -DBONOBO_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED \ +INCLUDES = -O \ -I$(top_srcdir)/widgets \ -I$(top_srcdir)/widgets/misc \ -I$(top_srcdir)/libical/src/libical \ -I$(top_builddir)/libical/src/libical \ -I$(top_srcdir) \ - -DEVOLUTION_IMAGES=\""$(imagesdir)"\" \ - -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ - -DEVOLUTION_DATADIR=\""$(datadir)"\" \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ + -DEVOLUTION_IMAGES=\""$(datadir)/images/evolution"\" \ + -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ + -DEVOLUTION_DATADIR=\""$(datadir)"\" \ + -DEVOLUTION_GLADEDIR=\"$(datadir)/evolution/glade\" \ -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \ - -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \ - -DPREFIX=\""$(prefix)"\" \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DDATADIR=\""$(datadir)"\" \ - -DLIBDIR=\""$(datadir)"\" \ + -DPREFIX=\"$(prefix)\" \ -DG_LOG_DOMAIN=\"evolution-shell\" \ $(SHELL_CFLAGS) -noinst_PROGRAMS = evolution evolution-test-component - # Shell CORBA stuff IDLS = \ @@ -41,74 +33,58 @@ IDLS = \ Evolution-common.idl \ Evolution.idl -IDL_GENERATED_H = \ - Evolution.h - -IDL_GENERATED_C = \ +IDL_GENERATED = \ + Evolution.h \ Evolution-common.c \ Evolution-skels.c \ Evolution-stubs.c -IDL_GENERATED = $(IDL_GENERATED_H) $(IDL_GENERATED_C) - -$(IDL_GENERATED_H): $(IDLS) - $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) $(srcdir)/Evolution.idl - -$(IDL_GENERATED_C): $(IDL_GENERATED_H) +Evolution-impl.o: Evolution.h +$(IDL_GENERATED): $(IDLS) + $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \ + $(srcdir)/Evolution.idl # SelectNames CORBA stuff SELECT_NAMES_IDL = \ $(top_srcdir)/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl -SELECT_NAMES_IDL_GENERATED_H = \ - Evolution-Addressbook-SelectNames.h - -SELECT_NAMES_IDL_GENERATED_C = \ +SELECT_NAMES_IDL_GENERATED = \ + Evolution-Addressbook-SelectNames.h \ Evolution-Addressbook-SelectNames-common.c \ Evolution-Addressbook-SelectNames-skels.c \ Evolution-Addressbook-SelectNames-stubs.c -SELECT_NAMES_IDL_GENERATED = $(SELECT_NAMES_IDL_GENERATED_C) $(SELECT_NAMES_IDL_GENERATED_H) - -$(SELECT_NAMES_IDL_GENERATED_H): $(SELECT_NAMES_IDL) - $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) $(SELECT_NAMES_IDL) - -$(SELECT_NAMES_IDL_GENERATED_C): $(SELECT_NAMES_IDL_GENERATED_H) - +$(SELECT_NAMES_IDL_GENERATED): $(SELECT_NAMES_IDL) + $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \ + $(SELECT_NAMES_IDL) # Wombat CORBA stuff -WOMBAT_IDL = \ - $(top_srcdir)/wombat/Evolution-Wombat.idl - -WOMBAT_IDL_GENERATED_H = \ - Evolution-Wombat.h +WOMBAT_IDL = $(top_srcdir)/wombat/Evolution-Wombat.idl -WOMBAT_IDL_GENERATED_C = \ +WOMBAT_IDL_GENERATED = \ + Evolution-Wombat.h \ Evolution-Wombat-common.c \ Evolution-Wombat-skels.c \ Evolution-Wombat-stubs.c -WOMBAT_IDL_GENERATED = $(WOMBAT_IDL_GENERATED_C) $(WOMBAT_IDL_GENERATED_H) - -$(WOMBAT_IDL_GENERATED_H): $(WOMBAT_IDL) - $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) $(WOMBAT_IDL) - -$(WOMBAT_IDL_GENERATED_C): $(WOMBAT_IDL_GENERATED_H) - +$(WOMBAT_IDL_GENERATED): $(WOMBAT_IDL) + $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` $(WOMBAT_IDL) # IDL install +idldir = $(datadir)/idl + idl_DATA = $(IDLS) # Shell library -privlib_LTLIBRARIES = \ +lib_LTLIBRARIES = \ libeshell.la -eshellincludedir = $(privincludedir)/shell +eshellincludedir = $(includedir)/evolution/shell eshellinclude_HEADERS = \ Evolution.h \ @@ -151,14 +127,12 @@ libeshell_la_SOURCES = \ evolution-storage-set-view-listener.c \ evolution-storage.c \ evolution-wizard.c \ - e-shell-marshal.c \ $(eshellinclude_HEADERS) -libeshell_la_LIBADD = \ - $(top_builddir)/e-util/libeutil.la - # Evolution executable +bin_PROGRAMS = evolution + evolution_SOURCES = \ $(SELECT_NAMES_IDL_GENERATED) \ $(WOMBAT_IDL_GENERATED) \ @@ -168,8 +142,6 @@ evolution_SOURCES = \ e-component-info.h \ e-component-registry.c \ e-component-registry.h \ - e-config-upgrade.c \ - e-config-upgrade.h \ e-corba-config-page.c \ e-corba-config-page.h \ e-corba-shortcuts.c \ @@ -182,6 +154,8 @@ evolution_SOURCES = \ e-folder-dnd-bridge.h \ e-folder-type-registry.c \ e-folder-type-registry.h \ + e-gray-bar.c \ + e-gray-bar.h \ e-history.c \ e-history.h \ e-icon-factory.c \ @@ -264,14 +238,17 @@ evolution_SOURCES = \ evolution_LDADD = \ libeshell.la \ importer/libevolution-importer.la \ - $(top_builddir)/widgets/e-timezone-dialog/libetimezonedialog.la \ - $(top_builddir)/widgets/misc/libemiscwidgets.la \ + $(top_builddir)/widgets/e-timezone-dialog/libetimezonedialog.a \ + $(top_builddir)/widgets/misc/libemiscwidgets.a \ $(top_builddir)/e-util/libeutil.la \ $(top_builddir)/libical/src/libical/libical-evolution.la \ $(SHELL_LIBS) # Test component +noinst_PROGRAMS = \ + evolution-test-component + evolution_test_component_SOURCES = \ evolution-test-component.c @@ -280,67 +257,35 @@ evolution_test_component_LDADD = \ $(SHELL_LIBS) install-test-component: evolution-test-component + $(mkinstalldirs) $(DESTDIR)$(bindir) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) evolution-test-component $(DESTDIR)$(bindir)/evolution-test-component - $(mkinstalldirs) $(DESTDIR)$(serverdir) - $(INSTALL_DATA) $(srcdir)/GNOME_Evolution_TestComponent.server $(DESTDIR)$(serverdir)/GNOME_Evolution_TestComponent.server + $(mkinstalldirs) $(DESTDIR)$(oafdir) + $(INSTALL_DATA) $(srcdir)/GNOME_Evolution_TestComponent.oaf $(DESTDIR)$(oafdir)/GNOME_Evolution_TestComponent.oaf # Misc stuff -server_in_files = GNOME_Evolution_Shell.server.in.in -server_DATA = $(server_in_files:.server.in.in=.server) -$(server_in_files:.server.in.in=.server.in): $(server_in_files) - sed -e "s|\@BINDIR\@|$(bindir)|" $< > $@ +oafdir = $(datadir)/oaf +oaf_in_files = GNOME_Evolution_Shell.oaf.in +oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) -etspec_DATA = e-storage-set-view.etspec +etspecdir = $(datadir)/evolution/etspec/ +etspec_DATA = \ + e-storage-set-view.etspec -@INTLTOOL_SERVER_RULE@ +@XML_I18N_MERGE_OAF_RULE@ icons = \ check-empty.xpm \ check-filled.xpm \ check-missing.xpm -# GConf schemas - -schemadir = $(GCONF_SCHEMA_FILE_DIR) -schema_DATA = apps_evolution_shell.schemas - -install-data-local: - if test -z "$(DESTDIR)" ; then \ - for p in $(schema_DATA) ; do \ - GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$$p; \ - done \ - fi - -install-exec-local: - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) evolution $(DESTDIR)$(bindir)/evolution-$(BASE_VERSION) - - -# GLib marshalling cruft - -e-shell-marshal.h: e-shell-marshal.list - ( @GLIB_GENMARSHAL@ --prefix=e_shell_marshal e-shell-marshal.list --header > e-shell-marshal.h.tmp \ - && mv e-shell-marshal.h.tmp e-shell-marshal.h ) \ - || ( rm -f e-shell-marshal.h.tmp && exit 1 ) - -e-shell-marshal.c: e-shell-marshal.h - ( @GLIB_GENMARSHAL@ --prefix=e_shell_marshal e-shell-marshal.list --body > e-shell-marshal.c.tmp \ - && mv e-shell-marshal.c.tmp e-shell-marshal.c ) \ - || ( rm -f e-shell-marshal.c.tmp && exit 1 ) - -MARSHAL_GENERATED = e-shell-marshal.c e-shell-marshal.h - -# Extra dist stuff - EXTRA_DIST = \ $(IDLS) \ - $(server_in_files) \ - $(server_DATA) \ + $(oaf_in_files) \ + $(oaf_DATA) \ $(etspec_DATA) \ - $(schema_DATA) \ $(icons) \ - GNOME_Evolution_TestComponent.server \ - e-shell-marshal.list \ + GNOME_Evolution_TestComponent.oaf \ evolution-nognome.in # Purify support @@ -357,8 +302,8 @@ evolution.pure: evolution endif -BUILT_SOURCES = $(IDL_GENERATED) $(SELECT_NAMES_IDL_GENERATED) $(MARSHAL_GENERATED) -CLEANFILES = $(BUILT_SOURCES) +CLEANFILES = $(IDL_GENERATED) $(SELECT_NAMES_IDL_GENERATED) +BUILT_SOURCES = $(IDL_GENERATED) $(SELECT_NAMES_IDL_GENERATED) dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) @@ -368,4 +313,4 @@ if HAVE_DTAPPINTEGRATE bin_SCRIPTS = evolution-nognome -endif +endif \ No newline at end of file diff --git a/shell/e-component-info.c b/shell/e-component-info.c index a89647c8a1..512c61f37f 100644 --- a/shell/e-component-info.c +++ b/shell/e-component-info.c @@ -28,8 +28,8 @@ #include "e-util/e-lang-utils.h" -#include -#include +#include +#include #include #include @@ -54,7 +54,7 @@ lookup_node (xmlNode *parent_node, { xmlNode *p; - for (p = parent_node->children; p != NULL; p = p->next) { + for (p = parent_node->childs; p != NULL; p = p->next) { if (strcmp ((const char *) p->name, node_name) == 0) return p; } @@ -82,7 +82,7 @@ lookup_node_for_language (xmlNode *parent_node, { xmlNode *p; - for (p = parent_node->children; p != NULL; p = p->next) { + for (p = parent_node->childs; p != NULL; p = p->next) { xmlChar *node_language_id; if (strcmp ((const char *) p->name, node_name) != 0) @@ -219,7 +219,7 @@ e_component_info_load (const char *file_name) new->uri_schemas = NULL; new->user_creatable_item_types = NULL; - for (p = root->children; p != NULL; p = p->next) { + for (p = root->childs; p != NULL; p = p->next) { if (strcmp ((char *) p->name, "folder_type") == 0) add_folder_type (new, p, language_list); else if (strcmp ((char *) p->name, "user_creatable_item_type") == 0) diff --git a/shell/e-corba-storage-registry.c b/shell/e-corba-storage-registry.c index bfffdb6981..a0dafc239c 100644 --- a/shell/e-corba-storage-registry.c +++ b/shell/e-corba-storage-registry.c @@ -34,8 +34,6 @@ #include #include -#include - #define PARENT_TYPE BONOBO_OBJECT_TYPE static BonoboObjectClass *parent_class = NULL; @@ -49,6 +47,31 @@ struct _ECorbaStorageRegistryPrivate { /* CORBA interface implementation. */ +static POA_GNOME_Evolution_StorageRegistry__vepv storage_registry_vepv; + +static POA_GNOME_Evolution_StorageRegistry * +create_servant (void) +{ + POA_GNOME_Evolution_StorageRegistry *servant; + CORBA_Environment ev; + + servant = (POA_GNOME_Evolution_StorageRegistry *) g_new0 (BonoboObjectServant, 1); + servant->vepv = &storage_registry_vepv; + + CORBA_exception_init (&ev); + + POA_GNOME_Evolution_StorageRegistry__init ((PortableServer_Servant) servant, &ev); + if (ev._major != CORBA_NO_EXCEPTION) { + g_free (servant); + CORBA_exception_free (&ev); + return NULL; + } + + CORBA_exception_free (&ev); + + return servant; +} + static void listener_notify (Bonobo_Listener listener, GNOME_Evolution_StorageRegistry_MessageType type, @@ -73,6 +96,8 @@ listener_notify (Bonobo_Listener listener, CORBA_exception_id (&ev)); } + CORBA_free (nr.name); + CORBA_exception_free (&ev); } @@ -103,7 +128,7 @@ impl_StorageRegistry_addStorage (PortableServer_Servant servant, return CORBA_OBJECT_NIL; } - g_object_unref (storage); + gtk_object_unref (GTK_OBJECT (storage)); /* FIXME: if we remove a listener while looping through the list we can @@ -239,7 +264,7 @@ storage_set_foreach (EStorageSet *set, name = e_storage_get_name (E_STORAGE (p->data)); listener_notify (listener, GNOME_Evolution_StorageRegistry_STORAGE_CREATED, name); - g_object_unref (p->data); + gtk_object_unref (GTK_OBJECT (p->data)); } g_list_free (storage_list); @@ -387,27 +412,10 @@ impl_StorageRegistry_getFolderByUri (PortableServer_Servant servant, } -/* GObject methods. */ +/* GtkObject methods. */ static void -impl_dispose (GObject *object) -{ - ECorbaStorageRegistry *corba_storage_registry; - ECorbaStorageRegistryPrivate *priv; - - corba_storage_registry = E_CORBA_STORAGE_REGISTRY (object); - priv = corba_storage_registry->priv; - - if (priv->storage_set != NULL) { - g_object_unref (priv->storage_set); - priv->storage_set = NULL; - } - - (* G_OBJECT_CLASS (parent_class)->dispose) (object); -} - -static void -impl_finalize (GObject *object) +destroy (GtkObject *object) { ECorbaStorageRegistry *corba_storage_registry; ECorbaStorageRegistryPrivate *priv; @@ -415,25 +423,29 @@ impl_finalize (GObject *object) corba_storage_registry = E_CORBA_STORAGE_REGISTRY (object); priv = corba_storage_registry->priv; + if (priv->storage_set != NULL) + gtk_object_unref (GTK_OBJECT (priv->storage_set)); g_free (priv); - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } /* Initialization. */ static void -e_corba_storage_registry_class_init (ECorbaStorageRegistryClass *klass) +corba_class_init (void) { - GObjectClass *object_class; + POA_GNOME_Evolution_StorageRegistry__vepv *vepv; POA_GNOME_Evolution_StorageRegistry__epv *epv; + PortableServer_ServantBase__epv *base_epv; - object_class = G_OBJECT_CLASS (klass); - object_class->dispose = impl_dispose; - object_class->finalize = impl_finalize; + base_epv = g_new0 (PortableServer_ServantBase__epv, 1); + base_epv->_private = NULL; + base_epv->finalize = NULL; + base_epv->default_POA = NULL; - epv = & klass->epv; + epv = g_new0 (POA_GNOME_Evolution_StorageRegistry__epv, 1); epv->addStorage = impl_StorageRegistry_addStorage; epv->getStorageList = impl_StorageRegistry_getStorageList; epv->getStorageByName = impl_StorageRegistry_getStorageByName; @@ -442,11 +454,27 @@ e_corba_storage_registry_class_init (ECorbaStorageRegistryClass *klass) epv->removeListener = impl_StorageRegistry_removeListener; epv->getFolderByUri = impl_StorageRegistry_getFolderByUri; - parent_class = g_type_class_ref(PARENT_TYPE); + vepv = &storage_registry_vepv; + vepv->_base_epv = base_epv; + vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); + vepv->GNOME_Evolution_StorageRegistry_epv = epv; +} + +static void +class_init (ECorbaStorageRegistryClass *klass) +{ + GtkObjectClass *object_class; + + object_class = GTK_OBJECT_CLASS (klass); + object_class->destroy = destroy; + + parent_class = gtk_type_class (PARENT_TYPE); + + corba_class_init (); } static void -e_corba_storage_registry_init (ECorbaStorageRegistry *corba_storage_registry) +init (ECorbaStorageRegistry *corba_storage_registry) { ECorbaStorageRegistryPrivate *priv; @@ -460,15 +488,20 @@ e_corba_storage_registry_init (ECorbaStorageRegistry *corba_storage_registry) void e_corba_storage_registry_construct (ECorbaStorageRegistry *corba_storage_registry, + GNOME_Evolution_StorageRegistry corba_object, EStorageSet *storage_set) { ECorbaStorageRegistryPrivate *priv; + g_return_if_fail (corba_storage_registry != NULL); g_return_if_fail (E_IS_CORBA_STORAGE_REGISTRY (corba_storage_registry)); + g_return_if_fail (corba_object != CORBA_OBJECT_NIL); + + bonobo_object_construct (BONOBO_OBJECT (corba_storage_registry), corba_object); priv = corba_storage_registry->priv; - g_object_ref (storage_set); + gtk_object_ref (GTK_OBJECT (storage_set)); priv->storage_set = storage_set; } @@ -476,19 +509,25 @@ ECorbaStorageRegistry * e_corba_storage_registry_new (EStorageSet *storage_set) { ECorbaStorageRegistry *corba_storage_registry; + POA_GNOME_Evolution_StorageRegistry *servant; + GNOME_Evolution_StorageRegistry corba_object; g_return_val_if_fail (storage_set != NULL, NULL); g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - corba_storage_registry = g_object_new (e_corba_storage_registry_get_type (), NULL); + servant = create_servant (); + if (servant == NULL) + return NULL; + + corba_storage_registry = gtk_type_new (e_corba_storage_registry_get_type ()); + + corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (corba_storage_registry), + servant); - e_corba_storage_registry_construct (corba_storage_registry, storage_set); + e_corba_storage_registry_construct (corba_storage_registry, corba_object, storage_set); return corba_storage_registry; } -BONOBO_TYPE_FUNC_FULL (ECorbaStorageRegistry, - GNOME_Evolution_StorageRegistry, - PARENT_TYPE, - e_corba_storage_registry) +E_MAKE_TYPE (e_corba_storage_registry, "ECorbaStorageRegistry", ECorbaStorageRegistry, class_init, init, PARENT_TYPE) diff --git a/shell/e-shell-config-default-folders.c b/shell/e-shell-config-default-folders.c index 8c60682068..4c1d7d070c 100644 --- a/shell/e-shell-config-default-folders.c +++ b/shell/e-shell-config-default-folders.c @@ -35,8 +35,6 @@ #include -#include - typedef struct { GladeXML *glade; @@ -47,6 +45,7 @@ typedef struct { char *calendar_uri, *calendar_path; char *tasks_uri, *tasks_path; + Bonobo_ConfigDatabase db; EvolutionShellClient *shell_client; } EvolutionDefaultFolderConfig; @@ -57,8 +56,8 @@ folder_selected (EvolutionFolderSelectorButton *button, { char **uri_ptr, **path_ptr; - uri_ptr = g_object_get_data (G_OBJECT (button), "uri_ptr"); - path_ptr = g_object_get_data (G_OBJECT (button), "path_ptr"); + uri_ptr = gtk_object_get_data (GTK_OBJECT (button), "uri_ptr"); + path_ptr = gtk_object_get_data (GTK_OBJECT (button), "path_ptr"); g_free (*uri_ptr); g_free (*path_ptr); @@ -76,36 +75,27 @@ e_shell_config_default_folder_selector_button_new (char *widget_name, char *string2, int int1, int int2) { - return (GtkWidget *) g_object_new (EVOLUTION_TYPE_FOLDER_SELECTOR_BUTTON, NULL); + return (GtkWidget *)gtk_type_new (EVOLUTION_TYPE_FOLDER_SELECTOR_BUTTON); } static void config_control_apply_cb (EvolutionConfigControl *control, EvolutionDefaultFolderConfig *dfc) { - GConfClient *client; - - client = gconf_client_get_default (); - - gconf_client_set_string (client, "/apps/evolution/shell/default_folders/mail_path", dfc->mail_path, NULL); - gconf_client_set_string (client, "/apps/evolution/shell/default_folders/mail_uri", dfc->mail_uri, NULL); - gconf_client_set_string (client, "/apps/evolution/shell/default_folders/contacts_path", dfc->contacts_path, NULL); - gconf_client_set_string (client, "/apps/evolution/shell/default_folders/contacts_uri", dfc->contacts_uri, NULL); - gconf_client_set_string (client, "/apps/evolution/shell/default_folders/calendar_path", dfc->calendar_path, NULL); - gconf_client_set_string (client, "/apps/evolution/shell/default_folders/calendar_uri", dfc->calendar_uri, NULL); - gconf_client_set_string (client, "/apps/evolution/shell/default_folders/tasks_path", dfc->tasks_path, NULL); - gconf_client_set_string (client, "/apps/evolution/shell/default_folders/tasks_uri", dfc->tasks_uri, NULL); - - - g_object_unref (client); + bonobo_config_set_string (dfc->db, "/DefaultFolders/mail_path", dfc->mail_path, NULL); + bonobo_config_set_string (dfc->db, "/DefaultFolders/mail_uri", dfc->mail_uri, NULL); + bonobo_config_set_string (dfc->db, "/DefaultFolders/contacts_path", dfc->contacts_path, NULL); + bonobo_config_set_string (dfc->db, "/DefaultFolders/contacts_uri", dfc->contacts_uri, NULL); + bonobo_config_set_string (dfc->db, "/DefaultFolders/calendar_path", dfc->calendar_path, NULL); + bonobo_config_set_string (dfc->db, "/DefaultFolders/calendar_uri", dfc->calendar_uri, NULL); + bonobo_config_set_string (dfc->db, "/DefaultFolders/tasks_path", dfc->tasks_path, NULL); + bonobo_config_set_string (dfc->db, "/DefaultFolders/tasks_uri", dfc->tasks_uri, NULL); } static void -config_control_destroy_notify (void *data, - GObject *where_the_config_control_was) +config_control_destroy_cb (EvolutionConfigControl *config_control, + EvolutionDefaultFolderConfig *dfc) { - EvolutionDefaultFolderConfig *dfc = (EvolutionDefaultFolderConfig *) data; - g_free (dfc->mail_uri); g_free (dfc->mail_path); g_free (dfc->contacts_uri); @@ -115,9 +105,8 @@ config_control_destroy_notify (void *data, g_free (dfc->tasks_uri); g_free (dfc->tasks_path); - g_object_unref (dfc->glade); - g_object_unref (dfc->shell_client); - + gtk_object_unref (GTK_OBJECT (dfc->glade)); + bonobo_object_unref (BONOBO_OBJECT (dfc->shell_client)); g_free (dfc); } @@ -133,59 +122,56 @@ setup_folder_selector (EvolutionDefaultFolderConfig *dfc, char **uri_ptr, char *uri_dbpath, const char **types) { - GConfClient *client; GtkWidget *button; - client = gconf_client_get_default (); - - *path_ptr = gconf_client_get_string (client, path_dbpath, NULL); - *uri_ptr = gconf_client_get_string (client, uri_dbpath, NULL); - - g_object_unref (client); + *path_ptr = bonobo_config_get_string (dfc->db, path_dbpath, NULL); + *uri_ptr = bonobo_config_get_string (dfc->db, uri_dbpath, NULL); button = glade_xml_get_widget (dfc->glade, widget_name); evolution_folder_selector_button_construct ( EVOLUTION_FOLDER_SELECTOR_BUTTON (button), dfc->shell_client, _("Select Default Folder"), *uri_ptr, types); - g_object_set_data (G_OBJECT (button), "uri_ptr", uri_ptr); - g_object_set_data (G_OBJECT (button), "path_ptr", path_ptr); - g_signal_connect (button, "selected", - G_CALLBACK (folder_selected), - dfc); - - /* XXX libglade2 seems to not show custom widgets even when - they're flagged Visible.*/ - gtk_widget_show (button); + gtk_object_set_data (GTK_OBJECT (button), "uri_ptr", uri_ptr); + gtk_object_set_data (GTK_OBJECT (button), "path_ptr", path_ptr); + gtk_signal_connect (GTK_OBJECT (button), "selected", + GTK_SIGNAL_FUNC (folder_selected), + dfc); } GtkWidget* e_shell_config_default_folders_create_widget (EShell *shell, EvolutionConfigControl *config_control) { + GNOME_Evolution_Shell shell_dup; + CORBA_Environment ev; EvolutionDefaultFolderConfig *dfc; GtkWidget *widget; dfc = g_new0 (EvolutionDefaultFolderConfig, 1); + dfc->db = e_shell_get_config_db (shell); - dfc->shell_client = evolution_shell_client_new (BONOBO_OBJREF (shell)); + CORBA_exception_init (&ev); + shell_dup = CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (shell)), &ev); + CORBA_exception_free (&ev); + dfc->shell_client = evolution_shell_client_new (shell_dup); - dfc->glade = glade_xml_new (EVOLUTION_GLADEDIR "/e-shell-config-default-folders.glade", NULL, NULL); + dfc->glade = glade_xml_new (EVOLUTION_GLADEDIR "/e-shell-config-default-folders.glade", NULL); setup_folder_selector (dfc, "default_mail_button", - &dfc->mail_path, "/apps/evolution/shell/default_folders/mail_path", - &dfc->mail_uri, "/apps/evolution/shell/default_folders/mail_uri", + &dfc->mail_path, "/DefaultFolders/mail_path", + &dfc->mail_uri, "/DefaultFolders/mail_uri", mail_types); setup_folder_selector (dfc, "default_contacts_button", - &dfc->contacts_path, "/apps/evolution/shell/default_folders/contacts_path", - &dfc->contacts_uri, "/apps/evolution/shell/default_folders/contacts_uri", + &dfc->contacts_path, "/DefaultFolders/contacts_path", + &dfc->contacts_uri, "/DefaultFolders/contacts_uri", contacts_types); setup_folder_selector (dfc, "default_calendar_button", - &dfc->calendar_path, "/apps/evolution/shell/default_folders/calendar_path", - &dfc->calendar_uri, "/apps/evolution/shell/default_folders/calendar_uri", + &dfc->calendar_path, "/DefaultFolders/calendar_path", + &dfc->calendar_uri, "/DefaultFolders/calendar_uri", calendar_types); setup_folder_selector (dfc, "default_tasks_button", - &dfc->tasks_path, "/apps/evolution/shell/default_folders/tasks_path", - &dfc->tasks_uri, "/apps/evolution/shell/default_folders/tasks_uri", + &dfc->tasks_path, "/DefaultFolders/tasks_path", + &dfc->tasks_uri, "/DefaultFolders/tasks_uri", tasks_types); widget = glade_xml_get_widget (dfc->glade, "default_folders_table"); @@ -194,10 +180,10 @@ e_shell_config_default_folders_create_widget (EShell *shell, EvolutionConfigCont gtk_widget_show (widget); dfc->config_control = config_control; - g_signal_connect (dfc->config_control, "apply", - G_CALLBACK (config_control_apply_cb), dfc); - - g_object_weak_ref (G_OBJECT (dfc->config_control), config_control_destroy_notify, dfc); + gtk_signal_connect (GTK_OBJECT (dfc->config_control), "apply", + GTK_SIGNAL_FUNC (config_control_apply_cb), dfc); + gtk_signal_connect (GTK_OBJECT (dfc->config_control), "destroy", + GTK_SIGNAL_FUNC (config_control_destroy_cb), dfc); return widget; } diff --git a/shell/e-shell-folder-title-bar.c b/shell/e-shell-folder-title-bar.c index 5c995f32d8..ee1fb91dc6 100644 --- a/shell/e-shell-folder-title-bar.c +++ b/shell/e-shell-folder-title-bar.c @@ -24,13 +24,12 @@ #include #endif -#include -#include #include -#include +#include #include #include #include +#include #include #include @@ -39,7 +38,6 @@ #include "widgets/misc/e-clipped-label.h" #include "e-shell-constants.h" -#include "e-shell-marshal.h" #include "e-shell-folder-title-bar.h" @@ -84,9 +82,67 @@ enum { static guint signals[LAST_SIGNAL] = { 0 }; + +static const char *down_arrow_xpm[] = { + "11 5 2 1", + " c none", + ". c #ffffffffffff", + " ......... ", + " ....... ", + " ..... ", + " ... ", + " . ", +}; + +static const char *left_arrow_xpm[] = { + "11 7 2 1", + " c none", + ". c #ffffffffffff", + " . ", + " .. ", + " ........ ", + " ......... ", + " ........ ", + " .. ", + " . ", +}; + +static const char *right_arrow_xpm[] = { + "11 7 2 1", + " c none", + ". c #ffffffffffff", + " . ", + " .. ", + " ........ ", + " ......... ", + " ........ ", + " .. ", + " . ", +}; + /* Utility functions for managing icons and icon widgets. */ +static GtkWidget * +create_pixmap_widget_from_xpm (const char **xpm) +{ + GdkPixbuf *pixbuf; + GdkPixmap *pixmap; + GdkBitmap *mask; + GtkWidget *widget; + + pixbuf = gdk_pixbuf_new_from_xpm_data (xpm); + + gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, 127); + + widget = gtk_pixmap_new (pixmap, mask); + gtk_widget_show (widget); + + gdk_pixbuf_unref (pixbuf); + + return widget; +} + static GdkPixbuf * new_empty_pixbuf (void) { @@ -102,9 +158,9 @@ new_empty_pixbuf (void) } static GtkWidget * -new_empty_image_widget (void) +new_empty_pixmap_widget (void) { - GtkWidget *image_widget; + GtkWidget *pixmap_widget; GdkPixmap *pixmap; GdkBitmap *mask; GdkPixbuf *empty_pixbuf; @@ -112,11 +168,28 @@ new_empty_image_widget (void) empty_pixbuf = new_empty_pixbuf (); gdk_pixbuf_render_pixmap_and_mask (empty_pixbuf, &pixmap, &mask, 127); - image_widget = gtk_image_new_from_pixmap (pixmap, mask); + pixmap_widget = gtk_pixmap_new (pixmap, mask); - g_object_unref (empty_pixbuf); + gdk_pixbuf_unref (empty_pixbuf); - return image_widget; + return pixmap_widget; +} + + +static void +set_title_bar_label_style (GtkWidget *widget) +{ + GtkRcStyle *rc_style; + + rc_style = gtk_rc_style_new(); + + rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_FG; + rc_style->fg[GTK_STATE_NORMAL].red = 0xffff; + rc_style->fg[GTK_STATE_NORMAL].green = 0xffff; + rc_style->fg[GTK_STATE_NORMAL].blue = 0xffff; + + gtk_widget_modify_style (widget, rc_style); + gtk_rc_style_unref (rc_style); } @@ -125,9 +198,12 @@ new_empty_image_widget (void) static int get_max_clipped_label_width (EClippedLabel *clipped_label) { + GdkFont *font; int width; - pango_layout_get_pixel_size (clipped_label->layout, &width, NULL); + font = GTK_WIDGET (clipped_label)->style->font; + + width = gdk_string_width (font, clipped_label->label); width += 2 * GTK_MISC (clipped_label)->xpad; return width; @@ -242,7 +318,7 @@ back_button_clicked_callback (GtkButton *button, folder_title_bar = E_SHELL_FOLDER_TITLE_BAR (data); - g_signal_emit (folder_title_bar, signals[BACK_CLICKED], 0); + gtk_signal_emit (GTK_OBJECT (folder_title_bar), signals[BACK_CLICKED]); } static void @@ -253,15 +329,15 @@ forward_button_clicked_callback (GtkButton *button, folder_title_bar = E_SHELL_FOLDER_TITLE_BAR (data); - g_signal_emit (folder_title_bar, signals[FORWARD_CLICKED], 0); + gtk_signal_emit (GTK_OBJECT (folder_title_bar), signals[FORWARD_CLICKED]); } static void add_navigation_buttons (EShellFolderTitleBar *folder_title_bar) { EShellFolderTitleBarPrivate *priv; - GtkWidget *back_image; - GtkWidget *forward_image; + GtkWidget *back_pixmap; + GtkWidget *forward_pixmap; priv = folder_title_bar->priv; @@ -269,21 +345,21 @@ add_navigation_buttons (EShellFolderTitleBar *folder_title_bar) gtk_button_set_relief (GTK_BUTTON (priv->back_button), GTK_RELIEF_NONE); GTK_WIDGET_UNSET_FLAGS (priv->back_button, GTK_CAN_FOCUS); - back_image = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE); - gtk_container_add (GTK_CONTAINER (priv->back_button), back_image); + back_pixmap = create_pixmap_widget_from_xpm (left_arrow_xpm); + gtk_container_add (GTK_CONTAINER (priv->back_button), back_pixmap); - g_signal_connect (priv->back_button, "clicked", - G_CALLBACK (back_button_clicked_callback), folder_title_bar); + gtk_signal_connect (GTK_OBJECT (priv->back_button), "clicked", + GTK_SIGNAL_FUNC (back_button_clicked_callback), folder_title_bar); priv->forward_button = gtk_button_new (); gtk_button_set_relief (GTK_BUTTON (priv->forward_button), GTK_RELIEF_NONE); GTK_WIDGET_UNSET_FLAGS (priv->forward_button, GTK_CAN_FOCUS); - forward_image = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE); - gtk_container_add (GTK_CONTAINER (priv->forward_button), forward_image); + forward_pixmap = create_pixmap_widget_from_xpm (right_arrow_xpm); + gtk_container_add (GTK_CONTAINER (priv->forward_button), forward_pixmap); - g_signal_connect (priv->forward_button, "clicked", - G_CALLBACK (forward_button_clicked_callback), folder_title_bar); + gtk_signal_connect (GTK_OBJECT (priv->forward_button), "clicked", + GTK_SIGNAL_FUNC (forward_button_clicked_callback), folder_title_bar); gtk_box_pack_start (GTK_BOX (folder_title_bar), priv->back_button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (folder_title_bar), priv->forward_button, FALSE, FALSE, 0); @@ -302,33 +378,16 @@ title_button_toggled_cb (GtkToggleButton *title_button, EShellFolderTitleBar *folder_title_bar; folder_title_bar = E_SHELL_FOLDER_TITLE_BAR (data); - - g_signal_emit (folder_title_bar, signals[TITLE_TOGGLED], 0, - gtk_toggle_button_get_active (title_button)); + gtk_signal_emit (GTK_OBJECT (folder_title_bar), + signals[TITLE_TOGGLED], + gtk_toggle_button_get_active (title_button)); } -/* GObject methods. */ - -static void -impl_dispose (GObject *object) -{ - EShellFolderTitleBar *folder_title_bar; - EShellFolderTitleBarPrivate *priv; - - folder_title_bar = E_SHELL_FOLDER_TITLE_BAR (object); - priv = folder_title_bar->priv; - - if (priv->icon != NULL) { - g_object_unref (priv->icon); - priv->icon = NULL; - } - - (* G_OBJECT_CLASS (parent_class)->dispose) (object); -} +/* GtkObject methods. */ static void -impl_finalize (GObject *object) +impl_destroy (GtkObject *object) { EShellFolderTitleBar *folder_title_bar; EShellFolderTitleBarPrivate *priv; @@ -336,9 +395,11 @@ impl_finalize (GObject *object) folder_title_bar = E_SHELL_FOLDER_TITLE_BAR (object); priv = folder_title_bar->priv; + if (priv->icon != NULL) + gdk_pixbuf_unref (priv->icon); g_free (priv); - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -382,68 +443,44 @@ impl_size_allocate (GtkWidget *widget, widget->allocation = *allocation; } - -static int -impl_expose_event (GtkWidget *widget, - GdkEventExpose *event) -{ - gtk_paint_flat_box (widget->style, widget->window, - GTK_STATE_ACTIVE, GTK_SHADOW_OUT, - &event->area, widget, "EShellFolderTitleBar", - widget->allocation.x, - widget->allocation.y, - widget->allocation.width, - widget->allocation.height); - - (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event); - - return FALSE; -} - static void class_init (EShellFolderTitleBarClass *klass) { - GObjectClass *object_class; + GtkObjectClass *object_class; GtkWidgetClass *widget_class; - object_class = G_OBJECT_CLASS (klass); - object_class->dispose = impl_dispose; - object_class->finalize = impl_finalize; + object_class = GTK_OBJECT_CLASS (klass); + object_class->destroy = impl_destroy; widget_class = GTK_WIDGET_CLASS (klass); widget_class->size_allocate = impl_size_allocate; - widget_class->expose_event = impl_expose_event; - - parent_class = g_type_class_ref(PARENT_TYPE); - - signals[TITLE_TOGGLED] - = g_signal_new ("title_toggled", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EShellFolderTitleBarClass, title_toggled), - NULL, NULL, - e_shell_marshal_NONE__BOOL, - G_TYPE_NONE, 1, - G_TYPE_BOOLEAN); - - signals[BACK_CLICKED] - = g_signal_new ("back_clicked", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EShellFolderTitleBarClass, back_clicked), - NULL, NULL, - e_shell_marshal_NONE__NONE, - G_TYPE_NONE, 0); - - signals[FORWARD_CLICKED] - = g_signal_new ("forward_clicked", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EShellFolderTitleBarClass, forward_clicked), - NULL, NULL, - e_shell_marshal_NONE__NONE, - G_TYPE_NONE, 0); + + parent_class = gtk_type_class (PARENT_TYPE); + + signals[TITLE_TOGGLED] = gtk_signal_new ("title_toggled", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EShellFolderTitleBarClass, title_toggled), + gtk_marshal_NONE__BOOL, + GTK_TYPE_NONE, 1, + GTK_TYPE_BOOL); + + signals[BACK_CLICKED] = gtk_signal_new ("back_clicked", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EShellFolderTitleBarClass, back_clicked), + gtk_marshal_NONE__NONE, + GTK_TYPE_NONE, 0); + + signals[FORWARD_CLICKED] = gtk_signal_new ("forward_clicked", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EShellFolderTitleBarClass, forward_clicked), + gtk_marshal_NONE__NONE, + GTK_TYPE_NONE, 0); + + gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void @@ -493,25 +530,28 @@ e_shell_folder_title_bar_construct (EShellFolderTitleBar *folder_title_bar) priv = folder_title_bar->priv; widget = GTK_WIDGET (folder_title_bar); - priv->title_icon = new_empty_image_widget (); + priv->title_icon = new_empty_pixmap_widget (); gtk_misc_set_alignment (GTK_MISC (priv->title_icon), 1.0, .5); gtk_misc_set_padding (GTK_MISC (priv->title_icon), 2, 0); gtk_widget_show (priv->title_icon); - priv->title_label = e_clipped_label_new ("", PANGO_WEIGHT_BOLD, 1.2); + priv->title_label = e_clipped_label_new (""); gtk_misc_set_padding (GTK_MISC (priv->title_label), 0, 0); gtk_misc_set_alignment (GTK_MISC (priv->title_label), 0.0, 0.5); + set_title_bar_label_style (priv->title_label); - priv->title_button_label = e_clipped_label_new ("", PANGO_WEIGHT_BOLD, 1.2); + priv->title_button_label = e_clipped_label_new (""); gtk_misc_set_padding (GTK_MISC (priv->title_button_label), 2, 0); gtk_misc_set_alignment (GTK_MISC (priv->title_button_label), 0.0, 0.5); gtk_widget_show (priv->title_button_label); + set_title_bar_label_style (priv->title_button_label); - priv->folder_bar_label = e_clipped_label_new ("", PANGO_WEIGHT_NORMAL, 1.0); + priv->folder_bar_label = e_clipped_label_new (""); gtk_misc_set_alignment (GTK_MISC (priv->folder_bar_label), 1.0, 0.5); gtk_widget_show (priv->folder_bar_label); + set_title_bar_label_style (priv->folder_bar_label); - priv->title_button_icon = new_empty_image_widget (); + priv->title_button_icon = new_empty_pixmap_widget (); gtk_widget_show (priv->title_button_icon); title_button_hbox = gtk_hbox_new (FALSE, 0); @@ -519,7 +559,7 @@ e_shell_folder_title_bar_construct (EShellFolderTitleBar *folder_title_bar) FALSE, TRUE, 2); gtk_box_pack_start (GTK_BOX (title_button_hbox), priv->title_button_label, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (title_button_hbox), gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE), + gtk_box_pack_start (GTK_BOX (title_button_hbox), create_pixmap_widget_from_xpm (down_arrow_xpm), FALSE, TRUE, 2); gtk_widget_show (title_button_hbox); @@ -540,11 +580,11 @@ e_shell_folder_title_bar_construct (EShellFolderTitleBar *folder_title_bar) as the padding is hardcoded in GtkButton too (see CHILD_SPACING in gtkbutton.c). */ gtk_misc_set_padding (GTK_MISC (priv->title_label), - GTK_WIDGET (priv->title_button)->style->xthickness, - GTK_WIDGET (priv->title_button)->style->ythickness + 2); + GTK_WIDGET (priv->title_button)->style->klass->xthickness, + GTK_WIDGET (priv->title_button)->style->klass->ythickness + 2); - g_signal_connect (priv->title_button, "toggled", - G_CALLBACK (title_button_toggled_cb), folder_title_bar); + gtk_signal_connect (GTK_OBJECT (priv->title_button), "toggled", + GTK_SIGNAL_FUNC (title_button_toggled_cb), folder_title_bar); add_navigation_buttons (folder_title_bar); @@ -564,9 +604,13 @@ e_shell_folder_title_bar_new (void) { EShellFolderTitleBar *new; - new = g_object_new (e_shell_folder_title_bar_get_type (), NULL); + gtk_widget_push_colormap (gdk_rgb_get_cmap ()); + gtk_widget_push_visual (gdk_rgb_get_visual ()); + new = gtk_type_new (e_shell_folder_title_bar_get_type ()); e_shell_folder_title_bar_construct (new); + gtk_widget_pop_visual (); + gtk_widget_pop_colormap (); return GTK_WIDGET (new); } @@ -653,20 +697,20 @@ e_shell_folder_title_bar_set_icon (EShellFolderTitleBar *folder_title_bar, if (icon == NULL) { if (priv->icon != NULL) - g_object_unref (priv->icon); + gdk_pixbuf_unref (priv->icon); priv->icon = new_empty_pixbuf (); } else { - g_object_ref (icon); + gdk_pixbuf_ref (icon); if (priv->icon != NULL) - g_object_unref (priv->icon); + gdk_pixbuf_unref (priv->icon); priv->icon = icon; } gdk_pixbuf_render_pixmap_and_mask (priv->icon, &pixmap, &mask, 127); - gtk_image_set_from_pixmap (GTK_IMAGE (priv->title_button_icon), pixmap, mask); + gtk_pixmap_set (GTK_PIXMAP (priv->title_button_icon), pixmap, mask); gdk_pixbuf_render_pixmap_and_mask (priv->icon, &pixmap, &mask, 127); - gtk_image_set_from_pixmap (GTK_IMAGE (priv->title_icon), pixmap, mask); + gtk_pixmap_set (GTK_PIXMAP (priv->title_icon), pixmap, mask); } diff --git a/shell/e-shell-settings-dialog.c b/shell/e-shell-settings-dialog.c index cab4070def..64db14d714 100644 --- a/shell/e-shell-settings-dialog.c +++ b/shell/e-shell-settings-dialog.c @@ -32,11 +32,11 @@ #include "e-util/e-lang-utils.h" #include +#include #include #include - -#include +#include #include @@ -57,26 +57,14 @@ struct _EShellSettingsDialogPrivate { static void set_dialog_size (EShellSettingsDialog *dialog) { - PangoLayout *layout; - PangoContext *context; - PangoFontMetrics *metrics; + GdkFont *font; int width, height; - layout = gtk_widget_create_pango_layout (GTK_WIDGET (dialog), "M"); - context = pango_layout_get_context (layout); - metrics = pango_context_get_metrics (context, - gtk_widget_get_style (GTK_WIDGET (dialog))->font_desc, - pango_context_get_language (context)); - - pango_layout_get_pixel_size (layout, &width, NULL); - - width *= 60; - height = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) - + pango_font_metrics_get_descent (metrics)) * 30; + font = GTK_WIDGET (dialog)->style->font; + width = gdk_string_width (font, "M") * 72; + height = (font->ascent + font->descent) * 35; - gtk_window_set_default_size((GtkWindow *)dialog, width, height); - g_object_unref (layout); - pango_font_metrics_unref (metrics); + gtk_widget_set_usize (GTK_WIDGET (dialog), width, height); } @@ -86,7 +74,7 @@ struct _Page { char *title; char *description; GdkPixbuf *icon; - Bonobo_ActivationProperty *type; + OAF_Property *type; int priority; EConfigPage *page_widget; }; @@ -96,18 +84,18 @@ static Page * page_new (const char *title, const char *description, GdkPixbuf *icon, - Bonobo_ActivationProperty *type, + OAF_Property *type, int priority, EConfigPage *page_widget) { Page *page; if (icon != NULL) - g_object_ref (icon); + gdk_pixbuf_ref (icon); page = g_new (Page, 1); - page->title = g_strdup (title); - page->description = g_strdup (description); + page->title = e_utf8_from_locale_string (title); + page->description = e_utf8_from_locale_string (description); page->icon = icon; page->type = type; page->priority = priority; @@ -123,7 +111,7 @@ page_free (Page *page) g_free (page->description); if (page->icon != NULL) - g_object_unref (page->icon); + gdk_pixbuf_unref (page->icon); g_free (page); } @@ -154,7 +142,7 @@ static void load_pages (EShellSettingsDialog *dialog) { EShellSettingsDialogPrivate *priv; - Bonobo_ServerInfoList *control_list; + OAF_ServerInfoList *control_list; CORBA_Environment ev; GSList *language_list; GList *page_list; @@ -165,61 +153,57 @@ load_pages (EShellSettingsDialog *dialog) CORBA_exception_init (&ev); - control_list = bonobo_activation_query ("defined(evolution:config_item:title)", NULL, &ev); + control_list = oaf_query ("defined(evolution:config_item:title)", NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION || control_list == NULL) { - g_warning ("Cannot load configuration pages -- %s", BONOBO_EX_REPOID (&ev)); + g_warning ("Cannot load configuration pages -- %s", ev._repo_id); CORBA_exception_free (&ev); return; } - CORBA_exception_free (&ev); - language_list = e_get_language_list (); page_list = NULL; for (i = 0; i < control_list->_length; i ++) { CORBA_Object corba_object; - Bonobo_ServerInfo *info; + OAF_ServerInfo *info; const char *title; const char *description; const char *icon_path; const char *priority_string; - Bonobo_ActivationProperty *type; + OAF_Property *type; int priority; GdkPixbuf *icon; - CORBA_exception_init (&ev); - info = & control_list->_buffer[i]; - title = bonobo_server_info_prop_lookup (info, "evolution:config_item:title", language_list); - description = bonobo_server_info_prop_lookup (info, "evolution:config_item:description", language_list); - icon_path = bonobo_server_info_prop_lookup (info, "evolution:config_item:icon_name", NULL); - type = bonobo_server_info_prop_find (info, "evolution:config_item:type"); - priority_string = bonobo_server_info_prop_lookup (info, "evolution:config_item:priority", NULL); + title = oaf_server_info_prop_lookup (info, "evolution:config_item:title", language_list); + description = oaf_server_info_prop_lookup (info, "evolution:config_item:description", language_list); + icon_path = oaf_server_info_prop_lookup (info, "evolution:config_item:icon_name", NULL); + type = oaf_server_info_prop_find (info, "evolution:config_item:type"); + priority_string = oaf_server_info_prop_lookup (info, "evolution:config_item:priority", NULL); if (icon_path == NULL) { icon = NULL; } else { if (g_path_is_absolute (icon_path)) { - icon = gdk_pixbuf_new_from_file (icon_path, NULL); + icon = gdk_pixbuf_new_from_file (icon_path); } else { char *real_icon_path; - real_icon_path = g_build_filename (EVOLUTION_IMAGES, icon_path, NULL); - icon = gdk_pixbuf_new_from_file (real_icon_path, NULL); + real_icon_path = g_concat_dir_and_file (EVOLUTION_IMAGES, icon_path); + icon = gdk_pixbuf_new_from_file (real_icon_path); g_free (real_icon_path); } } - if (type != NULL && type->v._d != Bonobo_ACTIVATION_P_STRINGV) + if (type != NULL && type->v._d != OAF_P_STRINGV) type = NULL; if (priority_string == NULL) priority = 0xffff; else priority = atoi (priority_string); - corba_object = bonobo_activation_activate_from_id ((char *) info->iid, 0, NULL, &ev); + corba_object = oaf_activate_from_id ((char *) info->iid, 0, NULL, &ev); if (! BONOBO_EX (&ev)) { Page *page; @@ -229,15 +213,11 @@ load_pages (EShellSettingsDialog *dialog) page_list = g_list_prepend (page_list, page); } else { - char *bonobo_ex_text = bonobo_exception_get_text (&ev); - g_warning ("Cannot activate %s -- %s", info->iid, bonobo_ex_text); - g_free (bonobo_ex_text); + g_warning ("Cannot activate %s -- %s", info->iid, BONOBO_EX_ID (&ev)); } if (icon != NULL) - g_object_unref (icon); - - CORBA_exception_free (&ev); + gdk_pixbuf_unref (icon); } page_list = sort_page_list (page_list); @@ -253,7 +233,7 @@ load_pages (EShellSettingsDialog *dialog) page->page_widget); if (page->type != NULL) { - Bonobo_StringList list = page->type->v._u.value_stringv; + GNOME_stringlist list = page->type->v._u.value_stringv; for (j = 0; j < list._length; j++) { if (g_hash_table_lookup (priv->types, list._buffer[j]) == NULL) @@ -269,6 +249,8 @@ load_pages (EShellSettingsDialog *dialog) g_list_free (page_list); e_free_language_list (language_list); CORBA_free (control_list); + + CORBA_exception_free (&ev); } @@ -298,7 +280,7 @@ destroy_type_entry (gpointer key, gpointer value, gpointer data) } static void -impl_finalize (GObject *object) +impl_destroy (GtkObject *object) { EShellSettingsDialog *dialog; EShellSettingsDialogPrivate *priv; @@ -311,23 +293,23 @@ impl_finalize (GObject *object) g_free (priv); - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void class_init (EShellSettingsDialog *class) { - GObjectClass *object_class; + GtkObjectClass *object_class; GtkWidgetClass *widget_class; - object_class = G_OBJECT_CLASS (class); - object_class->finalize = impl_finalize; + object_class = GTK_OBJECT_CLASS (class); + object_class->destroy = impl_destroy; widget_class = GTK_WIDGET_CLASS (class); widget_class->realize = impl_realize; - parent_class = g_type_class_ref(PARENT_TYPE); + parent_class = gtk_type_class (PARENT_TYPE); } static void @@ -351,7 +333,7 @@ e_shell_settings_dialog_new () { EShellSettingsDialog *new; - new = g_object_new (e_shell_settings_dialog_get_type (), NULL); + new = gtk_type_new (e_shell_settings_dialog_get_type ()); return GTK_WIDGET (new); } diff --git a/shell/e-shell-shared-folder-picker-dialog.c b/shell/e-shell-shared-folder-picker-dialog.c index 191eccbbe3..5e9f245812 100644 --- a/shell/e-shell-shared-folder-picker-dialog.c +++ b/shell/e-shell-shared-folder-picker-dialog.c @@ -33,8 +33,11 @@ #include "Evolution-Addressbook-SelectNames.h" -#include "e-util/e-dialog-utils.h" +#include +#include +#include +#include #include #include @@ -42,10 +45,7 @@ #include #include -#include - #include -#include /* Timeout for showing the progress dialog (msecs). */ @@ -89,9 +89,9 @@ user_clicked (GtkWidget *button, GNOME_Evolution_Addressbook_SelectNames corba_i CORBA_exception_init (&ev); GNOME_Evolution_Addressbook_SelectNames_activateDialog (corba_iface, "User", &ev); - if (BONOBO_EX (&ev)) - g_warning ("Cannot activate SelectNames dialog -- %s", BONOBO_EX_REPOID (&ev)); - + if (BONOBO_EX (&ev)) { + g_warning ("Cannot activate SelectNames dialog -- %s", BONOBO_EX_ID (&ev)); + } CORBA_exception_free (&ev); } @@ -111,23 +111,23 @@ setup_name_selector (GladeXML *glade_xml, CORBA_exception_init (&ev); - corba_iface = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Addressbook_SelectNames", - 0, NULL, &ev); + corba_iface = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Addressbook_SelectNames", + 0, NULL, &ev); if (corba_iface == CORBA_OBJECT_NIL || BONOBO_EX (&ev)) { - g_warning ("Cannot activate SelectNames -- %s", BONOBO_EX_REPOID (&ev)); + g_warning ("Cannot activate SelectNames -- %s", BONOBO_EX_ID (&ev)); CORBA_exception_free (&ev); return CORBA_OBJECT_NIL; } GNOME_Evolution_Addressbook_SelectNames_addSectionWithLimit (corba_iface, "User", "User", 1, &ev); if (BONOBO_EX (&ev)) { - g_warning ("Cannot add SelectNames section -- %s", BONOBO_EX_REPOID (&ev)); + g_warning ("Cannot add SelectNames section -- %s", BONOBO_EX_ID (&ev)); goto err; } control = GNOME_Evolution_Addressbook_SelectNames_getEntryBySection (corba_iface, "User", &ev); if (BONOBO_EX (&ev)) { - g_warning ("Cannot get SelectNames section -- %s", BONOBO_EX_REPOID (&ev)); + g_warning ("Cannot get SelectNames section -- %s", BONOBO_EX_ID (&ev)); goto err; } @@ -136,7 +136,8 @@ setup_name_selector (GladeXML *glade_xml, gtk_widget_show (control_widget); button = glade_xml_get_widget (glade_xml, "button-user"); - g_signal_connect (button, "clicked", G_CALLBACK (user_clicked), corba_iface); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + user_clicked, corba_iface); CORBA_exception_free (&ev); *iface_ret = corba_iface; @@ -158,20 +159,8 @@ server_option_menu_item_activate_callback (GtkMenuItem *menu_item, if (*storage_name_return != NULL) g_free (*storage_name_return); - *storage_name_return = g_strdup ((const char *) g_object_get_data (G_OBJECT (menu_item), "storage_name")); -} - -static void -folder_name_entry_changed_callback (GtkEditable *editable, - void *data) -{ - GtkDialog *dialog = GTK_DIALOG (data); - const char *folder_name_text = gtk_entry_get_text (GTK_ENTRY (editable)); - - if (*folder_name_text == '\0') - gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, FALSE); - else - gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, TRUE); + *storage_name_return = g_strdup ((const char *) gtk_object_get_data (GTK_OBJECT (menu_item), + "storage_name")); } static void @@ -201,14 +190,15 @@ setup_server_option_menu (EShell *shell, storage_name = e_storage_get_name (E_STORAGE (p->data)); - menu_item = gtk_menu_item_new_with_label (storage_name); - g_signal_connect (menu_item, "activate", - G_CALLBACK (server_option_menu_item_activate_callback), - storage_name_return); - g_object_set_data_full (G_OBJECT (menu_item), "storage_name", g_strdup (storage_name), g_free); + menu_item = e_utf8_gtk_menu_item_new_with_label (GTK_MENU (menu), storage_name); + gtk_signal_connect (GTK_OBJECT (menu_item), "activate", + GTK_SIGNAL_FUNC (server_option_menu_item_activate_callback), + storage_name_return); + gtk_object_set_data_full (GTK_OBJECT (menu_item), "storage_name", + g_strdup (storage_name), g_free); gtk_widget_show (menu_item); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item); + gtk_menu_append (GTK_MENU (menu), menu_item); if (*storage_name_return == NULL) *storage_name_return = g_strdup (storage_name); @@ -231,11 +221,10 @@ show_dialog (EShell *shell, GtkWidget *dialog; GtkWidget *name_selector_widget; GtkWidget *folder_name_entry; - char *user_email_address; - int response; + int button_num; glade_xml = glade_xml_new (EVOLUTION_GLADEDIR "/e-shell-shared-folder-picker-dialog.glade", - NULL, NULL); + NULL); g_assert (glade_xml != NULL); name_selector_widget = setup_name_selector (glade_xml, &corba_iface); @@ -248,40 +237,22 @@ show_dialog (EShell *shell, dialog = glade_xml_get_widget (glade_xml, "dialog"); g_assert (dialog != NULL); - folder_name_entry = glade_xml_get_widget (glade_xml, "folder-name-entry"); + gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE); - /* Connect the callback to set the OK button insensitive when there is - no text in the folder_name_entry. Notice that we put a value there - by default so the OK button is sensitive by default. */ - g_signal_connect (folder_name_entry, "changed", - G_CALLBACK (folder_name_entry_changed_callback), dialog); - - while (TRUE) { - response = gtk_dialog_run (GTK_DIALOG (dialog)); - if (response == GTK_RESPONSE_CANCEL) { - g_free (*storage_name_return); - *storage_name_return = NULL; - gtk_widget_destroy (dialog); - bonobo_object_release_unref (corba_iface, NULL); - return FALSE; - } - - bonobo_widget_get_property (BONOBO_WIDGET (name_selector_widget), - "addresses", TC_CORBA_string, &user_email_address, - NULL); - - if (user_email_address != NULL && *user_email_address != '\0') - break; - - g_free (user_email_address); - - /* It would be nice to insensitivize the OK button appropriately - instead of doing this, but unfortunately we can't do this for the - Bonobo control. */ - e_notice (dialog, GTK_MESSAGE_ERROR, _("Please select a user.")); + button_num = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + if (button_num == 1) { /* Cancel */ + g_free (*storage_name_return); + *storage_name_return = NULL; + gtk_widget_destroy (dialog); + bonobo_object_release_unref (corba_iface, NULL); + return FALSE; } - *user_email_address_return = user_email_address; + bonobo_widget_get_property (BONOBO_WIDGET (name_selector_widget), + "addresses", user_email_address_return, + NULL); + + folder_name_entry = glade_xml_get_widget (glade_xml, "folder-name-entry"); *folder_name_return = g_strdup (gtk_entry_get_text (GTK_ENTRY (folder_name_entry))); gtk_widget_destroy (dialog); @@ -310,21 +281,29 @@ cleanup_discovery (DiscoveryData *discovery_data) g_free (discovery_data->user_email_address); g_free (discovery_data->folder_name); - g_object_unref (discovery_data->storage); + gtk_object_unref (GTK_OBJECT (discovery_data->storage)); g_free (discovery_data); } static int progress_bar_timeout_callback (void *data) { - gtk_progress_bar_pulse (GTK_PROGRESS_BAR (data)); + GtkAdjustment *adjustment; + float value; + + adjustment = GTK_PROGRESS (data)->adjustment; + value = adjustment->value + 1; + if (value > adjustment->upper) + value = adjustment->lower; + + gtk_progress_set_value (GTK_PROGRESS (data), value); return TRUE; } static void -progress_bar_weak_notify (void *data, - GObject *where_the_object_was) +progress_bar_destroy_callback (GtkObject *object, + void *data) { int timeout_id; @@ -332,10 +311,19 @@ progress_bar_weak_notify (void *data, g_source_remove (timeout_id); } +static int +progress_dialog_close_callback (GnomeDialog *dialog, + void *data) +{ + /* Don't allow the dialog to be closed through the window manager close + command. */ + return TRUE; +} + /* This is invoked if the "Cancel" button is clicked. */ static void -progress_dialog_clicked_callback (GtkDialog *dialog, - int response, +progress_dialog_clicked_callback (GnomeDialog *dialog, + int button_number, void *data) { DiscoveryData *discovery_data; @@ -371,37 +359,43 @@ create_progress_dialog (EShell *shell, int timeout_id; char *text; - dialog = gtk_dialog_new_with_buttons (_("Opening Folder"), NULL, 0, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - NULL); - gtk_widget_set_size_request (dialog, 300, -1); - gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); + dialog = gnome_dialog_new (_("Opening Folder"), GNOME_STOCK_BUTTON_CANCEL, NULL); + gtk_widget_set_usize (dialog, 300, -1); + gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, FALSE, FALSE); + + gtk_signal_connect (GTK_OBJECT (dialog), "close", + GTK_SIGNAL_FUNC (progress_dialog_close_callback), NULL); text = g_strdup_printf (_("Opening Folder \"%s\""), folder_name); label = gtk_label_new (text); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, FALSE, TRUE, 0); g_free (text); text = g_strdup_printf (_("in \"%s\" ..."), e_storage_get_name (storage)); label = gtk_label_new (text); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, FALSE, TRUE, 0); g_free (text); progress_bar = gtk_progress_bar_new (); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), progress_bar, FALSE, TRUE, 0); + gtk_progress_set_activity_mode (GTK_PROGRESS (progress_bar), TRUE); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), progress_bar, FALSE, TRUE, 0); timeout_id = g_timeout_add (50, progress_bar_timeout_callback, progress_bar); - g_object_weak_ref (G_OBJECT (progress_bar), progress_bar_weak_notify, GINT_TO_POINTER (timeout_id)); + gtk_signal_connect (GTK_OBJECT (progress_bar), "destroy", + GTK_SIGNAL_FUNC (progress_bar_destroy_callback), + GINT_TO_POINTER (timeout_id)); timeout_id = g_timeout_add (PROGRESS_DIALOG_DELAY, progress_dialog_show_timeout_callback, dialog); - g_object_weak_ref (G_OBJECT (progress_bar), progress_bar_weak_notify, GINT_TO_POINTER (timeout_id)); + gtk_signal_connect (GTK_OBJECT (progress_bar), "destroy", + GTK_SIGNAL_FUNC (progress_bar_destroy_callback), + GINT_TO_POINTER (timeout_id)); return dialog; } static void -shell_weak_notify (void *data, - GObject *where_the_object_was) +shell_destroy_callback (GtkObject *object, + void *data) { DiscoveryData *discovery_data; @@ -410,8 +404,8 @@ shell_weak_notify (void *data, } static void -shell_view_weak_notify (void *data, - GObject *where_the_object_was) +shell_view_destroy_callback (GtkObject *object, + void *data) { DiscoveryData *discovery_data; @@ -420,8 +414,8 @@ shell_view_weak_notify (void *data, } static void -storage_weak_notify (void *data, - GObject *where_the_object_was) +storage_destroy_callback (GtkObject *object, + void *data) { DiscoveryData *discovery_data; @@ -461,7 +455,8 @@ shared_folder_discovery_callback (EStorage *storage, else e_shell_create_view (shell, uri, NULL); } else { - e_notice (parent, GTK_MESSAGE_ERROR, + e_notice (parent ? GTK_WINDOW (parent) : NULL, + GNOME_MESSAGE_BOX_ERROR, _("Could not open shared folder: %s."), e_storage_result_to_string (result)); } @@ -496,14 +491,19 @@ discover_folder (EShell *shell, discovery_data->user_email_address = g_strdup (user_email_address); discovery_data->folder_name = g_strdup (folder_name); discovery_data->storage = storage; - g_object_ref (storage); + gtk_object_ref (GTK_OBJECT (storage)); + + gtk_signal_connect (GTK_OBJECT (shell), "destroy", + GTK_SIGNAL_FUNC (shell_destroy_callback), discovery_data); - g_object_weak_ref (G_OBJECT (shell), shell_weak_notify, discovery_data); - g_object_weak_ref (G_OBJECT (parent), shell_view_weak_notify, discovery_data); - g_object_weak_ref (G_OBJECT (storage), storage_weak_notify, discovery_data); + gtk_signal_connect (GTK_OBJECT (parent), "destroy", + GTK_SIGNAL_FUNC (shell_view_destroy_callback), discovery_data); - g_signal_connect (dialog, "clicked", - G_CALLBACK (progress_dialog_clicked_callback), discovery_data); + gtk_signal_connect (GTK_OBJECT (storage), "destroy", + GTK_SIGNAL_FUNC (storage_destroy_callback), discovery_data); + + gtk_signal_connect (GTK_OBJECT (dialog), "clicked", + GTK_SIGNAL_FUNC (progress_dialog_clicked_callback), discovery_data); e_storage_async_discover_shared_folder (storage, user_email_address, @@ -514,7 +514,7 @@ discover_folder (EShell *shell, error: /* FIXME: Be more verbose? */ - e_notice (parent, GTK_MESSAGE_ERROR, + e_notice (GTK_WINDOW (parent), GNOME_MESSAGE_BOX_ERROR, _("Cannot find the specified shared folder.")); } @@ -523,9 +523,9 @@ void e_shell_show_shared_folder_picker_dialog (EShell *shell, EShellView *parent) { - char *user_email_address = NULL; - char *storage_name = NULL; - char *folder_name = NULL; + char *user_email_address; + char *storage_name; + char *folder_name; g_return_if_fail (E_IS_SHELL (shell)); diff --git a/shell/e-shell-user-creatable-items-handler.c b/shell/e-shell-user-creatable-items-handler.c index ebd5be0911..53e2bc1731 100644 --- a/shell/e-shell-user-creatable-items-handler.c +++ b/shell/e-shell-user-creatable-items-handler.c @@ -35,7 +35,6 @@ #include #include -#include #include @@ -44,11 +43,10 @@ #include #include -#include -#define PARENT_TYPE G_TYPE_OBJECT -static GObjectClass *parent_class = NULL; +#define PARENT_TYPE gtk_object_get_type () +static GtkObjectClass *parent_class = NULL; #define VERB_PREFIX "ShellUserCreatableItemVerb" @@ -106,11 +104,11 @@ component_new (const char *id, new = g_new (Component, 1); new->component_client = client; - g_object_ref (client); + gtk_object_ref (GTK_OBJECT (client)); CORBA_exception_init (&ev); - objref = evolution_shell_component_client_corba_objref (client); + objref = bonobo_object_corba_objref (BONOBO_OBJECT (client)); new->type_list = GNOME_Evolution_ShellComponent__get_userCreatableItemTypes (objref, &ev); if (ev._major != CORBA_NO_EXCEPTION) @@ -124,7 +122,7 @@ component_new (const char *id, static void component_free (Component *component) { - g_object_unref (component->component_client); + gtk_object_unref (GTK_OBJECT (component->component_client)); if (component->type_list != NULL) CORBA_free (component->type_list); @@ -248,7 +246,7 @@ free_menu_items (GSList *menu_items) g_free (item->verb); if (item->icon != NULL) - g_object_unref (item->icon); + gdk_pixbuf_unref (item->icon); g_free (item->component_id); @@ -299,20 +297,24 @@ append_xml_for_menu_item (GString *xml, char *encoded_tooltip; encoded_label = bonobo_ui_util_encode_str (item->label); - g_string_append_printf (xml, "verb, item->verb, encoded_label); + g_string_sprintfa (xml, "verb, item->verb, encoded_label); if (first) - g_string_append_printf (xml, " accel=\"*Control*N\""); + g_string_sprintfa (xml, " accel=\"*Control*N\""); else if (item->shortcut != '\0') - g_string_append_printf (xml, " accel=\"*Control**Shift*%c\"", item->shortcut); - - if (item->icon != NULL) - g_string_append_printf (xml, " pixtype=\"pixbuf\" pixname=\"%s\"", - bonobo_ui_util_pixbuf_to_xml (item->icon)); + g_string_sprintfa (xml, " accel=\"*Control**Shift*%c\"", item->shortcut); + + if (item->icon != NULL) { + char *pixbuf_xml; + + pixbuf_xml = bonobo_ui_util_pixbuf_to_xml (item->icon); + g_string_sprintfa (xml, " pixtype=\"pixbuf\" pixname=\"%s\"", pixbuf_xml); + g_free (pixbuf_xml); + } encoded_tooltip = bonobo_ui_util_encode_str (item->tooltip); - g_string_append_printf (xml, " tip=\"%s\"", encoded_tooltip); + g_string_sprintfa (xml, " tip=\"%s\"", encoded_tooltip); g_string_append (xml, "/> "); @@ -384,8 +386,8 @@ create_menu_xml (EShellUserCreatableItemsHandler *handler, g_string_append (xml, ""); /* 1. Add all the elements that are default for this component. (Note - that we don't need to do any sorting since the items are already - sorted alphabetically.) */ + that we don't need to do any sorting since the items are already + sorted alphabetically.) */ if (component_id != NULL) { gboolean first = TRUE; @@ -404,8 +406,7 @@ create_menu_xml (EShellUserCreatableItemsHandler *handler, /* 2. Add a separator. */ if (component_id != NULL) - g_string_append_printf (xml, - ""); + g_string_sprintfa (xml, ""); /* 3. Add the elements that are not default for this component. */ @@ -475,14 +476,14 @@ execute_verb (EShellUserCreatableItemsHandler *handler, CORBA_exception_init (&ev); GNOME_Evolution_ShellComponent_userCreateNewItem - (evolution_shell_component_client_corba_objref (component->component_client), + (bonobo_object_corba_objref (BONOBO_OBJECT (component->component_client)), id, e_safe_corba_string (e_shell_view_get_current_physical_uri (shell_view)), e_safe_corba_string (e_shell_view_get_current_folder_type (shell_view)), &ev); if (ev._major != CORBA_NO_EXCEPTION) - g_warning ("Error in userCreateNewItem -- %s", BONOBO_EX_REPOID (&ev)); + g_warning ("Error in userCreateNewItem -- %s", ev._repo_id); CORBA_exception_free (&ev); return; @@ -498,7 +499,7 @@ verb_fn (BonoboUIComponent *ui_component, EShellUserCreatableItemsHandler *handler; EShellView *shell_view; - shell_view = g_object_get_data (G_OBJECT (ui_component), SHELL_VIEW_KEY); + shell_view = gtk_object_get_data (GTK_OBJECT (ui_component), SHELL_VIEW_KEY); g_assert (E_IS_SHELL_VIEW (shell_view)); handler = E_SHELL_USER_CREATABLE_ITEMS_HANDLER (data); @@ -518,7 +519,7 @@ add_verbs (EShellUserCreatableItemsHandler *handler, priv = handler->priv; ui_component = e_shell_view_get_bonobo_ui_component (shell_view); - g_object_set_data (G_OBJECT (ui_component), SHELL_VIEW_KEY, shell_view); + gtk_object_set_data (GTK_OBJECT (ui_component), SHELL_VIEW_KEY, shell_view); component_num = 0; for (p = priv->components; p != NULL; p = p->next) { @@ -582,9 +583,9 @@ setup_toolbar_button (EShellUserCreatableItemsHandler *handler, e_combo_button_set_label (E_COMBO_BUTTON (combo_button), _("New")); gtk_widget_show (combo_button); - g_signal_connect (combo_button, "activate_default", - G_CALLBACK (combo_button_activate_default_callback), - shell_view); + gtk_signal_connect (GTK_OBJECT (combo_button), "activate_default", + GTK_SIGNAL_FUNC (combo_button_activate_default_callback), + shell_view); ui_component = e_shell_view_get_bonobo_ui_component (shell_view); bonobo_window_add_popup (BONOBO_WINDOW (shell_view), GTK_MENU (menu), "/popups/NewPopup"); @@ -594,10 +595,10 @@ setup_toolbar_button (EShellUserCreatableItemsHandler *handler, bonobo_ui_component_object_set (ui_component, "/Toolbar/NewComboButton", BONOBO_OBJREF (control), NULL); - g_object_set_data (G_OBJECT (shell_view), COMBO_BUTTON_WIDGET_KEY, combo_button); + gtk_object_set_data (GTK_OBJECT (shell_view), COMBO_BUTTON_WIDGET_KEY, combo_button); tooltips = gtk_tooltips_new (); - g_object_set_data (G_OBJECT (combo_button), TOOLTIPS_KEY, tooltips); + gtk_object_set_data (GTK_OBJECT (combo_button), TOOLTIPS_KEY, tooltips); } @@ -624,10 +625,10 @@ shell_view_view_changed_callback (EShellView *shell_view, handler = E_SHELL_USER_CREATABLE_ITEMS_HANDLER (data); priv = handler->priv; - combo_button_widget = g_object_get_data (G_OBJECT (shell_view), COMBO_BUTTON_WIDGET_KEY); + combo_button_widget = gtk_object_get_data (GTK_OBJECT (shell_view), COMBO_BUTTON_WIDGET_KEY); g_assert (E_IS_COMBO_BUTTON (combo_button_widget)); - tooltips = g_object_get_data (G_OBJECT (combo_button_widget), TOOLTIPS_KEY); + tooltips = gtk_object_get_data (GTK_OBJECT (combo_button_widget), TOOLTIPS_KEY); g_assert (tooltips != NULL); default_menu_item = get_default_action_for_view (handler, shell_view); @@ -657,10 +658,10 @@ shell_view_view_changed_callback (EShellView *shell_view, } -/* GObject methods. */ +/* GtkObject methods. */ static void -impl_dispose (GObject *object) +impl_destroy (GtkObject *object) { EShellUserCreatableItemsHandler *handler; EShellUserCreatableItemsHandlerPrivate *priv; @@ -673,35 +674,21 @@ impl_dispose (GObject *object) component_free ((Component *) p->data); g_slist_free (priv->components); - priv->components = NULL; - - (* G_OBJECT_CLASS (parent_class)->dispose) (object); -} - -static void -impl_finalize (GObject *object) -{ - EShellUserCreatableItemsHandler *handler; - EShellUserCreatableItemsHandlerPrivate *priv; - - handler = E_SHELL_USER_CREATABLE_ITEMS_HANDLER (object); - priv = handler->priv; free_menu_items (priv->menu_items); g_free (priv); - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void -class_init (GObjectClass *object_class) +class_init (GtkObjectClass *object_class) { - parent_class = g_type_class_ref(PARENT_TYPE); + parent_class = gtk_type_class (PARENT_TYPE); - object_class->dispose = impl_dispose; - object_class->finalize = impl_finalize; + object_class->destroy = impl_destroy; } static void @@ -723,7 +710,7 @@ e_shell_user_creatable_items_handler_new (void) { EShellUserCreatableItemsHandler *new; - new = g_object_new (e_shell_user_creatable_items_handler_get_type (), NULL); + new = gtk_type_new (e_shell_user_creatable_items_handler_get_type ()); return new; } @@ -771,8 +758,8 @@ e_shell_user_creatable_items_handler_attach_menus (EShellUserCreatableItemsHandl priv = handler->priv; setup_toolbar_button (handler, shell_view); - g_signal_connect (shell_view, "view_changed", - G_CALLBACK (shell_view_view_changed_callback), handler); + gtk_signal_connect (GTK_OBJECT (shell_view), "view_changed", + GTK_SIGNAL_FUNC (shell_view_view_changed_callback), handler); add_verbs (handler, shell_view); menu_xml = create_menu_xml (handler, diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c index 5def82dcdb..c93af1c166 100644 --- a/shell/e-shortcuts.c +++ b/shell/e-shortcuts.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* e-shortcuts.c * - * Copyright (C) 2000, 2001 Ximian, Inc. + * Copyright (C) 2000, 2001, 2002 Ximian, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public @@ -52,19 +52,19 @@ #include #include -#include -#include +#include +#include +#include #include - -#include #include +#include +#include #include #include "e-shortcuts-view.h" #include "e-shell-constants.h" -#include "e-shell-marshal.h" #define PARENT_TYPE GTK_TYPE_OBJECT @@ -133,14 +133,12 @@ shortcut_item_new (const char *uri, { EShortcutItem *new; - new = g_new (EShortcutItem, 1); - if (name == NULL) - new->name = g_path_get_basename (uri); - else - new->name = g_strdup (name); + name = g_basename (uri); + new = g_new (EShortcutItem, 1); new->uri = g_strdup (uri); + new->name = g_strdup (name); new->type = g_strdup (type); new->custom_icon_name = g_strdup (custom_icon_name); new->unread_count = unread_count; @@ -156,11 +154,10 @@ shortcut_item_update (EShortcutItem *shortcut_item, const char *type, const char *custom_icon_name) { - char *base_name = g_path_get_basename (uri); gboolean changed = FALSE; if (name == NULL) - name = base_name; + name = g_basename (uri); if (shortcut_item->unread_count != unread_count) { shortcut_item->unread_count = unread_count; @@ -182,8 +179,6 @@ shortcut_item_update (EShortcutItem *shortcut_item, #undef UPDATE_STRING - g_free (base_name); - return changed; } @@ -242,7 +237,7 @@ update_shortcut_and_emit_signal (EShortcuts *shortcuts, shortcut_changed = shortcut_item_update (shortcut_item, uri, name, unread_count, type, custom_icon_name); if (shortcut_changed) { - g_signal_emit (shortcuts, signals[UPDATE_SHORTCUT], 0, group_num, num); + gtk_signal_emit (GTK_OBJECT (shortcuts), signals[UPDATE_SHORTCUT], group_num, num); return TRUE; } @@ -262,7 +257,7 @@ unload_shortcuts (EShortcuts *shortcuts) for (p = priv->groups; p != NULL; p = p->next) { ShortcutGroup *group; - g_signal_emit (shortcuts, signals[REMOVE_GROUP], 0, 0); + gtk_signal_emit (GTK_OBJECT (shortcuts), signals[REMOVE_GROUP], 0); group = (ShortcutGroup *) p->data; @@ -302,7 +297,7 @@ load_shortcuts (EShortcuts *shortcuts, unload_shortcuts (shortcuts); - for (p = root->children; p != NULL; p = p->next) { + for (p = root->childs; p != NULL; p = p->next) { ShortcutGroup *shortcut_group; xmlChar *shortcut_group_title; xmlChar *icon_size; @@ -324,7 +319,7 @@ load_shortcuts (EShortcuts *shortcuts, shortcut_group->use_small_icons = FALSE; xmlFree (icon_size); - for (q = p->children; q != NULL; q = q->next) { + for (q = p->childs; q != NULL; q = q->next) { EShortcutItem *shortcut_item; xmlChar *uri; xmlChar *name; @@ -335,7 +330,7 @@ load_shortcuts (EShortcuts *shortcuts, if (strcmp ((char *) q->name, "item") != 0) continue; - uri = xmlNodeListGetString (doc, q->children, 1); + uri = xmlNodeListGetString (doc, q->childs, 1); if (uri == NULL) continue; @@ -369,7 +364,6 @@ load_shortcuts (EShortcuts *shortcuts, xmlFree (icon); } - g_free (path); xmlFree (uri); } @@ -504,15 +498,12 @@ update_shortcuts_by_path (EShortcuts *shortcuts, EShortcutsPrivate *priv; EFolder *folder; const GSList *p, *q; - char *evolution_uri; int group_num, num; gboolean changed = FALSE; priv = shortcuts->priv; folder = e_storage_set_get_folder (e_shell_get_storage_set (priv->shell), path); - evolution_uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL); - group_num = 0; for (p = priv->groups; p != NULL; p = p->next, group_num++) { ShortcutGroup *group; @@ -546,8 +537,6 @@ update_shortcuts_by_path (EShortcuts *shortcuts, } } - g_free (evolution_uri); - if (changed) make_dirty (shortcuts); } @@ -585,8 +574,8 @@ get_item (EShortcuts *shortcuts, /* Signal handlers for the views. */ static void -view_weak_notify (void *data, - GObject *where_the_object_was) +view_destroyed_cb (GtkObject *object, + gpointer data) { EShortcuts *shortcuts; EShortcutsPrivate *priv; @@ -594,7 +583,7 @@ view_weak_notify (void *data, shortcuts = E_SHORTCUTS (data); priv = shortcuts->priv; - priv->views = g_slist_remove (priv->views, where_the_object_was); + priv->views = g_slist_remove (priv->views, object); } @@ -625,140 +614,112 @@ storage_set_updated_folder_callback (EStorageSet *storage_set, } -/* GObject methods. */ +/* GtkObject methods. */ static void -impl_dispose (GObject *object) +impl_destroy (GtkObject *object) { EShortcuts *shortcuts; EShortcutsPrivate *priv; - GSList *p; shortcuts = E_SHORTCUTS (object); priv = shortcuts->priv; + g_free (priv->file_name); + unload_shortcuts (shortcuts); - if (priv->save_idle_id != 0) { + if (priv->save_idle_id != 0) gtk_idle_remove (priv->save_idle_id); - priv->save_idle_id = 0; - } if (priv->dirty) { if (! e_shortcuts_save (shortcuts, NULL)) g_warning (_("Error saving shortcuts.")); /* FIXME */ - priv->dirty = FALSE; } - for (p = priv->views; p != NULL; p = p->next) - g_object_weak_unref (G_OBJECT (p->data), view_weak_notify, shortcuts); - g_slist_free (priv->views); - priv->views = NULL; - - (* G_OBJECT_CLASS (parent_class)->dispose) (object); -} - -static void -impl_finalize (GObject *object) -{ - EShortcuts *shortcuts; - EShortcutsPrivate *priv; - - shortcuts = E_SHORTCUTS (object); - priv = shortcuts->priv; - - g_free (priv->file_name); - g_free (priv); - - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void class_init (EShortcutsClass *klass) { - GObjectClass *object_class; + GtkObjectClass *object_class; - object_class = G_OBJECT_CLASS (klass); - object_class->dispose = impl_dispose; - object_class->finalize = impl_finalize; + object_class = (GtkObjectClass*) klass; + object_class->destroy = impl_destroy; - parent_class = g_type_class_ref(gtk_object_get_type ()); + parent_class = gtk_type_class (gtk_object_get_type ()); signals[NEW_GROUP] - = g_signal_new ("new_group", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EShortcutsClass, new_group), - NULL, NULL, - e_shell_marshal_NONE__INT, - G_TYPE_NONE, 1, - G_TYPE_INT); + = gtk_signal_new ("new_group", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EShortcutsClass, new_group), + gtk_marshal_NONE__INT, + GTK_TYPE_NONE, 1, + GTK_TYPE_INT); signals[REMOVE_GROUP] - = g_signal_new ("remove_group", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EShortcutsClass, remove_group), - NULL, NULL, - e_shell_marshal_NONE__INT, - G_TYPE_NONE, 1, - G_TYPE_INT); + = gtk_signal_new ("remove_group", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EShortcutsClass, remove_group), + gtk_marshal_NONE__INT, + GTK_TYPE_NONE, 1, + GTK_TYPE_INT); signals[RENAME_GROUP] - = g_signal_new ("rename_group", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EShortcutsClass, rename_group), - NULL, NULL, - e_shell_marshal_NONE__INT_STRING, - G_TYPE_NONE, 2, - G_TYPE_INT, - G_TYPE_STRING); + = gtk_signal_new ("rename_group", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EShortcutsClass, rename_group), + gtk_marshal_NONE__INT_POINTER, + GTK_TYPE_NONE, 2, + GTK_TYPE_INT, + GTK_TYPE_STRING); signals[GROUP_CHANGE_ICON_SIZE] - = g_signal_new ("group_change_icon_size", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EShortcutsClass, group_change_icon_size), - NULL, NULL, - e_shell_marshal_NONE__INT_INT, - G_TYPE_NONE, 2, - G_TYPE_INT, - G_TYPE_INT); + = gtk_signal_new ("group_change_icon_size", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EShortcutsClass, group_change_icon_size), + gtk_marshal_NONE__INT_INT, + GTK_TYPE_NONE, 2, + GTK_TYPE_INT, + GTK_TYPE_INT); signals[NEW_SHORTCUT] - = g_signal_new ("new_shortcut", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EShortcutsClass, new_shortcut), - NULL, NULL, - e_shell_marshal_NONE__INT_INT, - G_TYPE_NONE, 2, - G_TYPE_INT, - G_TYPE_INT); + = gtk_signal_new ("new_shortcut", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EShortcutsClass, new_shortcut), + gtk_marshal_NONE__INT_INT, + GTK_TYPE_NONE, 2, + GTK_TYPE_INT, + GTK_TYPE_INT); signals[REMOVE_SHORTCUT] - = g_signal_new ("remove_shortcut", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EShortcutsClass, remove_shortcut), - NULL, NULL, - e_shell_marshal_NONE__INT_INT, - G_TYPE_NONE, 2, - G_TYPE_INT, - G_TYPE_INT); + = gtk_signal_new ("remove_shortcut", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EShortcutsClass, remove_shortcut), + gtk_marshal_NONE__INT_INT, + GTK_TYPE_NONE, 2, + GTK_TYPE_INT, + GTK_TYPE_INT); signals[UPDATE_SHORTCUT] - = g_signal_new ("update_shortcut", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EShortcutsClass, update_shortcut), - NULL, NULL, - e_shell_marshal_NONE__INT_INT, - G_TYPE_NONE, 2, - G_TYPE_INT, - G_TYPE_INT); + = gtk_signal_new ("update_shortcut", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EShortcutsClass, update_shortcut), + gtk_marshal_NONE__INT_INT, + GTK_TYPE_NONE, 2, + GTK_TYPE_INT, + GTK_TYPE_INT); + + gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } @@ -800,10 +761,12 @@ e_shortcuts_construct (EShortcuts *shortcuts, storage_set = e_shell_get_storage_set (shell); - g_signal_connect_object (storage_set, "new_folder", - G_CALLBACK (storage_set_new_folder_callback), shortcuts, 0); - g_signal_connect_object (storage_set, "updated_folder", - G_CALLBACK (storage_set_updated_folder_callback), shortcuts, 0); + gtk_signal_connect_while_alive (GTK_OBJECT (storage_set), "new_folder", + GTK_SIGNAL_FUNC (storage_set_new_folder_callback), + shortcuts, GTK_OBJECT (shortcuts)); + gtk_signal_connect_while_alive (GTK_OBJECT (storage_set), "updated_folder", + GTK_SIGNAL_FUNC (storage_set_updated_folder_callback), + shortcuts, GTK_OBJECT (shortcuts)); } EShortcuts * @@ -815,7 +778,7 @@ e_shortcuts_new_from_file (EShell *shell, g_return_val_if_fail (E_IS_SHELL (shell), NULL); g_return_val_if_fail (file_name != NULL, NULL); - new = g_object_new (e_shortcuts_get_type (), NULL); + new = gtk_type_new (e_shortcuts_get_type ()); e_shortcuts_construct (new, shell); if (! e_shortcuts_load (new, file_name)) @@ -904,7 +867,7 @@ e_shortcuts_new_view (EShortcuts *shortcuts) new = e_shortcuts_view_new (shortcuts); priv->views = g_slist_prepend (priv->views, new); - g_object_weak_ref (G_OBJECT (new), view_weak_notify, shortcuts); + gtk_signal_connect (GTK_OBJECT (new), "destroy", view_destroyed_cb, shortcuts); return new; } @@ -1004,7 +967,7 @@ e_shortcuts_remove_shortcut (EShortcuts *shortcuts, p = g_slist_nth (group->shortcuts, num); g_return_if_fail (p != NULL); - g_signal_emit (shortcuts, signals[REMOVE_SHORTCUT], 0, group_num, num); + gtk_signal_emit (GTK_OBJECT (shortcuts), signals[REMOVE_SHORTCUT], group_num, num); item = (EShortcutItem *) p->data; shortcut_item_free (item); @@ -1046,7 +1009,7 @@ e_shortcuts_add_shortcut (EShortcuts *shortcuts, group->shortcuts = g_slist_insert (group->shortcuts, item, num); - g_signal_emit (shortcuts, signals[NEW_SHORTCUT], 0, group_num, num); + gtk_signal_emit (GTK_OBJECT (shortcuts), signals[NEW_SHORTCUT], group_num, num); make_dirty (shortcuts); } @@ -1079,21 +1042,40 @@ void e_shortcuts_add_default_shortcuts (EShortcuts *shortcuts, int group_num) { - e_shortcuts_add_shortcut (shortcuts, 0, -1, E_SUMMARY_URI, _("Summary"), 0, "summary", NULL); + char *utf; + + utf = e_utf8_from_locale_string (_("Summary")); + e_shortcuts_add_shortcut (shortcuts, 0, -1, E_SUMMARY_URI, utf, 0, "summary", NULL); + g_free (utf); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:mail", _("Inbox"), 0, "mail", "inbox"); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:calendar", _("Calendar"), 0, "calendar", NULL); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:tasks", _("Tasks"), 0, "tasks", NULL); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:contacts", _("Contacts"), 0, "contacts", NULL); + utf = e_utf8_from_locale_string (_("Inbox")); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:mail", utf, 0, "mail", "inbox"); + g_free (utf); + + utf = e_utf8_from_locale_string (_("Calendar")); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:calendar", utf, 0, "calendar", NULL); + g_free (utf); + + utf = e_utf8_from_locale_string (_("Tasks")); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:tasks", utf, 0, "tasks", NULL); + g_free (utf); + + utf = e_utf8_from_locale_string (_("Contacts")); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:contacts", utf, 0, "contacts", NULL); + g_free (utf); } void e_shortcuts_add_default_group (EShortcuts *shortcuts) { + char *utf; + g_return_if_fail (shortcuts != NULL); g_return_if_fail (E_IS_SHORTCUTS (shortcuts)); - e_shortcuts_add_group (shortcuts, -1, _("Shortcuts")); + utf = e_utf8_from_locale_string (_("Shortcuts")); + e_shortcuts_add_group (shortcuts, -1, utf); + g_free (utf); e_shortcuts_add_default_shortcuts (shortcuts, -1); } @@ -1113,7 +1095,7 @@ e_shortcuts_remove_group (EShortcuts *shortcuts, p = g_slist_nth (priv->groups, group_num); g_return_if_fail (p != NULL); - g_signal_emit (shortcuts, signals[REMOVE_GROUP], 0, group_num); + gtk_signal_emit (GTK_OBJECT (shortcuts), signals[REMOVE_GROUP], group_num); shortcut_group_free ((ShortcutGroup *) p->data); @@ -1147,7 +1129,7 @@ e_shortcuts_rename_group (EShortcuts *shortcuts, } else return; - g_signal_emit (shortcuts, signals[RENAME_GROUP], 0, group_num, new_title); + gtk_signal_emit (GTK_OBJECT (shortcuts), signals[RENAME_GROUP], group_num, new_title); make_dirty (shortcuts); } @@ -1173,7 +1155,7 @@ e_shortcuts_add_group (EShortcuts *shortcuts, priv->groups = g_slist_insert (priv->groups, group, group_num); priv->num_groups ++; - g_signal_emit (shortcuts, signals[NEW_GROUP], 0, group_num); + gtk_signal_emit (GTK_OBJECT (shortcuts), signals[NEW_GROUP], group_num); make_dirty (shortcuts); } @@ -1223,7 +1205,8 @@ e_shortcuts_set_group_uses_small_icons (EShortcuts *shortcuts, use_small_icons = !! use_small_icons; if (group->use_small_icons != use_small_icons) { group->use_small_icons = use_small_icons; - g_signal_emit (shortcuts, signals[GROUP_CHANGE_ICON_SIZE], 0, group_num, use_small_icons); + gtk_signal_emit (GTK_OBJECT (shortcuts), signals[GROUP_CHANGE_ICON_SIZE], + group_num, use_small_icons); make_dirty (shortcuts); } diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c index 735da0ab21..281feb6168 100644 --- a/shell/e-storage-set-view.c +++ b/shell/e-storage-set-view.c @@ -33,7 +33,6 @@ #include "e-icon-factory.h" #include "e-folder-dnd-bridge.h" #include "e-shell-constants.h" -#include "e-shell-marshal.h" #include #include @@ -41,16 +40,14 @@ #include #include #include +#include +#include +#include +#include #include -#include - -#include #include - -#include - -#include +#include #include "check-empty.xpm" #include "check-filled.xpm" @@ -325,7 +322,7 @@ get_pixbuf_for_folder (EStorageSetView *storage_set_view, icon_pixbuf_height = gdk_pixbuf_get_height (icon_pixbuf); if (icon_pixbuf_width == E_SHELL_MINI_ICON_SIZE && icon_pixbuf_height == E_SHELL_MINI_ICON_SIZE) { - scaled_pixbuf = g_object_ref (icon_pixbuf); + scaled_pixbuf = gdk_pixbuf_ref (icon_pixbuf); } else { scaled_pixbuf = gdk_pixbuf_new (gdk_pixbuf_get_colorspace (icon_pixbuf), gdk_pixbuf_get_has_alpha (icon_pixbuf), @@ -410,14 +407,38 @@ convert_gdk_drag_action_set_to_corba (GdkDragAction action) /* The weakref callback for priv->ui_component. */ static void -ui_container_destroy_notify (void *data, - GObject *where_the_object_was) +ui_container_destroy_notify (void *data) { EStorageSetViewPrivate *priv = (EStorageSetViewPrivate *) data; priv->ui_container = NULL; } + +/* Custom marshalling function. */ + +typedef void (* GtkSignal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING) (GtkObject *object, + GdkDragContext *action, + const char *, + const char *, + const char *); + +static void +marshal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING (GtkObject *object, + GtkSignalFunc func, + void *func_data, + GtkArg *args) +{ + GtkSignal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING rfunc; + + rfunc = (GtkSignal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING) func; + (* rfunc) (object, + GTK_VALUE_POINTER (args[0]), + GTK_VALUE_STRING (args[1]), + GTK_VALUE_STRING (args[2]), + GTK_VALUE_STRING (args[3])); +} + /* DnD selection setup stuff. */ @@ -671,16 +692,16 @@ setup_folder_properties_items_if_corba_storage_clicked (EStorageSetView *storage item = (const ECorbaStoragePropertyItem *) p->data; num_property_items ++; - g_string_append_printf (xml, "tooltip); - g_string_append_printf (xml, " tip=\"%s\"", encoded_tooltip); + g_string_sprintfa (xml, " tip=\"%s\"", encoded_tooltip); encoded_label = bonobo_ui_util_encode_str (item->label); - g_string_append_printf (xml, " label=\"%s\"/>", encoded_label); + g_string_sprintfa (xml, " label=\"%s\"/>", encoded_label); g_free (encoded_tooltip); g_free (encoded_label); @@ -693,8 +714,8 @@ setup_folder_properties_items_if_corba_storage_clicked (EStorageSetView *storage data->corba_storage = E_CORBA_STORAGE (storage); data->num_items = num_property_items; - g_object_ref (data->storage_set_view); - g_object_ref (data->corba_storage); + gtk_object_ref (GTK_OBJECT (data->storage_set_view)); + gtk_object_ref (GTK_OBJECT (data->corba_storage)); for (i = 1; i <= num_property_items; i ++) { char *verb; @@ -742,8 +763,8 @@ remove_property_items (EStorageSetView *storage_set_view, } } - g_object_unref (data->storage_set_view); - g_object_unref (data->corba_storage); + gtk_object_unref (GTK_OBJECT (data->storage_set_view)); + gtk_object_unref (GTK_OBJECT (data->corba_storage)); g_free (data); } @@ -756,13 +777,13 @@ popup_folder_menu (EStorageSetView *storage_set_view, EStorageSetViewPrivate *priv; EFolderTypeRegistry *folder_type_registry; EFolder *folder; - GtkWidget *menu, *window; + GtkWidget *menu; FolderPropertyItemsData *folder_property_items_data; priv = storage_set_view->priv; folder = e_storage_set_get_folder (priv->storage_set, priv->right_click_row_path); - g_object_ref (folder); + gtk_object_ref (GTK_OBJECT (folder)); folder_type_registry = e_storage_set_get_folder_type_registry (priv->storage_set); g_assert (folder_type_registry != NULL); @@ -770,10 +791,7 @@ popup_folder_menu (EStorageSetView *storage_set_view, handler = e_folder_type_registry_get_handler_for_type (folder_type_registry, e_folder_get_type_string (folder)); menu = gtk_menu_new (); - - window = gtk_widget_get_ancestor (GTK_WIDGET (storage_set_view), - BONOBO_TYPE_WINDOW); - bonobo_window_add_popup (BONOBO_WINDOW (window), + bonobo_window_add_popup (bonobo_ui_container_get_win (priv->ui_container), GTK_MENU (menu), "/popups/FolderPopup"); bonobo_ui_component_set (priv->ui_component, @@ -790,8 +808,7 @@ popup_folder_menu (EStorageSetView *storage_set_view, gtk_widget_show (GTK_WIDGET (menu)); - gnome_popup_menu_do_popup_modal (GTK_WIDGET (menu), NULL, NULL, event, NULL, - GTK_WIDGET (storage_set_view)); + gnome_popup_menu_do_popup_modal (GTK_WIDGET (menu), NULL, NULL, event, NULL); if (folder_property_items_data != NULL) remove_property_items (storage_set_view, folder_property_items_data); @@ -802,7 +819,7 @@ popup_folder_menu (EStorageSetView *storage_set_view, e_folder_get_physical_uri (folder), e_folder_get_type_string (folder)); - g_object_unref (folder); + gtk_object_unref (GTK_OBJECT (folder)); gtk_widget_destroy (GTK_WIDGET (menu)); e_tree_right_click_up (E_TREE (storage_set_view)); @@ -811,15 +828,21 @@ popup_folder_menu (EStorageSetView *storage_set_view, /* GtkObject methods. */ +static void +path_free_func (gpointer key, gpointer value, gpointer user_data) +{ + g_free (key); +} + static void pixbuf_free_func (gpointer key, gpointer value, gpointer user_data) { g_free (key); - g_object_unref ((GdkPixbuf*)value); + gdk_pixbuf_unref ((GdkPixbuf*)value); } static void -impl_dispose (GObject *object) +impl_destroy (GtkObject *object) { EStorageSetView *storage_set_view; EStorageSetViewPrivate *priv; @@ -827,22 +850,27 @@ impl_dispose (GObject *object) storage_set_view = E_STORAGE_SET_VIEW (object); priv = storage_set_view->priv; - if (priv->etree_model != NULL) { - /* Destroy the tree. */ - e_tree_memory_node_remove (E_TREE_MEMORY(priv->etree_model), priv->root_node); - g_object_unref (priv->etree_model); - priv->etree_model = NULL; + /* need to destroy our tree */ + e_tree_memory_node_remove (E_TREE_MEMORY(priv->etree_model), priv->root_node); + gtk_object_unref (GTK_OBJECT (priv->etree_model)); - /* (The data in the hash table was all freed by freeing the tree.) */ - g_hash_table_destroy (priv->path_to_etree_node); - priv->path_to_etree_node = NULL; - } + /* the data in the hash table was all freed by freeing the tree */ + g_hash_table_foreach (priv->path_to_etree_node, path_free_func, NULL); + g_hash_table_destroy (priv->path_to_etree_node); - if (priv->storage_set != NULL) { - g_object_unref (priv->storage_set); - priv->storage_set = NULL; + /* now free up all the type_names and pixbufs stored in the + hash table and destroy the hash table itself */ + g_hash_table_foreach (priv->type_name_to_pixbuf, pixbuf_free_func, NULL); + g_hash_table_destroy (priv->type_name_to_pixbuf); + + if (priv->checkboxes) { + g_hash_table_foreach (priv->checkboxes, (GHFunc) g_free, NULL); + g_hash_table_destroy (priv->checkboxes); + priv->checkboxes = NULL; } + gtk_object_unref (GTK_OBJECT (priv->storage_set)); + if (priv->drag_corba_source_interface != CORBA_OBJECT_NIL) { CORBA_Environment ev; @@ -858,35 +886,6 @@ impl_dispose (GObject *object) CORBA_Object_release (priv->drag_corba_source_interface, &ev); CORBA_exception_free (&ev); - - priv->drag_corba_source_interface = CORBA_OBJECT_NIL; - } - - if (priv->ui_component != NULL) { - bonobo_object_unref (BONOBO_OBJECT (priv->ui_component)); - priv->ui_component = NULL; - } - - /* (No unreffing for priv->ui_container since we use a weakref.) */ - - (* G_OBJECT_CLASS (parent_class)->dispose) (object); -} - -static void -impl_finalize (GObject *object) -{ - EStorageSetView *storage_set_view; - EStorageSetViewPrivate *priv; - - storage_set_view = E_STORAGE_SET_VIEW (object); - priv = storage_set_view->priv; - - g_hash_table_foreach (priv->type_name_to_pixbuf, pixbuf_free_func, NULL); - g_hash_table_destroy (priv->type_name_to_pixbuf); - - if (priv->checkboxes != NULL) { - g_hash_table_foreach (priv->checkboxes, (GHFunc) g_free, NULL); - g_hash_table_destroy (priv->checkboxes); } if (priv->drag_corba_source_context != NULL) @@ -895,12 +894,17 @@ impl_finalize (GObject *object) if (priv->drag_corba_data != NULL) CORBA_free (priv->drag_corba_data); + if (priv->ui_component != NULL) + bonobo_object_unref (BONOBO_OBJECT (priv->ui_component)); + + /* (No unreffing for priv->ui_container since we use a weakref.) */ + g_free (priv->selected_row_path); g_free (priv->right_click_row_path); g_free (priv); - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -981,7 +985,7 @@ impl_tree_drag_begin (ETree *etree, CORBA_exception_init (&ev); - corba_component = evolution_shell_component_client_corba_objref (component_client); + corba_component = bonobo_object_corba_objref (BONOBO_OBJECT (component_client)); priv->drag_corba_source_interface = Bonobo_Unknown_queryInterface (corba_component, "IDL:GNOME/Evolution/ShellComponentDnd/SourceFolder:1.0", &ev); @@ -1098,11 +1102,10 @@ impl_tree_drag_data_get (ETree *etree, &ev); if (ev._major != CORBA_NO_EXCEPTION) - gtk_selection_data_set (selection_data, - selection_data->target, 8, "", -1); + gtk_selection_data_set (selection_data, selection_data->target, 8, "", -1); else gtk_selection_data_set (selection_data, - gdk_atom_intern (priv->drag_corba_data->target, FALSE), + priv->drag_corba_data->target, priv->drag_corba_data->format, priv->drag_corba_data->bytes._buffer, priv->drag_corba_data->bytes._length); @@ -1161,7 +1164,7 @@ impl_tree_drag_motion (ETree *tree, return FALSE; folder_path = e_tree_memory_node_get_data (E_TREE_MEMORY (priv->etree_model), - e_tree_node_at_row (E_TREE (storage_set_view), row)); + e_tree_node_at_row (E_TREE (storage_set_view), row)); if (folder_path == NULL) return FALSE; @@ -1263,11 +1266,14 @@ impl_right_click (ETree *etree, priv->right_click_row_path = g_strdup (e_tree_memory_node_get_data (E_TREE_MEMORY(priv->etree_model), path)); if (priv->ui_container) { - g_signal_emit (storage_set_view, signals[FOLDER_CONTEXT_MENU_POPPING_UP], 0, priv->right_click_row_path); + gtk_signal_emit (GTK_OBJECT (storage_set_view), + signals[FOLDER_CONTEXT_MENU_POPPING_UP], + priv->right_click_row_path); popup_folder_menu (storage_set_view, (GdkEventButton *) event); - g_signal_emit (storage_set_view, signals[FOLDER_CONTEXT_MENU_POPPED_DOWN], 0); + gtk_signal_emit (GTK_OBJECT (storage_set_view), + signals[FOLDER_CONTEXT_MENU_POPPED_DOWN]); } g_free (priv->right_click_row_path); @@ -1292,8 +1298,8 @@ impl_cursor_activated (ETree *tree, if (path) { priv->selected_row_path = g_strdup (e_tree_memory_node_get_data (E_TREE_MEMORY (priv->etree_model), path)); - g_signal_emit (storage_set_view, signals[FOLDER_SELECTED], 0, - priv->selected_row_path); + gtk_signal_emit (GTK_OBJECT (storage_set_view), signals[FOLDER_SELECTED], + priv->selected_row_path); } else priv->selected_row_path = NULL; @@ -1451,7 +1457,9 @@ etree_value_at (ETreeModel *etree, name_with_unread = g_strdup_printf ("%s (%d)", folder_name, unread_count); - g_object_set_data_full (G_OBJECT (folder), "name_with_unread", name_with_unread, g_free); + gtk_object_set_data_full (GTK_OBJECT (folder), + "name_with_unread", + name_with_unread, g_free); return (void *) name_with_unread; } else @@ -1489,7 +1497,8 @@ etree_fill_in_children (ETreeModel *etree, parent = e_tree_model_node_get_parent (etree, tree_path); path = (char *) e_tree_memory_node_get_data (E_TREE_MEMORY(etree), parent); if (tree_path == e_tree_model_node_get_first_child (etree, parent)) { - g_signal_emit (storage_set_view, signals[FOLDER_OPENED], 0, path); + gtk_signal_emit (GTK_OBJECT (storage_set_view), + signals[FOLDER_OPENED], path); } } @@ -1533,7 +1542,8 @@ etree_set_value_at (ETreeModel *etree, } e_tree_model_node_col_changed (etree, tree_path, col); - g_signal_emit (storage_set_view, signals[CHECKBOXES_CHANGED], 0); + gtk_signal_emit (GTK_OBJECT (storage_set_view), + signals[CHECKBOXES_CHANGED]); break; } } @@ -1784,14 +1794,13 @@ close_folder_cb (EStorageSet *storage_set, static void class_init (EStorageSetViewClass *klass) { - GObjectClass *object_class; + GtkObjectClass *object_class; ETreeClass *etree_class; - parent_class = g_type_class_ref(PARENT_TYPE); + parent_class = gtk_type_class (PARENT_TYPE); - object_class = G_OBJECT_CLASS (klass); - object_class->dispose = impl_dispose; - object_class->finalize = impl_finalize; + object_class = GTK_OBJECT_CLASS (klass); + object_class->destroy = impl_destroy; etree_class = E_TREE_CLASS (klass); etree_class->right_click = impl_right_click; @@ -1807,65 +1816,61 @@ class_init (EStorageSetViewClass *klass) etree_class->tree_drag_data_received = impl_tree_drag_data_received; signals[FOLDER_SELECTED] - = g_signal_new ("folder_selected", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EStorageSetViewClass, folder_selected), - NULL, NULL, - e_shell_marshal_NONE__STRING, - G_TYPE_NONE, 1, - G_TYPE_STRING); + = gtk_signal_new ("folder_selected", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageSetViewClass, folder_selected), + gtk_marshal_NONE__STRING, + GTK_TYPE_NONE, 1, + GTK_TYPE_STRING); signals[FOLDER_OPENED] - = g_signal_new ("folder_opened", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EStorageSetViewClass, folder_opened), - NULL, NULL, - e_shell_marshal_NONE__STRING, - G_TYPE_NONE, 1, - G_TYPE_STRING); + = gtk_signal_new ("folder_opened", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageSetViewClass, folder_opened), + gtk_marshal_NONE__STRING, + GTK_TYPE_NONE, 1, + GTK_TYPE_STRING); signals[DND_ACTION] - = g_signal_new ("dnd_action", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EStorageSetViewClass, dnd_action), - NULL, NULL, - e_shell_marshal_NONE__POINTER_POINTER_POINTER_POINTER, - G_TYPE_NONE, 4, - G_TYPE_POINTER, - G_TYPE_POINTER, - G_TYPE_POINTER, - G_TYPE_POINTER); + = gtk_signal_new ("dnd_action", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageSetViewClass, dnd_action), + marshal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING, + GTK_TYPE_NONE, 4, + GTK_TYPE_GDK_DRAG_CONTEXT, + GTK_TYPE_STRING, + GTK_TYPE_STRING, + GTK_TYPE_STRING); signals[FOLDER_CONTEXT_MENU_POPPING_UP] - = g_signal_new ("folder_context_menu_popping_up", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EStorageSetViewClass, folder_context_menu_popping_up), - NULL, NULL, - e_shell_marshal_NONE__STRING, - G_TYPE_NONE, 1, - G_TYPE_STRING); + = gtk_signal_new ("folder_context_menu_popping_up", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageSetViewClass, folder_context_menu_popping_up), + gtk_marshal_NONE__STRING, + GTK_TYPE_NONE, 1, + GTK_TYPE_STRING); signals[FOLDER_CONTEXT_MENU_POPPED_DOWN] - = g_signal_new ("folder_context_menu_popped_down", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EStorageSetViewClass, folder_context_menu_popped_down), - NULL, NULL, - e_shell_marshal_NONE__NONE, - G_TYPE_NONE, 0); + = gtk_signal_new ("folder_context_menu_popped_down", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageSetViewClass, folder_context_menu_popped_down), + gtk_marshal_NONE__NONE, + GTK_TYPE_NONE, 0); signals[CHECKBOXES_CHANGED] - = g_signal_new ("checkboxes_changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EStorageSetViewClass, checkboxes_changed), - NULL, NULL, - e_shell_marshal_NONE__NONE, - G_TYPE_NONE, 0); + = gtk_signal_new ("checkboxes_changed", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageSetViewClass, checkboxes_changed), + gtk_marshal_NONE__NONE, + GTK_TYPE_NONE, 0); + + gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); checks [0] = gdk_pixbuf_new_from_xpm_data (check_empty_xpm); checks [1] = gdk_pixbuf_new_from_xpm_data (check_filled_xpm); @@ -1993,18 +1998,18 @@ setup_folder_changed_callbacks (EStorageSetView *storage_set_view, folder_changed_callback_data->storage_set_view = storage_set_view; folder_changed_callback_data->path = g_strdup (path); - e_signal_connect_while_alive (folder, "name_changed", - G_CALLBACK (folder_name_changed_cb), - folder_changed_callback_data, - storage_set_view); + gtk_signal_connect_while_alive (GTK_OBJECT (folder), "name_changed", + GTK_SIGNAL_FUNC (folder_name_changed_cb), + folder_changed_callback_data, + GTK_OBJECT (storage_set_view)); - e_signal_connect_full_while_alive (folder, "changed", - G_CALLBACK (folder_changed_cb), - NULL, - folder_changed_callback_data, - folder_changed_callback_data_destroy_notify, - FALSE, FALSE, - storage_set_view); + e_gtk_signal_connect_full_while_alive (GTK_OBJECT (folder), "changed", + GTK_SIGNAL_FUNC (folder_changed_cb), + NULL, + folder_changed_callback_data, + folder_changed_callback_data_destroy_notify, + FALSE, FALSE, + GTK_OBJECT (storage_set_view)); } @@ -2107,12 +2112,11 @@ e_storage_set_view_construct (EStorageSetView *storage_set_view, priv->ui_container = ui_container; if (ui_container != NULL) { - g_object_weak_ref (G_OBJECT (ui_container), ui_container_destroy_notify, priv); + gtk_object_weakref (GTK_OBJECT (ui_container), ui_container_destroy_notify, priv); priv->ui_component = bonobo_ui_component_new_default (); bonobo_ui_component_set_container (priv->ui_component, - bonobo_object_corba_objref (BONOBO_OBJECT (ui_container)), - NULL); + bonobo_object_corba_objref (BONOBO_OBJECT (ui_container))); } priv->etree_model = e_tree_memory_callbacks_new (etree_icon_at, @@ -2146,7 +2150,7 @@ e_storage_set_view_construct (EStorageSetView *storage_set_view, extras = e_table_extras_new (); cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); - g_object_set((cell), "bold_column", 1, NULL); + gtk_object_set (GTK_OBJECT (cell), "bold_column", 1, NULL); e_table_extras_add_cell (extras, "render_tree", e_cell_tree_new (NULL, NULL, TRUE, cell)); @@ -2158,21 +2162,35 @@ e_storage_set_view_construct (EStorageSetView *storage_set_view, e_tree_root_node_set_visible (E_TREE(storage_set_view), FALSE); - g_object_unref (extras); + gtk_object_unref (GTK_OBJECT (extras)); - g_object_ref (storage_set); + gtk_object_ref (GTK_OBJECT (storage_set)); priv->storage_set = storage_set; e_tree_drag_dest_set (E_TREE (storage_set_view), 0, NULL, 0, GDK_ACTION_MOVE | GDK_ACTION_COPY); - g_signal_connect_object (storage_set, "new_storage", G_CALLBACK (new_storage_cb), storage_set_view, 0); - g_signal_connect_object (storage_set, "removed_storage", G_CALLBACK (removed_storage_cb), storage_set_view, 0); - g_signal_connect_object (storage_set, "new_folder", G_CALLBACK (new_folder_cb), storage_set_view, 0); - g_signal_connect_object (storage_set, "updated_folder", G_CALLBACK (updated_folder_cb), storage_set_view, 0); - g_signal_connect_object (storage_set, "removed_folder", G_CALLBACK (removed_folder_cb), storage_set_view, 0); - g_signal_connect_object (storage_set, "close_folder", G_CALLBACK (close_folder_cb), storage_set_view, 0); - - g_signal_connect_object (priv->etree_model, "fill_in_children", G_CALLBACK (etree_fill_in_children), storage_set_view, 0); + gtk_signal_connect_while_alive (GTK_OBJECT (storage_set), "new_storage", + GTK_SIGNAL_FUNC (new_storage_cb), storage_set_view, + GTK_OBJECT (storage_set_view)); + gtk_signal_connect_while_alive (GTK_OBJECT (storage_set), "removed_storage", + GTK_SIGNAL_FUNC (removed_storage_cb), storage_set_view, + GTK_OBJECT (storage_set_view)); + gtk_signal_connect_while_alive (GTK_OBJECT (storage_set), "new_folder", + GTK_SIGNAL_FUNC (new_folder_cb), storage_set_view, + GTK_OBJECT (storage_set_view)); + gtk_signal_connect_while_alive (GTK_OBJECT (storage_set), "updated_folder", + GTK_SIGNAL_FUNC (updated_folder_cb), storage_set_view, + GTK_OBJECT (storage_set_view)); + gtk_signal_connect_while_alive (GTK_OBJECT (storage_set), "removed_folder", + GTK_SIGNAL_FUNC (removed_folder_cb), storage_set_view, + GTK_OBJECT (storage_set_view)); + gtk_signal_connect_while_alive (GTK_OBJECT (storage_set), "close_folder", + GTK_SIGNAL_FUNC (close_folder_cb), storage_set_view, + GTK_OBJECT (storage_set_view)); + + gtk_signal_connect_while_alive (GTK_OBJECT (priv->etree_model), "fill_in_children", + GTK_SIGNAL_FUNC (etree_fill_in_children), storage_set_view, + GTK_OBJECT (storage_set_view)); insert_storages (storage_set_view); } @@ -2186,7 +2204,7 @@ e_storage_set_view_new (EStorageSet *storage_set, g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - new = g_object_new (e_storage_set_view_get_type (), NULL); + new = gtk_type_new (e_storage_set_view_get_type ()); e_storage_set_view_construct (E_STORAGE_SET_VIEW (new), storage_set, ui_container); @@ -2228,7 +2246,7 @@ e_storage_set_view_set_current_folder (EStorageSetView *storage_set_view, g_free (priv->selected_row_path); priv->selected_row_path = g_strdup (path); - g_signal_emit (storage_set_view, signals[FOLDER_SELECTED], 0, path); + gtk_signal_emit (GTK_OBJECT (storage_set_view), signals[FOLDER_SELECTED], path); } const char * @@ -2324,6 +2342,8 @@ e_storage_set_view_set_show_checkboxes (EStorageSetView *storage_set_view, state->columns [0] = 1; e_tree_set_state_object (E_TREE (storage_set_view), state); + gtk_object_unref (GTK_OBJECT (state)); + priv->has_checkbox_func = has_checkbox_func; priv->has_checkbox_func_data = func_data; } @@ -2355,7 +2375,7 @@ e_storage_set_view_enable_search (EStorageSetView *storage_set_view, void e_storage_set_view_set_checkboxes_list (EStorageSetView *storage_set_view, - GSList *checkboxes) + GList *checkboxes) { gboolean changed = FALSE; EStorageSetViewPrivate *priv = storage_set_view->priv; @@ -2369,7 +2389,7 @@ e_storage_set_view_set_checkboxes_list (EStorageSetView *storage_set_view, if (checkboxes) { priv->checkboxes = g_hash_table_new (g_str_hash, g_str_equal); - for (; checkboxes; checkboxes = g_slist_next (checkboxes)) { + for (; checkboxes; checkboxes = g_list_next (checkboxes)) { char *path = checkboxes->data; if (g_hash_table_lookup (priv->checkboxes, path)) @@ -2392,22 +2412,21 @@ essv_add_to_list (gpointer key, gpointer value, gpointer user_data) { - GSList **list = user_data; + GList **list = user_data; - *list = g_slist_prepend (*list, g_strdup (key)); + *list = g_list_prepend (*list, g_strdup (key)); } -GSList * +GList * e_storage_set_view_get_checkboxes_list (EStorageSetView *storage_set_view) { - GSList *list = NULL; + GList *list = NULL; if (storage_set_view->priv->checkboxes) { g_hash_table_foreach (storage_set_view->priv->checkboxes, essv_add_to_list, &list); - list = g_slist_reverse (list); + list = g_list_reverse (list); } - return list; } diff --git a/shell/e-storage.c b/shell/e-storage.c index 1f54ee5afa..2f6ec935e5 100644 --- a/shell/e-storage.c +++ b/shell/e-storage.c @@ -32,22 +32,20 @@ #include "e-folder-tree.h" #include "e-shell-constants.h" -#include "e-shell-marshal.h" #include #include +#include #include #include -#include - #define PARENT_TYPE GTK_TYPE_OBJECT static GtkObjectClass *parent_class = NULL; #define ES_CLASS(obj) \ - E_STORAGE_CLASS (GTK_OBJECT_GET_CLASS (obj)) + E_STORAGE_CLASS (GTK_OBJECT (obj)->klass) struct _EStoragePrivate { /* The set of folders we have in this storage. */ @@ -64,6 +62,7 @@ enum { NEW_FOLDER, UPDATED_FOLDER, REMOVED_FOLDER, + CLOSE_FOLDER, LAST_SIGNAL }; @@ -86,7 +85,7 @@ folder_destroy_notify (EFolderTree *tree, } e_folder = E_FOLDER (data); - g_object_unref (e_folder); + gtk_object_unref (GTK_OBJECT (e_folder)); } @@ -109,12 +108,13 @@ folder_changed_cb (EFolder *folder, path = e_folder_tree_get_path_for_data (priv->folder_tree, folder); g_assert (path != NULL); - g_signal_emit (storage, signals[UPDATED_FOLDER], 0, path); + gtk_signal_emit (GTK_OBJECT (storage), signals[UPDATED_FOLDER], path); - highlight = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (folder), "last_highlight")); + highlight = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (folder), "last_highlight")); if (highlight != e_folder_get_highlighted (folder)) { highlight = !highlight; - g_object_set_data (G_OBJECT (folder), "last_highlight", GINT_TO_POINTER (highlight)); + gtk_object_set_data (GTK_OBJECT (folder), "last_highlight", + GINT_TO_POINTER (highlight)); p = strrchr (path, '/'); if (p && p != path) { char *name; @@ -129,7 +129,7 @@ folder_changed_cb (EFolder *folder, } -/* GObject methods. */ +/* GtkObject methods. */ static void free_folder (gpointer path, gpointer folder, gpointer user_data) @@ -139,7 +139,7 @@ free_folder (gpointer path, gpointer folder, gpointer user_data) } static void -impl_finalize (GObject *object) +destroy (GtkObject *object) { EStorage *storage; EStoragePrivate *priv; @@ -156,9 +156,7 @@ impl_finalize (GObject *object) g_free (priv->name); - g_free (priv); - - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -228,11 +226,9 @@ impl_async_xfer_folder (EStorage *storage, static void impl_async_open_folder (EStorage *storage, - const char *path, - EStorageDiscoveryCallback callback, - void *data) + const char *path) { - (*callback) (storage, E_STORAGE_NOTIMPLEMENTED, path, data); + ; } static gboolean @@ -266,12 +262,12 @@ impl_async_remove_shared_folder (EStorage *storage, static void class_init (EStorageClass *class) { - GObjectClass *object_class; + GtkObjectClass *object_class; - object_class = G_OBJECT_CLASS (class); - parent_class = g_type_class_ref(gtk_object_get_type ()); + object_class = GTK_OBJECT_CLASS (class); + parent_class = gtk_type_class (gtk_object_get_type ()); - object_class->finalize = impl_finalize; + object_class->destroy = destroy; class->get_subfolder_paths = impl_get_subfolder_paths; class->get_folder = impl_get_folder; @@ -286,32 +282,39 @@ class_init (EStorageClass *class) class->async_remove_shared_folder = impl_async_remove_shared_folder; signals[NEW_FOLDER] = - g_signal_new ("new_folder", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EStorageClass, new_folder), - NULL, NULL, - e_shell_marshal_NONE__STRING, - G_TYPE_NONE, 1, - G_TYPE_STRING); + gtk_signal_new ("new_folder", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageClass, new_folder), + gtk_marshal_NONE__STRING, + GTK_TYPE_NONE, 1, + GTK_TYPE_STRING); signals[UPDATED_FOLDER] = - g_signal_new ("updated_folder", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EStorageClass, updated_folder), - NULL, NULL, - e_shell_marshal_NONE__STRING, - G_TYPE_NONE, 1, - G_TYPE_STRING); + gtk_signal_new ("updated_folder", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageClass, updated_folder), + gtk_marshal_NONE__STRING, + GTK_TYPE_NONE, 1, + GTK_TYPE_STRING); signals[REMOVED_FOLDER] = - g_signal_new ("removed_folder", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (EStorageClass, removed_folder), - NULL, NULL, - e_shell_marshal_NONE__STRING, - G_TYPE_NONE, 1, - G_TYPE_STRING); + gtk_signal_new ("removed_folder", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageClass, removed_folder), + gtk_marshal_NONE__STRING, + GTK_TYPE_NONE, 1, + GTK_TYPE_STRING); + signals[CLOSE_FOLDER] = + gtk_signal_new ("close_folder", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageClass, close_folder), + gtk_marshal_NONE__STRING, + GTK_TYPE_NONE, 1, + GTK_TYPE_STRING); + + gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void @@ -356,7 +359,7 @@ e_storage_new (const char *name, { EStorage *new; - new = g_object_new (e_storage_get_type (), NULL); + new = gtk_type_new (e_storage_get_type ()); e_storage_construct (new, name, root_folder); @@ -490,21 +493,17 @@ e_storage_async_xfer_folder (EStorage *storage, void e_storage_async_open_folder (EStorage *storage, - const char *path, - EStorageDiscoveryCallback callback, - void *data) + const char *path) { g_return_if_fail (storage != NULL); g_return_if_fail (E_IS_STORAGE (storage)); g_return_if_fail (path != NULL); g_return_if_fail (g_path_is_absolute (path)); - if (g_hash_table_lookup (storage->priv->pseudofolders, path) == NULL) { - (* callback) (storage, E_STORAGE_OK, path, data); + if (g_hash_table_lookup (storage->priv->pseudofolders, path) == NULL) return; - } - (* ES_CLASS (storage)->async_open_folder) (storage, path, callback, data); + (* ES_CLASS (storage)->async_open_folder) (storage, path); } @@ -711,30 +710,26 @@ e_storage_new_folder (EStorage *storage, } g_free (parent_path); - g_signal_connect_object (e_folder, "changed", G_CALLBACK (folder_changed_cb), storage, 0); + gtk_signal_connect_while_alive (GTK_OBJECT (e_folder), "changed", folder_changed_cb, + storage, GTK_OBJECT (storage)); - g_signal_emit (storage, signals[NEW_FOLDER], 0, path); + gtk_signal_emit (GTK_OBJECT (storage), signals[NEW_FOLDER], path); folder_changed_cb (e_folder, storage); return TRUE; } -/* This really should be called e_storage_set_has_subfolders, but then - * it would look like it was an EStorageSet function. (Fact o' the - * day: The word "set" has more distinct meanings than any other word - * in the English language.) Anyway, we now return you to your - * regularly scheduled source code, already in progress. - */ gboolean -e_storage_declare_has_subfolders (EStorage *storage, - const char *path, - const char *message) +e_storage_has_subfolders (EStorage *storage, + const char *path, + const char *message) { EStoragePrivate *priv; GList *subfolders, *f; EFolder *pseudofolder; char *pseudofolder_path; + gboolean retval; g_return_val_if_fail (storage != NULL, FALSE); g_return_val_if_fail (E_IS_STORAGE (storage), FALSE); @@ -744,6 +739,8 @@ e_storage_declare_has_subfolders (EStorage *storage, priv = storage->priv; + gtk_signal_emit (GTK_OBJECT (storage), signals[CLOSE_FOLDER], path); + if (g_hash_table_lookup (priv->pseudofolders, path)) return TRUE; @@ -764,23 +761,10 @@ e_storage_declare_has_subfolders (EStorage *storage, g_hash_table_insert (priv->pseudofolders, g_strdup (path), pseudofolder); - return e_storage_new_folder (storage, pseudofolder_path, pseudofolder); -} - -gboolean -e_storage_get_has_subfolders (EStorage *storage, - const char *path) -{ - EStoragePrivate *priv; - - g_return_val_if_fail (storage != NULL, FALSE); - g_return_val_if_fail (E_IS_STORAGE (storage), FALSE); - g_return_val_if_fail (path != NULL, FALSE); - g_return_val_if_fail (g_path_is_absolute (path), FALSE); - - priv = storage->priv; + retval = e_storage_new_folder (storage, pseudofolder_path, pseudofolder); + g_free (pseudofolder_path); - return g_hash_table_lookup (priv->pseudofolders, path) != NULL; + return retval; } gboolean @@ -816,7 +800,7 @@ e_storage_removed_folder (EStorage *storage, g_free (parent_path); } - g_signal_emit (storage, signals[REMOVED_FOLDER], 0, path); + gtk_signal_emit (GTK_OBJECT (storage), signals[REMOVED_FOLDER], path); e_folder_tree_remove (priv->folder_tree, path); diff --git a/shell/main.c b/shell/main.c index 8aa3b9b79a..5ffc020d38 100644 --- a/shell/main.c +++ b/shell/main.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* main.c * - * Copyright (C) 2000, 2001, 2002, 2003 Ximian, Inc. + * Copyright (C) 2000 Ximian, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public @@ -21,18 +21,9 @@ */ #include - -#include "e-util/e-dialog-utils.h" -#include "e-util/e-gtk-utils.h" - -#include "e-icon-factory.h" -#include "e-shell-constants.h" -#include "e-shell-config.h" -#include "e-setup.h" - -#include "e-shell.h" - -#include +#include +#include +#include #include #include @@ -40,42 +31,39 @@ #include #include #include -#include -#include #include #include +#include #include #include -#include +#include +#include #include - #include #include #include - -#include - #include - -#include "e-config-upgrade.h" -#include "Evolution-Wombat.h" +#include #ifdef GTKHTML_HAVE_GCONF #include #endif +#include #include -#include -#include -#include -#include -#include -#include +#include "Evolution-Wombat.h" + +#include "e-util/e-gtk-utils.h" + +#include "e-icon-factory.h" +#include "e-shell-constants.h" +#include "e-shell-config.h" +#include "e-setup.h" -#include +#include "e-shell.h" static EShell *shell = NULL; @@ -98,11 +86,11 @@ quit_box_new (void) GtkWidget *frame; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_resizable (GTK_WINDOW (window), FALSE); + gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, FALSE); gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); /* (Just to prevent smart-ass window managers like Sawfish from setting - the make the dialog as big as the standard Evolution window). */ + the make the dialog as big as the standard Evolution window). */ gtk_window_set_wmclass (GTK_WINDOW (window), "evolution-quit", "Evolution:quit"); e_make_widget_backing_stored (window); @@ -138,13 +126,23 @@ quit_box_new (void) return window; } +static void +quit_box_destroyed_callback (GtkObject *object, + void *data) +{ + GtkWidget **p; + + p = (GtkWidget **) data; + *p = NULL; +} + static void no_views_left_cb (EShell *shell, gpointer data) { GtkWidget *quit_box; quit_box = quit_box_new (); - g_object_add_weak_pointer (G_OBJECT (quit_box), (void **) &quit_box); + gtk_signal_connect (GTK_OBJECT (quit_box), "destroy", quit_box_destroyed_callback, &quit_box); /* FIXME: This is wrong. We should exit only when the shell is destroyed. But refcounting is broken at present, so this is a @@ -152,19 +150,41 @@ no_views_left_cb (EShell *shell, gpointer data) e_shell_unregister_all (shell); + /* FIXME: And this is another ugly hack. We have a strange race + condition that I cannot work around. What happens is that the + EShell object gets unreffed and its aggregate EActivityHandler gets + destroyed too. But for some reason, the EActivityHanlder GtkObject + gets freed, while its CORBA object counterpart is still an active + server. So there is a slight chance that we receive CORBA + invocation that act on an uninitialized object, and we crash. (See + #8615.) + + The CORBA invocation on the dead object only happens because we + ::unref the BonoboConf database server in the ::destroy method of + the shell. Since this is a CORBA call, it allows incoming CORBA + calls to happen -- and these get invoked on the partially + uninitialized object. + + Since I am not 100% sure what the reason for this half-stale object + is, I am just going to make sure that no CORBA ops happen in + ::destroy... And this is achieved by placing this call here. (If + the DB is disconnected, there will be no ::unref of it in + ::destroy.) */ + + e_shell_disconnect_db (shell); + bonobo_object_unref (BONOBO_OBJECT (shell)); if (quit_box != NULL) gtk_widget_destroy (quit_box); - bonobo_main_quit (); + gtk_main_quit (); } static void -shell_weak_notify (void *data, - GObject *where_the_object_was) +destroy_cb (GtkObject *object, gpointer data) { - bonobo_main_quit (); + gtk_main_quit (); } @@ -173,8 +193,8 @@ kill_wombat (void) { g_print ("(Killing old version of Wombat...)\n"); - system (KILL_PROCESS_CMD " -9 lt-evolution-wombat 2> /dev/null"); - system (KILL_PROCESS_CMD " -9 evolution-wombat 2> /dev/null"); + system (KILL_PROCESS_CMD " -9 lt-wombat 2> /dev/null"); + system (KILL_PROCESS_CMD " -9 wombat 2> /dev/null"); } static void @@ -186,7 +206,7 @@ kill_old_wombat (void) CORBA_exception_init (&ev); - iface = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Wombat_InterfaceCheck", 0, NULL, &ev); + iface = bonobo_get_object ("wombat:", "GNOME/Evolution/WombatInterfaceCheck", &ev); if (BONOBO_EX (&ev) || iface == CORBA_OBJECT_NIL) { kill_wombat (); CORBA_exception_free (&ev); @@ -196,7 +216,7 @@ kill_old_wombat (void) version = GNOME_Evolution_WombatInterfaceCheck__get_interfaceVersion (iface, &ev); if (BONOBO_EX (&ev)) { kill_wombat (); - CORBA_Object_release (iface, &ev); + bonobo_object_release_unref (iface, &ev); CORBA_exception_free (&ev); return; } @@ -204,131 +224,56 @@ kill_old_wombat (void) if (strcmp (version, VERSION) != 0) { CORBA_free (version); kill_wombat (); - CORBA_Object_release (iface, &ev); + bonobo_object_release_unref (iface, &ev); CORBA_exception_free (&ev); return; } CORBA_free (version); - CORBA_Object_release (iface, &ev); + + bonobo_object_release_unref (iface, &ev); + CORBA_exception_free (&ev); } -/* Warning dialog to scare people off a little bit. */ - static void -warning_dialog_response_callback (GtkDialog *dialog, - int button_number, - void *data) +upgrade_from_1_0_if_needed (void) { - GtkCheckButton *dont_bother_me_again_checkbox; - GConfClient *client; - - dont_bother_me_again_checkbox = GTK_CHECK_BUTTON (data); - - client = gconf_client_get_default (); - gconf_client_set_bool (client, "/apps/evolution/shell/skip_warning_dialog", - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dont_bother_me_again_checkbox)), - NULL); - g_object_unref (client); + Bonobo_ConfigDatabase config_db; + CORBA_Environment ev; + int result; - gtk_widget_destroy (GTK_WIDGET (dialog)); -} + CORBA_exception_init (&ev); -static void -show_development_warning (GtkWindow *parent) -{ - GtkWidget *label; - GtkWidget *warning_dialog; - GtkWidget *dont_bother_me_again_checkbox; - GtkWidget *alignment; - GConfClient *client; - char *text; + config_db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev); + if (BONOBO_EX (&ev) || config_db == CORBA_OBJECT_NIL) { + g_print ("(Cannot access Bonobo/ConfigDatabase, not upgrading configuration.)\n"); + if (BONOBO_EX (&ev)) + g_print ("\t%s\n", BONOBO_EX_ID (&ev)); + CORBA_exception_free (&ev); + return; + } - client = gconf_client_get_default (); + CORBA_exception_free (&ev); - if (gconf_client_get_bool (client, "/apps/evolution/shell/skip_warning_dialog", NULL)) { - g_object_unref (client); + if (! force_upgrade + && bonobo_config_get_boolean_with_default (config_db, "/Shell/upgrade_from_1_0_to_1_2_performed", + FALSE, NULL)) return; - } - - g_object_unref (client); - - warning_dialog = gtk_dialog_new_with_buttons("Ximian Evolution " VERSION, parent, - GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); - text = g_strdup_printf( - /* xgettext:no-c-format */ - /* Preview/Alpha/Beta version warning message */ - _("Hi. Thanks for taking the time to download this preview release\n" - "of the Ximian Evolution groupware suite.\n" - "\n" - "This version of Ximian Evolution is not yet complete. It is getting close,\n" - "but some features are either unfinished or do not work properly.\n" - "\n" - "If you want a stable version of Evolution, we urge you to uninstall\n" - "this version, and install version %s instead.\n" - "\n" - "If you find bugs, please report them to us at bugzilla.ximian.com.\n" - "This product comes with no warranty and is not intended for\n" - "individuals prone to violent fits of anger.\n" - "\n" - "We hope that you enjoy the results of our hard work, and we\n" - "eagerly await your contributions!\n"), - "1.2.x (1.2.2)"); - label = gtk_label_new (text); - g_free(text); - - gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); - - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (warning_dialog)->vbox), - label, TRUE, TRUE, 4); - - label = gtk_label_new (_("Thanks\n" - "The Ximian Evolution Team\n")); - gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment(GTK_MISC(label), 1, .5); - - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (warning_dialog)->vbox), - label, TRUE, TRUE, 0); - - dont_bother_me_again_checkbox = gtk_check_button_new_with_label (_("Don't tell me again")); - - /* GTK sucks. (Just so you know.) */ - alignment = gtk_alignment_new (0.0, 0.0, 0.0, 0.0); - - gtk_container_add (GTK_CONTAINER (alignment), dont_bother_me_again_checkbox); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (warning_dialog)->vbox), - alignment, FALSE, FALSE, 0); - - gtk_widget_show_all (warning_dialog); - - g_signal_connect (warning_dialog, "response", - G_CALLBACK (warning_dialog_response_callback), - dont_bother_me_again_checkbox); -} -/* The following signal handlers are used to display the development warning as - soon as the first view is created. */ + g_print ("\nOlder configuration files detected, upgrading...\n"); -static void -view_map_callback (GtkWidget *widget, - void *data) -{ - g_signal_handlers_disconnect_by_func (widget, G_CALLBACK (view_map_callback), data); + result = system (PREFIX "/bin/evolution-mail-upgrade"); - show_development_warning (GTK_WINDOW (widget)); -} + if (result == 0) + g_print ("\n--> Configuration files upgraded from version 1.0.\n"); + else + g_print ("\n*** Error upgrading configuration files -- status %d\n", result); -static void -new_view_created_callback (EShell *shell, - EShellView *view, - void *data) -{ - g_signal_handlers_disconnect_by_func (shell, G_CALLBACK (new_view_created_callback), data); + bonobo_config_set_boolean (config_db, "/Shell/upgrade_from_1_0_to_1_2_performed", TRUE, NULL); - g_signal_connect (view, "map", G_CALLBACK (view_map_callback), NULL); + bonobo_object_release_unref (config_db, NULL); } @@ -349,6 +294,8 @@ idle_cb (void *data) kill_old_wombat (); + upgrade_from_1_0_if_needed (); + CORBA_exception_init (&ev); uri_list = (GSList *) data; @@ -367,41 +314,37 @@ idle_cb (void *data) case E_SHELL_CONSTRUCT_RESULT_OK: e_shell_config_factory_register (shell); - g_signal_connect (shell, "no_views_left", G_CALLBACK (no_views_left_cb), NULL); - g_object_weak_ref (G_OBJECT (shell), shell_weak_notify, NULL); - - if (!getenv ("EVOLVE_ME_HARDER")) - g_signal_connect (shell, "new_view_created", - G_CALLBACK (new_view_created_callback), NULL); + gtk_signal_connect (GTK_OBJECT (shell), "no_views_left", + GTK_SIGNAL_FUNC (no_views_left_cb), NULL); + gtk_signal_connect (GTK_OBJECT (shell), "destroy", + GTK_SIGNAL_FUNC (destroy_cb), NULL); corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell)); corba_shell = CORBA_Object_duplicate (corba_shell, &ev); break; case E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER: - corba_shell = bonobo_activation_activate_from_id (E_SHELL_OAFIID, 0, NULL, &ev); + corba_shell = oaf_activate_from_id (E_SHELL_OAFIID, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION || corba_shell == CORBA_OBJECT_NIL) { - e_notice (NULL, GTK_MESSAGE_ERROR, + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Cannot access the Ximian Evolution shell.")); CORBA_exception_free (&ev); - bonobo_main_quit (); + gtk_main_quit (); return FALSE; } break; default: - e_notice (NULL, GTK_MESSAGE_ERROR, + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Cannot initialize the Ximian Evolution shell: %s"), e_shell_construct_result_to_string (result)); CORBA_exception_free (&ev); - bonobo_main_quit (); + gtk_main_quit (); return FALSE; } have_evolution_uri = FALSE; - displayed_any = FALSE; - for (p = uri_list; p != NULL; p = p->next) { const char *uri; @@ -412,25 +355,30 @@ idle_cb (void *data) } if (shell == NULL) { - /* We're talking to a remote shell. If the user didn't ask us to open any particular - URI, then open another view of the default URI. */ + /* We're talking to a remote shell. If the user didn't + * ask us to open any particular URI, then open another + * view of the default URI + */ if (uri_list == NULL) display_default = TRUE; else display_default = FALSE; } else { - /* We're starting a new shell. If the user didn't specify any evolution: URIs to - view, AND we can't load the user's previous settings, then show the default - URI. */ + /* We're starting a new shell. If the user didn't specify + * any evolution: URIs to view, AND we can't load the + * user's previous settings, then show the default URI. + */ if (! have_evolution_uri) { - e_shell_create_view (shell, NULL, NULL); - display_default = TRUE; - displayed_any = TRUE; + if (! e_shell_restore_from_settings (shell, FALSE)) + display_default = TRUE; + else + display_default = FALSE; } else { display_default = FALSE; } } + displayed_any = FALSE; for (p = uri_list; p != NULL; p = p->next) { const char *uri; @@ -439,8 +387,7 @@ idle_cb (void *data) if (ev._major == CORBA_NO_EXCEPTION) displayed_any = TRUE; else { - g_warning ("CORBA exception %s when requesting URI -- %s", - BONOBO_EX_REPOID (&ev), uri); + g_warning ("CORBA exception %s when requesting URI -- %s", ev._repo_id, uri); CORBA_exception_free (&ev); } } @@ -453,7 +400,7 @@ idle_cb (void *data) uri = E_SHELL_VIEW_DEFAULT_URI; GNOME_Evolution_Shell_handleURI (corba_shell, uri, &ev); if (ev._major != CORBA_NO_EXCEPTION) - g_warning ("CORBA exception %s when requesting URI -- %s", BONOBO_EX_REPOID (&ev), uri); + g_warning ("CORBA exception %s when requesting URI -- %s", ev._repo_id, uri); } CORBA_Object_release (corba_shell, &ev); @@ -461,63 +408,11 @@ idle_cb (void *data) CORBA_exception_free (&ev); if (shell == NULL) - bonobo_main_quit (); + gtk_main_quit (); return FALSE; } - -/* SIGSEGV handling. - - The GNOME SEGV handler will lose if it's not run from the main Gtk - thread. So if we have to redirect the signal if the crash happens in another - thread. */ - -static void (*gnome_segv_handler) (int); -static GStaticMutex segv_mutex = G_STATIC_MUTEX_INIT; -static pthread_t main_thread; - -static void -segv_redirect (int sig) -{ - if (pthread_self () == main_thread) - gnome_segv_handler (sig); - else { - pthread_kill (main_thread, sig); - - /* We can't return from the signal handler or the thread may - SEGV again. But we can't pthread_exit, because then the - thread may get cleaned up before bug-buddy can get a stack - trace. So we block by trying to lock a mutex we know is - already locked. */ - g_static_mutex_lock (&segv_mutex); - } -} - -static void -setup_segv_redirect (void) -{ - struct sigaction sa, osa; - - sigaction (SIGSEGV, NULL, &osa); - if (osa.sa_handler == SIG_DFL) - return; - - main_thread = pthread_self (); - - sa.sa_flags = 0; - sigemptyset (&sa.sa_mask); - sa.sa_handler = segv_redirect; - sigaction (SIGSEGV, &sa, NULL); - sigaction (SIGBUS, &sa, NULL); - sigaction (SIGFPE, &sa, NULL); - - sa.sa_handler = SIG_IGN; - sigaction (SIGXFSZ, &sa, NULL); - gnome_segv_handler = osa.sa_handler; - g_static_mutex_lock (&segv_mutex); -} - int main (int argc, char **argv) { @@ -530,31 +425,23 @@ main (int argc, char **argv) N_("Start in online mode"), NULL }, { "debug", '\0', POPT_ARG_STRING, &evolution_debug_log, 0, N_("Send the debugging output of all components to a file."), NULL }, -#if 0 { "force-upgrade", '\0', POPT_ARG_NONE, &force_upgrade, 0, N_("Force upgrading of configuration files from Evolution 1.0.x"), NULL }, -#endif + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &oaf_popt_options, 0, NULL, NULL }, POPT_AUTOHELP { NULL, '\0', 0, NULL, 0, NULL, NULL } }; GSList *uri_list; - GValue popt_context_value = { 0, }; - GnomeProgram *program; - poptContext popt_context; const char **args; + poptContext popt_context; + + bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); + textdomain (PACKAGE); /* Make ElectricFence work. */ free (malloc (10)); - bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - textdomain (GETTEXT_PACKAGE); - - program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv, - GNOME_PROGRAM_STANDARD_PROPERTIES, - GNOME_PARAM_POPT_TABLE, options, - GNOME_PARAM_HUMAN_READABLE_NAME, _("Evolution"), - NULL); + gnome_init_with_popt_table ("Evolution", VERSION " [" SUB_VERSION "]", argc, argv, options, 0, &popt_context); if (start_online && start_offline) { fprintf (stderr, _("%s: --online and --offline cannot be used together.\n Use %s --help for more information.\n"), @@ -562,8 +449,6 @@ main (int argc, char **argv) exit (1); } - setup_segv_redirect (); - if (evolution_debug_log) { int fd; @@ -576,23 +461,32 @@ main (int argc, char **argv) g_warning ("Could not set up debugging output file."); } - glade_init (); + oaf_init (argc, argv); + +#ifdef GTKHTML_HAVE_GCONF + gconf_init (argc, argv, NULL); +#endif + + glade_gnome_init (); e_cursors_init (); e_icon_factory_init (); gnome_window_icon_set_default_from_file (EVOLUTION_IMAGES "/evolution-inbox.png"); + if (! bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) { + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, + _("Cannot initialize the Bonobo component system.")); + exit (1); + } + /* FIXME */ - evolution_directory = g_build_filename (g_get_home_dir (), "evolution", NULL); + evolution_directory = g_concat_dir_and_file (g_get_home_dir (), "evolution"); if (! e_setup (evolution_directory)) exit (1); uri_list = NULL; - g_value_init (&popt_context_value, G_TYPE_POINTER); - g_object_get_property (G_OBJECT (program), GNOME_PARAM_POPT_CONTEXT, &popt_context_value); - popt_context = g_value_get_pointer (&popt_context_value); args = poptGetArgs (popt_context); if (args != NULL) { const char **p; @@ -600,13 +494,12 @@ main (int argc, char **argv) for (p = args; *p != NULL; p++) uri_list = g_slist_prepend (uri_list, (char *) *p); } - uri_list = g_slist_reverse (uri_list); - g_value_unset (&popt_context_value); - - e_config_upgrade(evolution_directory); gtk_idle_add (idle_cb, uri_list); + gtk_widget_push_visual (gdk_rgb_get_visual ()); + gtk_widget_push_colormap (gdk_rgb_get_cmap ()); + bonobo_main (); return 0; -- cgit v1.2.3