gtk2 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -1
- data/ext/gtk2/rbgtk.c +40 -0
- data/ext/gtk2/rbgtktreestore.c +6 -5
- metadata +58 -78
data/Rakefile
CHANGED
data/ext/gtk2/rbgtk.c
CHANGED
@@ -514,6 +514,42 @@ rg_m_check_version_p(G_GNUC_UNUSED VALUE self, VALUE major, VALUE minor, VALUE m
|
|
514
514
|
return CBOOL2RVAL(ret == NULL);
|
515
515
|
}
|
516
516
|
|
517
|
+
#if GTK_CHECK_VERSION(2,14,0)
|
518
|
+
static VALUE
|
519
|
+
rg_m_show_uri(G_GNUC_UNUSED VALUE self, VALUE rb_uri_or_options)
|
520
|
+
{
|
521
|
+
VALUE rb_screen = Qnil;
|
522
|
+
VALUE rb_uri = Qnil;
|
523
|
+
VALUE rb_timestamp = Qnil;
|
524
|
+
GdkScreen *screen = NULL;
|
525
|
+
const gchar *uri = NULL;
|
526
|
+
guint32 timestamp = GDK_CURRENT_TIME;
|
527
|
+
GError *error = NULL;
|
528
|
+
|
529
|
+
if (TYPE(rb_uri_or_options) == T_HASH) {
|
530
|
+
rbg_scan_options(rb_uri_or_options,
|
531
|
+
"screen", &rb_screen,
|
532
|
+
"uri", &rb_uri,
|
533
|
+
"timestamp", &rb_timestamp,
|
534
|
+
NULL);
|
535
|
+
} else {
|
536
|
+
rb_uri = rb_uri_or_options;
|
537
|
+
}
|
538
|
+
|
539
|
+
screen = RVAL2GOBJ(rb_screen);
|
540
|
+
uri = StringValueCStr(rb_uri);
|
541
|
+
if (!NIL_P(rb_timestamp)) {
|
542
|
+
timestamp = NUM2UINT(rb_timestamp);
|
543
|
+
}
|
544
|
+
|
545
|
+
if (!gtk_show_uri(screen, uri, timestamp, &error)) {
|
546
|
+
RAISE_GERROR(error);
|
547
|
+
}
|
548
|
+
|
549
|
+
return self;
|
550
|
+
}
|
551
|
+
#endif
|
552
|
+
|
517
553
|
/*
|
518
554
|
* Init
|
519
555
|
*/
|
@@ -567,5 +603,9 @@ Init_gtk_gtk(void)
|
|
567
603
|
RG_DEF_MODFUNC(check_version, 3);
|
568
604
|
RG_DEF_MODFUNC_P(check_version, 3);
|
569
605
|
|
606
|
+
#if GTK_CHECK_VERSION(2,14,0)
|
607
|
+
RG_DEF_MODFUNC(show_uri, 1);
|
608
|
+
#endif
|
609
|
+
|
570
610
|
rb_define_const(RG_TARGET_NAMESPACE, "PRIORITY_RESIZE", INT2FIX(GTK_PRIORITY_RESIZE));
|
571
611
|
}
|
data/ext/gtk2/rbgtktreestore.c
CHANGED
@@ -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-2012 Ruby-GNOME2 Project Team
|
4
4
|
* Copyright (C) 2002-2006 Masao Mutoh
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
@@ -306,16 +306,17 @@ rg_reorder(VALUE self, VALUE rbparent, VALUE rbnew_order)
|
|
306
306
|
{
|
307
307
|
GtkTreeStore *store = _SELF(self);
|
308
308
|
GtkTreeIter *parent = RVAL2GTKTREEITER(rbparent);
|
309
|
-
gint
|
309
|
+
gint n_children = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store),
|
310
|
+
parent);
|
310
311
|
long n;
|
311
312
|
gint *new_order = RVAL2GINTS(rbnew_order, n);
|
312
313
|
|
313
|
-
if (n !=
|
314
|
+
if (n != n_children) {
|
314
315
|
g_free(new_order);
|
315
316
|
|
316
317
|
rb_raise(rb_eArgError,
|
317
|
-
"new order array must contain same number of elements as the number of
|
318
|
-
n,
|
318
|
+
"new order array must contain the same number of elements as the number of children in the parent: %ld != %d",
|
319
|
+
n, n_children);
|
319
320
|
}
|
320
321
|
|
321
322
|
gtk_tree_store_reorder(store, parent, new_order);
|
metadata
CHANGED
@@ -1,79 +1,71 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: gtk2
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.5
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
- 4
|
10
|
-
version: 1.1.4
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- The Ruby-GNOME2 Project Team
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-08-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: atk
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 1
|
31
|
-
- 1
|
32
|
-
- 4
|
33
|
-
version: 1.1.4
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.1.5
|
34
22
|
type: :runtime
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: pango
|
38
23
|
prerelease: false
|
39
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
25
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.1.5
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: pango
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 1.1.5
|
50
38
|
type: :runtime
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: gdk_pixbuf2
|
54
39
|
prerelease: false
|
55
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
56
41
|
none: false
|
57
|
-
requirements:
|
58
|
-
- -
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.1.5
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: gdk_pixbuf2
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.1.5
|
66
54
|
type: :runtime
|
67
|
-
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.1.5
|
68
62
|
description: Ruby/GTK2 is a Ruby binding of GTK+-2.x.
|
69
63
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
70
64
|
executables: []
|
71
|
-
|
72
|
-
extensions:
|
65
|
+
extensions:
|
73
66
|
- ext/gtk2/extconf.rb
|
74
67
|
extra_rdoc_files: []
|
75
|
-
|
76
|
-
files:
|
68
|
+
files:
|
77
69
|
- README
|
78
70
|
- Rakefile
|
79
71
|
- extconf.rb
|
@@ -540,38 +532,26 @@ files:
|
|
540
532
|
- test/test_gdk.rb
|
541
533
|
homepage: http://ruby-gnome2.sourceforge.jp/
|
542
534
|
licenses: []
|
543
|
-
|
544
535
|
post_install_message:
|
545
536
|
rdoc_options: []
|
546
|
-
|
547
|
-
require_paths:
|
537
|
+
require_paths:
|
548
538
|
- lib
|
549
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
539
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
550
540
|
none: false
|
551
|
-
requirements:
|
552
|
-
- -
|
553
|
-
- !ruby/object:Gem::Version
|
554
|
-
hash: 61
|
555
|
-
segments:
|
556
|
-
- 1
|
557
|
-
- 8
|
558
|
-
- 5
|
541
|
+
requirements:
|
542
|
+
- - ! '>='
|
543
|
+
- !ruby/object:Gem::Version
|
559
544
|
version: 1.8.5
|
560
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
545
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
561
546
|
none: false
|
562
|
-
requirements:
|
563
|
-
- -
|
564
|
-
- !ruby/object:Gem::Version
|
565
|
-
|
566
|
-
segments:
|
567
|
-
- 0
|
568
|
-
version: "0"
|
547
|
+
requirements:
|
548
|
+
- - ! '>='
|
549
|
+
- !ruby/object:Gem::Version
|
550
|
+
version: '0'
|
569
551
|
requirements: []
|
570
|
-
|
571
552
|
rubyforge_project:
|
572
|
-
rubygems_version: 1.8.
|
553
|
+
rubygems_version: 1.8.23
|
573
554
|
signing_key:
|
574
555
|
specification_version: 3
|
575
556
|
summary: Ruby/GTK2 is a Ruby binding of GTK+-2.x.
|
576
557
|
test_files: []
|
577
|
-
|