180 @type EricAction |
180 @type EricAction |
181 @param category category the action belongs to |
181 @param category category the action belongs to |
182 @type str |
182 @type str |
183 """ |
183 """ |
184 if act.objectName(): |
184 if act.objectName(): |
185 accel = Preferences.Prefs.settings.value( |
185 accel = Preferences.getSettings().value( |
186 "Shortcuts/{0}/{1}/Accel".format(category, act.objectName())) |
186 "Shortcuts/{0}/{1}/Accel".format(category, act.objectName())) |
187 if accel is not None: |
187 if accel is not None: |
188 act.setShortcut(QKeySequence(accel)) |
188 act.setShortcut(QKeySequence(accel)) |
189 accel = Preferences.Prefs.settings.value( |
189 accel = Preferences.getSettings().value( |
190 "Shortcuts/{0}/{1}/AltAccel".format( |
190 "Shortcuts/{0}/{1}/AltAccel".format( |
191 category, act.objectName())) |
191 category, act.objectName())) |
192 if accel is not None: |
192 if accel is not None: |
193 act.setAlternateShortcut(QKeySequence(accel), removeEmpty=True) |
193 act.setAlternateShortcut(QKeySequence(accel), removeEmpty=True) |
194 |
194 |
1031 |
1031 |
1032 def __readSettings(self): |
1032 def __readSettings(self): |
1033 """ |
1033 """ |
1034 Private method to read the settings remembered last time. |
1034 Private method to read the settings remembered last time. |
1035 """ |
1035 """ |
1036 settings = Preferences.Prefs.settings |
1036 settings = Preferences.getSettings() |
1037 pos = settings.value("ShellWindow/Position", QPoint(0, 0)) |
1037 pos = settings.value("ShellWindow/Position", QPoint(0, 0)) |
1038 size = settings.value("ShellWindow/Size", QSize(800, 600)) |
1038 size = settings.value("ShellWindow/Size", QSize(800, 600)) |
1039 self.resize(size) |
1039 self.resize(size) |
1040 self.move(pos) |
1040 self.move(pos) |
1041 |
1041 |
1042 def __writeSettings(self): |
1042 def __writeSettings(self): |
1043 """ |
1043 """ |
1044 Private method to write the settings for reuse. |
1044 Private method to write the settings for reuse. |
1045 """ |
1045 """ |
1046 settings = Preferences.Prefs.settings |
1046 settings = Preferences.getSettings() |
1047 settings.setValue("ShellWindow/Position", self.pos()) |
1047 settings.setValue("ShellWindow/Position", self.pos()) |
1048 settings.setValue("ShellWindow/Size", self.size()) |
1048 settings.setValue("ShellWindow/Size", self.size()) |
1049 |
1049 |
1050 def quit(self): |
1050 def quit(self): |
1051 """ |
1051 """ |