edi_scm: Tidying.

master
Alastair Poole 2 years ago
parent a24b6e00ad
commit 3f382eccfb
  1. 42
      src/bin/edi_scm_main.c
  2. 6
      src/bin/edi_scm_ui.c
  3. 1
      src/bin/edi_scm_ui.h

@ -66,48 +66,36 @@ int main(int argc, char **argv)
const char *arg, *root;
Edi_Scm_Ui_Opts options;
memset(&options,0, sizeof(Edi_Scm_Ui_Opts));
ecore_init();
elm_init(argc, argv);
memset(&options, 0, sizeof(Edi_Scm_Ui_Opts));
root = NULL;
for (int i = 1; i < argc; i++)
{
arg = argv[i];
if (!strcmp("-h", arg) || !strcmp("--help", arg))
{
usage();
}
usage();
else if (!strcmp("-c", arg) || !strcmp("--commit", arg))
{
}
options.commit = EINA_TRUE;
else if (!strcmp("-l", arg) || !strcmp("--log", arg))
{
options.log = EINA_TRUE;
}
options.log = EINA_TRUE;
else
{
root = arg;
}
root = arg;
}
if (root)
{
if (!ecore_file_is_dir(root))
{
fprintf(stderr, _("Root path must be a directory\n"));
exit(1 << 0);
}
engine = edi_scm_init_path(realpath(root, NULL));
}
else
if (!root) usage();
ecore_init();
elm_init(argc, argv);
if (!ecore_file_is_dir(root))
{
engine = edi_scm_init();
fprintf(stderr, _("Root path must be a directory\n"));
exit(1);
}
engine = edi_scm_init_path(realpath(root, NULL));
if (!engine)
exit(1 << 2);
exit(1 << 7);
win = _win_add(engine);
edi_scm_ui_add(win, options);

@ -612,7 +612,7 @@ static Eina_Bool
_edi_scm_ui_log_fill_cb(void *data)
{
Edi_Scm_Engine *engine;
Evas_Object *entry;
Evas_Object *entry, *scr;
Eina_List *log;
char *line;
@ -666,7 +666,7 @@ _edi_scm_ui_log(Evas_Object *parent)
btn = elm_button_add(hbx);
evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(btn, 0.25, EVAS_HINT_EXPAND);
evas_object_size_hint_weight_set(btn, 0.2, EVAS_HINT_EXPAND);
elm_object_text_set(btn, _("Close"));
evas_object_smart_callback_add(btn, "clicked", _edi_scm_ui_close_cb, NULL);
@ -690,7 +690,7 @@ edi_scm_ui_add(Evas_Object *parent, Edi_Scm_Ui_Opts options)
engine = edi_scm_engine_get();
if (!engine)
exit(1 << 1);
exit(1 << 7);
if (options.log)
{

@ -14,6 +14,7 @@ extern "C" {
typedef struct _Edi_Scm_Ui_Opts {
Eina_Bool log;
Eina_Bool commit;
} Edi_Scm_Ui_Opts;
/**

Loading…
Cancel
Save