Esempio n. 1
0
        public AppletWidget(AppletStyle style, int? size)
        {
            // Tooltips
            Tooltips = new Tooltips();
            Tooltips.SetTip(this, Catalog.GetString("Deskop Drapes, click to switch wallpaper"), null);

            if (style == AppletStyle.APPLET_PANEL) {
                height = 22;    // for now this always 22 since the gnome-panel lies to us, what an asshole
            } else {
                height = 22;
            }

            // Create the icon
            Icon = new Image(Theme.LoadIcon("drapes", height, Gtk.IconLookupFlags.UseBuiltin));
            Add(Icon);

            // Set enabled status
            Enabled = DrapesApp.Cfg.ShuffleEnabled;

            // Keep track of what kind of applet we are
            // if we are a tray icon, then register a notification area widget
            this.AppletStyle = style;
            if (this.AppletStyle == AppletStyle.APPLET_TRAY)
                CreateNotifyIcon();

            // What shall we do
            ButtonPressEvent += ButtonPress;

            // Show the tray
            ShowAll();
        }
Esempio n. 2
0
 private void ProcessArgs(string[] Args)
 {
     foreach (string cur in Args) {
         switch (cur) {
         case "--panel-applet":
             AppletStyle = AppletStyle.APPLET_PANEL;
             break;
         case "--debug":
             Console.WriteLine("Running with extra debug output");
             DrapesApp.Cfg.Debug = true;
             break;
         default:
             Console.WriteLine(Catalog.GetString("Sorry unknow argument: {0}"), cur);
             break;
         }
     }
 }