Ruby GTK3移行後のメインリポジトリ
修訂 | a3534f9cf7e4562a043ee0fbabefe89b65d18b7c (tree) |
---|---|
時間 | 2017-08-12 21:39:53 |
作者 | Shyouzou Sugitani <shy@user...> |
Commiter | Shyouzou Sugitani |
update for Ruby-GNOME2 >= 3.1.2
@@ -1,3 +1,6 @@ | ||
1 | +Sat August 12 2017 Shyouzou Sugitani <shy@users.osdn.me> | |
2 | + * Ruby-GNOME2 3.1.2対応. | |
3 | + | |
1 | 4 | Mon June 26 2017 Shyouzou Sugitani <shy@users.osdn.me> |
2 | 5 | * gemspecを追加. |
3 | 6 |
@@ -1027,7 +1027,7 @@ module Balloon | ||
1027 | 1027 | markup = set_markup(i, @text_buffer[i]) |
1028 | 1028 | end |
1029 | 1029 | update_line_regions(line + 1, new_y) |
1030 | - @layout.set_markup(markup, -1) | |
1030 | + @layout.set_markup(markup) | |
1031 | 1031 | cr.set_source_rgb(@text_normal_color) |
1032 | 1032 | cr.move_to(x, y) |
1033 | 1033 | cr.show_pango_layout(@layout) |
@@ -1071,43 +1071,43 @@ module Balloon | ||
1071 | 1071 | x, y, w, h = @line_regions[n - @lineno] |
1072 | 1072 | if sl == el |
1073 | 1073 | markup = set_markup(n, @text_buffer[n][0, sn]) |
1074 | - @layout.set_markup(markup, -1) | |
1074 | + @layout.set_markup(markup) | |
1075 | 1075 | text_w, text_h = @layout.pixel_size |
1076 | 1076 | x += text_w |
1077 | 1077 | markup = set_markup(n, @text_buffer[n][sn, en]) |
1078 | - @layout.set_markup(markup, -1) | |
1078 | + @layout.set_markup(markup) | |
1079 | 1079 | text_w, text_h = @layout.pixel_size |
1080 | 1080 | w = text_w |
1081 | 1081 | start = sn |
1082 | 1082 | end_ = en |
1083 | 1083 | elsif n == sl |
1084 | 1084 | markup = set_markup(n, @text_buffer[n][0, sn]) |
1085 | - @layout.set_markup(markup, -1) | |
1085 | + @layout.set_markup(markup) | |
1086 | 1086 | text_w, text_h = @layout.pixel_size |
1087 | 1087 | x += text_w |
1088 | 1088 | markup = set_markup(n, @text_buffer[n][sn, @text_buffer.length]) |
1089 | - @layout.set_markup(markup, -1) | |
1089 | + @layout.set_markup(markup) | |
1090 | 1090 | text_w, text_h = @layout.pixel_size |
1091 | 1091 | w = text_w |
1092 | 1092 | start = sn |
1093 | 1093 | end_ = @text_buffer[n].length |
1094 | 1094 | elsif n == el |
1095 | 1095 | markup = set_markup(n, @text_buffer[n][0, en]) |
1096 | - @layout.set_markup(markup, -1) | |
1096 | + @layout.set_markup(markup) | |
1097 | 1097 | text_w, text_h = @layout.pixel_size |
1098 | 1098 | w = text_w |
1099 | 1099 | start = 0 |
1100 | 1100 | end_ = en |
1101 | 1101 | else |
1102 | 1102 | markup = set_markup(n, @text_buffer[n]) |
1103 | - @layout.set_markup(markup, -1) | |
1103 | + @layout.set_markup(markup) | |
1104 | 1104 | text_w, text_h = @layout.pixel_size |
1105 | 1105 | w = text_w |
1106 | 1106 | start = 0 |
1107 | 1107 | end_ = @text_buffer[n].length |
1108 | 1108 | end |
1109 | 1109 | markup = set_markup(n, @text_buffer[n][start, end_]) |
1110 | - @layout.set_markup(markup, -1) | |
1110 | + @layout.set_markup(markup) | |
1111 | 1111 | cr.set_source_rgb(@cursor_color) |
1112 | 1112 | cr.rectangle(x, y, w, h) |
1113 | 1113 | cr.fill() |
@@ -1134,7 +1134,7 @@ module Balloon | ||
1134 | 1134 | x, y, w, h = @line_regions[n - @lineno] |
1135 | 1135 | if n == sl |
1136 | 1136 | markup = set_markup(n, @text_buffer[n][0, sn]) |
1137 | - @layout.set_markup(markup, -1) | |
1137 | + @layout.set_markup(markup) | |
1138 | 1138 | text_w, text_h = @layout.pixel_size |
1139 | 1139 | x += text_w |
1140 | 1140 | end |
@@ -1145,7 +1145,7 @@ module Balloon | ||
1145 | 1145 | else |
1146 | 1146 | markup = set_markup(n, @text_buffer[n]) |
1147 | 1147 | end |
1148 | - @layout.set_markup(markup, -1) | |
1148 | + @layout.set_markup(markup) | |
1149 | 1149 | text_w, text_h = @layout.pixel_size |
1150 | 1150 | w = text_w |
1151 | 1151 | if x <= px and px < (x + w) and y <= py and py < (y + h) |
@@ -1355,7 +1355,7 @@ module Balloon | ||
1355 | 1355 | n = (i + 1) |
1356 | 1356 | show unless @__shown |
1357 | 1357 | markup = set_markup(index, text[p..n-1]) |
1358 | - @layout.set_markup(markup, -1) | |
1358 | + @layout.set_markup(markup) | |
1359 | 1359 | text_width, text_height = @layout.pixel_size |
1360 | 1360 | if text_width > @line_width |
1361 | 1361 | @text_buffer << text[p..i-1] |
@@ -343,7 +343,7 @@ module Pix | ||
343 | 343 | # the pixels method. Temporary use the read_pixel_bytes method and |
344 | 344 | # create another Pixbuf. |
345 | 345 | if is_pnr |
346 | - pixels = pixbuf.read_pixel_bytes | |
346 | + pixels = pixbuf.read_pixel_bytes.to_s | |
347 | 347 | unless pixbuf.has_alpha? |
348 | 348 | r, g, b = pixels[0, 3].bytes |
349 | 349 | pixbuf = pixbuf.add_alpha(true, r, g, b) |
@@ -363,12 +363,12 @@ module Pix | ||
363 | 363 | path = File.join(head, basename + '.pna') |
364 | 364 | if File.exists?(path) |
365 | 365 | pna_pixbuf = pixbuf_new_from_file(path) |
366 | - pix_na = NArray.to_na(pixbuf.read_pixel_bytes, NArray::BYTE) | |
366 | + pix_na = NArray.to_na(pixbuf.read_pixel_bytes.to_s, NArray::BYTE) | |
367 | 367 | pix_na.reshape!(4, pix_na.size / 4) |
368 | 368 | unless pna_pixbuf.has_alpha? |
369 | 369 | pna_pixbuf = pna_pixbuf.add_alpha(false, 0, 0, 0) |
370 | 370 | end |
371 | - pna_na = NArray.to_na(pna_pixbuf.read_pixel_bytes, NArray::BYTE) | |
371 | + pna_na = NArray.to_na(pna_pixbuf.read_pixel_bytes.to_s, NArray::BYTE) | |
372 | 372 | pna_na.reshape!(4, pna_na.size / 4) |
373 | 373 | pix_na[3, true] = pna_na[0, true] |
374 | 374 | pixbuf = GdkPixbuf::Pixbuf.new( |