Commit 8f49fad3 authored by Jehan's avatar Jehan

plug-ins: fix a few more warnings.

There are still a bunch of warnings, especially regarding usage of
GtkTable, GtkMisc and some unused functions.
parent 67a80c86
...@@ -1794,11 +1794,11 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id) ...@@ -1794,11 +1794,11 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id)
basetype = gimp_image_base_type(image_id); basetype = gimp_image_base_type(image_id);
dlg = gimp_dialog_new("Save as DDS", "dds", NULL, GTK_WIN_POS_MOUSE, dlg = gimp_dialog_new ("Save as DDS", "dds", NULL, GTK_WIN_POS_MOUSE,
gimp_standard_help_func, SAVE_PROC, gimp_standard_help_func, SAVE_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, _("Cancel"), GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK, _("OK"), GTK_RESPONSE_OK,
NULL); NULL);
g_signal_connect(dlg, "response", g_signal_connect(dlg, "response",
G_CALLBACK(save_dialog_response), G_CALLBACK(save_dialog_response),
...@@ -1809,7 +1809,7 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id) ...@@ -1809,7 +1809,7 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id)
gtk_window_set_resizable(GTK_WINDOW(dlg), 0); gtk_window_set_resizable(GTK_WINDOW(dlg), 0);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
gtk_container_set_border_width(GTK_CONTAINER(vbox), 8); gtk_container_set_border_width(GTK_CONTAINER(vbox), 8);
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area (GTK_DIALOG(dlg))), gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area (GTK_DIALOG(dlg))),
vbox, 1, 1, 0); vbox, 1, 1, 0);
...@@ -1897,7 +1897,7 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id) ...@@ -1897,7 +1897,7 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id)
g_signal_connect(opt, "changed", g_signal_connect(opt, "changed",
G_CALLBACK(mipmaps_selected), &image_id); G_CALLBACK(mipmaps_selected), &image_id);
string_value_combo_set_item_sensitive(opt, DDS_MIPMAP_EXISTING, string_value_combo_set_item_sensitive(opt, DDS_MIPMAP_EXISTING,
check_mipmaps(image_id, dds_write_vals.savetype)); check_mipmaps(image_id, dds_write_vals.savetype));
...@@ -1908,7 +1908,7 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id) ...@@ -1908,7 +1908,7 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id)
is_mipmap_chain_valid); is_mipmap_chain_valid);
hbox = gtk_hbox_new(0, 8); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_box_pack_start(GTK_BOX(vbox), hbox, 1, 1, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, 1, 1, 0);
gtk_widget_show(hbox); gtk_widget_show(hbox);
...@@ -1960,7 +1960,7 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id) ...@@ -1960,7 +1960,7 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id)
gtk_widget_show(expander); gtk_widget_show(expander);
vbox2 = gtk_vbox_new(0, 4); vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
gtk_container_add(GTK_CONTAINER(expander), vbox2); gtk_container_add(GTK_CONTAINER(expander), vbox2);
gtk_widget_show(vbox2); gtk_widget_show(vbox2);
......
...@@ -391,6 +391,7 @@ static void scale_image(unsigned char *dst, int dw, int dh, ...@@ -391,6 +391,7 @@ static void scale_image(unsigned char *dst, int dw, int dh,
float yscale = MIN(yfactor, 1.0f) / blur; float yscale = MIN(yfactor, 1.0f) / blur;
float xsupport = support / xscale; float xsupport = support / xscale;
float ysupport = support / yscale; float ysupport = support / yscale;
unsigned char *tmp;
if(xsupport <= 0.5f) if(xsupport <= 0.5f)
{ {
...@@ -403,8 +404,6 @@ static void scale_image(unsigned char *dst, int dw, int dh, ...@@ -403,8 +404,6 @@ static void scale_image(unsigned char *dst, int dw, int dh,
yscale = 1.0f; yscale = 1.0f;
} }
unsigned char *tmp;
#ifdef _OPENMP #ifdef _OPENMP
tmp = g_malloc(sw * bpp * omp_get_max_threads()); tmp = g_malloc(sw * bpp * omp_get_max_threads());
#else #else
...@@ -543,13 +542,6 @@ static void scale_volume_image(unsigned char *dst, int dw, int dh, int dd, ...@@ -543,13 +542,6 @@ static void scale_volume_image(unsigned char *dst, int dw, int dh, int dd,
wrapfunc_t wrap, wrapfunc_t wrap,
int gc, float gamma) int gc, float gamma)
{ {
/* down to a 2D image, use the faster 2D image resampler */
if(dd == 1 && sd == 1)
{
scale_image(dst, dw, dh, src, sw, sh, bpp, filter, support, wrap, gc, gamma);
return;
}
const float blur = 1.0f; const float blur = 1.0f;
const float xfactor = (float)dw / (float)sw; const float xfactor = (float)dw / (float)sw;
const float yfactor = (float)dh / (float)sh; const float yfactor = (float)dh / (float)sh;
...@@ -568,6 +560,14 @@ static void scale_volume_image(unsigned char *dst, int dw, int dh, int dd, ...@@ -568,6 +560,14 @@ static void scale_volume_image(unsigned char *dst, int dw, int dh, int dd,
float xsupport = support / xscale; float xsupport = support / xscale;
float ysupport = support / yscale; float ysupport = support / yscale;
float zsupport = support / zscale; float zsupport = support / zscale;
unsigned char *tmp1, *tmp2;
/* down to a 2D image, use the faster 2D image resampler */
if(dd == 1 && sd == 1)
{
scale_image(dst, dw, dh, src, sw, sh, bpp, filter, support, wrap, gc, gamma);
return;
}
if(xsupport <= 0.5f) if(xsupport <= 0.5f)
{ {
...@@ -585,8 +585,6 @@ static void scale_volume_image(unsigned char *dst, int dw, int dh, int dd, ...@@ -585,8 +585,6 @@ static void scale_volume_image(unsigned char *dst, int dw, int dh, int dd,
zscale = 1.0f; zscale = 1.0f;
} }
unsigned char *tmp1, *tmp2;
tmp1 = g_malloc(sh * sw * bpp); tmp1 = g_malloc(sh * sw * bpp);
tmp2 = g_malloc(dh * sw * bpp); tmp2 = g_malloc(dh * sw * bpp);
......
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