~ubuntu-branches/ubuntu/vivid/regina-normal/vivid

« back to all changes in this revision

Viewing changes to qtui/src/newpacketdialog.cpp

  • Committer: Package Import Robot
  • Author(s): Ben Burton
  • Date: 2013-11-02 11:44:32 UTC
  • mfrom: (1.2.8)
  • Revision ID: package-import@ubuntu.com-20131102114432-acgci6b1pb2hjl8q
Tags: 4.95-1
* New upstream release.
* The python module is now installed in a standard location beneath
  /usr/lib/python2.7/dist-packages.
* Switched python packaging from python-support to dh_python2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
    QLabel* createBeneath = new QLabel(parentPrompt);
69
69
    createBeneath->setWhatsThis(expln);
70
70
    parentStrip->addWidget(createBeneath);
71
 
    chooser = new PacketChooser(tree, useFilter, false, defaultParent);
 
71
    chooser = new PacketChooser(tree, useFilter,
 
72
        PacketChooser::ROOT_AS_INSERTION_POINT, false, defaultParent);
72
73
    chooser->setWhatsThis(expln);
73
74
    parentStrip->addWidget(chooser, 1);
74
75
 
78
79
    QLabel* newlabel = new QLabel(tr("Label:"));
79
80
    newlabel->setWhatsThis(expln);
80
81
    labelStrip->addWidget(newlabel);
81
 
    label = new QLineEdit(tree->makeUniqueLabel(
82
 
        suggestedLabel.toAscii().constData()).c_str());
 
82
    label = new QLineEdit(suggestedLabel);
83
83
    label->setWhatsThis(expln);
84
84
    labelStrip->addWidget(label, 1);
85
85
 
129
129
            "the new packet."),
130
130
            tr("<qt>The packet <i>%1</i> cannot act as a parent for "
131
131
            "the new packet.</qt>").
132
 
            arg(Qt::escape(parentPacket->getPacketLabel().c_str())));
 
132
            arg(Qt::escape(parentPacket->getHumanLabel().c_str())));
133
133
        return;
134
134
    }
135
135
 
140
140
            tr("Please enter a label for the new packet."));
141
141
        return;
142
142
    }
143
 
    if (tree->findPacketLabel(std::string(useLabel.toAscii().constData()))) {
144
 
        ReginaSupport::info(this,
145
 
            tr("Another packet is already using this label."),
146
 
            tr("Each packet in your data file must have its own unique "
147
 
            "label.  I will suggest a different label that is not in use."));
148
 
        label->setText(tree->makeUniqueLabel(
149
 
            useLabel.toAscii().constData()).c_str());
150
 
        return;
151
 
    }
152
143
 
153
 
    // Create the new packet.  Hide ourselves since this could take a
154
 
    // while.
 
144
    // Create the new packet.  Hide ourselves since this could take a while.
155
145
    newPacket = creator->createPacket(parentPacket, this);
156
146
    if (! newPacket)
157
147
        return;