From cb0ed210287eb3f4b81376a0cbe72661af0f7756 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 18 Oct 2001 19:58:22 +0000 Subject: Fix the WM problems related to the folder selection dialog being out-of-proc. Now it can be set to be a transient window correctly, and fakes its WindowGroup hint appropriately. svn path=/trunk/; revision=13765 --- shell/evolution-shell-client.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'shell/evolution-shell-client.c') diff --git a/shell/evolution-shell-client.c b/shell/evolution-shell-client.c index d71deff91f..3667d4bb4c 100644 --- a/shell/evolution-shell-client.c +++ b/shell/evolution-shell-client.c @@ -25,7 +25,9 @@ #include #endif +#include #include + #include #include @@ -196,6 +198,7 @@ count_string_items (const char *list[]) static void user_select_folder (EvolutionShellClient *shell_client, + GtkWindow *parent, const char *title, const char *default_folder, const char *possible_types[], @@ -206,6 +209,7 @@ user_select_folder (EvolutionShellClient *shell_client, GNOME_Evolution_Shell corba_shell; CORBA_Environment ev; GNOME_Evolution_Shell_FolderTypeNameList corba_type_name_list; + CORBA_long_long parent_xid; int num_possible_types; char *result; @@ -231,7 +235,9 @@ user_select_folder (EvolutionShellClient *shell_client, corba_type_name_list._maximum = num_possible_types; corba_type_name_list._buffer = (CORBA_char **) possible_types; - GNOME_Evolution_Shell_selectUserFolder (corba_shell, listener_interface, + parent_xid = (CORBA_long_long) GDK_WINDOW_XWINDOW (GTK_WIDGET (parent)->window); + + GNOME_Evolution_Shell_selectUserFolder (corba_shell, parent_xid, listener_interface, title, default_folder, &corba_type_name_list, "", &ev); @@ -368,6 +374,7 @@ evolution_shell_client_new (GNOME_Evolution_Shell corba_shell) /** * evolution_shell_client_user_select_folder: * @shell_client: A EvolutionShellClient object + * @parent: Parent window for the dialog (must be realized when invoking) * @title: The title for the folder selection dialog * @default_folder: URI (physical or evolution:) of the folder initially selected on the dialog * @uri_return: @@ -380,6 +387,7 @@ evolution_shell_client_new (GNOME_Evolution_Shell corba_shell) **/ void evolution_shell_client_user_select_folder (EvolutionShellClient *shell_client, + GtkWindow *parent, const char *title, const char *default_folder, const char *possible_types[], @@ -390,8 +398,9 @@ evolution_shell_client_user_select_folder (EvolutionShellClient *shell_client, g_return_if_fail (EVOLUTION_IS_SHELL_CLIENT (shell_client)); g_return_if_fail (title != NULL); g_return_if_fail (default_folder != NULL); + g_return_if_fail (parent == NULL || GTK_WIDGET_REALIZED (parent)); - user_select_folder (shell_client, title, default_folder, possible_types, + user_select_folder (shell_client, parent, title, default_folder, possible_types, uri_return, physical_uri_return); } -- cgit v1.2.3