gtksourceview3 2.2.0 → 2.2.1

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: 89c51bb368690edbcbba0d995b498fe4633fe81c
4
- data.tar.gz: b9d7a67bcf6d1858d22b1ae70cef856d3a814239
3
+ metadata.gz: 69002808ac4f88f3064c3f2b6da65e3cbb238e10
4
+ data.tar.gz: 10e1577c22facfb62deee6ad43849050111bf10e
5
5
  SHA512:
6
- metadata.gz: 295185c8ff072fabf23a21e40c75596963d7e2db4a40af734676721d6d01bf88f933e4f8cf8d432cd6e91fb172cb2add01a752d87988624bf9874c4f6a74fcde
7
- data.tar.gz: 3fa2c002f6ed54aa852db7842891105836141aec530d31a6c901e0c1f8a01be1f38a34de11c50b954117d8b3fd3e924e3633fa8818e34e2742ac58af37aebe39
6
+ metadata.gz: 60d367f322324a951f96a506924cf8aa37de22db311db2ff3ca3e208b35671a3880effef911cd0814f77e3f1697d2614d8491dcf9ab2b8ed21d05c888cd2565f
7
+ data.tar.gz: 1439a73fd9c4d9172e334a2c7843efc961f82795a2ff6636b756def8d82be17b4e908091b922d983cb9fc3de88c60bff41783431fb0f1f64ab1d8a55429c1acf
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.2",
47
+ :version => "3.14.0",
48
48
  :compression_method => "xz",
49
49
  :windows => {
50
50
  :configure_args => [
@@ -30,7 +30,7 @@ rescue LoadError
30
30
  require 'mkmf-gnome2'
31
31
  end
32
32
 
33
- ["glib2", "atk", "pango", "gdk_pixbuf2", "gdk3", "gtk3"].each do |package|
33
+ ["glib2", "atk", "pango", "gdk_pixbuf2", "gtk3"].each do |package|
34
34
  directory = "#{package}#{version_suffix}"
35
35
  build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
36
36
  add_depend_package(package, "#{directory}/ext/#{package}",
@@ -78,4 +78,3 @@ if pkg_config_dir.is_a?(String)
78
78
  makefile.puts("pkgconfigdir=#{pkg_config_dir}")
79
79
  end
80
80
  end
81
-
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
3
+ * Copyright (C) 2011-2014 Ruby-GNOME2 Project Team
4
4
  *
5
5
  * This library is free software; you can redistribute it and/or
6
6
  * modify it under the terms of the GNU Lesser General Public
@@ -31,34 +31,10 @@ rg_initialize(VALUE self)
31
31
  return Qnil;
32
32
  }
33
33
 
34
- static VALUE
35
- rg_set_markup(VALUE self, VALUE markup)
36
- {
37
- StringValue(markup);
38
- gtk_source_gutter_renderer_text_set_markup(_SELF(self),
39
- RSTRING_PTR(markup),
40
- RSTRING_LEN(markup));
41
-
42
- return self;
43
- }
44
-
45
- static VALUE
46
- rg_set_text(VALUE self, VALUE text)
47
- {
48
- StringValue(text);
49
- gtk_source_gutter_renderer_text_set_text(_SELF(self),
50
- RSTRING_PTR(text),
51
- RSTRING_LEN(text));
52
-
53
- return self;
54
- }
55
-
56
34
  void
57
35
  Init_gtksource_gutterrenderertext(VALUE mGtkSource)
58
36
  {
59
37
  VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_SOURCE_TYPE_GUTTER_RENDERER_TEXT, "GutterRendererText", mGtkSource);
60
38
 
61
39
  RG_DEF_METHOD(initialize, 0);
62
- RG_DEF_METHOD(set_markup, 1);
63
- RG_DEF_METHOD(set_text, 1);
64
40
  }
@@ -40,4 +40,11 @@
40
40
  #define RVAL2GTKSOURCEGUTTERRENDERERSTATE(o) (RVAL2GFLAGS(o, GTK_SOURCE_TYPE_GUTTER_RENDERER_STATE))
41
41
  #define GTKSOURCEGUTTERRENDERERSTATE2RVAL(o) (GFLAGS2RVAL(o, GTK_SOURCE_TYPE_GUTTER_RENDERER_STATE))
42
42
 
43
+ /* For GDK3. They are temporary. They will be needless after Ruby/SourceView3
44
+ * is based on Ruby/GObjectIntrospection.
45
+ */
46
+ #define RVAL2GDKRECTANGLE(o) ((GdkRectangle*)RVAL2BOXED(o, GDK_TYPE_RECTANGLE))
47
+ #define RVAL2GDKRGBA(o) ((GdkRGBA*)RVAL2BOXED(o, GDK_TYPE_RGBA))
48
+ #define GDKRGBA2RVAL(o) (BOXED2RVAL(o, GDK_TYPE_RGBA))
49
+
43
50
  #endif /* __RBGTKSOURCEVIEW3CONVERSIONS_H__ */
@@ -28,7 +28,6 @@
28
28
 
29
29
  #include <ruby.h>
30
30
  #include <rb_cairo.h>
31
- #include <rbgdk3.h>
32
31
  #include <rbgtk3.h>
33
32
  #include "rbgtksourceview3conversions.h"
34
33
  #include "rbgtksourceview3version.h"
data/test/run-test.rb CHANGED
@@ -5,8 +5,10 @@ ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
5
5
 
6
6
  glib_base = File.join(ruby_gnome2_base, "glib2")
7
7
  atk_base = File.join(ruby_gnome2_base, "atk")
8
+ cairo_gobject_base = File.join(ruby_gnome2_base, "cairo-gobject")
8
9
  pango_base = File.join(ruby_gnome2_base, "pango")
9
10
  gdk_pixbuf_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
11
+ gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
10
12
  gdk3_base = File.join(ruby_gnome2_base, "gdk3")
11
13
  gtk3_base = File.join(ruby_gnome2_base, "gtk3")
12
14
  gtk_source_view3_base = File.join(ruby_gnome2_base, "gtksourceview3")
@@ -14,15 +16,23 @@ gtk_source_view3_base = File.join(ruby_gnome2_base, "gtksourceview3")
14
16
  $LOAD_PATH.unshift(glib_base)
15
17
  require 'test/glib-test-init'
16
18
 
17
- [glib_base, atk_base, pango_base, gdk_pixbuf_base, gdk3_base, gtk3_base,
18
- gtk_source_view3_base].each do |target|
19
- if system("which make > /dev/null")
20
- `make -C #{target.dump} > /dev/null` or exit(1)
19
+ dependencies = [
20
+ glib_base,
21
+ atk_base,
22
+ cairo_gobject_base,
23
+ pango_base,
24
+ gdk_pixbuf_base,
25
+ gobject_introspection_base,
26
+ gdk3_base,
27
+ gtk3_base,
28
+ gtk_source_view3_base,
29
+ ]
30
+ dependencies.each do |target|
31
+ makefile = File.join(target, "Makefile")
32
+ if File.exist?(makefile) and system("which make > /dev/null")
33
+ `make -C #{target.dump} > /dev/null` or exit(false)
21
34
  end
22
35
  $LOAD_PATH.unshift(File.join(target, "ext", File.basename(target)))
23
- $LOAD_PATH.unshift(File.join(target, "src"))
24
- $LOAD_PATH.unshift(File.join(target, "src", "lib"))
25
- $LOAD_PATH.unshift(File.join(target))
26
36
  $LOAD_PATH.unshift(File.join(target, "lib"))
27
37
  end
28
38
 
@@ -21,6 +21,6 @@ class TestMarkAttributes < Test::Unit::TestCase
21
21
 
22
22
  def test_background
23
23
  @mark_attributes.background = Gdk::RGBA.new(1, 0, 0, 0)
24
- assert_equal(Gdk::RGBA.new(1, 0, 0, 0), @mark_attributes.background)
24
+ assert_equal("rgba(255,0,0,0)", @mark_attributes.background.to_s)
25
25
  end
26
26
  end
@@ -0,0 +1,33 @@
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 TestGutterRendererText < Test::Unit::TestCase
18
+ def setup
19
+ @renderer = GtkSource::GutterRendererText.new
20
+ end
21
+
22
+ def test_markup
23
+ markup_text = "ruby"
24
+ @renderer.markup = markup_text
25
+ assert_equal(markup_text, @renderer.markup)
26
+ end
27
+
28
+ def test_text
29
+ render_text = "gtksourceview"
30
+ @renderer.text = render_text
31
+ assert_equal(render_text, @renderer.text)
32
+ end
33
+ end
@@ -0,0 +1,46 @@
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 TestLanguageManager < Test::Unit::TestCase
18
+ def setup
19
+ @lang = GtkSource::LanguageManager.new
20
+ @view = GtkSource::View.new
21
+ end
22
+
23
+ def test_language
24
+ language = @lang.get_language("ruby")
25
+ @view.buffer.language = language
26
+ assert_equal(language, @view.buffer.language)
27
+
28
+ highlight = true
29
+ @view.buffer.highlight_syntax = highlight
30
+ assert_true(@view.buffer.highlight_syntax?)
31
+
32
+ @view.buffer.highlight_matching_brackets = highlight
33
+ assert_true(@view.buffer.highlight_matching_brackets?)
34
+ end
35
+
36
+ def test_language_ids
37
+ ids = @lang.language_ids
38
+ assert_include(ids, "ruby")
39
+ end
40
+
41
+ def test_search_path
42
+ custom_path = "/path/to/search"
43
+ @lang.search_path = custom_path
44
+ assert_equal([custom_path], @lang.search_path)
45
+ end
46
+ end
@@ -20,4 +20,38 @@ class TestSourceView < Test::Unit::TestCase
20
20
  def setup
21
21
  @view = GtkSource::View.new
22
22
  end
23
+
24
+ def test_auto_indent
25
+ @view.auto_indent = true
26
+ assert_true(@view.auto_indent?)
27
+ end
28
+
29
+ def test_line_number
30
+ @view.show_line_numbers = true
31
+ assert_true(@view.show_line_numbers?)
32
+ end
33
+
34
+ def test_indent_width
35
+ indent = 4
36
+ @view.indent_width = indent
37
+ assert_equal(indent, @view.indent_width)
38
+ end
39
+
40
+ def test_insert_spaces_instead_of_tabs
41
+ insert_spaces = true
42
+ @view.insert_spaces_instead_of_tabs = insert_spaces
43
+ assert_true(@view.insert_spaces_instead_of_tabs?)
44
+ end
45
+
46
+ def test_right_margin_position
47
+ margin = 100
48
+ @view.right_margin_position = margin
49
+ assert_equal(margin, @view.right_margin_position)
50
+ end
51
+
52
+ def test_show_right_margin
53
+ show = true
54
+ @view.show_right_margin = show
55
+ assert_true(@view.show_right_margin?)
56
+ end
23
57
  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.2.0
4
+ version: 2.2.1
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: 2014-03-09 00:00:00.000000000 Z
11
+ date: 2014-10-12 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.2.0
19
+ version: 2.2.1
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.2.0
26
+ version: 2.2.1
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: []
@@ -32,9 +32,6 @@ extensions:
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - Rakefile
35
- - extconf.rb
36
- - lib/gtksourceview3.rb
37
- - lib/gtksourceview3/deprecated.rb
38
35
  - ext/gtksourceview3/depend
39
36
  - ext/gtksourceview3/extconf.rb
40
37
  - ext/gtksourceview3/gtksourceview3.def
@@ -56,10 +53,15 @@ files:
56
53
  - ext/gtksourceview3/rbgtksourceview.c
57
54
  - ext/gtksourceview3/rbgtksourceview3conversions.h
58
55
  - ext/gtksourceview3/rbgtksourceview3private.h
56
+ - extconf.rb
57
+ - lib/gtksourceview3.rb
58
+ - lib/gtksourceview3/deprecated.rb
59
59
  - sample/sourcelanguagemanager.rb
60
60
  - sample/test.rb
61
61
  - test/run-test.rb
62
62
  - test/test_mark_attributes.rb
63
+ - test/test_source_gutter_renderer.rb
64
+ - test/test_source_language_manager.rb
63
65
  - test/test_source_view.rb
64
66
  homepage: http://ruby-gnome2.sourceforge.jp/
65
67
  licenses:
@@ -71,17 +73,17 @@ require_paths:
71
73
  - lib
72
74
  required_ruby_version: !ruby/object:Gem::Requirement
73
75
  requirements:
74
- - - '>='
76
+ - - ">="
75
77
  - !ruby/object:Gem::Version
76
78
  version: 1.9.3
77
79
  required_rubygems_version: !ruby/object:Gem::Requirement
78
80
  requirements:
79
- - - '>='
81
+ - - ">="
80
82
  - !ruby/object:Gem::Version
81
83
  version: '0'
82
84
  requirements: []
83
85
  rubyforge_project:
84
- rubygems_version: 2.0.14
86
+ rubygems_version: 2.2.2
85
87
  signing_key:
86
88
  specification_version: 4
87
89
  summary: Ruby/GtkSourceView3 is a Ruby binding of gtksourceview-3.x.