Class: GerminalMenu

Inherits:
Gtk::Menu
  • Object
show all
Defined in:
lib/terminal.rb

Overview

Copyright 2015-2016 Cédric LE MOIGNE, [email protected] This file is part of Germinal.

Germinal is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

Germinal is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Germinal. If not, see <www.gnu.org/licenses/>.

Instance Method Summary collapse

Constructor Details

#initialize(vte) ⇒ GerminalMenu

Returns a new instance of GerminalMenu.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/terminal.rb', line 17

def initialize(vte)
  super()
  copyitem = Gtk::MenuItem.new(:label => "Copy")
  copyitem.signal_connect "activate" do
    vte.copy_clipboard
  end
  append(copyitem)

  pasteitem = Gtk::MenuItem.new(:label => "Paste")
  pasteitem.signal_connect "activate" do
    vte.paste_clipboard
  end
  append(pasteitem)
  show_all
end