openbsd-ports/audio/soundtracker/patches/patch-app_transposition_c
2002-07-30 06:51:15 +00:00

60 lines
1.9 KiB
Plaintext

$OpenBSD: patch-app_transposition_c,v 1.1 2002/07/30 06:51:15 wcobb Exp $
--- app/transposition.c.orig Tue Jul 30 02:54:56 2002
+++ app/transposition.c Tue Jul 30 02:56:33 2002
@@ -127,7 +127,7 @@ transposition_transpose_notes (GtkWidget
{
int add = 0;
- switch((int)data) {
+ switch(GPOINTER_TO_INT(data)) {
case 0:
add = +1;
break;
@@ -173,7 +173,7 @@ static void
transposition_change_instruments (GtkWidget *w,
gpointer data)
{
- int b = (int)data;
+ int b = GPOINTER_TO_INT(data);
transposition_for_each (transposition_change_instruments_sub, b);
tracker_redraw(tracker);
@@ -184,14 +184,15 @@ static void
transposition_current_instrument_clicked (GtkWidget *w,
gpointer data)
{
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(transposition_instrument_w[(int)data]),
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(transposition_instrument_w[
+ GPOINTER_TO_INT(data)]),
gui_get_current_instrument());
}
void
transposition_dialog (void)
{
- int i;
+ gint i;
GtkWidget *mainbox, *thing, *box1, *box2, *frame, *hbox;
const char *labels1[] = {
_("Whole Song"),
@@ -279,7 +280,8 @@ transposition_dialog (void)
gtk_widget_show(thing);
gtk_box_pack_start(GTK_BOX(box1), thing, TRUE, TRUE, 0);
gtk_signal_connect(GTK_OBJECT(thing), "clicked",
- GTK_SIGNAL_FUNC(transposition_transpose_notes), (gpointer)i);
+ GTK_SIGNAL_FUNC(transposition_transpose_notes),
+ GINT_TO_POINTER(i));
}
frame = gtk_frame_new(NULL);
@@ -327,7 +329,8 @@ transposition_dialog (void)
gtk_widget_show(thing);
gtk_box_pack_start(GTK_BOX(box1), thing, TRUE, TRUE, 0);
gtk_signal_connect(GTK_OBJECT(thing), "clicked",
- GTK_SIGNAL_FUNC(transposition_change_instruments), (gpointer)i);
+ GTK_SIGNAL_FUNC(transposition_change_instruments),
+ GINT_TO_POINTER(i));
}
/* The button area */