Re: About popup menu...
- From: "alan" <alan ielinux com>
- To: "Paul Barton-Davis" <pbd op net>
- Cc: <gtk-list gnome org>
- Subject: Re: About popup menu...
- Date: Fri, 8 Dec 2000 23:24:33 +0800
----- Original Message -----
From: "Paul Barton-Davis" <pbd op net>
To: "alan" <alan ielinux com>
Cc: <gtk-list gnome org>
Sent: Wednesday, December 06, 2000 8:58 PM
Subject: Re: About popup menu...
> In message <001701c05f79$9d1a4540$bcec41d2 ielinux com>you write:
> >Dear sir,
> >
> >When I create a popup menu by right button clicked.
> >But mouse still can click other application.
> >Some gnome apps can let popup menu popup_done when user click other
> >appliction.
> >How to do it?
>
> when you call gtk_menu_popup(), did you just use the same button (3) ?
>
> i ask because i have the sense that whatever button was referenced in
> that button event becomes the default button for the menu. so if you
> used right click to start the menu popup, and pass that button id to
> the popup call, you will get the behaviour you expect only if you
> click the right button on another window.
>
> when this has mattered to me, i lie about the button id of the event
> that i pass in to popup().
>
> i am not certain of this. havoc or owen can probably comment with more
> authority.
>
I knew what problem it is. as code ....
gboolean on_clist1_button_press_event(GtkWidget *widget,GdkEventButton
*event, gpointer user_data)
{
if(event->button==3){
gtk_item_factory_popup (SongListMenu, (guint) event->x_root, (guint)
event->y_root, 1, 0);
return TRUE;
}
return FALSE;
}
this code is ok , but i went to know which row of clist user right_button
clicked.
(besause right_button clicked no select_row event) so i change code as.....
gboolean ClistButtonPressEvent(GtkWidget *widget,GdkEventButton *event,
gpointer user_data)
{
if(event->button==3){
event->button=1;
}
return FALSE;
}
gboolean ClistButtonReleaseEvent(GtkWidget *widget,GdkEventButton *event,
gpointer user_data)
{
if(event->button==3){
gtk_item_factory_popup (SongListMenu, (guint) event->x_root, (guint)
event->y_root, 1, 0);
event->button=1;
}
return FALSE;
}
so have problem as I say last time. But now have other problem.
How can I know which row of user select by right_button click on gtk_clist?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]