|
Lines 27-80
ControlDialog<Base>::ControlDialog(LyXVi
Link Here
|
| 27 |
template <class Base> |
27 |
template <class Base> |
| 28 |
void ControlDialog<Base>::show() |
28 |
void ControlDialog<Base>::show() |
| 29 |
{ |
29 |
{ |
| 30 |
if (isBufferDependent() && !bufferIsAvailable()) |
30 |
if (this->isBufferDependent() && !this->bufferIsAvailable()) |
| 31 |
return; |
31 |
return; |
| 32 |
|
32 |
|
| 33 |
connect(); |
33 |
this->connect(); |
| 34 |
|
34 |
|
| 35 |
if (!dialog_built_) { |
35 |
if (!dialog_built_) { |
| 36 |
view().build(); |
36 |
this->view().build(); |
| 37 |
dialog_built_ = true; |
37 |
dialog_built_ = true; |
| 38 |
} |
38 |
} |
| 39 |
|
39 |
|
| 40 |
setParams(); |
40 |
setParams(); |
| 41 |
if (emergency_exit_) { |
41 |
if (this->emergency_exit_) { |
| 42 |
hide(); |
42 |
hide(); |
| 43 |
return; |
43 |
return; |
| 44 |
} |
44 |
} |
| 45 |
|
45 |
|
| 46 |
bc().readOnly(bufferIsReadonly()); |
46 |
this->bc().readOnly(this->bufferIsReadonly()); |
| 47 |
view().show(); |
47 |
this->view().show(); |
| 48 |
|
48 |
|
| 49 |
// The widgets may not be valid, so refresh the button controller |
49 |
// The widgets may not be valid, so refresh the button controller |
| 50 |
bc().refresh(); |
50 |
this->bc().refresh(); |
| 51 |
} |
51 |
} |
| 52 |
|
52 |
|
| 53 |
template <class Base> |
53 |
template <class Base> |
| 54 |
void ControlDialog<Base>::update() |
54 |
void ControlDialog<Base>::update() |
| 55 |
{ |
55 |
{ |
| 56 |
if (isBufferDependent() && !bufferIsAvailable()) |
56 |
if (this->isBufferDependent() && !this->bufferIsAvailable()) |
| 57 |
return; |
57 |
return; |
| 58 |
|
58 |
|
| 59 |
setParams(); |
59 |
setParams(); |
| 60 |
if (emergency_exit_) { |
60 |
if (this->emergency_exit_) { |
| 61 |
hide(); |
61 |
hide(); |
| 62 |
return; |
62 |
return; |
| 63 |
} |
63 |
} |
| 64 |
|
64 |
|
| 65 |
bc().readOnly(bufferIsReadonly()); |
65 |
this->bc().readOnly(this->bufferIsReadonly()); |
| 66 |
view().update(); |
66 |
this->view().update(); |
| 67 |
|
67 |
|
| 68 |
// The widgets may not be valid, so refresh the button controller |
68 |
// The widgets may not be valid, so refresh the button controller |
| 69 |
bc().refresh(); |
69 |
this->bc().refresh(); |
| 70 |
} |
70 |
} |
| 71 |
|
71 |
|
| 72 |
template <class Base> |
72 |
template <class Base> |
| 73 |
void ControlDialog<Base>::hide() |
73 |
void ControlDialog<Base>::hide() |
| 74 |
{ |
74 |
{ |
| 75 |
emergency_exit_ = false; |
75 |
this->emergency_exit_ = false; |
| 76 |
clearParams(); |
76 |
clearParams(); |
| 77 |
|
77 |
|
| 78 |
disconnect(); |
78 |
this->disconnect(); |
| 79 |
view().hide(); |
79 |
this->view().hide(); |
| 80 |
} |
80 |
} |