On Tue, 20 Jul 1999, Harri Porten wrote: > Greg Lee wrote: > > > > kdemultimedia/kmidi in the cvs tree doesn't compile because > > kpanning has disappeared from libkdeui. I fixed it by copying > > in kpanning.cpp and kpanning.h from v1.1 kdelibs/kdeui and > > adding (for qt2.00) to kpanning.h "#include ". > > This might work but it is intented that KPanner will be replaced by > QSplitter. Somebody seems to have forgotten kmidi ... > > If you haven't programmed with Qt/KDE so far it would be a good start to > do this now and do this conversion. We'll happily include your patch if > you come up with one. > Here's the patch. I also removed calls to kdedir() and localkdedir(), which produced complaints. (Couldn't get addResource to work, though.) Greg Lee ----------patch from kmidi source directory------------------- *** zreal/playlist.h Wed Jul 21 10:00:09 1999 --- playlist.h Wed Jul 21 17:17:15 1999 *************** *** 44,50 **** #include #include ! #include #include "kmidi.h" --- 44,50 ---- #include #include ! #include #include "kmidi.h" *************** *** 98,104 **** void addEntry(); void checkList(); void local_file_selected(int index); ! void pannerHasChanged(); void loadPlaylist(const QString &name); --- 98,104 ---- void addEntry(); void checkList(); void local_file_selected(int index); ! //void pannerHasChanged(); void loadPlaylist(const QString &name); *************** *** 115,121 **** QDir cur_local_dir; QList cur_local_fileinfo; QListBox *local_list; ! KPanner *panner; QLabel *statusbar; QMenuBar *menu; --- 115,121 ---- QDir cur_local_dir; QList cur_local_fileinfo; QListBox *local_list; ! QSplitter *panner; QLabel *statusbar; QMenuBar *menu; *** zreal/playlist.cpp.real Tue Jul 20 03:20:06 1999 --- playlist.cpp Wed Jul 21 17:12:29 1999 *************** *** 24,30 **** #include - #include #include #include --- 24,29 ---- *************** *** 72,82 **** menu->insertItem( i18n("&Edit"), edit ); menu->insertSeparator(); menu->insertItem( i18n("&Help"), help ); - - panner = new KPanner(this, "_panner", KPanner::O_VERTICAL, 30); ! connect(panner, SIGNAL(positionChanged()), this, SLOT(pannerHasChanged())); ! listbox = new QListBox(panner->child1(),"listbox",0); connect(listbox, SIGNAL(selected(int)), this, SLOT(removeEntry())); --- 71,82 ---- menu->insertItem( i18n("&Edit"), edit ); menu->insertSeparator(); menu->insertItem( i18n("&Help"), help ); ! panner = new QSplitter( QSplitter::Horizontal, this , "_panner" ); ! ! //connect(panner, SIGNAL(positionChanged()), this, SLOT(pannerHasChanged())); ! local_list = new QListBox(panner, "local_list",0); ! listbox = new QListBox(panner,"listbox",0); connect(listbox, SIGNAL(selected(int)), this, SLOT(removeEntry())); *************** *** 97,105 **** okButton->setText(i18n("OK")); connect(okButton,SIGNAL(clicked()),this,SLOT(checkList())); - local_list = new QListBox(panner->child0(), "local_list",0); - //local_list = new QListBox(this, "local_list",0); - local_list->insertItem("Local Directory", -1); connect(local_list, SIGNAL(selected(int )), this, SLOT(local_file_selected(int ))); --- 97,102 ---- *************** *** 298,303 **** --- 295,301 ---- // printf("Current Dir Path: %s\n",QDir::currentDirPath().data()); } + #if 0 void PlaylistDialog::pannerHasChanged(){ // resizeEvent(0); *************** *** 305,310 **** --- 303,309 ---- listbox->resize( panner->child1()->width(), panner->child1()->height()); } + #endif void PlaylistDialog::addEntry(){ *************** *** 357,366 **** panner->setGeometry( BORDER_WIDTH, menu->height() + BORDER_WIDTH , w - 2*BORDER_WIDTH, h - 37 - menu->height()); ! panner->setSeparator(panner->getSeparator()); ! local_list->resize( panner->child0()->width(), panner->child0()->height()); ! listbox->resize( panner->child1()->width(), panner->child1()->height()); okButton->setGeometry(BORDER_WIDTH + 70 + 7 ,h - 28 ,70,25); removeButton->setGeometry(w - 70 -70 - 10 - BORDER_WIDTH ,h - 28, 70,25); --- 356,365 ---- panner->setGeometry( BORDER_WIDTH, menu->height() + BORDER_WIDTH , w - 2*BORDER_WIDTH, h - 37 - menu->height()); ! //panner->setSeparator(panner->getSeparator()); ! //local_list->resize( panner->child0()->width(), panner->child0()->height()); ! //listbox->resize( panner->child1()->width(), panner->child1()->height()); okButton->setGeometry(BORDER_WIDTH + 70 + 7 ,h - 28 ,70,25); removeButton->setGeometry(w - 70 -70 - 10 - BORDER_WIDTH ,h - 28, 70,25); *************** *** 390,397 **** if(name.isEmpty()) return; - QString home = KApplication::localkdedir(); QDir savedir(home); if(!savedir.exists()){ --- 389,396 ---- if(name.isEmpty()) return; + QString home = QDir::homeDirPath() + "/.kde/share/apps/kmidi"; QDir savedir(home); if(!savedir.exists()){ *************** *** 430,436 **** current_playlist = name; ! QString home = KApplication::localkdedir() + "/share/apps/kmidi"; QDir savedir(home); --- 429,435 ---- current_playlist = name; ! QString home = QDir::homeDirPath() + "/.kde/share/apps/kmidi"; QDir savedir(home); *** zreal/kmidi.cpp Wed Jul 21 12:36:33 1999 --- kmidi.cpp Wed Jul 21 17:06:37 1999 *************** *** 32,37 **** --- 32,38 ---- #include #include + #include #include "kmidi.h" *************** *** 455,461 **** QDir dir; QString d; ! d = KApplication::localkdedir(); dir.setPath(d); if(!dir.exists()){ dir.mkdir(d); --- 456,463 ---- QDir dir; QString d; ! d = QDir::homeDirPath() + "/.kde"; ! dir.setPath(d); if(!dir.exists()){ dir.mkdir(d); *************** *** 768,775 **** label->setAlignment(AlignLeft|WordBreak|ExpandTabs); label->setText(labelstring); ! QString pixdir = thisapp->kde_datadir() + "/kmidi/pics/"; ! QPixmap pm(pixdir + "kmidilogo.xpm"); QLabel *logo = new QLabel(box); --- 770,776 ---- label->setAlignment(AlignLeft|WordBreak|ExpandTabs); label->setText(labelstring); ! QString pixdir = KStandardDirs::kde_default("data") + "/kmidi/pics/"; QPixmap pm(pixdir + "kmidilogo.xpm"); QLabel *logo = new QLabel(box); *************** *** 869,875 **** void KMidi::loadplaylist(){ ! QString home = KApplication::localkdedir() + "/share/apps/kmidi"; QDir savedir(home); --- 870,876 ---- void KMidi::loadplaylist(){ ! QString home = QDir::homeDirPath() + "/.kde/share/apps/kmidi"; QDir savedir(home);