Vim styleguides, small theme fix, be a bit more robust when handling random strings as image burning input.

This commit is contained in:
Jaime Thomas 2008-12-09 19:46:00 +00:00
parent ad7c7344cf
commit 8cbc349d13
21 changed files with 191 additions and 160 deletions

View File

@ -9,7 +9,7 @@ group {
tag: "br" "\n";
tag: "tab" "\t";
tag: "hilight" "+ font=Sans:style:Bold";
// Need any tags?
// Need any more tags?
}
}
@ -91,8 +91,8 @@ group {
program {
name: "focus1";
action: FOCUS_SET;
signal: "mouse,down,*";
source: "*";
signal: "load";
source: "";
target: "label";
}

View File

@ -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;
}
}

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#include "ecdb.h"
/* Global Variables */

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#ifndef ECDB_H
#define ECDB_H

View File

@ -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);

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#ifndef ECDB_AUDIO_H
#define ECDB_AUDIO_H

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#include "ecdb.h"
typedef struct Burn_Data Burn_Data;

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#ifndef ECDB_BURN_H
#define ECDB_BURN_H

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#ifndef ECDB_COMMON_H
#define ECDB_COMMON_H

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#include "ecdb.h"
void ecdb_drive_info_free_cb(void *data);

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#ifndef ECDB_DRIVES_H
#define ECDB_DRIVES_H

View File

@ -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);

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#ifndef ECDB_ERASE_H
#define ECDB_ERASE_H

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#include "ecdb.h"
static void free_file(Ewl_Filelist_File *file);

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#ifndef ECDB_FILELIST_CUSTOM_H
#define ECDB_FILELIST_CUSTOM_H

View File

@ -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
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);

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#ifndef ECDB_GUI_H
#define ECDB_GUI_H

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#include "ecdb.h"
int ecdb_source_init(Ecdb_Source *src);

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#ifndef ECDB_IMAGE_H
#define ECDB_IMAGE_H

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#include "ecdb.h"
Ecdb_Project *

View File

@ -1,3 +1,4 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#ifndef ECDB_MISC_H
#define ECDB_MISC_H