~alexlauni/do/clear-universe

« back to all changes in this revision

Viewing changes to Do.Interface.Linux.AnimationBase/src/Do.Interface/Do.Interface.AnimationBase/BezelDrawingArea.cs

  • Committer: Jason Smith
  • Date: 2009-06-24 03:58:55 UTC
  • Revision ID: jason@t500-20090624035855-cna4kbtr6u6obhcq
Fix crash from switching themes introduced by memory leak fix
Fix references to GConf in themes

Show diffs side-by-side

added added

removed removed

Lines of Context:
182
182
                double[] icon_fade = new double [] {1, 1, 1};
183
183
                bool[] entry_mode = new bool[3];
184
184
                
185
 
                GConf.Client gconfClient;
186
 
                
187
185
                public Cairo.Color BackgroundColor {
188
186
                        get {
189
187
                                Gdk.Color color = new Gdk.Color ();
418
416
                        ResetRenderStyle ();
419
417
                        SetDrawingArea ();
420
418
                        
421
 
                        gconfClient = new GConf.Client ();
422
 
                        gconfClient.AddNotify ("/desktop/gnome/interface", OnGtkThemeChanged);
423
 
                        
424
419
                        BezelDrawingArea.ThemeChanged += OnThemeChanged;
425
420
                        Realized += delegate {
426
421
                                GdkWindow.SetBackPixmap (null, false);
699
694
                        return ret;
700
695
                }
701
696
                
702
 
                private void OnGtkThemeChanged (object o, GConf.NotifyEventArgs args)
 
697
                protected override void OnStyleSet (Gtk.Style previous_style)
703
698
                {
704
 
                        GLib.Timeout.Add (3000, () => {
705
 
                                if (GtkThemeChanged != null)
706
 
                                        GtkThemeChanged (o, args);
707
 
                                Colors.RebuildColors (BackgroundColor);
708
 
                                return false;
709
 
                        });
 
699
                        if (GtkThemeChanged != null)
 
700
                                GtkThemeChanged (this, System.EventArgs.Empty);
 
701
                        Colors.RebuildColors (BackgroundColor);
 
702
                        base.OnStyleSet (previous_style);
710
703
                }
711
 
                
 
704
 
712
705
                private void OnThemeChanged (object o, System.EventArgs args)
713
706
                {
714
707
                        ResetRenderStyle ();