Handle failure from XGetClassHint properly. Also, free res_name and

* e-shell.c (impl_Shell_selectUserFolder): Handle failure from
XGetClassHint properly.  Also, free res_name and res_class in case
of success.  Fixes #13554.

svn path=/trunk/; revision=14104
This commit is contained in:
Ettore Perazzoli
2001-10-25 22:28:13 +00:00
parent 5fe02094b8
commit fb5bec84e9
2 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2001-10-25 Ettore Perazzoli <ettore@ximian.com>
* e-shell.c (impl_Shell_selectUserFolder): Handle failure from
XGetClassHint properly. Also, free res_name and res_class in case
of success. Fixes #13554.
2001-10-25 Ettore Perazzoli <ettore@ximian.com>
* e-storage-set-view.c (etree_icon_at): Don't display an icon for

View File

@ -483,10 +483,12 @@ impl_Shell_selectUserFolder (PortableServer_Servant servant,
e_set_dialog_parent_from_xid (GTK_WINDOW (folder_selection_dialog), parent_xid);
XGetClassHint (GDK_DISPLAY (), (Window) parent_xid, &class_hints);
gtk_window_set_wmclass (GTK_WINDOW (folder_selection_dialog),
class_hints.res_name, class_hints.res_class);
if (XGetClassHint (GDK_DISPLAY (), (Window) parent_xid, &class_hints)) {
gtk_window_set_wmclass (GTK_WINDOW (folder_selection_dialog),
class_hints.res_name, class_hints.res_class);
XFree (class_hints.res_name);
XFree (class_hints.res_class);
}
gtk_widget_show (folder_selection_dialog);