Beispiel #1
0
        private void popupMenuHandler(object o, Gtk.PopupMenuArgs args)
        {
            Menu popupMenu = new Menu();

            // add show
              			ImageMenuItem menuPopup1;
              			if (hidden)
              				menuPopup1 = new ImageMenuItem(Mono.Unix.Catalog.GetString("Show window"));
            else
              				menuPopup1 = new ImageMenuItem(Mono.Unix.Catalog.GetString("Hide window"));
              			menuPopup1.Image = new Image(Stock.Refresh, IconSize.Menu);
              			popupMenu.Add(menuPopup1);
              			menuPopup1.Activated += delegate {
              				if (hidden)
              				{
                    main_window.ShowAll();
                    restore_position();
                    hidden = false;
                    main_window.Unref(); // restore correct reference count
              				}
              				else
              				{
                    hide_window();
              				}
              			};

              			ImageMenuItem menuPopup0 = new ImageMenuItem(Mono.Unix.Catalog.GetString("Indexing status"));
              			popupMenu.Add(menuPopup0);
              			menuPopup0.Activated += delegate {
                Singleton<Indexing>.Instance.Show();
              			};

              			ImageMenuItem menuPopup2 = new ImageMenuItem(Mono.Unix.Catalog.GetString("About"));
              			menuPopup2.Image = new Image(Stock.About, IconSize.Menu);
              			popupMenu.Add(menuPopup2);
              			menuPopup2.Activated += delegate {
                Gtk.AboutDialog about = new AboutDialog();
                about.Name = "Nemo";
                about.Authors = new string[] { "Anders Rune Jensen", "Lau Bech Lauritzen", "Ole Laursen" };
                about.Artists = new string[] { "Linda Nhu", "Sune Theodorsen" };
                about.Comments = Mono.Unix.Catalog.GetString("Nemo is a file manager for those who would rather have their files manage themselves.");
                about.Logo = new Gdk.Pixbuf(null, "blue_guy_med.png");
                about.Response += delegate {
                    about.Destroy();
                };
                about.Show();
              			};

            // add quit
              			ImageMenuItem menuPopup3 = new ImageMenuItem (Mono.Unix.Catalog.GetString("Quit"));
              			menuPopup3.Image = new Image(Stock.Quit, IconSize.Menu);
              			popupMenu.Add(menuPopup3);
              			menuPopup3.Activated += new EventHandler(this.OnPopupClick);

            popupMenu.ShowAll();
              			popupMenu.Popup(null, null, null, (uint)args.Args[0], (uint)args.Args[1]);
        }
Beispiel #2
0
    private void OnAbout(object o, EventArgs args)
    {
        // TODO: make use AssemblyInfo for version
        AboutDialog about = new Gtk.AboutDialog();

        about.Name = Catalog.GetString ("Monopod");
        about.Version = Defines.VERSION;
        about.Copyright = ("Copyright © 2005 Edd Dumbill");
        about.Comments = Catalog.GetString ("A simple podcast client.");
        about.Authors = new string[] {"Edd Dumbill <*****@*****.**>",
         					      "James Willcox <*****@*****.**>"};
        about.Documenters = new string[] {};
        about.TranslatorCredits = (Catalog.GetString ("translator-credits") ==
                           "translator-credits" ? null :
                           Catalog.GetString ("translator-credits"));
        about.Icon = program_pixbuf16;
        about.Logo = program_pixbuf;
        about.Show ();
        about.Response += new ResponseHandler (this.OnAboutResponse);
    }
        public void About()
        {
            AboutDialog about = new AboutDialog();

            about.ProgramName = Catalog.GetString("Monoreports - report designer tool");
            about.Authors = new string[]{"Tomasz Kubacki"};
            about.TranslatorCredits = "Claudio Rodrigo Pereyra Diaz";
            about.WrapLicense = true;
            about.License = @"
            Copyright (c) 2010 Tomasz Kubacki

            Permission is hereby granted, free of charge, to any person obtaining a copy
            of this software and associated documentation files (the ""Software""), to deal
            in the Software without restriction, including without limitation the rights
            to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
            copies of the Software, and to permit persons to whom the Software is
            furnished to do so, subject to the following conditions:

            The above copyright notice and this permission notice shall be included in
            all copies or substantial portions of the Software.

            THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
            IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
            FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
            AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
            LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
            OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
            THE SOFTWARE.

            ";

            about.Response += delegate(object o, ResponseArgs args) {
            about.Destroy ();
            };

            about.Show();
        }