public void ShowContact(string id) { TreeIter iter; Hashtable tbl = database.Compile(id, database.EnumNamespace); if (ContactHolder.Child != null) { ContactHolder.Remove(ContactHolder.Child); } ContactHolder.Add(new Contact(tbl)); MainWindow.ShowAll(); // Update selection in the contact list as well if (contact_store.GetIterFirst(out iter)) { do { if (contact_store.GetValue(iter, 0) as string == id) { ContactList.Selection.SelectIter(iter); break; } } while (contact_store.IterNext(ref iter)); } SetStatusMessage(String.Format(Catalog.GetString("Viewing {0}"), (ContactHolder.Child as Contact).GetValue("DisplayName"))); }
private void HandleThumbnailIconViewButtonPressEvent(object sender, Gtk.ButtonPressEventArgs args) { int old_item = current_item; current_item = thumbnail_iconview.CellAtPosition((int)args.Event.X, (int)args.Event.Y, false); if (current_item < 0 || current_item >= items.Length) { current_item = old_item; return; } captions [old_item] = caption_textview.Buffer.Text; string caption = captions [current_item]; if (caption == null) { captions [current_item] = caption = ""; } caption_textview.Buffer.Text = caption; tag_treeview.Model = new TagStore(account.Facebook, tags [current_item], friends); IBrowsableItem item = items [current_item]; string thumbnail_path = ThumbnailGenerator.ThumbnailPath(item.DefaultVersionUri); if (tag_image_eventbox.Children.Length > 0) { tag_image_eventbox.Remove(tag_image); tag_image.Destroy(); } using (ImageFile image = new ImageFile(thumbnail_path)) { Gdk.Pixbuf data = image.Load(); data = PixbufUtils.ScaleToMaxSize(data, 400, 400); tag_image_height = data.Height; tag_image_width = data.Width; tag_image = new Gtk.Image(data); tag_image_eventbox.Add(tag_image); tag_image_eventbox.ShowAll(); } }
private bool removeHeader() { //Console.WriteLine("removeHeader" + FadeOutHeader); if ((doRemove) && FadeOutHeader) { //Console.WriteLine("removehandler"); header.HeightRequest = header.AllocatedHeight; removeing = true; header.Remove(headerAlign); GLib.Timeout.Add(50, delegate { //Console.WriteLine(header.HeightRequest); if (header.HeightRequest > 10) { header.HeightRequest = header.HeightRequest - 4; return(true); } removeing = false; return(false); }); } return(false); }