]>
Commit | Line | Data |
---|---|---|
71030823 | 1 | diff -urN psi-0.12.orig/options/default.xml psi-0.12/options/default.xml |
2 | --- psi-0.12.orig/options/default.xml 2008-05-13 03:57:35.000000000 +0200 | |
3 | +++ psi-0.12/options/default.xml 2008-08-09 22:01:13.000000000 +0200 | |
4 | @@ -214,6 +214,12 @@ | |
5 | <last-used-save-path type="QString"></last-used-save-path> | |
6 | <look> | |
7 | <colors> | |
8 | + <chat> | |
9 | + <incoming-messages-color type="QColor" >#0000ff</incoming-messages-color> | |
10 | + <outgoing-messages-color type="QColor" >#ff0000</outgoing-messages-color> | |
11 | + <spooled-messages-color type="QColor" >#008000</spooled-messages-color> | |
12 | + <system-messages-color type="QColor" >#00a000</system-messages-color> | |
13 | + </chat> | |
14 | <contactlist> | |
15 | <background type="QColor">#ffffff</background> | |
16 | <grouping> | |
17 | @@ -232,6 +238,12 @@ | |
18 | </status> | |
19 | <status-messages type="QColor">#808080</status-messages> | |
20 | </contactlist> | |
21 | + <groupchat> | |
22 | + <alert-messages-color type="QColor" >#ff0000</alert-messages-color> | |
23 | + <default-nick-color type="QColor" >#000000</default-nick-color> | |
24 | + <spooled-messages-color type="QColor" >#008000</spooled-messages-color> | |
25 | + <system-messages-color type="QColor" >#00a000</system-messages-color> | |
26 | + </groupchat> | |
27 | <muc> | |
28 | <nick-colors type="QStringList" > | |
29 | <item>Blue</item> | |
30 | diff -urN psi-0.12.orig/src/groupchatdlg.cpp psi-0.12/src/groupchatdlg.cpp | |
31 | --- psi-0.12.orig/src/groupchatdlg.cpp 2008-03-19 21:59:10.000000000 +0100 | |
32 | +++ psi-0.12/src/groupchatdlg.cpp 2008-08-09 18:34:42.000000000 +0200 | |
33 | @@ -1207,7 +1207,7 @@ | |
34 | bool doInsert = t.date() != lastMsgTime_.date(); | |
35 | lastMsgTime_ = t; | |
36 | if (doInsert) { | |
37 | - QString color = "#00A000"; | |
38 | + QString color = PsiOptions::instance()->getOption("options.ui.look.colors.groupchat.system-messages-color").toString(); | |
39 | ui_.log->appendText(QString("<font color=\"%1\">*** %2</font>").arg(color).arg(t.date().toString(Qt::ISODate))); | |
40 | } | |
41 | } | |
42 | @@ -1226,7 +1226,7 @@ | |
43 | ||
44 | updateLastMsgTime(time); | |
45 | QString timestr = ui_.log->formatTimeStamp(time); | |
46 | - ui_.log->appendText(QString("<font color=\"#00A000\">[%1]").arg(timestr) + QString(" *** %1</font>").arg(Qt::escape(str))); | |
47 | + ui_.log->appendText(QString("<font color=\"" + PsiOptions::instance()->getOption("options.ui.look.colors.groupchat.system-messages-color").toString() + "\">[%1]").arg(timestr) + QString(" *** %1</font>").arg(Qt::escape(str))); | |
48 | ||
49 | if(alert) | |
50 | doAlert(); | |
51 | @@ -1249,7 +1249,7 @@ | |
52 | QStringList nickColors = PsiOptions::instance()->getOption("options.ui.look.colors.muc.nick-colors").toStringList(); | |
53 | ||
54 | if(!PsiOptions::instance()->getOption("options.ui.muc.use-nick-coloring").toBool() || nickColors.empty()) { | |
55 | - return "#000000"; | |
56 | + return PsiOptions::instance()->getOption("options.ui.look.colors.groupchat.default-nick-color").toString(); | |
57 | } | |
58 | else if(sender == -1 || nickColors.size() == 1) { | |
59 | return nickColors[nickColors.size()-1]; | |
60 | @@ -1280,12 +1280,12 @@ | |
61 | nickcolor = getNickColor(who); | |
62 | textcolor = ui_.log->palette().active().text().name(); | |
63 | if(alert) { | |
64 | - textcolor = "#FF0000"; | |
65 | + textcolor = PsiOptions::instance()->getOption("options.ui.look.colors.groupchat.alert-messages-color").toString(); | |
66 | alerttagso = "<b>"; | |
67 | alerttagsc = "</b>"; | |
68 | } | |
69 | if(m.spooled()) | |
70 | - nickcolor = "#008000"; //color = "#008000"; | |
71 | + nickcolor = PsiOptions::instance()->getOption("options.ui.look.colors.groupchat.spooled-messages-color").toString(); | |
72 | ||
73 | QString timestr = ui_.log->formatTimeStamp(m.timeStamp()); | |
74 | ||
75 | diff -urN psi-0.12.orig/src/options/opt_appearance.cpp psi-0.12/src/options/opt_appearance.cpp | |
76 | --- psi-0.12.orig/src/options/opt_appearance.cpp 2008-01-12 03:48:36.000000000 +0100 | |
77 | +++ psi-0.12/src/options/opt_appearance.cpp 2008-08-09 21:09:33.000000000 +0200 | |
78 | @@ -17,6 +17,7 @@ | |
79 | #include <qlineedit.h> | |
80 | ||
81 | #include "ui_opt_appearance.h" | |
82 | +#include "ui_opt_appearance_fonts.h" | |
83 | #include "ui_opt_appearance_misc.h" | |
84 | #include "psioptions.h" | |
85 | ||
86 | @@ -27,6 +28,12 @@ | |
87 | OptAppearanceUI() : QWidget() { setupUi(this); } | |
88 | }; | |
89 | ||
90 | +class OptAppearanceFontsUI : public QWidget, public Ui::OptAppearanceFonts | |
91 | +{ | |
92 | +public: | |
93 | + OptAppearanceFontsUI() : QWidget() { setupUi(this); } | |
94 | +}; | |
95 | + | |
96 | class OptAppearanceMiscUI : public QWidget, public Ui::OptAppearanceMisc | |
97 | { | |
98 | public: | |
99 | @@ -72,6 +79,7 @@ | |
100 | OptionsTabAppearance::OptionsTabAppearance(QObject *parent) : MetaOptionsTab(parent, "appearance", "", tr("Appearance"), tr("Psi's Appearance"), "psi/appearance") | |
101 | { | |
102 | addTab( new OptionsTabAppearanceGeneral(this) ); | |
103 | + addTab( new OptionsTabAppearanceFonts(this) ); | |
104 | addTab( new OptionsTabIconsetEmoticons(this) ); | |
105 | addTab( new OptionsTabIconsetRoster(this) ); | |
106 | addTab( new OptionsTabIconsetSystem(this) ); | |
107 | @@ -135,21 +143,18 @@ | |
108 | } | |
109 | ||
110 | //---------------------------------------------------------------------------- | |
111 | -// OptionsTabAppearanceGeneral: Fonts & Colours | |
112 | +// OptionsTabAppearanceGeneral: Colours | |
113 | //---------------------------------------------------------------------------- | |
114 | ||
115 | OptionsTabAppearanceGeneral::OptionsTabAppearanceGeneral(QObject *parent) | |
116 | -: OptionsTab(parent, "appearance_general", "", tr("Fonts && Colors"), tr("Fonts && Color Settings")) | |
117 | +: OptionsTab(parent, "appearance_general", "", tr("Colors"), tr("Color Settings")) | |
118 | { | |
119 | w = 0; | |
120 | - bg_font = 0; | |
121 | bg_color = 0; | |
122 | } | |
123 | ||
124 | OptionsTabAppearanceGeneral::~OptionsTabAppearanceGeneral() | |
125 | { | |
126 | - if ( bg_font ) | |
127 | - delete bg_font; | |
128 | if ( bg_color ) | |
129 | delete bg_color; | |
130 | } | |
131 | @@ -175,33 +180,6 @@ | |
132 | w = new OptAppearanceUI(); | |
133 | OptAppearanceUI *d = (OptAppearanceUI *)w; | |
134 | ||
135 | - le_font[0] = d->le_fRoster; | |
136 | - le_font[1] = d->le_fMessage; | |
137 | - le_font[2] = d->le_fChat; | |
138 | - le_font[3] = d->le_fPopup; | |
139 | - | |
140 | - bg_font = new QButtonGroup; | |
141 | - bg_font->insert(d->pb_fRoster); | |
142 | - bg_font->insert(d->pb_fMessage); | |
143 | - bg_font->insert(d->pb_fChat); | |
144 | - bg_font->insert(d->pb_fPopup); | |
145 | - connect(bg_font, SIGNAL(buttonClicked(QAbstractButton*)), SLOT(chooseFont(QAbstractButton*))); | |
146 | - | |
147 | - QWhatsThis::add(le_font[0], | |
148 | - tr("Specifies the font style for the main window.")); | |
149 | - QWhatsThis::add(le_font[1], | |
150 | - tr("Specifies the font style for message windows.")); | |
151 | - QWhatsThis::add(le_font[2], | |
152 | - tr("Specifies the font style for chat windows.")); | |
153 | - QWhatsThis::add(le_font[3], | |
154 | - tr("Specifies the font style for popup windows.")); | |
155 | - QWhatsThis::add(d->pb_fRoster, | |
156 | - tr("Selects a font for the roster window using the font selection dialog.")); | |
157 | - QWhatsThis::add(d->pb_fMessage, | |
158 | - tr("Selects a font for message windows using the font selection dialog.")); | |
159 | - QWhatsThis::add(d->pb_fChat, | |
160 | - tr("Selects a font for chat windows using the font selection dialog.")); | |
161 | - | |
162 | bg_color = new QButtonGroup; | |
163 | bg_color->insert(d->pb_cOnline); | |
164 | bg_color->insert(d->pb_cOffline); | |
165 | @@ -214,6 +192,15 @@ | |
166 | bg_color->insert(d->pb_cListBack); | |
167 | bg_color->insert(d->pb_cAnimFront); | |
168 | bg_color->insert(d->pb_cAnimBack); | |
169 | + bg_color->insert(d->pb_cChatSys); | |
170 | + bg_color->insert(d->pb_cChatSpool); | |
171 | + bg_color->insert(d->pb_cChatTo); | |
172 | + bg_color->insert(d->pb_cChatFrom); | |
173 | + bg_color->insert(d->pb_cGChatAlert); | |
174 | + bg_color->insert(d->pb_cGChatSys); | |
175 | + bg_color->insert(d->pb_cGChatSpool); | |
176 | + bg_color->insert(d->pb_cGChatNick); | |
177 | + | |
178 | bg_color->insert(d->pb_cStatus); | |
179 | connect(bg_color, SIGNAL(buttonClicked(QAbstractButton*)), SLOT(chooseColor(QAbstractButton*))); | |
180 | ||
181 | @@ -238,6 +225,22 @@ | |
182 | tr("Specifies the foreground animation color for nicks.")); | |
183 | QWhatsThis::add(d->pb_cAnimBack, | |
184 | tr("Specifies the background animation color for nicks.")); | |
185 | + QWhatsThis::add(d->pb_cChatSys, | |
186 | + tr("Specifies the color for system chat messages.")); | |
187 | + QWhatsThis::add(d->pb_cChatSpool, | |
188 | + tr("Specifies the color for spooled chat messages.")); | |
189 | + QWhatsThis::add(d->pb_cChatTo, | |
190 | + tr("Specifies the nick color for sent chat messages.")); | |
191 | + QWhatsThis::add(d->pb_cChatFrom, | |
192 | + tr("Specifies the nick color for recieved chat messages.")); | |
193 | + QWhatsThis::add(d->pb_cGChatAlert, | |
194 | + tr("Specifies the color for alert groupchat messages.")); | |
195 | + QWhatsThis::add(d->pb_cGChatSys, | |
196 | + tr("Specifies the color for system groupchat messages.")); | |
197 | + QWhatsThis::add(d->pb_cGChatSpool, | |
198 | + tr("Specifies the color for spooled groupchat messages.")); | |
199 | + QWhatsThis::add(d->pb_cGChatNick, | |
200 | + tr("Specifies the default nick color for groupchat messages.")); | |
201 | ||
202 | // Avatars | |
203 | //QWhatsThis::add(d->ck_avatarsChatdlg, | |
204 | @@ -265,11 +268,6 @@ | |
205 | OptAppearanceUI *d = (OptAppearanceUI *)w; | |
206 | //LEGOPTS.avatarsChatdlgEnabled = d->ck_avatarsChatdlg->isChecked(); // Avatars | |
207 | ||
208 | - PsiOptions::instance()->setOption("options.ui.look.font.contactlist", d->le_fRoster->fontName()); | |
209 | - PsiOptions::instance()->setOption("options.ui.look.font.message", d->le_fMessage->fontName()); | |
210 | - PsiOptions::instance()->setOption("options.ui.look.font.chat", d->le_fChat->fontName()); | |
211 | - PsiOptions::instance()->setOption("options.ui.look.font.passive-popup", d->le_fPopup->fontName()); | |
212 | - | |
213 | PsiOptions::instance()->setOption("options.ui.look.colors.contactlist.status.online", getColor(d->pb_cOnline)); | |
214 | PsiOptions::instance()->setOption("options.ui.look.colors.contactlist.status.offline", getColor(d->pb_cOffline)); | |
215 | PsiOptions::instance()->setOption("options.ui.look.colors.contactlist.status.away", getColor(d->pb_cAway)); | |
216 | @@ -281,6 +279,14 @@ | |
217 | PsiOptions::instance()->setOption("options.ui.look.colors.contactlist.background", getColor(d->pb_cListBack)); | |
218 | PsiOptions::instance()->setOption("options.ui.look.contactlist.status-change-animation.color1", getColor(d->pb_cAnimFront)); | |
219 | PsiOptions::instance()->setOption("options.ui.look.contactlist.status-change-animation.color2", getColor(d->pb_cAnimBack)); | |
220 | + PsiOptions::instance()->setOption("options.ui.look.colors.chat.system-messages-color", getColor(d->pb_cChatSys)); | |
221 | + PsiOptions::instance()->setOption("options.ui.look.colors.chat.spooled-messages-color", getColor(d->pb_cChatSpool)); | |
222 | + PsiOptions::instance()->setOption("options.ui.look.colors.chat.outgoing-messages-color", getColor(d->pb_cChatTo)); | |
223 | + PsiOptions::instance()->setOption("options.ui.look.colors.chat.incoming-messages-color", getColor(d->pb_cChatFrom)); | |
224 | + PsiOptions::instance()->setOption("options.ui.look.colors.groupchat.alert-messages-color", getColor(d->pb_cGChatAlert)); | |
225 | + PsiOptions::instance()->setOption("options.ui.look.colors.groupchat.system-messages-color", getColor(d->pb_cGChatSys)); | |
226 | + PsiOptions::instance()->setOption("options.ui.look.colors.groupchat.spooled-messages-color", getColor(d->pb_cGChatSpool)); | |
227 | + PsiOptions::instance()->setOption("options.ui.look.colors.groupchat.default-nick-color", getColor(d->pb_cGChatNick)); | |
228 | PsiOptions::instance()->setOption("options.ui.look.colors.contactlist.status-messages", getColor(d->pb_cStatus)); | |
229 | } | |
230 | ||
231 | @@ -298,11 +304,6 @@ | |
232 | OptAppearanceUI *d = (OptAppearanceUI *)w; | |
233 | //d->ck_avatarsChatdlg->setChecked( LEGOPTS.avatarsChatdlgEnabled ); // Avatars | |
234 | ||
235 | - d->le_fRoster->setFont(PsiOptions::instance()->getOption("options.ui.look.font.contactlist").toString()); | |
236 | - d->le_fMessage->setFont(PsiOptions::instance()->getOption("options.ui.look.font.message").toString()); | |
237 | - d->le_fChat->setFont(PsiOptions::instance()->getOption("options.ui.look.font.chat").toString()); | |
238 | - d->le_fPopup->setFont(PsiOptions::instance()->getOption("options.ui.look.font.passive-popup").toString()); | |
239 | - | |
240 | restoreColor(d->pb_cOnline, PsiOptions::instance()->getOption("options.ui.look.colors.contactlist.status.online").value<QColor>()); | |
241 | restoreColor(d->pb_cOffline, PsiOptions::instance()->getOption("options.ui.look.colors.contactlist.status.offline").value<QColor>()); | |
242 | restoreColor(d->pb_cAway, PsiOptions::instance()->getOption("options.ui.look.colors.contactlist.status.away").value<QColor>()); | |
243 | @@ -314,6 +315,14 @@ | |
244 | restoreColor(d->pb_cListBack, PsiOptions::instance()->getOption("options.ui.look.colors.contactlist.background").value<QColor>()); | |
245 | restoreColor(d->pb_cAnimFront, PsiOptions::instance()->getOption("options.ui.look.contactlist.status-change-animation.color1").value<QColor>()); | |
246 | restoreColor(d->pb_cAnimBack, PsiOptions::instance()->getOption("options.ui.look.contactlist.status-change-animation.color2").value<QColor>()); | |
247 | + restoreColor(d->pb_cChatSys, PsiOptions::instance()->getOption("options.ui.look.colors.chat.system-messages-color").value<QColor>()); | |
248 | + restoreColor(d->pb_cChatSpool, PsiOptions::instance()->getOption("options.ui.look.colors.chat.spooled-messages-color").value<QColor>()); | |
249 | + restoreColor(d->pb_cChatTo, PsiOptions::instance()->getOption("options.ui.look.colors.chat.outgoing-messages-color").value<QColor>()); | |
250 | + restoreColor(d->pb_cChatFrom, PsiOptions::instance()->getOption("options.ui.look.colors.chat.incoming-messages-color").value<QColor>()); | |
251 | + restoreColor(d->pb_cGChatAlert, PsiOptions::instance()->getOption("options.ui.look.colors.groupchat.alert-messages-color").value<QColor>()); | |
252 | + restoreColor(d->pb_cGChatSys, PsiOptions::instance()->getOption("options.ui.look.colors.groupchat.system-messages-color").value<QColor>()); | |
253 | + restoreColor(d->pb_cGChatSpool, PsiOptions::instance()->getOption("options.ui.look.colors.groupchat.spooled-messages-color").value<QColor>()); | |
254 | + restoreColor(d->pb_cGChatNick, PsiOptions::instance()->getOption("options.ui.look.colors.groupchat.default-nick-color").value<QColor>()); | |
255 | restoreColor(d->pb_cStatus, PsiOptions::instance()->getOption("options.ui.look.colors.contactlist.status-messages").value<QColor>()); | |
256 | } | |
257 | ||
258 | @@ -331,26 +331,6 @@ | |
259 | parentWidget = parentDialog; | |
260 | } | |
261 | ||
262 | -void OptionsTabAppearanceGeneral::chooseFont(QAbstractButton* button) | |
263 | -{ | |
264 | - bool ok; | |
265 | - QFont font; | |
266 | - int x = (bg_font->buttons()).indexOf(button); | |
267 | - font.fromString( le_font[x]->fontName() ); | |
268 | - | |
269 | - // ensure we don't use the new native font dialog on mac with Qt 4.5, | |
270 | - // since it was broken last we checked (qt task #252000) | |
271 | -#if QT_VERSION >= 0x040500 | |
272 | - QString fnt = QFontDialog::getFont(&ok, font, parentWidget, QString(), QFontDialog::DontUseNativeDialog).toString(); | |
273 | -#else | |
274 | - QString fnt = QFontDialog::getFont(&ok, font, parentWidget).toString(); | |
275 | -#endif | |
276 | - le_font[x]->setFont(fnt); | |
277 | - | |
278 | - if(ok) | |
279 | - emit dataChanged(); | |
280 | -} | |
281 | - | |
282 | void OptionsTabAppearanceGeneral::chooseColor(QAbstractButton* button) | |
283 | { | |
284 | QColor c; | |
285 | @@ -352,3 +347,106 @@ | |
286 | emit dataChanged(); | |
287 | } | |
288 | } | |
289 | + | |
290 | +//---------------------------------------------------------------------------- | |
291 | +// OptionsTabAppearanceFonts: Fonts | |
292 | +//---------------------------------------------------------------------------- | |
293 | + | |
294 | +OptionsTabAppearanceFonts::OptionsTabAppearanceFonts(QObject *parent) | |
295 | +: OptionsTab(parent, "appearance_general", "", tr("Fonts"), tr("Fonts")) | |
296 | +{ | |
297 | + w = 0; | |
298 | + bg_font = 0; | |
299 | +} | |
300 | + | |
301 | +OptionsTabAppearanceFonts::~OptionsTabAppearanceFonts() | |
302 | +{ | |
303 | + if ( bg_font ) | |
304 | + delete bg_font; | |
305 | +} | |
306 | + | |
307 | +QWidget *OptionsTabAppearanceFonts::widget() | |
308 | +{ | |
309 | + if ( w ) | |
310 | + return 0; | |
311 | + | |
312 | + w = new OptAppearanceFontsUI(); | |
313 | + OptAppearanceFontsUI *d = (OptAppearanceFontsUI *)w; | |
314 | + | |
315 | + le_font[0] = d->le_fRoster; | |
316 | + le_font[1] = d->le_fMessage; | |
317 | + le_font[2] = d->le_fChat; | |
318 | + le_font[3] = d->le_fPopup; | |
319 | + | |
320 | + bg_font = new QButtonGroup; | |
321 | + bg_font->insert(d->pb_fRoster); | |
322 | + bg_font->insert(d->pb_fMessage); | |
323 | + bg_font->insert(d->pb_fChat); | |
324 | + bg_font->insert(d->pb_fPopup); | |
325 | + connect(bg_font, SIGNAL(buttonClicked(QAbstractButton*)), SLOT(chooseFont(QAbstractButton*))); | |
326 | + | |
327 | + QWhatsThis::add(le_font[0], | |
328 | + tr("Specifies the font style for the main window.")); | |
329 | + QWhatsThis::add(le_font[1], | |
330 | + tr("Specifies the font style for message windows.")); | |
331 | + QWhatsThis::add(le_font[2], | |
332 | + tr("Specifies the font style for chat windows.")); | |
333 | + QWhatsThis::add(le_font[3], | |
334 | + tr("Specifies the font style for popup windows.")); | |
335 | + QWhatsThis::add(d->pb_fRoster, | |
336 | + tr("Selects a font for the roster window using the font selection dialog.")); | |
337 | + QWhatsThis::add(d->pb_fMessage, | |
338 | + tr("Selects a font for message windows using the font selection dialog.")); | |
339 | + QWhatsThis::add(d->pb_fChat, | |
340 | + tr("Selects a font for chat windows using the font selection dialog.")); | |
341 | + | |
342 | + return w; | |
343 | +} | |
344 | + | |
345 | + | |
346 | +void OptionsTabAppearanceFonts::applyOptions() | |
347 | +{ | |
348 | + if ( !w ) | |
349 | + return; | |
350 | + | |
351 | + OptAppearanceFontsUI *d = (OptAppearanceFontsUI *)w; | |
352 | + //LEGOPTS.avatarsChatdlgEnabled = d->ck_avatarsChatdlg->isChecked(); // Avatars | |
353 | + | |
354 | + PsiOptions::instance()->setOption("options.ui.look.font.contactlist", d->le_fRoster->fontName()); | |
355 | + PsiOptions::instance()->setOption("options.ui.look.font.message", d->le_fMessage->fontName()); | |
356 | + PsiOptions::instance()->setOption("options.ui.look.font.chat", d->le_fChat->fontName()); | |
357 | + PsiOptions::instance()->setOption("options.ui.look.font.passive-popup", d->le_fPopup->fontName()); | |
358 | +} | |
359 | + | |
360 | +void OptionsTabAppearanceFonts::restoreOptions() | |
361 | +{ | |
362 | + if ( !w ) | |
363 | + return; | |
364 | + | |
365 | + OptAppearanceFontsUI *d = (OptAppearanceFontsUI *)w; | |
366 | + //d->ck_avatarsChatdlg->setChecked( LEGOPTS.avatarsChatdlgEnabled ); // Avatars | |
367 | + | |
368 | + d->le_fRoster->setFont(PsiOptions::instance()->getOption("options.ui.look.font.contactlist").toString()); | |
369 | + d->le_fMessage->setFont(PsiOptions::instance()->getOption("options.ui.look.font.message").toString()); | |
370 | + d->le_fChat->setFont(PsiOptions::instance()->getOption("options.ui.look.font.chat").toString()); | |
371 | + d->le_fPopup->setFont(PsiOptions::instance()->getOption("options.ui.look.font.passive-popup").toString()); | |
372 | +} | |
373 | + | |
374 | +void OptionsTabAppearanceFonts::setData(PsiCon *, QWidget *parentDialog) | |
375 | +{ | |
376 | + parentWidget = parentDialog; | |
377 | +} | |
378 | + | |
379 | +void OptionsTabAppearanceFonts::chooseFont(QAbstractButton* button) | |
380 | +{ | |
381 | + bool ok; | |
382 | + QFont font; | |
383 | + int x = (bg_font->buttons()).indexOf(button); | |
384 | + font.fromString( le_font[x]->fontName() ); | |
385 | + | |
386 | + QString fnt = QFontDialog::getFont(&ok, font, parentWidget).toString(); | |
387 | + le_font[x]->setFont(fnt); | |
388 | + | |
389 | + if(ok) | |
390 | + emit dataChanged(); | |
391 | +} | |
392 | diff -urN psi-0.12.orig/src/options/opt_appearance_fonts.ui psi-0.12/src/options/opt_appearance_fonts.ui | |
393 | --- psi-0.12.orig/src/options/opt_appearance_fonts.ui 1970-01-01 01:00:00.000000000 +0100 | |
394 | +++ psi-0.12/src/options/opt_appearance_fonts.ui 2008-08-09 18:34:42.000000000 +0200 | |
395 | @@ -0,0 +1,142 @@ | |
396 | +<ui version="4.0" > | |
397 | + <author></author> | |
398 | + <comment></comment> | |
399 | + <exportmacro></exportmacro> | |
400 | + <class>OptAppearanceFonts</class> | |
401 | + <widget class="QWidget" name="OptAppearanceFonts" > | |
402 | + <property name="geometry" > | |
403 | + <rect> | |
404 | + <x>0</x> | |
405 | + <y>0</y> | |
406 | + <width>402</width> | |
407 | + <height>184</height> | |
408 | + </rect> | |
409 | + </property> | |
410 | + <property name="windowTitle" > | |
411 | + <string>OptAppearanceFontsUI</string> | |
412 | + </property> | |
413 | + <layout class="QVBoxLayout" > | |
414 | + <property name="margin" > | |
415 | + <number>9</number> | |
416 | + </property> | |
417 | + <property name="spacing" > | |
418 | + <number>6</number> | |
419 | + </property> | |
420 | + <item> | |
421 | + <widget class="QGroupBox" name="groupBox12" > | |
422 | + <property name="title" > | |
423 | + <string>Fonts</string> | |
424 | + </property> | |
425 | + <layout class="QGridLayout" > | |
426 | + <property name="margin" > | |
427 | + <number>8</number> | |
428 | + </property> | |
429 | + <property name="spacing" > | |
430 | + <number>6</number> | |
431 | + </property> | |
432 | + <item row="0" column="0" > | |
433 | + <widget class="QLabel" name="tl_fRoster" > | |
434 | + <property name="text" > | |
435 | + <string>Roster</string> | |
436 | + </property> | |
437 | + </widget> | |
438 | + </item> | |
439 | + <item row="1" column="0" > | |
440 | + <widget class="QLabel" name="tl_fMessage" > | |
441 | + <property name="text" > | |
442 | + <string>Message</string> | |
443 | + </property> | |
444 | + </widget> | |
445 | + </item> | |
446 | + <item row="2" column="0" > | |
447 | + <widget class="QLabel" name="tl_fChat" > | |
448 | + <property name="enabled" > | |
449 | + <bool>true</bool> | |
450 | + </property> | |
451 | + <property name="text" > | |
452 | + <string>Chat</string> | |
453 | + </property> | |
454 | + </widget> | |
455 | + </item> | |
456 | + <item row="3" column="0" > | |
457 | + <widget class="QLabel" name="tl_fPopup" > | |
458 | + <property name="text" > | |
459 | + <string>Popup</string> | |
460 | + </property> | |
461 | + </widget> | |
462 | + </item> | |
463 | + <item row="0" column="1" colspan="3" > | |
464 | + <widget class="FontLabel" name="le_fRoster" /> | |
465 | + </item> | |
466 | + <item row="1" column="1" colspan="3" > | |
467 | + <widget class="FontLabel" name="le_fMessage" /> | |
468 | + </item> | |
469 | + <item row="2" column="1" colspan="3" > | |
470 | + <widget class="FontLabel" name="le_fChat" /> | |
471 | + </item> | |
472 | + <item row="3" column="1" colspan="3" > | |
473 | + <widget class="FontLabel" name="le_fPopup" /> | |
474 | + </item> | |
475 | + <item row="0" column="4" > | |
476 | + <widget class="QPushButton" name="pb_fRoster" > | |
477 | + <property name="text" > | |
478 | + <string>Choose</string> | |
479 | + </property> | |
480 | + </widget> | |
481 | + </item> | |
482 | + <item row="1" column="4" > | |
483 | + <widget class="QPushButton" name="pb_fMessage" > | |
484 | + <property name="text" > | |
485 | + <string>Choose</string> | |
486 | + </property> | |
487 | + </widget> | |
488 | + </item> | |
489 | + <item row="2" column="4" > | |
490 | + <widget class="QPushButton" name="pb_fChat" > | |
491 | + <property name="enabled" > | |
492 | + <bool>true</bool> | |
493 | + </property> | |
494 | + <property name="text" > | |
495 | + <string>Choose</string> | |
496 | + </property> | |
497 | + </widget> | |
498 | + </item> | |
499 | + <item row="3" column="4" > | |
500 | + <widget class="QPushButton" name="pb_fPopup" > | |
501 | + <property name="enabled" > | |
502 | + <bool>true</bool> | |
503 | + </property> | |
504 | + <property name="text" > | |
505 | + <string>Choose</string> | |
506 | + </property> | |
507 | + </widget> | |
508 | + </item> | |
509 | + </layout> | |
510 | + </widget> | |
511 | + </item> | |
512 | + </layout> | |
513 | + </widget> | |
514 | + <layoutdefault spacing="6" margin="11" /> | |
515 | + <pixmapfunction></pixmapfunction> | |
516 | + <customwidgets> | |
517 | + <customwidget> | |
518 | + <class>FontLabel</class> | |
519 | + <extends></extends> | |
520 | + <header>opt_appearance.h</header> | |
521 | + <container>0</container> | |
522 | + <pixmap></pixmap> | |
523 | + </customwidget> | |
524 | + </customwidgets> | |
525 | + <tabstops> | |
526 | + <tabstop>le_fRoster</tabstop> | |
527 | + <tabstop>pb_fRoster</tabstop> | |
528 | + <tabstop>le_fMessage</tabstop> | |
529 | + <tabstop>pb_fMessage</tabstop> | |
530 | + <tabstop>le_fChat</tabstop> | |
531 | + <tabstop>pb_fChat</tabstop> | |
532 | + <tabstop>le_fPopup</tabstop> | |
533 | + <tabstop>pb_fPopup</tabstop> | |
534 | + </tabstops> | |
535 | + <resources/> | |
536 | + <connections/> | |
537 | +</ui> | |
538 | diff -urN psi-0.12.orig/src/options/opt_appearance.h psi-0.12/src/options/opt_appearance.h | |
539 | --- psi-0.12.orig/src/options/opt_appearance.h 2008-01-12 01:45:25.000000000 +0100 | |
540 | +++ psi-0.12/src/options/opt_appearance.h 2008-08-09 18:34:42.000000000 +0200 | |
541 | @@ -65,11 +65,29 @@ | |
542 | private slots: | |
543 | void setData(PsiCon *, QWidget *); | |
544 | void chooseColor(QAbstractButton* button); | |
545 | - void chooseFont(QAbstractButton* button); | |
546 | ||
547 | private: | |
548 | QWidget *w, *parentWidget; | |
549 | QButtonGroup *bg_color; | |
550 | +}; | |
551 | + | |
552 | +class OptionsTabAppearanceFonts : public OptionsTab | |
553 | +{ | |
554 | + Q_OBJECT | |
555 | +public: | |
556 | + OptionsTabAppearanceFonts(QObject *parent); | |
557 | + ~OptionsTabAppearanceFonts(); | |
558 | + | |
559 | + QWidget *widget(); | |
560 | + void applyOptions(); | |
561 | + void restoreOptions(); | |
562 | + | |
563 | +private slots: | |
564 | + void setData(PsiCon *, QWidget *); | |
565 | + void chooseFont(QAbstractButton* button); | |
566 | + | |
567 | +private: | |
568 | + QWidget *w, *parentWidget; | |
569 | FontLabel *le_font[4]; | |
570 | QButtonGroup *bg_font; | |
571 | }; | |
572 | diff -urN psi-0.12.orig/src/options/opt_appearance.ui psi-0.12/src/options/opt_appearance.ui | |
573 | --- psi-0.12.orig/src/options/opt_appearance.ui 2007-05-07 20:00:07.000000000 +0200 | |
574 | +++ psi-0.12/src/options/opt_appearance.ui 2008-08-09 18:34:42.000000000 +0200 | |
575 | @@ -8,8 +8,8 @@ | |
576 | <rect> | |
577 | <x>0</x> | |
578 | <y>0</y> | |
579 | - <width>402</width> | |
580 | - <height>333</height> | |
581 | + <width>474</width> | |
582 | + <height>310</height> | |
583 | </rect> | |
584 | </property> | |
585 | <property name="windowTitle" > | |
586 | @@ -34,63 +34,99 @@ | |
587 | <property name="spacing" > | |
588 | <number>6</number> | |
589 | </property> | |
590 | - <item row="0" column="3" > | |
591 | + <item row="0" column="0" > | |
592 | + <widget class="QLabel" name="tl_cProfileFore" > | |
593 | + <property name="text" > | |
594 | + <string>Account heading foreground:</string> | |
595 | + </property> | |
596 | + </widget> | |
597 | + </item> | |
598 | + <item row="1" column="0" > | |
599 | + <widget class="QLabel" name="tl_cProfileBack" > | |
600 | + <property name="text" > | |
601 | + <string>Account heading background:</string> | |
602 | + </property> | |
603 | + </widget> | |
604 | + </item> | |
605 | + <item row="2" column="0" > | |
606 | + <widget class="QLabel" name="tl_cGroupFore" > | |
607 | + <property name="text" > | |
608 | + <string>Group heading foreground:</string> | |
609 | + </property> | |
610 | + </widget> | |
611 | + </item> | |
612 | + <item row="3" column="0" > | |
613 | + <widget class="QLabel" name="tl_cGroupBack" > | |
614 | + <property name="text" > | |
615 | + <string>Group heading background:</string> | |
616 | + </property> | |
617 | + </widget> | |
618 | + </item> | |
619 | + <item row="4" column="0" > | |
620 | + <widget class="QLabel" name="tl_cAnimFront" > | |
621 | + <property name="text" > | |
622 | + <string>Nick animation foreground</string> | |
623 | + </property> | |
624 | + </widget> | |
625 | + </item> | |
626 | + <item row="5" column="0" > | |
627 | + <widget class="QLabel" name="tl_cAnimBack" > | |
628 | + <property name="text" > | |
629 | + <string>Nick animation background:</string> | |
630 | + </property> | |
631 | + </widget> | |
632 | + </item> | |
633 | + <item row="6" column="0" > | |
634 | <widget class="QLabel" name="tl_cOnline" > | |
635 | <property name="text" > | |
636 | <string>Online contacts:</string> | |
637 | </property> | |
638 | </widget> | |
639 | </item> | |
640 | - <item row="1" column="3" > | |
641 | + <item row="7" column="0" > | |
642 | <widget class="QLabel" name="TextLabel1_2" > | |
643 | <property name="text" > | |
644 | <string>Away contacts:</string> | |
645 | </property> | |
646 | </widget> | |
647 | </item> | |
648 | - <item row="2" column="3" > | |
649 | + <item row="8" column="0" > | |
650 | <widget class="QLabel" name="tl_cDND" > | |
651 | <property name="text" > | |
652 | <string>DND contacts:</string> | |
653 | </property> | |
654 | </widget> | |
655 | </item> | |
656 | - <item row="3" column="3" > | |
657 | + <item row="9" column="0" > | |
658 | <widget class="QLabel" name="tl_cOffline" > | |
659 | <property name="text" > | |
660 | <string>Offline contacts:</string> | |
661 | </property> | |
662 | </widget> | |
663 | </item> | |
664 | - <item row="3" column="2" > | |
665 | - <spacer> | |
666 | - <property name="orientation" > | |
667 | - <enum>Qt::Horizontal</enum> | |
668 | + <item row="0" column="1" > | |
669 | + <widget class="QToolButton" name="pb_cProfileFore" > | |
670 | + <property name="sizePolicy" > | |
671 | + <sizepolicy> | |
672 | + <hsizetype>0</hsizetype> | |
673 | + <vsizetype>0</vsizetype> | |
674 | + <horstretch>0</horstretch> | |
675 | + <verstretch>0</verstretch> | |
676 | + </sizepolicy> | |
677 | </property> | |
678 | - <property name="sizeHint" > | |
679 | + <property name="maximumSize" > | |
680 | <size> | |
681 | - <width>111</width> | |
682 | + <width>20</width> | |
683 | <height>20</height> | |
684 | </size> | |
685 | </property> | |
686 | - </spacer> | |
687 | - </item> | |
688 | - <item row="4" column="3" > | |
689 | - <widget class="QLabel" name="tl_cListBack" > | |
690 | - <property name="text" > | |
691 | - <string>Contact list background:</string> | |
692 | - </property> | |
693 | - </widget> | |
694 | - </item> | |
695 | - <item row="5" column="3" > | |
696 | - <widget class="QLabel" name="tl_cStatus" > | |
697 | <property name="text" > | |
698 | - <string>Status messages:</string> | |
699 | + <string/> | |
700 | </property> | |
701 | </widget> | |
702 | </item> | |
703 | - <item row="0" column="4" > | |
704 | - <widget class="QToolButton" name="pb_cOnline" > | |
705 | + <item row="1" column="1" > | |
706 | + <widget class="QToolButton" name="pb_cProfileBack" > | |
707 | <property name="sizePolicy" > | |
708 | <sizepolicy> | |
709 | <hsizetype>0</hsizetype> | |
710 | @@ -110,8 +146,8 @@ | |
711 | </property> | |
712 | </widget> | |
713 | </item> | |
714 | - <item row="1" column="4" > | |
715 | - <widget class="QToolButton" name="pb_cAway" > | |
716 | + <item row="2" column="1" > | |
717 | + <widget class="QToolButton" name="pb_cGroupFore" > | |
718 | <property name="sizePolicy" > | |
719 | <sizepolicy> | |
720 | <hsizetype>0</hsizetype> | |
721 | @@ -131,22 +167,29 @@ | |
722 | </property> | |
723 | </widget> | |
724 | </item> | |
725 | - <item row="1" column="0" > | |
726 | - <widget class="QLabel" name="tl_cProfileBack" > | |
727 | - <property name="text" > | |
728 | - <string>Account heading background:</string> | |
729 | + <item row="3" column="1" > | |
730 | + <widget class="QToolButton" name="pb_cGroupBack" > | |
731 | + <property name="sizePolicy" > | |
732 | + <sizepolicy> | |
733 | + <hsizetype>0</hsizetype> | |
734 | + <vsizetype>0</vsizetype> | |
735 | + <horstretch>0</horstretch> | |
736 | + <verstretch>0</verstretch> | |
737 | + </sizepolicy> | |
738 | + </property> | |
739 | + <property name="maximumSize" > | |
740 | + <size> | |
741 | + <width>20</width> | |
742 | + <height>20</height> | |
743 | + </size> | |
744 | </property> | |
745 | - </widget> | |
746 | - </item> | |
747 | - <item row="3" column="0" > | |
748 | - <widget class="QLabel" name="tl_cGroupBack" > | |
749 | <property name="text" > | |
750 | - <string>Group heading background:</string> | |
751 | + <string/> | |
752 | </property> | |
753 | </widget> | |
754 | </item> | |
755 | - <item row="5" column="1" > | |
756 | - <widget class="QToolButton" name="pb_cAnimBack" > | |
757 | + <item row="4" column="1" > | |
758 | + <widget class="QToolButton" name="pb_cAnimFront" > | |
759 | <property name="sizePolicy" > | |
760 | <sizepolicy> | |
761 | <hsizetype>0</hsizetype> | |
762 | @@ -166,8 +209,8 @@ | |
763 | </property> | |
764 | </widget> | |
765 | </item> | |
766 | - <item row="1" column="1" > | |
767 | - <widget class="QToolButton" name="pb_cProfileBack" > | |
768 | + <item row="5" column="1" > | |
769 | + <widget class="QToolButton" name="pb_cAnimBack" > | |
770 | <property name="sizePolicy" > | |
771 | <sizepolicy> | |
772 | <hsizetype>0</hsizetype> | |
773 | @@ -187,8 +230,8 @@ | |
774 | </property> | |
775 | </widget> | |
776 | </item> | |
777 | - <item row="3" column="1" > | |
778 | - <widget class="QToolButton" name="pb_cGroupBack" > | |
779 | + <item row="6" column="1" > | |
780 | + <widget class="QToolButton" name="pb_cOnline" > | |
781 | <property name="sizePolicy" > | |
782 | <sizepolicy> | |
783 | <hsizetype>0</hsizetype> | |
784 | @@ -208,8 +251,8 @@ | |
785 | </property> | |
786 | </widget> | |
787 | </item> | |
788 | - <item row="0" column="1" > | |
789 | - <widget class="QToolButton" name="pb_cProfileFore" > | |
790 | + <item row="7" column="1" > | |
791 | + <widget class="QToolButton" name="pb_cAway" > | |
792 | <property name="sizePolicy" > | |
793 | <sizepolicy> | |
794 | <hsizetype>0</hsizetype> | |
795 | @@ -229,8 +272,8 @@ | |
796 | </property> | |
797 | </widget> | |
798 | </item> | |
799 | - <item row="2" column="1" > | |
800 | - <widget class="QToolButton" name="pb_cGroupFore" > | |
801 | + <item row="8" column="1" > | |
802 | + <widget class="QToolButton" name="pb_cDND" > | |
803 | <property name="sizePolicy" > | |
804 | <sizepolicy> | |
805 | <hsizetype>0</hsizetype> | |
806 | @@ -250,8 +293,8 @@ | |
807 | </property> | |
808 | </widget> | |
809 | </item> | |
810 | - <item row="4" column="1" > | |
811 | - <widget class="QToolButton" name="pb_cAnimFront" > | |
812 | + <item row="9" column="1" > | |
813 | + <widget class="QToolButton" name="pb_cOffline" > | |
814 | <property name="sizePolicy" > | |
815 | <sizepolicy> | |
816 | <hsizetype>0</hsizetype> | |
817 | @@ -271,36 +314,91 @@ | |
818 | </property> | |
819 | </widget> | |
820 | </item> | |
821 | - <item row="4" column="0" > | |
822 | - <widget class="QLabel" name="tl_cAnimFront" > | |
823 | + <item row="3" column="2" > | |
824 | + <spacer> | |
825 | + <property name="orientation" > | |
826 | + <enum>Qt::Horizontal</enum> | |
827 | + </property> | |
828 | + <property name="sizeHint" > | |
829 | + <size> | |
830 | + <width>111</width> | |
831 | + <height>20</height> | |
832 | + </size> | |
833 | + </property> | |
834 | + </spacer> | |
835 | + </item> | |
836 | + <item row="0" column="3" > | |
837 | + <widget class="QLabel" name="tl_cListBack" > | |
838 | <property name="text" > | |
839 | - <string>Nick animation foreground:</string> | |
840 | + <string>Contact list background:</string> | |
841 | </property> | |
842 | </widget> | |
843 | </item> | |
844 | - <item row="5" column="0" > | |
845 | - <widget class="QLabel" name="tl_cAnimBack" > | |
846 | + <item row="1" column="3" > | |
847 | + <widget class="QLabel" name="tl_cStatus" > | |
848 | <property name="text" > | |
849 | - <string>Nick animation background:</string> | |
850 | + <string>Status messages:</string> | |
851 | </property> | |
852 | </widget> | |
853 | </item> | |
854 | - <item row="0" column="0" > | |
855 | - <widget class="QLabel" name="tl_cProfileFore" > | |
856 | + <item row="2" column="3" > | |
857 | + <widget class="QLabel" name="tl_cChatSys" > | |
858 | <property name="text" > | |
859 | - <string>Account heading foreground:</string> | |
860 | + <string>System chat messages:</string> | |
861 | </property> | |
862 | </widget> | |
863 | </item> | |
864 | - <item row="2" column="0" > | |
865 | - <widget class="QLabel" name="tl_cGroupFore" > | |
866 | + <item row="3" column="3" > | |
867 | + <widget class="QLabel" name="tl_cChatSpool" > | |
868 | <property name="text" > | |
869 | - <string>Group heading foreground:</string> | |
870 | + <string>Spooled chat messages:</string> | |
871 | </property> | |
872 | </widget> | |
873 | </item> | |
874 | - <item row="2" column="4" > | |
875 | - <widget class="QToolButton" name="pb_cDND" > | |
876 | + <item row="4" column="3" > | |
877 | + <widget class="QLabel" name="tl_cChatTo" > | |
878 | + <property name="text" > | |
879 | + <string>Outgoing chat message nick:</string> | |
880 | + </property> | |
881 | + </widget> | |
882 | + </item> | |
883 | + <item row="5" column="3" > | |
884 | + <widget class="QLabel" name="tl_cChatFrom" > | |
885 | + <property name="text" > | |
886 | + <string>Incoming chat message nick:</string> | |
887 | + </property> | |
888 | + </widget> | |
889 | + </item> | |
890 | + <item row="6" column="3" > | |
891 | + <widget class="QLabel" name="tl_cGChatAler" > | |
892 | + <property name="text" > | |
893 | + <string>Groupchat alert messages:</string> | |
894 | + </property> | |
895 | + </widget> | |
896 | + </item> | |
897 | + <item row="7" column="3" > | |
898 | + <widget class="QLabel" name="tl_cGChatSys" > | |
899 | + <property name="text" > | |
900 | + <string>Groupchat system messages:</string> | |
901 | + </property> | |
902 | + </widget> | |
903 | + </item> | |
904 | + <item row="8" column="3" > | |
905 | + <widget class="QLabel" name="tl_cGChatSpool" > | |
906 | + <property name="text" > | |
907 | + <string>Groupchat spooled messages:</string> | |
908 | + </property> | |
909 | + </widget> | |
910 | + </item> | |
911 | + <item row="9" column="3" > | |
912 | + <widget class="QLabel" name="tl_cGChatNick" > | |
913 | + <property name="text" > | |
914 | + <string>Groupchat non-colored nicks:</string> | |
915 | + </property> | |
916 | + </widget> | |
917 | + </item> | |
918 | + <item row="0" column="4" > | |
919 | + <widget class="QToolButton" name="pb_cListBack" > | |
920 | <property name="sizePolicy" > | |
921 | <sizepolicy> | |
922 | <hsizetype>0</hsizetype> | |
923 | @@ -320,8 +418,8 @@ | |
924 | </property> | |
925 | </widget> | |
926 | </item> | |
927 | - <item row="3" column="4" > | |
928 | - <widget class="QToolButton" name="pb_cOffline" > | |
929 | + <item row="1" column="4" > | |
930 | + <widget class="QToolButton" name="pb_cStatus" > | |
931 | <property name="sizePolicy" > | |
932 | <sizepolicy> | |
933 | <hsizetype>0</hsizetype> | |
934 | @@ -341,8 +439,8 @@ | |
935 | </property> | |
936 | </widget> | |
937 | </item> | |
938 | - <item row="4" column="4" > | |
939 | - <widget class="QToolButton" name="pb_cListBack" > | |
940 | + <item row="2" column="4" > | |
941 | + <widget class="QToolButton" name="pb_cChatSys" > | |
942 | <property name="sizePolicy" > | |
943 | <sizepolicy> | |
944 | <hsizetype>0</hsizetype> | |
945 | @@ -362,8 +460,8 @@ | |
946 | </property> | |
947 | </widget> | |
948 | </item> | |
949 | - <item row="5" column="4" > | |
950 | - <widget class="QToolButton" name="pb_cStatus" > | |
951 | + <item row="3" column="4" > | |
952 | + <widget class="QToolButton" name="pb_cChatSpool" > | |
953 | <property name="sizePolicy" > | |
954 | <sizepolicy> | |
955 | <hsizetype>0</hsizetype> | |
956 | @@ -383,98 +481,132 @@ | |
957 | </property> | |
958 | </widget> | |
959 | </item> | |
960 | - </layout> | |
961 | - </widget> | |
962 | - </item> | |
963 | - <item> | |
964 | - <widget class="QGroupBox" name="groupBox12" > | |
965 | - <property name="title" > | |
966 | - <string>Fonts</string> | |
967 | - </property> | |
968 | - <layout class="QGridLayout" > | |
969 | - <property name="margin" > | |
970 | - <number>8</number> | |
971 | - </property> | |
972 | - <property name="spacing" > | |
973 | - <number>6</number> | |
974 | - </property> | |
975 | - <item row="2" column="1" colspan="3" > | |
976 | - <widget class="FontLabel" name="le_fChat" /> | |
977 | - </item> | |
978 | - <item row="2" column="0" > | |
979 | - <widget class="QLabel" name="tl_fChat" > | |
980 | - <property name="enabled" > | |
981 | - <bool>true</bool> | |
982 | + <item row="4" column="4" > | |
983 | + <widget class="QToolButton" name="pb_cChatTo" > | |
984 | + <property name="sizePolicy" > | |
985 | + <sizepolicy> | |
986 | + <hsizetype>0</hsizetype> | |
987 | + <vsizetype>0</vsizetype> | |
988 | + <horstretch>0</horstretch> | |
989 | + <verstretch>0</verstretch> | |
990 | + </sizepolicy> | |
991 | </property> | |
992 | - <property name="text" > | |
993 | - <string>Chat:</string> | |
994 | + <property name="maximumSize" > | |
995 | + <size> | |
996 | + <width>20</width> | |
997 | + <height>20</height> | |
998 | + </size> | |
999 | </property> | |
1000 | - </widget> | |
1001 | - </item> | |
1002 | - <item row="1" column="0" > | |
1003 | - <widget class="QLabel" name="tl_fMessage" > | |
1004 | <property name="text" > | |
1005 | - <string>Message:</string> | |
1006 | + <string/> | |
1007 | </property> | |
1008 | </widget> | |
1009 | </item> | |
1010 | - <item row="1" column="4" > | |
1011 | - <widget class="QPushButton" name="pb_fMessage" > | |
1012 | - <property name="text" > | |
1013 | - <string>Choose...</string> | |
1014 | + <item row="5" column="4" > | |
1015 | + <widget class="QToolButton" name="pb_cChatFrom" > | |
1016 | + <property name="sizePolicy" > | |
1017 | + <sizepolicy> | |
1018 | + <hsizetype>0</hsizetype> | |
1019 | + <vsizetype>0</vsizetype> | |
1020 | + <horstretch>0</horstretch> | |
1021 | + <verstretch>0</verstretch> | |
1022 | + </sizepolicy> | |
1023 | </property> | |
1024 | - </widget> | |
1025 | - </item> | |
1026 | - <item row="2" column="4" > | |
1027 | - <widget class="QPushButton" name="pb_fChat" > | |
1028 | - <property name="enabled" > | |
1029 | - <bool>true</bool> | |
1030 | + <property name="maximumSize" > | |
1031 | + <size> | |
1032 | + <width>20</width> | |
1033 | + <height>20</height> | |
1034 | + </size> | |
1035 | </property> | |
1036 | <property name="text" > | |
1037 | - <string>Choose...</string> | |
1038 | + <string/> | |
1039 | </property> | |
1040 | </widget> | |
1041 | </item> | |
1042 | - <item row="3" column="4" > | |
1043 | - <widget class="QPushButton" name="pb_fPopup" > | |
1044 | - <property name="enabled" > | |
1045 | - <bool>true</bool> | |
1046 | + <item row="6" column="4" > | |
1047 | + <widget class="QToolButton" name="pb_cGChatAlert" > | |
1048 | + <property name="sizePolicy" > | |
1049 | + <sizepolicy> | |
1050 | + <hsizetype>0</hsizetype> | |
1051 | + <vsizetype>0</vsizetype> | |
1052 | + <horstretch>0</horstretch> | |
1053 | + <verstretch>0</verstretch> | |
1054 | + </sizepolicy> | |
1055 | + </property> | |
1056 | + <property name="maximumSize" > | |
1057 | + <size> | |
1058 | + <width>20</width> | |
1059 | + <height>20</height> | |
1060 | + </size> | |
1061 | </property> | |
1062 | <property name="text" > | |
1063 | - <string>Choose...</string> | |
1064 | + <string/> | |
1065 | </property> | |
1066 | </widget> | |
1067 | </item> | |
1068 | - <item row="0" column="4" > | |
1069 | - <widget class="QPushButton" name="pb_fRoster" > | |
1070 | + <item row="7" column="4" > | |
1071 | + <widget class="QToolButton" name="pb_cGChatSys" > | |
1072 | + <property name="sizePolicy" > | |
1073 | + <sizepolicy> | |
1074 | + <hsizetype>0</hsizetype> | |
1075 | + <vsizetype>0</vsizetype> | |
1076 | + <horstretch>0</horstretch> | |
1077 | + <verstretch>0</verstretch> | |
1078 | + </sizepolicy> | |
1079 | + </property> | |
1080 | + <property name="maximumSize" > | |
1081 | + <size> | |
1082 | + <width>20</width> | |
1083 | + <height>20</height> | |
1084 | + </size> | |
1085 | + </property> | |
1086 | <property name="text" > | |
1087 | - <string>Choose...</string> | |
1088 | + <string/> | |
1089 | </property> | |
1090 | </widget> | |
1091 | </item> | |
1092 | - <item row="0" column="0" > | |
1093 | - <widget class="QLabel" name="tl_fRoster" > | |
1094 | + <item row="8" column="4" > | |
1095 | + <widget class="QToolButton" name="pb_cGChatSpool" > | |
1096 | + <property name="sizePolicy" > | |
1097 | + <sizepolicy> | |
1098 | + <hsizetype>0</hsizetype> | |
1099 | + <vsizetype>0</vsizetype> | |
1100 | + <horstretch>0</horstretch> | |
1101 | + <verstretch>0</verstretch> | |
1102 | + </sizepolicy> | |
1103 | + </property> | |
1104 | + <property name="maximumSize" > | |
1105 | + <size> | |
1106 | + <width>20</width> | |
1107 | + <height>20</height> | |
1108 | + </size> | |
1109 | + </property> | |
1110 | <property name="text" > | |
1111 | - <string>Roster:</string> | |
1112 | + <string/> | |
1113 | </property> | |
1114 | </widget> | |
1115 | </item> | |
1116 | - <item row="3" column="0" > | |
1117 | - <widget class="QLabel" name="tl_fPopup" > | |
1118 | + <item row="9" column="4" > | |
1119 | + <widget class="QToolButton" name="pb_cGChatNick" > | |
1120 | + <property name="sizePolicy" > | |
1121 | + <sizepolicy> | |
1122 | + <hsizetype>0</hsizetype> | |
1123 | + <vsizetype>0</vsizetype> | |
1124 | + <horstretch>0</horstretch> | |
1125 | + <verstretch>0</verstretch> | |
1126 | + </sizepolicy> | |
1127 | + </property> | |
1128 | + <property name="maximumSize" > | |
1129 | + <size> | |
1130 | + <width>20</width> | |
1131 | + <height>20</height> | |
1132 | + </size> | |
1133 | + </property> | |
1134 | <property name="text" > | |
1135 | - <string>Popup:</string> | |
1136 | + <string/> | |
1137 | </property> | |
1138 | </widget> | |
1139 | </item> | |
1140 | - <item row="3" column="1" colspan="3" > | |
1141 | - <widget class="FontLabel" name="le_fPopup" /> | |
1142 | - </item> | |
1143 | - <item row="1" column="1" colspan="3" > | |
1144 | - <widget class="FontLabel" name="le_fMessage" /> | |
1145 | - </item> | |
1146 | - <item row="0" column="1" colspan="3" > | |
1147 | - <widget class="FontLabel" name="le_fRoster" /> | |
1148 | - </item> | |
1149 | </layout> | |
1150 | </widget> | |
1151 | </item> | |
1152 | @@ -504,14 +636,6 @@ | |
1153 | <tabstop>pb_cOffline</tabstop> | |
1154 | <tabstop>pb_cListBack</tabstop> | |
1155 | <tabstop>pb_cStatus</tabstop> | |
1156 | - <tabstop>le_fRoster</tabstop> | |
1157 | - <tabstop>pb_fRoster</tabstop> | |
1158 | - <tabstop>le_fMessage</tabstop> | |
1159 | - <tabstop>pb_fMessage</tabstop> | |
1160 | - <tabstop>le_fChat</tabstop> | |
1161 | - <tabstop>pb_fChat</tabstop> | |
1162 | - <tabstop>le_fPopup</tabstop> | |
1163 | - <tabstop>pb_fPopup</tabstop> | |
1164 | </tabstops> | |
1165 | <resources/> | |
1166 | <connections/> | |
1167 | diff -urN psi-0.12.orig/src/options/options.pri psi-0.12/src/options/options.pri | |
1168 | --- psi-0.12.orig/src/options/options.pri 2008-02-11 23:24:22.000000000 +0100 | |
1169 | +++ psi-0.12/src/options/options.pri 2008-08-09 18:34:42.000000000 +0200 | |
1170 | @@ -46,6 +46,7 @@ | |
1171 | $$PWD/opt_events.ui \ | |
1172 | $$PWD/opt_status.ui \ | |
1173 | $$PWD/opt_appearance.ui \ | |
1174 | + $$PWD/opt_appearance_fonts.ui \ | |
1175 | $$PWD/opt_appearance_misc.ui \ | |
1176 | $$PWD/opt_sound.ui \ | |
1177 | $$PWD/opt_advanced.ui \ | |
1178 | diff -urN psi-0.12.orig/src/psichatdlg.cpp psi-0.12/src/psichatdlg.cpp | |
1179 | --- psi-0.12.orig/src/psichatdlg.cpp 2008-02-02 18:59:35.000000000 +0100 | |
1180 | +++ psi-0.12/src/psichatdlg.cpp 2008-08-09 18:34:42.000000000 +0200 | |
1181 | @@ -420,7 +420,7 @@ | |
1182 | QDateTime t = QDateTime::currentDateTime(); | |
1183 | updateLastMsgTime(t); | |
1184 | QString timestr = chatView()->formatTimeStamp(t); | |
1185 | - QString color = "#00A000"; | |
1186 | + QString color = PsiOptions::instance()->getOption("options.ui.look.colors.chat.system-messages-color").toString(); | |
1187 | ||
1188 | chatView()->appendText(QString("<font color=\"%1\">[%2]").arg(color, timestr) + QString(" *** %1</font>").arg(str)); | |
1189 | } | |
1190 | @@ -428,12 +428,12 @@ | |
1191 | QString PsiChatDlg::colorString(bool local, ChatDlg::SpooledType spooled) const | |
1192 | { | |
1193 | if (spooled == ChatDlg::Spooled_OfflineStorage) | |
1194 | - return "#008000"; | |
1195 | + return PsiOptions::instance()->getOption("options.ui.look.colors.chat.spooled-messages-color").toString(); | |
1196 | ||
1197 | if (local) | |
1198 | - return "#FF0000"; | |
1199 | + return PsiOptions::instance()->getOption("options.ui.look.colors.chat.outgoing-messages-color").toString(); | |
1200 | ||
1201 | - return "#0000FF"; | |
1202 | + return PsiOptions::instance()->getOption("options.ui.look.colors.chat.incoming-messages-color").toString(); | |
1203 | } | |
1204 | ||
1205 | ChatView* PsiChatDlg::chatView() const | |
1206 | @@ -459,7 +459,7 @@ | |
1207 | bool doInsert = t.date() != lastMsgTime_.date(); | |
1208 | lastMsgTime_ = t; | |
1209 | if (doInsert) { | |
1210 | - QString color = "#00A000"; | |
1211 | + QString color = PsiOptions::instance()->getOption("options.ui.look.colors.chat.system-messages-color").toString(); | |
1212 | chatView()->appendText(QString("<font color=\"%1\">*** %2</font>").arg(color).arg(t.date().toString(Qt::ISODate))); | |
1213 | } | |
1214 | } | |
1215 | diff -urN psi-0.12.orig/src/psi_profiles.cpp psi-0.12/src/psi_profiles.cpp | |
1216 | --- psi-0.12.orig/src/psi_profiles.cpp 2008-04-24 20:06:44.000000000 +0200 | |
1217 | +++ psi-0.12/src/psi_profiles.cpp 2008-08-09 21:55:03.000000000 +0200 | |
1218 | @@ -1231,6 +1239,14 @@ | |
1219 | migrateColorEntry(tag, "profileback", "options.ui.look.colors.contactlist.profile.header-background"); | |
1220 | migrateColorEntry(tag, "animfront", "options.ui.look.contactlist.status-change-animation.color1"); | |
1221 | migrateColorEntry(tag, "animback", "options.ui.look.contactlist.status-change-animation.color2"); | |
1222 | + migrateColorEntry(tag, "chatsys", "options.ui.look.colors.chat.system-messages-color"); | |
1223 | + migrateColorEntry(tag, "chatspool", "options.ui.look.colors.chat.spooled-messages-color"); | |
1224 | + migrateColorEntry(tag, "chatto", "options.ui.look.colors.chat.outgoing-messages-color"); | |
1225 | + migrateColorEntry(tag, "chatfrom", "options.ui.look.colors.chat.incoming-messages-color"); | |
1226 | + migrateColorEntry(tag, "gchatalert", "options.ui.look.colors.groupchat.alert-messages-color"); | |
1227 | + migrateColorEntry(tag, "gchatsys", "options.ui.look.colors.groupchat.system-messages-color"); | |
1228 | + migrateColorEntry(tag, "gchatspool", "options.ui.look.colors.groupchat.spooled-messages-color"); | |
1229 | + migrateColorEntry(tag, "gchatnick", "options.ui.look.colors.groupchat.default-nick-color"); | |
1230 | } | |
1231 | ||
1232 | tag = findSubTag(p_lnf, "fonts", &found); |