[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: [Panel-devel] The minipager in KDE4 isn't working yet. I'd like
From:       headrift <headrift () gmail ! com>
Date:       2006-08-18 14:50:31
Message-ID: ea640ad60608180750k5f262acfibb780e6b463897a7 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


>
>
> What do you mean, issues with KWin? AFAICS the pager applet doesn't
> compile
> because somebody was so smart to remove KSharedPixmap and move it only to
> KPager. As for not using it, how are people supposed to use virtual
> desktops
> then?
>
>
ctrl+tab / ctrl+shift+tab *is* getting a little old.  Trying to remember
which desktop numbers I've got stuff on is a strain that I'd like to avoid.
:)

That aside, I've got a patch for kicker/libkicker/utils.cpp that I've
attached.  It gets rid of the annoying deprecation warnings for that file,
apparently without breaking anything.  This being my first patch submission,
it needs some peer review, as I'm sure that there are problems with it.

Thanks.

 - Ross

[Attachment #5 (text/html)]

<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> What do you mean, issues \
with KWin? AFAICS the pager applet doesn't compile<br>because somebody was so smart \
to remove KSharedPixmap and move it only to <br>KPager. As for not using it, how are \
people supposed to use virtual \
desktops<br>then?<br><br></blockquote></div><br>ctrl+tab / ctrl+shift+tab *is* \
getting a little old.&nbsp; Trying to remember which desktop numbers I've got stuff \
on is a strain that I'd like to avoid.&nbsp; :) <br><br>That aside, I've got a patch \
for kicker/libkicker/utils.cpp that I've attached.&nbsp; It gets rid of the annoying \
deprecation warnings for that file, apparently without breaking anything.&nbsp; This \
being my first patch submission, it needs some peer review, as I'm sure that there \
are problems with it. <br><br>Thanks.<br><br>&nbsp;- Ross<br>


["utils.cpp.patch" (text/x-patch)]

Index: utils.cpp
===================================================================
--- utils.cpp	(revision 573125)
+++ utils.cpp	(working copy)
@@ -138,16 +138,16 @@
 
 QMenu* reduceMenu(QMenu *menu)
 {
-    if (menu->count() != 1)
+    if (menu->actions().count() != 1)
     {
        return menu;
     }
 
-    QMenuItem *item = menu->findItem(menu->idAt(0));
+    QAction *act = menu->actions().value(0);
 
-    if (item->menu())
+    if (act->menu())
     {
-       return reduceMenu(item->menu());
+       return reduceMenu(act->menu());
     }
 
     return menu;
@@ -277,7 +277,7 @@
     int h1, s1, v1, h2, s2, v2, h3, s3, v3;
     activeTitle.getHsv(&h1, &s1, &v1);
     inactiveTitle.getHsv(&h2, &s2, &v2);
-    QApplication::palette().active().background().getHsv(&h3, &s3, &v3);
+    QApplication::palette().color(QPalette::Active, QPalette::Window).getHsv(&h3, &s3, &v3);
 
     if ( (qAbs(h1-h3)+qAbs(s1-s3)+qAbs(v1-v3) < qAbs(h2-h3)+qAbs(s2-s3)+qAbs(v2-v3)) &&
             ((qAbs(h1-h3)+qAbs(s1-s3)+qAbs(v1-v3) < 32) || (s1 < 32)) && (s2 > s1))
@@ -377,8 +377,8 @@
             active = active.scaled(20,20, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
         }
 
-        iconset.setPixmap(normal, QIcon::Small, QIcon::Normal);
-        iconset.setPixmap(active, QIcon::Small, QIcon::Active);
+        iconset.addPixmap(static_cast< const QPixmap& >(normal), QIcon::Normal, QIcon::On);
+        iconset.addPixmap(static_cast< const QPixmap& >(active), QIcon::Active, QIcon::Off);
     }
 
     return iconset;


_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic