Beispiel #1
0
void wxColourDialog::ColourDataToDialog()
{
    GtkColorSelection* sel = GTK_COLOR_SELECTION(
        gtk_color_selection_dialog_get_color_selection(
        GTK_COLOR_SELECTION_DIALOG(m_widget)));

    const wxColour& color = m_data.GetColour();
    if (color.IsOk())
    {
#ifdef __WXGTK3__
        gtk_color_selection_set_current_rgba(sel, color);
#else
        gtk_color_selection_set_current_color(sel, color.GetColor());
#endif
    }

    // setup the palette:

    GdkColor colors[wxColourData::NUM_CUSTOM];
    gint n_colors = 0;
    for (unsigned i = 0; i < WXSIZEOF(colors); i++)
    {
        wxColour c = m_data.GetCustomColour(i);
        if (c.IsOk())
        {
            colors[n_colors] = *c.GetColor();
            n_colors++;
        }
    }

    wxGtkString pal(gtk_color_selection_palette_to_string(colors, n_colors));

    GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET(sel));
    g_object_set(settings, "gtk-color-palette", pal.c_str(), NULL);
}
Beispiel #2
0
int
clip_GTK_COLORSELECTIONPALETTETOSTRING(ClipMachine * ClipMachineMemory)
{
   ClipVar  *cvcolor = _clip_spar(ClipMachineMemory, 1);

   gint      len = INT_OPTION(ClipMachineMemory, 2, 0);

   gchar    *palette = 0;

   CHECKARG(1, ARRAY_type_of_ClipVarType);
   CHECKARG(2, NUMERIC_type_of_ClipVarType);

   if (len > 0)
    {
       GdkColor  color[len];

       gint      i;

       for (i = 0; i < len; i++)
	{
	   _map_to_gdk_color(ClipMachineMemory, &color[i], &cvcolor->ClipArrVar_a_of_ClipVar.ClipVar_items_of_ClipArrVar[i]);
	}
       palette = gtk_color_selection_palette_to_string(color, len);
    }

   _clip_retc(ClipMachineMemory, palette);
   return 0;
 err:
   return 1;
}
Beispiel #3
0
void wxColourDialog::ColourDataToDialog()
{
#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
    const GdkColor * const
        col = m_data.GetColour().IsOk() ? m_data.GetColour().GetColor()
                                      : NULL;
#endif
#if wxUSE_LIBHILDON
    HildonColorSelector * const sel = HILDON_COLOR_SELECTOR(m_widget);
    hildon_color_selector_set_color(sel, const_cast<GdkColor *>(col));
#elif wxUSE_LIBHILDON2
    GdkColor clr;
    if (col)
        clr = *col;
    else {
        clr.pixel = 0;
        clr.red = 32768;
        clr.green = 32768;
        clr.blue = 32768;
    }

    hildon_color_chooser_dialog_set_color((HildonColorChooserDialog *)m_widget, &clr);
#else // !wxUSE_LIBHILDON2/!wxUSE_LIBHILDON && !wxUSE_LIBHILDON2
    GtkColorSelection* sel = GTK_COLOR_SELECTION(
        gtk_color_selection_dialog_get_color_selection(
        GTK_COLOR_SELECTION_DIALOG(m_widget)));

    const wxColour& c = m_data.GetColour();
    if (c.IsOk())
    {
#ifdef __WXGTK3__
        gtk_color_selection_set_current_rgba(sel, c);
#else
        gtk_color_selection_set_current_color(sel, c.GetColor());
#endif
    }

    // setup the palette:

    GdkColor colors[wxColourData::NUM_CUSTOM];
    gint n_colors = 0;
    for (unsigned i = 0; i < WXSIZEOF(colors); i++)
    {
        wxColour c = m_data.GetCustomColour(i);
        if (c.IsOk())
        {
            colors[n_colors] = *c.GetColor();
            n_colors++;
        }
    }

    wxGtkString pal(gtk_color_selection_palette_to_string(colors, n_colors));

    GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET(sel));
    g_object_set(settings, "gtk-color-palette", pal.c_str(), NULL);
#endif // wxUSE_LIBHILDON / wxUSE_LIBHILDON2 /!wxUSE_LIBHILDON && !wxUSE_LIBHILDON2
}
Beispiel #4
0
static void cb_save_hime_win_color(GtkWidget *widget, gpointer user_data)
{
  COLORSEL *sel = (COLORSEL *)user_data;
  GtkWidget *color_selector = sel->color_selector;
  gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(color_selector))), sel->color);
  *sel->color_str = gtk_color_selection_palette_to_string(sel->color, 1);
  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button_hime_win_color_use), TRUE);
  disp_win_sample();
}
Beispiel #5
0
static void gui_dialog_show_colorchooser(GtkColorButton * color_button, gpointer entry)
{
    GdkColor color;
    gchar *tmp = NULL;

    gtk_color_button_get_color(color_button, &color);
    tmp = gtk_color_selection_palette_to_string(&color, 1);
    gtk_entry_set_text(GTK_ENTRY(entry), tmp);
    g_free(tmp);
}
Beispiel #6
0
static VALUE
rg_s_palette_to_string(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
{
    VALUE rbcolors;
    long n;
    GdkColor *colors;
    gchar *palette;

    if (argc > 1)
        rb_scan_args(argc, argv, "*", &rbcolors);
    else
        rb_scan_args(argc, argv, "10", &rbcolors);

    colors = RVAL2GDKCOLORS(rbcolors, &n);

    palette = gtk_color_selection_palette_to_string(colors, n);

    g_free(colors);

    return CSTR2RVAL_FREE(palette);
}
Beispiel #7
0
void save_kbm_conf()
{
  if (kbm_widget == NULL)
  {
    fprintf(stderr, "save_kbm_conf: kbm_widget is NULL!\n");
    return;
  }

  int idx = gtk_combo_box_get_active (GTK_COMBO_BOX (opt_kbm_opts));

  int idx_selkeys = gtk_combo_box_get_active (GTK_COMBO_BOX (opt_selkeys));

  pho_candicate_col_N = (int) gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinner_pho_candicate_col_N));

  if (pho_candicate_col_N > strlen(selkeys[idx_selkeys].kstr))
    pho_candicate_col_N = strlen(selkeys[idx_selkeys].kstr);

  dbg("pho_candicate_col_N %d\n", pho_candicate_col_N);

  char tt[128];
  sprintf(tt, "%s %s %d %d", kbm_sel[idx].kbm, selkeys[idx_selkeys].kstr, pho_candicate_col_N, selkeys[idx_selkeys].RL);

  char phokbm_name[128];
  get_hime_conf_fstr(PHONETIC_KEYBOARD, phokbm_name, "");

  if (strcmp(phokbm_name, tt)) {
    save_hime_conf_str(PHONETIC_KEYBOARD_BAK, phokbm_name);
  }
  save_hime_conf_str(PHONETIC_KEYBOARD, tt);

  save_tsin_eng_pho_key();

  save_hime_conf_int(TSIN_SPACE_OPT,
                     tsin_space_options[new_select_idx_tsin_space_opt].key);

  save_hime_conf_int(TSIN_PHRASE_PRE_SELECT,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_phrase_pre_select)));

  save_hime_conf_int(PHONETIC_CHAR_DYNAMIC_SEQUENCE,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_phonetic_char_dynamic_sequence)));
  save_hime_conf_int(PHO_HIDE_ROW2,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_pho_hide_row2)));

  save_hime_conf_int(PHO_IN_ROW1,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_pho_in_row1)));

  save_hime_conf_int(PHONETIC_HUGE_TAB,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_phonetic_huge_tab)));

  save_hime_conf_int(TSIN_TONE_CHAR_INPUT,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_tone_char_input)));

  save_hime_conf_int(TSIN_USE_PHO_NEAR,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_use_pho_near)));


  save_hime_conf_int(TSIN_TAB_PHRASE_END,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_tab_phrase_end)));


  save_hime_conf_int(TSIN_TAIL_SELECT_KEY,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_tail_select_key)));

  save_hime_conf_int(TSIN_BUFFER_EDITING_MODE,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_buffer_editing_mode)));

  tsin_buffer_size = (int) gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinner_tsin_buffer_size));
  save_hime_conf_int(TSIN_BUFFER_SIZE, tsin_buffer_size);

#if 0
  gchar *cstr;
  cstr = gtk_color_selection_palette_to_string(&tsin_phrase_line_gcolor, 1);
  dbg("color %s\n", cstr);
  save_hime_conf_str(TSIN_PHRASE_LINE_COLOR, cstr);
  g_free(cstr);
#endif


  save_omni_config();
  /* caleb- does found where "reload kbm" is used.
   * caleb- think the send_hime_message() here does nothing.
   */
  send_hime_message(GDK_DISPLAY(), "reload kbm");
}
Beispiel #8
0
static void test_osd (GtkWidget *wid,Sven *sven)
{
	GdkColor       g_color;
	GdkColor       g_bg_color;
	gchar *filename;

	gint drop_shadow;
	gint debug_frame;

	int voffset;
	int hoffset;
	gboolean osd_on;
	gchar  *font;
	gchar  *color;
	gchar  *bgcolor;
	int bg_color_on ;
	int timeout;
	Gtk_Osd_Pos pos;
	Gtk_Osd_Align align;

	
	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_TOP][GTK_OSD_LEFT])))
	{
		pos = GTK_OSD_TOP;
		align = GTK_OSD_LEFT;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_TOP][GTK_OSD_CENTER])))
	{
		pos = GTK_OSD_TOP;
		align = GTK_OSD_CENTER;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_TOP][GTK_OSD_RIGHT])))
	{
		pos = GTK_OSD_TOP;
		align = GTK_OSD_RIGHT;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_MIDDLE][GTK_OSD_LEFT])))
	{
		pos = GTK_OSD_MIDDLE;
		align = GTK_OSD_LEFT;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_MIDDLE][GTK_OSD_CENTER])))
	{
		pos = GTK_OSD_MIDDLE;
		align = GTK_OSD_CENTER;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_MIDDLE][GTK_OSD_RIGHT])))
	{
		pos = GTK_OSD_MIDDLE;
		align = GTK_OSD_RIGHT;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_BOTTOM][GTK_OSD_LEFT])))
	{
		pos = GTK_OSD_BOTTOM;
		align = GTK_OSD_LEFT;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_BOTTOM][GTK_OSD_CENTER])))
	{
		pos = GTK_OSD_BOTTOM;
		align = GTK_OSD_CENTER;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_BOTTOM][GTK_OSD_RIGHT])))
	{
		pos = GTK_OSD_BOTTOM;
		align = GTK_OSD_RIGHT;
	}
	
	timeout = (gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (timeout_spin)));
	
	voffset = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (offset_spin));
	hoffset =gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (h_offset_spin));
	bg_color_on=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (bg_color_enable));
	
	gtk_color_button_get_color (GTK_COLOR_BUTTON(bg_color),&g_bg_color);
	bgcolor=gtk_color_selection_palette_to_string(&g_bg_color,1);	

	gtk_color_button_get_color (GTK_COLOR_BUTTON(colour_entry),&g_color);
	color=gtk_color_selection_palette_to_string (&g_color,1);
	
	font=(gchar *)gtk_font_button_get_font_name(GTK_FONT_BUTTON(font_entry));
	debug_frame=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (enable_frame));
	drop_shadow=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (enable_shadow));
	
	if(!osd)
		osd=gtk_osd_new_from_data (font,color,bgcolor,bg_color_on,drop_shadow,debug_frame,timeout,pos,align,voffset,hoffset,1);
	else
	{
		gtk_osd_set_font(osd,font);
		gtk_osd_set_color (osd,color);
		gtk_osd_set_bg_color (osd,bgcolor);
		gtk_osd_set_bg_color_on (osd,bg_color_on);
		gtk_osd_set_drop_shadow(osd,drop_shadow);
		gtk_osd_set_debug_frame(osd,debug_frame);
		gtk_osd_set_timeout (osd,timeout);
		gtk_osd_set_vertical_offset (osd,voffset);
		gtk_osd_set_horizontal_offset (osd,hoffset);
		gtk_osd_set_pos (osd,pos);
		gtk_osd_set_align (osd,align);
	}
	gtk_osd_print (osd,GTK_OSD_TEXT,"OSD TEST",GTK_OSD_TEXT,":",GTK_OSD_INT,50,GTK_OSD_PERCENTAGE,50,-1);

	//g_free(font);
	//g_free(color);
//	g_free(bg_color);
}
Beispiel #9
0
void save_config_xosd (Sven *sven)
{
	GdkColor       g_color;
	GdkColor       g_bg_color;
	gchar *filename;

	gint drop_shadow;
	gint debug_frame;

	int voffset;
	int hoffset;
	gboolean osd_on;
	gchar  *font;
	gchar  *color;
	gchar  *bgcolor;
	int bg_color_on ;
	int timeout;
	Gtk_Osd_Pos pos;
	Gtk_Osd_Align align;

	
	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_TOP][GTK_OSD_LEFT])))
	{
		pos = GTK_OSD_TOP;
		align = GTK_OSD_LEFT;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_TOP][GTK_OSD_CENTER])))
	{
		pos = GTK_OSD_TOP;
		align = GTK_OSD_CENTER;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_TOP][GTK_OSD_RIGHT])))
	{
		pos = GTK_OSD_TOP;
		align = GTK_OSD_RIGHT;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_MIDDLE][GTK_OSD_LEFT])))
	{
		pos = GTK_OSD_MIDDLE;
		align = GTK_OSD_LEFT;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_MIDDLE][GTK_OSD_CENTER])))
	{
		pos = GTK_OSD_MIDDLE;
		align = GTK_OSD_CENTER;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_MIDDLE][GTK_OSD_RIGHT])))
	{
		pos = GTK_OSD_MIDDLE;
		align = GTK_OSD_RIGHT;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_BOTTOM][GTK_OSD_LEFT])))
	{
		pos = GTK_OSD_BOTTOM;
		align = GTK_OSD_LEFT;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_BOTTOM][GTK_OSD_CENTER])))
	{
		pos = GTK_OSD_BOTTOM;
		align = GTK_OSD_CENTER;
	}
	else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (positions[GTK_OSD_BOTTOM][GTK_OSD_RIGHT])))
	{
		pos = GTK_OSD_BOTTOM;
		align = GTK_OSD_RIGHT;
	}
	
	
	timeout = (gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (timeout_spin)));
	
	voffset = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (offset_spin));
	hoffset =gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (h_offset_spin));
	bg_color_on=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (bg_color_enable));
	
	gtk_color_button_get_color (GTK_COLOR_BUTTON(bg_color),&g_bg_color);
	bgcolor=gtk_color_selection_palette_to_string(&g_bg_color,1);	

	gtk_color_button_get_color (GTK_COLOR_BUTTON(colour_entry),&g_color);
	color=gtk_color_selection_palette_to_string (&g_color,1);
	
	font=(char *)gtk_font_button_get_font_name(GTK_FONT_BUTTON(font_entry));
	debug_frame=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (enable_frame));
	drop_shadow=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (enable_shadow));
	
	osd_on=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (enable_xosd));
	
	/* Write all sven config [file:config] */
	filename= g_strconcat(g_get_home_dir(),"/.sven/config", NULL);
	
	sven_cfg_write_string (sven->config->all, "osd", "font",font);
	sven_cfg_write_string (sven->config->all, "osd", "color",color);
	sven_cfg_write_int (sven->config->all, "osd", "bg_enable",bg_color_on);
	sven_cfg_write_string (sven->config->all, "osd", "bg_color",bgcolor);
	sven_cfg_write_int (sven->config->all, "osd", "frame",debug_frame);
	sven_cfg_write_int (sven->config->all, "osd", "shadow",drop_shadow);
	sven_cfg_write_int (sven->config->all, "osd", "voffset",voffset);
	sven_cfg_write_int (sven->config->all, "osd", "hoffset",hoffset);
	sven_cfg_write_int (sven->config->all, "osd", "timeout",timeout);
	sven_cfg_write_int (sven->config->all, "osd", "pos",pos);
	sven_cfg_write_int (sven->config->all, "osd", "align",align);
	sven_cfg_write_int (sven->config->all, "osd", "osd_on",osd_on);
	sven_cfg_write_file(sven->config->all, filename);
	g_free(filename);

	if(sven->osd->bg_color_on!=bg_color_on)
	{
		gtk_osd_destroy(sven->osd);
		sven->osd=gtk_osd_new_from_data (font,color,bgcolor,bg_color_on,drop_shadow,debug_frame,timeout,pos,align,voffset,hoffset,osd_on);
	}
	else
	{
		gtk_osd_set_font(sven->osd,font);
		gtk_osd_set_color (sven->osd,color);
		gtk_osd_set_bg_color (sven->osd,bgcolor);
		gtk_osd_set_drop_shadow(sven->osd,drop_shadow);
		gtk_osd_set_debug_frame(sven->osd,debug_frame);
		gtk_osd_set_timeout (sven->osd,timeout);
		gtk_osd_set_vertical_offset (sven->osd,voffset);
		gtk_osd_set_horizontal_offset (sven->osd,hoffset);
		gtk_osd_set_pos (sven->osd,pos);
		gtk_osd_set_align (sven->osd,align);
		gtk_osd_set_osd_on (sven->osd,osd_on);
	}

	//g_free(font);
	//g_free(color);
	//g_free(bg_color);
}
Beispiel #10
0
static gboolean cb_ok( GtkWidget *widget,
                                   GdkEvent  *event,
                                   gpointer   data )
{
  int idx = gtk_combo_box_get_active (GTK_COMBO_BOX (opt_kbm_opts));

  int idx_selkeys = gtk_combo_box_get_active (GTK_COMBO_BOX (opt_selkeys));

  pho_candicate_col_N = (int) gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinner_pho_candicate_col_N));

  if (pho_candicate_col_N > strlen(selkeys[idx_selkeys].kstr))
    pho_candicate_col_N = strlen(selkeys[idx_selkeys].kstr);

  dbg("pho_candicate_col_N %d\n", pho_candicate_col_N);

  char tt[128];
  sprintf(tt, "%s %s %d %d", kbm_sel[idx].kbm, selkeys[idx_selkeys].kstr, pho_candicate_col_N, selkeys[idx_selkeys].RL);

  char phokbm_name[128];
  get_hime_conf_fstr(PHONETIC_KEYBOARD, phokbm_name, "");

  if (strcmp(phokbm_name, tt)) {
    save_hime_conf_str(PHONETIC_KEYBOARD_BAK, phokbm_name);
  }
  save_hime_conf_str(PHONETIC_KEYBOARD, tt);

  save_tsin_eng_pho_key();

  save_hime_conf_int(TSIN_SPACE_OPT,
                     tsin_space_options[new_select_idx_tsin_space_opt].key);

  save_hime_conf_int(TSIN_PHRASE_PRE_SELECT,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_phrase_pre_select)));

  save_hime_conf_int(PHONETIC_CHAR_DYNAMIC_SEQUENCE,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_phonetic_char_dynamic_sequence)));
  save_hime_conf_int(PHO_HIDE_ROW2,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_pho_hide_row2)));

  save_hime_conf_int(PHO_IN_ROW1,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_pho_in_row1)));

  save_hime_conf_int(PHONETIC_HUGE_TAB,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_phonetic_huge_tab)));

  save_hime_conf_int(TSIN_TONE_CHAR_INPUT,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_tone_char_input)));

  save_hime_conf_int(TSIN_USE_PHO_NEAR,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_use_pho_near)));


  save_hime_conf_int(TSIN_TAB_PHRASE_END,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_tab_phrase_end)));


  save_hime_conf_int(TSIN_TAIL_SELECT_KEY,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_tail_select_key)));

  save_hime_conf_int(TSIN_BUFFER_EDITING_MODE,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_buffer_editing_mode)));

  tsin_buffer_size = (int) gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinner_tsin_buffer_size));
  save_hime_conf_int(TSIN_BUFFER_SIZE, tsin_buffer_size);

  gchar *cstr;
#if 0
  cstr = gtk_color_selection_palette_to_string(&tsin_phrase_line_gcolor, 1);
  dbg("color %s\n", cstr);
  save_hime_conf_str(TSIN_PHRASE_LINE_COLOR, cstr);
  g_free(cstr);
#endif


  cstr = gtk_color_selection_palette_to_string(&tsin_cursor_gcolor, 1);
  dbg("color %s\n", cstr);
  save_hime_conf_str(TSIN_CURSOR_COLOR, cstr);
  g_free(cstr);

  send_hime_message(
#if UNIX
	  GDK_DISPLAY(),
#endif
	  "reload kbm");

  gtk_widget_destroy(hime_kbm_window); hime_kbm_window = NULL;

  return TRUE;
}