Vim styleguides, small theme fix, be a bit more robust when handling random strings as image burning input.
This commit is contained in:
parent
ad7c7344cf
commit
8cbc349d13
@ -1,176 +1,176 @@
|
||||
group {
|
||||
name: "ecdb/entry";
|
||||
min: 18 18;
|
||||
|
||||
styles {
|
||||
style {
|
||||
name: "entry_default";
|
||||
base: "font=ecdb/default font_size=11 align=left color=#000 wrap=none";
|
||||
tag: "br" "\n";
|
||||
tag: "tab" "\t";
|
||||
tag: "hilight" "+ font=Sans:style:Bold";
|
||||
// Need any tags?
|
||||
}
|
||||
}
|
||||
name: "ecdb/entry";
|
||||
min: 18 18;
|
||||
|
||||
styles {
|
||||
style {
|
||||
name: "entry_default";
|
||||
base: "font=ecdb/default font_size=11 align=left color=#000 wrap=none";
|
||||
tag: "br" "\n";
|
||||
tag: "tab" "\t";
|
||||
tag: "hilight" "+ font=Sans:style:Bold";
|
||||
// Need any more tags?
|
||||
}
|
||||
}
|
||||
|
||||
parts {
|
||||
part {
|
||||
name: "entry";
|
||||
parts {
|
||||
part {
|
||||
name: "entry";
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
|
||||
image {
|
||||
normal: "entry.png";
|
||||
border: 6 6 8 7;
|
||||
}
|
||||
}
|
||||
|
||||
description {
|
||||
state: "disabled" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 128;
|
||||
}
|
||||
}
|
||||
image {
|
||||
normal: "entry.png";
|
||||
border: 6 6 8 7;
|
||||
}
|
||||
}
|
||||
|
||||
description {
|
||||
state: "disabled" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 128;
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "entry_focus";
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
color: 255 255 255 0;
|
||||
|
||||
image {
|
||||
normal: "entry_focus.png";
|
||||
border: 7 7 8 7;
|
||||
middle: 0;
|
||||
}
|
||||
part {
|
||||
name: "entry_focus";
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
color: 255 255 255 0;
|
||||
|
||||
image {
|
||||
normal: "entry_focus.png";
|
||||
border: 7 7 8 7;
|
||||
middle: 0;
|
||||
}
|
||||
|
||||
fill {
|
||||
smooth: 0;
|
||||
}
|
||||
}
|
||||
fill {
|
||||
smooth: 0;
|
||||
}
|
||||
}
|
||||
|
||||
description {
|
||||
state: "focused" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 255;
|
||||
}
|
||||
}
|
||||
description {
|
||||
state: "focused" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 255;
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "label";
|
||||
type: TEXTBLOCK;
|
||||
mouse_events: 1;
|
||||
entry_mode: EDITABLE;
|
||||
multiline: 0;
|
||||
source2: "entry/selection/default";
|
||||
source3: "entry/cursor/default";
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
text {
|
||||
style: "entry_default";
|
||||
min: 1 1;
|
||||
}
|
||||
part {
|
||||
name: "label";
|
||||
type: TEXTBLOCK;
|
||||
mouse_events: 1;
|
||||
entry_mode: EDITABLE;
|
||||
multiline: 0;
|
||||
source2: "entry/selection/default";
|
||||
source3: "entry/cursor/default";
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
text {
|
||||
style: "entry_default";
|
||||
min: 1 1;
|
||||
}
|
||||
|
||||
rel1 {
|
||||
to: "entry";
|
||||
offset: 5 3;
|
||||
}
|
||||
rel1 {
|
||||
to: "entry";
|
||||
offset: 5 3;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to: "entry";
|
||||
offset: -2 -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rel2 {
|
||||
to: "entry";
|
||||
offset: -2 -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
programs {
|
||||
program {
|
||||
name: "focus1";
|
||||
action: FOCUS_SET;
|
||||
signal: "mouse,down,*";
|
||||
source: "*";
|
||||
target: "label";
|
||||
}
|
||||
programs {
|
||||
program {
|
||||
name: "focus1";
|
||||
action: FOCUS_SET;
|
||||
signal: "load";
|
||||
source: "";
|
||||
target: "label";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "focus2";
|
||||
action: STATE_SET "focused" 0.0;
|
||||
signal: "mouse,down,*";
|
||||
source: "*";
|
||||
target: "entry_focus";
|
||||
transition: DECELERATE 0.5;
|
||||
}
|
||||
program {
|
||||
name: "focus2";
|
||||
action: STATE_SET "focused" 0.0;
|
||||
signal: "mouse,down,*";
|
||||
source: "*";
|
||||
target: "entry_focus";
|
||||
transition: DECELERATE 0.5;
|
||||
}
|
||||
|
||||
program {
|
||||
name: "focus_out";
|
||||
signal: "ecdb,focus,out";
|
||||
action: STATE_SET "default" 0.0;
|
||||
source: "ecdb";
|
||||
target: "entry_focus";
|
||||
transition: DECELERATE 0.5;
|
||||
}
|
||||
program {
|
||||
name: "focus_out";
|
||||
signal: "ecdb,focus,out";
|
||||
action: STATE_SET "default" 0.0;
|
||||
source: "ecdb";
|
||||
target: "entry_focus";
|
||||
transition: DECELERATE 0.5;
|
||||
}
|
||||
|
||||
program {
|
||||
name: "disable";
|
||||
signal: "ecdb,disable";
|
||||
action: STATE_SET "disabled" 0.0;
|
||||
source: "ecdb";
|
||||
target: "entry";
|
||||
}
|
||||
program {
|
||||
name: "disable";
|
||||
signal: "ecdb,disable";
|
||||
action: STATE_SET "disabled" 0.0;
|
||||
source: "ecdb";
|
||||
target: "entry";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "enable";
|
||||
signal: "ecdb,enable";
|
||||
action: STATE_SET "default" 0.0;
|
||||
source: "ecdb";
|
||||
target: "entry";
|
||||
}
|
||||
}
|
||||
program {
|
||||
name: "enable";
|
||||
signal: "ecdb,enable";
|
||||
action: STATE_SET "default" 0.0;
|
||||
source: "ecdb";
|
||||
target: "entry";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
group {
|
||||
name: "entry/cursor/default";
|
||||
name: "entry/cursor/default";
|
||||
|
||||
parts {
|
||||
part {
|
||||
name: "cursor";
|
||||
type: RECT;
|
||||
mouse_events: 0;
|
||||
parts {
|
||||
part {
|
||||
name: "cursor";
|
||||
type: RECT;
|
||||
mouse_events: 0;
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
color: 0 0 0 255;
|
||||
min: 1 1;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
offset: 1 3;
|
||||
}
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
color: 0 0 0 255;
|
||||
min: 1 1;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
offset: 1 3;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
relative: 0.0 1.0;
|
||||
offset: 0 -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.0 1.0;
|
||||
offset: 0 -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
group {
|
||||
name: "entry/selection/default";
|
||||
parts {
|
||||
part {
|
||||
name: "selection";
|
||||
type: RECT;
|
||||
mouse_events: 0;
|
||||
name: "entry/selection/default";
|
||||
parts {
|
||||
part {
|
||||
name: "selection";
|
||||
type: RECT;
|
||||
mouse_events: 0;
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
color: 138 171 225 128;
|
||||
}
|
||||
}
|
||||
}
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
color: 138 171 225 128;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -246,7 +246,6 @@ group {
|
||||
state: "default" 0.0;
|
||||
align: 0.5 0.5;
|
||||
color: 255 255 255 0;
|
||||
max: 245 99999;
|
||||
|
||||
rel1 {
|
||||
to: "filelist_overlay";
|
||||
@ -262,7 +261,6 @@ group {
|
||||
text: "";
|
||||
font: "ecdb/default";
|
||||
size: 24;
|
||||
min: 1 1;
|
||||
align: 0.5 0.5;
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
/* Global Variables */
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#ifndef ECDB_H
|
||||
#define ECDB_H
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
int transcode_data_cb(void *data, int type, void *event);
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#ifndef ECDB_AUDIO_H
|
||||
#define ECDB_AUDIO_H
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
typedef struct Burn_Data Burn_Data;
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#ifndef ECDB_BURN_H
|
||||
#define ECDB_BURN_H
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#ifndef ECDB_COMMON_H
|
||||
#define ECDB_COMMON_H
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
void ecdb_drive_info_free_cb(void *data);
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#ifndef ECDB_DRIVES_H
|
||||
#define ECDB_DRIVES_H
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
int ecdb_erase_project_init(Ecdb_Erase_Project *proj);
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#ifndef ECDB_ERASE_H
|
||||
#define ECDB_ERASE_H
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
static void free_file(Ewl_Filelist_File *file);
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#ifndef ECDB_FILELIST_CUSTOM_H
|
||||
#define ECDB_FILELIST_CUSTOM_H
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
/*
|
||||
* vim:ts=3:sw=3:sts=3:expandtab
|
||||
*/
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
static void ecdb_handle_typebuf(Evas_Object *gui);
|
||||
@ -472,17 +470,34 @@ ecdb_cb_burn_image_page_buttons_clicked(void *data, Evas_Object *o,
|
||||
char buf[1024];
|
||||
Ecdb_Burn_Result burn_result;
|
||||
|
||||
proj = ecdb_burn_project_new();
|
||||
ecdb_project_type_set(ECDB_PROJECT(proj), ECDB_IMAGE_PROJECT);
|
||||
entry = evas_object_name_find(ecore_evas_get(em->main_win_ee),
|
||||
"ecdb/burn_image/file");
|
||||
file = edje_object_part_text_get(entry, "label");
|
||||
|
||||
//Textblock returns a <br> at the end, so chop that off
|
||||
sanitized_file = alloca(sizeof(char) * (strlen(file) - 3));
|
||||
sanitized_file[0] = '\0';
|
||||
ecore_strlcpy(sanitized_file, file, strlen(file) - 3);
|
||||
if (!strcmp(&file[strlen(file) - 4], "<br>"))
|
||||
{
|
||||
sanitized_file = alloca(sizeof(char) * (strlen(file) - 3));
|
||||
sanitized_file[0] = '\0';
|
||||
ecore_strlcpy(sanitized_file, file, strlen(file) - 3);
|
||||
printf("Sanitized_file: %s\n", sanitized_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
// We aren't altering sanitized_file after this
|
||||
sanitized_file = (char *)file;
|
||||
}
|
||||
|
||||
// Make sure that file actually exists
|
||||
if (!ecore_file_exists(sanitized_file))
|
||||
{
|
||||
edje_object_part_text_set(swallow, "progress_text", "File doesn't "
|
||||
"exists!");
|
||||
return;
|
||||
}
|
||||
|
||||
proj = ecdb_burn_project_new();
|
||||
ecdb_project_type_set(ECDB_PROJECT(proj), ECDB_IMAGE_PROJECT);
|
||||
iso_file = ecdb_source_new();
|
||||
ecdb_source_data_set(iso_file, sanitized_file);
|
||||
ecdb_source_child_append(proj->files, iso_file);
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#ifndef ECDB_GUI_H
|
||||
#define ECDB_GUI_H
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
int ecdb_source_init(Ecdb_Source *src);
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#ifndef ECDB_IMAGE_H
|
||||
#define ECDB_IMAGE_H
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
Ecdb_Project *
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#ifndef ECDB_MISC_H
|
||||
#define ECDB_MISC_H
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user