~darkxst/ubuntu/saucy/gnome-shell/upstart_log

« back to all changes in this revision

Viewing changes to src/st/st-icon.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-05-31 12:01:12 UTC
  • mfrom: (1.1.49) (19.1.36 experimental)
  • Revision ID: package-import@ubuntu.com-20130531120112-ew91khxf051x9i2r
Tags: 3.8.2-1ubuntu1
* Merge with Debian (LP: #1185869, #1185721). Remaining changes:
  - debian/control.in:
    + Build-depend on libsystemd-login-dev & libsystemd-daemon-dev
    + Depend on gdm instead of gdm3
    + Don't recommend gnome-session-fallback
  - debian/patches/40_change-pam-name-to-match-gdm.patch:
  - debian/patches/revert-suspend-break.patch:
    + Disabled, not needed on Ubuntu
  - debian/patches/ubuntu-lightdm-user-switching.patch:
    + Allow user switching when using LightDM. Thanks Gerhard Stein
      for rebasing against gnome-shell 3.8!
  - debian/patches/ubuntu_lock_on_suspend.patch
    + Respect Ubuntu's lock-on-suspend setting.
      Disabled until it can be rewritten.
  - debian/patches/git_relock_screen_after_crash.patch:
    + Add Upstream fix for unlocked session after crash (LP: #1064584)
* Note that the new GNOME Classic mode (which requires installing
  gnome-shell-extensions) won't work until gnome-session 3.8 is
  available in Ubuntu

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
          clutter_actor_get_allocation_box (priv->icon_texture, &allocation);
250
250
          clutter_actor_box_get_size (&allocation, &width, &height);
251
251
 
252
 
          allocation.x1 = (width - priv->shadow_width) / 2;
253
 
          allocation.y1 = (height - priv->shadow_height) / 2;
254
 
          allocation.x2 = allocation.x1 + priv->shadow_width;
255
 
          allocation.y2 = allocation.y1 + priv->shadow_height;
256
 
 
257
252
          _st_paint_shadow_with_opacity (priv->shadow_spec,
258
253
                                         priv->shadow_material,
259
254
                                         &allocation,
410
405
      st_icon_update_shadow_material (icon);
411
406
 
412
407
      /* "pixbuf-change" is actually a misnomer for "texture-changed" */
413
 
      g_signal_connect (priv->icon_texture, "pixbuf-change",
414
 
                        G_CALLBACK (on_pixbuf_changed), icon);
 
408
      g_signal_connect_object (priv->icon_texture, "pixbuf-change",
 
409
                               G_CALLBACK (on_pixbuf_changed), icon, 0);
415
410
    }
416
411
}
417
412
 
469
464
      else
470
465
        {
471
466
          /* Will be shown when fully loaded */
472
 
          priv->opacity_handler_id = g_signal_connect (priv->pending_texture, "notify::opacity", G_CALLBACK (opacity_changed_cb), icon);
 
467
          priv->opacity_handler_id = g_signal_connect_object (priv->pending_texture, "notify::opacity", G_CALLBACK (opacity_changed_cb), icon, 0);
473
468
        }
474
469
    }
475
470
  else if (priv->icon_texture)
534
529
st_icon_set_icon_name (StIcon      *icon,
535
530
                       const gchar *icon_name)
536
531
{
537
 
  StIconPrivate *priv;
 
532
  StIconPrivate *priv = icon->priv;
 
533
  GIcon *gicon = NULL;
538
534
 
539
535
  g_return_if_fail (ST_IS_ICON (icon));
540
536
 
541
 
  priv = icon->priv;
 
537
  if (icon_name)
 
538
    gicon = g_themed_icon_new_with_default_fallbacks (icon_name);
 
539
 
 
540
  if (g_icon_equal (priv->gicon, gicon)) /* do nothing */
 
541
    {
 
542
      g_object_unref (gicon);
 
543
      return;
 
544
    }
542
545
 
543
546
  if (priv->gicon)
544
547
    g_object_unref (priv->gicon);
545
548
 
546
 
  if (icon_name)
547
 
    priv->gicon = g_themed_icon_new_with_default_fallbacks (icon_name);
548
 
  else
549
 
    priv->gicon = NULL;
 
549
  g_object_freeze_notify (G_OBJECT (icon));
 
550
 
 
551
  priv->gicon = gicon;
550
552
 
551
553
  g_object_notify (G_OBJECT (icon), "gicon");
552
554
  g_object_notify (G_OBJECT (icon), "icon-name");
553
555
 
 
556
  g_object_thaw_notify (G_OBJECT (icon));
 
557
 
554
558
  st_icon_update (icon);
555
559
}
556
560
 
579
583
  g_return_if_fail (ST_IS_ICON (icon));
580
584
  g_return_if_fail (gicon == NULL || G_IS_ICON (gicon));
581
585
 
582
 
  if (icon->priv->gicon == gicon) /* do nothing */
 
586
  if (g_icon_equal (icon->priv->gicon, gicon)) /* do nothing */
583
587
    return;
584
588
 
585
589
  if (icon->priv->gicon)