gtksourceview3 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6234a17aacfd388f46337b0f03267b9cb4c583b
4
- data.tar.gz: 10b8aaced9bb8a0d9262a4c392bfa95847fa0368
3
+ metadata.gz: 89c51bb368690edbcbba0d995b498fe4633fe81c
4
+ data.tar.gz: b9d7a67bcf6d1858d22b1ae70cef856d3a814239
5
5
  SHA512:
6
- metadata.gz: 035769cb35d79f545dfe67a0d9bf14935b3bd0257160d211e12f9c1f311d57f320342c3ea4d7da18c028f1534230f3507bd1e20ce9ecf743291323af73090f30
7
- data.tar.gz: 0be74779935e7d76554320fd2782128e6e7e483c8856c3e839a628bb9eda98999488cfe110d35c550f349a85df02af2417c7ca141b46ccb36deb73af1b07b771
6
+ metadata.gz: 295185c8ff072fabf23a21e40c75596963d7e2db4a40af734676721d6d01bf88f933e4f8cf8d432cd6e91fb172cb2add01a752d87988624bf9874c4f6a74fcde
7
+ data.tar.gz: 3fa2c002f6ed54aa852db7842891105836141aec530d31a6c901e0c1f8a01be1f38a34de11c50b954117d8b3fd3e924e3633fa8818e34e2742ac58af37aebe39
data/Rakefile CHANGED
@@ -44,7 +44,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
44
44
  :name => "gtksourceview",
45
45
  :download_site => :gnome,
46
46
  :label => "GtkSourceView",
47
- :version => "3.10.1",
47
+ :version => "3.10.2",
48
48
  :compression_method => "xz",
49
49
  :windows => {
50
50
  :configure_args => [
@@ -10,7 +10,7 @@ vendor_dir = base_dir + "vendor" + "local"
10
10
  vendor_bin_dir = vendor_dir + "bin"
11
11
  GLib.prepend_dll_path(vendor_bin_dir)
12
12
  begin
13
- major, minor, micro, = RUBY_VERSION.split(/\./)
13
+ major, minor, = RUBY_VERSION.split(/\./)
14
14
  require "#{major}.#{minor}/gtksourceview3.so"
15
15
  rescue LoadError
16
16
  require "gtksourceview3.so"
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin
3
- sourcelanguagesmanager.rb - Ruby/GtkSourceView sample script.
3
+ sourcelanguagesmanager.rb - Ruby/GtkSourceView3 sample script.
4
4
 
5
- Copyright (c) 2006 Ruby-GNOME2 Project Team
5
+ Copyright (c) 2006-2014 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: sourcelanguagesmanager.rb,v 1.3 2007/06/03 02:11:07 mutoh Exp $
9
9
  =end
10
10
 
11
- require 'gtksourceview3'
11
+ require "gtksourceview3"
12
12
 
13
- s = Gtk::SourceLanguageManager.new
13
+ s = GtkSource::LanguageManager.new
14
14
  s.language_ids.each do |v|
15
15
  puts v
16
16
  end
data/sample/test.rb CHANGED
@@ -1,32 +1,32 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin
3
- test.rb - Ruby/GtkSourceView2 sample script.
3
+ test.rb - Ruby/GtkSourceView3 sample script.
4
4
 
5
- Copyright (c) 2006 Ruby-GNOME2 Project Team
5
+ Copyright (c) 2006-2014 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: test.rb,v 1.4 2007/06/03 02:11:07 mutoh Exp $
9
9
  =end
10
10
 
11
- require 'gtksourceview3'
11
+ require "gtksourceview3"
12
12
 
13
- w = Gtk::Window.new
14
- w.signal_connect("delete-event"){Gtk::main_quit}
13
+ window = Gtk::Window.new
14
+ window.signal_connect("delete-event") {Gtk.main_quit}
15
15
 
16
- view = Gtk::SourceView.new
17
- w.add(Gtk::ScrolledWindow.new.add(view))
16
+ view = GtkSource::View.new
17
+ window.add(Gtk::ScrolledWindow.new.add(view))
18
18
  view.show_line_numbers = true
19
19
  view.insert_spaces_instead_of_tabs = true
20
20
  view.indent_width = 4
21
21
  view.show_right_margin = true
22
22
  view.right_margin_position = 80
23
23
 
24
- lang = Gtk::SourceLanguageManager.new.get_language('ruby')
24
+ lang = GtkSource::LanguageManager.new.get_language("ruby")
25
25
  view.buffer.language = lang
26
26
  view.buffer.highlight_syntax = true
27
27
  view.buffer.highlight_matching_brackets = true
28
28
 
29
- w.set_default_size(450,300)
30
- w.show_all
29
+ window.set_default_size(450, 300)
30
+ window.show_all
31
31
 
32
32
  Gtk.main
data/test/run-test.rb CHANGED
@@ -7,14 +7,15 @@ glib_base = File.join(ruby_gnome2_base, "glib2")
7
7
  atk_base = File.join(ruby_gnome2_base, "atk")
8
8
  pango_base = File.join(ruby_gnome2_base, "pango")
9
9
  gdk_pixbuf_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
10
- gtk_base = File.join(ruby_gnome2_base, "gtk2")
11
- gtk_source_view2_base = File.join(ruby_gnome2_base, "gtksourceview2")
10
+ gdk3_base = File.join(ruby_gnome2_base, "gdk3")
11
+ gtk3_base = File.join(ruby_gnome2_base, "gtk3")
12
+ gtk_source_view3_base = File.join(ruby_gnome2_base, "gtksourceview3")
12
13
 
13
14
  $LOAD_PATH.unshift(glib_base)
14
15
  require 'test/glib-test-init'
15
16
 
16
- [glib_base, atk_base, pango_base, gdk_pixbuf_base, gtk_base,
17
- gtk_source_view2_base].each do |target|
17
+ [glib_base, atk_base, pango_base, gdk_pixbuf_base, gdk3_base, gtk3_base,
18
+ gtk_source_view3_base].each do |target|
18
19
  if system("which make > /dev/null")
19
20
  `make -C #{target.dump} > /dev/null` or exit(1)
20
21
  end
@@ -25,9 +26,9 @@ require 'test/glib-test-init'
25
26
  $LOAD_PATH.unshift(File.join(target, "lib"))
26
27
  end
27
28
 
28
- $LOAD_PATH.unshift(File.join(gtk_base, "test"))
29
+ $LOAD_PATH.unshift(File.join(gtk3_base, "test"))
29
30
  require 'gtk-test-utils'
30
31
 
31
- require 'gtksourceview2'
32
+ require 'gtksourceview3'
32
33
 
33
34
  exit Test::Unit::AutoRunner.run(true)
@@ -0,0 +1,26 @@
1
+ # Copyright (C) 2014 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestMarkAttributes < Test::Unit::TestCase
18
+ def setup
19
+ @mark_attributes = GtkSource::MarkAttributes.new
20
+ end
21
+
22
+ def test_background
23
+ @mark_attributes.background = Gdk::RGBA.new(1, 0, 0, 0)
24
+ assert_equal(Gdk::RGBA.new(1, 0, 0, 0), @mark_attributes.background)
25
+ end
26
+ end
@@ -1,17 +1,23 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2011-2014 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, MA 02110-1301 USA
2
18
 
3
19
  class TestSourceView < Test::Unit::TestCase
4
- def test_mark_category_background
5
- view = Gtk::SourceView.new
6
-
7
- red_rgb = [65535, 0, 0]
8
- red_color = Gdk::Color.parse("red")
9
- assert_not_equal(red_rgb, view.get_mark_category_background("XXX").to_a)
10
-
11
- view.set_mark_category_background("XXX", red_color)
12
- assert_equal(red_rgb, view.get_mark_category_background("XXX").to_a)
13
-
14
- view.set_mark_category_background("XXX", nil)
15
- assert_not_equal(red_rgb, view.get_mark_category_background("XXX").to_a)
20
+ def setup
21
+ @view = GtkSource::View.new
16
22
  end
17
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtksourceview3
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME2 Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-29 00:00:00.000000000 Z
11
+ date: 2014-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gtk3
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.1.0
19
+ version: 2.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.1.0
26
+ version: 2.2.0
27
27
  description: Ruby/GtkSourceView3 is a Ruby binding of gtksourceview-3.x.
28
28
  email: ruby-gnome2-devel-en@lists.sourceforge.net
29
29
  executables: []
@@ -59,6 +59,7 @@ files:
59
59
  - sample/sourcelanguagemanager.rb
60
60
  - sample/test.rb
61
61
  - test/run-test.rb
62
+ - test/test_mark_attributes.rb
62
63
  - test/test_source_view.rb
63
64
  homepage: http://ruby-gnome2.sourceforge.jp/
64
65
  licenses: