Toolbar "standard" "Standard"
Layouts
- Item "New document" "buffer-new"
- Item "Open document" "file-open"
- Item "Save document" "buffer-write"
- Item "Print document" "dialog-show print"
+ Item "Default" "layout"
+ Item "Numbered list" "layout Enumerate"
+ Item "Itemized list" "layout Itemize"
+ Item "List" "layout List"
+ Item "Description" "layout Description"
+ Item "Increase depth" "depth-increment"
+ Item "Decrease depth" "depth-decrement"
+ Item "Paragraph settings" "layout-paragraph"
+ Separator
+ Item "Toggle emphasis" "font-emph"
+ Item "Toggle noun" "font-noun"
+ Item "Apply last" "textstyle-apply"
+ Item "Text style" "dialog-show character"
+ Separator
+ Item "Insert math" "math-mode on"
+ Item "Insert graphics" "dialog-show-new-inset graphics"
+ TableInsert "Insert table"
+ Separator
+ Item "View" "buffer-view"
Separator
Item "Check spelling" "dialog-show spellchecker"
+ Item "Thesaurus" "thesaurus-entry"
Separator
+ Item "Toggle outline" "dialog-toggle toc"
+ End
+
+ Toolbar "file" "File"
+ Item "New document" "buffer-new"
+ Item "Open document" "file-open"
+ Item "Save document" "buffer-write"
+ End
+
+ Toolbar "edit" "Edit"
Item "Undo" "undo"
Item "Redo" "redo"
+ Separator
Item "Cut" "cut"
Item "Copy" "copy"
Item "Paste" "paste"
+ Separator
Item "Find and replace" "dialog-show findreplace"
Item "Find and replace (advanced)" "dialog-toggle findreplaceadv"
Item "Navigate back" "bookmark-goto 0"
- Separator
- Item "Toggle emphasis" "font-emph"
- Item "Toggle noun" "font-noun"
- Item "Apply last" "textstyle-apply"
- Separator
- Item "Insert math" "math-mode on"
- Item "Insert graphics" "dialog-show-new-inset graphics"
- TableInsert "Insert table"
- Separator
- Item "Toggle outline" "dialog-toggle toc"
- Item "Toggle math toolbar" "toolbar-toggle math"
- Item "Toggle table toolbar" "toolbar-toggle table"
End
Toolbar "view/update" "View/Update"
Item "Update" "buffer-update"
Item "View master document" "master-buffer-view"
Item "Update master document" "master-buffer-update"
- Item "Enable Forward/Reverse Search" "buffer-toggle-output-sync"
Separator
StickyPopupMenu "view-others" "View other formats"
StickyPopupMenu "update-others" "Update other formats"
End
Toolbar "extra" "Extra"
- Item "Default" "layout"
- Item "Numbered list" "layout Enumerate"
- Item "Itemized list" "layout Itemize"
- Item "List" "layout List"
- Item "Description" "layout Description"
- Item "Increase depth" "depth-increment"
- Item "Decrease depth" "depth-decrement"
- Separator
Item "Insert figure float" "float-insert figure"
Item "Insert table float" "float-insert table"
Item "Insert label" "label-insert"
Item "Insert math macro" "math-macro newmacroname newcommand"
Item "Include file" "dialog-show-new-inset include"
Separator
- Item "Text style" "dialog-show character"
- Item "Paragraph settings" "layout-paragraph"
- Item "Thesaurus" "thesaurus-entry"
End
Toolbar "table" "Table"
connect(displayGraphicsCB, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(instantPreviewCO, SIGNAL(activated(int)), this, SIGNAL(changed()));
connect(previewSizeSB, SIGNAL(valueChanged(double)), this, SIGNAL(changed()));
- connect(iconSetCO, SIGNAL(activated(int)), this, SIGNAL(changed()));
connect(paragraphMarkerCB, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
}
break;
}
- switch (iconSetCO->currentIndex()) {
- case 0:
- rc.icon_set.clear();
- break;
- default:
- rc.icon_set = fromqstr(iconSetCO->currentText().toLower());
- break;
- }
-
rc.display_graphics = displayGraphicsCB->isChecked();
rc.preview_scale_factor = previewSizeSB->value();
rc.paragraph_markers = paragraphMarkerCB->isChecked();
break;
}
- string name = rc.icon_set.empty() ? "default" : rc.icon_set;
- name[0] = uppercase(name[0]);
- int iconset = iconSetCO->findText(qt_(name));
- if (iconset < 0)
- iconset = 0;
- iconSetCO->setCurrentIndex(iconset);
-
displayGraphicsCB->setChecked(rc.display_graphics);
instantPreviewCO->setEnabled(rc.display_graphics);
previewSizeSB->setValue(rc.preview_scale_factor);
this, SLOT(selectUi()));
connect(uiFileED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
+ connect(iconSetCO, SIGNAL(activated(int)),
+ this, SIGNAL(changed()));
connect(restoreCursorCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
connect(loadSessionCB, SIGNAL(clicked()),
connect(tooltipCB, SIGNAL(toggled(bool)),
this, SIGNAL(changed()));
lastfilesSB->setMaximum(maxlastfiles);
+
+ icon_names_.clear();
+ icon_names_.push_back(make_pair("default", qt_("Default")));
+ icon_names_.push_back(make_pair("liber", qt_("Liber")));
+ icon_names_.push_back(make_pair("oxygen", qt_("Oxygen")));
+ iconSetCO->addItem(icon_names_[0].second);
+ iconSetCO->addItem(icon_names_[1].second);
+ iconSetCO->addItem(icon_names_[2].second);
}
void PrefUserInterface::apply(LyXRC & rc) const
{
+ int const iconset = iconSetCO->currentIndex();
+ if (iconset > 0)
+ rc.icon_set = icon_names_[iconset].first;
+ else
+ rc.icon_set.clear();
+
rc.ui_file = internal_path(fromqstr(uiFileED->text()));
rc.use_lastfilepos = restoreCursorCB->isChecked();
rc.load_session = loadSessionCB->isChecked();
void PrefUserInterface::update(LyXRC const & rc)
{
+ unsigned int iconset = 0;
+ if (!rc.icon_set.empty()) {
+ for ( ; iconset < icon_names_.size(); ++iconset) {
+ if (rc.icon_set == icon_names_[iconset].first)
+ break;
+ }
+ }
+ iconset = iconSetCO->findText(icon_names_[iconset].second);
+ if (iconset < 0)
+ iconset = 0;
+ iconSetCO->setCurrentIndex(iconset);
uiFileED->setText(toqstr(external_path(rc.ui_file)));
restoreCursorCB->setChecked(rc.use_lastfilepos);
loadSessionCB->setChecked(rc.load_session);
#include "ui_ShortcutUi.h"
#include <string>
+#include <utility>
#include <vector>
public Q_SLOTS:
void selectUi();
void on_clearSessionPB_clicked();
+
+private:
+ /// icon names and their translations
+ std::vector<std::pair<std::string, QString> > icon_names_;
};
</property>
</widget>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="iconSetLA" >
- <property name="text" >
- <string>Icon &Set:</string>
- </property>
- <property name="buddy" >
- <cstring>iconSetCO</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QComboBox" name="iconSetCO" >
- <property name="toolTip" >
- <string>The icon set to use. Warning: size of icons may be wrong
-until you save the preferences, restart LyX and choose
-"Normal-sized icons" from the toolbar menu.</string>
- </property>
- <item>
- <property name="text" >
- <string>Default</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Liber</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Oxygen</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="3" column="0" colspan="2" >
+ <item row="2" column="0" colspan="2" >
<widget class="QCheckBox" name="paragraphMarkerCB" >
<property name="toolTip" >
<string>Mark end of paragraphs on screen with a pilcrow character.</string>
</property>
</widget>
</item>
- <item row="4" column="0" >
+ <item row="3" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
- <item row="1" column="0" colspan="4">
+ <item row="1" column="0" >
+ <widget class="QLabel" name="iconSetLA" >
+ <property name="text" >
+ <string>&Icon Set:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>iconSetCO</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QComboBox" name="iconSetCO" >
+ <property name="toolTip" >
+ <string>The icon set to use. Warning: size of icons may be wrong
+until you save the preferences, restart LyX and choose
+"Normal-sized icons" from the toolbar menu.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="4">
<widget class="QGroupBox" name="pixmapCacheGB_2">
<property name="title">
<string>Automatic help</string>
</layout>
</widget>
</item>
- <item row="2" column="0" colspan="4">
+ <item row="3" column="0" colspan="4">
<widget class="QGroupBox" name="GeometryGB">
<property name="title">
<string>Session</string>
<item row="3" column="0">
<widget class="QPushButton" name="clearSessionPB">
<property name="text">
- <string>Clear all session &information</string>
+ <string>&Clear all session information</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
- <item row="3" column="0" colspan="4">
+ <item row="4" column="0" colspan="4">
<widget class="QGroupBox" name="documentsGB">
<property name="title">
<string>Documents</string>
</layout>
</widget>
</item>
- <item row="4" column="0" colspan="4">
+ <item row="5" column="0" colspan="4">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>