Commit 0f3065cf authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

removed unused variables

parent 429cf863
......@@ -225,8 +225,6 @@ cairo_image_surface_apply_bcs (cairo_surface_t *source,
GthAsyncTask *task)
{
PixbufCache *cache;
int i;
double midtone_distance[256];
int width;
int height;
int source_stride;
......@@ -235,15 +233,11 @@ cairo_image_surface_apply_bcs (cairo_surface_t *source,
gboolean cancelled = FALSE;
double progress;
unsigned char *p_source;
int image_red, image_green, image_blue, image_alpha;
unsigned char values[4];
int red, green, blue, alpha;
int temp, min, max, lightness, value;
int temp, value;
gimp_op_init ();
cache = pixbuf_cache_new ();
for (i = 0; i < 256; i++)
midtone_distance[i] = 0.667 * (1 - SQR (((double) i - 127.0) / 127.0));
if (saturation < 0)
saturation = tan (saturation * G_PI_2);
......@@ -406,7 +400,6 @@ cairo_image_surface_add_color (cairo_surface_t *source,
guchar color_alpha,
GthAsyncTask *task)
{
int i;
int width;
int height;
int source_stride;
......
......@@ -40,12 +40,12 @@ gpointer
file_tools__gth_browser_file_list_key_press_cb (GthBrowser *browser,
GdkEventKey *event)
{
gpointer result = NULL;
GtkWidget *sidebar;
GtkWidget *toolbox;
GthFileTool *tool = NULL;
guint modifiers;
GtkWidget *page;
gpointer result = NULL;
GtkWidget *sidebar;
GtkWidget *toolbox;
GthFileTool *tool = NULL;
guint modifiers;
GthViewerPage *page;
sidebar = gth_browser_get_viewer_sidebar (browser);
toolbox = gth_sidebar_get_toolbox (GTH_SIDEBAR (sidebar));
......
......@@ -50,7 +50,6 @@ gth_curve_new_for_points (GType curve_type,
{
GthCurve *curve;
va_list args;
int i;
GthPoints points;
curve = g_object_new (curve_type, NULL);
......@@ -375,9 +374,11 @@ gth_cspline_finalize (GObject *object)
}
#if 0
static int number_sign (double x) {
return (x < 0) ? -1 : (x > 0) ? 1 : 0;
}
#endif
static void
......
......@@ -205,7 +205,6 @@ adjust_contrast_setup (EqualizeData *equalize_data,
cairo_surface_t *source)
{
GthHistogram *histogram;
int c;
histogram = gth_histogram_new ();
gth_histogram_calculate_for_image (histogram, source);
......
......@@ -77,8 +77,7 @@ static void
curves_setup (TaskData *task_data,
cairo_surface_t *source)
{
long **value_map;
int c, v;
int c, v;
for (c = GTH_HISTOGRAM_CHANNEL_VALUE; c <= GTH_HISTOGRAM_CHANNEL_BLUE; c++) {
task_data->value_map[c] = g_new (long, 256);
......@@ -242,7 +241,7 @@ static TaskData *
task_data_new (GthPoints *points)
{
TaskData *task_data;
int c, n;
int c;
task_data = g_new (TaskData, 1);
for (c = 0; c < GTH_HISTOGRAM_N_CHANNELS; c++) {
......@@ -297,7 +296,6 @@ apply_cb (gpointer user_data)
GthFileToolCurves *self = user_data;
GtkWidget *window;
GthPoints points[GTH_HISTOGRAM_N_CHANNELS];
int c;
if (self->priv->apply_event != 0) {
g_source_remove (self->priv->apply_event);
......@@ -523,7 +521,6 @@ preset_changed_cb (GthCurvePreset *preset,
gpointer user_data)
{
GthFileToolCurves *self = user_data;
gboolean saved;
const char *preset_name;
GthPoints *points;
GError *error = NULL;
......@@ -715,7 +712,6 @@ gth_file_tool_curves_get_options (GthFileTool *base)
self->priv->filter_grid = gth_filter_grid_new ();
for (i = 0; i < gth_curve_preset_get_size (self->priv->preset); i++) {
GthPoints *points;
int c;
const char *name;
int id;
......@@ -881,8 +877,6 @@ gth_file_tool_sharpen_reset_image (GthImageViewerPageTool *base)
static void
gth_file_tool_curves_init (GthFileToolCurves *self)
{
int c;
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTH_TYPE_FILE_TOOL_CURVES, GthFileToolCurvesPrivate);
self->priv->preview = NULL;
self->priv->destination = NULL;
......
......@@ -369,7 +369,6 @@ warmer_exec (GthAsyncTask *task,
cairo_surface_t *original;
cairo_surface_t *source;
GthCurve *curve[GTH_HISTOGRAM_N_CHANNELS];
gboolean cancelled = FALSE;
original = gth_image_task_get_source_surface (GTH_IMAGE_TASK (task));
source = _cairo_image_surface_copy (original);
......@@ -414,7 +413,6 @@ cooler_exec (GthAsyncTask *task,
cairo_surface_t *original;
cairo_surface_t *source;
GthCurve *curve[GTH_HISTOGRAM_N_CHANNELS];
gboolean cancelled = FALSE;
original = gth_image_task_get_source_surface (GTH_IMAGE_TASK (task));
source = _cairo_image_surface_copy (original);
......@@ -700,7 +698,6 @@ cherry_exec (GthAsyncTask *task,
cairo_surface_t *original;
cairo_surface_t *source;
GthCurve *curve[GTH_HISTOGRAM_N_CHANNELS];
gboolean cancelled = FALSE;
original = gth_image_task_get_source_surface (GTH_IMAGE_TASK (task));
source = _cairo_image_surface_copy (original);
......@@ -748,7 +745,6 @@ vintage_exec (GthAsyncTask *task,
cairo_surface_t *original;
cairo_surface_t *source;
GthCurve *curve[GTH_HISTOGRAM_N_CHANNELS];
gboolean cancelled = FALSE;
original = gth_image_task_get_source_surface (GTH_IMAGE_TASK (task));
source = _cairo_image_surface_copy (original);
......@@ -919,7 +915,6 @@ vignette_exec (GthAsyncTask *task,
{
cairo_surface_t *original;
cairo_surface_t *destination;
gboolean cancelled = FALSE;
original = gth_image_task_get_source_surface (GTH_IMAGE_TASK (task));
destination = _cairo_image_surface_copy (original);
......
......@@ -373,7 +373,6 @@ update_overview_visibility_now (gpointer user_data)
{
GthImageViewerPage *self;
gboolean overview_visible;
gboolean revealed;
self = GTH_IMAGE_VIEWER_PAGE (user_data);
......
......@@ -255,7 +255,6 @@ _jpeg_exif_colorimetry_from_app1_segment (guchar *in_buffer,
gboolean big_endian;
guchar *exif_data;
guint offset, number_of_tags, tagnum;
int orientation;
int remaining_tags;
/* Length includes itself, so must be at least 2 */
......
......@@ -120,8 +120,6 @@ browser__dlg_preferences_construct_cb (GtkWidget *dialog,
GtkBuilder *dialog_builder)
{
BrowserData *data;
char *startup_location;
GthFileSource *file_source;
char *current_caption;
GtkWidget *label;
GtkWidget *page;
......
......@@ -135,9 +135,6 @@ general__dlg_preferences_construct_cb (GtkWidget *dialog,
BrowserData *data;
char *startup_location;
GthFileSource *file_source;
char *current_caption;
GtkWidget *label;
GtkWidget *page;
data = g_new0 (BrowserData, 1);
data->builder = g_object_ref (dialog_builder);
......
......@@ -76,13 +76,12 @@ list_box_row_activated_cb (GtkListBox *box,
void
dlg_preferences (GthBrowser *browser)
{
DialogData *data;
GtkWidget *notebook;
GList *children;
GList *scan;
int page_num;
GtkWidget *list_box;
GtkTreeSelection *selection;
DialogData *data;
GtkWidget *notebook;
GList *children;
GList *scan;
int page_num;
GtkWidget *list_box;
if (gth_browser_get_dialog (browser, "preferences") != NULL) {
gtk_window_present (GTK_WINDOW (gth_browser_get_dialog (browser, "preferences")));
......
......@@ -722,7 +722,6 @@ dom_str_equal (const char *a,
const char *b)
{
const char *ai, *bi;
gboolean a_valid, b_valid;
if ((a != NULL) && ! g_utf8_validate (a, -1, NULL))
a = NULL;
......
......@@ -2275,7 +2275,6 @@ hide_mouse_pointer_cb (gpointer data)
{
HideMouseData *hmdata = data;
GthBrowser *browser = hmdata->browser;
GList *scan;
browser->priv->hide_mouse_timeout = 0;
......@@ -6421,14 +6420,10 @@ _gth_browser_load_file_keep_view (GthBrowser *browser,
gboolean view,
gboolean no_delay)
{
gboolean fullscreen;
if (browser->priv->view_files_in_fullscreen && gth_browser_get_is_fullscreen (browser))
view = FALSE;
else if (gth_window_get_current_page (GTH_WINDOW (browser)) == GTH_BROWSER_PAGE_VIEWER)
view = FALSE;
fullscreen = view && browser->priv->view_files_in_fullscreen;
_gth_browser_load_file_more_options (browser, file_data, view, browser->priv->view_files_in_fullscreen, no_delay);
}
......@@ -6969,7 +6964,6 @@ gth_browser_get_screen_profile (GthBrowser *browser)
GdkAtom type = GDK_NONE;
int format = 0;
int nitems = 0;
int monitor = 0;
guchar *data = NULL;
screen = gtk_widget_get_screen (GTK_WIDGET (browser));
......
......@@ -255,11 +255,8 @@ gth_color_scale_draw (GtkWidget *widget,
GtkStyleContext *context;
GtkOrientation orientation;
GdkRectangle range_rect;
int slider_width;
int slider_length;
int slider_start;
int slider_end;
int slider_spacing;
GtkStateFlags widget_state;
GtkStateFlags slider_state;
gboolean gtk320 = ((gtk_major_version >= 3) && (gtk_minor_version >= 20));
......
......@@ -528,7 +528,6 @@ gth_file_data_get_attribute_as_string (GthFileData *file_data,
{
GObject *obj;
char *value = NULL;
char *utf8_value;
switch (g_file_info_get_attribute_type (file_data->info, id)) {
case G_FILE_ATTRIBUTE_TYPE_OBJECT:
......
......@@ -769,7 +769,6 @@ gth_file_mananger_trash_files (GtkWindow *window,
GList *file_list /* GthFileData list */)
{
TrashData *tdata;
GList *files;
GthTask *task;
tdata = g_new0 (TrashData, 1);
......
......@@ -390,8 +390,6 @@ void
gth_filter_grid_activate (GthFilterGrid *self,
int filter_id)
{
GtkWidget *button;
if (filter_id == GTH_FILTER_GRID_NO_FILTER) {
if (self->priv->active_button != NULL)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->priv->active_button), FALSE);
......@@ -555,8 +553,7 @@ generate_previews (GthFilterGrid *self,
cairo_surface_t *image,
GList *tasks)
{
GeneratePreviewData *data;
GList *scan;
GeneratePreviewData *data;
if (self->priv->gp_data != NULL)
generate_preview_data_cancel (self->priv->gp_data);
......
......@@ -1245,8 +1245,6 @@ gth_main_activate_extensions (void)
"slideshow",
"webalbums",
NULL };
int i;
GError *error = NULL;
GSettings *settings;
char **user_actived_extensions;
char **actived_extensions;
......
......@@ -130,8 +130,7 @@ visible_child_changed_cb (GObject *playbin,
static void
gth_multipage_init (GthMultipage *multipage)
{
GtkWidget *switcher_box;
GtkCellRenderer *renderer;
GtkWidget *switcher_box;
multipage->priv = GTH_MULTIPAGE_GET_PRIVATE (multipage);
multipage->priv->children = NULL;
......@@ -180,8 +179,7 @@ void
gth_multipage_add_child (GthMultipage *multipage,
GthMultipageChild *child)
{
GtkWidget *box;
GtkTreeIter iter;
GtkWidget *box;
multipage->priv->children = g_list_append (multipage->priv->children, child);
......
......@@ -59,8 +59,6 @@ _gth_request_dialog_construct (GthRequestDialog *self,
const char *cancel_button_text,
const char *ok_button_text)
{
GtkWidget *title_label;
PangoAttrList *attributes;
GtkWidget *prompt_label;
GtkWidget *hbox;
GtkWidget *vbox_entry;
......
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