From 4adee211e63754dd016a3b7f2a951a8fb9bd5159 Mon Sep 17 00:00:00 2001 From: EDT 1998 Adrian Likins Date: Sat, 13 Jun 1998 22:05:22 +0000 Subject: [PATCH] */app/file_new_dialog.c: removed unsightly warnings, replace a 8 with a / Sat Jun 13 16:52:34 EDT 1998 Adrian Likins */app/file_new_dialog.c: removed unsightly warnings, replace a 8 with a / so it will work -adrian --- ChangeLog | 7 ++++++- app/dialogs/image-new-dialog.c | 29 +++-------------------------- app/file_new_dialog.c | 29 +++-------------------------- app/gui/file-new-dialog.c | 29 +++-------------------------- 4 files changed, 15 insertions(+), 79 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4600d45813..877c960632 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ +Sat Jun 13 16:52:34 EDT 1998 Adrian Likins + + *app/file_new_dialog.c: removed unsightly warnings, + replace a * with a / so it will work + Sat Jun 13 15:46:55 EDT 1998 Adrian Likins - */app/file_new_dialog.c: more file new tweaks, + *app/file_new_dialog.c: more file new tweaks, now uses spinbuttons. I'm still not sure this change is for the better, let me know. diff --git a/app/dialogs/image-new-dialog.c b/app/dialogs/image-new-dialog.c index 05285c1f93..3b7f14a7a7 100644 --- a/app/dialogs/image-new-dialog.c +++ b/app/dialogs/image-new-dialog.c @@ -168,12 +168,9 @@ static void file_new_width_update_callback (GtkWidget *widget, gpointer data) { - - gchar *newvalue; NewImageValues *vals; int new_width; float temp; - char buffer[12]; vals = data; new_width = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (vals->width_spinbutton)); @@ -190,11 +187,10 @@ file_new_height_update_callback (GtkWidget *widget, gpointer data) { - gchar *newvalue; NewImageValues *vals; int new_height; float temp; - char buffer[12]; + vals = data; new_height = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (vals->height_spinbutton)); @@ -212,17 +208,14 @@ static void file_new_width_units_update_callback (GtkWidget *widget, gpointer data) { - - gchar *newvalue; NewImageValues *vals; float new_width_units; float temp; - char buffer[12]; vals = data; new_width_units = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (vals->width_units_spinbutton)); - temp = ((((float) new_width_units) * vals->unit) * ((float) vals->resolution)); + temp = ((((float) new_width_units) / vals->unit) * ((float) vals->resolution)); gtk_signal_handler_block_by_data (GTK_OBJECT (vals->width_spinbutton), vals); gtk_spin_button_set_value (GTK_SPIN_BUTTON (vals->width_spinbutton), temp); gtk_signal_handler_unblock_by_data (GTK_OBJECT (vals->width_spinbutton), vals); @@ -233,18 +226,16 @@ static void file_new_height_units_update_callback (GtkWidget *widget, gpointer data) { - gchar *newvalue; NewImageValues *vals; float new_height_units; float temp; - char buffer[12]; vals = data; new_height_units = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (vals->height_units_spinbutton)); - temp = ((((float) new_height_units) * vals->unit ) * ((float) vals->resolution)); + temp = ((((float) new_height_units) / vals->unit ) * ((float) vals->resolution)); gtk_signal_handler_block_by_data (GTK_OBJECT (vals->height_spinbutton), vals); gtk_spin_button_set_value (GTK_SPIN_BUTTON (vals->height_spinbutton), temp); gtk_signal_handler_unblock_by_data (GTK_OBJECT (vals->height_spinbutton), vals); @@ -254,13 +245,10 @@ static void file_new_resolution_callback (GtkWidget *widget, gpointer data) { - - gchar *newvalue; NewImageValues *vals; float temp_units; float temp_pixels; float temp_resolution; - char buffer[12]; vals = data; temp_resolution = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (vals->resolution_spinbutton)); @@ -302,11 +290,8 @@ file_new_units_inch_menu_callback (GtkWidget *widget , float temp_pixels_height; float temp_pixels_width; - float temp_resolution; float temp_units_height; float temp_units_width; - gchar *newvalue; - char buffer[12]; vals = data; vals->unit = 1; /* set fo/inch ratio for conversions */ @@ -338,11 +323,8 @@ file_new_units_cm_menu_callback (GtkWidget *widget , float temp_pixels_height; float temp_pixels_width; - float temp_resolution; float temp_units_height; float temp_units_width; - gchar *newvalue; - char buffer[12]; vals = data; vals->unit = 2.54; @@ -372,8 +354,6 @@ static void file_new_res_units_inch_callback (GtkWidget *widget, gpointer data) NewImageValues *vals; float temp_resolution; - gchar *newvalue; - char buffer[12]; vals = data; vals->res_unit = 1.0; @@ -392,8 +372,6 @@ static void file_new_res_units_cm_callback (GtkWidget *widget, gpointer data) NewImageValues *vals; float temp_resolution; - gchar *newvalue; - char buffer[12]; vals = data; vals->res_unit = 2.54; @@ -426,7 +404,6 @@ file_new_cmd_callback (GtkWidget *widget, GtkWidget *optionmenu; GtkAdjustment *adj; GSList *group; - char buffer[32]; float temp; if(!new_dialog_run) diff --git a/app/file_new_dialog.c b/app/file_new_dialog.c index 05285c1f93..3b7f14a7a7 100644 --- a/app/file_new_dialog.c +++ b/app/file_new_dialog.c @@ -168,12 +168,9 @@ static void file_new_width_update_callback (GtkWidget *widget, gpointer data) { - - gchar *newvalue; NewImageValues *vals; int new_width; float temp; - char buffer[12]; vals = data; new_width = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (vals->width_spinbutton)); @@ -190,11 +187,10 @@ file_new_height_update_callback (GtkWidget *widget, gpointer data) { - gchar *newvalue; NewImageValues *vals; int new_height; float temp; - char buffer[12]; + vals = data; new_height = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (vals->height_spinbutton)); @@ -212,17 +208,14 @@ static void file_new_width_units_update_callback (GtkWidget *widget, gpointer data) { - - gchar *newvalue; NewImageValues *vals; float new_width_units; float temp; - char buffer[12]; vals = data; new_width_units = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (vals->width_units_spinbutton)); - temp = ((((float) new_width_units) * vals->unit) * ((float) vals->resolution)); + temp = ((((float) new_width_units) / vals->unit) * ((float) vals->resolution)); gtk_signal_handler_block_by_data (GTK_OBJECT (vals->width_spinbutton), vals); gtk_spin_button_set_value (GTK_SPIN_BUTTON (vals->width_spinbutton), temp); gtk_signal_handler_unblock_by_data (GTK_OBJECT (vals->width_spinbutton), vals); @@ -233,18 +226,16 @@ static void file_new_height_units_update_callback (GtkWidget *widget, gpointer data) { - gchar *newvalue; NewImageValues *vals; float new_height_units; float temp; - char buffer[12]; vals = data; new_height_units = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (vals->height_units_spinbutton)); - temp = ((((float) new_height_units) * vals->unit ) * ((float) vals->resolution)); + temp = ((((float) new_height_units) / vals->unit ) * ((float) vals->resolution)); gtk_signal_handler_block_by_data (GTK_OBJECT (vals->height_spinbutton), vals); gtk_spin_button_set_value (GTK_SPIN_BUTTON (vals->height_spinbutton), temp); gtk_signal_handler_unblock_by_data (GTK_OBJECT (vals->height_spinbutton), vals); @@ -254,13 +245,10 @@ static void file_new_resolution_callback (GtkWidget *widget, gpointer data) { - - gchar *newvalue; NewImageValues *vals; float temp_units; float temp_pixels; float temp_resolution; - char buffer[12]; vals = data; temp_resolution = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (vals->resolution_spinbutton)); @@ -302,11 +290,8 @@ file_new_units_inch_menu_callback (GtkWidget *widget , float temp_pixels_height; float temp_pixels_width; - float temp_resolution; float temp_units_height; float temp_units_width; - gchar *newvalue; - char buffer[12]; vals = data; vals->unit = 1; /* set fo/inch ratio for conversions */ @@ -338,11 +323,8 @@ file_new_units_cm_menu_callback (GtkWidget *widget , float temp_pixels_height; float temp_pixels_width; - float temp_resolution; float temp_units_height; float temp_units_width; - gchar *newvalue; - char buffer[12]; vals = data; vals->unit = 2.54; @@ -372,8 +354,6 @@ static void file_new_res_units_inch_callback (GtkWidget *widget, gpointer data) NewImageValues *vals; float temp_resolution; - gchar *newvalue; - char buffer[12]; vals = data; vals->res_unit = 1.0; @@ -392,8 +372,6 @@ static void file_new_res_units_cm_callback (GtkWidget *widget, gpointer data) NewImageValues *vals; float temp_resolution; - gchar *newvalue; - char buffer[12]; vals = data; vals->res_unit = 2.54; @@ -426,7 +404,6 @@ file_new_cmd_callback (GtkWidget *widget, GtkWidget *optionmenu; GtkAdjustment *adj; GSList *group; - char buffer[32]; float temp; if(!new_dialog_run) diff --git a/app/gui/file-new-dialog.c b/app/gui/file-new-dialog.c index 05285c1f93..3b7f14a7a7 100644 --- a/app/gui/file-new-dialog.c +++ b/app/gui/file-new-dialog.c @@ -168,12 +168,9 @@ static void file_new_width_update_callback (GtkWidget *widget, gpointer data) { - - gchar *newvalue; NewImageValues *vals; int new_width; float temp; - char buffer[12]; vals = data; new_width = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (vals->width_spinbutton)); @@ -190,11 +187,10 @@ file_new_height_update_callback (GtkWidget *widget, gpointer data) { - gchar *newvalue; NewImageValues *vals; int new_height; float temp; - char buffer[12]; + vals = data; new_height = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (vals->height_spinbutton)); @@ -212,17 +208,14 @@ static void file_new_width_units_update_callback (GtkWidget *widget, gpointer data) { - - gchar *newvalue; NewImageValues *vals; float new_width_units; float temp; - char buffer[12]; vals = data; new_width_units = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (vals->width_units_spinbutton)); - temp = ((((float) new_width_units) * vals->unit) * ((float) vals->resolution)); + temp = ((((float) new_width_units) / vals->unit) * ((float) vals->resolution)); gtk_signal_handler_block_by_data (GTK_OBJECT (vals->width_spinbutton), vals); gtk_spin_button_set_value (GTK_SPIN_BUTTON (vals->width_spinbutton), temp); gtk_signal_handler_unblock_by_data (GTK_OBJECT (vals->width_spinbutton), vals); @@ -233,18 +226,16 @@ static void file_new_height_units_update_callback (GtkWidget *widget, gpointer data) { - gchar *newvalue; NewImageValues *vals; float new_height_units; float temp; - char buffer[12]; vals = data; new_height_units = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (vals->height_units_spinbutton)); - temp = ((((float) new_height_units) * vals->unit ) * ((float) vals->resolution)); + temp = ((((float) new_height_units) / vals->unit ) * ((float) vals->resolution)); gtk_signal_handler_block_by_data (GTK_OBJECT (vals->height_spinbutton), vals); gtk_spin_button_set_value (GTK_SPIN_BUTTON (vals->height_spinbutton), temp); gtk_signal_handler_unblock_by_data (GTK_OBJECT (vals->height_spinbutton), vals); @@ -254,13 +245,10 @@ static void file_new_resolution_callback (GtkWidget *widget, gpointer data) { - - gchar *newvalue; NewImageValues *vals; float temp_units; float temp_pixels; float temp_resolution; - char buffer[12]; vals = data; temp_resolution = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (vals->resolution_spinbutton)); @@ -302,11 +290,8 @@ file_new_units_inch_menu_callback (GtkWidget *widget , float temp_pixels_height; float temp_pixels_width; - float temp_resolution; float temp_units_height; float temp_units_width; - gchar *newvalue; - char buffer[12]; vals = data; vals->unit = 1; /* set fo/inch ratio for conversions */ @@ -338,11 +323,8 @@ file_new_units_cm_menu_callback (GtkWidget *widget , float temp_pixels_height; float temp_pixels_width; - float temp_resolution; float temp_units_height; float temp_units_width; - gchar *newvalue; - char buffer[12]; vals = data; vals->unit = 2.54; @@ -372,8 +354,6 @@ static void file_new_res_units_inch_callback (GtkWidget *widget, gpointer data) NewImageValues *vals; float temp_resolution; - gchar *newvalue; - char buffer[12]; vals = data; vals->res_unit = 1.0; @@ -392,8 +372,6 @@ static void file_new_res_units_cm_callback (GtkWidget *widget, gpointer data) NewImageValues *vals; float temp_resolution; - gchar *newvalue; - char buffer[12]; vals = data; vals->res_unit = 2.54; @@ -426,7 +404,6 @@ file_new_cmd_callback (GtkWidget *widget, GtkWidget *optionmenu; GtkAdjustment *adj; GSList *group; - char buffer[32]; float temp; if(!new_dialog_run)