[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/kicker/applets/media
From: Kévin Ottens <ervin () ipsquad ! net>
Date: 2005-06-09 15:11:01
Message-ID: 1118329861.335555.25033.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 423741 by ervin:
Ooops! Make it compile again... and fix the layout.
Obviously this file has not been rebuilt when I tested before my last commit.
M +30 -12 mediaapplet.cpp
--- trunk/KDE/kdebase/kicker/applets/media/mediaapplet.cpp #423740:423741
@@ -146,12 +146,18 @@
int y_offset = 0;
// Determine upper bound for the button size
- for (MediumButton *button = mButtonList.first();
- button; button = mButtonList.next())
+ MediumButtonList::iterator it;
+ MediumButtonList::iterator end = mButtonList.end();
+ for ( it = mButtonList.begin(); it != end; ++it )
{
- button_size = std::max(button_size, orientation() == Vertical ?
- button->widthForHeight(height()) :
- button->heightForWidth(width()));
+ MediumButton *button = *it;
+
+ button_size = std::max(button_size,
+ orientation() == Vertical ?
+ button->heightForWidth(width()) :
+ button->widthForHeight(height()) );
+// button->widthForHeight(height()) :
+// button->heightForWidth(width()) );
}
int kicker_size;
@@ -178,9 +184,10 @@
// Arrange the buttons. If kicker is more than twice as high/wide
// as the maximum preferred size of an icon, we put several icons
// in one column/row
- for (MediumButton *button = mButtonList.first();
- button; button = mButtonList.next())
+ for ( it = mButtonList.begin(); it != end; ++it )
{
+ MediumButton *button = *it;
+
button->move(x_offset, y_offset);
button->setPanelPosition(position());
@@ -260,9 +267,12 @@
kdDebug() << "item: " << it.current()->url() << endl;
bool found = false;
- for(MediumButton *button = mButtonList.first();
- button; button = mButtonList.next())
- {
+ MediumButtonList::iterator it2;
+ MediumButtonList::iterator end = mButtonList.end();
+ for ( it2 = mButtonList.begin(); it2 != end; ++it2 )
+ {
+ MediumButton *button = *it2;
+
if(button->fileItem().url()==it.current()->url())
{
found = true;
@@ -286,8 +296,12 @@
{
kdDebug()<<"MediumApplet::slotDeleteItem:"<< fileItem->url() << endl;
- for(MediumButton *button = mButtonList.first(); button; button = mButtonList.next())
+ MediumButtonList::iterator it;
+ MediumButtonList::iterator end = mButtonList.end();
+ for ( it = mButtonList.begin(); it != end; ++it )
{
+ MediumButton *button = *it;
+
if(button->fileItem().url()==fileItem->url())
{
mButtonList.remove(button);
@@ -310,8 +324,12 @@
kdDebug()<<"mimetype="<<mimetype<<endl;
- for(MediumButton *button = mButtonList.first(); button; button = mButtonList.next())
+ MediumButtonList::iterator it2;
+ MediumButtonList::iterator end = mButtonList.end();
+ for ( it2 = mButtonList.begin(); it2 != end; ++it2 )
{
+ MediumButton *button = *it2;
+
if(button->fileItem().url()==(*it.current()).url())
{
if(mExcludedTypesList.contains(mimetype))
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic