Commit 4cd7f9ae authored by Richard Wonka's avatar Richard Wonka

removed other branches from this.

parent 8d5f6090
......@@ -155,7 +155,7 @@ gboolean _variable_get_value(dt_variables_params_t *params, gchar *variable,gcha
else if( g_strcmp0(variable,"$(ID)") == 0 && (got_value=TRUE) ) sprintf(value,"%d", params->imgid);
else if( g_strcmp0(variable,"$(JOBCODE)") == 0 && (got_value=TRUE) ) sprintf(value,"%s",params->jobcode);
else if( g_strcmp0(variable,"$(ROLL_NAME)") == 0 && params->filename && (got_value=TRUE) ) sprintf(value,"%s",g_path_get_basename(g_path_get_dirname(params->filename)));
else if( g_strcmp0(variable,"$(FILE_DIRECTORY)") == 0 && params->filename && (got_value=TRUE) ) sprintf(value,"%s",g_path_get_dirname(params->filename));
else if( g_strcmp0(variable,"$(FILE_FOLDER)") == 0 && params->filename && (got_value=TRUE) ) sprintf(value,"%s",g_path_get_dirname(params->filename));
else if( g_strcmp0(variable,"$(FILE_NAME)") == 0 && params->filename && (got_value=TRUE) )
{
sprintf(value,"%s",g_path_get_basename(params->filename));
......@@ -164,9 +164,9 @@ gboolean _variable_get_value(dt_variables_params_t *params, gchar *variable,gcha
else if( g_strcmp0(variable,"$(FILE_EXTENSION)") == 0 && params->filename && (got_value=TRUE) ) sprintf(value,"%s",file_ext);
else if( g_strcmp0(variable,"$(SEQUENCE)") == 0 && (got_value=TRUE) ) sprintf(value,"%.4d",params->sequence>=0?params->sequence:params->data->sequence);
else if( g_strcmp0(variable,"$(USERNAME)") == 0 && (got_value=TRUE) ) sprintf(value,"%s",g_get_user_name());
else if( g_strcmp0(variable,"$(HOME_FOLDER)") == 0 && (got_value=TRUE) ) sprintf(value,"%s",homedir);
else if( g_strcmp0(variable,"$(HOME)") == 0 && (got_value=TRUE) ) sprintf(value,"%s",homedir);
else if( g_strcmp0(variable,"$(PICTURES_FOLDER)") == 0 && (got_value=TRUE) ) sprintf(value,"%s",pictures_folder);
else if( g_strcmp0(variable,"$(DESKTOP_FOLDER)") == 0 && (got_value=TRUE) ) sprintf(value,"%s",g_get_user_special_dir(G_USER_DIRECTORY_DESKTOP));
else if( g_strcmp0(variable,"$(DESKTOP)") == 0 && (got_value=TRUE) ) sprintf(value,"%s",g_get_user_special_dir(G_USER_DIRECTORY_DESKTOP));
#if 0
else if( g_strcmp0(variable,"$(VC)") == 0 && (got_value=TRUE) )
{
......@@ -296,4 +296,6 @@ void dt_variables_reset_sequence(dt_variables_params_t *params)
params->data->sequence = 0;
}
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
// vim: shiftwidth=2 expandtab tabstop=2 cindent
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-space on;
......@@ -25,7 +25,7 @@ typedef struct dt_variables_params_t
/** only validates string */
gboolean validate_only;
/** used for expanding variables that uses filename $(FILE_DIRECTORY) $(FILE_NAME) and $(FILE_EXTENSION). */
/** used for expanding variables that uses filename $(FILE_FOLDER) $(FILE_NAME) and $(FILE_EXTENSION). */
const gchar *filename;
/** used for expanding variable $(JOBCODE) */
......@@ -57,3 +57,6 @@ const gchar *dt_variables_get_result(dt_variables_params_t *params);
void dt_variables_reset_sequence(dt_variables_params_t *params);
#endif
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
// vim: shiftwidth=2 expandtab tabstop=2 cindent
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-space on;
......@@ -108,7 +108,7 @@ gui_init (dt_imageio_module_storage_t *self)
dt_gui_key_accel_block_on_focus (GTK_WIDGET (d->entry));
g_object_set(G_OBJECT(widget), "tooltip-text", _("enter the path where to put exported images:\n"
"$(ROLL_NAME) - roll of the input image\n"
"$(FILE_DIRECTORY) - directory of the input image\n"
"$(FILE_FOLDER) - folder containing the input image\n"
"$(FILE_NAME) - basename of the input image\n"
"$(FILE_EXTENSION) - extension of the input image\n"
"$(SEQUENCE) - sequence number\n"
......@@ -127,8 +127,8 @@ gui_init (dt_imageio_module_storage_t *self)
"$(STARS) - star rating\n"
"$(LABELS) - colorlabels\n"
"$(PICTURES_FOLDER) - pictures folder\n"
"$(HOME_FOLDER) - home folder\n"
"$(DESKTOP_FOLDER) - desktop folder"
"$(HOME) - home folder\n"
"$(DESKTOP) - desktop folder"
), (char *)NULL);
widget = dtgtk_button_new(dtgtk_cairo_paint_directory, 0);
gtk_widget_set_size_request(widget, 18, 18);
......@@ -148,7 +148,7 @@ gui_reset (dt_imageio_module_storage_t *self)
{
disk_t *d = (disk_t *)self->gui_data;
// global default can be annoying:
// gtk_entry_set_text(GTK_ENTRY(d->entry), "$(FILE_DIRECTORY)/darktable_exported/$(FILE_NAME)");
// gtk_entry_set_text(GTK_ENTRY(d->entry), "$(FILE_FOLDER)/darktable_exported/$(FILE_NAME)");
dt_conf_set_string("plugins/imageio/storage/disk/file_directory", gtk_entry_get_text(d->entry));
}
......@@ -288,4 +288,6 @@ set_params(dt_imageio_module_storage_t *self, void *params, int size)
return 0;
}
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
// vim: shiftwidth=2 expandtab tabstop=2 cindent
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-space on;
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