rage - fix warnings and selection remembering on click

one warning gone and browser now consistent betwene mouse and kkey
control in remembeirng last selection for coming back to browser
This commit is contained in:
Carsten Haitzler 2015-10-14 12:32:16 +09:00
parent 6c616bc6c6
commit 9091d776b5
2 changed files with 11 additions and 1 deletions

View File

@ -223,10 +223,14 @@ _cb_file_selected(void *data, Evas_Object *obj, const char *sig EINA_UNUSED, con
{
Evas_Object *win = data;
Entry *entry = evas_object_data_get(obj, "entry");
char buf[PATH_MAX];
const char *file = evas_object_data_get(obj, "file");
elm_layout_signal_emit(obj, "rage,state,selected", "rage");
_activate(win, entry, file);
snprintf(buf, sizeof(buf), "%s/%s", entry->path, file);
if (selfile) free(selfile);
selfile = strdup(buf);
}
static void
@ -750,9 +754,14 @@ _sel_do(Evas_Object *win, Entry *base_entry)
const char *file = _sel_file_find(entry);
if (file)
{
char buf[PATH_MAX];
elm_layout_signal_emit(o, "rage,state,selected", "rage");
_activate(win, entry, file);
}
snprintf(buf, sizeof(buf), "%s/%s", entry->path, file);
if (selfile) free(selfile);
selfile = strdup(buf);
}
eina_lock_release(&(entry->lock));
}
}

View File

@ -1,4 +1,5 @@
#include <Elementary.h>
#include <Emotion.h>
#include <Eio.h>
#include "main.h"
#include "win.h"