Mercurial > hg > octave-nkf
comparison libgui/src/settings-dialog.ui @ 15972:22ab4fe661d7
gui: selectable language in settings dialog
* octave-gui.cc(octave_start_gu): install translators for gui and qt strings
* resource-manager.cc(get_gui_translation_dir): new function returning the
directory of the translator files
* resource-manager.cc(config_translators): new function replacing
find_trnaslator_file and configuring the translators for gui and qt strings
* resource-manager.h: declaration of new function in resource-manager.cc
* settings-dialog.ui: new combo box for selecting the desired language
* settings-dialog.cc(settings_dialog): look for available translator files and
the actual language setting and fill the language combo box
* settings-dialog.cc(write_changed_settings): get the selected element from
the language combo box and write the selection into the settings file
author | Torsten <ttl@justmail.de> |
---|---|
date | Sat, 19 Jan 2013 16:21:55 +0100 |
parents | b081fbe80174 |
children | 7fa90eb41240 |
comparison
equal
deleted
inserted
replaced
15971:e27d9b9b71f4 | 15972:22ab4fe661d7 |
---|---|
39 <bool>true</bool> | 39 <bool>true</bool> |
40 </property> | 40 </property> |
41 <attribute name="title"> | 41 <attribute name="title"> |
42 <string>General</string> | 42 <string>General</string> |
43 </attribute> | 43 </attribute> |
44 <widget class="QGroupBox" name="groupBox"> | 44 <widget class="QWidget" name="verticalLayoutWidget"> |
45 <property name="geometry"> | 45 <property name="geometry"> |
46 <rect> | 46 <rect> |
47 <x>10</x> | 47 <x>9</x> |
48 <y>10</y> | 48 <y>10</y> |
49 <width>551</width> | 49 <width>561</width> |
50 <height>81</height> | 50 <height>131</height> |
51 </rect> | 51 </rect> |
52 </property> | 52 </property> |
53 <property name="sizePolicy"> | 53 <layout class="QVBoxLayout" name="verticalLayout_7"> |
54 <sizepolicy hsizetype="Expanding" vsizetype="Minimum"> | 54 <item> |
55 <horstretch>0</horstretch> | 55 <layout class="QHBoxLayout" name="horizontalLayout_6"> |
56 <verstretch>0</verstretch> | 56 <item> |
57 </sizepolicy> | 57 <widget class="QLabel" name="label_2"> |
58 </property> | 58 <property name="text"> |
59 <property name="title"> | 59 <string>Language (requires restart)</string> |
60 <string>Icon set for dock widget</string> | 60 </property> |
61 </property> | 61 </widget> |
62 <property name="alignment"> | 62 </item> |
63 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> | 63 <item> |
64 </property> | 64 <widget class="QComboBox" name="comboBox_language"> |
65 <property name="flat"> | 65 <property name="insertPolicy"> |
66 <bool>false</bool> | 66 <enum>QComboBox::InsertAtBottom</enum> |
67 </property> | 67 </property> |
68 <property name="checkable"> | 68 </widget> |
69 <bool>false</bool> | 69 </item> |
70 </property> | 70 <item> |
71 <widget class="QRadioButton" name="general_icon_octave"> | 71 <spacer name="horizontalSpacer_3"> |
72 <property name="geometry"> | 72 <property name="orientation"> |
73 <rect> | 73 <enum>Qt::Horizontal</enum> |
74 <x>0</x> | 74 </property> |
75 <y>20</y> | 75 <property name="sizeHint" stdset="0"> |
76 <width>151</width> | 76 <size> |
77 <height>21</height> | 77 <width>40</width> |
78 </rect> | 78 <height>20</height> |
79 </property> | 79 </size> |
80 <property name="text"> | 80 </property> |
81 <string>Octave logo only</string> | 81 </spacer> |
82 </property> | 82 </item> |
83 <property name="checked"> | 83 </layout> |
84 <bool>true</bool> | 84 </item> |
85 </property> | 85 <item> |
86 </widget> | 86 <widget class="QGroupBox" name="groupBox"> |
87 <widget class="QRadioButton" name="general_icon_letter"> | 87 <property name="sizePolicy"> |
88 <property name="geometry"> | 88 <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> |
89 <rect> | 89 <horstretch>0</horstretch> |
90 <x>0</x> | 90 <verstretch>0</verstretch> |
91 <y>40</y> | 91 </sizepolicy> |
92 <width>151</width> | 92 </property> |
93 <height>21</height> | 93 <property name="title"> |
94 </rect> | 94 <string>Icon set for dock widgets</string> |
95 </property> | 95 </property> |
96 <property name="text"> | 96 <property name="alignment"> |
97 <string>Letter icons</string> | 97 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> |
98 </property> | 98 </property> |
99 </widget> | 99 <property name="flat"> |
100 <widget class="QRadioButton" name="general_icon_graphic"> | 100 <bool>false</bool> |
101 <property name="geometry"> | 101 </property> |
102 <rect> | 102 <property name="checkable"> |
103 <x>0</x> | 103 <bool>false</bool> |
104 <y>60</y> | 104 </property> |
105 <width>151</width> | 105 <widget class="QRadioButton" name="general_icon_octave"> |
106 <height>21</height> | 106 <property name="geometry"> |
107 </rect> | 107 <rect> |
108 </property> | 108 <x>0</x> |
109 <property name="text"> | 109 <y>20</y> |
110 <string>Graphic icons</string> | 110 <width>151</width> |
111 </property> | 111 <height>21</height> |
112 </widget> | 112 </rect> |
113 </property> | |
114 <property name="text"> | |
115 <string>Octave logo only</string> | |
116 </property> | |
117 <property name="checked"> | |
118 <bool>true</bool> | |
119 </property> | |
120 </widget> | |
121 <widget class="QRadioButton" name="general_icon_letter"> | |
122 <property name="geometry"> | |
123 <rect> | |
124 <x>0</x> | |
125 <y>40</y> | |
126 <width>151</width> | |
127 <height>21</height> | |
128 </rect> | |
129 </property> | |
130 <property name="text"> | |
131 <string>Letter icons</string> | |
132 </property> | |
133 </widget> | |
134 <widget class="QRadioButton" name="general_icon_graphic"> | |
135 <property name="geometry"> | |
136 <rect> | |
137 <x>0</x> | |
138 <y>60</y> | |
139 <width>151</width> | |
140 <height>21</height> | |
141 </rect> | |
142 </property> | |
143 <property name="text"> | |
144 <string>Graphic icons</string> | |
145 </property> | |
146 </widget> | |
147 </widget> | |
148 </item> | |
149 </layout> | |
113 </widget> | 150 </widget> |
114 </widget> | 151 </widget> |
115 <widget class="QWidget" name="tab"> | 152 <widget class="QWidget" name="tab"> |
116 <attribute name="title"> | 153 <attribute name="title"> |
117 <string>Editor</string> | 154 <string>Editor</string> |