コード例 #1
0
static void
gui_show_tooltips_notify (GimpGuiConfig *gui_config,
                          GParamSpec    *param_spec,
                          Gimp          *gimp)
{
  if (gui_config->show_tooltips)
    gimp_help_enable_tooltips ();
  else
    gimp_help_disable_tooltips ();
}
コード例 #2
0
ファイル: gap_base.c プロジェクト: GNOME/gimp-gap
/* --------------------------------
 * gap_base_check_tooltips
 * --------------------------------
 * check and enable/disable tooltips according to global gimprc settings
 */
gboolean
gap_base_check_tooltips(gboolean *old_state)
{
  char *value_string;
  gboolean new_state;
  gboolean changed;

  new_state = TRUE;
  changed = TRUE;
  
  value_string = gimp_gimprc_query("show-tooltips");
  if(value_string != NULL)
  {
    if (strcmp(value_string, "no") == 0)
    {
       new_state = FALSE;
    }
  }
  
  if (old_state != NULL)
  {
    if(*old_state == new_state)
    {
      changed = FALSE;
    }
  }
  
  if (changed == TRUE)
  {
    if(new_state == TRUE)
    {
       gimp_help_enable_tooltips ();
    }
    else
    {
       gimp_help_disable_tooltips ();
    }
  }
  
  return (new_state);
  
}  /* end gap_base_check_tooltips */