Example #1
0
        def myCallBack(*a,**k):

            old=__builtins__["_"]   # save the jbrout _()
            try:
                # for the .glade files
                from libs.gladeapp import GladeApp
                GladeApp.bindtextdomain("plugin",os.path.join(instance.path, 'po'))

                # for the "_()" in "window gladeapp" code
                __builtins__["_"] = createGetText("plugin",os.path.join(instance.path,"po"))

                ret=callback(*a,**k)
            finally:
                __builtins__["_"] = old # restore the jbrout _()
                pass
            return ret
Example #2
0
        def myCallBack(*a, **k):

            old = __builtins__["_"]  # save the jbrout _()
            try:
                # for the .glade files
                from libs.gladeapp import GladeApp
                GladeApp.bindtextdomain("plugin",
                                        os.path.join(instance.path, 'po'))

                # for the "_()" in "window gladeapp" code
                __builtins__["_"] = createGetText(
                    "plugin", os.path.join(instance.path, "po"))

                ret = callback(*a, **k)
            finally:
                __builtins__["_"] = old  # restore the jbrout _()
                pass
            return ret
Example #3
0
        else:
            self.exifList.append([_('Can not open file!'), ''])

    def on_winViewExif_delete_event(self, widget, *args):
        self.quit(False)

    def on_button_close_clicked(self, widget, *args):
        self.quit(False)

    def on_selector_value_changed(self, *args):
        self.setPhoto(self.selector.getValue())


def main():
    win_viewExif = WinViewExif()

    win_viewExif.loop()

if __name__ == "__main__":
    from libs.i18n import createGetText

    # make translation available in the gui/gtk
    GladeApp.bindtextdomain("jbrout", os.path.join(os.path.dirname(__file__),
                            'po'))

    # make translation available in the code
    __builtins__.__dict__["_"] = createGetText(
        "jbrout", os.path.join(os.path.dirname(__file__), 'po'))

    main()