~ubuntu-branches/ubuntu/oneiric/avant-window-navigator/oneiric

« back to all changes in this revision

Viewing changes to libawn/awn-icon.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-03-23 00:24:44 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100323002444-ty9ag1vrrklunlix
Tags: 0.4.0~rc1-0ubuntu1
* New upstream release (0.4.0 rc1) (LP: #542684)
 - Ensure the autostart exist before trying to delete it.
   (LP: #334454)
 - Fix position with multiple screen. (LP: #248769)
* debian/control:
 - Move awn-settings to depends, to ensure migration from awn-manager.
   (LP: #512411)
* debian/patches/01-require-lda.patch : Only require 0.0.1 version of lda.
* debian/libawn1.symbols: Add missing symbol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
  AwnEffects   *effects;
47
47
  GtkWidget    *tooltip;
48
48
 
49
 
  guint effects_backup;
50
 
  gboolean effects_backup_set;
51
 
 
52
49
  gboolean bind_effects;
53
50
  gboolean hover_effects_enable;
54
51
  gboolean left_was_pressed;
125
122
awn_icon_update_effects (GtkWidget *widget, gpointer data)
126
123
{
127
124
  AwnIconPrivate *priv = AWN_ICON (widget)->priv;
 
125
  DesktopAgnosticConfigClient *client = 
 
126
      awn_config_get_default (AWN_PANEL_ID_DEFAULT, NULL);
 
127
  GObject *fx = G_OBJECT (priv->effects);
128
128
 
129
129
  if (gtk_widget_is_composited (widget))
130
130
  {
131
131
    /* optimize the render speed for GTK+ <2.17.3.*/
132
 
    /*
133
 
    TODO:
134
 
    Once https://bugzilla.gnome.org/show_bug.cgi?id=597301 is resolve
135
 
    we will need to set it back to FALSE for the fixed gtk versions
136
 
    */
 
132
    /* TODO:
 
133
     * We need to fix various image operations in awn-effects-ops to be able
 
134
     * to use indirect painting for Gtk's CSW.
 
135
     * See https://bugzilla.gnome.org/show_bug.cgi?id=597301.
 
136
     */
137
137
#if GTK_CHECK_VERSION(2,17,3)
138
138
    g_object_set (priv->effects, "indirect-paint", TRUE, NULL);
139
139
#else
140
140
    g_object_set (priv->effects, "indirect-paint", FALSE, NULL);
141
141
#endif
142
142
 
143
 
    if (priv->effects_backup_set)
 
143
    if (priv->bind_effects)
144
144
    {
145
 
      g_object_set (priv->effects, "effects", priv->effects_backup, NULL);
 
145
      desktop_agnostic_config_client_bind (
 
146
          client, "effects", "icon_effect",
 
147
          fx, "effects", TRUE,
 
148
          DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK, NULL
 
149
      );
146
150
    }
147
151
  }
148
152
  else
149
153
  {
150
 
    /* remember which effects did we use */
151
 
    g_object_get (priv->effects, "effects", &priv->effects_backup, NULL);
152
 
    priv->effects_backup_set = TRUE;
 
154
    if (priv->bind_effects)
 
155
    {
 
156
      desktop_agnostic_config_client_unbind (
 
157
          client, "effects", "icon_effect",
 
158
          fx, "effects", TRUE,
 
159
          DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK, NULL
 
160
      );
 
161
    }
153
162
 
154
163
    g_object_set (priv->effects,
155
164
                  "effects", 0,
158
167
     * the icon in our small window
159
168
     */
160
169
  }
161
 
 
162
170
}
163
171
 
164
172
static gboolean
343
351
 
344
352
  GObject *fx = G_OBJECT (priv->effects);
345
353
 
346
 
  desktop_agnostic_config_client_bind (client, "effects", "icon_effect",
347
 
                                       fx, "effects", TRUE,
348
 
                                       DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,
349
 
                                       NULL);
 
354
  if (gtk_widget_is_composited (GTK_WIDGET (object)))
 
355
  {
 
356
    desktop_agnostic_config_client_bind (client, "effects", "icon_effect",
 
357
                                         fx, "effects", TRUE,
 
358
                                         DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,
 
359
                                         NULL);
 
360
  }
350
361
  desktop_agnostic_config_client_bind (client, "effects", "icon_alpha",
351
362
                                       fx, "icon-alpha", TRUE,
352
363
                                       DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,