Example #1
0
void disp_char(int index, char *ch)
{
  if (gcin_edit_display_ap_only())
    return;
  if (!top_bin)
    return;

//  dbg("disp_char %d %s\n", index, ch);
  create_char(index);
  GtkWidget *label = chars[index].label;

  if (label) {
    if (ch[0]==' ' && ch[1]==' ')
      set_label_space(label);
    else {
      gtk_label_set_text(GTK_LABEL(label), ch);
    }
  }

#if GTK_CHECK_VERSION(3,0,0)
    // bug in gtk3
    set_label_font_size(label, gcin_font_size);
#endif

  get_win0_geom();
  if (win_x + win_xl >= dpy_xl)
    move_win0(dpy_xl - win_xl, win_y);

  gtk_widget_show_all(chars[index].vbox);
}
Example #2
0
void disp_char(int index, char *ch)
{
    if (hime_edit_display_ap_only())
        return;
    if (!top_bin)
        return;

//  dbg("disp_char %d %s\n", index, ch);
    create_char(index);
    GtkWidget *label = chars[index].label;

    if (label) {
        if (ch[0]==' ' && ch[1]==' ')
            set_label_space(label);
        else {
            gtk_label_set_text(GTK_LABEL(label), ch);
        }
    }

    get_win0_geom();
    if (win_x + win_xl >= dpy_xl)
        move_win0(dpy_xl - win_xl, win_y);

    gtk_widget_show_all(chars[index].vbox);
}