public override void Terminate() { try { DBusBackgroundWorker.Release(); } catch (Exception ex) { Debug.Fail(ex.ToString()); } }
public override void Terminate() { pluginHost.MainWindow.UIStateUpdated -= On_MainWindow_UIStateUpdated; try { DBusBackgroundWorker.Release(); } catch (Exception ex) { Debug.Fail(ex.ToString()); } }
public override void Terminate() { pluginHost.MainWindow.Activated += MainWindow_Activated; pluginHost.MainWindow.Resize -= MainWindow_Resize; statusIcon.PopupMenu -= OnPopupMenu; try { DBusBackgroundWorker.Release(); } catch (Exception ex) { Debug.Fail(ex.ToString()); } }
public override void Terminate() { try { pluginHost.MainWindow.Activated -= MainWindow_Activated; GlobalWindowManager.WindowAdded -= GlobalWindowManager_WindowAdded; GlobalWindowManager.WindowRemoved -= GlobalWindowManager_WindowRemoved; DBusBackgroundWorker.InvokeWinformsThread(() => { pluginHost.MainWindow.MainMenu.Visible = true; }); DBusBackgroundWorker.Release(); } catch (Exception ex) { Debug.Fail(ex.ToString()); } }
public override void Terminate() { pluginHost.MainWindow.Activated += MainWindow_Activated; pluginHost.MainWindow.Resize -= MainWindow_Resize; if (aboutToShowSignal != null) { aboutToShowSignal.RemoveDelegate((EventHandler)OnAppIndicatorMenuShown); } if (appIndicatorMenu != null) { appIndicatorMenu.Shown -= OnAppIndicatorMenuShown; } try { DBusBackgroundWorker.Release(); } catch (Exception ex) { Debug.Fail(ex.ToString()); } }
void ShowErrorMessage() { DBusBackgroundWorker.Request(); DBusBackgroundWorker.InvokeGtkThread(() => { using (var dialog = new Gtk.Dialog()) { dialog.BorderWidth = 6; dialog.Resizable = false; dialog.HasSeparator = false; var message = "<span weight=\"bold\"size=\"larger\">" + "Could not register KeebuntuAppMenu with Unity panel service." + "</span>\n\n" + "This plugin only works with Ubuntu Unity desktop." + " If you do not use Unity, you should uninstall the KeebuntuAppMenu plugin." + "\n"; var label = new Gtk.Label(message); label.UseMarkup = true; label.Wrap = true; label.Yalign = 0; var icon = new Gtk.Image(Gtk.Stock.DialogError, Gtk.IconSize.Dialog); icon.Yalign = 0; var contentBox = new Gtk.HBox(); contentBox.Spacing = 12; contentBox.BorderWidth = 6; contentBox.PackStart(icon); contentBox.PackEnd(label); dialog.VBox.PackStart(contentBox); dialog.AddButton("Don't show this again", Gtk.ResponseType.Accept); dialog.AddButton("OK", Gtk.ResponseType.Ok); dialog.DefaultResponse = Gtk.ResponseType.Ok; dialog.Response += (o, args) => { dialog.Destroy(); if (args.ResponseId == Gtk.ResponseType.Accept) { pluginHost.CustomConfig.SetBool(keebuntuAppMenuWarningSeenId, true); } }; dialog.ShowAll(); dialog.KeepAbove = true; dialog.Run(); } }).Wait(); DBusBackgroundWorker.Release(); }