~ubuntu-branches/ubuntu/trusty/gtk+3.0/trusty

« back to all changes in this revision

Viewing changes to gtk/gtkmessagedialog.c

  • Committer: Package Import Robot
  • Author(s): Robert Ancell, Jeremy Bicha, Robert Ancell, Sebastien Bacher, Ken VanDine
  • Date: 2012-06-15 11:36:11 UTC
  • mfrom: (1.1.20) (36.1.48 precise) (0.1.25 sid)
  • Revision ID: package-import@ubuntu.com-20120615113611-bvb6nfn0k6kriz3k
Tags: 3.5.4-0ubuntu1
[ Jeremy Bicha ]
* settings.ini:
  Set gnome-panel menu-bar icon size to 24 so that Ubuntu logo
  for the Applications menu isn't set too small (LP: #986969)

[ Robert Ancell ]
* New upstream release (LP: #1000545)
* debian/control:
  - Bump build-depends on libglib2.0-dev
  - Add breaks older version of gtk3-engines-unico
* debian/libgtk-3-0.symbols:
  - Updated
* debian/libgtk-3-0.install.in:
* debian/rules:
  - Install settings.ini in rules
* debian/patches/00git_gtkimage_cleanup_crash.patch:
  - Applied upstream

[ Sebastien Bacher ]
* Rebase on Debian, including:
  - simplified the build rules and .install
  - dropped the static build (not really useful and costing time and efforts)
* Remaining diffs:
* debian/control.in:
  - updated replace versions
* debian/patches/100_overlay_scrollbar_loading.patch: 
  -dropped, the new scollbar code doesn't require that hack
* Drop fallback support for pre-multiarch loaders
* Remaining patches:
  - 043_ubuntu_menu_proxy.patch
  - 062_ubuntu-set-grab-add.patch
  - 073_treeview_almost_fixed.patch
  - 075_expose_gdkwidget_for_gtkrange.patch
  - 099_eventbox_scroll_mask.patch
  - git_gtkcellrenderer_grabbing_modifier.patch

[ Ken VanDine ]
* debian/patches/101_revert_symbolic_icon_search.patch
  - Revert symbolic icon search changes from 3.4.2, it breaks the icon 
    displayed in indicator-power because of the order the icons are searched
    in.  It looks like ubuntu-mono should drop the old icon names and 
    use the new -symbolic icons.  We need to carry this patch until 
    ubuntu-mono fixes it's handling of symbolic icons.  (LP: #1001229)

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 * convenience widget; you could construct the equivalent of #GtkMessageDialog
51
51
 * from #GtkDialog without too much effort, but #GtkMessageDialog saves typing.
52
52
 *
 
53
 * One difference from #GtkDialog is that #GtkMessageDialog sets the
 
54
 * #GtkWindow:skip-taskbar-hint property to %TRUE, so that the dialog is hidden
 
55
 * from the taskbar by default.
 
56
 *
53
57
 * The easiest way to do a modal message dialog is to use gtk_dialog_run(), though
54
58
 * you can also pass in the %GTK_DIALOG_MODAL flag, gtk_dialog_run() automatically
55
59
 * makes the dialog modal and waits for the user to respond to it. gtk_dialog_run()
387
391
setup_primary_label_font (GtkMessageDialog *dialog)
388
392
{
389
393
  GtkMessageDialogPrivate *priv = dialog->priv;
390
 
  gint size;
391
 
  PangoFontDescription *font_desc;
392
 
  GtkStyleContext *context;
393
 
  GtkStateFlags state;
394
 
 
395
 
  /* unset the font settings */
396
 
  gtk_widget_override_font (priv->label, NULL);
397
394
 
398
395
  if (priv->has_secondary_text && !priv->has_primary_markup)
399
396
    {
400
 
      context = gtk_widget_get_style_context (priv->label);
401
 
      state = gtk_widget_get_state_flags (priv->label);
402
 
 
403
 
      size = pango_font_description_get_size (gtk_style_context_get_font (context, state));
404
 
      font_desc = pango_font_description_new ();
405
 
      pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
406
 
      pango_font_description_set_size (font_desc, size * PANGO_SCALE_LARGE);
407
 
      gtk_widget_override_font (priv->label, font_desc);
408
 
      pango_font_description_free (font_desc);
 
397
      PangoAttrList *attributes;
 
398
      PangoAttribute *attr;
 
399
 
 
400
      attributes = pango_attr_list_new ();
 
401
 
 
402
      attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
 
403
      pango_attr_list_insert (attributes, attr);
 
404
 
 
405
      attr = pango_attr_scale_new (PANGO_SCALE_LARGE);
 
406
      pango_attr_list_insert (attributes, attr);
 
407
 
 
408
      gtk_label_set_attributes (GTK_LABEL (priv->label), attributes);
 
409
      pango_attr_list_unref (attributes);
 
410
    }
 
411
  else
 
412
    {
 
413
      /* unset the font settings */
 
414
      gtk_label_set_attributes (GTK_LABEL (priv->label), NULL);
409
415
    }
410
416
}
411
417
 
1010
1016
                                      MAX (0, border_width - 7));
1011
1017
    }
1012
1018
 
1013
 
  setup_primary_label_font (dialog);
1014
 
 
1015
1019
  GTK_WIDGET_CLASS (gtk_message_dialog_parent_class)->style_updated (widget);
1016
1020
}