mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 13:30:19 +00:00
g_strdup() the text retrived from GtkEntry. only intercept the Tab key if
Sat May 16 09:04:32 1998 Tim Janik <timj@gtk.org> * gtk/gtkfilesel.c (gtk_file_selection_key_press): g_strdup() the text retrived from GtkEntry. only intercept the Tab key if there was some text to complete.
This commit is contained in:
parent
dc93f21ffe
commit
5aa450f97b
@ -1,3 +1,9 @@
|
||||
Sat May 16 09:04:32 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_key_press): g_strdup() the
|
||||
text retrived from GtkEntry. only intercept the Tab key if there
|
||||
was some text to complete.
|
||||
|
||||
Fri May 15 21:16:54 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
Basic thread-awareness:
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sat May 16 09:04:32 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_key_press): g_strdup() the
|
||||
text retrived from GtkEntry. only intercept the Tab key if there
|
||||
was some text to complete.
|
||||
|
||||
Fri May 15 21:16:54 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
Basic thread-awareness:
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sat May 16 09:04:32 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_key_press): g_strdup() the
|
||||
text retrived from GtkEntry. only intercept the Tab key if there
|
||||
was some text to complete.
|
||||
|
||||
Fri May 15 21:16:54 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
Basic thread-awareness:
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sat May 16 09:04:32 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_key_press): g_strdup() the
|
||||
text retrived from GtkEntry. only intercept the Tab key if there
|
||||
was some text to complete.
|
||||
|
||||
Fri May 15 21:16:54 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
Basic thread-awareness:
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sat May 16 09:04:32 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_key_press): g_strdup() the
|
||||
text retrived from GtkEntry. only intercept the Tab key if there
|
||||
was some text to complete.
|
||||
|
||||
Fri May 15 21:16:54 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
Basic thread-awareness:
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sat May 16 09:04:32 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_key_press): g_strdup() the
|
||||
text retrived from GtkEntry. only intercept the Tab key if there
|
||||
was some text to complete.
|
||||
|
||||
Fri May 15 21:16:54 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
Basic thread-awareness:
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sat May 16 09:04:32 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_key_press): g_strdup() the
|
||||
text retrived from GtkEntry. only intercept the Tab key if there
|
||||
was some text to complete.
|
||||
|
||||
Fri May 15 21:16:54 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
Basic thread-awareness:
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h> /* needed for sys/stat.h */
|
||||
#include <sys/stat.h>
|
||||
#include "glib.h"
|
||||
|
||||
|
@ -1029,13 +1029,23 @@ gtk_file_selection_key_press (GtkWidget *widget,
|
||||
|
||||
if (event->keyval == GDK_Tab)
|
||||
{
|
||||
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "key_press_event");
|
||||
gboolean intercept;
|
||||
|
||||
fs = GTK_FILE_SELECTION (user_data);
|
||||
text = gtk_entry_get_text (GTK_ENTRY (fs->selection_entry));
|
||||
|
||||
intercept = text && *text;
|
||||
|
||||
text = g_strdup (text);
|
||||
|
||||
gtk_file_selection_populate (fs, text, TRUE);
|
||||
|
||||
return TRUE;
|
||||
g_free (text);
|
||||
|
||||
if (intercept)
|
||||
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "key_press_event");
|
||||
|
||||
return intercept;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user