--- np2/x11/gtk/Attic/dialog_config.c 2004/03/05 13:12:49 1.4 +++ np2/x11/gtk/Attic/dialog_config.c 2004/06/17 14:36:34 1.7 @@ -65,7 +65,7 @@ static GtkWidget *baseclock_entry; static GtkWidget *clockmult_entry; static GtkWidget *buffer_entry; static GtkWidget *resume_checkbutton; -#if defined(__GNUC__) && (defined(i386) || defined(__i386__)) +#if defined(GCC_CPU_ARCH_IA32) static GtkWidget *disablemmx_checkbutton; #endif static const char *arch; @@ -75,11 +75,13 @@ static int rate; static void ok_button_clicked(GtkButton *b, gpointer d) { - gchar *bufp = gtk_entry_get_text(GTK_ENTRY(buffer_entry)); - gchar *base = gtk_entry_get_text(GTK_ENTRY(baseclock_entry)); - gchar *multp = gtk_entry_get_text(GTK_ENTRY(clockmult_entry)); + const gchar *bufp = gtk_entry_get_text(GTK_ENTRY(buffer_entry)); + const gchar *base = gtk_entry_get_text(GTK_ENTRY(baseclock_entry)); + const gchar *multp = gtk_entry_get_text(GTK_ENTRY(clockmult_entry)); gint resume = GTK_TOGGLE_BUTTON(resume_checkbutton)->active; +#if defined(GCC_CPU_ARCH_IA32) gint disablemmx = GTK_TOGGLE_BUTTON(disablemmx_checkbutton)->active; +#endif guint bufsize; guint mult; UINT renewal = 0; @@ -145,7 +147,7 @@ ok_button_clicked(GtkButton *b, gpointer soundrenewal = 1; } -#if defined(__GNUC__) && (defined(i386) || defined(__i386__)) +#if defined(GCC_CPU_ARCH_IA32) if (!(mmxflag & MMXFLAG_NOTSUPPORT)) { disablemmx = disablemmx ? MMXFLAG_DISABLE : 0; if (np2oscfg.disablemmx != disablemmx) { @@ -194,14 +196,14 @@ rate_radiobutton_clicked(GtkButton *b, g UNUSED(b); - rate = (gint)d; + rate = GPOINTER_TO_INT(d); } static void clock_changed(GtkEditable *e, gpointer d) { - gchar *base = gtk_entry_get_text(GTK_ENTRY(baseclock_entry)); - gchar *multp = gtk_entry_get_text(GTK_ENTRY(clockmult_entry)); + const gchar *base = gtk_entry_get_text(GTK_ENTRY(baseclock_entry)); + const gchar *multp = gtk_entry_get_text(GTK_ENTRY(clockmult_entry)); guint mult = milstr_solveINT(multp); gchar buf[80]; gint clock; @@ -254,7 +256,7 @@ create_configure_dialog(void) uninstall_idle_process(); - config_dialog = gtk_window_new(GTK_WINDOW_DIALOG); + config_dialog = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(config_dialog), "Configure"); gtk_window_set_position(GTK_WINDOW(config_dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal(GTK_WINDOW(config_dialog), TRUE); @@ -433,7 +435,7 @@ create_configure_dialog(void) gtk_box_pack_start(GTK_BOX(soundrate_hbox), rate_radiobutton[i], FALSE, FALSE, 0); GTK_WIDGET_UNSET_FLAGS(rate_radiobutton[i], GTK_CAN_FOCUS); gtk_signal_connect(GTK_OBJECT(rate_radiobutton[i]), "clicked", - GTK_SIGNAL_FUNC(rate_radiobutton_clicked), (gpointer)samplingrate[i].rate); + GTK_SIGNAL_FUNC(rate_radiobutton_clicked), GINT_TO_POINTER(samplingrate[i].rate)); } if (np2cfg.samplingrate == 11025) { i = 0; @@ -485,7 +487,7 @@ create_configure_dialog(void) gtk_signal_emit_by_name(GTK_OBJECT(resume_checkbutton), "clicked"); } -#if defined(__GNUC__) && (defined(i386) || defined(__i386__)) +#if defined(GCC_CPU_ARCH_IA32) /* Disable MMX */ disablemmx_checkbutton = gtk_check_button_new_with_label("Disable MMX"); gtk_widget_show(disablemmx_checkbutton);