Example #1
0
        public WebViewer()
            : base(WindowType.Toplevel)
        {
            xml = new XML (null, "MainWindow.glade", "mainBox", null);
            xml.Autoconnect (this);
            Gdk.Pixbuf pix = new Gdk.Pixbuf (null, "webnotes-16.png");

            //Window settings
            Title = "WebNotes";
            WindowPosition = WindowPosition.Center;
            Icon = pix;
            Resize (650,600);

            //Trayicon stuff
            trayIcon = new TrayIcon ("WebNotes");
            EventBox ebox = new EventBox ();
            ebox.ButtonPressEvent += ButtonPressed;
            Image image = new Image (pix);
            ebox.Add (image);
            trayIcon.Add (ebox);
            trayIcon.ShowAll ();

            //Gecko webcontrol
            wc = new WebControl ();
            wc.LoadUrl ("http://localhost:8000");
            geckoBox.Add (wc);

            optionMenu.Changed += OptionChanged;
            BuildMenu ();
            int firstPage = list.IndexOf ("WikiHome");
            if (firstPage != -1)
            optionMenu.SetHistory ((uint)firstPage);

            Add (mainBox);
        }
Example #2
0
        public TIcon(CInterfaceGateway in_krnGateway, Gtk.Window mwindow)
        {
            krnGateway = in_krnGateway;
            mainwindow = mwindow;

             	menu = new Gtk.Menu ();
               		EventBox eb = new EventBox ();
            eb.ButtonPressEvent += new ButtonPressEventHandler (TIconClicked);
            eb.Add (new Gtk.Image (new Gdk.Pixbuf (null, "lPhant.png")));

            MenuItem it_show = new MenuItem ("Show");
            it_show.Activated += new EventHandler (TIconShow);

            MenuItem it_options = new MenuItem ("Options");
            it_options.Activated += new EventHandler (TIconOptions);

            ImageMenuItem it_quit = new ImageMenuItem("Quit");
            it_quit.Activated += new EventHandler (TIconQuit);

            menu.Append (it_show);
            menu.Append (it_options);
            menu.Append (it_quit);

               	   t = new TrayIcon ("eLePhantGTK");
               	   t.Add (eb);
               	   t.ShowAll ();
        }
Example #3
0
    private void InitIcon()
    {
        EventBox eb = new EventBox();

        eb.Add (new Image(program_pixbuf16)); // using stock icon
        // hooking event
        eb.ButtonPressEvent += new ButtonPressEventHandler (this.OnImageClick);
        Egg.TrayIcon icon = new Egg.TrayIcon ("Monopod");
        icon.Add(eb);
        // showing the trayicon
        icon.ShowAll();
    }
 public iFolderApplication(string[] args)
     : base("ifolder", "1.0", Modules.UI, args)
 {
     Util.InitCatalog();
        Util.SetQuitiFolderDelegate(new QuitiFolderDelegate(QuitiFolder));
        tIcon = new Egg.TrayIcon("iFolder");
        currentIconAnimationDirection = 0;
        this.ClientUpgradeStatus = null;
        this.NewClientVersion = null;
        this.NewClientDomainID = null;
        eBox = new EventBox();
        eBox.ButtonPressEvent +=
     new ButtonPressEventHandler(trayapp_clicked);
                 quitDlg = new iFolderMsgDialog(
                 null,
                 iFolderMsgDialog.DialogType.Question,
                 iFolderMsgDialog.ButtonSet.YesNo,
                 Util.GS("Exit Novell iFolder"),
                  Util.GS("If you exit the Novell iFolder application, changes in your iFolder will no longer be tracked.\nThe next time you login, Novell iFolder will reconcile any differences between your iFolder and Server.\n\nAre you sure you want to exit the Application ?"),
                 " ");
                  quitDlg.Response += new ResponseHandler(YesNo_Clicked);
        RunningPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder16.png"));
        StartingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-waiting16.png"));
        StoppingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-waiting16.png"));
        DownloadingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-download16.png"));
        UploadingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-upload16.png"));
        gAppIcon = new Gtk.Image(RunningPixbuf);
        eBox.Add(gAppIcon);
        tIcon.Add(eBox);
        tIcon.ShowAll();
        LoginDialog = null;
        collectionSynchronizing = null;
        synchronizationErrors = new Hashtable();
        iFolderAppStateChanged = new Gtk.ThreadNotify(
        new Gtk.ReadyEvent(OniFolderAppStateChanged));
        simiasManager = Util.CreateSimiasManager(args);
        startingUpNotifyWindow = null;
        shuttingDownNotifyWindow = null;
        forceShutdown = false;
        ClientUpgradeDialog = null;
 }
 public iFolderApplication(string[] args)
     : base("ifolder", "1.0", Modules.UI, args)
 {
     Util.InitCatalog();
        Util.SetQuitiFolderDelegate(new QuitiFolderDelegate(QuitiFolder));
        tIcon = new TrayIcon("iFolder");
        bCollectionIsSynchronizing = false;
        currentIconAnimationDirection = 0;
        eBox = new EventBox();
        eBox.ButtonPressEvent +=
     new ButtonPressEventHandler(trayapp_clicked);
        RunningPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder24.png"));
        StartingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-startup.png"));
        StoppingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-shutdown.png"));
        DownloadingPixbuf =
      new Gdk.PixbufAnimation(Util.ImagesPath("ifolder24.gif"));
        UploadingPixbuf =
      new Gdk.PixbufAnimation(Util.ImagesPath("ifolder24-upload.gif"));
        gAppIcon = new Gtk.Image(RunningPixbuf);
        eBox.Add(gAppIcon);
        tIcon.Add(eBox);
        tIcon.ShowAll();
        LoginDialog = null;
        collectionSynchronizing = null;
        synchronizationErrors = new Hashtable();
        iFolderStateChanged = new Gtk.ThreadNotify(
        new Gtk.ReadyEvent(OniFolderStateChanged));
        simiasManager = Util.CreateSimiasManager(args);
 }