Diff for /np2/x11/gtk2/dialog_config.c between versions 1.2 and 1.6

version 1.2, 2004/07/15 14:24:33 version 1.6, 2008/03/13 16:27:39
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 67  static const struct { Line 65  static const struct {
 static GtkWidget *baseclock_entry;  static GtkWidget *baseclock_entry;
 static GtkWidget *clockmult_entry;  static GtkWidget *clockmult_entry;
 static GtkWidget *buffer_entry;  static GtkWidget *buffer_entry;
   #if defined(SUPPORT_RESUME)
 static GtkWidget *resume_checkbutton;  static GtkWidget *resume_checkbutton;
   #endif
 #if defined(GCC_CPU_ARCH_IA32)  #if defined(GCC_CPU_ARCH_IA32)
 static GtkWidget *disablemmx_checkbutton;  static GtkWidget *disablemmx_checkbutton;
 #endif  #endif
Line 81  ok_button_clicked(GtkButton *b, gpointer Line 81  ok_button_clicked(GtkButton *b, gpointer
         const gchar *bufp = gtk_entry_get_text(GTK_ENTRY(buffer_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 *base = gtk_entry_get_text(GTK_ENTRY(baseclock_entry));
         const gchar *multp = gtk_entry_get_text(GTK_ENTRY(clockmult_entry));          const gchar *multp = gtk_entry_get_text(GTK_ENTRY(clockmult_entry));
   #if defined(SUPPORT_RESUME)
         gint resume = GTK_TOGGLE_BUTTON(resume_checkbutton)->active;          gint resume = GTK_TOGGLE_BUTTON(resume_checkbutton)->active;
   #endif
 #if defined(GCC_CPU_ARCH_IA32)  #if defined(GCC_CPU_ARCH_IA32)
         gint disablemmx = GTK_TOGGLE_BUTTON(disablemmx_checkbutton)->active;          gint disablemmx = GTK_TOGGLE_BUTTON(disablemmx_checkbutton)->active;
 #endif  #endif
Line 162  ok_button_clicked(GtkButton *b, gpointer Line 164  ok_button_clicked(GtkButton *b, gpointer
         }          }
 #endif  #endif
   
   #if defined(SUPPORT_RESUME)
         if (np2oscfg.resume != resume) {          if (np2oscfg.resume != resume) {
                 np2oscfg.resume = resume;                  np2oscfg.resume = resume;
                 renewal |= SYS_UPDATEOSCFG;                  renewal |= SYS_UPDATEOSCFG;
         }          }
   #endif
   
         if (renewal) {          if (renewal) {
                 sysmng_update(renewal);                  sysmng_update(renewal);
Line 218  clock_changed(GtkEditable *e, gpointer d Line 222  clock_changed(GtkEditable *e, gpointer d
         } else {          } else {
                 clock = PCBASECLOCK25 * mult;                  clock = PCBASECLOCK25 * mult;
         }          }
         g_snprintf(buf, sizeof(buf), "%2d.%04dMHz",          g_snprintf(buf, sizeof(buf), "%2d.%03dMHz",
             clock / 1000000U, (clock / 1000) % 1000);              clock / 1000000U, (clock / 1000) % 1000);
         gtk_label_set_text(GTK_LABEL((GtkWidget*)d), buf);          gtk_label_set_text(GTK_LABEL((GtkWidget*)d), buf);
 }  }
Line 457  create_configure_dialog(void) Line 461  create_configure_dialog(void)
                 g_snprintf(buf, sizeof(buf), "%d", np2cfg.delayms);                  g_snprintf(buf, sizeof(buf), "%d", np2cfg.delayms);
                 gtk_entry_set_text(GTK_ENTRY(buffer_entry), buf);                  gtk_entry_set_text(GTK_ENTRY(buffer_entry), buf);
         } else {          } else {
                 gtk_entry_set_text(GTK_ENTRY(buffer_entry), "800");                  gtk_entry_set_text(GTK_ENTRY(buffer_entry), "500");
                 np2cfg.delayms = 800;                  np2cfg.delayms = 500;
                 sysmng_update(SYS_UPDATECFG|SYS_UPDATESBUF);                  sysmng_update(SYS_UPDATECFG|SYS_UPDATESBUF);
                 soundrenewal = 1;                  soundrenewal = 1;
         }          }
Line 467  create_configure_dialog(void) Line 471  create_configure_dialog(void)
         gtk_widget_show(ms_label);          gtk_widget_show(ms_label);
         gtk_box_pack_start(GTK_BOX(soundbuffer_hbox),ms_label, FALSE, FALSE, 0);          gtk_box_pack_start(GTK_BOX(soundbuffer_hbox),ms_label, FALSE, FALSE, 0);
   
   #if defined(SUPPORT_RESUME)
         /* resume */          /* resume */
         resume_checkbutton = gtk_check_button_new_with_label("Resume");          resume_checkbutton = gtk_check_button_new_with_label("Resume");
         gtk_widget_show(resume_checkbutton);          gtk_widget_show(resume_checkbutton);
Line 474  create_configure_dialog(void) Line 479  create_configure_dialog(void)
         if (np2oscfg.resume) {          if (np2oscfg.resume) {
                 g_signal_emit_by_name(GTK_OBJECT(resume_checkbutton), "clicked");                  g_signal_emit_by_name(GTK_OBJECT(resume_checkbutton), "clicked");
         }          }
   #endif
   
 #if defined(GCC_CPU_ARCH_IA32)  #if defined(GCC_CPU_ARCH_IA32)
         /* Disable MMX */          /* Disable MMX */

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


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