Example #1
0
        private void SetSensitive(bool sensitive)
        {
            //btnAddBarierPoint.Sensitive = sensitive;
            //btnMovieBarierPoint.Sensitive = sensitive;
            btnDeleteBarierPoint.Sensitive = sensitive;
            btnDeleteBarier.Sensitive      = sensitive;
            btnEditBarierPoint.Sensitive   = sensitive;

            btnDeleteBarierPoint.ShowAll();
            btnDeleteBarier.ShowAll();
            btnEditBarierPoint.ShowAll();
        }
            public OpeningBrowserUI(OpeningsDb db)
                : base()
            {
                menubar = new AppMenuBar ();
                title = Catalog.GetString ("Opening Browser");
                accel = new AccelGroup ();
                menubar.quitMenuItem.
                    AddAccelerator ("activate", accel,
                            new AccelKey (Gdk.Key.
                                      q,
                                      Gdk.
                                      ModifierType.
                                      ControlMask,
                                      AccelFlags.
                                      Visible));
                toolbutton = new ToolButton (Stock.Info);
                toolbutton.Label =
                    Catalog.GetString ("Openings");
                toolbutton.ShowAll ();

                this.db = db;
                store = new TreeStore (typeof (string),
                               typeof (int),
                               typeof (string));
                this.db.PopulateTree (store);
                view = new TreeView ();
                view.Model = store;
                view.AppendColumn (Catalog.
                           GetString ("Moves"),
                           new CellRendererText (),
                           "text", 0);
                view.AppendColumn (Catalog.
                           GetString ("Variations"),
                           new CellRendererText (),
                           "text", 1);
                view.AppendColumn (Catalog.
                           GetString ("Name"),
                           new CellRendererText (),
                           "markup", 2);

                ScrolledWindow win = new ScrolledWindow ();
                win.SetPolicy (PolicyType.Automatic,
                           PolicyType.Automatic);
                win.Add (view);

                boardWidget = new GameViewerBoard ();
                HPaned split = new HPaned ();
                VBox box = new VBox ();
                box.PackStart (boardWidget, true, true, 2);
                split.Pack1 (box, false, true);	// resize, shrink
                split.Pack2 (win, true, true);
                split.ShowAll ();
                //split.Position = 400;
                int width, height;
                CsBoardApp.Instance.Window.GetSize (out width,
                                    out
                                    height);
                split.Position =
                    (int) Math.Round (width * 0.5f);
                split.PositionSet = true;
                PackStart (split, true, true, 2);

                view.CursorChanged += OnCursorChanged;
                ShowAll ();
            }
            public ICSDetailsWidget()
                : base()
            {
                menubar = new ICSMenuBar ();
                menubar.disconnectMenuItem.Activated +=
                    on_disconnect_activate;
                menubar.connectMenuItem.Activated +=
                    on_connect_activate;
                menubar.ShowAll ();

                Image img = new Image ();
                img.Stock = Stock.Network;
                toolbutton =
                    new ToolButton (img,
                            Catalog.
                            GetString
                            ("Chess Server"));
                toolbutton.ShowAll ();

                client = new ICSClient ();
                title = String.Format (Catalog.GetString
                               ("ICS: {0}@{1}:{2}"),
                               client.User,
                               client.server,
                               client.port);
                book = new Notebook ();
                book.Show ();

                Add (book);

                obManager =
                    new GameObservationManager (client,
                                    this);

                observableGames =
                    new ObservableGamesWidget (obManager);

                graph = new GameAdvertisementGraph (client);
                book.AppendPage (graph,
                         new Label (Catalog.
                                GetString
                                ("Seek Graph")));
                ads = new GameAdvertisements (client);
                book.AppendPage (ads,
                         new Label (Catalog.
                                GetString
                                ("Game Seeks")));

                book.AppendPage (observableGames,
                         new Label (Catalog.
                                GetString
                                ("Watch Games")));

                shell = new ICSShell (client);
                book.AppendPage (shell,
                         new Label (Catalog.
                                GetString
                                ("Shell")));

                client.ChallengeEvent += OnChallengeEvent;

                client.AuthEvent += OnAuth;
                client.ConnectionErrorEvent +=
                    OnConnectionError;

                ShowConfigWidget ();

                menubar.disconnectMenuItem.Sensitive = false;
                GLib.Idle.Add (delegate ()
                           {
                           Authenticate (); return false;}
                );

                accel = new AccelGroup ();
                menubar.quitMenuItem.
                    AddAccelerator ("activate", accel,
                            new AccelKey (Gdk.Key.
                                      q,
                                      Gdk.
                                      ModifierType.
                                      ControlMask,
                                      AccelFlags.
                                      Visible));
                ShowAll ();
                CsBoardApp.Instance.QuitEvent += OnQuitEvent;
            }
 public GameDbBrowser()
     : base()
 {
     accel = new AccelGroup ();
     title = Catalog.GetString ("Game Database");
     menubar = new AppMenuBar ();
     menubar.ShowAll ();
     Image img =
         new Image (Gdk.Pixbuf.
                LoadFromResource
                ("dbicon.png"));
     toolbutton =
         new ToolButton (img, Catalog.
                 GetString
                 ("Database"));
     toolbutton.ShowAll ();
     menubar.quitMenuItem.
         AddAccelerator ("activate", accel,
                 new AccelKey (Gdk.Key.
                           q,
                           Gdk.
                           ModifierType.
                           ControlMask,
                           AccelFlags.
                           Visible));
 }
 public GameDbBrowser()
     : base()
 {
     title = Catalog.GetString ("Game Database");
     menubar = new AppMenuBar ();
     menubar.ShowAll ();
     Image img =
         new Image (Gdk.Pixbuf.
                LoadFromResource
                ("dbicon.png"));
     toolbutton =
         new ToolButton (img, Catalog.
                 GetString
                 ("Database"));
     toolbutton.ShowAll ();
 }