summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-20 15:53:01 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-20 15:53:01 +0100
commit535e367b936a1dd9c191e49bbb63adc79116cd79 (patch)
treec0e9961c0912d1f65e050fb28483962bac73969a /plugins
parent8c8d895ac93955731378eae3cea8d4abd223ada9 (diff)
bigger plugin preferences window, also can be closed using Esc key now
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/callbacks.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index 31b48baa..1c4c36e7 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -1911,10 +1911,21 @@ on_prop_browse_file (GtkButton *button, gpointer user_data) {
}
}
+gboolean
+on_plug_prefwin_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) {
+ if (event->keyval == GDK_Escape) {
+ gtk_widget_destroy (widget);
+ }
+ return FALSE;
+}
+
void
plugin_configure (GtkWidget *parentwin, DB_plugin_t *p) {
// create window
GtkWidget *win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+// gtk_widget_set_events (win, GDK_KEY_PRESS_MASK);
+ gtk_widget_set_size_request (win, 300, -1);
+ g_signal_connect ((gpointer) win, "key_press_event", G_CALLBACK (on_plug_prefwin_key_press_event), NULL);
char title[200];
snprintf (title, sizeof (title), "Setup %s", p->name);
gtk_window_set_title (GTK_WINDOW (win), title);