Inheritance: Gtk.Window
Ejemplo n.º 1
0
        public static void CloseWindow(Browser browser)
        {
            if ( Browsers.Count == 1 ) {
                /* get dimensions */
                int width;
                int height;

                browser.GetSize(out width, out height);

                Config.WindowWidth = width;
                Config.WindowHeight = height;

                /* get pane positions */
                int main_size;
                int left_size;
                int right_size;

                main_size = browser.main_paned.Position;
                left_size = browser.left_paned.Position;
                right_size = browser.right_paned.Position;

                Config.MainPanePosition = main_size;
                Config.LeftPanePosition = left_size;
                Config.RightPanePosition = right_size;

                Bus.Session.Unregister(new ObjectPath(DBus.ObjPath));
                Bus.Session.ReleaseName(DBus.BusName);

                Gtk.Main.Quit();
            } else {
                browser.Destroy();
                Browsers.Remove(browser);
            }
        }
Ejemplo n.º 2
0
        public AddAction(Browser browser)
            : base("Add", "_Add")
        {
            this.browser = browser;

            Tooltip = "Create a new feed";
            StockId = Stock.Add;
            Activated += NewAddFeedDialog;
        }
Ejemplo n.º 3
0
        public AboutAction(Browser browser)
            : base("About", "_About")
        {
            this.browser = browser;

            Tooltip = "About";
            StockId = Stock.About;
            Activated += ShowAbout;
        }
Ejemplo n.º 4
0
 public void NewWindow(object obj, EventArgs args)
 {
     Window b = new Browser();
     Summa.Core.Application.Browsers.Add(b);
     b.ShowAll();
 }
Ejemplo n.º 5
0
 public NewWindowAction(Browser browser)
     : base("New_window", "New _Window")
 {
     Tooltip = "Open a new window";
     Activated += NewWindow;
 }
Ejemplo n.º 6
0
        public BookmarkAction(Browser browser)
            : base("Bookmark", "_Bookmark")
        {
            this.browser = browser;

            IconSet bookmark_iconset = new IconSet();
            IconSource bookmark_iconsource = new IconSource();
            bookmark_iconsource.IconName = "bookmark-new";
            bookmark_iconset.AddSource(bookmark_iconsource);
            browser.factory.Add("summa-bookmark-new", bookmark_iconset);

            Tooltip = "Bookmark this item";
            StockId = "summa-bookmark-new";
            Activated += Bookmark;

            switch(Config.Bookmarker) {
                case "Native":
                    bookmarker = new NativeBookmarker();
                    break;
                case "Dieu":
                    bookmarker = new DieuBookmarker();
                    break;
            }
        }
Ejemplo n.º 7
0
 public CopyAction(Browser browser)
     : base("Copy", "_Copy")
 {
     Tooltip = "Copy";
     StockId = Stock.Copy;
     Activated += Copy;
     Sensitive = false;
 }
Ejemplo n.º 8
0
        public PropertiesAction(Browser browser)
            : base("Properties", "_Properties")
        {
            this.browser = browser;

            Tooltip = "Properties of the selected feed";
            StockId = Stock.Properties;
            Activated += ShowPropertiesDialog;
        }
Ejemplo n.º 9
0
        public PrintAction(Browser browser)
            : base("Print", "_Print")
        {
            this.browser = browser;

            Tooltip = "_Print the currently selected item";
            StockId = Stock.Print;
            Activated += Print;
            Sensitive = false;
        }
Ejemplo n.º 10
0
        public PreferencesAction(Browser browser)
            : base("Preferences", "_Preferences")
        {
            this.browser = browser;

            Tooltip = "Preferences for Summa";
            StockId = Stock.Preferences;
            Activated += ShowConfigDialog;
        }
Ejemplo n.º 11
0
        public HideReadAction(Browser browser)
            : base("Hide_read", "_Hide ReadSumma.Data.Items", null, null)
        {
            Tooltip = "Hide read items in the item list";
            Toggled += HideRead;

            Sensitive = false;
            Active = false;
        }
Ejemplo n.º 12
0
 public HelpAction(Browser browser)
     : base("Contents", "_Contents")
 {
     Tooltip = "Get help";
     StockId = Stock.Help;
     Activated += Help;
     Sensitive = false;
 }
Ejemplo n.º 13
0
        public FlagAction(Browser browser)
            : base("Flag_item", "Flag This Item")
        {
            this.browser = browser;

            Tooltip = "Flag/unflag this item";
            Activated += Flag;
        }
Ejemplo n.º 14
0
 public FindAction(Browser browser)
     : base("Find", "_Find...")
 {
     Tooltip = "Find an item";
     StockId = Stock.Find;
     Activated += Find;
     Sensitive = false;
 }
Ejemplo n.º 15
0
        public EnclosureAction(Browser browser)
            : base("Play_pause", "_Play")
        {
            this.browser = browser;

            Tooltip = "Play or pause the media enclosed";
            StockId = Stock.MediaPlay;
            Activated += Play;

            mediaplayer = new TotemMediaPlayer();
        }
Ejemplo n.º 16
0
 public EmailLinkAction(Browser browser)
     : base("Email_link", "_Email")
 {
     Tooltip = "Email a copy of the selected item";
     Activated += EmailLink;
     Sensitive = false;
 }
Ejemplo n.º 17
0
        public DeleteAction(Browser browser)
            : base("Delete", "_Delete Feed")
        {
            this.browser = browser;

            Tooltip = "Delete the selected feed";
            StockId = Stock.Delete;
            Activated += DeleteFeed;
        }
Ejemplo n.º 18
0
        public NextItemAction(Browser browser)
            : base("Next_item", "_NextSumma.Data.Item")
        {
            this.browser = browser;

            Tooltip = "Go to next unread item";
            StockId = Stock.GoForward;
            Activated += GoToNextItem;
        }
Ejemplo n.º 19
0
        public NormalViewAction(Browser browser)
            : base("Normal_view", "_Use Normal View", null, null, 0)
        {
            Tooltip = "Use the normal view";
            Activated += SetView;

            if ( !Config.WidescreenView ) {
                CurrentValue = Value;
            }

            //Notifier.ViewChanged += OnViewChanged;
        }
Ejemplo n.º 20
0
        public ImportAction(Browser browser)
            : base("Import", "_Import")
        {
            this.browser = browser;

            Tooltip = "Import data";
            Activated += Import;
        }
Ejemplo n.º 21
0
        public PreviousItemAction(Browser browser)
            : base("Previous_item", "_PreviousSumma.Data.Item")
        {
            this.browser = browser;

            Tooltip = "Go to the previous item";
            StockId = Stock.GoBack;
            Activated += GoToPreviousItem;
        }
Ejemplo n.º 22
0
        public LoadImagesAction(Browser browser)
            : base("LoadImages", "_Load Images", null, null)
        {
            Tooltip = "Load images in items";
            Toggled += LoadImages;

            Sensitive = false;
            Active = true;
        }
Ejemplo n.º 23
0
 public PrintPreviewAction(Browser browser)
     : base("Print_preview", "Print Previe_w")
 {
     Tooltip = "Show a preview of the printed document";
     StockId = Stock.PrintPreview;
     Activated += PrintPreview;
     Sensitive = false;
 }
Ejemplo n.º 24
0
 public SaveEnclosureAction(Browser browser)
     : base("Save_enclosed", "_Save Enclosed Media")
 {
     Tooltip = "Save the enclosed media";
     StockId = Stock.Save;
     Activated += Save;
     Sensitive = false;
 }
Ejemplo n.º 25
0
        public TagsAction(Browser browser)
            : base("Tags", "Edit Feed _Tags")
        {
            this.browser = browser;

            Tooltip = "Edit the tags of your feeds by tag";
            Activated += ShowTagsWindow;
        }
Ejemplo n.º 26
0
        public CloseWindowAction(Browser browser)
            : base("Close_window", "_Close Window")
        {
            this.browser = browser;

            Tooltip = "Close this window";
            StockId = Stock.Close;
            Activated += CloseWindow;
        }
Ejemplo n.º 27
0
 public SelectAllAction(Browser browser)
     : base("Select_all", "_Select All Text")
 {
     Tooltip = "Select all text";
     Activated += SelectAll;
     Sensitive = false;
 }
Ejemplo n.º 28
0
        public MarkReadAction(Browser browser)
            : base("Mark_read", "_Mark Read")
        {
            this.browser = browser;

            Tooltip = "Mark all items in the selected feed as read";
            StockId = Stock.Apply;
            Activated += MarkAllItemsRead;
        }
Ejemplo n.º 29
0
        public UnreadAction(Browser browser)
            : base("Read_item", "Mark As Unread")
        {
            this.browser = browser;

            Tooltip = "Mark this item as unread/read";
            IconName = "feed-item";
            Activated += Mark;
        }
Ejemplo n.º 30
0
        public NewTabAction(Browser browser)
            : base("New_tab", "Open in a New _Tab")
        {
            this.browser = browser;

            Tooltip = "Open the current item in a new tab";
            Activated += NewTab;
        }