def __init__(self, *args, **kwargs): print("[IDASkins] v2.0 by athre0z (zyantific.com) loaded!") QObject.__init__(self, *args, **kwargs) idaapi.plugin_t.__init__(self) # First start dialog. self._settings = Settings() if self._settings.first_start: selection = QMessageBox.information( qApp.activeWindow(), "IDASkins: First start", "IDASkins detected that this is you first IDA startup with " "this plugin installed. Do you wish to select a theme now?", QMessageBox.Yes | QMessageBox.No, ) if selection == QMessageBox.Yes: self.open_theme_selector() self._settings.first_start = False else: # v2.0.0 used absolute pathes due to a bug. # Fix settings from this particular version here. theme_dir = self._settings.selected_theme_dir if theme_dir and os.path.isabs(theme_dir): print('[IDASkins] Updating buggy v2.0.0 theme path') self._settings.selected_theme_dir = os.path.split(theme_dir)[-1] self._theme_selector = None self.apply_stylesheet_from_settings() # Subscribe UI notifications. self._ui_hooks = UiHooks() self._ui_hooks.hook()
def postprocess_action(self): if self._last_event == 'SetFont': QMessageBox.warning( qApp.activeWindow(), "IDASkins", "Please note that altering the font settings when IDASkins " "is loaded may cause strange effects on font rendering. It is " "recommended to restart IDA after making font-related changes " "in the settings to avoid instability.") return super(UiHooks, self).postprocess_action()
def postprocess_action(self): if self._last_event == 'SetFont': QMessageBox.warning( qApp.activeWindow(), "IDASkins", "Please note that altering the font settings when IDASkins " "is loaded may cause strange effects on font rendering. It is " "recommended to restart IDA after making font-related changes " "in the settings to avoid instability." ) return super(UiHooks, self).postprocess_action()
def __init__(self, *args, **kwargs): print("[IDASkins] {} by athre0z (zyantific.com) loaded!".format( VERSION )) QObject.__init__(self, *args, **kwargs) idaapi.plugin_t.__init__(self) # First start dialog. self._settings = Settings() if self._settings.first_start: selection = QMessageBox.information( qApp.activeWindow(), "IDASkins: First start", "IDASkins has detected that this is the first time you've started IDA with " "the plugin installed. Select a theme now?", QMessageBox.Yes | QMessageBox.No, ) if selection == QMessageBox.Yes: self.open_theme_selector() self._settings.first_start = False else: # v2.0.0 used absolute pathes due to a bug. # Fix settings from this particular version here. theme_dir = self._settings.selected_theme_dir if theme_dir and os.path.isabs(theme_dir): print('[IDASkins] Updating buggy v2.0.0 theme path') self._settings.selected_theme_dir = os.path.split(theme_dir)[-1] self._theme_selector = None self.apply_stylesheet_from_settings() # Subscribe UI notifications. self._ui_hooks = UiHooks() self._ui_hooks.hook()
def open_theme_selector(self): self._theme_selector = ThemeSelector(qApp.activeWindow()) self._theme_selector.accepted.connect(self.on_theme_selection_accepted) self._theme_selector.show()
def run(self, arg): self._intro_dialog = IntroDialog(qApp.activeWindow()) self._intro_dialog.show()
def run(self, arg): self._intro_dialog = IntroDialog(qApp.activeWindow()) self._intro_dialog.setWindowTitle("{} - v{}".format(PLUGIN_NAME, VERSION)) self._intro_dialog.show()