-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added src/moonterm-menu.lua and removed src/moonterm-popover.lua
removed headerbar popover added new menu
- Loading branch information
Showing
4 changed files
with
48 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--[[-- | ||
@package MoonTerm | ||
@filename moonterm-menu.lua | ||
@version 1.0 | ||
@autor Diaz Urbaneja Victor Diego Alejandro <sodomon2@gmail.com> | ||
@date 30.01.2021 19:54:09 -04 | ||
]] | ||
|
||
function main_window:on_button_press_event(event) | ||
if (event.type == 'BUTTON_PRESS' and event.button == 3) then | ||
menu = Gtk.Menu { | ||
Gtk.ImageMenuItem { | ||
label = "Preferences", | ||
image = Gtk.Image { | ||
stock = "gtk-preferences" | ||
}, | ||
on_activate = function() | ||
dialog_config:show_all() | ||
end | ||
}, | ||
Gtk.ImageMenuItem { | ||
label = "About Moonterm", | ||
image = Gtk.Image { | ||
stock = "gtk-about" | ||
}, | ||
on_activate = function() | ||
about_window:run() | ||
about_window:hide() | ||
end | ||
}, | ||
Gtk.SeparatorMenuItem {}, | ||
Gtk.ImageMenuItem { | ||
label = "Quit", | ||
image = Gtk.Image { | ||
stock = "gtk-quit" | ||
}, | ||
on_activate = function() | ||
app:quit() | ||
end | ||
} | ||
} | ||
menu:attach_to_widget(main_window, null) | ||
menu:show_all() | ||
menu:popup(nil, nil, nil, event.button, event.time) | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.