public static GetIcon ( string iconName, int size ) : Gdk.Pixbuf | ||
iconName | string | |
size | int | |
Résultat | Gdk.Pixbuf |
void OnAbout(object sender, EventArgs args) { var authors = Defines.Authors; var translators = Catalog.GetString("translator-credits"); if (translators == "translator-credits") { translators = null; } var about = new AboutDialog(); about.ProgramName = "Tasque"; about.Version = Defines.Version; about.Logo = Utilities.GetIcon("tasque", 48); about.Copyright = Defines.CopyrightInfo; about.Comments = Catalog.GetString("A Useful Task List"); about.Website = Defines.Website; about.WebsiteLabel = Catalog.GetString("Tasque Project Homepage"); about.Authors = authors; about.TranslatorCredits = translators; about.License = Defines.License; about.IconName = "tasque"; about.Run(); about.Destroy(); }
static TaskCompleteTimer() { inactiveAnimPixbufs = new Pixbuf [12]; for (int i = 0; i < 12; i++) { var iconName = string.Format("tasque-completing-{0}", i); inactiveAnimPixbufs [i] = Utilities.GetIcon(iconName, 16); } }
public void ShowAppNotification(string summary, string body) { var notification = new Notification( summary, body, Utilities.GetIcon("tasque", 48)); // TODO: Use this API for newer versions of notify-sharp //notification.AttachToStatusIcon ( // Tasque.Application.Instance.trayIcon); notification.Show(); }
public StatusIconTray(GtkApplicationBase application) : base(application) { tray = new StatusIcon(Utilities.GetIcon(IconName, 24)); tray.Visible = true; tray.Activate += delegate { ToggleTaskWindowAction.Activate(); }; tray.PopupMenu += (sender, e) => { var popupMenu = Menu; popupMenu.ShowAll(); // shows everything tray.PresentMenu(popupMenu, (uint)e.Args [0], (uint)e.Args [1]); }; }
private void Init() { Logger.Debug("Called Preferences Init"); this.Icon = Utilities.GetIcon("tasque", 16); // Update the window title this.Title = string.Format(Catalog.GetString("Tasque Preferences")); this.VBox.Spacing = 0; this.VBox.BorderWidth = 0; this.Resizable = false; this.AddButton(Stock.Close, Gtk.ResponseType.Ok); this.DefaultResponse = ResponseType.Ok; notebook = new Gtk.Notebook(); notebook.ShowTabs = true; // // General Page // generalPage = MakeGeneralPage(); generalPage.Show(); generalPageId = notebook.AppendPage(generalPage, new Label(Catalog.GetString("General"))); // // Appearance Page // appearancePage = MakeAppearancePage(); appearancePage.Show(); notebook.AppendPage(appearancePage, new Label(Catalog.GetString("Appearance"))); // // Backend Page // backendPage = null; backendPageId = -1; var backendType = application.BackendManager.CurrentBackend; if (backendType != null) { backendPage = (Widget)application.BackendManager.GetBackendPreferencesWidget(); if (backendPage != null) { backendPage.Show(); var l = new Label(GLib.Markup.EscapeText( application.BackendManager.AvailableBackends [backendType])); l.UseMarkup = false; l.UseUnderline = false; l.Show(); backendPageId = notebook.AppendPage(backendPage, l); } } notebook.Show(); this.VBox.PackStart(notebook, true, true, 0); DeleteEvent += WindowDeleted; }
static NotesColumn() { notePixbuf = Utilities.GetIcon("tasque-note", 12); }
public NoteDialog(Gtk.Window parentWindow, ITask task) : base() { this.ParentWindow = parentWindow.GdkWindow; this.task = task; this.Title = String.Format(Catalog.GetString("Notes for: {0:s}"), task.Text); this.HasSeparator = false; this.SetSizeRequest(500, 320); this.Icon = Utilities.GetIcon("tasque", 16); //this.Flags = Gtk.DialogFlags.DestroyWithParent; sw.VscrollbarPolicy = Gtk.PolicyType.Automatic; sw.HscrollbarPolicy = Gtk.PolicyType.Never; sw.BorderWidth = 0; sw.CanFocus = true; sw.Show(); Gtk.EventBox innerEb = new Gtk.EventBox(); innerEb.BorderWidth = 0; targetVBox = new Gtk.VBox(); targetVBox.BorderWidth = 5; targetVBox.Show(); innerEb.Add(targetVBox); innerEb.Show(); if (task.Notes != null) { foreach (var note in task.Notes) { NoteWidget noteWidget = new NoteWidget(note); noteWidget.TextChanged += OnNoteTextChanged; noteWidget.DeleteButtonClicked += OnDeleteButtonClicked; noteWidget.EditCanceled += OnEditCanceled; noteWidget.Show(); targetVBox.PackStart(noteWidget, false, false, 0); } } sw.AddWithViewport(innerEb); sw.Show(); VBox.PackStart(sw, true, true, 0); if (task.NoteSupport == NoteSupport.Multiple) { addButton = new Gtk.Button(Gtk.Stock.Add); addButton.Show(); this.ActionArea.PackStart(addButton); addButton.Clicked += OnAddButtonClicked; } AddButton(Gtk.Stock.Close, Gtk.ResponseType.Close); Response += delegate(object sender, Gtk.ResponseArgs args) { // Hide the window. The TaskWindow watches for when the // dialog is hidden and will take care of the rest. Hide(); }; }