public SearchEntry()
        {
            entry.HasFrame = false;
            box.PackStart(entry, true, true, 0);
            iconFind = new HoverImageButton(IconSize.Menu, Gtk.Stock.Find);
            box.PackStart(iconFind, false, false, 0);
            iconClean = new HoverImageButton(IconSize.Menu, Gtk.Stock.Clear);
            box.PackStart(iconClean, false, false, 0);
            box.BorderWidth = 1;

            HeaderBox hbox = new HeaderBox(1, 1, 1, 1);

            hbox.Show();
            hbox.Add(box);
            Add(hbox);

            ModifyBg(StateType.Normal, entry.Style.Base(StateType.Normal));
            iconClean.ModifyBg(StateType.Normal, entry.Style.Base(StateType.Normal));
            iconFind.ModifyBg(StateType.Normal, entry.Style.Base(StateType.Normal));

            iconClean.BorderWidth = 1;
            iconClean.CanFocus    = false;
            iconFind.BorderWidth  = 1;
            iconFind.CanFocus     = false;

            iconClean.Clicked += delegate
            {
                entry.Text = string.Empty;
            };

            iconFind.Clicked += delegate
            {
                FireSearch();
            };

            entry.Activated += delegate
            {
                FireSearch();
            };

            ShowAll();
            UpdateIcon();

            entry.Changed += delegate
            {
                UpdateIcon();
                FireSearch();
            };
        }
Exemplo n.º 2
0
		public SearchEntry ()
		{
			entry.HasFrame = false;
			box.PackStart (entry, true, true, 0);
			iconFind = new HoverImageButton (IconSize.Menu, Gtk.Stock.Find);
			box.PackStart (iconFind, false, false, 0);
			iconClean = new HoverImageButton (IconSize.Menu, Gtk.Stock.Clear);
			box.PackStart (iconClean, false, false, 0);
			box.BorderWidth = 1;
			
			HeaderBox hbox = new HeaderBox (1,1,1,1);
			hbox.Show ();
			hbox.Add (box);
			Add (hbox);
			
			ModifyBg (StateType.Normal, entry.Style.Base (StateType.Normal));
			iconClean.ModifyBg (StateType.Normal, entry.Style.Base (StateType.Normal));
			iconFind.ModifyBg (StateType.Normal, entry.Style.Base (StateType.Normal));
			
			iconClean.BorderWidth = 1;
			iconClean.CanFocus = false;
			iconFind.BorderWidth = 1;
			iconFind.CanFocus = false;
			
			iconClean.Clicked += delegate {
				entry.Text = string.Empty;
			};
			
			iconFind.Clicked += delegate {
				FireSearch ();
			};
			
			entry.Activated += delegate {
				FireSearch ();
			};
			
			ShowAll ();
			UpdateIcon ();
			
			entry.Changed += delegate {
				UpdateIcon ();
				FireSearch ();
			};
		}
Exemplo n.º 3
0
        public AddinInfoView()
        {
            this.Build ();
            AllowInstall = true;
            titleWidth = labelName.SizeRequest ().Width;

            HeaderBox hb = new HeaderBox (1,1,1,1);
            hb.Show ();
            hb.Replace (this);

            hb = new HeaderBox (1,0,0,0);
            hb.SetPadding (6,6,6,6);
            hb.Show ();
            hb.GradientBackround = true;
            hb.Replace (eboxButs);

            hb = new HeaderBox (0,1,0,0);
            hb.SetPadding (6,6,6,6);
            hb.Show ();
            hb.GradientBackround = true;
            hb.Replace (boxHeader);
            topHeaderBox = hb;
        }
Exemplo n.º 4
0
        public AddinInfoView()
        {
            this.Build();
            AllowInstall = true;
            titleWidth   = labelName.SizeRequest().Width;

            HeaderBox hb = new HeaderBox(1, 1, 1, 1);

            hb.Show();
            hb.Replace(this);

            hb = new HeaderBox(1, 0, 0, 0);
            hb.SetPadding(6, 6, 6, 6);
            hb.Show();
            hb.GradientBackround = true;
            hb.Replace(eboxButs);

            hb = new HeaderBox(0, 1, 0, 0);
            hb.SetPadding(6, 6, 6, 6);
            hb.Show();
            hb.GradientBackround = true;
            hb.Replace(boxHeader);
            topHeaderBox = hb;
        }
Exemplo n.º 5
0
        public AddinManagerDialog(Window parent)
        {
            Build();
            TransientFor = parent;
            HasSeparator = false;
            Services.PlaceDialog(this, parent);
            Show();

            addininfoInstalled.Init(service);
            addininfoGallery.Init(service);

            addinTree.Selection.Mode = SelectionMode.Multiple;
            tree = new AddinTreeWidget(addinTree);
            addinTree.Selection.Changed += OnSelectionChanged;
            tree.VersionVisible          = false;

            galleryTreeView.Selection.Mode = SelectionMode.Multiple;
            galleryTree = new AddinTreeWidget(galleryTreeView);
            galleryTree.VersionVisible         = false;
            galleryTree.ShowInstalledMarkers   = true;
            galleryTreeView.Selection.Changed += OnGallerySelectionChanged;

            updatesTreeView.Selection.Mode = SelectionMode.Multiple;
            updatesTree = new AddinTreeWidget(updatesTreeView);
            updatesTree.VersionVisible         = false;
            updatesTree.ShowCategories         = false;
            updatesTree.ShowInstalledMarkers   = true;
            updatesTreeView.Selection.Changed += OnGallerySelectionChanged;

            repoStore       = new ListStore(typeof(string), typeof(string));
            repoCombo.Model = repoStore;
            CellRendererText crt = new CellRendererText();

            repoCombo.PackStart(crt, true);
            repoCombo.AddAttribute(crt, "text", 0);
            repoCombo.RowSeparatorFunc = delegate(TreeModel model, TreeIter iter) {
                string val = (string)model.GetValue(iter, 0);
                return(val == "---");
            };

            // Make sure the tree has the focus when switching tabs

            vboxUpdates.FocusChain = new Widget [] { scrolledUpdates, eboxRepoUpdates };
            vboxGallery.FocusChain = new Widget [] { scrolledGallery, eboxRepo };

            // Improve the look of the headers

            HBox tab = new HBox(false, 3);

            tab.PackStart(new Image(Gdk.Pixbuf.LoadFromResource("plugin-22.png")), false, false, 0);
            installedTabLabel = new Label(Catalog.GetString("Installed"));
            tab.PackStart(installedTabLabel, true, true, 0);
            tab.BorderWidth = 3;
            tab.ShowAll();
            notebook.SetTabLabel(notebook.GetNthPage(0), tab);

            tab = new HBox(false, 3);
            tab.PackStart(new Image(Gdk.Pixbuf.LoadFromResource("plugin-update-22.png")), false, false, 0);
            updatesTabLabel = new Label(Catalog.GetString("Updates"));
            tab.PackStart(updatesTabLabel, true, true, 0);
            tab.BorderWidth = 3;
            tab.ShowAll();
            notebook.SetTabLabel(notebook.GetNthPage(1), tab);

            tab = new HBox(false, 3);
            tab.PackStart(new Image(Gdk.Pixbuf.LoadFromResource("system-software-update_22.png")), false, false, 0);
            galleryTabLabel = new Label(Catalog.GetString("Gallery"));
            tab.PackStart(galleryTabLabel, true, true, 0);
            tab.BorderWidth = 3;
            tab.ShowAll();
            notebook.SetTabLabel(notebook.GetNthPage(2), tab);

            // Gradient header for the updates and gallery tabs

            HeaderBox hb = new HeaderBox(1, 0, 1, 1);

            hb.SetPadding(6, 6, 6, 6);
            hb.GradientBackround = true;
            hb.Show();
            hb.Replace(eboxRepo);

            hb = new HeaderBox(1, 0, 1, 1);
            hb.SetPadding(6, 6, 6, 6);
            hb.GradientBackround = true;
            hb.Show();
            hb.Replace(eboxRepoUpdates);

            InsertFilterEntry();

            FillRepos();
            repoCombo.Active = 0;

            LoadAll();
        }
Exemplo n.º 6
0
        public AddinManagerDialog(Window parent)
        {
            Build ();
            TransientFor = parent;
            HasSeparator = false;
            Services.PlaceDialog (this, parent);
            Show ();

            addininfoInstalled.Init (service);
            addininfoGallery.Init (service);

            addinTree.Selection.Mode = SelectionMode.Multiple;
            tree = new AddinTreeWidget (addinTree);
            addinTree.Selection.Changed += OnSelectionChanged;
            tree.VersionVisible = false;

            galleryTreeView.Selection.Mode = SelectionMode.Multiple;
            galleryTree = new AddinTreeWidget (galleryTreeView);
            galleryTree.VersionVisible = false;
            galleryTree.ShowInstalledMarkers = true;
            galleryTreeView.Selection.Changed += OnGallerySelectionChanged;

            updatesTreeView.Selection.Mode = SelectionMode.Multiple;
            updatesTree = new AddinTreeWidget (updatesTreeView);
            updatesTree.VersionVisible = false;
            updatesTree.ShowCategories = false;
            updatesTree.ShowInstalledMarkers = true;
            updatesTreeView.Selection.Changed += OnGallerySelectionChanged;

            repoStore = new ListStore (typeof(string), typeof(string));
            repoCombo.Model = repoStore;
            CellRendererText crt = new CellRendererText ();
            repoCombo.PackStart (crt, true);
            repoCombo.AddAttribute (crt, "text", 0);
            repoCombo.RowSeparatorFunc = delegate(TreeModel model, TreeIter iter) {
                string val = (string) model.GetValue (iter, 0);
                return val == "---";
            };

            // Make sure the tree has the focus when switching tabs

            vboxUpdates.FocusChain = new Widget [] { scrolledUpdates, eboxRepoUpdates };
            vboxGallery.FocusChain = new Widget [] { scrolledGallery, eboxRepo };

            // Improve the look of the headers

            HBox tab = new HBox (false, 3);
            tab.PackStart (new Image (Gdk.Pixbuf.LoadFromResource ("plugin-22.png")), false, false, 0);
            installedTabLabel = new Label (Catalog.GetString ("Installed"));
            tab.PackStart (installedTabLabel, true, true, 0);
            tab.BorderWidth = 3;
            tab.ShowAll ();
            notebook.SetTabLabel (notebook.GetNthPage (0), tab);

            tab = new HBox (false, 3);
            tab.PackStart (new Image (Gdk.Pixbuf.LoadFromResource ("plugin-update-22.png")), false, false, 0);
            updatesTabLabel = new Label (Catalog.GetString ("Updates"));
            tab.PackStart (updatesTabLabel, true, true, 0);
            tab.BorderWidth = 3;
            tab.ShowAll ();
            notebook.SetTabLabel (notebook.GetNthPage (1), tab);

            tab = new HBox (false, 3);
            tab.PackStart (new Image (Gdk.Pixbuf.LoadFromResource ("system-software-update_22.png")), false, false, 0);
            galleryTabLabel = new Label (Catalog.GetString ("Gallery"));
            tab.PackStart (galleryTabLabel, true, true, 0);
            tab.BorderWidth = 3;
            tab.ShowAll ();
            notebook.SetTabLabel (notebook.GetNthPage (2), tab);

            // Gradient header for the updates and gallery tabs

            HeaderBox hb = new HeaderBox (1, 0, 1, 1);
            hb.SetPadding (6,6,6,6);
            hb.GradientBackround = true;
            hb.Show ();
            hb.Replace (eboxRepo);

            hb = new HeaderBox (1, 0, 1, 1);
            hb.SetPadding (6,6,6,6);
            hb.GradientBackround = true;
            hb.Show ();
            hb.Replace (eboxRepoUpdates);

            InsertFilterEntry ();

            FillRepos ();
            repoCombo.Active = 0;

            LoadAll ();
        }