-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi people,

i'm currently preparing a new iconset for licq, and while doing so i noticed 
that some important icons in the menus are not themeable :-(
My patch corrects this behaviour and makes more icons themeable.
My new Iconset will follow soon, hope you enjoy it :)

New themeable Icons:
  SecureOn, SecureOff, Info, History

Thomas

- -- 
This life is yours.  Some of it was given to you; the rest, you made yourself.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+BlDT+83LmoKU5MARAgt7AJ9Y+LwRIIOtmh0JNKjGIjQvCHgqFgCfQPiC
PnhvCkC3UBvVaPn2ZPfsbnA=
=jGKF
-----END PGP SIGNATURE-----
Index: licq/plugins/qt-gui/src/mainwin.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/mainwin.cpp,v
retrieving revision 1.262
diff -u -3 -p -r1.262 mainwin.cpp
--- licq/plugins/qt-gui/src/mainwin.cpp	17 Dec 2002 01:30:58 -0000	1.262
+++ licq/plugins/qt-gui/src/mainwin.cpp	22 Dec 2002 23:49:04 -0000
@@ -463,8 +463,6 @@ CMainWindow::CMainWindow(CICQDaemon *the
   skin = NULL;
   menu = NULL;
 
-  ApplyIcons(szIcons, true);
-  ApplyExtendedIcons(szExtendedIcons, true);
   pmSecureOn = QPixmap(secure_on_xpm);
   pmSecureOff = QPixmap(secure_off_xpm);
   pmHistory = QPixmap(history_xpm);
@@ -476,6 +474,8 @@ CMainWindow::CMainWindow(CICQDaemon *the
   #else
   pmEncoding = QPixmap(charset_xpm);
   #endif
+  ApplyIcons(szIcons, true);
+  ApplyExtendedIcons(szExtendedIcons, true);
   initMenu();
   ApplySkin(szSkin, true);
   skin->frame.frameStyle = nFrameStyle;
@@ -3114,12 +3114,32 @@ void CMainWindow::ApplyIcons(const char 
    snprintf(sFilepath, MAX_FILENAME_LEN - 1, "%s%s", sIconPath, sFilename);
    pmAuthorize.load(sFilepath);
    if(pmAuthorize.isNull()) pmAuthorize = pmMessage;
-   
+
    fIconsConf.ReadStr("SMS", sFilename, "");
-   snprintf(sFilepath, MAX_FILENAME_LEN, "%s%s", sIconPath, sFilename);
+   snprintf(sFilepath, MAX_FILENAME_LEN - 1, "%s%s", sIconPath, sFilename);
    pmSMS.load(sFilepath);
    if(pmSMS.isNull()) pmSMS = pmMessage;
 
+   fIconsConf.ReadStr("SecureOff", sFilename, "");
+   snprintf(sFilepath, MAX_FILENAME_LEN - 1, "%s%s", sIconPath, sFilename);
+   pmSecureOff.load(sFilepath);
+   if(pmSecureOff.isNull()) pmSecureOff = pmMessage;
+
+   fIconsConf.ReadStr("SecureOn", sFilename, "");
+   snprintf(sFilepath, MAX_FILENAME_LEN - 1, "%s%s", sIconPath, sFilename);
+   pmSecureOn.load(sFilepath);
+   if(pmSecureOn.isNull()) pmSecureOn = pmMessage;
+
+   fIconsConf.ReadStr("History", sFilename, "");
+   snprintf(sFilepath, MAX_FILENAME_LEN - 1, "%s%s", sIconPath, sFilename);
+   pmHistory.load(sFilepath);
+   if(pmHistory.isNull()) pmHistory = pmMessage;
+
+   fIconsConf.ReadStr("Info", sFilename, "");
+   snprintf(sFilepath, MAX_FILENAME_LEN - 1, "%s%s", sIconPath, sFilename);
+   pmInfo.load(sFilepath);
+   if(pmInfo.isNull()) pmInfo = pmMessage;
+
    if (!_bInitial)
    {
      mnuStatus->changeItem(pmOnline, tr("&Online"), ICQ_STATUS_ONLINE);
@@ -3138,7 +3158,11 @@ void CMainWindow::ApplyIcons(const char 
      mnuUser->changeItem(pmAuthorize, tr("Send &Authorization"), mnuUserAuthorize);
      mnuUser->changeItem(pmAuthorize, tr("Send Authorization Re&quest"), mnuUserAuthorizeRequest);
      mnuUser->changeItem(pmSMS, tr("Send &SMS"), mnuUserSendSms);
-     mnuUser->changeItem(tr("Request &Secure Channel"), mnuUserSendKey);
+     mnuUser->changeItem(pmSecureOff, tr("Request &Secure Channel"), mnuUserSendKey);
+     mnuOwnerAdm->changeItem(pmInfo, tr("&Info"), OwnerMenuGeneral);
+     mnuOwnerAdm->changeItem(pmHistory, tr("View &History"), OwnerMenuHistory);
+     mnuUser->changeItem(pmInfo, tr("&Info"), mnuUserGeneral);
+     mnuUser->changeItem(pmHistory, tr("View &History"), mnuUserHistory);
      CUserView::UpdateFloaties();
      updateUserWin();
      updateEvents();

Reply via email to