예제 #1
0
파일: plugin.py 프로젝트: cmmoran/IDASkins
    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()
예제 #2
0
    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()
예제 #3
0
    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()
예제 #4
0
    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()
예제 #5
0
 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()
예제 #6
0
 def run(self, arg):
     self._intro_dialog = IntroDialog(qApp.activeWindow())
     self._intro_dialog.show()
예제 #7
0
 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()
예제 #8
0
 def run(self, arg):
     self._intro_dialog = IntroDialog(qApp.activeWindow())
     self._intro_dialog.setWindowTitle("{} - v{}".format(PLUGIN_NAME, VERSION))
     self._intro_dialog.show()