handle double click on our own since channels_dialog_flush nukes the

Fri May  1 23:09:33 EDT 1998  Matthew Wilson  <msw@gimp.org>

	* app/channels_dialog.c: handle double click on our own since
	channels_dialog_flush nukes the widgets and we never get
	2BUTTON events
--Matt
This commit is contained in:
EDT 1998 Matthew Wilson 1998-05-02 03:10:58 +00:00 committed by Matt Wilson
parent 9a1914e355
commit 96b1e436b9
3 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,9 @@
Fri May 1 23:09:33 EDT 1998 Matthew Wilson <msw@gimp.org>
* app/channels_dialog.c: handle double click on our own since
channels_dialog_flush nukes the widgets and we never get
2BUTTON events
Fri May 1 13:22:21 1998 Tim Janik <timj@gtk.org>
* app/channels_dialog.c: keep the channel list uptodate

View File

@ -154,6 +154,9 @@ static GdkPixmap *channel_pixmap[3] = { NULL, NULL, NULL };
static int suspend_gimage_notify = 0;
static guint32 button_click_time = 0;
static int button_last_id = 0;
static MenuItem channels_ops[] =
{
{ "New Channel", 'N', GDK_CONTROL_MASK,
@ -773,6 +776,15 @@ channel_list_events (GtkWidget *widget,
gtk_menu_popup (GTK_MENU (channelsD->ops_menu), NULL, NULL, NULL, NULL, 3, bevent->time);
return TRUE;
}
/* Grumble - we have to handle double clicks ourselves because channels_dialog_flush is broken */
if (channel_widget->type == Auxillary)
if ((event->button.time < (button_click_time + 250)) && (channel_widget->ID == button_last_id)) {
channels_dialog_edit_channel_query (channel_widget);
return TRUE;
} else {
button_click_time = event->button.time;
button_last_id = channel_widget->ID;
}
break;
case GDK_2BUTTON_PRESS:

View File

@ -154,6 +154,9 @@ static GdkPixmap *channel_pixmap[3] = { NULL, NULL, NULL };
static int suspend_gimage_notify = 0;
static guint32 button_click_time = 0;
static int button_last_id = 0;
static MenuItem channels_ops[] =
{
{ "New Channel", 'N', GDK_CONTROL_MASK,
@ -773,6 +776,15 @@ channel_list_events (GtkWidget *widget,
gtk_menu_popup (GTK_MENU (channelsD->ops_menu), NULL, NULL, NULL, NULL, 3, bevent->time);
return TRUE;
}
/* Grumble - we have to handle double clicks ourselves because channels_dialog_flush is broken */
if (channel_widget->type == Auxillary)
if ((event->button.time < (button_click_time + 250)) && (channel_widget->ID == button_last_id)) {
channels_dialog_edit_channel_query (channel_widget);
return TRUE;
} else {
button_click_time = event->button.time;
button_last_id = channel_widget->ID;
}
break;
case GDK_2BUTTON_PRESS: