~ubuntu-branches/ubuntu/utopic/gimp/utopic

« back to all changes in this revision

Viewing changes to app/core/gimpcontext.c

  • Committer: Package Import Robot
  • Author(s): Ari Pollak
  • Date: 2013-02-23 11:52:27 UTC
  • mto: (1.1.28) (0.6.1 sid)
  • mto: This revision was merged to the branch mainline in revision 77.
  • Revision ID: package-import@ubuntu.com-20130223115227-erjyrlri4ku3ysap
ImportĀ upstreamĀ versionĀ 2.8.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
3172
3172
{
3173
3173
  g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
3174
3174
 
3175
 
  return (context->font ? gimp_object_get_name (context->font) : NULL);
 
3175
  return context->font_name;
3176
3176
}
3177
3177
 
3178
3178
void
3185
3185
 
3186
3186
  font = gimp_container_get_child_by_name (context->gimp->fonts, name);
3187
3187
 
3188
 
  gimp_context_set_font (context, GIMP_FONT (font));
 
3188
  if (font)
 
3189
    {
 
3190
      gimp_context_set_font (context, GIMP_FONT (font));
 
3191
    }
 
3192
  else
 
3193
    {
 
3194
      /* No font with this name exists, use the standard font, but
 
3195
       * keep the intended name around
 
3196
       */
 
3197
      gimp_context_set_font (context, gimp_font_get_standard ());
 
3198
 
 
3199
      g_free (context->font_name);
 
3200
      context->font_name = g_strdup (name);
 
3201
    }
3189
3202
}
3190
3203
 
3191
3204
void