Browse Source

Configuration text all uses the same context

Neal Wilson 8 years ago
parent
commit
2fd5653a5d
1 changed files with 14 additions and 14 deletions
  1. 14
    14
      src/typica.w

+ 14
- 14
src/typica.w View File

4681
         }
4681
         }
4682
         else if(element.tagName() == "layout")
4682
         else if(element.tagName() == "layout")
4683
         {
4683
         {
4684
-            element.setAttribute("trcontext", targetID);
4684
+            element.setAttribute("trcontext", "configuration");
4685
             addLayoutToWidget(element, &widgetStack, &layoutStack);
4685
             addLayoutToWidget(element, &widgetStack, &layoutStack);
4686
         }
4686
         }
4687
         else if(element.tagName() == "menu")
4687
         else if(element.tagName() == "menu")
4868
                 QWidget *widget = new QWidget;
4868
                 QWidget *widget = new QWidget;
4869
                 layout->addWidget(widget);
4869
                 layout->addWidget(widget);
4870
                 widgetStack->push(widget);
4870
                 widgetStack->push(widget);
4871
-                currentElement.setAttribute("trcontext", element.attribute("trcontext"));
4871
+                currentElement.setAttribute("trcontext", "configuration");
4872
                 populateWidget(currentElement, widgetStack, layoutStack);
4872
                 populateWidget(currentElement, widgetStack, layoutStack);
4873
                 widgetStack->pop();
4873
                 widgetStack->pop();
4874
             }
4874
             }
4979
             QHBoxLayout *cell = new QHBoxLayout;
4979
             QHBoxLayout *cell = new QHBoxLayout;
4980
             layout->addLayout(cell, row, column, vspan, hspan);
4980
             layout->addLayout(cell, row, column, vspan, hspan);
4981
             layoutStack->push(cell);
4981
             layoutStack->push(cell);
4982
-            columnElement.setAttribute("trcontext", element.attribute("trcontext"));
4982
+            columnElement.setAttribute("trcontext", "configuration");
4983
             populateBoxLayout(columnElement, widgetStack, layoutStack);
4983
             populateBoxLayout(columnElement, widgetStack, layoutStack);
4984
             layoutStack->pop();
4984
             layoutStack->pop();
4985
         }
4985
         }
5002
         if(current.isElement())
5002
         if(current.isElement())
5003
         {
5003
         {
5004
             currentElement = current.toElement();
5004
             currentElement = current.toElement();
5005
-            currentElement.setAttribute("trcontext", element.attribute("trcontext"));
5005
+            currentElement.setAttribute("trcontext", "configuration");
5006
             if(currentElement.tagName() == "button")
5006
             if(currentElement.tagName() == "button")
5007
             {
5007
             {
5008
                 addButtonToLayout(currentElement, widgetStack, layoutStack);
5008
                 addButtonToLayout(currentElement, widgetStack, layoutStack);
5029
                 QBoxLayout *layout =
5029
                 QBoxLayout *layout =
5030
                     qobject_cast<QBoxLayout *>(layoutStack->top());
5030
                     qobject_cast<QBoxLayout *>(layoutStack->top());
5031
                 QLabel *label = new QLabel(QCoreApplication::translate(
5031
                 QLabel *label = new QLabel(QCoreApplication::translate(
5032
-                    element.attribute("trcontext").toAscii().data(),
5032
+                    "configuration",
5033
                     currentElement.text().toUtf8().data()));
5033
                     currentElement.text().toUtf8().data()));
5034
                 layout->addWidget(label);
5034
                 layout->addWidget(label);
5035
             }
5035
             }
5174
         if(current.isElement())
5174
         if(current.isElement())
5175
         {
5175
         {
5176
             currentElement = current.toElement();
5176
             currentElement = current.toElement();
5177
-            currentElement.setAttribute("trcontext", element.attribute("trcontext"));
5177
+            currentElement.setAttribute("trcontext", "configuration");
5178
             if(currentElement.tagName() == "decoration")
5178
             if(currentElement.tagName() == "decoration")
5179
             {
5179
             {
5180
                 addDecorationToSplitter(currentElement, widgetStack,
5180
                 addDecorationToSplitter(currentElement, widgetStack,
5321
 
5321
 
5322
 @<Set up decoration@>=
5322
 @<Set up decoration@>=
5323
 QString labelText =
5323
 QString labelText =
5324
-    QCoreApplication::translate(element.attribute("trcontext").toAscii().data(),
5324
+    QCoreApplication::translate("configuration",
5325
     element.attribute("name").toUtf8().data());
5325
     element.attribute("name").toUtf8().data());
5326
 Qt::Orientations@, orientation = Qt::Horizontal;
5326
 Qt::Orientations@, orientation = Qt::Horizontal;
5327
 if(element.hasAttribute("type"))
5327
 if(element.hasAttribute("type"))
5418
             currentElement = current.toElement();
5418
             currentElement = current.toElement();
5419
             if(currentElement.tagName() == "layout")
5419
             if(currentElement.tagName() == "layout")
5420
             {
5420
             {
5421
-                currentElement.setAttribute("trcontext", element.attribute("trcontext"));
5421
+                currentElement.setAttribute("trcontext", "configuration");
5422
                 addLayoutToWidget(currentElement, widgetStack, layoutStack);
5422
                 addLayoutToWidget(currentElement, widgetStack, layoutStack);
5423
             }
5423
             }
5424
         }
5424
         }
5435
 {
5435
 {
5436
     QAbstractButton *button = NULL;
5436
     QAbstractButton *button = NULL;
5437
     QString text =
5437
     QString text =
5438
-        QCoreApplication::translate(element.attribute("trcontext").toAscii().data(),
5438
+        QCoreApplication::translate("configuration",
5439
                                     element.attribute("name").toUtf8().data());
5439
                                     element.attribute("name").toUtf8().data());
5440
     if(element.hasAttribute("type"))
5440
     if(element.hasAttribute("type"))
5441
     {
5441
     {
5491
     if(element.hasAttribute("pretext"))
5491
     if(element.hasAttribute("pretext"))
5492
     {
5492
     {
5493
         box->setPretext(QCoreApplication::translate(
5493
         box->setPretext(QCoreApplication::translate(
5494
-                        element.attribute("trcontext").toAscii().data(),
5494
+                        "configuration",
5495
                         element.attribute("pretext").toUtf8().data()));
5495
                         element.attribute("pretext").toUtf8().data()));
5496
     }
5496
     }
5497
     if(element.hasAttribute("posttext"))
5497
     if(element.hasAttribute("posttext"))
5498
     {
5498
     {
5499
         box->setPosttext(QCoreApplication::translate(
5499
         box->setPosttext(QCoreApplication::translate(
5500
-                         element.attribute("trcontext").toAscii().data(),
5500
+                         "configuration",
5501
                          element.attribute("posttext").toUtf8().data()));
5501
                          element.attribute("posttext").toUtf8().data()));
5502
     }
5502
     }
5503
     if(element.hasAttribute("series"))
5503
     if(element.hasAttribute("series"))
5568
                 {
5568
                 {
5569
                     QString text =
5569
                     QString text =
5570
                         QCoreApplication::translate(
5570
                         QCoreApplication::translate(
5571
-                            element.attribute("trcontext").toAscii().data(),
5571
+                            "configuration",
5572
                             currentElement.text().toUtf8().data());
5572
                             currentElement.text().toUtf8().data());
5573
                     widget->setHeaderData(column, text);
5573
                     widget->setHeaderData(column, text);
5574
                     column++;
5574
                     column++;
5716
                         model->setHeaderData(currentColumn,
5716
                         model->setHeaderData(currentColumn,
5717
                             Qt::Horizontal,
5717
                             Qt::Horizontal,
5718
                             QCoreApplication::translate(
5718
                             QCoreApplication::translate(
5719
-                                element.attribute("trcontext").toAscii().data(),
5720
-                                    currentElement.attribute("name").toUtf8().data()));
5719
+                                "configuration",
5720
+                                currentElement.attribute("name").toUtf8().data()));
5721
                     }
5721
                     }
5722
                     if(currentElement.hasAttribute("delegate"))
5722
                     if(currentElement.hasAttribute("delegate"))
5723
                     {
5723
                     {

Loading…
Cancel
Save