/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2009 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#ifdef HAVE_CONFIG_H
# include "config.h"
+#include "claws-features.h"
#endif
#include <glib.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#include "defs.h"
#include "manage_window.h"
#include "description_window.h"
#include "gtkutils.h"
description_create(dwindow);
gtk_window_set_transient_for(GTK_WINDOW(dwindow->window), GTK_WINDOW(dwindow->parent));
+ dwindow->parent_modal = gtk_window_get_modal(GTK_WINDOW(dwindow->parent));
+#ifndef G_OS_WIN32
+ gtk_window_set_modal(GTK_WINDOW(dwindow->parent), TRUE);
+#else
+ gtk_window_set_modal(GTK_WINDOW(dwindow->window), TRUE);
+#endif
gtk_window_set_destroy_with_parent(GTK_WINDOW(dwindow->window), TRUE);
gtk_widget_show(dwindow->window);
GdkEventKey *event,
gpointer data)
{
- if (event && event->keyval == GDK_Escape)
+ if (event && event->keyval == GDK_KEY_Escape)
description_window_destroy(widget, data);
return FALSE;
}
dwindow->window = NULL;
}
- if(dwindow->parent)
+ if(dwindow->parent) {
+ if (GTK_IS_WINDOW(dwindow->parent))
+ gtk_window_set_modal(GTK_WINDOW(dwindow->parent), dwindow->parent_modal);
g_signal_handlers_disconnect_by_func(G_OBJECT(dwindow->parent),
description_window_destroy, dwindow->parent);
+ }
}