Esempio n. 1
0
def main():

    # parse command line arguments
    parser = argparse.ArgumentParser(description='Efl GIT GUI')
    parser.add_argument('--repo', default=None)
    # parser.add_argument('integers', metavar='N', type=int, nargs='+',
                   # help='an integer for the accumulator')
    # parser.add_argument('--sum', dest='accumulate', action='store_const',
                   # const=sum, default=max,
                   # help='sum the integers (default: find the max)')
    args = parser.parse_args()

    # load config and create necessary folders
    options.load()
    if not os.path.exists(config_path):
        os.makedirs(config_path)

    # create the main window
    elm.init()
    win = EgituWin()

    # try to load a repo, from command-line or cwd (else show the RepoSelector)
    RepoSelector(win, args.repo or os.getcwd())

    # enter the mainloop
    elm.run()

    # mainloop done, shutdown
    elm.shutdown()
    options.save()

    return 0
Esempio n. 2
0
def run(model, framespec=None, stylesheet=None):
    def default_filename(obj, ext):
        return type(obj).__name__.lower() + '.' + ext

    elm.init()
    my_frame = frame.from_file(framespec or default_filename(model, 'xml'))
    css = CssParser(stylesheet or default_filename(model, 'css'))
    css.attach(my_frame)
    w = my_frame.widget(model)
    elm.run()
    elm.shutdown()
Esempio n. 3
0
def main():

    # load config and create necessary folders and files
    options.load()
    if not os.path.exists(config_path):
        os.makedirs(config_path)
    if not os.path.exists(options.txt_file):
        with open(options.txt_file, 'a') as f:
            print('(A) Welcome to Etodo', file=f)

    # create the main window and load the todo file
    elm.init()
    win = EdoneWin()
    win.reload()

    # enter the mainloop
    elm.run()

    # mainloop done, shutdown
    elm.shutdown()
    options.save()

    return 0
Esempio n. 4
0
def main():

    # load config and create necessary folders
    options.load()
    if not os.path.exists(config_path):
        os.makedirs(config_path)

    # init elm
    elm.init()
    theme_extension_add(theme_file_get())

    # Egitu
    app = EgituApp(sys.argv[1:])
    app_instance_set(app) # Ugly :/

    # enter the mainloop
    elm.run()

    # mainloop done, shutdown
    elm.shutdown()
    options.save()

    return 0
Esempio n. 5
0
            print("Initial check passed.\n")
            self.chk = checks.Checks(path, self.win)
            self.chk.check_file(self.fs, self.win, self.deb)
        self.n.delete()
        self.et.delete()

    def inst_check(self, bt, bt2):
        path = self.fs.selected_get()
        if path == HOME:
            checks.generic_error_popup(self.win, "<b>No File Selected</><br><br>Please select an appropriate file candidate for installation.")
        else:
            self.chk.check_file_install(bt, bt2, self.win, self.fs)

    def bt_init_check(self, path):
        try:
            self.chk.check_file(self.fs, self.win, self.deb)
        except:
            checks.generic_error_popup(self.win, "<b>No File Selected</><br><br>Please select an appropriate file candidate for installation.")


#----- Main -{{{-
if __name__ == "__main__":
    elm.init()

    eDeb(clargs)

    elm.run()
    elm.shutdown()
# }}}
# vim:foldmethod=marker
Esempio n. 6
0
            password = args[0]
            cmd.send(str(password) + "\n")

    def command_done(self, cmd, event, *args, **kwargs):
        log.info("Command done.")

        if self.end_cb:
            try:
                self.end_cb(event.exit_code, self.win, *self.args,
                            **self.kwargs)
            except Exception:
                log.exception()
        self.close()

if __name__ == "__main__":
    import sys

    new_arg = []
    for i in sys.argv[1:]:
        if ' ' in i:
            i = '"' + i + '"'
        new_arg.append(i)
    cmd = " ".join(new_arg)

    elementary.init()

    start = eSudo(cmd)

    elementary.run()
    elementary.shutdown()
    dt.field_visible_set(ELM_DATETIME_MONTH, False)
    dt.field_visible_set(ELM_DATETIME_DATE, False)
    bx.pack_end(dt)
    dt.show()

    dt = Datetime(bx, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_HORIZ)

    # get the current local time
    time1 = datetime.now()
    # set the max year as 2030 and the remaining fields are equal to current time values
    time1.replace(year = 130)
    dt.value_max = time1
    # set the min time limit as "1980 January 10th 02:30 PM"
    time1.replace(year = 80, month = 4, day = 10, hour = 14, minute = 30)
    dt.value_min = time1
    # minutes can be input only in between 15 and 45
    dt.field_limit_set(ELM_DATETIME_MINUTE, 15, 45)
    dt.callback_changed_add(changed_cb)
    bx.pack_end(dt)
    dt.show()

    win.show()

if __name__ == "__main__":
    elementary.init()

    datetime_clicked(None)

    elementary.run()
    elementary.shutdown()
Esempio n. 8
0
    
    def eventsCb(self, obj, src, event_type, event):
        #print(obj)
        #print(src)
        #print(event.key.lower())
        #print(event_type)
        #print("")

        if not event_type == EVAS_CALLBACK_KEY_UP:
            return False

        if event.keyname == "Up":
            self.lifeChange("mine", "up")
        elif event.keyname == "Down":
            self.lifeChange("mine", "down")
        elif event.keyname == "Right":
            self.lifeChange("thiers", "up")
        elif event.keyname == "Left":
            self.lifeChange("theirs", "down")
            

        event.event_flags = event.event_flags | EVAS_EVENT_FLAG_ON_HOLD
        return True

if __name__ == "__main__":
    elm.init()
    GUI = MainWindow()
    #GUI.show()
    elm.run()
    elm.shutdown()
def main():
    elm.init()
    win = EspionageWin()
    elm.run()
    elm.shutdown()
    return 0