|
|
@ -143,13 +143,8 @@ MediaListBox::MediaListBox( TQWidget * parent, const char * name, WFlags f ) : R
|
|
|
|
popupMenu->insertItem(i18n("Device List"), devicePopup, 1, 0);
|
|
|
|
popupMenu->insertItem(i18n("Device List"), devicePopup, 1, 0);
|
|
|
|
popupMenu->insertSeparator( 0 );
|
|
|
|
popupMenu->insertSeparator( 0 );
|
|
|
|
|
|
|
|
|
|
|
|
#if KDE_IS_VERSION(3,4,90)
|
|
|
|
|
|
|
|
insertItem(new ListBoxDevice("system", size_, i18n("My Computer"), "system:/", "", "", TRUE, FALSE, FALSE));
|
|
|
|
insertItem(new ListBoxDevice("system", size_, i18n("My Computer"), "system:/", "", "", TRUE, FALSE, FALSE));
|
|
|
|
insertItem(new ListBoxDevice("network", size_, i18n("Network"), "remote:/", "", "", TRUE, FALSE, FALSE));
|
|
|
|
insertItem(new ListBoxDevice("network", size_, i18n("Network"), "remote:/", "", "", TRUE, FALSE, FALSE));
|
|
|
|
#else
|
|
|
|
|
|
|
|
insertItem(new ListBoxDevice("system", size_, i18n("My Computer"), "media:/", "", "", TRUE, FALSE, FALSE));
|
|
|
|
|
|
|
|
insertItem(new ListBoxDevice("network", size_, i18n("Network"), "lan:/localhost", "", "", TRUE, FALSE, FALSE));
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
insertItem(new ListBoxDevice("hdd_mount", size_, i18n("Startvolume"), TQDir::rootDirPath(), "", "", TRUE, FALSE, FALSE));
|
|
|
|
insertItem(new ListBoxDevice("hdd_mount", size_, i18n("Startvolume"), TQDir::rootDirPath(), "", "", TRUE, FALSE, FALSE));
|
|
|
|
client = TDEApplication::dcopClient();
|
|
|
|
client = TDEApplication::dcopClient();
|
|
|
|
client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(TQString)", "BaghiraSidebarIface", "mediumAdded(TQString)", FALSE);
|
|
|
|
client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(TQString)", "BaghiraSidebarIface", "mediumAdded(TQString)", FALSE);
|
|
|
@ -279,11 +274,7 @@ ListBoxDevice *MediaListBox::createListBoxDevice(TQStringList & deviceProperties
|
|
|
|
label = deviceProperties[MEDIALIST_PROPS*n+LABEL];
|
|
|
|
label = deviceProperties[MEDIALIST_PROPS*n+LABEL];
|
|
|
|
label = i18n(label.section( " (", 0, 0 ).utf8());
|
|
|
|
label = i18n(label.section( " (", 0, 0 ).utf8());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#if KDE_IS_VERSION(3,4,90)
|
|
|
|
|
|
|
|
return new ListBoxDevice( icon, size_, label, "system:/media/"+deviceProperties[MEDIALIST_PROPS*n+NAME], deviceProperties[MEDIALIST_PROPS*n+NAME], deviceProperties[MEDIALIST_PROPS*n+DEVICE_NODE], deviceProperties[MEDIALIST_PROPS*n+MOUNTED] == "true", icon.contains("dvd") || icon.contains("cdrom") || icon.contains("cdwriter"),icon.contains("floppy"), devicePopup->insertItem(deviceProperties[MEDIALIST_PROPS*n+NAME], this, SLOT(toggleDevice(int))));
|
|
|
|
return new ListBoxDevice( icon, size_, label, "system:/media/"+deviceProperties[MEDIALIST_PROPS*n+NAME], deviceProperties[MEDIALIST_PROPS*n+NAME], deviceProperties[MEDIALIST_PROPS*n+DEVICE_NODE], deviceProperties[MEDIALIST_PROPS*n+MOUNTED] == "true", icon.contains("dvd") || icon.contains("cdrom") || icon.contains("cdwriter"),icon.contains("floppy"), devicePopup->insertItem(deviceProperties[MEDIALIST_PROPS*n+NAME], this, SLOT(toggleDevice(int))));
|
|
|
|
#else
|
|
|
|
|
|
|
|
return new ListBoxDevice( icon, size_, label, "media:/"+deviceProperties[MEDIALIST_PROPS*n+NAME], deviceProperties[MEDIALIST_PROPS*n+NAME], deviceProperties[MEDIALIST_PROPS*n+DEVICE_NODE], deviceProperties[MEDIALIST_PROPS*n+MOUNTED] == "true", icon.contains("dvd") || icon.contains("cdrom") || icon.contains("cdwriter"),icon.contains("floppy"),devicePopup->insertItem(deviceProperties[MEDIALIST_PROPS*n+NAME], this, SLOT(toggleDevice(int))));
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int MediaListBox::index (const TQString & name )
|
|
|
|
int MediaListBox::index (const TQString & name )
|
|
|
|