Make the clear icon of entry fields act on the release event, not on the press event like for other buttons.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3775 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2009-05-10 17:44:14 +00:00
parent ac50ceb983
commit daf4c3478b
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2009-05-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/ui_utils.c:
Make the clear icon of entry fields act on the release event, not
on the press event like for other buttons.
2009-05-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* plugins/filebrowser.c:

View File

@ -1293,7 +1293,8 @@ ui_image_menu_item_new(const gchar *stock_id, const gchar *label)
}
static void entry_clear_icon_press_cb(GtkEntry *entry, gint icon_pos, GdkEvent *event, gpointer data)
static void entry_clear_icon_release_cb(GtkEntry *entry, gint icon_pos,
GdkEvent *event, gpointer data)
{
if (event->button.button == 1 && icon_pos == 1)
{
@ -1318,7 +1319,7 @@ void ui_entry_add_clear_icon(GtkWidget *entry)
if (gtk_check_version(2, 15, 2) == NULL)
{
g_object_set(entry, "secondary-icon-stock", "gtk-clear", NULL);
g_signal_connect(entry, "icon-press", G_CALLBACK(entry_clear_icon_press_cb), NULL);
g_signal_connect(entry, "icon-release", G_CALLBACK(entry_clear_icon_release_cb), NULL);
}
}