~njpatel/+junk/low-gfx

« back to all changes in this revision

Viewing changes to dash/ResultViewGrid.cpp

  • Committer: Tarmac
  • Author(s): Neil Jagdish Patel
  • Date: 2012-09-20 19:03:45 UTC
  • mfrom: (2730.2.1 unity)
  • Revision ID: tarmac-20120920190345-fd3q5sq5fhooxwg8
Makes sure we choose a sane icon for GIcon's that our own UnityProtocolIcons too.. Fixes: . Approved by Marco Trevisan (Treviño).

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <NuxGraphics/GdkGraphics.h>
27
27
#include <gtk/gtk.h>
28
28
#include <gdk/gdk.h>
 
29
#include <unity-protocol.h>
29
30
 
30
31
#include "unity-shared/IntrospectableWrappers.h"
31
32
#include "unity-shared/Timer.h"
844
845
 
845
846
  if (G_IS_ICON(icon))
846
847
  {
847
 
     info = gtk_icon_theme_lookup_by_gicon(theme, icon, size, (GtkIconLookupFlags)0);
848
 
      g_object_unref(icon);
 
848
     if (UNITY_PROTOCOL_IS_ANNOTATED_ICON(icon))
 
849
     {
 
850
        UnityProtocolAnnotatedIcon *anno;
 
851
        anno = UNITY_PROTOCOL_ANNOTATED_ICON(icon);
 
852
 
 
853
        GIcon *base_icon = unity_protocol_annotated_icon_get_icon(anno);
 
854
        info = gtk_icon_theme_lookup_by_gicon(theme, base_icon, size, (GtkIconLookupFlags)0);
 
855
     }
 
856
     else
 
857
     {
 
858
       info = gtk_icon_theme_lookup_by_gicon(theme, icon, size, (GtkIconLookupFlags)0);
 
859
     }
 
860
     g_object_unref(icon);
849
861
  }
850
862
  else
851
863
  {