updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / ifolder / ifolder3-libeel.patch
bloba9116bc55f21efdb034e8969aa4f6c106ae153c4
1 Index: src/UI/Linux/LinuxClient/library/iFolderViewItem.cs
2 ===================================================================
3 --- src/UI/Linux/LinuxClient/library/iFolderViewItem.cs (revision 7313)
4 +++ src/UI/Linux/LinuxClient/library/iFolderViewItem.cs (working copy)
5 @@ -65,6 +65,7 @@
7 private static Gdk.Pixbuf EncryptedOKPixbufSpotlight = null;
8 private static Gdk.Pixbuf SharedOKPixbuf = null;
9 + private static bool IsLibeelAvailable=true;
11 private static Gdk.Pixbuf SharedOKPixbufSpotlight = null;
12 ///
13 @@ -302,62 +303,54 @@
14 if (OKPixbuf == null)
16 OKPixbuf = new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png"));
17 - OKPixbufSpotlight =
18 - Util.EelCreateSpotlightPixbuf(OKPixbuf);
19 + OKPixbufSpotlight = WrapperEelCreateSpotlightPixbuf(OKPixbuf);
22 if (EncryptedOKPixbuf == null)
24 EncryptedOKPixbuf = new Gdk.Pixbuf(Util.ImagesPath("encrypt-ilock-48.png"));
25 - EncryptedOKPixbufSpotlight =
26 - Util.EelCreateSpotlightPixbuf(EncryptedOKPixbuf);
27 + EncryptedOKPixbufSpotlight = WrapperEelCreateSpotlightPixbuf(EncryptedOKPixbuf);
30 if (SharedOKPixbuf == null)
32 SharedOKPixbuf = new Gdk.Pixbuf(Util.ImagesPath("ifolder_user_48.png"));
33 - SharedOKPixbufSpotlight =
34 - Util.EelCreateSpotlightPixbuf(SharedOKPixbuf);
35 + SharedOKPixbufSpotlight = WrapperEelCreateSpotlightPixbuf(SharedOKPixbuf);
38 if (SubscriptionPixbuf == null)
40 SubscriptionPixbuf =
41 new Gdk.Pixbuf(Util.ImagesPath("ifolder-download48.png"));
42 - SubscriptionPixbufSpotlight =
43 - Util.EelCreateSpotlightPixbuf(SubscriptionPixbuf);
44 + SubscriptionPixbufSpotlight = WrapperEelCreateSpotlightPixbuf(SubscriptionPixbuf);
47 if (WarningPixbuf == null)
49 WarningPixbuf =
50 new Gdk.Pixbuf(Util.ImagesPath("ifolder-warning48.png"));
51 - WarningPixbufSpotlight =
52 - Util.EelCreateSpotlightPixbuf(WarningPixbuf);
53 + WarningPixbufSpotlight = WrapperEelCreateSpotlightPixbuf(WarningPixbuf);
56 if (ErrorPixbuf == null)
58 ErrorPixbuf =
59 new Gdk.Pixbuf(Util.ImagesPath("ifolder-error48.png"));
60 - ErrorPixbufSpotlight =
61 - Util.EelCreateSpotlightPixbuf(ErrorPixbuf);
62 + ErrorPixbufSpotlight = WrapperEelCreateSpotlightPixbuf(ErrorPixbuf);
65 if (SyncPixbuf == null)
67 SyncPixbuf =
68 new Gdk.Pixbuf(Util.ImagesPath("ifolder-sync48.png"));
69 - SyncPixbufSpotlight =
70 - Util.EelCreateSpotlightPixbuf(SyncPixbuf);
71 + SyncPixbufSpotlight = WrapperEelCreateSpotlightPixbuf(SyncPixbuf);
74 if (WaitPixbuf == null)
76 WaitPixbuf =
77 new Gdk.Pixbuf(Util.ImagesPath("ifolder-waiting48.png"));
78 - WaitPixbufSpotlight =
79 - Util.EelCreateSpotlightPixbuf(WaitPixbuf);
80 + WaitPixbufSpotlight = WrapperEelCreateSpotlightPixbuf(WaitPixbuf);
83 /* if (NwDisconnectPixBuf == null)
84 @@ -370,6 +363,23 @@
89 + /// Wrapper API to check presence libeel.so.*, if dll not found skipp calling the same
90 + /// and return original buffer as it is.
91 + /// </summary>
92 + private Gdk.Pixbuf WrapperEelCreateSpotlightPixbuf(Gdk.Pixbuf OrgPixBuf)
93 + {
94 + try
95 + {
96 + if(IsLibeelAvailable == true)
97 + return Util.EelCreateSpotlightPixbuf(OrgPixBuf);
98 + }
99 + catch(Exception)
101 + IsLibeelAvailable = false;
103 + return OrgPixBuf;
106 /// <summary>
107 /// Event Handler for Widget Realized