* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "editbookmarkdialog.h"
***************************************************************************/
#include "editbookmarkdialog.h"
const QString& icon)
{
EditBookmarkDialog dialog(title, name, url, icon);
const QString& icon)
{
EditBookmarkDialog dialog(title, name, url, icon);
- m_bookmark = KBookmark::standaloneBookmark(m_name->text(),
- KURL(m_location->text()),
- m_iconName);
+ if (button==Ok) {
+ m_bookmark = KBookmark::standaloneBookmark(m_name->text(),
+ KUrl(m_location->text()),
+ m_iconName);
+ }
- Q3VBoxLayout* topLayout = new Q3VBoxLayout(plainPage(), 0, spacingHint());
+ setCaption(title);
+ setButtons(Ok|Cancel);
+ setDefaultButton(Ok);
+
+ QWidget *page = new QWidget(this);
+ setMainWidget(page);
+
+ Q3VBoxLayout* topLayout = new Q3VBoxLayout(page, 0, spacingHint());
// create location widgets
new QLabel(i18n("Location:"), grid);
// create location widgets
new QLabel(i18n("Location:"), grid);
locationBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
locationBox->setSpacing(spacingHint());
locationBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
locationBox->setSpacing(spacingHint());
m_location->setMinimumWidth(320);
QPushButton* selectLocationButton = new QPushButton(SmallIcon("folder"), QString::null, locationBox);
m_location->setMinimumWidth(320);
QPushButton* selectLocationButton = new QPushButton(SmallIcon("folder"), QString::null, locationBox);