Diff for /np2/x11/gtk2/dialog_midi.c between versions 1.2 and 1.5

version 1.2, 2004/07/15 15:46:24 version 1.5, 2010/12/23 06:32:35
Line 12 Line 12
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. The name of the author may not be used to endorse or promote products  
  *    derived from this software without specific prior written permission.  
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR   * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
Line 344  create_midi_dialog(void) Line 342  create_midi_dialog(void)
         gtk_window_set_resizable(GTK_WINDOW(midi_dialog), FALSE);          gtk_window_set_resizable(GTK_WINDOW(midi_dialog), FALSE);
   
         g_signal_connect(GTK_OBJECT(midi_dialog), "destroy",          g_signal_connect(GTK_OBJECT(midi_dialog), "destroy",
             GTK_SIGNAL_FUNC(dialog_destroy), NULL);              G_CALLBACK(dialog_destroy), NULL);
   
         main_widget = gtk_table_new(10, 6, FALSE);          main_widget = gtk_table_new(10, 6, FALSE);
         gtk_container_set_border_width(GTK_CONTAINER(main_widget), 5);          gtk_container_set_border_width(GTK_CONTAINER(main_widget), 5);
Line 370  create_midi_dialog(void) Line 368  create_midi_dialog(void)
         mpu98_ioport_entry = GTK_BIN(ioport_combo)->child;          mpu98_ioport_entry = GTK_BIN(ioport_combo)->child;
         gtk_widget_show(mpu98_ioport_entry);          gtk_widget_show(mpu98_ioport_entry);
         g_signal_connect(GTK_OBJECT(mpu98_ioport_entry), "changed",          g_signal_connect(GTK_OBJECT(mpu98_ioport_entry), "changed",
             GTK_SIGNAL_FUNC(mpu98_ioport_entry_changed), NULL);              G_CALLBACK(mpu98_ioport_entry_changed), NULL);
         gtk_editable_set_editable(GTK_EDITABLE(mpu98_ioport_entry), FALSE);          gtk_editable_set_editable(GTK_EDITABLE(mpu98_ioport_entry), FALSE);
         gtk_entry_set_text(GTK_ENTRY(mpu98_ioport_entry),          gtk_entry_set_text(GTK_ENTRY(mpu98_ioport_entry),
             mpu98_ioport_str[(np2cfg.mpuopt >> 4) & 0x0f]);              mpu98_ioport_str[(np2cfg.mpuopt >> 4) & 0x0f]);
Line 394  create_midi_dialog(void) Line 392  create_midi_dialog(void)
         mpu98_intr_entry = GTK_BIN(intr_combo)->child;          mpu98_intr_entry = GTK_BIN(intr_combo)->child;
         gtk_widget_show(mpu98_intr_entry);          gtk_widget_show(mpu98_intr_entry);
         g_signal_connect(GTK_OBJECT(mpu98_intr_entry), "changed",          g_signal_connect(GTK_OBJECT(mpu98_intr_entry), "changed",
             GTK_SIGNAL_FUNC(mpu98_intr_entry_changed), NULL);              G_CALLBACK(mpu98_intr_entry_changed), NULL);
         gtk_editable_set_editable(GTK_EDITABLE(mpu98_intr_entry), FALSE);          gtk_editable_set_editable(GTK_EDITABLE(mpu98_intr_entry), FALSE);
         gtk_entry_set_text(GTK_ENTRY(mpu98_intr_entry),          gtk_entry_set_text(GTK_ENTRY(mpu98_intr_entry),
             mpu98_intr_str[np2cfg.mpuopt & 0x03]);              mpu98_intr_str[np2cfg.mpuopt & 0x03]);
Line 571  create_midi_dialog(void) Line 569  create_midi_dialog(void)
         gtk_table_attach(GTK_TABLE(assignframe_widget), mimpi_button,          gtk_table_attach(GTK_TABLE(assignframe_widget), mimpi_button,
             5, 6, 4, 5, GTK_FILL, GTK_FILL, 3, 3);              5, 6, 4, 5, GTK_FILL, GTK_FILL, 3, 3);
         g_signal_connect(GTK_OBJECT(mimpi_button), "clicked",          g_signal_connect(GTK_OBJECT(mimpi_button), "clicked",
             GTK_SIGNAL_FUNC(mpu98_mimpi_def_button_clicked), midi_dialog);              G_CALLBACK(mpu98_mimpi_def_button_clicked), midi_dialog);
   
         /*          /*
          * "Default" button           * "Default" button
Line 581  create_midi_dialog(void) Line 579  create_midi_dialog(void)
         gtk_table_attach(GTK_TABLE(main_widget), mpu98_default_button,          gtk_table_attach(GTK_TABLE(main_widget), mpu98_default_button,
             2, 3, 1, 2, GTK_SHRINK, GTK_SHRINK, 5, 5);              2, 3, 1, 2, GTK_SHRINK, GTK_SHRINK, 5, 5);
         g_signal_connect_swapped(GTK_OBJECT(mpu98_default_button), "clicked",          g_signal_connect_swapped(GTK_OBJECT(mpu98_default_button), "clicked",
             GTK_SIGNAL_FUNC(mpu98_default_button_clicked), NULL);              G_CALLBACK(mpu98_default_button_clicked), NULL);
   
         /*          /*
          * OK, Cancel button           * OK, Cancel button
Line 596  create_midi_dialog(void) Line 594  create_midi_dialog(void)
         ok_button = gtk_button_new_from_stock(GTK_STOCK_OK);          ok_button = gtk_button_new_from_stock(GTK_STOCK_OK);
         gtk_widget_show(ok_button);          gtk_widget_show(ok_button);
         gtk_container_add(GTK_CONTAINER(confirm_widget), ok_button);          gtk_container_add(GTK_CONTAINER(confirm_widget), ok_button);
         GTK_WIDGET_SET_FLAGS(ok_button, GTK_CAN_DEFAULT);          gtk_widget_set_can_default(ok_button, TRUE);
         GTK_WIDGET_SET_FLAGS(ok_button, GTK_HAS_DEFAULT);          gtk_widget_has_default(ok_button);
         g_signal_connect(GTK_OBJECT(ok_button), "clicked",          g_signal_connect(GTK_OBJECT(ok_button), "clicked",
             GTK_SIGNAL_FUNC(ok_button_clicked), (gpointer)midi_dialog);              G_CALLBACK(ok_button_clicked), (gpointer)midi_dialog);
         gtk_widget_grab_default(ok_button);          gtk_widget_grab_default(ok_button);
   
         cancel_button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);          cancel_button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
         gtk_widget_show(cancel_button);          gtk_widget_show(cancel_button);
         gtk_container_add(GTK_CONTAINER(confirm_widget), cancel_button);          gtk_container_add(GTK_CONTAINER(confirm_widget), cancel_button);
         GTK_WIDGET_SET_FLAGS(cancel_button, GTK_CAN_DEFAULT);          gtk_widget_set_can_default(cancel_button, TRUE);
         g_signal_connect_swapped(GTK_OBJECT(cancel_button), "clicked",          g_signal_connect_swapped(GTK_OBJECT(cancel_button), "clicked",
             GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(midi_dialog));              G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(midi_dialog));
   
         gtk_widget_show_all(midi_dialog);          gtk_widget_show_all(midi_dialog);
 }  }

Removed from v.1.2  
changed lines
  Added in v.1.5


RetroPC.NET-CVS <cvs@retropc.net>