Exemplo n.º 1
0
        public void Load(Summa.Data.Item item)
        {
            HBox container = new HBox();
            Label label = new Label(item.Title);
            container.PackStart(label);
            Button button = new Button(new Image(IconTheme.Default.LookupIcon("gtk-close", 16, IconLookupFlags.NoSvg).LoadIcon()));
            button.Clicked += OnClicked;
            button.Relief = ReliefStyle.None;
            button.SetSizeRequest(20, 20);
            container.PackEnd(button);

            WebKitView view = new WebKitView();
            view.notebook = this;
            ScrolledWindow view_swin = new ScrolledWindow(new Adjustment(0, 0, 0, 0, 0, 0), new Adjustment(0, 0, 0, 0, 0, 0));
            view_swin.Add(view);
            view_swin.SetPolicy(PolicyType.Automatic, PolicyType.Automatic);
            view.Render(item);

            hash.Add(container, view);

            AppendPage(view_swin, container);
            container.ShowAll();

            ShowAll();
            if ( NPages > 1 ) {
                ShowTabs = true;
            } else {
                ShowTabs = false;
            }
        }
Exemplo n.º 2
0
        public string MakeHtml(Summa.Data.ISource feed)
        {
            string themed_string = FeedTheme;

            themed_string = themed_string.Replace("${title}", feed.Name);
            themed_string = themed_string.Replace("${url}", feed.Url);
            themed_string = themed_string.Replace("${author}", feed.Author);
            themed_string = themed_string.Replace("${image}", feed.Image);

            return themed_string;
        }
Exemplo n.º 3
0
        public string MakeHtml(Summa.Data.Item item)
        {
            string themed_string = ItemTheme;

            themed_string = themed_string.Replace("${title}", item.Title);
            themed_string = themed_string.Replace("${url}", item.Uri);
            themed_string = themed_string.Replace("${author}", item.Author);
            themed_string = themed_string.Replace("${text}", item.Contents);

            return themed_string;
        }
Exemplo n.º 4
0
 public void Populate(Summa.Data.Item item)
 {
     if ( item.EncUri != "" ) {
         Sensitive = false;
     } else {
         Sensitive = false;
     }
 }
Exemplo n.º 5
0
        public void Populate(Summa.Data.Item item)
        {
            this.item = item;

            if ( item.Flagged ) {
                Label = "Unflag This Item";
            } else {
                Label = "Flag This Item";
            }

            Sensitive = true;
        }
Exemplo n.º 6
0
 public void Render(Summa.Data.Item item)
 {
     Render(Config.Theme.MakeHtml(item));
     SelectedItem = item;
     Database.ItemChanged += OnItemChanged;
 }
Exemplo n.º 7
0
        private void PopulateItem(Summa.Data.Item item)
        {
            TreeIter iter;
            try {
                iter = (TreeIter)itemhash[item.Uri];
            } catch ( NullReferenceException e ) {
                Log.Exception(e);
                iter = store.Append();
                itemhash.Add(item.Uri, iter);
            }

            if (!item.Read) {
                icon = icon_theme.LookupIcon("feed-item", 16, IconLookupFlags.NoSvg).LoadIcon();
                store.SetValue(iter, 6, (int)Pango.Weight.Bold);
            } else if (item.Flagged) {
                icon = icon_theme.LookupIcon("emblem-important", 16, IconLookupFlags.NoSvg).LoadIcon();
                store.SetValue(iter, 6, (int)Pango.Weight.Normal);
            } else {
                icon = new Gdk.Pixbuf(Gdk.Colorspace.Rgb, false, 0, 0, 0);
                store.SetValue(iter, 6, (int)Pango.Weight.Normal);
            }

            store.SetValue(iter, 0, icon);
            store.SetValue(iter, 1, item.Read);
            store.SetValue(iter, 2, item.Flagged);
            store.SetValue(iter, 3, MakePrettyDate(item.Date));
            store.SetValue(iter, 4, item.Title);
            store.SetValue(iter, 5, item.Uri);
        }
Exemplo n.º 8
0
 private void DeleteItem(Summa.Data.Item item)
 {
     try {
         TreeIter iter = (TreeIter)itemhash[item.Uri];
         store.Remove(ref iter);
     } catch ( Exception e ) {
         Log.Exception(e);
     }
 }
Exemplo n.º 9
-1
        public void Populate(Summa.Data.Item item)
        {
            this.item = item;

            if ( item.Read ) {
                Label = "Mark As Unread";
            } else {
                Label = "Mark As Read";
            }

            Sensitive = true;
        }