Use @libdir@ instead of @prefix@/lib
[gnome.seed] / examples / broken / browser / browser-find.js
1 // TODO: escape in the text field should hide it, not search more!
2
3 FindBoxType = {
4         parent: Gtk.HBox.type,
5         name: "FindBox",
6         instance_init: function(klass)
7         {
8                 var closeButton = new Gtk.Button();
9                 closeButton.set_image(new Gtk.Image({stock: "gtk-close", 
10                                 icon_size: Gtk.IconSize.MENU}));
11                 closeButton.signal.clicked.connect(
12                         function (button, findBox)
13             {
14                                 findBox.entryBox.text = "";
15                                 findBox.hide();
16             }, this);
17                 closeButton.set_relief(Gtk.ReliefStyle.NONE);
18
19                 var findLabel = new Gtk.Label({label:"Find: "});
20                 this.entryBox = new Gtk.Entry();
21                 this.entryBox.signal.key_release_event.connect(find, this);
22
23                 this.caseSensitive = new Gtk.CheckButton({label:"Match case"});
24 /*              this.caseSensitive.signal.toggled.connect(
25                         function (a,b) 
26             { 
27                                 // BROKEN.
28                                 current_tab().webView.unmark_text_matches();
29                                 find(this, 0, b); 
30                                 return false; 
31                                 },  this);*/
32
33                 this.pack_start(closeButton);
34                 this.pack_start(findLabel);
35                 this.pack_start(this.entryBox, true, true);
36                 this.pack_start(this.caseSensitive, false, false, 10);
37         }};
38
39 FindBox = new GType(FindBoxType);