--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: Closing filetype dialog by using WM causes emelfm to hang
- From: Juergen Salk <juergen.salk@gmx.de>
- Date: Sat, 15 Apr 2006 10:49:27 +0200
- Message-id: <E1FUgT9-0002BJ-00@charlotte.highx.de>
Package: emelfm
Version: 0.9.2-7
Severity: normal
emelfm hangs when you use the window manager's close button
to close the filetype dialog window.
Please consider the following patch to fix this problem.
Regards - Juergen
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Versions of packages emelfm depends on:
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libglib1.2 1.2.10-9 The GLib library of C routines
ii libgtk1.2 1.2.10-17 The GIMP Toolkit set of widgets fo
ii libx11-6 4.3.0.dfsg.1-14sarge1 X Window System protocol client li
ii libxext6 4.3.0.dfsg.1-14sarge1 X Window System miscellaneous exte
ii libxi6 4.3.0.dfsg.1-14sarge1 X Window System Input extension li
ii xlibs 4.3.0.dfsg.1-14sarge1 X Keyboard Extension (XKB) configu
-- no debconf information
--- emelfm-0.9.2.orig/init_filetype_dialog.c 2000-11-29 04:06:24.000000000 +0100
+++ emelfm-0.9.2.new/init_filetype_dialog.c 2006-04-15 10:22:59.010322627 +0200
@@ -86,6 +86,14 @@
cancel_cb(NULL);
}
+static void
+delete_event_cb(GtkWidget *widget)
+{
+ /* this is just here so the user can't close the dialog without clicking
+ * one of the buttons
+ */
+}
+
void
create_init_filetype_dialog(gchar *filename)
{
@@ -108,6 +116,7 @@
action_area = GTK_DIALOG(dialog)->action_area;
gtk_container_set_border_width(GTK_CONTAINER(dialog_vbox), 5);
gtk_container_set_border_width(GTK_CONTAINER(action_area), 5);
+ gtk_signal_connect(GTK_OBJECT(dialog), "delete_event", delete_event_cb, NULL);
gtk_signal_connect(GTK_OBJECT(dialog), "key_press_event",
GTK_SIGNAL_FUNC(key_press_cb), NULL);
@@ -131,8 +140,9 @@
add_button_to_table(table, _("View File"), view_file_cb, NULL, 0, 1, 3, 4);
add_button_to_table(table, _("Cancel"), cancel_cb, NULL, 0, 1, 4, 5);
- gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE);
- gtk_widget_set_sensitive(app.main_window, FALSE);
+ gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE);;
gtk_widget_show(dialog);
+ gtk_widget_set_sensitive(app.main_window, FALSE);
+ gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(app.main_window));
}
--- End Message ---