logo       

Re: I want popup menus :(: msg#00146

Subject: Re: I want popup menus :(
On Mon, 2004-07-19 at 12:25, Artūras Šlajus wrote:

> $usertree->signal_connect('button-press-event' => sub {
>      my $event = $_[1];
>      if ($event->button == 3) {
>          $gladexml->get_widget('pmUsers')->popup(undef, undef, undef,
>              user_selected(), $event->button, 0);
>          return TRUE;
>      }
>      else {
>          return FALSE;
>      }
> } );

Why do you put user_selected() in the user data slot of popup()?  It
would only be used if you provided a positioning callback.

> other way popup appears and disappears quickly.

That's because you connected to button-press-event.  Those kind of popup
menus only stay up if you don't release the mouse button.  If you want
the more traditional behavior, connect to button-release-event.

> activate_time :        the time at which the activation event occurred.
> The activate_time parameter should be the time stamp of the event that 
> initiated the popup. If such an event is not available, use 
> gtk_get_current_event_time() instead.
> 
> i don't really understand from where i should get that activation time..

Well, either use $event->time or Gtk2->get_current_event_time.

HTH,
-Torsten


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe