This file is indexed.

/usr/share/help/fr/gnome-devel-demos/tooltip.js.page is in gnome-devel-docs 3.18.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xi="http://www.w3.org/2001/XInclude" type="guide" style="task" id="tooltip.js" xml:lang="fr">
  <info>
  <title type="text">Tooltip (JavaScript)</title>
    <link type="guide" xref="beginner.js#misc"/>
    <link type="seealso" xref="toolbar.js"/>
    <revision version="0.1" date="2013-06-25" status="review"/>

    <credit type="author copyright">
      <name>Meg Ford</name>
      <email its:translate="no">megford@gnome.org</email>
      <years>2013</years>
    </credit>

    <desc>Ajouter des infobulles à vos éléments graphiques</desc>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Luc Rebert,</mal:name>
      <mal:email>traduc@rebert.name</mal:email>
      <mal:years>2011</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Alain Lojewski,</mal:name>
      <mal:email>allomervan@gmail.com</mal:email>
      <mal:years>2011-2012</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Luc Pionchon</mal:name>
      <mal:email>pionchon.luc@gmail.com</mal:email>
      <mal:years>2011</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Bruno Brouard</mal:name>
      <mal:email>annoa.b@gmail.com</mal:email>
      <mal:years>2011-12</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Luis Menina</mal:name>
      <mal:email>liberforce@freeside.fr</mal:email>
      <mal:years>2014</mal:years>
    </mal:credit>
  </info>

  <title>Infobulle</title>
  <media type="image" mime="image/png" src="media/tooltip.png"/>
  <p>Une barre d'outil avec une infobulle (une image) pour un bouton.</p>
  <note><p>This example builds on the <link xref="toolbar.js">Toolbar</link> example.</p></note>
  <links type="section"/>
    
  <section id="code">
  <title>Code utilisé pour générer cet exemple</title>
    <code mime="application/javascript" style="numbered">//!/usr/bin/gjs

const Gdk = imports.gi.Gdk;
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk; 
const Lang = imports.lang;

const TooltipExample = new Lang.Class ({
    Name: 'Tooltip Example',

    // Create the application 
    _init: function () {
        this.application = new Gtk.Application ({ application_id: 'org.example.jstooltip' });

        // Connect 'activate' and 'startup' signals to the callback functions
        this.application.connect('activate', Lang.bind(this, this._onActivate));
        this.application.connect('startup', Lang.bind(this, this._onStartup));
    },

    // Callback function for 'activate' signal presents windows when active
    _onActivate: function() {
        this.window.present();
    },

    // Callback function for 'startup' signal builds the UI
    _onStartup: function () {
        this._buildUI ();
    },

    // Build the application's UI
    _buildUI: function () {

        // Create the application window
        this.window = new Gtk.ApplicationWindow ({ application: this.application,
                                                   window_position: Gtk.WindowPosition.CENTER,
                                                   title: "Toolbar with Tooltips Example",
                                                   default_width: 400,
                                                   default_height: 200,
                                                   border_width: 10 });

        this.grid = new Gtk.Grid();

        this.toolbar = this._createToolbar();
        this.toolbar.set_hexpand(true);
        this.toolbar.show();

        this.grid.attach(this.toolbar, 0, 0, 1, 1);

        this.window.add(this.grid);

        this._newAction = new Gio.SimpleAction({ name: "new" });
        this._newAction.connect("activate", Lang.bind(this, this._newCallback));
        this.window.add_action(this._newAction);

        this._openAction = new Gio.SimpleAction({ name: "open" });
        this._openAction.connect("activate", Lang.bind(this, this._openCallback));
        this.window.add_action(this._openAction);

        this._undoAction = new Gio.SimpleAction({ name: "undo" });
        this._undoAction.connect("activate", Lang.bind(this, this._undoCallback));
        this.window.add_action(this._undoAction);

        this._fullScreenAction = new Gio.SimpleAction({ name: "fullscreenToggle" });
        this._fullScreenAction.connect("activate", Lang.bind(this, this._fullScreenCallback));
        this.window.add_action(this._fullScreenAction);

        this.window.show_all();
   },

     _createToolbar: function(){
        this.toolbar = new Gtk.Toolbar();
        this.toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);

        // button for the "new" action
        this.newButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW);
        // with a tooltip with a given text        
        this.newButton.set_tooltip_text("Create a new file");
        this.newButton.set_is_important(true);
        this.toolbar.insert(this.newButton, 0);
        this.newButton.show();
        this.newButton.set_action_name("win.new");

        // button for the "open" action
        this.openButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN);
        // with a tooltip with a given text in the Pango markup language        
        this.openButton.set_tooltip_markup("Open an &lt;i&gt;existing&lt;/i&gt; file");
        this.openButton.set_is_important(true);
        this.toolbar.insert(this.openButton, 1);
        this.openButton.show();
        this.openButton.set_action_name("win.open");

        // button for the "undo" action
        this.undoButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO);
        // with a tooltip with an image
        // set true the property "has-tooltip"        
        this.undoButton.set_property("has-tooltip", true);
        // connect to the callback function that for the tooltip
        // with the signal "query-tooltip"
        this.undoButton.connect("query-tooltip", Lang.bind(this, this._undoTooltipCallback));
        this.undoButton.set_is_important(true);
        this.toolbar.insert(this.undoButton, 2);
        this.undoButton.show();
        this.undoButton.set_action_name("win.undo");

        // button for the "fullscreen/leave fullscreen" action
        this.fullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_FULLSCREEN);
        this.fullscreenButton.set_is_important(true);
        this.toolbar.insert(this.fullscreenButton, 3);
        this.fullscreenButton.set_action_name("win.fullscreenToggle");

        return this.toolbar;
    },

    _newCallback: function(action, parameter) {
        print("You clicked \"New\".");
    },

    _openCallback: function(action, parameter) {
        print("You clicked \"Open\".");
    },

    // the callback function for the tooltip of the "undo" button
    _undoTooltipCallback: function(widget, x, y, keyboard_mode, tooltip) {
        // set the text for the tooltip
        tooltip.set_text("Undo your last action");
        // set an icon fot the tooltip
        tooltip.set_icon_from_stock(Gtk.STOCK_UNDO, Gtk.IconSize.MENU);
        // show the tooltip
        return true;
    },

    _undoCallback: function(action, parameter) {
        print("You clicked \"Undo\".");
    },

    _fullScreenCallback: function() {
        if ((this.window.get_window().get_state() &amp; Gdk.WindowState.FULLSCREEN) != 0 ){
            this.fullscreenButton.set_stock_id(Gtk.STOCK_FULLSCREEN);
            this.fullscreenButton.set_tooltip_text("Make your window fullscreen");
            this.window.unfullscreen();
        } else {
            this.fullscreenButton.set_stock_id(Gtk.STOCK_LEAVE_FULLSCREEN);
            this.fullscreenButton.set_tooltip_text("Leave fullscreen");
            this.window.fullscreen();
        }
    }
});

// Run the application
let app = new TooltipExample ();
app.application.run (ARGV);
</code>
  </section>

  <section id="references">
  <title>Références API</title>
    <p>Dans cet exemple, les éléments suivants sont utilisés :</p>
    <list>
      <item><p><link href="http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Tooltip.html">GtkTooltip</link></p></item>
      <item><p><link href="http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Toolbar.html">GtkToolbar</link></p></item>
      <item><p><link href="http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Widget.html">GtkWidget</link></p></item>
      <item><p><link href="http://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html">Stock Items</link></p></item>
    </list>
  </section>
</page>