]> git.lyx.org Git - features.git/blob - src/frontends/gtk/Dialogs.C
Add GTK Log view dialog
[features.git] / src / frontends / gtk / Dialogs.C
1 /**
2  * \file xforms/Dialogs.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Angus Leeming
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "Dialogs.h"
14 #include "Dialog.h"
15
16 #include "Tooltips.h"
17
18 #include "ControlAboutlyx.h"
19 #include "ControlBibtex.h"
20 #include "ControlBox.h"
21 #include "ControlBranch.h"
22 #include "ControlChanges.h"
23 #include "ControlCharacter.h"
24 #include "ControlCitation.h"
25 #include "ControlCommand.h"
26 #include "ControlDocument.h"
27 #include "ControlErrorList.h"
28 #include "ControlERT.h"
29 #include "ControlExternal.h"
30 #include "ControlFloat.h"
31 #include "ControlGraphics.h"
32 #include "ControlInclude.h"
33 #include "ControlLog.h"
34 #include "ControlMath.h"
35 #include "ControlNote.h"
36 #include "ControlParagraph.h"
37 #include "ControlPreamble.h"
38 #include "ControlPrefs.h"
39 #include "ControlPrint.h"
40 #include "ControlRef.h"
41 #include "ControlSearch.h"
42 #include "ControlSendto.h"
43 #include "ControlShowFile.h"
44 #include "ControlSpellchecker.h"
45 #include "ControlTabular.h"
46 #include "ControlTabularCreate.h"
47 #include "ControlTexinfo.h"
48 #include "ControlToc.h"
49 #include "ControlVSpace.h"
50 #include "ControlWrap.h"
51
52 #include "GAboutlyx.h"
53 #include "GText.h"
54 #include "GMathDelim.h"
55 #include "FormBibitem.h"
56 #include "FormBibtex.h"
57 #include "FormBox.h"
58 #include "FormBranch.h"
59 #include "FormChanges.h"
60 #include "GCharacter.h"
61 #include "FormCitation.h"
62 #include "FormDocument.h"
63 #include "GErrorList.h"
64 #include "FormERT.h"
65 #include "FormExternal.h"
66 #include "FormFloat.h"
67 #include "FormGraphics.h"
68 #include "FormInclude.h"
69 #include "GLog.h"
70 #include "GMathPanel.h"
71 #include "FormMathsBitmap.h"
72 #include "GMathsMatrix.h"
73 #include "FormMathsSpace.h"
74 #include "FormMathsStyle.h"
75 #include "FormNote.h"
76 #include "GParagraph.h"
77 #include "FormPreamble.h"
78 #include "FormPreferences.h"
79 #include "GPrint.h"
80 #include "FormRef.h"
81 #include "GSearch.h"
82 #include "FormSendto.h"
83 #include "FormTabular.h"
84 #include "GTexinfo.h"
85 #include "GShowFile.h"
86 #include "GSpellchecker.h"
87 #include "GTableCreate.h"
88 #include "GToc.h"
89 #include "GUrl.h"
90 #include "FormVSpace.h"
91 #include "FormWrap.h"
92
93 #ifdef HAVE_LIBAIKSAURUS
94 #include "ControlThesaurus.h"
95 #include "FormThesaurus.h"
96 #endif
97
98 #include "xformsBC.h"
99 #include "ButtonController.h"
100
101 #include "arrows.xbm"
102 #include "bop.xbm"
103 #include "brel.xbm"
104 #include "deco.xbm"
105 #include "dots.xbm"
106 #include "greek.xbm"
107 #include "misc.xbm"
108 #include "varsz.xbm"
109
110 #include "ams_misc.xbm"
111 #include "ams_arrows.xbm"
112 #include "ams_rel.xbm"
113 #include "ams_nrel.xbm"
114 #include "ams_ops.xbm"
115
116 #include <boost/assert.hpp>
117 #include <vector>
118
119 using std::string;
120
121 using namespace lyx::frontend;
122
123 namespace {
124
125 FormMathsBitmap * createFormBitmap(Dialog & parent, string const & title,
126                                    char const * const * data, int size)
127 {
128         char const * const * const end = data + size;
129         return new FormMathsBitmap(parent, title, std::vector<string>(data, end));
130 }
131
132
133 char const * const dialognames[] = {
134 "aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
135 "citation", "document", "errorlist" , "ert", "external", "file",
136 "findreplace", "float", "graphics", "include", "index", "label", "log",
137 "mathpanel", "mathaccents", "matharrows", "mathoperators", "mathrelations",
138 "mathgreek", "mathmisc", "mathdots", "mathbigoperators", "mathamsmisc",
139 "mathamsarrows", "mathamsrelations", "mathamsnegatedrelations",
140 "mathamsoperators", "mathdelimiter", "mathmatrix", "mathspace", "mathstyle",
141 "note", "paragraph", "preamble", "prefs", "print", "ref", "sendto",
142 "spellchecker", "tabular", "tabularcreate", "texinfo",
143
144 #ifdef HAVE_LIBAIKSAURUS
145 "thesaurus",
146 #endif
147
148 "toc", "url", "vspace", "wrap" };
149
150 char const * const * const end_dialognames =
151         dialognames + (sizeof(dialognames) / sizeof(char *));
152
153 struct cmpCStr {
154         cmpCStr(char const * name) : name_(name) {}
155         bool operator()(char const * other) {
156                 return strcmp(other, name_) == 0;
157         }
158 private:
159         char const * name_;
160 };
161
162 } // namespace anon
163
164
165 bool Dialogs::isValidName(string const & name) const
166 {
167         return std::find_if(dialognames, end_dialognames,
168                             cmpCStr(name.c_str())) != end_dialognames;
169 }
170
171
172 Dialogs::DialogPtr Dialogs::build(string const & name)
173 {
174         BOOST_ASSERT(isValidName(name));
175
176         DialogPtr dialog(new Dialog(lyxview_, name));
177         dialog->bc().view(new xformsBC(dialog->bc()));
178
179         if (name == "aboutlyx") {
180                 dialog->bc().view(new GBC(dialog->bc()));
181                 dialog->setController(new ControlAboutlyx(*dialog));
182                 dialog->setView(new GAboutlyx(*dialog));
183                 dialog->bc().bp(new OkCancelPolicy);
184         } else if (name == "bibitem") {
185                 dialog->setController(new ControlCommand(*dialog, name));
186                 dialog->setView(new FormBibitem(*dialog));
187                 dialog->bc().bp(new OkCancelReadOnlyPolicy);
188         } else if (name == "bibtex") {
189                 dialog->setController(new ControlBibtex(*dialog));
190                 dialog->setView(new FormBibtex(*dialog));
191                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
192         } else if (name == "box") {
193                 dialog->setController(new ControlBox(*dialog));
194                 dialog->setView(new FormBox(*dialog));
195                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
196         } else if (name == "changes") {
197                 dialog->setController(new ControlChanges(*dialog));
198                 dialog->setView(new FormChanges(*dialog));
199                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
200         } else if (name == "character") {
201                 dialog->bc().view(new GBC(dialog->bc()));
202                 dialog->setController(new ControlCharacter(*dialog));
203                 dialog->setView(new GCharacter(*dialog));
204                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
205         } else if (name == "citation") {
206                 dialog->setController(new ControlCitation(*dialog));
207                 dialog->setView(new FormCitation(*dialog));
208                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
209         } else if (name == "document") {
210                 dialog->setController(new ControlDocument(*dialog));
211                 dialog->setView(new FormDocument(*dialog));
212                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
213         } else if (name == "errorlist") {
214                 dialog->bc().view(new GBC(dialog->bc()));
215                 dialog->setController(new ControlErrorList(*dialog));
216                 dialog->setView(new GErrorList(*dialog));
217                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
218         } else if (name == "ert") {
219                 dialog->setController(new ControlERT(*dialog));
220                 dialog->setView(new FormERT(*dialog));
221                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
222         } else if (name == "external") {
223                 dialog->setController(new ControlExternal(*dialog));
224                 dialog->setView(new FormExternal(*dialog));
225                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
226         } else if (name == "file") {
227                 dialog->bc().view(new GBC(dialog->bc()));
228                 dialog->setController(new ControlShowFile(*dialog));
229                 dialog->setView(new GShowFile(*dialog));
230                 dialog->bc().bp(new OkCancelPolicy);
231         } else if (name == "findreplace") {
232                 dialog->bc().view(new GBC(dialog->bc()));
233                 dialog->setController(new ControlSearch(*dialog));
234                 dialog->setView(new GSearch(*dialog));
235                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
236         } else if (name == "float") {
237                 dialog->setController(new ControlFloat(*dialog));
238                 dialog->setView(new FormFloat(*dialog));
239                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
240         } else if (name == "graphics") {
241                 dialog->setController(new ControlGraphics(*dialog));
242                 dialog->setView(new FormGraphics(*dialog));
243                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
244         } else if (name == "include") {
245                 dialog->setController(new ControlInclude(*dialog));
246                 dialog->setView(new FormInclude(*dialog));
247                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
248         } else if (name == "index") {
249                 dialog->bc().view(new GBC(dialog->bc()));
250                 dialog->setController(new ControlCommand(*dialog, name));
251                 dialog->setView(new GText(*dialog,
252                                           _("Index"), _("Keyword:|#K")));
253                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
254         } else if (name == "label") {
255                 dialog->bc().view(new GBC(dialog->bc()));
256                 dialog->setController(new ControlCommand(*dialog, name));
257                 dialog->setView(new GText(*dialog,
258                                           _("Label"), _("Label:|#L")));
259                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
260         } else if (name == "log") {
261                 dialog->bc().view(new GBC(dialog->bc()));
262                 dialog->setController(new ControlLog(*dialog));
263                 dialog->setView(new GLog(*dialog));
264                 dialog->bc().bp(new OkCancelPolicy);
265
266         } else if (name == "mathpanel") {
267                 dialog->bc().view(new GBC(dialog->bc()));
268                 dialog->setController(new ControlMath(*dialog));
269                 dialog->setView(new GMathPanel(*dialog));
270                 dialog->bc().bp(new IgnorantPolicy);
271
272         } else if (name == "mathaccents") {
273                 FormMathsBitmap * bitmap =
274                         createFormBitmap(*dialog, _("Maths Decorations & Accents"),
275                                          latex_deco, nr_latex_deco);
276                 bitmap->addBitmap(
277                         BitmapStore(12, 3, 4, deco1_width, deco1_height, deco1_bits, true));
278                 bitmap->addBitmap(
279                         BitmapStore(10, 4, 3, deco2_width, deco2_height, deco2_bits, true));
280
281                 dialog->setController(new ControlMath(*dialog));
282                 dialog->setView(bitmap);
283                 dialog->bc().bp(new IgnorantPolicy);
284
285         } else if (name == "matharrows") {
286                 FormMathsBitmap * bitmap =
287                         createFormBitmap(*dialog, _("Arrows"), latex_arrow, nr_latex_arrow);
288                 bitmap->addBitmap(
289                         BitmapStore(20, 5, 4, arrow_width,  arrow_height,  arrow_bits, true));
290                 bitmap->addBitmap(
291                         BitmapStore(7,  2, 4, larrow_width, larrow_height, larrow_bits, false));
292                 bitmap->addBitmap(
293                         BitmapStore(4,  2, 2, darrow_width,  darrow_height, darrow_bits, true));
294
295                 dialog->setController(new ControlMath(*dialog));
296                 dialog->setView(bitmap);
297                 dialog->bc().bp(new IgnorantPolicy);
298
299         } else if (name == "mathoperators") {
300                 FormMathsBitmap * bitmap =
301                         createFormBitmap(*dialog, _("Binary Ops"),
302                                          latex_bop, nr_latex_bop);
303                 bitmap->addBitmap(
304                         BitmapStore(31, 4, 8, bop_width, bop_height, bop_bits, true));
305
306                 dialog->setController(new ControlMath(*dialog));
307                 dialog->setView(bitmap);
308                 dialog->bc().bp(new IgnorantPolicy);
309
310         } else if (name == "mathrelations") {
311                 FormMathsBitmap * bitmap =
312                         createFormBitmap(*dialog, _("Binary Relations"),
313                                          latex_brel, nr_latex_brel);
314                 bitmap->addBitmap(
315                         BitmapStore(35, 4, 9, brel_width, brel_height, brel_bits, true));
316
317                 dialog->setController(new ControlMath(*dialog));
318                 dialog->setView(bitmap);
319                 dialog->bc().bp(new IgnorantPolicy);
320
321         } else if (name == "mathgreek") {
322                 FormMathsBitmap * bitmap =
323                         createFormBitmap(*dialog, _("Greek"),
324                                          latex_greek, nr_latex_greek);
325                 bitmap->addBitmap(
326                         BitmapStore(11, 6, 2, Greek_width, Greek_height, Greek_bits, true));
327                 bitmap->addBitmap(
328                         BitmapStore(28, 7, 4, greek_width, greek_height, greek_bits, true));
329
330                 dialog->setController(new ControlMath(*dialog));
331                 dialog->setView(bitmap);
332                 dialog->bc().bp(new IgnorantPolicy);
333
334         } else if (name == "mathmisc") {
335                 FormMathsBitmap * bitmap =
336                         createFormBitmap(*dialog, _("Misc"),
337                                          latex_misc, nr_latex_misc);
338                 bitmap->addBitmap(
339                         BitmapStore(29, 5, 6, misc_width, misc_height, misc_bits, true));
340                 bitmap->addBitmap(
341                         BitmapStore(5, 5, 1, misc4_width, misc4_height, misc4_bits, true));
342                 bitmap->addBitmap(
343                         BitmapStore(6, 3, 2, misc2_width, misc2_height, misc2_bits, false));
344                 bitmap->addBitmap(
345                         BitmapStore(4, 2, 2, misc3_width, misc3_height, misc3_bits, true));
346
347                 dialog->setController(new ControlMath(*dialog));
348                 dialog->setView(bitmap);
349                 dialog->bc().bp(new IgnorantPolicy);
350
351         } else if (name == "mathdots") {
352                 FormMathsBitmap * bitmap =
353                         createFormBitmap(*dialog, _("Dots"),
354                                          latex_dots, nr_latex_dots);
355                 bitmap->addBitmap(
356                         BitmapStore(4, 4, 1, dots_width, dots_height, dots_bits, true));
357
358                 dialog->setController(new ControlMath(*dialog));
359                 dialog->setView(bitmap);
360                 dialog->bc().bp(new IgnorantPolicy);
361
362         } else if (name == "mathbigoperators") {
363                 FormMathsBitmap * bitmap =
364                         createFormBitmap(*dialog, _("Big Operators"),
365                                          latex_varsz, nr_latex_varsz);
366                 bitmap->addBitmap(
367                         BitmapStore(14, 3, 5, varsz_width, varsz_height, varsz_bits, true));
368
369                 dialog->setController(new ControlMath(*dialog));
370                 dialog->setView(bitmap);
371                 dialog->bc().bp(new IgnorantPolicy);
372
373         } else if (name == "mathamsmisc") {
374                 FormMathsBitmap * bitmap =
375                         createFormBitmap(*dialog, _("AMS Misc"),
376                                          latex_ams_misc, nr_latex_ams_misc);
377                 bitmap->addBitmap(
378                         BitmapStore(9, 5, 2, ams1_width, ams1_height, ams1_bits, true));
379                 bitmap->addBitmap(
380                         BitmapStore(26, 3, 9, ams7_width, ams7_height, ams7_bits, true));
381
382                 dialog->setController(new ControlMath(*dialog));
383                 dialog->setView(bitmap);
384                 dialog->bc().bp(new IgnorantPolicy);
385
386         } else if (name == "mathamsarrows") {
387                 FormMathsBitmap * bitmap =
388                         createFormBitmap(*dialog, _("AMS Arrows"),
389                                          latex_ams_arrows, nr_latex_ams_arrows);
390                 bitmap->addBitmap(
391                         BitmapStore(32, 3, 11, ams2_width, ams2_height, ams2_bits, true));
392                 bitmap->addBitmap(
393                         BitmapStore(6, 3, 2, ams3_width, ams3_height, ams3_bits, true));
394
395                 dialog->setController(new ControlMath(*dialog));
396                 dialog->setView(bitmap);
397                 dialog->bc().bp(new IgnorantPolicy);
398
399         } else if (name == "mathamsrelations") {
400                 FormMathsBitmap * bitmap =
401                         createFormBitmap(*dialog, _("AMS Relations"),
402                                          latex_ams_rel, nr_latex_ams_rel);
403                 bitmap->addBitmap(
404                         BitmapStore(66, 6, 11, ams_rel_width, ams_rel_height, ams_rel_bits, true));
405
406                 dialog->setController(new ControlMath(*dialog));
407                 dialog->setView(bitmap);
408                 dialog->bc().bp(new IgnorantPolicy);
409
410         } else if (name == "mathamsnegatedrelations") {
411                 FormMathsBitmap * bitmap =
412                         createFormBitmap(*dialog, _("AMS Negated Rel"),
413                                          latex_ams_nrel, nr_latex_ams_nrel);
414                 bitmap->addBitmap(
415                         BitmapStore(51, 6, 9, ams_nrel_width, ams_nrel_height, ams_nrel_bits, true));
416
417                 dialog->setController(new ControlMath(*dialog));
418                 dialog->setView(bitmap);
419                 dialog->bc().bp(new IgnorantPolicy);
420
421         } else if (name == "mathamsoperators") {
422                 FormMathsBitmap * bitmap =
423                         createFormBitmap(*dialog, _("AMS Operators"),
424                                          latex_ams_ops, nr_latex_ams_ops);
425                 bitmap->addBitmap(
426                         BitmapStore(23, 3, 8, ams_ops_width, ams_ops_height, ams_ops_bits, true));
427
428                 dialog->setController(new ControlMath(*dialog));
429                 dialog->setView(bitmap);
430                 dialog->bc().bp(new IgnorantPolicy);
431
432         } else if (name == "mathdelimiter") {
433                 dialog->bc().view(new GBC(dialog->bc()));
434                 dialog->setController(new ControlMath(*dialog));
435                 dialog->setView(new GMathDelim(*dialog));
436                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
437         } else if (name == "mathmatrix") {
438                 dialog->bc().view(new GBC(dialog->bc()));
439                 dialog->setController(new ControlMath(*dialog));
440                 dialog->setView(new GMathsMatrix(*dialog));
441                 dialog->bc().bp(new OkCancelReadOnlyPolicy);
442         } else if (name == "mathspace") {
443                 dialog->setController(new ControlMath(*dialog));
444                 dialog->setView(new FormMathsSpace(*dialog));
445                 dialog->bc().bp(new IgnorantPolicy);
446         } else if (name == "mathstyle") {
447                 dialog->setController(new ControlMath(*dialog));
448                 dialog->setView(new FormMathsStyle(*dialog));
449                 dialog->bc().bp(new IgnorantPolicy);
450         } else if (name == "note") {
451                 dialog->setController(new ControlNote(*dialog));
452                 dialog->setView(new FormNote(*dialog));
453                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
454         } else if (name == "branch") {
455                 dialog->setController(new ControlBranch(*dialog));
456                 dialog->setView(new FormBranch(*dialog));
457                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
458         } else if (name == "paragraph") {
459                 dialog->bc().view(new GBC(dialog->bc()));
460                 dialog->setController(new ControlParagraph(*dialog));
461                 dialog->setView(new GParagraph(*dialog));
462                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
463         } else if (name == "preamble") {
464                 dialog->setController(new ControlPreamble(*dialog));
465                 dialog->setView(new FormPreamble(*dialog));
466                 dialog->bc().bp(new OkApplyCancelPolicy);
467         } else if (name == "prefs") {
468                 dialog->setController(new ControlPrefs(*dialog));
469                 dialog->setView(new FormPreferences(*dialog));
470                 dialog->bc().bp(new PreferencesPolicy);
471         } else if (name == "print") {
472                 dialog->bc().view(new GBC(dialog->bc()));
473                 dialog->setController(new ControlPrint(*dialog));
474                 dialog->setView(new GPrint(*dialog));
475                 dialog->bc().bp(new OkCancelPolicy);
476         } else if (name == "ref") {
477                 dialog->setController(new ControlRef(*dialog));
478                 dialog->setView(new FormRef(*dialog));
479                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
480         } else if (name == "sendto") {
481                 dialog->setController(new ControlSendto(*dialog));
482                 dialog->setView(new FormSendto(*dialog));
483                 dialog->bc().bp(new OkApplyCancelPolicy);
484         } else if (name == "spellchecker") {
485                 dialog->bc().view(new GBC(dialog->bc()));
486                 dialog->setController(new ControlSpellchecker(*dialog));
487                 dialog->setView(new GSpellchecker(*dialog));
488                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
489         } else if (name == "tabular") {
490                 dialog->setController(new ControlTabular(*dialog));
491                 dialog->setView(new FormTabular(*dialog));
492                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
493         } else if (name == "tabularcreate") {
494                 dialog->bc().view(new GBC(dialog->bc()));
495                 dialog->setController(new ControlTabularCreate(*dialog));
496                 dialog->setView(new GTableCreate(*dialog));
497                 dialog->bc().bp(new IgnorantPolicy);
498         } else if (name == "texinfo") {
499                 dialog->bc().view(new GBC(dialog->bc()));
500                 dialog->setController(new ControlTexinfo(*dialog));
501                 dialog->setView(new GTexinfo(*dialog));
502                 dialog->bc().bp(new OkCancelPolicy);
503 #ifdef HAVE_LIBAIKSAURUS
504         } else if (name == "thesaurus") {
505                 dialog->setController(new ControlThesaurus(*dialog));
506                 dialog->setView(new FormThesaurus(*dialog));
507                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
508 #endif
509         } else if (name == "toc") {
510                 dialog->bc().view(new GBC(dialog->bc()));
511                 dialog->setController(new ControlToc(*dialog));
512                 dialog->setView(new GToc(*dialog));
513                 dialog->bc().bp(new OkCancelPolicy);
514         } else if (name == "url") {
515                 dialog->bc().view(new GBC(dialog->bc()));
516                 dialog->setController(new ControlCommand(*dialog, name));
517                 dialog->setView(new GUrl(*dialog));
518                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
519         } else if (name == "vspace") {
520                 dialog->setController(new ControlVSpace(*dialog));
521                 dialog->setView(new FormVSpace(*dialog));
522                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
523         } else if (name == "wrap") {
524                 dialog->setController(new ControlWrap(*dialog));
525                 dialog->setView(new FormWrap(*dialog));
526                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
527         }
528
529         return dialog;
530 }
531
532
533 void Dialogs::toggleTooltips()
534 {
535         Tooltips::toggleEnabled();
536 }
537
538
539 /// Are the tooltips on or off?
540 bool Dialogs::tooltipsEnabled()
541 {
542         return Tooltips::enabled();
543 }