vte3 2.2.5 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,41 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2006-2011 Ruby-GNOME2 Project Team
4
- *
5
- * This library is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU Lesser General Public
7
- * License as published by the Free Software Foundation; either
8
- * version 2.1 of the License, or (at your option) any later version.
9
- *
10
- * This library is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * Lesser General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Lesser General Public
16
- * License along with this library; if not, write to the Free Software
17
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
- * MA 02110-1301 USA
19
- */
20
-
21
- #include "rbvte3private.h"
22
-
23
- #define RG_TARGET_NAMESPACE cTerminalAccessible
24
-
25
- static VALUE
26
- rg_initialize(VALUE self, VALUE terminal)
27
- {
28
- G_INITIALIZE(self, vte_terminal_accessible_new(RVAL2VTETERMINAL(terminal)));
29
- return Qnil;
30
- }
31
-
32
- void
33
- Init_vte_access(VALUE mVte)
34
- {
35
- VALUE RG_TARGET_NAMESPACE;
36
-
37
- RG_TARGET_NAMESPACE = G_DEF_CLASS(VTE_TYPE_TERMINAL_ACCESSIBLE,
38
- "TerminalAccessible", mVte);
39
-
40
- RG_DEF_METHOD(initialize, 1);
41
- }
data/extconf.rb DELETED
@@ -1,49 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'pathname'
4
- require 'mkmf'
5
- require 'rbconfig'
6
- require 'fileutils'
7
-
8
- package = "vte3"
9
-
10
- base_dir = Pathname(__FILE__).dirname.expand_path
11
- ext_dir = base_dir + "ext" + package
12
- mkmf_gnome2_dir = base_dir + 'lib'
13
-
14
- ruby = File.join(RbConfig::CONFIG['bindir'],
15
- RbConfig::CONFIG['ruby_install_name'] +
16
- RbConfig::CONFIG["EXEEXT"])
17
-
18
- build_dir = Pathname("ext") + package
19
- FileUtils.mkdir_p(build_dir.to_s) unless build_dir.exist?
20
- extconf_rb_path = ext_dir + "extconf.rb"
21
- system(ruby, "-C", build_dir.to_s, extconf_rb_path.to_s, *ARGV) || exit(false)
22
-
23
- create_makefile(package)
24
- FileUtils.mv("Makefile", "Makefile.lib")
25
-
26
- File.open("Makefile", "w") do |makefile|
27
- makefile.puts(<<-EOM)
28
- all:
29
- (cd ext/#{package} && $(MAKE))
30
- $(MAKE) -f Makefile.lib
31
-
32
- install:
33
- (cd ext/#{package} && $(MAKE) install)
34
- $(MAKE) -f Makefile.lib install
35
-
36
- site-install:
37
- (cd ext/#{package} && $(MAKE) site-install)
38
- $(MAKE) -f Makefile.lib site-install
39
-
40
- clean:
41
- (cd ext/#{package} && $(MAKE) clean)
42
- $(MAKE) -f Makefile.lib clean
43
-
44
- distclean:
45
- (cd ext/#{package} && $(MAKE) distclean)
46
- $(MAKE) -f Makefile.lib distclean
47
- @rm -f Makefile.lib
48
- EOM
49
- end
@@ -1,103 +0,0 @@
1
- #!/usr/bin/env ruby
2
- =begin
3
- multiterm.rb - Ruby/VTE sample script.
4
-
5
- Copyright (c) 2006 Ruby-GNOME2 Project Team
6
- This program is licenced under the same licence as Ruby-GNOME2.
7
-
8
- $Id: multiterm.rb,v 1.2 2006/06/17 13:27:51 mutoh Exp $
9
- =end
10
-
11
- require "vte3"
12
-
13
- class MultiTerm
14
- def initialize
15
- @terminals = []
16
- init_window
17
- add_terminal
18
- end
19
-
20
- def run
21
- @window.show_all
22
- @notebook.get_nth_page(@notebook.page).grab_focus
23
- end
24
-
25
- private
26
- def init_window
27
- @window = Gtk::Window.new("MultiTerm sample")
28
- @window.signal_connect("destroy") do |widget|
29
- Gtk.main_quit
30
- end
31
- init_notebook
32
- @window.add(@notebook)
33
- end
34
-
35
- def init_notebook
36
- @notebook = Gtk::Notebook.new
37
- @last_page_index = nil
38
- @notebook.signal_connect_after("switch-page") do |widget, page, i|
39
- max_page_index = widget.n_pages - 1
40
- if max_page_index > 0 and i == max_page_index
41
- widget.page = @last_page_index
42
- end
43
- end
44
- @notebook.signal_connect("switch-page") do |widget, page, i|
45
- @last_page_index ||= i
46
- terminal = widget.get_nth_page(i)
47
- if terminal.respond_to?(:window_title)
48
- @last_page_index = i
49
- update_window_title(terminal.window_title)
50
- end
51
- end
52
- @notebook.tab_reorderable = true if @notebook.respond_to?(:tab_reorderable=)
53
- @notebook.scrollable = true
54
- init_new_tab_label
55
- dummy = Gtk::EventBox.new
56
- @notebook.append_page(dummy, @new_tab_label)
57
- end
58
-
59
- def init_new_tab_label
60
- @new_tab_label = Gtk::EventBox.new
61
- @new_tab_label.signal_connect("button-press-event") do |widget, event|
62
- add_terminal
63
- @notebook.page = @last_page_index
64
- true
65
- end
66
- # @new_tab_label.set_size_request(30, -1)
67
- image = Gtk::Image.new(Gtk::Stock::NEW, Gtk::IconSize::MENU)
68
- image.show
69
- @new_tab_label.add(image)
70
- @new_tab_label
71
- end
72
-
73
- def destroy
74
- @window.destroy
75
- end
76
-
77
- def add_terminal
78
- terminal = Vte::Terminal.new
79
- terminal.signal_connect("child-exited") do |widget|
80
- @notebook.remove_page(@notebook.page_num(widget))
81
- @terminals.delete(widget)
82
- destroy if @terminals.empty?
83
- end
84
- terminal.signal_connect("window-title-changed") do |widget|
85
- @notebook.set_tab_label_text(widget, widget.window_title)
86
- update_window_title(widget.window_title)
87
- end
88
- terminal.set_font("Monospace 14")
89
- terminal.fork_command
90
- terminal.show
91
- last = @notebook.n_pages
92
- @notebook.insert_page(last - 1, terminal)
93
- @terminals << terminal
94
- end
95
-
96
- def update_window_title(title)
97
- @window.title = title if title
98
- end
99
- end
100
-
101
- multi_term = MultiTerm.new
102
- multi_term.run
103
- Gtk.main
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env ruby
2
- =begin
3
- terminal.rb - Ruby/VTE sample script.
4
-
5
- Copyright (c) 2006 Ruby-GNOME2 Project Team
6
- This program is licenced under the same licence as Ruby-GNOME2.
7
-
8
- $Id: terminal.rb,v 1.2 2006/06/17 13:27:51 mutoh Exp $
9
- =end
10
-
11
- require "vte3"
12
-
13
- window = Gtk::Window.new("Terminal sample")
14
- window.signal_connect("destroy"){Gtk.main_quit}
15
-
16
- terminal = Vte::Terminal.new
17
- terminal.set_font("Monospace 16")
18
- terminal.signal_connect("child-exited") do |widget|
19
- Gtk.main_quit
20
- end
21
- terminal.signal_connect("window-title-changed") do |widget|
22
- window.title = terminal.window_title
23
- end
24
- terminal.fork_command
25
- window.add(terminal)
26
- window.show_all
27
-
28
- Gtk.main