gtksourceview2 2.1.0-x86-mingw32 → 2.2.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/gtksourceview2/rbgtksourceiter.c +2 -2
- data/ext/gtksourceview2/rbgtksourcelanguagemanager.c +0 -77
- data/ext/gtksourceview2/rbgtksourcestyleschememanager.c +0 -76
- data/ext/gtksourceview2/rbgtksourceview.c +9 -4
- data/lib/1.9/gtksourceview2.so +0 -0
- data/lib/2.0/gtksourceview2.so +0 -0
- data/lib/2.1/gtksourceview2.so +0 -0
- data/lib/gtksourceview2.rb +1 -1
- data/test/test_source_view.rb +6 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90f1c6309da4d6ec7c1fcf5d872de90c5908f17b
|
4
|
+
data.tar.gz: 10624e17df391a52444c7a6d9b6208634bda20df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9738cac0cd6e5433c4f2efc2a145f32963d339a25b853d9b49a8f9b67df1ecf41c85e60a9da4f4f04757b6e5374075d134953e581b16e2666374f7186aa5549f
|
7
|
+
data.tar.gz: 0c2c0399ac09e39c65f39263363dac90e1f9e176b5d9eef62acaacd58b022bb8b9dc4396a4d13350ee12acbf2d7c23ef220f365307106f46694561c9acf7365c
|
@@ -108,8 +108,8 @@ Init_gtk_sourceiter (VALUE mGtk)
|
|
108
108
|
/*
|
109
109
|
* They are override original Gtk::TextIter#[for|back]ward_search
|
110
110
|
*/
|
111
|
-
|
112
|
-
|
111
|
+
RG_REPLACE_ACTION(forward_search, -1);
|
112
|
+
RG_REPLACE_ACTION(backward_search, -1);
|
113
113
|
|
114
114
|
G_DEF_CLASS(GTK_TYPE_SOURCE_SEARCH_FLAGS, "SourceSearchFlags", RG_TARGET_NAMESPACE);
|
115
115
|
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_SOURCE_SEARCH_FLAGS, "GTK_");
|
@@ -60,80 +60,6 @@ rg_s_default(VALUE self)
|
|
60
60
|
return GOBJ2RVAL(slm);
|
61
61
|
}
|
62
62
|
|
63
|
-
/* Method: set_search_path(dirs)
|
64
|
-
* dirs: language file directory path
|
65
|
-
*
|
66
|
-
* Sets the language files directories for the given language manager.
|
67
|
-
*
|
68
|
-
* Returns: self.
|
69
|
-
*/
|
70
|
-
static VALUE
|
71
|
-
rg_set_search_path(VALUE self, VALUE dirs)
|
72
|
-
{
|
73
|
-
gchar** gdirs = (gchar**)NULL;
|
74
|
-
gint i;
|
75
|
-
|
76
|
-
if (! NIL_P(dirs)){
|
77
|
-
Check_Type(dirs, T_ARRAY);
|
78
|
-
i = RARRAY_LEN(dirs);
|
79
|
-
gdirs = ALLOCA_N(gchar*, i + 1);
|
80
|
-
for (i = 0; i < i; i++) {
|
81
|
-
if (TYPE(RARRAY_PTR(dirs)[i]) == T_STRING) {
|
82
|
-
gdirs[i] = RVAL2CSTR(RARRAY_PTR(dirs)[i]);
|
83
|
-
}
|
84
|
-
else {
|
85
|
-
gdirs[i] = "";
|
86
|
-
}
|
87
|
-
}
|
88
|
-
gdirs[i] = (gchar*)NULL;
|
89
|
-
}
|
90
|
-
|
91
|
-
gtk_source_language_manager_set_search_path (_SELF (self), gdirs);
|
92
|
-
|
93
|
-
return self;
|
94
|
-
}
|
95
|
-
|
96
|
-
/* Method: search_path
|
97
|
-
* Returns: a list of language files directories (strings) for the given
|
98
|
-
* language manager.
|
99
|
-
*/
|
100
|
-
static VALUE
|
101
|
-
rg_search_path(VALUE self)
|
102
|
-
{
|
103
|
-
VALUE ary;
|
104
|
-
const gchar * const * dirs =
|
105
|
-
gtk_source_language_manager_get_search_path (_SELF (self));
|
106
|
-
if (!dirs)
|
107
|
-
return Qnil;
|
108
|
-
|
109
|
-
ary = rb_ary_new();
|
110
|
-
while (*dirs){
|
111
|
-
rb_ary_push(ary, CSTR2RVAL(*dirs));
|
112
|
-
dirs++;
|
113
|
-
}
|
114
|
-
return ary;
|
115
|
-
}
|
116
|
-
|
117
|
-
/* Method: language_ids
|
118
|
-
* Returns: a list of languages ids for the given language manager
|
119
|
-
*/
|
120
|
-
static VALUE
|
121
|
-
rg_language_ids(VALUE self)
|
122
|
-
{
|
123
|
-
VALUE ary;
|
124
|
-
const gchar * const * ids =
|
125
|
-
gtk_source_language_manager_get_language_ids (_SELF (self));
|
126
|
-
if (!ids)
|
127
|
-
return Qnil;
|
128
|
-
|
129
|
-
ary = rb_ary_new();
|
130
|
-
while (*ids){
|
131
|
-
rb_ary_push(ary, CSTR2RVAL(*ids));
|
132
|
-
ids++;
|
133
|
-
}
|
134
|
-
return ary;
|
135
|
-
}
|
136
|
-
|
137
63
|
/*
|
138
64
|
* Method: get_language(id)
|
139
65
|
* id: a language id (as a string).
|
@@ -181,9 +107,6 @@ Init_gtk_sourcelanguagemanager (VALUE mGtk)
|
|
181
107
|
"SourceLanguageManager", mGtk);
|
182
108
|
|
183
109
|
RG_DEF_METHOD(initialize, 0);
|
184
|
-
RG_DEF_METHOD(set_search_path, 1);
|
185
|
-
RG_DEF_METHOD(search_path, 0);
|
186
|
-
RG_DEF_METHOD(language_ids, 0);
|
187
110
|
RG_DEF_METHOD(get_language, 1);
|
188
111
|
#ifdef HAVE_GTK_SOURCE_LANGUAGE_MANAGER_GUESS_LANGUAGE
|
189
112
|
RG_DEF_METHOD(guess_language, 2);
|
@@ -60,38 +60,6 @@ rg_s_default(VALUE self)
|
|
60
60
|
return GOBJ2RVAL(sssm);
|
61
61
|
}
|
62
62
|
|
63
|
-
/* Method: set_search_path(dirs)
|
64
|
-
* dirs: style scheme file directory path
|
65
|
-
*
|
66
|
-
* Sets the style scheme files directories for the given style scheme manager.
|
67
|
-
*
|
68
|
-
* Returns: self.
|
69
|
-
*/
|
70
|
-
static VALUE
|
71
|
-
rg_set_search_path(VALUE self, VALUE dirs)
|
72
|
-
{
|
73
|
-
gchar** gdirs = (gchar**)NULL;
|
74
|
-
gint i;
|
75
|
-
|
76
|
-
if (! NIL_P(dirs)){
|
77
|
-
Check_Type(dirs, T_ARRAY);
|
78
|
-
i = RARRAY_LEN(dirs);
|
79
|
-
gdirs = ALLOCA_N(gchar*, i + 1);
|
80
|
-
for (i = 0; i < i; i++) {
|
81
|
-
if (TYPE(RARRAY_PTR(dirs)[i]) == T_STRING) {
|
82
|
-
gdirs[i] = RVAL2CSTR(RARRAY_PTR(dirs)[i]);
|
83
|
-
}
|
84
|
-
else {
|
85
|
-
gdirs[i] = "";
|
86
|
-
}
|
87
|
-
}
|
88
|
-
gdirs[i] = (gchar*)NULL;
|
89
|
-
}
|
90
|
-
|
91
|
-
gtk_source_style_scheme_manager_set_search_path (_SELF (self), gdirs);
|
92
|
-
return self;
|
93
|
-
}
|
94
|
-
|
95
63
|
/* Method: append_search_path(path)
|
96
64
|
* path: additional style scheme file directory path (string)
|
97
65
|
*
|
@@ -120,47 +88,6 @@ rg_prepend_search_path(VALUE self, VALUE path)
|
|
120
88
|
return self;
|
121
89
|
}
|
122
90
|
|
123
|
-
/* Method: get_search_path
|
124
|
-
* Returns: a list of style scheme files directories (strings) for the given
|
125
|
-
* style scheme manager.
|
126
|
-
*/
|
127
|
-
static VALUE
|
128
|
-
rg_search_path(VALUE self)
|
129
|
-
{
|
130
|
-
VALUE ary;
|
131
|
-
const gchar * const * dirs =
|
132
|
-
gtk_source_style_scheme_manager_get_search_path (_SELF (self));
|
133
|
-
if (!dirs)
|
134
|
-
return Qnil;
|
135
|
-
|
136
|
-
ary = rb_ary_new();
|
137
|
-
while (*dirs){
|
138
|
-
rb_ary_push(ary, CSTR2RVAL(*dirs));
|
139
|
-
dirs++;
|
140
|
-
}
|
141
|
-
return ary;
|
142
|
-
}
|
143
|
-
|
144
|
-
/* Method: scheme_ids
|
145
|
-
* Returns: a list of style scheme ids for the given style scheme manager
|
146
|
-
*/
|
147
|
-
static VALUE
|
148
|
-
rg_scheme_ids(VALUE self)
|
149
|
-
{
|
150
|
-
VALUE ary;
|
151
|
-
const gchar * const * ids =
|
152
|
-
gtk_source_style_scheme_manager_get_scheme_ids (_SELF (self));
|
153
|
-
if (!ids)
|
154
|
-
return Qnil;
|
155
|
-
|
156
|
-
ary = rb_ary_new();
|
157
|
-
while (*ids){
|
158
|
-
rb_ary_push(ary, CSTR2RVAL(*ids));
|
159
|
-
ids++;
|
160
|
-
}
|
161
|
-
return ary;
|
162
|
-
}
|
163
|
-
|
164
91
|
/*
|
165
92
|
* Method: scheme(scheme_id)
|
166
93
|
* scheme_id: a style scheme id (as a string).
|
@@ -202,11 +129,8 @@ Init_gtk_sourcestyleschememanager (VALUE mGtk)
|
|
202
129
|
"SourceStyleSchemeManager", mGtk);
|
203
130
|
|
204
131
|
RG_DEF_METHOD(initialize, 0);
|
205
|
-
RG_DEF_METHOD(set_search_path, 1);
|
206
132
|
RG_DEF_METHOD(append_search_path, 1);
|
207
133
|
RG_DEF_METHOD(prepend_search_path, 1);
|
208
|
-
RG_DEF_METHOD(search_path, 0);
|
209
|
-
RG_DEF_METHOD(scheme_ids, 0);
|
210
134
|
RG_DEF_METHOD(get_scheme, 1);
|
211
135
|
RG_DEF_METHOD(force_rescan, 0);
|
212
136
|
RG_DEF_SMETHOD(default, 0);
|
@@ -143,10 +143,15 @@ static VALUE
|
|
143
143
|
rg_get_mark_category_background(VALUE self, VALUE category)
|
144
144
|
{
|
145
145
|
GdkColor color;
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
146
|
+
gboolean found;
|
147
|
+
found = gtk_source_view_get_mark_category_background(_SELF (self),
|
148
|
+
RVAL2CSTR(category),
|
149
|
+
&color);
|
150
|
+
if (found) {
|
151
|
+
return GDKCOLOR2RVAL(&color);
|
152
|
+
} else {
|
153
|
+
return Qnil;
|
154
|
+
}
|
150
155
|
}
|
151
156
|
|
152
157
|
/*
|
data/lib/1.9/gtksourceview2.so
CHANGED
Binary file
|
data/lib/2.0/gtksourceview2.so
CHANGED
Binary file
|
data/lib/2.1/gtksourceview2.so
CHANGED
Binary file
|
data/lib/gtksourceview2.rb
CHANGED
@@ -12,7 +12,7 @@ vendor_dir = base_dir + "vendor" + "local"
|
|
12
12
|
vendor_bin_dir = vendor_dir + "bin"
|
13
13
|
GLib.prepend_dll_path(vendor_bin_dir)
|
14
14
|
begin
|
15
|
-
major, minor,
|
15
|
+
major, minor, = RUBY_VERSION.split(/\./)
|
16
16
|
require "#{major}.#{minor}/gtksourceview2.so"
|
17
17
|
rescue LoadError
|
18
18
|
require "gtksourceview2.so"
|
data/test/test_source_view.rb
CHANGED
@@ -6,12 +6,13 @@ class TestSourceView < Test::Unit::TestCase
|
|
6
6
|
|
7
7
|
red_rgb = [65535, 0, 0]
|
8
8
|
red_color = Gdk::Color.parse("red")
|
9
|
-
assert_not_equal(red_rgb, view.get_mark_category_background("XXX").to_a)
|
10
9
|
|
11
|
-
view.
|
12
|
-
assert_equal(red_rgb, view.get_mark_category_background("XXX").to_a)
|
10
|
+
assert_nil(view.get_mark_category_background("new-category"))
|
13
11
|
|
14
|
-
view.set_mark_category_background("
|
15
|
-
|
12
|
+
view.set_mark_category_background("new-category", red_color)
|
13
|
+
assert_equal(red_rgb, view.get_mark_category_background("new-category").to_a)
|
14
|
+
|
15
|
+
view.set_mark_category_background("new-category", nil)
|
16
|
+
assert_nil(view.get_mark_category_background("new-category"))
|
16
17
|
end
|
17
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gtksourceview2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME2 Project Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gtk2
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
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.
|
26
|
+
version: 2.2.0
|
27
27
|
description: Ruby/GtkSourceView2 is a Ruby binding of gtksourceview-2.x.
|
28
28
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
29
29
|
executables: []
|