pike.git / src / post_modules / GTK2 / source / gtksourcelanguage.pre

version» Context lines:

pike.git/src/post_modules/GTK2/source/gtksourcelanguage.pre:128:    f_aggregate_mapping(16);    } else    push_int(0);    }   }      void set_tag_style(string id, ?mapping(string:mixed) style)   //! Sets the style of the tag id. If style is omitted, this function will   //! restore the default style.   { -  pgtk_verify_inited(); -  if (args==1) { +     char *id; -  get_all_args("set_tag_style",args,"%s",&id); -  gtk_source_language_set_tag_style(GTK_SOURCE_LANGUAGE(THIS->obj),id,NULL); -  } else { -  char *id; -  struct mapping *m; +  struct mapping *m=NULL;    GtkSourceTagStyle *sts; -  +  +  pgtk_verify_inited(); +  get_all_args("set_tag_style",args,"%s.%m",&id,&m); +  +  if (m) {    struct svalue *sv; -  get_all_args("set_tag_style",args,"%s%m",&id,&m); -  if (m==NULL) -  Pike_error("No mapping.\n"); +     sts=gtk_source_tag_style_new();    if (sts==NULL)    SIMPLE_OUT_OF_MEMORY_ERROR("set_bracket_match_style",sizeof(GtkSourceTagStyle));    sv=simple_mapping_string_lookup(m,"default");    if (sv)    sts->is_default=PGTK_GETINT(sv);    sv=simple_mapping_string_lookup(m,"mask");    if (sv)    sts->mask=PGTK_GETINT(sv);    sv=simple_mapping_string_lookup(m,"foreground");
pike.git/src/post_modules/GTK2/source/gtksourcelanguage.pre:172:    sts->italic=PGTK_GETINT(sv);    sv=simple_mapping_string_lookup(m,"bold");    if (sv)    sts->bold=PGTK_GETINT(sv);    sv=simple_mapping_string_lookup(m,"underline");    if (sv)    sts->underline=PGTK_GETINT(sv);    sv=simple_mapping_string_lookup(m,"strikethrough");    if (sv)    sts->strikethrough=PGTK_GETINT(sv); +  } +     gtk_source_language_set_tag_style(GTK_SOURCE_LANGUAGE(THIS->obj),id,sts); -  +  +  if(sts)    gtk_source_tag_style_free(sts); -  } +     RETURN_THIS();   }      mapping(string:mixed) get_tag_default_style(string id)   //! Gets the default style of the tag id.   {    pgtk_verify_inited();    {    GtkSourceTagStyle *gs;    GdkColor *fg,*bg;