~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.GtkCore/libsteticui/ProjectBackend.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
400
400
                        
401
401
                        return data.Widget;
402
402
                }
403
 
                
 
403
 
404
404
                public void Save (string fileName)
405
405
                {
406
406
                        this.fileName = fileName;
576
576
                                throw new InvalidOperationException ("Component not found: " + name);
577
577
                        return null;
578
578
                }
 
579
 
 
580
                HashSet<string> modifiedWidgets = new HashSet<string> ();
 
581
                bool allModified;
 
582
 
 
583
                public void SetWidgetModified (string widgetName)
 
584
                {
 
585
                        modifiedWidgets.Add (widgetName);
 
586
                }
 
587
 
 
588
                public void SetAllWidgetsModified ()
 
589
                {
 
590
                        allModified = true;
 
591
                }
 
592
 
 
593
                public void ResetModifiedWidgetFlags ()
 
594
                {
 
595
                        allModified = false;
 
596
                        modifiedWidgets.Clear ();
 
597
                }
 
598
 
 
599
                internal bool IsWidgetModified (string name)
 
600
                {
 
601
                        return allModified || modifiedWidgets.Contains (name);
 
602
                }
579
603
                
580
604
                public object AddNewWidget (string type, string name)
581
605
                {
786
810
 
787
811
                public void AddWidget (Gtk.Widget widget)
788
812
                {
 
813
                        modifiedWidgets.Add (widget.Name);
789
814
                        if (!typeof(Gtk.Container).IsInstanceOfType (widget))
790
815
                                throw new System.ArgumentException ("widget", "Only containers can be top level widgets");
791
816
                        topLevels.Add (new WidgetData (null, null, widget));