By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 455
Collapse All | Expand All

(-)kcontrol/randr/Makefile.am (-1 / +1 lines)
Lines 7-13 Link Here
7
7
8
kcm_randr_la_SOURCES = krandrmodule.cpp
8
kcm_randr_la_SOURCES = krandrmodule.cpp
9
kcm_randr_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined
9
kcm_randr_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined
10
kcm_randr_la_LIBADD = $(LIB_KDEUI) $(LIB_XRANDR)
10
kcm_randr_la_LIBADD = $(LIB_KDEUI) $(LIB_XRANDR) $(LIB_KRANDR)
11
11
12
noinst_HEADERS = krandrmodule.h krandrtray.h krandrapp.h \
12
noinst_HEADERS = krandrmodule.h krandrtray.h krandrapp.h \
13
    krandrpassivepopup.h configdialog.h
13
    krandrpassivepopup.h configdialog.h
(-)kicker/libkicker/flowgridmanager.cpp (-3 / +6 lines)
Lines 143-151 Link Here
143
TQPoint FlowGridManager::cell(int index) const
143
TQPoint FlowGridManager::cell(int index) const
144
{   _checkReconfigure();
144
{   _checkReconfigure();
145
    //assert((index>=0) && (index<_gridDim.width()*_gridDim.height()));
145
    //assert((index>=0) && (index<_gridDim.width()*_gridDim.height()));
146
    int x=index % _gridDim.width(),
146
    if (_valid) {
147
        y=index / _gridDim.width();
147
        int x=index % _gridDim.width(),
148
    return TQPoint(x,y);
148
            y=index / _gridDim.width();
149
        return TQPoint(x,y);
150
    } else
151
        return TQPoint(0,0);
149
}
152
}
150
153
151
154
(-)kicker/libkicker/Makefile.am (-2 / +2 lines)
Lines 6-17 Link Here
6
                           menuinfo.cpp panelbutton.cpp panner.cpp \
6
                           menuinfo.cpp panelbutton.cpp panner.cpp \
7
                           kickerSettings.kcfgc kshadowsettings.cpp \
7
                           kickerSettings.kcfgc kshadowsettings.cpp \
8
                           kshadowengine.cpp paneldrag.cpp \
8
                           kshadowengine.cpp paneldrag.cpp \
9
                           simplebutton.cpp
9
                           simplebutton.cpp flowgridmanager.cpp
10
10
11
libkickermain_la_METASOURCES = AUTO
11
libkickermain_la_METASOURCES = AUTO
12
12
13
libkickermain_la_LDFLAGS = $(all_libraries) -version-info 1:0:0 -no-undefined
13
libkickermain_la_LDFLAGS = $(all_libraries) -version-info 1:0:0 -no-undefined
14
libkickermain_la_LIBADD = $(LIB_KIO)
14
libkickermain_la_LIBADD = $(LIB_KIO) ../kicker/core/libkicker_core.la ../kicker/ui/libkicker_ui.la
15
15
16
kde_kcfg_DATA = kickerSettings.kcfg
16
kde_kcfg_DATA = kickerSettings.kcfg
17
17
(-)kicker/applets/media/mediumbutton.h (+6 lines)
Lines 29-40 Link Here
29
#include <kfileitem.h>
29
#include <kfileitem.h>
30
#include <kpanelapplet.h>
30
#include <kpanelapplet.h>
31
#include <kactioncollection.h>
31
#include <kactioncollection.h>
32
#include <konq_popupmenu.h>
32
33
33
class MediumButton : public PanelPopupButton
34
class MediumButton : public PanelPopupButton
34
{
35
{
35
Q_OBJECT
36
Q_OBJECT
36
37
37
public:
38
public:
39
	enum { ICON_MARGIN = 1 };
38
	MediumButton(TQWidget *parent, const KFileItem &fileItem);
40
	MediumButton(TQWidget *parent, const KFileItem &fileItem);
39
	~MediumButton();
41
	~MediumButton();
40
	const KFileItem &fileItem() const;
42
	const KFileItem &fileItem() const;
Lines 48-53 Link Here
48
	void dragEnterEvent( TQDragEnterEvent* );
50
	void dragEnterEvent( TQDragEnterEvent* );
49
	void dragLeaveEvent( TQDragLeaveEvent* );
51
	void dragLeaveEvent( TQDragLeaveEvent* );
50
	void dropEvent(TQDropEvent *e);
52
	void dropEvent(TQDropEvent *e);
53
	virtual int preferredIconSize(int proposed_size = -1) const;
54
	void mousePressEvent(TQMouseEvent *e);
55
	void mouseReleaseEvent(TQMouseEvent *e);
51
56
52
protected slots:
57
protected slots:
53
	// Activate this code only if we find a way to have both an
58
	// Activate this code only if we find a way to have both an
Lines 61-66 Link Here
61
	KActionCollection mActions;
66
	KActionCollection mActions;
62
	KFileItem mFileItem;
67
	KFileItem mFileItem;
63
	TQTimer mOpenTimer;
68
	TQTimer mOpenTimer;
69
	KonqPopupMenu *mPopup;
64
};
70
};
65
71
66
#endif
72
#endif
(-)kicker/applets/media/preferencesdialog.cpp (-2 / +35 lines)
Lines 26-32 Link Here
26
#include <klistview.h>
26
#include <klistview.h>
27
#include <kfiledetailview.h>
27
#include <kfiledetailview.h>
28
28
29
class MediumTypeItem : public QCheckListItem
29
#include <qcombobox.h>
30
#include <qlabel.h>
31
#include <qlayout.h>
32
33
#include "mediaprefsdlg.h"
34
35
class MediumTypeItem : public TQCheckListItem
30
{
36
{
31
public:
37
public:
32
	MediumTypeItem(TQListView *parent, const TQString name,
38
	MediumTypeItem(TQListView *parent, const TQString name,
Lines 54-61 Link Here
54
	KFileItem mMedium;
60
	KFileItem mMedium;
55
};
61
};
56
62
63
#include "preferences_page.h"
57
64
58
59
PreferencesDialog::PreferencesDialog(KFileItemList media, TQWidget *parent,
65
PreferencesDialog::PreferencesDialog(KFileItemList media, TQWidget *parent,
60
                                     const char *name)
66
                                     const char *name)
61
	: KDialogBase(Tabbed, i18n("Media Applet Preferences"), Ok|Cancel|Default,
67
	: KDialogBase(Tabbed, i18n("Media Applet Preferences"), Ok|Cancel|Default,
Lines 78-83 Link Here
78
	mpMediaListView->addColumn( i18n("Media to Display") );
84
	mpMediaListView->addColumn( i18n("Media to Display") );
79
	TQWhatsThis::add(mpMediaListView, i18n("Deselect the media which you do not want to see in the applet"));
85
	TQWhatsThis::add(mpMediaListView, i18n("Deselect the media which you do not want to see in the applet"));
80
86
87
	TQVBox *preferences_page = addVBoxPage( i18n("Preferences") );
88
	mpMediaPrefsDlg = new MediaPrefsDlg(preferences_page);
89
81
	slotDefault();
90
	slotDefault();
82
}
91
}
83
92
Lines 163-167 Link Here
163
	}
172
	}
164
}
173
}
165
174
175
int PreferencesDialog::iconDim()
176
{
177
    if (mpMediaPrefsDlg->iconDim->currentText() == i18n("Automatic"))
178
    {
179
        return SIZE_AUTO;
180
    }
181
    else 
182
    {
183
        return mpMediaPrefsDlg->iconDim->currentText().toInt();
184
    }
185
}
166
186
187
void PreferencesDialog::setIconDim(int iconDim)
188
{
189
    if (iconDim == SIZE_AUTO)
190
    {
191
        mpMediaPrefsDlg->iconDim->setEditText(i18n("Automatic"));
192
    }
193
    else
194
    {
195
        mpMediaPrefsDlg->iconDim->setEditText(TQString::number(iconDim));
196
    }
197
}
198
199
167
#include "preferencesdialog.moc"
200
#include "preferencesdialog.moc"
(-)kicker/applets/media/mediaapplet.cpp (-130 / +107 lines)
Lines 30-35 Link Here
30
#include "mediaapplet.h"
30
#include "mediaapplet.h"
31
31
32
#include "preferencesdialog.h"
32
#include "preferencesdialog.h"
33
#include "prefs.h"
33
34
34
extern "C"
35
extern "C"
35
{
36
{
Lines 48-62 Link Here
48
{
49
{
49
    if (!parent)
50
    if (!parent)
50
        setBackgroundMode(X11ParentRelative);
51
        setBackgroundMode(X11ParentRelative);
51
        
52
52
    setBackgroundOrigin(AncestorOrigin);
53
    setBackgroundOrigin(AncestorOrigin);
53
    
54
54
    setAcceptDrops(true);
55
    setAcceptDrops(true);
55
    
56
56
    loadConfig();
57
    loadConfig();
57
    
58
59
    m_manager = new FlowGridManager;
60
    m_manager->setConserveSpace(true);
61
58
    mpDirLister = new KDirLister();
62
    mpDirLister = new KDirLister();
59
    
63
60
    connect( mpDirLister, TQT_SIGNAL( clear() ),
64
    connect( mpDirLister, TQT_SIGNAL( clear() ),
61
            this, TQT_SLOT( slotClear() ) );
65
            this, TQT_SLOT( slotClear() ) );
62
    connect( mpDirLister, TQT_SIGNAL( started(const KURL&) ),
66
    connect( mpDirLister, TQT_SIGNAL( started(const KURL&) ),
Lines 69-89 Link Here
69
            this, TQT_SLOT( slotDeleteItem( KFileItem * ) ) );
73
            this, TQT_SLOT( slotDeleteItem( KFileItem * ) ) );
70
    connect( mpDirLister, TQT_SIGNAL( refreshItems( const KFileItemList & ) ),
74
    connect( mpDirLister, TQT_SIGNAL( refreshItems( const KFileItemList & ) ),
71
            this, TQT_SLOT( slotRefreshItems( const KFileItemList & ) ) );
75
            this, TQT_SLOT( slotRefreshItems( const KFileItemList & ) ) );
72
    
76
73
    reloadList();
77
    reloadList();
78
79
    mpConfigAction = new KAction(i18n("Configure Storage Media..."), "configure", KShortcut(),
80
        this, SLOT(preferences()), this);
81
82
    mpAppletPopup = new TQPopupMenu(this);
83
    mpConfigAction->plug(mpAppletPopup);
74
}
84
}
75
85
76
MediaApplet::~MediaApplet()
86
MediaApplet::~MediaApplet()
77
{
87
{
78
    delete mpDirLister;
88
    delete mpDirLister;
79
    
89
    delete m_manager;
90
    delete mpAppletPopup;
91
80
    while (!mButtonList.isEmpty())
92
    while (!mButtonList.isEmpty())
81
    {
93
    {
82
        MediumButton *b = mButtonList.first();
94
        MediumButton *b = mButtonList.first();
83
        mButtonList.remove(b);
95
        mButtonList.remove(b);
84
        delete b;
96
        delete b;
85
    }
97
    }
86
    
98
99
    delete mpConfigAction;
100
87
    KGlobal::locale()->removeCatalogue("mediaapplet");
101
    KGlobal::locale()->removeCatalogue("mediaapplet");
88
}
102
}
89
103
Lines 115-125 Link Here
115
    
129
    
116
    dialog.setExcludedMediumTypes(mExcludedTypesList);
130
    dialog.setExcludedMediumTypes(mExcludedTypesList);
117
    dialog.setExcludedMedia(mExcludedList);
131
    dialog.setExcludedMedia(mExcludedList);
132
    dialog.setIconDim(mIconDim); 
118
    
133
    
119
    if(dialog.exec())
134
    if(dialog.exec())
120
    {
135
    {
121
        mExcludedTypesList = dialog.excludedMediumTypes();
136
        mExcludedTypesList = dialog.excludedMediumTypes();
122
        mExcludedList = dialog.excludedMedia();
137
        mExcludedList = dialog.excludedMedia();
138
        mIconDim = dialog.iconDim();
123
        saveConfig();
139
        saveConfig();
124
        reloadList();
140
        reloadList();
125
    }
141
    }
Lines 142-244 Link Here
142
158
143
void MediaApplet::arrangeButtons()
159
void MediaApplet::arrangeButtons()
144
{
160
{
145
    int button_size = 1;
161
    unsigned border(2 + dimension()/12), space(1);
146
    int x_offset = 0;
162
    int idim, d(dimension() - border * 2);
147
    int y_offset = 0;
163
    // determine button size
148
    
164
    if (mIconDim == PreferencesDialog::SIZE_AUTO)
149
    // Determine upper bound for the button size
150
    MediumButtonList::iterator it;
151
    MediumButtonList::iterator end = mButtonList.end();
152
    for ( it = mButtonList.begin(); it != end; ++it )
153
    {
165
    {
154
        MediumButton *button = *it;
166
        if (d < 18)
155
        
156
        button_size = std::max(button_size,
157
                            orientation() == Vertical ?
158
                    button->heightForWidth(width()) :
159
                button->widthForHeight(height()) );
160
    //		                           button->widthForHeight(height()) :
161
    //		                           button->heightForWidth(width()) );
162
    }
163
    
164
    int kicker_size;
165
    if (orientation() == Vertical)
166
    {
167
        kicker_size = width();
168
    }
169
    else
170
    {
171
        kicker_size = height();
172
    }
173
    
174
    unsigned int max_packed_buttons = kicker_size / button_size;
175
    // Center icons if we only have one column/row
176
    if (mButtonList.count() < max_packed_buttons)
177
    {
178
        max_packed_buttons = QMAX(uint(1), mButtonList.count());
179
    }
180
            max_packed_buttons = QMAX(uint(1), max_packed_buttons);
181
    
182
    int padded_button_size = kicker_size / max_packed_buttons;
183
    mButtonSizeSum = 0;
184
    unsigned int pack_count = 0;
185
    
186
    // Arrange the buttons. If kicker is more than twice as high/wide
187
    // as the maximum preferred size of an icon, we put several icons
188
    // in one column/row
189
    for ( it = mButtonList.begin(); it != end; ++it )
190
    {
191
        MediumButton *button = *it;
192
    
193
        button->move(x_offset, y_offset);
194
        button->setPanelPosition(position());
195
    
196
        if(pack_count == 0)
197
        {
167
        {
198
        mButtonSizeSum += button_size;
168
            idim = std::min(16, d);
199
        }
169
        }
200
        
170
        else if (d < 64)
201
        ++pack_count;
202
    
203
        if(orientation() == Vertical)
204
                    {
205
        if (pack_count < max_packed_buttons)
206
        {
171
        {
207
            x_offset += padded_button_size;
172
            idim = 16;
208
        }
173
        }
209
        else
174
        else if (d < 80)
210
        {
175
        {
211
            x_offset = 0;
176
            idim = 20;
212
            y_offset += button_size;
213
            pack_count = 0;
214
        }
177
        }
215
        
178
        else if (d < 122)
216
        button->resize(padded_button_size, button_size);
179
        {
180
            idim = 24;
217
        }
181
        }
218
        else
182
        else
219
        {
183
        {
220
        if (pack_count < max_packed_buttons)
184
            idim = 28;
221
        {
222
            y_offset += padded_button_size;
223
                            }
224
        else
225
        {
226
            y_offset = 0;
227
            x_offset += button_size;
228
            pack_count = 0;
229
        }
185
        }
230
        
186
    }
231
        button->resize(button_size, padded_button_size);
187
    else
232
        }
188
    {
233
        
189
        idim=std::min(mIconDim, d);
190
    }
191
    m_manager->setOrientation(orientation());
192
    m_manager->setNumItems(mButtonList.size());
193
    m_manager->setFrameSize(size());
194
    m_manager->setItemSize(TQSize(idim, idim));
195
    m_manager->setSpaceSize(TQSize(space, space));
196
    m_manager->setBorderSize(orientation() == Horizontal ?
197
        TQSize(space, border) : TQSize(border, space));
198
199
    for (unsigned index = 0; index < mButtonList.size(); index++)
200
    {
201
        TQPoint pos = m_manager->pos(index);
202
        MediumButton *button = mButtonList[index];
203
        button->move(pos.x(), pos.y());
204
        button->setPanelPosition(position());
205
        button->resize(m_manager->itemSize());
234
        button->unsetPalette();
206
        button->unsetPalette();
235
        button->setBackgroundOrigin(AncestorOrigin);
207
        button->setBackgroundOrigin(AncestorOrigin);
236
    }
208
    }
237
    
209
210
    mButtonSizeSum = orientation() == Horizontal ?
211
        m_manager->frameSize().width() :
212
        m_manager->frameSize().height();
213
238
    updateGeometry();
214
    updateGeometry();
239
    emit updateLayout();
215
    emit updateLayout();
240
}
216
}
241
217
218
int MediaApplet::dimension() const
219
{
220
    if (orientation()==Qt::Vertical)
221
    {
222
        return size().width();
223
    }
224
    return size().height();
225
}
226
242
void MediaApplet::slotClear()
227
void MediaApplet::slotClear()
243
{
228
{
244
    kdDebug()<<"MediaApplet::slotClear"<<endl;
229
    kdDebug()<<"MediaApplet::slotClear"<<endl;
Lines 275-295 Link Here
275
        MediumButtonList::iterator end = mButtonList.end();
260
        MediumButtonList::iterator end = mButtonList.end();
276
        for ( it2 = mButtonList.begin(); it2 != end; ++it2 )
261
        for ( it2 = mButtonList.begin(); it2 != end; ++it2 )
277
        {
262
        {
278
        MediumButton *button = *it2;
263
            MediumButton *button = *it2;
279
        
264
            
280
        if(button->fileItem().url()==it.current()->url())
265
            if(button->fileItem().url()==it.current()->url())
281
        {
266
            {
282
            found = true;
267
                found = true;
283
            button->setFileItem(*it.current());
268
                button->setFileItem(*it.current());
284
            break;
269
                break;
270
            }
285
        }
271
        }
286
        }
287
        
272
        
288
        if(!found && !mExcludedList.contains(it.current()->url().url()) )
273
        if(!found && !mExcludedList.contains(it.current()->url().url()) )
289
        {
274
        {
290
        MediumButton *button = new MediumButton(this, *it.current());
275
            MediumButton *button = new MediumButton(this, *it.current());
291
        button->show();
276
            button->show();
292
        mButtonList.append(button);
277
            mButtonList.append(button);
293
        }
278
        }
294
    }
279
    }
295
    
280
    
Lines 308-316 Link Here
308
        
293
        
309
        if(button->fileItem().url()==fileItem->url())
294
        if(button->fileItem().url()==fileItem->url())
310
        {
295
        {
311
        mButtonList.remove(button);
296
            mButtonList.remove(button);
312
        delete button;
297
            delete button;
313
        break;
298
            break;
314
        }
299
        }
315
    }
300
    }
316
    slotCompleted();
301
    slotCompleted();
Lines 332-360 Link Here
332
        MediumButtonList::iterator end = mButtonList.end();
317
        MediumButtonList::iterator end = mButtonList.end();
333
        for ( it2 = mButtonList.begin(); it2 != end; ++it2 )
318
        for ( it2 = mButtonList.begin(); it2 != end; ++it2 )
334
        {
319
        {
335
        MediumButton *button = *it2;
320
            MediumButton *button = *it2;
336
        
321
            
337
        if(button->fileItem().url()==(*it.current()).url())
322
            if(button->fileItem().url()==(*it.current()).url())
338
        {
339
            if(mExcludedTypesList.contains(mimetype))
340
            {
323
            {
341
            mButtonList.remove(button);
324
                if(mExcludedTypesList.contains(mimetype))
342
            delete button;
325
                {
326
                    mButtonList.remove(button);
327
                    delete button;
328
                }
329
                else
330
                {
331
                    button->setFileItem(*it.current());
332
                }
333
                found = true;
334
                break;
343
            }
335
            }
344
            else
345
            {
346
            button->setFileItem(*it.current());
347
            }
348
            found = true;
349
            break;
350
        }
336
        }
351
        }
352
    
337
    
353
        if(!found && !mExcludedTypesList.contains(mimetype) && !mExcludedList.contains(it.current()->url().url()) )
338
        if(!found && !mExcludedTypesList.contains(mimetype) && !mExcludedList.contains(it.current()->url().url()) )
354
        {
339
        {
355
        MediumButton *button = new MediumButton(this, *it.current());
340
            MediumButton *button = new MediumButton(this, *it.current());
356
        button->show();
341
            button->show();
357
        mButtonList.append(button);
342
            mButtonList.append(button);
358
        }
343
        }
359
    }
344
    }
360
    
345
    
Lines 394-399 Link Here
394
    {
379
    {
395
        mExcludedList.clear();
380
        mExcludedList.clear();
396
    }
381
    }
382
    mIconDim = c->readNumEntry("IconDim");
397
}
383
}
398
384
399
void MediaApplet::saveConfig()
385
void MediaApplet::saveConfig()
Lines 403-408 Link Here
403
    
389
    
404
    c->writeEntry("ExcludedTypes", mExcludedTypesList, ';');
390
    c->writeEntry("ExcludedTypes", mExcludedTypesList, ';');
405
    c->writeEntry("ExcludedMedia", mExcludedList, ';');
391
    c->writeEntry("ExcludedMedia", mExcludedList, ';');
392
    c->writeEntry("IconDim", mIconDim);
406
    
393
    
407
    c->sync();
394
    c->sync();
408
}
395
}
Lines 425-443 Link Here
425
412
426
void MediaApplet::mousePressEvent(TQMouseEvent *e)
413
void MediaApplet::mousePressEvent(TQMouseEvent *e)
427
{
414
{
428
    if(e->button()==RightButton)
415
    if (e->button() == RightButton)
429
    {
416
    {
430
        KPopupMenu menu(this);
417
        mpAppletPopup->popup(e->globalPos());
431
    
432
        menu.insertTitle(i18n("Media"));
433
        menu.insertItem(SmallIcon("configure"), i18n("&Configure..."), 1);
434
    
435
        int choice = menu.exec(this->mapToGlobal(e->pos()));
436
    
437
        if(choice==1)
438
        {
439
            preferences();
440
        }
441
    }
418
    }
442
}
419
}
443
420
(-)kicker/applets/media/preferencesdialog.h (+7 lines)
Lines 28-37 Link Here
28
  *@author ervin
28
  *@author ervin
29
  */
29
  */
30
30
31
class MediaPrefsDlg;
32
31
class PreferencesDialog : public KDialogBase
33
class PreferencesDialog : public KDialogBase
32
{
34
{
33
   Q_OBJECT
35
   Q_OBJECT
34
public:
36
public:
37
    enum {SIZE_AUTO=0};
35
	PreferencesDialog(KFileItemList media, TQWidget *parent=0, const char *name=0);
38
	PreferencesDialog(KFileItemList media, TQWidget *parent=0, const char *name=0);
36
	~PreferencesDialog();
39
	~PreferencesDialog();
37
40
Lines 40-45 Link Here
40
43
41
	TQStringList excludedMedia();
44
	TQStringList excludedMedia();
42
	void setExcludedMedia(TQStringList excludedList);
45
	void setExcludedMedia(TQStringList excludedList);
46
    
47
    int iconDim();
48
    void setIconDim(int iconDim);
43
49
44
protected slots:
50
protected slots:
45
	void slotDefault();
51
	void slotDefault();
Lines 48-53 Link Here
48
	KListView *mpMediumTypesListView;
54
	KListView *mpMediumTypesListView;
49
	KListView *mpMediaListView;
55
	KListView *mpMediaListView;
50
	KFileItemList mMedia;
56
	KFileItemList mMedia;
57
    MediaPrefsDlg *mpMediaPrefsDlg;
51
};
58
};
52
59
53
#endif
60
#endif
(-)kicker/applets/media/Makefile.am (-2 / +2 lines)
Lines 1-11 Link Here
1
INCLUDES = -I$(top_srcdir)/libkonq -I$(top_srcdir)/kicker/libkicker $(all_includes)
1
INCLUDES = -I$(top_srcdir)/libkonq -I$(top_srcdir)/kicker/libkicker $(all_includes)
2
2
3
kde_module_LTLIBRARIES = media_panelapplet.la
3
kde_module_LTLIBRARIES = media_panelapplet.la
4
media_panelapplet_la_SOURCES = preferencesdialog.cpp mediumbutton.cpp mediaapplet.cpp
4
media_panelapplet_la_SOURCES = preferences_page.ui preferencesdialog.cpp mediumbutton.cpp mediaapplet.cpp mediaprefsdlg.cpp prefs.kcfgc
5
5
6
METASOURCES = AUTO
6
METASOURCES = AUTO
7
7
8
noinst_HEADERS = mediaapplet.h mediumbutton.h preferencesdialog.h 
8
noinst_HEADERS = mediaapplet.h mediumbutton.h preferencesdialog.h mediaprefsdlg.h
9
9
10
lnkdir = $(kde_datadir)/kicker/applets
10
lnkdir = $(kde_datadir)/kicker/applets
11
lnk_DATA = mediaapplet.desktop
11
lnk_DATA = mediaapplet.desktop
(-)kicker/applets/media/mediaapplet.h (-2 / +12 lines)
Lines 30-40 Link Here
30
#include <kurl.h>
30
#include <kurl.h>
31
#include <kfileitem.h>
31
#include <kfileitem.h>
32
#include <kdirlister.h>
32
#include <kdirlister.h>
33
#include <flowgridmanager.h>
33
34
34
#include <tqptrlist.h>
35
#include <tqptrlist.h>
35
#include "mediumbutton.h"
36
#include "mediumbutton.h"
36
typedef TQValueList<MediumButton*> MediumButtonList;
37
typedef TQValueList<MediumButton*> MediumButtonList;
37
38
39
class Prefs;
38
40
39
class MediaApplet : public KPanelApplet
41
class MediaApplet : public KPanelApplet
40
{
42
{
Lines 48-54 Link Here
48
	int widthForHeight(int height) const;
50
	int widthForHeight(int height) const;
49
	int heightForWidth(int width) const;
51
	int heightForWidth(int width) const;
50
	void about();
52
	void about();
51
	void preferences();
52
53
53
protected:
54
protected:
54
	void arrangeButtons();
55
	void arrangeButtons();
Lines 66-79 Link Here
66
	void slotNewItems(const KFileItemList &entries);
67
	void slotNewItems(const KFileItemList &entries);
67
	void slotDeleteItem(KFileItem *fileItem);
68
	void slotDeleteItem(KFileItem *fileItem);
68
	void slotRefreshItems(const KFileItemList &entries);
69
	void slotRefreshItems(const KFileItemList &entries);
70
	void preferences();
69
71
70
private:
72
private:
73
	int dimension() const;
74
75
private:
71
	KDirLister *mpDirLister;
76
	KDirLister *mpDirLister;
72
	MediumButtonList mButtonList;
77
	MediumButtonList mButtonList;
73
	TQStringList mExcludedTypesList;
78
	TQStringList mExcludedTypesList;
74
	TQStringList mExcludedList;
79
	TQStringList mExcludedList;
75
	KFileItemList mMedia;
80
	KFileItemList mMedia;
76
        int mButtonSizeSum;
81
	int mButtonSizeSum;
82
83
	int mIconDim;
84
	FlowGridManager *m_manager;
85
	KAction *mpConfigAction;
86
	TQPopupMenu *mpAppletPopup;
77
};
87
};
78
88
79
#endif
89
#endif
(-)kicker/applets/media/mediumbutton.cpp (-6 / +54 lines)
Lines 46-52 Link Here
46
46
47
MediumButton::MediumButton(TQWidget *parent, const KFileItem &fileItem)
47
MediumButton::MediumButton(TQWidget *parent, const KFileItem &fileItem)
48
	: PanelPopupButton(parent), mActions(this, this), mFileItem(fileItem), mOpenTimer(0,
48
	: PanelPopupButton(parent), mActions(this, this), mFileItem(fileItem), mOpenTimer(0,
49
                "MediumButton::mOpenTimer")
49
                "MediumButton::mOpenTimer"), mPopup(NULL)
50
{
50
{
51
    KAction *a = KStdAction::paste(this, TQT_SLOT(slotPaste()),
51
    KAction *a = KStdAction::paste(this, TQT_SLOT(slotPaste()),
52
                                    &mActions, "pasteto");
52
                                    &mActions, "pasteto");
Lines 71-76 Link Here
71
    //connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked()));
71
    //connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked()));
72
    
72
    
73
    setPopup(new TQPopupMenu());
73
    setPopup(new TQPopupMenu());
74
    setDrawArrow(false);
74
}
75
}
75
76
76
MediumButton::~MediumButton()
77
MediumButton::~MediumButton()
Lines 107-121 Link Here
107
	KParts::BrowserExtension::PopupFlags bef =
108
	KParts::BrowserExtension::PopupFlags bef =
108
		  KParts::BrowserExtension::DefaultPopupItems;
109
		  KParts::BrowserExtension::DefaultPopupItems;
109
110
110
	KonqPopupMenu *new_popup = new KonqPopupMenu(0L, items,
111
	mPopup = new KonqPopupMenu(0L, items,
111
	                                   KURL("media:/"), mActions, 0L,
112
	                                   KURL("media:/"), mActions, 0L,
112
	                                   this, kpf, bef);
113
	                                   this, kpf, bef);
113
	KPopupTitle *title = new KPopupTitle(new_popup);
114
	KPopupTitle *title = new KPopupTitle(mPopup);
114
	title->setTitle(mFileItem.text());
115
	title->setTitle(mFileItem.text());
115
116
116
	new_popup->insertItem(title, -1, 0);
117
	mPopup->insertItem(title, -1, 0);
117
118
118
	setPopup(new_popup);
119
	setPopup(mPopup);
120
	setDrawArrow(false);
119
121
120
	if (old_popup!=0L) delete old_popup;
122
	if (old_popup!=0L) delete old_popup;
121
}
123
}
Lines 123-129 Link Here
123
void MediumButton::refreshType()
125
void MediumButton::refreshType()
124
{
126
{
125
    KMimeType::Ptr mime = mFileItem.determineMimeType();
127
    KMimeType::Ptr mime = mFileItem.determineMimeType();
126
    TQToolTip::add(this, mime->comment());
128
    TQToolTip::add(this, mFileItem.text() + " (" + mime->comment() + ")");
127
    setIcon(mFileItem.iconName());
129
    setIcon(mFileItem.iconName());
128
}
130
}
129
131
Lines 171-176 Link Here
171
    KonqOperations::doDrop(&mFileItem, mFileItem.url(), e, this);
173
    KonqOperations::doDrop(&mFileItem, mFileItem.url(), e, this);
172
}
174
}
173
175
176
int MediumButton::preferredIconSize(int proposed_size) const
177
{
178
    if (proposed_size < 0)
179
    {
180
        return std::min(width(), height()) - 2 * ICON_MARGIN;
181
    }
182
    return proposed_size;
183
}
184
174
void MediumButton::slotDragOpen()
185
void MediumButton::slotDragOpen()
175
{
186
{
176
    mFileItem.run();
187
    mFileItem.run();
Lines 200-203 Link Here
200
    }
211
    }
201
}
212
}
202
213
214
void MediumButton::mousePressEvent(TQMouseEvent *e)
215
{
216
    if (e->button() == RightButton)
217
    {
218
        showMenu();
219
        return;
220
    }
221
    else if (e->button() == LeftButton)
222
    {
223
        setDown(true);
224
        repaint();
225
        return;
226
    }
227
    PanelButton::mousePressEvent(e);
228
}
229
230
void MediumButton::mouseReleaseEvent(TQMouseEvent *e)
231
{
232
    if (e->button() == LeftButton)
233
    {
234
        setDown(false);
235
        repaint();
236
237
        if (rect().contains(mapFromGlobal(e->globalPos())))
238
        {
239
            if (!mPopup)
240
                initPopup();
241
242
            KAction *a = mPopup->actionCollection()->action("newview");
243
            if (a) a->activate();
244
        }
245
246
        return;
247
    }
248
    PanelButton::mouseReleaseEvent(e);
249
}
250
203
#include "mediumbutton.moc"
251
#include "mediumbutton.moc"
(-)kicker/applets/launcher/quicklauncher.cpp (+1 lines)
Lines 155-160 Link Here
155
        m_buttons->deleteContents();
155
        m_buttons->deleteContents();
156
        delete m_buttons;
156
        delete m_buttons;
157
    }
157
    }
158
    delete m_configAction;
158
}
159
}
159
160
160
// Builds, connects _popup menu
161
// Builds, connects _popup menu
(-)kicker/applets/launcher/quicklauncher.h (-1 / +1 lines)
Lines 31-37 Link Here
31
#include <kpanelapplet.h>
31
#include <kpanelapplet.h>
32
#include <map>
32
#include <map>
33
33
34
#include "flowgridmanager.h"
34
#include <flowgridmanager.h>
35
#include "prefs.h"
35
#include "prefs.h"
36
#include "quickbutton.h"
36
#include "quickbutton.h"
37
37
(-)kicker/applets/launcher/flowgridmanager.cpp (-316 lines)
Lines 1-316 Link Here
1
/*  Copyright 2004, Daniel Woods Bullok <dan.devel@bullok.com>
2
    distributed under the terms of the
3
    GNU GENERAL PUBLIC LICENSE Version 2 -
4
    See the file kdebase/COPYING for details
5
*/
6
7
#include "flowgridmanager.h"
8
#include <kdebug.h>
9
#ifdef DEBUG
10
   #define DEBUGSTR kdDebug()
11
#else
12
   #define DEBUGSTR kndDebug()
13
#endif
14
15
16
FlowGridManager::FlowGridManager(TQSize p_item_size,
17
                                 TQSize p_space_size,
18
                                 TQSize p_border_size,
19
                                 TQSize p_frame_size,
20
                                 Qt::Orientation orient,
21
                                 int num_items,
22
                                 Slack slack_x,Slack slack_y)
23
{
24
    _pItemSize=p_item_size;
25
    _pSpaceSize=p_space_size;
26
    _pBorderSize=p_border_size;
27
    _pFrameSize=p_frame_size;
28
    _orientation=orient;
29
    _numItems=num_items;
30
    _slackX=slack_x;
31
    _slackY=slack_y;
32
    _conserveSpace=false;
33
34
    _dirty=true;
35
    _valid=false;
36
}
37
38
// set members.
39
// These all set the _dirty flag if the new value is different.
40
void FlowGridManager::setNumItems(int num_items)
41
{   if (_numItems==num_items)
42
        return;
43
    _numItems=num_items; _dirty=true;
44
}
45
void FlowGridManager::setItemSize(TQSize p_item_size)
46
{   if (_pItemSize==p_item_size)
47
        return;
48
    _pItemSize=p_item_size; _dirty=true;
49
}
50
51
void FlowGridManager::setSpaceSize(TQSize p_space_size)
52
{   if (_pSpaceSize==p_space_size)
53
        return;
54
    _pSpaceSize=p_space_size; _dirty=true;
55
}
56
57
void FlowGridManager::setBorderSize(TQSize p_border_size)
58
{   if (_pBorderSize==p_border_size)
59
        return;
60
    _pBorderSize=p_border_size; _dirty=true;
61
}
62
63
void FlowGridManager::setFrameSize(TQSize p_frame_size)
64
{   if (_pFrameSize==p_frame_size)
65
        return;
66
    _pFrameSize=p_frame_size;
67
    if (_pFrameSize.width()<=0) {
68
        _orientation=Qt::Vertical;
69
    }
70
    if (_pFrameSize.height()<=0) {
71
        _orientation=Qt::Horizontal;
72
    }
73
    _dirty=true;
74
}
75
76
void FlowGridManager::setOrientation(Qt::Orientation orient)
77
{   if (orient==_orientation)
78
        return;
79
    _orientation=orient; _dirty=true;
80
}
81
82
void FlowGridManager::setSlack(Slack slack_x, Slack slack_y)
83
{   if (slack_x==_slackX && slack_y==_slackY) return;
84
     _slackX=slack_x; _slackY=slack_y; _dirty=true;}
85
86
87
void FlowGridManager::setConserveSpace(bool conserve)
88
{   if (_conserveSpace==conserve)
89
        return;
90
    _conserveSpace=conserve; _dirty=true;
91
}
92
93
94
95
// get members
96
TQSize  FlowGridManager::itemSize() const
97
{   _checkReconfigure();  return _itemSize;}
98
99
TQSize  FlowGridManager::spaceSize() const
100
{   _checkReconfigure();  return _spaceSize;}
101
102
TQSize  FlowGridManager::borderSize() const
103
{   _checkReconfigure();  return _borderSize;}
104
105
TQSize  FlowGridManager::gridDim() const
106
{   _checkReconfigure();  return _gridDim;}
107
108
TQSize  FlowGridManager::gridSpacing() const
109
{   _checkReconfigure();  return _gridSpacing;}
110
111
TQSize  FlowGridManager::frameSize() const
112
{   _checkReconfigure();  return _frameSize;}
113
114
TQPoint FlowGridManager::origin() const
115
{   _checkReconfigure();  return _origin;}
116
117
Qt::Orientation FlowGridManager::orientation() const
118
{   _checkReconfigure();  return _orientation;}
119
120
/*Slack FlowGridManager::slackX() const
121
{   return _slackY;}
122
123
Slack FlowGridManager::slackY() const
124
{   return _slackY;}
125
*/
126
127
bool FlowGridManager::conserveSpace() const
128
{        return _conserveSpace; }
129
130
131
bool FlowGridManager::isValid() const
132
{   _checkReconfigure();  return _valid;}
133
134
TQPoint FlowGridManager::posAtCell(int x,int y) const
135
{  _checkReconfigure();
136
    return _origin+TQPoint(_gridSpacing.width()*x,_gridSpacing.height()*y);
137
}
138
139
TQPoint FlowGridManager::pos(int i) const
140
{   return posAtCell(cell(i).x(),cell(i).y());
141
}
142
143
TQPoint FlowGridManager::cell(int index) const
144
{   _checkReconfigure();
145
    //assert((index>=0) && (index<_gridDim.width()*_gridDim.height()));
146
    int x=index % _gridDim.width(),
147
        y=index / _gridDim.width();
148
    return TQPoint(x,y);
149
}
150
151
152
153
154
// return height if orientation is Horizontal
155
// return width if orientation is Vertical
156
int FlowGridManager::_getHH(TQSize size) const
157
{  if (_orientation==Qt::Horizontal)
158
        return size.height();
159
    return size.width();
160
}
161
162
// return height if orientation is Vertical
163
// return width if orientation is Horizontal
164
int FlowGridManager::_getWH(TQSize size) const
165
{  if (_orientation==Qt::Horizontal)
166
        return size.width();
167
    return size.height();
168
}
169
170
// swap horizontal and vertical if orientation is Vertical, otherwise return arg
171
TQSize FlowGridManager::_swapHV(TQSize hv) const
172
{  if (_orientation==Qt::Horizontal)
173
        return hv;
174
    TQSize temp=hv;
175
    temp.transpose();
176
    return temp;
177
}
178
179
180
// return the amount of slack when:
181
//    nitems = # of items
182
//    length = total length of space where items will be placed
183
//    item, space, border = length of respective entities
184
int FlowGridManager::_slack(int nitems,int length,int item,int space,int border) const
185
{  return length-(2*border)-(nitems-1)*space-nitems*item;}
186
187
188
void FlowGridManager::_clear() const
189
{
190
    _borderSize=TQSize(0,0);
191
    _spaceSize=TQSize(0,0);
192
    _itemSize=TQSize(0,0);
193
    _gridDim=TQSize(0,0);
194
    _gridSpacing=TQSize(0,0);
195
    _origin=TQPoint(0,0);
196
    _frameSize=TQSize(0,0);
197
198
    _dirty=false;
199
    _valid=false;
200
}
201
202
203
int FlowGridManager::indexNearest(TQPoint p) const
204
{  if (!isValid()) return -1;
205
   TQPoint c=(p-_origin)-TQPoint(_spaceSize.width(),_spaceSize.height())/2;
206
   int x=c.x()/_gridSpacing.width(),
207
       y=c.y()/_gridSpacing.height();
208
   int i= x+y*_gridDim.width();
209
   if (i>_numItems) return -1;
210
   return i;
211
}
212
213
214
215
// Redistribute the boxes
216
void FlowGridManager::_reconfigure() const
217
{   if ((!_pFrameSize.isValid()) ||
218
        (!_pItemSize.isValid()) ||
219
         _numItems==0 ) {
220
        _clear();
221
        return;
222
    }
223
    int height=_getHH(_pFrameSize),
224
        pItemHeight=_getHH(_pItemSize),
225
        pSpaceHeight=_getHH(_pSpaceSize),
226
        pBorderHeight=_getHH(_pBorderSize),
227
        spanlen=(height-2*pBorderHeight+pSpaceHeight)/(pItemHeight+pSpaceHeight);
228
    int slack,iSlack;
229
230
    if (spanlen==0) {
231
        _dirty=false;
232
        _valid=false;
233
        return;
234
    }
235
    // figure out the number of spans required for all items
236
    int numspans=_numItems/spanlen;
237
    if (numspans*spanlen<_numItems) {
238
        numspans++;
239
    }
240
241
    slack=_slack(spanlen,height,pItemHeight,pSpaceHeight,pBorderHeight);  // total slack
242
    iSlack=slack/spanlen;                // slack per item
243
    // Items pick up extra slack
244
    if (_slackX==ItemSlack) pItemHeight+=iSlack;
245
    slack=_slack(spanlen,height,pItemHeight,pSpaceHeight,pBorderHeight);
246
247
    // space picks up extra slack
248
    if (spanlen>1) {
249
        iSlack=slack/(spanlen+1);
250
        pSpaceHeight+=iSlack;
251
    }
252
253
    slack=_slack(spanlen,height,pItemHeight,pSpaceHeight,pBorderHeight);
254
    iSlack=slack/2;
255
    pBorderHeight+=iSlack;
256
    if (_conserveSpace) {
257
        _itemSize=_swapHV(TQSize(_getWH(_pItemSize),pItemHeight));
258
        _spaceSize=_swapHV(TQSize(_getWH(_pSpaceSize),pSpaceHeight));
259
        _borderSize=_swapHV(TQSize(_getWH(_pBorderSize),pBorderHeight));
260
    }
261
    else {
262
        _itemSize=_swapHV(TQSize(pItemHeight,pItemHeight));
263
        _spaceSize=_swapHV(TQSize(pSpaceHeight,pSpaceHeight));
264
        _borderSize=_swapHV(TQSize(pBorderHeight,pBorderHeight));
265
    }
266
    _gridDim=_swapHV(TQSize(numspans,spanlen));
267
268
    _gridSpacing=_itemSize+_spaceSize;
269
    _origin=TQPoint(_borderSize.width(),_borderSize.height());
270
    _frameSize=2*_borderSize+TQSize(_gridDim.width()*_gridSpacing.width()-_spaceSize.width(),
271
                              _gridDim.height()*_gridSpacing.height()-_spaceSize.height());
272
273
    _dirty=false;
274
    _valid=true;
275
}
276
277
278
void FlowGridManager::dump()
279
{
280
    DEBUGSTR<<endl<<flush;
281
282
    DEBUGSTR<<"_pItemSize=("<<_pItemSize.width()<<","<<_pItemSize.height()<<")"<<endl<<flush;
283
    DEBUGSTR<<"_pSpaceSize=("<<_pSpaceSize.width()<<","<<_pSpaceSize.height()<<")"<<endl<<flush;
284
    DEBUGSTR<<"_pBorderSize=("<<_pBorderSize.width()<<","<<_pBorderSize.height()<<")"<<endl<<flush;
285
    DEBUGSTR<<"_pFrameSize=("<<_pFrameSize.width()<<","<<_pFrameSize.height()<<")"<<endl<<flush;
286
    DEBUGSTR<<"_borderSize=("<<_borderSize.width()<<","<<_borderSize.height()<<")"<<endl<<flush;
287
    DEBUGSTR<<"_spaceSize=("<<_spaceSize.width()<<","<<_spaceSize.height()<<")"<<endl<<flush;
288
    DEBUGSTR<<"_itemSize=("<<_itemSize.width()<<","<<_itemSize.height()<<")"<<endl<<flush;
289
    DEBUGSTR<<"_gridDim=("<<_gridDim.width()<<","<<_gridDim.height()<<")"<<endl<<flush;
290
    DEBUGSTR<<"_gridSpacing=("<<_gridSpacing.width()<<","<<_gridSpacing.height()<<")"<<endl<<flush;
291
    DEBUGSTR<<"_origin=("<<_origin.x()<<","<<_origin.y()<<")"<<endl<<flush;
292
    DEBUGSTR<<"_frameSize=("<<_frameSize.width()<<","<<_frameSize.height()<<")"<<endl<<flush;
293
    DEBUGSTR<<"_conserveSpace="<<_conserveSpace<<endl<<flush;
294
295
    DEBUGSTR<<"_orientation="<<_orientation<<endl<<flush;
296
    DEBUGSTR<<"_numItems="<<_numItems<<endl<<flush;
297
    DEBUGSTR<<"_slackX="<<_slackX<<endl<<flush;
298
    DEBUGSTR<<"_slackY="<<_slackY<<endl<<flush;
299
    DEBUGSTR<<"_dirty="<<_dirty<<endl<<flush;
300
    DEBUGSTR<<"_valid="<<_valid<<endl<<flush;
301
    DEBUGSTR<<endl<<flush;
302
}
303
304
305
306
bool operator== ( const FlowGridManager & csg1, const FlowGridManager & csg2 )
307
{
308
    return csg1.gridDim()==csg2.gridDim() &&
309
    csg1.origin()==csg2.origin() &&
310
    csg1.gridSpacing()==csg2.gridSpacing() &&
311
    csg1.frameSize()==csg2.frameSize();
312
}
313
314
315
316
(-)kicker/applets/launcher/flowgridmanager.h (-99 lines)
Lines 1-99 Link Here
1
/*  Copyright 2004, Daniel Woods Bullok <dan.devel@bullok.com>
2
    distributed under the terms of the
3
    GNU GENERAL PUBLIC LICENSE Version 2 -
4
    See the file kdebase/COPYING for details
5
*/
6
7
#ifndef __const_space_grid_h__
8
#define __const_space_grid_h__
9
10
#include <tqnamespace.h>
11
#include <tqpoint.h>
12
#include <tqsize.h>
13
14
15
class FlowGridManager {
16
// Determine if two FlowGridManager objs have the same layout.  They may or
17
// may not have the same input parameters, but the resulting layout is identical.
18
    friend bool operator== ( const FlowGridManager & gp1, const FlowGridManager & gp2 );
19
20
public:
21
    typedef enum {
22
        ItemSlack,SpaceSlack,BorderSlack,NoSlack
23
    } Slack;
24
25
    FlowGridManager(TQSize p_item_size=TQSize(0,0),
26
                                     TQSize p_space_size=TQSize(0,0),
27
                                     TQSize p_border_size=TQSize(0,0),
28
                                     TQSize frame_size=TQSize(0,0),
29
                                     Qt::Orientation orient=Qt::Horizontal,
30
                                     int num_items=0,
31
                                     Slack slack_x=ItemSlack,
32
                                     Slack slack_y=ItemSlack);
33
34
35
    void setNumItems(int num_items);
36
    void setItemSize(TQSize item_size);
37
    void setSpaceSize(TQSize space_size);
38
    void setBorderSize(TQSize border_size);
39
    void setOrientation(Qt::Orientation orient);
40
    void setFrameSize(TQSize frame_size);
41
    void setSlack(Slack slack_x, Slack slack_y);
42
    void setConserveSpace(bool conserve);
43
44
45
    TQSize  itemSize() const;
46
    TQSize  spaceSize() const;
47
    TQSize  borderSize() const;
48
    TQSize  gridDim() const;
49
    TQSize  gridSpacing() const;
50
    TQSize  frameSize() const;
51
    TQPoint origin() const;
52
    Qt::Orientation orientation() const;
53
    bool   conserveSpace() const;
54
55
//    Slack  slackX() const;
56
//    Slack  slackY() const;
57
58
    TQPoint posAtCell(int x,int y) const;
59
    TQPoint pos(int i) const;
60
    TQPoint cell(int index) const;
61
    bool isValid() const;
62
    int indexNearest(TQPoint p) const;
63
64
    void dump();
65
protected:
66
    int _getHH(TQSize size) const;
67
    int _getWH(TQSize size) const;
68
    TQSize _swapHV(TQSize hv) const;
69
    inline void _checkReconfigure() const;
70
    int _slack(int nitems,int length,int item,int space,int border) const;
71
    void _reconfigure() const;
72
    void _clear() const;
73
74
protected:
75
    // user-definable data
76
    TQSize _pItemSize,_pSpaceSize,_pBorderSize,_pFrameSize;
77
    Slack _slackX, _slackY;
78
    bool _conserveSpace;
79
    Qt::Orientation _orientation;
80
    int _numItems;
81
82
    // results
83
    mutable TQSize _itemSize, _spaceSize, _borderSize, _gridDim, _gridSpacing, _frameSize;
84
    mutable TQPoint _origin;
85
86
    // status
87
    mutable bool _dirty, _valid;
88
89
};
90
91
92
// reconfigure the grid if necessary.
93
inline void FlowGridManager::_checkReconfigure() const
94
{   if (!_dirty) return;
95
    _reconfigure();
96
}
97
98
#endif
99
(-)kicker/applets/launcher/Makefile.am (-4 / +7 lines)
Lines 3-12 Link Here
3
3
4
kde_module_LTLIBRARIES = launcher_panelapplet.la
4
kde_module_LTLIBRARIES = launcher_panelapplet.la
5
5
6
launcher_panelapplet_la_SOURCES = quicklauncher.skel quicklauncher.cpp quickbutton.cpp quickaddappsmenu.cpp flowgridmanager.cpp popularity.cpp configdlgbase.ui prefs.kcfgc configdlg.cpp
6
launcher_panelapplet_la_SOURCES = quicklauncher.skel quicklauncher.cpp quickbutton.cpp quickaddappsmenu.cpp popularity.cpp configdlgbase.ui prefs.kcfgc configdlg.cpp
7
7
8
METASOURCES = AUTO
8
METASOURCES = AUTO
9
noinst_HEADERS = quicklauncher.h quickbutton.h quickaddappsmenu.h easyvector.h quickbuttongroup.h flowgridmanager.h popularity.h configdlg.h
9
noinst_HEADERS = quicklauncher.h quickbutton.h quickaddappsmenu.h easyvector.h quickbuttongroup.h popularity.h configdlg.h
10
10
11
lnkdir = $(kde_datadir)/kicker/applets
11
lnkdir = $(kde_datadir)/kicker/applets
12
lnk_DATA = quicklauncher.desktop
12
lnk_DATA = quicklauncher.desktop
Lines 14-25 Link Here
14
EXTRA_DIST = $(lnk_DATA)
14
EXTRA_DIST = $(lnk_DATA)
15
15
16
launcher_panelapplet_la_LDFLAGS = -module $(KDE_RPATH) $(all_libraries) -avoid-version -no-undefined
16
launcher_panelapplet_la_LDFLAGS = -module $(KDE_RPATH) $(all_libraries) -avoid-version -no-undefined
17
launcher_panelapplet_la_LIBADD = ../../kicker/core/libkicker_core.la  ../../kicker/buttons/libkicker_buttons.la \
17
launcher_panelapplet_la_LIBADD = ../../kicker/buttons/libkicker_buttons.la \
18
				../../kicker/ui/libkicker_ui.la ../../libkicker/libkickermain.la $(LIB_KIO) \
18
				../../libkicker/libkickermain.la $(LIB_KIO) \
19
				$(LIB_KSYCOCA) $(LIB_KDEUI) $(LIB_KUTILS)
19
				$(LIB_KSYCOCA) $(LIB_KDEUI) $(LIB_KUTILS)
20
20
21
kde_kcfg_DATA = launcherapplet.kcfg
21
kde_kcfg_DATA = launcherapplet.kcfg
22
22
23
$(kde_module_LTLIBRARIES): LIBTOOL := $(LIBTOOL) --preserve-dup-deps
24
$(kde_module_LTLIBRARIES).closure: LIBTOOL := $(LIBTOOL) --preserve-dup-deps
25
23
messages: rc.cpp
26
messages: rc.cpp
24
	$(XGETTEXT) *.cpp *.h -o $(podir)/quicklauncher.pot
27
	$(XGETTEXT) *.cpp *.h -o $(podir)/quicklauncher.pot
25
28

Return to bug 455