]>
Commit | Line | Data |
---|---|---|
ef55d90d MB |
1 | diff -urN ruby-gnome2-all-0.16.0/gtkmozembed/extconf.rb ruby-gnome2-all-0.16.0.new/gtkmozembed/extconf.rb |
2 | --- ruby-gnome2-all-0.16.0/gtkmozembed/extconf.rb 2006-12-29 14:17:28.000000000 +0100 | |
3 | +++ ruby-gnome2-all-0.16.0.new/gtkmozembed/extconf.rb 2008-07-08 22:34:51.000000000 +0200 | |
4 | @@ -45,7 +45,7 @@ | |
5 | ||
a7ca994c | 6 | if mozilla_path |
ef55d90d | 7 | # please comment the CFLAGS line if you don't want a default comp_path |
a7ca994c JR |
8 | - $CFLAGS << " -DDEFAULT_MOZILLA_FIVE_HOME='\"#{mozilla_path}\"' " |
9 | + $CFLAGS << " -I/usr/include/xulrunner/gtkembedmoz -DDEFAULT_MOZILLA_FIVE_HOME='\"#{mozilla_path}\"' " | |
10 | $LDFLAGS << " -Wl,-rpath,#{mozilla_path}" | |
ef55d90d MB |
11 | else |
12 | $stderr.puts "${package_id}.pc cannot be found." | |
a7ca994c | 13 | @@ -58,12 +58,12 @@ |
ef55d90d MB |
14 | add_depend_package("glib2", "glib/src", TOPDIR) |
15 | add_depend_package("gtk2", "gtk/src", TOPDIR) | |
16 | ||
a7ca994c JR |
17 | -if have_library("xpcomglue") |
18 | - have_header("gtkmozembed_glue.cpp") or exit 1 | |
19 | - CONFIG['LDSHARED'].gsub!(/\$\(CC\)/, "$(CXX)") | |
20 | -elsif have_library("gtkembedmoz") | |
21 | +if have_library("xul") | |
22 | have_func('gtk_moz_embed_new') or exit 1 | |
23 | have_func('gtk_moz_embed_set_profile_path') or exit 1 | |
24 | +elsif have_library("xpcomglue") | |
25 | + have_header("gtkmozembed_glue.cpp") or exit 1 | |
26 | + CONFIG['LDSHARED'].gsub!(/\$\(CC\)/, "$(CXX)") | |
27 | else | |
28 | exit 1 | |
29 | end | |
ef55d90d MB |
30 | diff -urN ruby-gnome2-all-0.16.0/gtkmozembed/src/rbgtkmozembed.c ruby-gnome2-all-0.16.0.new/gtkmozembed/src/rbgtkmozembed.c |
31 | --- ruby-gnome2-all-0.16.0/gtkmozembed/src/rbgtkmozembed.c 2006-12-29 14:17:28.000000000 +0100 | |
32 | +++ ruby-gnome2-all-0.16.0.new/gtkmozembed/src/rbgtkmozembed.c 2008-07-08 22:33:52.000000000 +0200 | |
33 | @@ -113,7 +113,8 @@ | |
34 | * | |
35 | * path: the mozilla component path (String). | |
36 | * | |
37 | - * You should call this method before the constructor. | |
38 | + * You should call this method before the constructor. It's | |
39 | + * used in gecko-libs 1.8. | |
40 | * | |
41 | * The path should be something like /usr/lib/mozilla or | |
42 | * /usr/lib/mozilla-firefox depending on your installation and | |
43 | @@ -133,6 +134,33 @@ | |
44 | return Qnil; | |
45 | } | |
46 | ||
47 | +/* | |
48 | + * Class method: set_path(path) | |
49 | + * | |
50 | + * path: the mozilla component path (String). | |
51 | + * | |
52 | + * You should call this method before the constructor. This | |
53 | + * function is used in gecko-libs 1.9 instead of the old one, | |
54 | + * set_comp_path(String). | |
55 | + * | |
56 | + * The path should be something like /usr/lib/mozilla or | |
57 | + * /usr/lib/mozilla-firefox depending on your installation and | |
58 | + * distribution. | |
59 | + * | |
60 | + * We call this inside Init_gtkmozembed() and set the value at | |
61 | + * compile time before initializing XPCOM. | |
62 | + * | |
63 | + * Returns: nil. | |
64 | + * | |
65 | + */ | |
66 | +static VALUE | |
67 | +moz_set_path(self, path) | |
68 | + VALUE self, path; | |
69 | +{ | |
70 | + gtk_moz_embed_set_path(RVAL2CSTR(path)); | |
71 | + return Qnil; | |
72 | +} | |
73 | + | |
74 | /* | |
75 | * Method: load_url(url) | |
76 | * | |
77 | @@ -315,6 +343,18 @@ | |
78 | return CSTR2RVAL(title); | |
79 | } | |
80 | ||
81 | + | |
82 | +#ifndef GTK_TYPE_MOZ_EMBED_RELOAD_FLAGS | |
83 | +GtkType gtk_moz_embed_reload_flags_get_type(void); | |
84 | +#define GTK_TYPE_MOZ_EMBED_RELOAD_FLAGS \ | |
85 | + (gtk_moz_embed_reload_flags_get_type()) | |
86 | +#endif | |
87 | +#ifndef GTK_TYPE_MOZ_EMBED_CHROME_FLAGS | |
88 | +GtkType gtk_moz_embed_chrome_flags_get_type(void); | |
89 | +#define GTK_TYPE_MOZ_EMBED_CHROME_FLAGS \ | |
90 | + (gtk_moz_embed_chrome_flags_get_type()) | |
91 | +#endif | |
92 | + | |
93 | /* | |
94 | * Method: reload(flags) | |
95 | * | |
96 | @@ -680,6 +720,8 @@ | |
97 | moz_set_profile_path, 2); | |
98 | rb_define_module_function(moz, "set_comp_path", | |
99 | moz_set_comp_path, 1); | |
100 | + rb_define_module_function(moz, "set_path", | |
101 | + moz_set_path, 1); | |
102 | ||
103 | rb_define_method(moz, "initialize", moz_initialize, 0); | |
104 | rb_define_method(moz, "load_url", moz_load_url, 1); |