From 8cf2b9384717c53e7509a20dd19130c2fe5db0a1 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 27 Jan 2003 21:09:56 +0000 Subject: Set GTK_RESPONSE_OK as the default response. * 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. svn path=/trunk/; revision=19658 --- shell/e-shell-offline-sync.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'shell/e-shell-offline-sync.c') diff --git a/shell/e-shell-offline-sync.c b/shell/e-shell-offline-sync.c index 309a104494..a828fb5b57 100644 --- a/shell/e-shell-offline-sync.c +++ b/shell/e-shell-offline-sync.c @@ -39,8 +39,8 @@ #include #include #include +#include -#include #include #include @@ -59,6 +59,9 @@ struct _SyncData { /* The shell. */ EShell *shell; + /* Parent view. */ + GtkWindow *parent_window; + /* The progress dialog. */ GtkWidget *dialog; @@ -212,19 +215,10 @@ setup_progress_listener (SyncData *sync_data) /* Setting up the progress dialog. */ -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; -} - static void -progress_dialog_clicked_callback (GnomeDialog *dialog, - int button_num, - void *data) +progress_dialog_response_callback (GtkDialog *dialog, + int response_id, + void *data) { SyncData *sync_data; @@ -235,21 +229,23 @@ progress_dialog_clicked_callback (GnomeDialog *dialog, static void setup_dialog (SyncData *sync_data) { - sync_data->dialog = gnome_dialog_new (_("Syncing Folder"), GNOME_STOCK_BUTTON_CANCEL, NULL); + sync_data->dialog = gtk_dialog_new_with_buttons (_("Syncing Folder"), + sync_data->parent_window, + 0, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + NULL); gtk_widget_set_size_request (sync_data->dialog, 300, -1); gtk_window_set_resizable (GTK_WINDOW (sync_data->dialog), FALSE); - g_signal_connect (sync_data->dialog, "close", - G_CALLBACK (progress_dialog_close_callback), sync_data); - g_signal_connect (sync_data->dialog, "clicked", - G_CALLBACK (progress_dialog_clicked_callback), sync_data); + g_signal_connect (sync_data->dialog, "response", + G_CALLBACK (progress_dialog_response_callback), sync_data); sync_data->label = gtk_label_new (""); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (sync_data->dialog)->vbox), + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (sync_data->dialog)->vbox), sync_data->label, FALSE, TRUE, 0); sync_data->progress_bar = gtk_progress_bar_new (); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (sync_data->dialog)->vbox), + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (sync_data->dialog)->vbox), sync_data->progress_bar, FALSE, TRUE, 0); gtk_widget_show_all (sync_data->dialog); @@ -346,7 +342,8 @@ sync_folder (SyncData *sync_data, /* Check if the user clicked the Cancel button. */ if (sync_data->cancel) { - gnome_dialog_set_sensitive (GNOME_DIALOG (sync_data->dialog), 0, FALSE); + gtk_dialog_set_response_sensitive (GTK_DIALOG (sync_data->dialog), + GTK_RESPONSE_CANCEL, FALSE); GNOME_Evolution_Offline_cancelSyncFolder (offline_interface, corba_folder, &ev); @@ -403,6 +400,7 @@ e_shell_offline_sync_all_folders (EShell *shell, sync_data = g_new0 (SyncData, 1); sync_data->shell = shell; + sync_data->parent_window = parent_window; /* Initialize everything, then go ahead and sync. */ -- cgit v1.2.3