Changeset 6224 for trunk/qt4-gui/src/widgets
- Timestamp:
- 05/28/08 13:47:07 (6 months ago)
- Location:
- trunk/qt4-gui/src/widgets
- Files:
-
- 2 modified
-
protocombobox.cpp (modified) (1 diff)
-
protocombobox.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/widgets/protocombobox.cpp
r5822 r6224 31 31 : QComboBox(parent) 32 32 { 33 fillComboBox(); 34 } 35 36 ProtoComboBox::ProtoComboBox(bool skipExisting, QWidget* parent) 37 : QComboBox(parent) 38 { 39 fillComboBox(skipExisting); 40 } 41 42 void ProtoComboBox::fillComboBox(bool skipExisting) 43 { 44 QString id; 45 unsigned long ppid; 46 ICQOwner* o; 47 33 48 FOR_EACH_PROTO_PLUGIN_START(gLicqDaemon) 34 49 { 35 unsigned long ppid = (*_ppit)->PPID(); 50 ppid = (*_ppit)->PPID(); 51 o = gUserManager.FetchOwner(ppid, LOCK_R); 52 if (o == NULL) 53 id = "0"; 54 else 55 { 56 if (skipExisting) 57 { 58 gUserManager.DropOwner(ppid); 59 continue; 60 } 61 else 62 { 63 id = o->IdString(); 64 gUserManager.DropOwner(ppid); 65 } 66 } 67 36 68 addItem( 37 IconManager::instance()->iconForStatus(ICQ_STATUS_ONLINE, "0", ppid), // icon69 IconManager::instance()->iconForStatus(ICQ_STATUS_ONLINE, id, ppid), // icon 38 70 (*_ppit)->Name(), // protocol name 39 71 QString::number(ppid) // user data -
trunk/qt4-gui/src/widgets/protocombobox.h
r5822 r6224 33 33 public: 34 34 ProtoComboBox(QWidget* parent = 0); 35 ProtoComboBox(bool skipExisting, QWidget* parent = 0); 35 36 36 37 unsigned long currentPpid() const; 37 38 bool setCurrentPpid(unsigned long ppid); 39 40 private: 41 void fillComboBox(bool skipExisting = false); 38 42 }; 39 43
