Commit 61e02435 authored by Simon Spannagel's avatar Simon Spannagel

Fix spelling mistakes in bauhaus and common src code

parent a8dd1bd5
......@@ -1616,7 +1616,7 @@ dt_bauhaus_show_popup(dt_bauhaus_widget_t *w)
// gtk_widget_get_window will return null if not shown yet.
// it is needed for gdk_window_move, and gtk_window move will
// sometimes be ignored. this is why we always call both...
// we also don't want to show befor move, as this results in noticable flickering.
// we also don't want to show before move, as this results in noticeable flickering.
GdkWindow *window = gtk_widget_get_window(darktable.bauhaus->popup_window);
if(window) gdk_window_move(window, wx, wy);
gtk_window_move(GTK_WINDOW(darktable.bauhaus->popup_window), wx, wy);
......
......@@ -57,7 +57,7 @@ dt_bauhaus_type_t;
typedef struct dt_bauhaus_slider_data_t
{
float pos; // normalized slider value
float oldpos; // sider value before entering finetune mode (normalized)
float oldpos; // slider value before entering finetune mode (normalized)
float defpos; // default value (normalized)
float min, max; // min and max range
float scale; // step width for loupe mode
......@@ -71,7 +71,7 @@ typedef struct dt_bauhaus_slider_data_t
int is_dragging; // indicates is mouse is dragging slider
int is_changed; // indicates new data
guint timeout_handle; // used to store id of timout routine
guint timeout_handle; // used to store id of timeout routine
}
dt_bauhaus_slider_data_t;
......@@ -91,7 +91,7 @@ typedef union dt_bauhaus_data_t
{
// this is the placeholder for the data portions
// associated with the implementations such as
// siders, combo boxes, ..
// sliders, combo boxes, ..
dt_bauhaus_slider_data_t slider;
dt_bauhaus_combobox_data_t combobox;
}
......
......@@ -78,7 +78,7 @@ gboolean _camera_initialize(const dt_camctl_t *c, dt_camera_t *cam);
/** Poll camera events, this one is called from the thread handling the camera. */
void _camera_poll_events(const dt_camctl_t *c,const dt_camera_t *cam);
/** Lock camera control and notify listener. \note Locks mutex and signals CAMERA_CONTROL_BUSY. \remarks all interface functions availble to host application should lock/unlock its operation. */
/** Lock camera control and notify listener. \note Locks mutex and signals CAMERA_CONTROL_BUSY. \remarks all interface functions available to host application should lock/unlock its operation. */
void _camctl_lock(const dt_camctl_t *c,const dt_camera_t *cam);
/** Lock camera control and notify listener. \note Locks mutex and signals CAMERA_CONTROL_AVAILABLE. \see _camctl_lock() */
void _camctl_unlock(const dt_camctl_t *c);
......@@ -285,7 +285,7 @@ static void _camera_process_job(const dt_camctl_t *c,const dt_camera_t *camera,
gp_camera_file_get (camera->gpcam, fp.folder , fp.name, GP_FILE_TYPE_NORMAL, destination, c->gpcontext);
close (handle);
// Notify listerners of captured image
// Notify listeners of captured image
_dispatch_camera_image_downloaded (c,camera,output);
g_free (output);
}
......@@ -519,7 +519,7 @@ dt_camctl_t *dt_camctl_new()
dt_pthread_mutex_init(&camctl->lock, NULL);
dt_pthread_mutex_init(&camctl->listeners_lock, NULL);
// Let's detect cameras connexted
// Let's detect cameras connected
dt_camctl_detect_cameras(camctl);
......@@ -640,7 +640,7 @@ void dt_camctl_detect_cameras(const dt_camctl_t *c)
continue;
}
// Check if camera has capabililties for being presented to darktable
// Check if camera has capabilities for being presented to darktable
if( camera->can_import==FALSE && camera->can_tether==FALSE )
{
dt_print(DT_DEBUG_CAMCTL,"[camera_control] device %s on port %s doesn't support import or tether, skipping device.\n", camera->model,camera->port);
......@@ -864,13 +864,13 @@ int _camctl_recursive_get_previews(const dt_camctl_t *c,dt_camera_preview_flags_
gp_file_new(&preview);
if( gp_camera_file_get(c->active_camera->gpcam, path, filename, GP_FILE_TYPE_PREVIEW,preview,c->gpcontext) < GP_OK )
{
// No preview for file lets check image size to se if we should download full image for preview...
// No preview for file lets check image size to see if we should download full image for preview...
if( cfi.file.size > 0 && cfi.file.size < 512000 )
{
if( gp_camera_file_get(c->active_camera->gpcam, path, filename, GP_FILE_TYPE_NORMAL,preview,c->gpcontext) < GP_OK )
{
preview=NULL;
dt_print(DT_DEBUG_CAMCTL,"[camera_control] failed to retreive preview of file %s\n",filename);
dt_print(DT_DEBUG_CAMCTL,"[camera_control] failed to retrieve preview of file %s\n",filename);
}
}
else if (!strncmp(c->active_camera->port, "disk:", 5))
......@@ -1274,7 +1274,7 @@ void _camera_poll_events(const dt_camctl_t *c,const dt_camera_t *cam)
(strstr((char *)data, "PTP Property") && strstr((char *)data, "changed")) // Some Canon driver maybe all ??
)
{
// Property change event occured on camera
// Property change event occurred on camera
// let's update cache and signalling
dt_print(DT_DEBUG_CAMCTL, "[camera_control] Camera configuration change event, lets update internal configuration cache.\n");
_camera_configuration_update(c,cam);
......@@ -1299,7 +1299,7 @@ void _camera_poll_events(const dt_camctl_t *c,const dt_camera_t *cam)
gp_camera_file_get( cam->gpcam, fp->folder , fp->name, GP_FILE_TYPE_NORMAL, destination, c->gpcontext);
close( handle );
// Notify listerners of captured image
// Notify listeners of captured image
_dispatch_camera_image_downloaded(c,cam,output);
g_free(output);
}
......@@ -1369,7 +1369,7 @@ void _camera_configuration_merge(const dt_camctl_t *c,const dt_camera_t *camera,
if( ( ( stv && dtv ) && strcmp( stv, dtv ) != 0 ) && ( changed = TRUE ) )
{
gp_widget_set_value( dw, stv );
// Dont flag this change as changed, otherwise a read-only widget might get tried
// Don't flag this change as changed, otherwise a read-only widget might get tried
// to update the camera configuration...
gp_widget_set_changed( dw, 0 );
}
......
......@@ -77,7 +77,7 @@ typedef struct dt_camera_t
/** Live view */
gboolean is_live_viewing;
/** The last preview image fromthe camera */
/** The last preview image from the camera */
GdkPixbuf *live_view_pixbuf;
/** Rotation of live view, multiples of 90° */
int32_t live_view_rotation;
......@@ -119,8 +119,8 @@ typedef enum dt_camera_error_t
{
/** Locking camera failed. \remarks This means that camera control is busy and locking failed. */
CAMERA_LOCK_FAILED,
/** Camera conenction is broken and unuseable.
\remarks Beyond this message references to dt_camera_t pointer is invalid, which means that the host application should remove all references of camera pointer and disallow any opertations onto it.
/** Camera conenction is broken and unusable.
\remarks Beyond this message references to dt_camera_t pointer is invalid, which means that the host application should remove all references of camera pointer and disallow any operations onto it.
*/
CAMERA_CONNECTION_BROKEN
}
......@@ -174,14 +174,14 @@ typedef struct dt_camctl_listener_t
/** Invoked when a value of a property is changed. */
void (*camera_property_value_changed)(const dt_camera_t *camera,const char *name,const char *value,void *data);
/** Invoked when accesibility of a property is changed. */
/** Invoked when accessibility of a property is changed. */
void (*camera_property_accessibility_changed)(const dt_camera_t *camera,const char *name,gboolean read_only,void *data);
/** Invoked from dt_camctl_detect_cameras() when a new camera is connected */
void (*camera_connected)(const dt_camera_t *camera,void *data);
/** Invoked from dt_camctl_detect_cameras() when a new camera is disconnected, or when connection is broken and camera is unuseable */
/** Invoked from dt_camctl_detect_cameras() when a new camera is disconnected, or when connection is broken and camera is unusable */
void (*camera_disconnected)(const dt_camera_t *camera,void *data);
/** Invoked when a error occured \see dt_camera_error_t */
/** Invoked when a error occurred \see dt_camera_error_t */
void (*camera_error)(const dt_camera_t *camera,dt_camera_error_t error,void *data);
} dt_camctl_listener_t;
......@@ -216,7 +216,7 @@ void dt_camctl_select_camera(const dt_camctl_t *c, const dt_camera_t *cam);
int dt_camctl_can_enter_tether_mode(const dt_camctl_t *c, const dt_camera_t *cam);
/** Enables/Disables the tether mode on camera. */
void dt_camctl_tether_mode(const dt_camctl_t *c,const dt_camera_t *cam,gboolean enable);
/** travers filesystem on camera an retreives previews of images */
/** traverse filesystem on camera an retrieves previews of images */
void dt_camctl_get_previews(const dt_camctl_t *c,dt_camera_preview_flags_t flags,const dt_camera_t *cam);
/** Imports the images in list from specified camera */
void dt_camctl_import(const dt_camctl_t *c,const dt_camera_t *cam,GList *images,gboolean delete_orginals);
......@@ -233,16 +233,16 @@ const char *dt_camctl_camera_get_model(const dt_camctl_t *c,const dt_camera_t *c
/** Set a property value \param cam Pointer to dt_camera_t if NULL the camctl->active_camera is used. */
void dt_camctl_camera_set_property_string(const dt_camctl_t *c,const dt_camera_t *cam,const char *property_name, const char *value);
void dt_camctl_camera_set_property_int(const dt_camctl_t *c,const dt_camera_t *cam,const char *property_name, const int value);
/** Get a property value from chached configuration. \param cam Pointer to dt_camera_t if NULL the camctl->active_camera is used. */
/** Get a property value from cached configuration. \param cam Pointer to dt_camera_t if NULL the camctl->active_camera is used. */
const char*dt_camctl_camera_get_property(const dt_camctl_t *c,const dt_camera_t *cam,const char *property_name);
/** Check if property exists. */
int dt_camctl_camera_property_exists(const dt_camctl_t *c,const dt_camera_t *cam,const char *property_name);
/** Get first choice availble for named property. */
/** Get first choice available for named property. */
const char *dt_camctl_camera_property_get_first_choice(const dt_camctl_t *c,const dt_camera_t *cam,const char *property_name);
/** Get next choice availble for named property. */
/** Get next choice available for named property. */
const char *dt_camctl_camera_property_get_next_choice(const dt_camctl_t *c,const dt_camera_t *cam,const char *property_name);
/** build a popupmenu with all properties available */
/** build a popup menu with all properties available */
void dt_camctl_camera_build_property_menu (const dt_camctl_t *c,const dt_camera_t *cam,GtkMenu **menu, GCallback item_activate, gpointer user_data);
#endif
......
......@@ -210,7 +210,7 @@ dt_collection_set_query_flags(const dt_collection_t *collection, uint32_t flags)
void
dt_collection_set_extended_where(const dt_collection_t *collection,gchar *extended_where)
{
/* free extended where if alread exists */
/* free extended where if already exists */
if (collection->where_ext)
g_free (collection->where_ext);
......@@ -644,7 +644,7 @@ dt_collection_update_query(const dt_collection_t *collection)
}
/* raise signal of collection change, only if this is an orginal */
/* raise signal of collection change, only if this is an original */
if (!collection->clone)
dt_control_signal_raise(darktable.signals, DT_SIGNAL_COLLECTION_CHANGED);
......
......@@ -3,7 +3,7 @@
#include "common/darktable.h"
#include <gtk/gtk.h>
/** array of names and constant to ease lable manipulation */
/** array of names and constant to ease label manipulation */
typedef enum dt_colorlables_enum
{
DT_COLORLABELS_RED,
......
......@@ -27,7 +27,7 @@
#define CATMULL_ROM 1
#define MONOTONE_HERMITE 2
//Maximum resoltuion allowed due to space considerations.
//Maximum resolution allowed due to space considerations.
#define MAX_RESOLUTION 65536
#define MAX_ANCHORS 20
......
......@@ -159,14 +159,14 @@ void _dt_sigsegv_handler(int param)
else
{
delete_file = TRUE;
g_printerr("an error occured while trying to execute gdb. please check if gdb is installed on your system.\n");
g_printerr("an error occurred while trying to execute gdb. please check if gdb is installed on your system.\n");
}
}
}
else
{
delete_file = TRUE;
g_printerr("an error occured while trying to execute gdb.\n");
g_printerr("an error occurred while trying to execute gdb.\n");
}
if(fout != STDOUT_FILENO)
......@@ -446,7 +446,7 @@ int dt_init(int argc, char *argv[], const int init_gui)
else if(!strcmp(argv[k+1], "memory")) darktable.unmuted |= DT_DEBUG_MEMORY; // some stats on mem usage now and then.
else if(!strcmp(argv[k+1], "lighttable")) darktable.unmuted |= DT_DEBUG_LIGHTTABLE; // lighttable related stuff.
else if(!strcmp(argv[k+1], "nan")) darktable.unmuted |= DT_DEBUG_NAN; // check for NANs when processing the pipe.
else if(!strcmp(argv[k+1], "masks")) darktable.unmuted |= DT_DEBUG_MASKS; // masks reated stuff.
else if(!strcmp(argv[k+1], "masks")) darktable.unmuted |= DT_DEBUG_MASKS; // masks related stuff.
else if(!strcmp(argv[k+1], "lua")) darktable.unmuted |= DT_DEBUG_LUA; // lua errors are reported on console
else return usage(argv[0]);
k ++;
......@@ -514,7 +514,7 @@ int dt_init(int argc, char *argv[], const int init_gui)
char filename[DT_MAX_PATH_LEN];
snprintf(filename, DT_MAX_PATH_LEN, "%s/darktablerc", datadir);
// intialize the config backend. this needs to be done first...
// initialize the config backend. this needs to be done first...
darktable.conf = (dt_conf_t *)malloc(sizeof(dt_conf_t));
memset(darktable.conf, 0, sizeof(dt_conf_t));
dt_conf_init(darktable.conf, filename);
......@@ -622,7 +622,7 @@ int dt_init(int argc, char *argv[], const int init_gui)
darktable.collection_listeners = NULL;
darktable.collection = dt_collection_new(NULL);
/* initialize sellection */
/* initialize selection */
darktable.selection = dt_selection_new();
/* capabilities set to NULL */
......
......@@ -16,7 +16,7 @@
along with darktable. If not, see <http://www.gnu.org/licenses/>.
*/
/* getpwnam_r availibility check */
/* getpwnam_r availability check */
#if defined __APPLE__ || defined _POSIX_C_SOURCE >= 1 || \
defined _XOPEN_SOURCE || defined _BSD_SOURCE || defined _SVID_SOURCE || \
defined _POSIX_SOURCE || defined __DragonFly__ || defined __FreeBSD__ || \
......@@ -44,7 +44,7 @@ gchar* dt_loc_get_home_dir(const gchar* user)
#if defined HAVE_GETPWNAM_R
/* if the given username is not the same as the current one, we try
* to retreive the pw dir from the password file entry */
* to retrieve the pw dir from the password file entry */
struct passwd pwd;
struct passwd* result;
#ifdef _SC_GETPW_R_SIZE_MAX
......
......@@ -233,7 +233,7 @@ int dt_film_import_blocking(const char *dirname)
int rc;
sqlite3_stmt *stmt;
/* intialize a film object*/
/* initialize a film object*/
dt_film_t *film = (dt_film_t *)malloc(sizeof(dt_film_t));
dt_film_init(film);
film->id = -1;
......@@ -247,7 +247,7 @@ int dt_film_import_blocking(const char *dirname)
film->id = sqlite3_column_int(stmt, 0);
sqlite3_finalize(stmt);
/* if we didnt find a id, lets instansiate a new filmroll */
/* if we didn't find a id, lets instansiate a new filmroll */
if(film->id <= 0)
{
char datetime[20];
......
......@@ -61,7 +61,7 @@ void dt_film_set_query(const int32_t id);
void dt_film_remove(const int id);
/** checks if film is empty */
int dt_film_is_empty(const int id);
/** Createing a new filmroll */
/** Creating a new filmroll */
int dt_film_new(dt_film_t *film,const char *directory);
/** removes all empty film rolls. */
void dt_film_remove_empty();
......
......@@ -40,7 +40,7 @@ typedef struct _watch_t
int descriptor; // Handle
dt_fswatch_type_t type; // DT_FSWATCH_* type
void *data; // Assigned data
int events; // events occured..
int events; // events occurred..
} _watch_t;
......@@ -118,7 +118,7 @@ static void *_fswatch_thread(void *data)
}
else if( (event_hdr->mask&IN_ATTRIB) && (item->events&IN_DELETE_SELF) && (item->events&IN_IGNORED))
{
// This pattern showed up when another file is replacing the orginal...
// This pattern showed up when another file is replacing the original...
dt_image_t *img=(dt_image_t *)item->data;
img->force_reimport = 1;
if(darktable.develop->image==img)
......
......@@ -97,7 +97,7 @@ dt_gpx_t *dt_gpx_new(const gchar *filename)
goto error;
/* clenup and return gpx context */
/* cleanup and return gpx context */
g_markup_parse_context_free(ctx);
return gpx;
......@@ -223,7 +223,7 @@ void _gpx_parser_start_element(GMarkupParseContext *ctx,
}
else
fprintf(stderr,"broken gpx file, trkpt element doesnt have lon/lat attributes\n");
fprintf(stderr,"broken gpx file, trkpt element doesn't have lon/lat attributes\n");
gpx->current_parser_element = GPX_PARSER_ELEMENT_TRKPT;
}
......
......@@ -45,7 +45,7 @@ dt_grouping_remove_from_group(int image_id)
const dt_image_t *img = dt_image_cache_read_get(darktable.image_cache, image_id);
if(img->group_id == image_id)
{
// get a new group_id for all the others in the group. also write it to the dt_image_t sturct.
// get a new group_id for all the others in the group. also write it to the dt_image_t struct.
DT_DEBUG_SQLITE3_PREPARE_V2(dt_database_get(darktable.db), "select id from images where group_id = ?1 and id != ?2", -1, &stmt, NULL);
DT_DEBUG_SQLITE3_BIND_INT(stmt, 1, img->group_id);
DT_DEBUG_SQLITE3_BIND_INT(stmt, 2, image_id);
......
......@@ -50,7 +50,7 @@ _dt_history_cleanup_multi_instance(int imgid, int minnum)
/* let's clean-up the history multi-instance. What we want to do is have a unique multi_priority value for each iop.
Furthermore this value must start to 0 and increment one by one for each multi-instance of the same module. On
SQLite there is no notion of ROW_NUMBER, so we use rather ressource consuming SQL statement, but as an history has
SQLite there is no notion of ROW_NUMBER, so we use rather resource consuming SQL statement, but as an history has
never a huge number of items that's not a real issue.
We only do this for the given imgid and only for num>minnum, that is we only handle new history items just copied.
......
......@@ -215,7 +215,7 @@ dt_image_cache_write_get(
}
// drops the write priviledges on an image struct.
// drops the write privileges on an image struct.
// this triggers a write-through to sql, and if the setting
// is present, also to xmp sidecar files (safe setting).
void
......
......@@ -77,8 +77,8 @@ dt_image_cache_write_get(
dt_image_cache_t *cache,
const dt_image_t *img);
// drops the write priviledges on an image struct.
// thtis triggers a write-through to sql, and if the setting
// drops the write privileges on an image struct.
// this triggers a write-through to sql, and if the setting
// is present, also to xmp sidecar files (safe setting).
void
dt_image_cache_write_release(
......
......@@ -380,7 +380,7 @@ static const uint8_t _imageio_ldr_magic[] =
0x00, 0x01, 0x03, 0x50, 0x4E, 0x47, // ASCII 'PNG'
/* canon CR2 */
0x01, 0x00, 0x0a, 0x49, 0x49, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x43, 0x52, // Canon CR2 is like TIFF with aditional magic number. must come before tiff as an exclusion
0x01, 0x00, 0x0a, 0x49, 0x49, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x43, 0x52, // Canon CR2 is like TIFF with additional magic number. must come before tiff as an exclusion
/* tiff image, intel */
0x00, 0x00, 0x04, 0x4d, 0x4d, 0x00, 0x2a,
......@@ -801,7 +801,7 @@ dt_imageio_open(
const char *filename, // full path
dt_mipmap_cache_allocator_t a) // allocate via dt_mipmap_cache_alloc
{
/* first of all, check if file exists, dont bother to test loading if not exists */
/* first of all, check if file exists, don't bother to test loading if not exists */
if(!g_file_test(filename, G_FILE_TEST_IS_REGULAR))
return !DT_IMAGEIO_OK;
......
......@@ -163,7 +163,7 @@ dt_imageio_open_rawspeed(
{
printf("[rawspeed] %s\n", exc.what());
/* if an exception is rasied lets not retry or handle the
/* if an exception is raised lets not retry or handle the
specific ones, consider the file as corrupted */
return DT_IMAGEIO_FILE_CORRUPTED;
}
......
......@@ -37,11 +37,11 @@ enum border_mode
};
/* Supporting them all might be overkill, let the compiler trim all
* unecessary modes in clip for resampling codepath*/
* unnecessary modes in clip for resampling codepath*/
#define RESAMPLING_BORDER_MODE BORDER_REPLICATE
/* Supporting them all might be overkill, let the compiler trim all
* unecessary modes in interpolation codepath */
* unnecessary modes in interpolation codepath */
#define INTERPOLATION_BORDER_MODE BORDER_MIRROR
// Defines minimum alignment requirement for critical SIMD code
......@@ -1149,7 +1149,7 @@ prepare_resampling_plan(
int* meta = metareq ? (int*)blob : NULL;
blob = (char*)blob + metareq;
/* setting this as a const should help the compilers trim all unecessary
/* setting this as a const should help the compilers trim all unnecessary
* codepaths */
const enum border_mode bordermode = RESAMPLING_BORDER_MODE;
......
......@@ -87,7 +87,7 @@ dt_interpolation_compute_sample(
*
* This function computes a full 4 component pixel. This helps a bit speedwise
* as interpolation coordinates are supposed to be the same for all components.
* Thus we can share horizontal and vertical interpolation kernels accross all
* Thus we can share horizontal and vertical interpolation kernels across all
* components
*
* NB: a pixel is to be four floats big in stride
......
......@@ -1108,7 +1108,7 @@ _init_f(
{
const uint32_t wd = *width, ht = *height;
/* do not even try to process file if it isnt available */
/* do not even try to process file if it isn't available */
char filename[2048] = {0};
dt_image_full_path(imgid, filename, 2048);
if (strlen(filename) == 0 || !g_file_test(filename, G_FILE_TEST_EXISTS))
......
......@@ -219,7 +219,7 @@ void dt_opencl_init(dt_opencl_t *cl, const int argc, char *argv[])
if(!strncasecmp(vendor, "NVIDIA", 6))
{
// very lame attemt to detect support for atomic float add in global memory.
// very lame attempt to detect support for atomic float add in global memory.
// we need compute model sm_20, but let's try for all nvidia devices :(
cl->dev[dev].nvidia_sm_20 = dt_nvidia_gpu_supports_sm_20(infostr);
dt_print(DT_DEBUG_OPENCL, "[opencl_init] device %d `%s' %s sm_20 support.\n", k, infostr, cl->dev[dev].nvidia_sm_20 ? "has" : "doesn't have");
......@@ -352,7 +352,7 @@ void dt_opencl_init(dt_opencl_t *cl, const int argc, char *argv[])
if(!programname || programname[0] == '\0' || prog < 0)
{
dt_print(DT_DEBUG_OPENCL, "[opencl_init] malformated entry in programs.conf `%s'; ignoring it!\n", confentry);
dt_print(DT_DEBUG_OPENCL, "[opencl_init] malformed entry in programs.conf `%s'; ignoring it!\n", confentry);
continue;
}
......@@ -504,7 +504,7 @@ int dt_opencl_finish(const int devid)
cl_int err = (cl->dlocl->symbols->dt_clFinish)(cl->dev[devid].cmd_queue);
// take the opportunity to release some event handles, but without printing
// sumary statistics
// summary statistics
cl_int success = dt_opencl_events_flush(devid, 0);
return (err == CL_SUCCESS && success == CL_COMPLETE);
......@@ -1691,7 +1691,7 @@ void dt_opencl_events_wait_for(const int devid)
if (*eventlist==NULL || *numevents==0) return; // nothing to do
// check if last event slot was acutally used and correct numevents if needed
// check if last event slot was actually used and correct numevents if needed
if (!memcmp((*eventlist)+*numevents-1, zeroevent, sizeof(cl_event)))
{
(*numevents)--;
......
......@@ -62,7 +62,7 @@ const dt_selection_t * dt_selection_new()
_selection_update_collection(NULL, (gpointer)s);
/* setup singal handler for darktable collection update
/* setup signal handler for darktable collection update
to update the internal collection of the selection */
dt_control_signal_connect(darktable.signals,
DT_SIGNAL_COLLECTION_CHANGED,
......@@ -221,7 +221,7 @@ void dt_selection_select_range(dt_selection_t *selection, uint32_t imgid)
sqlite3_finalize(stmt);
/* selece the images in range from start to end */
/* select the images in range from start to end */
uint32_t old_flags = dt_collection_get_query_flags(selection->collection);
/* use the limit to select range of images */
......
......@@ -92,7 +92,7 @@ _dt_style_cleanup_multi_instance(int id)
/* let's clean-up the style multi-instance. What we want to do is have a unique multi_priority value for each iop.
Furthermore this value must start to 0 and increment one by one for each multi-instance of the same module. On
SQLite there is no notion of ROW_NUMBER, so we use rather ressource consuming SQL statement, but as a style has
SQLite there is no notion of ROW_NUMBER, so we use rather resource consuming SQL statement, but as a style has
never a huge number of items that's not a real issue. */
DT_DEBUG_SQLITE3_PREPARE_V2(dt_database_get(darktable.db), "update style_items set multi_priority=(select COUNT(0)-1 from style_items sty2 where sty2.num<=style_items.num and sty2.operation=style_items.operation and sty2.styleid=?1), multi_name=multi_priority where styleid=?1", -1, &stmt, NULL);
......@@ -219,14 +219,14 @@ dt_styles_update (const char *name, const char *newname, const char *newdescript
dt_styles_save_to_file(newname,stylesdir,TRUE);
/* delete old accelerator and create a new one */
//TODO: sould better use dt_accel_rename_global() to keep the old accel_key untouched, but it seems to be buggy
//TODO: should better use dt_accel_rename_global() to keep the old accel_key untouched, but it seems to be buggy
if (g_strcmp0(name, newname))
{
char tmp_accel[1024];
snprintf(tmp_accel, 1024, C_("accel", "styles/apply %s"), name);
dt_accel_deregister_global(tmp_accel);
gchar* tmp_name = g_strdup(newname); // freed by _destro_style_shortcut_callback
gchar* tmp_name = g_strdup(newname); // freed by _destroy_style_shortcut_callback
snprintf(tmp_accel, 1024, C_("accel", "styles/apply %s"), newname);
dt_accel_register_global( tmp_accel, 0, 0);
GClosure *closure;
......@@ -296,7 +296,7 @@ dt_styles_create_from_style (const char *name, const char *newname, const char *
dt_styles_save_to_file(newname,stylesdir,FALSE);
char tmp_accel[1024];
gchar* tmp_name = g_strdup(newname); // freed by _destro_style_shortcut_callback
gchar* tmp_name = g_strdup(newname); // freed by _destroy_style_shortcut_callback
snprintf(tmp_accel,1024,C_("accel", "styles/apply %s"),newname);
dt_accel_register_global( tmp_accel, 0, 0);
GClosure *closure;
......@@ -357,7 +357,7 @@ dt_styles_create_from_image (const char *name,const char *description,int32_t im
dt_styles_save_to_file(name,stylesdir,FALSE);
char tmp_accel[1024];
gchar* tmp_name = g_strdup(name); // freed by _destro_style_shortcut_callback
gchar* tmp_name = g_strdup(name); // freed by _destroy_style_shortcut_callback
snprintf(tmp_accel,1024,C_("accel", "styles/apply %s"),name);
dt_accel_register_global( tmp_accel, 0, 0);
GClosure *closure;
......
......@@ -58,7 +58,7 @@ void dt_tag_detach(guint tagid,gint imgid);
/** detach tags from images that matches name, it is valid to use % to match tag */
void dt_tag_detach_by_string(const char *name, gint imgid);
/** retreives a list of tags of specified imgid \param[out] result a list of dt_tag_t. */
/** retrieves a list of tags of specified imgid \param[out] result a list of dt_tag_t. */
uint32_t dt_tag_get_attached(gint imgid,GList **result);
/** get a string of tags, all serialized, and separated with separator */
......@@ -67,16 +67,16 @@ gchar* dt_tag_get_list(gint imgid, const gchar *separator);
/** get a string of only hierarchical tags, all serialized, and separated with separator */
gchar *dt_tag_get_hierarchical(gint imgid, const gchar *separator);
/** retreives a list of suggested tags matching keyword. \param[in] keyword the keyword to search \param[out] result a pointer to list populated with result. \return the count \note the limit of result is decided by conf value "xxx" */
/** retrieves a list of suggested tags matching keyword. \param[in] keyword the keyword to search \param[out] result a pointer to list populated with result. \return the count \note the limit of result is decided by conf value "xxx" */
uint32_t dt_tag_get_suggestions(const gchar *keyword, GList **result);
/** retreives a list of recent tags used. \param[out] result a pointer to list populated with result. \return the count \note the limit of result is decided by conf value "xxx" */
/** retrieves a list of recent tags used. \param[out] result a pointer to list populated with result. \return the count \note the limit of result is decided by conf value "xxx" */
uint32_t dt_tag_get_recent_used(GList **result);
/** frees the memory of a result set. */
void dt_tag_free_result(GList **result);
/** reorgnize tags */
/** reorganize tags */
void dt_tag_reorganize(const gchar *source, const gchar *dest);
......
......@@ -25,9 +25,9 @@
/** dynamically allocate and concatenate string */
gchar *dt_util_dstrcat(gchar *str,const gchar *format, ... );
/** replace all occurences of pattern by substitute. the returned value has to be freed after use. */
/** replace all occurrences of pattern by substitute. the returned value has to be freed after use. */
gchar* dt_util_str_replace(const gchar* string, const gchar* pattern, const gchar* substitute);
/** count the number of occurences of needle in haystack */
/** count the number of occurrences of needle in haystack */
guint dt_util_str_occurence(const gchar *haystack,const gchar *needle);
/** generate a string from the elements of the list, separated by separator. the list is freed, the result has to be freed. */
gchar* dt_util_glist_to_str(const gchar* separator, GList * items, const unsigned int count);
......
......@@ -199,7 +199,7 @@ gboolean _variable_get_value(dt_variables_params_t *params, gchar *variable,gcha
}
else if( g_strcmp0(variable,"$(LABELS)") == 0 && (got_value=TRUE) )
{
//TODO: currently we concatenate all the color labels with a ',' as a seeparator. Maybe it's better to only use the first/last label?
//TODO: currently we concatenate all the color labels with a ',' as a separator. Maybe it's better to only use the first/last label?
unsigned int count = 0;
GList *res = dt_metadata_get(params->imgid, "Xmp.darktable.colorlabels", &count);
res = g_list_first(res);
......
......@@ -31,7 +31,7 @@ typedef struct dt_variables_params_t
/** used for expanding variable $(JOBCODE) */
const gchar *jobcode;
/** used for expanding variables such as $(IMAGE_WIDTH) $(IMAGE_HEIGT). */
/** used for expanding variables such as $(IMAGE_WIDTH) $(IMAGE_HEIGHT). */
uint32_t imgid;
/** used as thread-safe sequence number. only used if >= 0. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment