Hello
I’m looking for a way to add menu items to a task bar icon menu.
I have created a popup menu.
And I want to add to a task bar icon menu items for example projects but
it must be after user log in.
User log in
getting list of projects
adding menu items into task bar menu with project
I attch a file with source code which I already written
Thenks for reply’s
I’m looking for a way to add menu items to a task bar icon menu.
I have created a popup menu.
And I want to add to a task bar icon menu items for example projects but
it must be after user log in.
User log in
getting list of projects
adding menu items into task bar menu with project
I attch a file with source code which I already written
Basically, just have your create_popup_menu method check whether the
login has taken place, and show the appropriate menu items. The method’s
called anew each time the menu is shown.
Yes I was read this message before write my post.
I’m quite new in Ruby and not understand this code
actually I understand what this code doing but I don’t understand how I
can use this code in my project.
Thanks for reply
Yes I was read this message before write my post.
I’m quite new in Ruby and not understand this code
actually I understand what this code doing but I don’t understand how I
can use this code in my project
Have you actually tried working at it? As the previous emails said,
create_popup_menu is called EVERY time the user clicks on the taskbar
icon. So if the contents of that menu should change depending on the
program’s state (eg if the user is logged in), test for that state in
create_popup_menu and the correct menu will be shown.
From your example, what you could change is move the “if @user.login?”
test into create_popup_menu. If the user is logged in, show the extra
project menu items, if not, don’t.
hth
alex
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.