|
Lines 1849-1855
Link Here
|
| 1849 |
|
1849 |
|
| 1850 |
gtk_entry_pend_cursor_blink (entry); |
1850 |
gtk_entry_pend_cursor_blink (entry); |
| 1851 |
|
1851 |
|
| 1852 |
if (entry->editable) |
1852 |
if (entry->editable && entry->visible) |
| 1853 |
{ |
1853 |
{ |
| 1854 |
if (gtk_im_context_filter_keypress (entry->im_context, event)) |
1854 |
if (gtk_im_context_filter_keypress (entry->im_context, event)) |
| 1855 |
{ |
1855 |
{ |
|
Lines 1876-1881
Link Here
|
| 1876 |
*/ |
1876 |
*/ |
| 1877 |
return TRUE; |
1877 |
return TRUE; |
| 1878 |
|
1878 |
|
|
|
1879 |
/* Commit key event directly if visible is set to FALSE. |
| 1880 |
*/ |
| 1881 |
if (entry->editable && !entry->visible) |
| 1882 |
{ |
| 1883 |
gunichar ch; |
| 1884 |
ch = gdk_keyval_to_unicode (event->keyval); |
| 1885 |
|
| 1886 |
if (g_unichar_validate (ch)) |
| 1887 |
{ |
| 1888 |
gchar buf[10]; |
| 1889 |
gint len; |
| 1890 |
len = g_unichar_to_utf8 (ch, buf); |
| 1891 |
buf[len] = '\0'; |
| 1892 |
|
| 1893 |
g_signal_emit_by_name (entry->im_context, "commit", &buf); |
| 1894 |
|
| 1895 |
return TRUE; |
| 1896 |
} |
| 1897 |
} |
| 1898 |
|
| 1879 |
return FALSE; |
1899 |
return FALSE; |
| 1880 |
} |
1900 |
} |
| 1881 |
|
1901 |
|
|
Lines 1885-1891
Link Here
|
| 1885 |
{ |
1905 |
{ |
| 1886 |
GtkEntry *entry = GTK_ENTRY (widget); |
1906 |
GtkEntry *entry = GTK_ENTRY (widget); |
| 1887 |
|
1907 |
|
| 1888 |
if (entry->editable) |
1908 |
if (entry->editable && entry->visible) |
| 1889 |
{ |
1909 |
{ |
| 1890 |
if (gtk_im_context_filter_keypress (entry->im_context, event)) |
1910 |
if (gtk_im_context_filter_keypress (entry->im_context, event)) |
| 1891 |
{ |
1911 |
{ |