Пример #1
0
        public void Run(FSpot.IBrowsableCollection photos)
        {
            if (null == photos)
            {
                throw new ArgumentNullException("photos");
            }

            this.photos = photos;

            Glade.XML glade_xml = new Glade.XML(
                null, "TabbloExport.glade", DialogName,
                "f-spot");
            glade_xml.Autoconnect(this);

            dialog = (Gtk.Dialog)glade_xml.GetWidget(DialogName);

            FSpot.Widgets.IconView icon_view =
                new FSpot.Widgets.IconView(photos);
            icon_view.DisplayDates = false;
            icon_view.DisplayTags  = false;

            username_entry.Changed += HandleAccountDataChanged;
            password_entry.Changed += HandleAccountDataChanged;
            ReadAccountData();
            HandleAccountDataChanged(null, null);

            dialog.Modal        = false;
            dialog.TransientFor = null;

            dialog.Response += HandleResponse;

            thumb_scrolled_window.Add(icon_view);
            icon_view.Show();
            dialog.Show();
        }
Пример #2
0
        public InfoWindow(Song song, Window w)
            : base("", w, DialogFlags.DestroyWithParent)
        {
            this.HasSeparator = false;

            Glade.XML glade_xml = new Glade.XML (null, "InfoWindow.glade", "info_contents", null);
            glade_xml.Autoconnect (this);
            this.VBox.Add (info_contents);

            cover_image = new MagicCoverImage ();
            cover_image_container.Add (cover_image);
            cover_image.Visible = true;

            // Gdk.Pixbuf cover = new Gdk.Pixbuf (null, "unknown-cover.png", 66, 66);
            // cover_image.ChangePixbuf (cover);

            user_name_label = new UrlLabel ();
            user_name_label.UrlActivated += new UrlActivatedHandler (OnUrlActivated);
            user_name_container.Add (user_name_label);
            user_name_label.SetAlignment ((float) 0.0, (float) 0.5);
            user_name_label.Visible = true;

            real_name_label = new UrlLabel ();
            real_name_label.UrlActivated += new UrlActivatedHandler (OnUrlActivated);
            real_name_container.Add (real_name_label);
            real_name_label.SetAlignment ((float) 0.0, (float) 0.5);
            real_name_label.Visible = true;

            this.AddButton ("gtk-close", ResponseType.Close);

            SetSong (song);
        }
        public PrintDialog(Photo [] photos)
        {
            this.photos = photos;

#if ENABLE_CUSTOM_PRINT
            Glade.XML xml = new Glade.XML(null, "f-spot.glade", "print_dialog", "f-spot");
            xml.Autoconnect(this);
#endif

            print_job = new Gnome.PrintJob(Gnome.PrintConfig.Default());

            //Render ();

#if ENABLE_CUSTOM_PRINT
            int response = print_dialog.Run();

            switch (response)
            {
            case (int)Gtk.ResponseType.Ok:
                print_job.Print();
                break;
            }
            print_dialog.Destroy();
#else
            RunGnomePrintDialog();
#endif
        }
Пример #4
0
        public TransfersMenu(TreeView transfersList, IFileTransfer transfer)
        {
            Glade.XML glade = new Glade.XML(null, "FileFind.Meshwork.GtkClient.meshwork.glade", "TransfersMenu", null);
            glade.Autoconnect(this);
            this.menu = (Gtk.Menu) glade.GetWidget("TransfersMenu");

            this.transfersList = transfersList;
            this.transfer = transfer;

            if (transfer != null) {
                mnuCancelAndRemoveTransfer.Visible = true;
                mnuShowTransferDetails.Sensitive = true;
                mnuClearFinishedFailedTransfers.Sensitive = true;
                if (transfer.Status == FileTransferStatus.Paused) {
                    mnuPauseTransfer.Visible = false;
                    mnuResumeTransfer.Visible = true;
                    mnuResumeTransfer.Sensitive = true;
                    mnuCancelTransfer.Sensitive = true;
                } else if (transfer.Status == FileTransferStatus.Canceled || transfer.Status == FileTransferStatus.Completed) {
                    mnuPauseTransfer.Sensitive = false;
                    mnuResumeTransfer.Visible = false;
                    mnuCancelTransfer.Sensitive = false;
                }
            } else {
                mnuCancelAndRemoveTransfer.Visible = false;
                mnuShowTransferDetails.Sensitive = false;
                mnuPauseTransfer.Sensitive = false;
                mnuResumeTransfer.Visible = false;
                mnuCancelTransfer.Sensitive = false;
            }
        }
Пример #5
0
        Widget ConstructItemsUI()
        {
            Glade.XML gui = LoadInterface("items_vbox");
            if (gui == null)
            {
                return(null);
            }

            Gtk.VBox container = gui.GetWidget("items_vbox") as VBox;
            locked_check = gui.GetWidget("locked_check") as CheckButton;
            Gtk.TreeView items_list = gui.GetWidget("items_list") as TreeView;

            locked_check.Toggled += new EventHandler(AllLockedToggledCb);
            if (master != null)
            {
                master.NotifyLocked += new EventHandler(MasterLockedNotifyCb);
                // force update now
                MasterLockedNotifyCb(master, EventArgs.Empty);
            }

            // set models
            items_list.Model = itemsModel;

            // construct list views
            CellRendererToggle renderer = new CellRendererToggle();

            renderer.Toggled += new ToggledHandler(ShowToggledCb);
            TreeViewColumn column = new TreeViewColumn("Visible", renderer, "active", 1);

            items_list.AppendColumn(column);

            items_list.AppendColumn("Item", new CellRendererText(), "text", 0);

            return(container);
        }
Пример #6
0
        public FlagsSelectorDialog(Gtk.Window parent, EnumDescriptor enumDesc, uint flags, string title)
        {
            this.flags = flags;
            this.parent = parent;

            Glade.XML xml = new Glade.XML (null, "stetic.glade", "FlagsSelectorDialog", null);
            xml.Autoconnect (this);

            store = new Gtk.ListStore (typeof(bool), typeof(string), typeof(uint));
            treeView.Model = store;

            Gtk.TreeViewColumn col = new Gtk.TreeViewColumn ();

            Gtk.CellRendererToggle tog = new Gtk.CellRendererToggle ();
            tog.Toggled += new Gtk.ToggledHandler (OnToggled);
            col.PackStart (tog, false);
            col.AddAttribute (tog, "active", 0);

            Gtk.CellRendererText crt = new Gtk.CellRendererText ();
            col.PackStart (crt, true);
            col.AddAttribute (crt, "text", 1);

            treeView.AppendColumn (col);

            foreach (Enum value in enumDesc.Values) {
                EnumValue eval = enumDesc[value];
                if (eval.Label == "")
                    continue;
                uint val = (uint) (int) eval.Value;
                store.AppendValues (((flags & val) != 0), eval.Label, val);
            }
        }
        public IncludeFilesDialog(Project project, StringCollection newFiles)
        {
            Runtime.LoggingService.Info ("*** Include files dialog ***");
            // we must do it from *here* otherwise, we get this assembly, not the caller
            Glade.XML glade = new Glade.XML (null, "Base.glade", "IncludeFilesDialogWidget", null);
            glade.Autoconnect (this);

            // set up dialog title
            this.IncludeFilesDialogWidget.Title = String.Format (GettextCatalog.GetString ("Found new files in {0}"), project.Name);

            newFilesOnlyRadioButton.Active = true;
            this.newFiles = newFiles;
            this.project  = project;

            this.InitialiseIncludeFileList();

            // wire in event handlers
            okbutton.Clicked += new EventHandler(AcceptEvent);
            cancelbutton.Clicked += new EventHandler(CancelEvent);
            selectAllButton.Clicked += new EventHandler(SelectAll);
            deselectAllButton.Clicked += new EventHandler(DeselectAll);

            // FIXME: I'm pretty sure that these radio buttons
            // don't actually work in SD 0.98 either, so disabling them
            newFilesOnlyRadioButton.Sensitive = false;
            allFilesRadioButton.Sensitive = false;
        }
Пример #8
0
        public ConnectDialog()
        {
            ui = new Glade.XML (null, "lat.glade", "connectionDialog", null);
            ui.Autoconnect (this);

            Gdk.Pixbuf pb = Gdk.Pixbuf.LoadFromResource ("x-directory-remote-server-48x48.png");
            image5.Pixbuf = pb;

            connectionDialog.Icon = Global.latIcon;
            connectionDialog.Resizable = false;

            portEntry.Text = "389";
            createCombo ();

            //			profileListStore = new ListStore (typeof (string));
            //			profileListview.Model = profileListStore;
            //			profileListStore.SetSortColumnId (0, SortType.Ascending);
            //
            //			TreeViewColumn col;
            //			col = profileListview.AppendColumn ("Name", new CellRendererText (), "text", 0);
            //			col.SortColumnId = 0;
            //
            //			UpdateProfileList ();
            //
            //			if (haveProfiles) {
            //
            //				notebook1.CurrentPage = 1;
            //				connectionDialog.Resizable = true;
            //			}

            noEncryptionRadioButton.Active = true;

            connectionDialog.Run ();
            connectionDialog.Destroy ();
        }
		public void Run (FSpot.IBrowsableCollection photos)
		{
			if (null == photos) {
				throw new ArgumentNullException ("photos");
			}

			this.photos = photos;

			Glade.XML glade_xml = new Glade.XML (
					null, "TabbloExport.glade", DialogName,
					"f-spot");
			glade_xml.Autoconnect (this);

			dialog = (Gtk.Dialog) glade_xml.GetWidget (DialogName);

			FSpot.Widgets.IconView icon_view =
					new FSpot.Widgets.IconView (photos);
			icon_view.DisplayDates = false;
			icon_view.DisplayTags = false;

			username_entry.Changed += HandleAccountDataChanged;
			password_entry.Changed += HandleAccountDataChanged;
			ReadAccountData ();
			HandleAccountDataChanged (null, null);

			dialog.Modal = false;
			dialog.TransientFor = null;

			dialog.Response += HandleResponse;

			thumb_scrolled_window.Add (icon_view);
			icon_view.Show ();
			dialog.Show ();
		}
Пример #10
0
        public AddObjectClassDialog(Connection conn)
        {
            objectClasses = new List<string> ();

            ui = new Glade.XML (null, "lat.glade", "addObjectClassDialog", null);
            ui.Autoconnect (this);

            store = new ListStore (typeof (bool), typeof (string));

            CellRendererToggle crt = new CellRendererToggle();
            crt.Activatable = true;
            crt.Toggled += OnClassToggled;

            objClassTreeView.AppendColumn ("Enabled", crt, "active", 0);
            objClassTreeView.AppendColumn ("Name", new CellRendererText (), "text", 1);

            objClassTreeView.Model = store;

            try {

                foreach (string n in conn.Data.ObjectClasses)
                    store.AppendValues (false, n);

            } catch (Exception e) {

                store.AppendValues (false, "Error getting object classes");
                Log.Debug (e);
            }

            addObjectClassDialog.Icon = Global.latIcon;
            addObjectClassDialog.Resize (300, 400);
            addObjectClassDialog.Run ();
            addObjectClassDialog.Destroy ();
        }
Пример #11
0
    public ExportDialog(Catalog catalog, bool searchOn)
        : base(Mono.Posix.Catalog.GetString ("Export"), null, DialogFlags.NoSeparator | DialogFlags.Modal)
    {
        this.catalog = catalog;
        this.templates = new Hashtable ();
        this.searchOn = searchOn;

        Glade.XML gxml = new Glade.XML (null, "dialogexport.glade", "hbox1", null);
        gxml.Autoconnect(this);

        cancelButton = (Button)this.AddButton (Gtk.Stock.Cancel, 0);
        okButton     = (Button)this.AddButton (Gtk.Stock.Ok, 1);
        cancelButton.Clicked += OnCancelButtonClicked;
        okButton.Clicked     += OnOkButtonClicked;

        VBox vBox = this.VBox;
        vBox.Add ((Box)gxml["hbox1"]);

        PopulateComboBox ();

        if (!searchOn) {
            radioButtonSearch.Sensitive = false;
        }

        radioButtonActive.Label = String.Format (Mono.Posix.Catalog.GetString ("Export the whole {0} catalog"),catalog.ShortDescription);

        this.ShowAll();
    }
		private DatabaseSaveDialog(Window parent)
		{
			Glade.XML xml = new Glade.XML(null,"gui.glade","databaseSaveDialog",null);
			xml.Autoconnect(this);
			
			databaseSaveDialog.Icon = parent.Icon;
			
			// Conectamos las acciones de los botones del diálogo.
			databaseSaveDialog.AddActionWidget(btnSave,ResponseType.Ok);
			databaseSaveDialog.AddActionWidget(btnCancel,ResponseType.Cancel);			
			
			
			// Añadimos los archivos de filtros soportados
			FileFilter filter1=new FileFilter();
			filter1.Name="Archivo XML";
			filter1.AddPattern("*.xml");
			filter1.AddPattern("*.XML");
			
			FileFilter filter2=new FileFilter();
			filter2.Name="Base de datos de reconocimiento";
			filter2.AddPattern("*.jilfml");
			filter2.AddPattern("*.JILFML");
			
			FileFilter filter3=new FileFilter();
			filter3.Name="Todos los archivos";
			filter3.AddPattern("*.*");			
			
			databaseSaveDialog.AddFilter(filter2);		
			databaseSaveDialog.AddFilter(filter1);				
			databaseSaveDialog.AddFilter(filter3);	
		}
Пример #13
0
        public HardDiskConfigDialog(VirtualHardDisk disk, bool capacitySensitive, Window parent)
            : base(Catalog.GetString ("Configure Hard Disk"),
                                                                                  parent, DialogFlags.NoSeparator,
                                                                                  Stock.Cancel, ResponseType.Cancel,
                                                                                  Stock.Ok, ResponseType.Ok)
        {
            this.disk = disk;

            IconThemeUtils.SetWindowIcon (this);

            Glade.XML xml = new Glade.XML ("vmx-manager.glade", "diskConfigContent");
            xml.Autoconnect (this);

            busTypeCombo.Changed += delegate {
                PopulateDeviceNumberCombo ();
            };

            VBox.Add (diskConfigContent);
            diskConfigContent.ShowAll ();

            diskSizeSpin.Sensitive = capacitySensitive;

            Response += delegate (object o, ResponseArgs args) {
                if (args.ResponseId == ResponseType.Ok) {
                    Save ();
                }

                this.Destroy ();
            };

            allocateDiskCheck.Sensitive = capacitySensitive;

            Load ();
        }
Пример #14
0
	public ExportDialog(DataBook db, Gtk.Window mw)
			: base(Catalog.GetString("Export Bytes"), null, 0)
	{
		Glade.XML gxml = new Glade.XML (FileResourcePath.GetDataPath("bless.glade"), "ExportDialogVBox", "bless");
		gxml.Autoconnect (this);

		dataBook = db;
		mainWindow = mw;
		pluginManager = PluginManager.GetForType(typeof(ExportPlugin));
		
		// initialize plugins if we have to
		if (pluginManager == null) {
			PluginManager.AddForType(typeof(ExportPlugin), new object[0]);
			pluginManager = PluginManager.GetForType(typeof(ExportPlugin));
		}
		
		exportFinishedEvent = new AutoResetEvent(false);

		SetupExportPlugins();

		ExportPatternComboEntry.Model = new ListStore (typeof (string));
		ExportPatternComboEntry.TextColumn = 0;
		LoadFromPatternFile((ListStore)ExportPatternComboEntry.Model);

		ProgressHBox.Visible = false;
		cancelClicked = false;

		this.Modal = false;
		this.BorderWidth = 6;
		this.HasSeparator = false;
		CloseButton = (Gtk.Button)this.AddButton(Gtk.Stock.Close, ResponseType.Close);
		ExportButton = (Gtk.Button)this.AddButton(Catalog.GetString("Export"), ResponseType.Ok);
		this.Response += new ResponseHandler(OnDialogResponse);
		this.VBox.Add(ExportDialogVBox);
	}
Пример #15
0
        public MassEditDialog()
        {
            _modList = new List<LdapModification> ();

            ui = new Glade.XML (null, "lat.glade", "massEditDialog", null);
            ui.Autoconnect (this);

            createCombos ();

            modListStore = new ListStore (typeof (string), typeof (string), typeof (string));
            modListView.Model = modListStore;

            TreeViewColumn col;
            col = modListView.AppendColumn ("Action", new CellRendererText (), "text", 0);
            col.SortColumnId = 0;

            col = modListView.AppendColumn ("Name", new CellRendererText (), "text", 1);
            col.SortColumnId = 1;

            col = modListView.AppendColumn ("Value", new CellRendererText (), "text", 2);
            col.SortColumnId = 2;

            modListStore.SetSortColumnId (0, SortType.Ascending);

            massEditDialog.Resize (300, 450);
            massEditDialog.Icon = Global.latIcon;
            massEditDialog.Run ();
            massEditDialog.Destroy ();
        }
Пример #16
0
        public EthernetConfigDialog(VirtualEthernet device, Window parent)
            : base(Catalog.GetString ("Configure Ethernet"),
                                                                                  parent, DialogFlags.NoSeparator,
                                                                                  Stock.Cancel, ResponseType.Cancel,
                                                                                  Stock.Ok, ResponseType.Ok)
        {
            this.device = device;

            IconThemeUtils.SetWindowIcon (this);

            Glade.XML xml = new Glade.XML ("vmx-manager.glade", "ethernetConfigContent");
            xml.Autoconnect (this);

            VBox.Add (ethernetConfigContent);
            ethernetConfigContent.ShowAll ();

            Response += delegate (object o, ResponseArgs args) {
                if (args.ResponseId == ResponseType.Ok) {
                    Save ();
                }

                this.Destroy ();
            };

            ethernetTypeCombo.Changed += OnComboChanged;

            Load ();
        }
Пример #17
0
		/// <summary>
		/// Constructor de la clase LogSaveDialog. Crea y muestra el diálogo.
		/// </summary>
		public LogSaveDialog()
		{
			Glade.XML gxml = new Glade.XML (null,"gui.glade", "logSaveDialog", null);
            gxml.Autoconnect (this);
            
            FileFilter logFilter = new FileFilter();
            logFilter.Name = "Archivo de registro";
            logFilter.AddPattern("*.log");
            logFilter.AddPattern("*.LOG");
            
            FileFilter txtFilter = new FileFilter();
            txtFilter.Name = "Archivo de texto";
            txtFilter.AddPattern("*.txt");
            txtFilter.AddPattern("*.TXT");
            
            FileFilter allFilter = new FileFilter();
            allFilter.Name = "Todos los archivos";
            allFilter.AddPattern("*.*");          
            
            logSaveDialog.AddFilter(logFilter);
            logSaveDialog.AddFilter(txtFilter);
            logSaveDialog.AddFilter(allFilter);
            
            logSaveDialog.AddActionWidget(btnSave,ResponseType.Ok);
            logSaveDialog.AddActionWidget(btnCancel,ResponseType.Cancel); 
		}
Пример #18
0
        public AccountDialog(Gtk.Window parent, GalleryAccount account, bool show_error)
        {
            Glade.XML xml = new Glade.XML (null, "GalleryExport.glade", "gallery_add_dialog", "f-spot");
            xml.Autoconnect (this);
            add_dialog = (Gtk.Dialog) xml.GetWidget ("gallery_add_dialog");
            add_dialog.Modal = false;
            add_dialog.TransientFor = parent;
            add_dialog.DefaultResponse = Gtk.ResponseType.Ok;

            this.account = account;

            status_area.Visible = show_error;

            if (account != null) {
                gallery_entry.Text = account.Name;
                url_entry.Text = account.Url;
                password_entry.Text = account.Password;
                username_entry.Text = account.Username;
                add_button.Label = Gtk.Stock.Ok;
                add_dialog.Response += HandleEditResponse;
            }

            if (remove_button != null)
                remove_button.Visible = account != null;

            add_dialog.Show ();

            gallery_entry.Changed += HandleChanged;
            url_entry.Changed += HandleChanged;
            password_entry.Changed += HandleChanged;
            username_entry.Changed += HandleChanged;
            HandleChanged (null, null);
        }
Пример #19
0
        public SelectGroupsDialog(string[] allGroups)
        {
            ui = new Glade.XML (null, "lat.glade", "selectGroupsDialog", null);
            ui.Autoconnect (this);

            groups = new List<string> ();

            TreeViewColumn col;

            store = new ListStore (typeof (string));
            allGroupsTreeview.Model = store;
            allGroupsTreeview.Selection.Mode = SelectionMode.Multiple;

            col = allGroupsTreeview.AppendColumn ("Name", new CellRendererText (), "text", 0);
            col.SortColumnId = 0;

            store.SetSortColumnId (0, SortType.Ascending);

            foreach (string s in allGroups)
                store.AppendValues (s);

            selectGroupsDialog.Icon = Global.latIcon;
            selectGroupsDialog.Resize (320, 200);
            selectGroupsDialog.Run ();
            selectGroupsDialog.Destroy ();
        }
Пример #20
0
        public ServerListView(Gtk.Window parent, Glade.XML gladeXml)
        {
            Trace.Call(parent, gladeXml);

            if (parent == null)
            {
                throw new ArgumentNullException("parent");
            }

            _Parent     = parent;
            _Controller = new ServerListController(Frontend.UserConfig);

            gladeXml.BindFields(this);

            _AddButton.Clicked    += new EventHandler(OnAddButtonClicked);
            _EditButton.Clicked   += new EventHandler(OnEditButtonClicked);
            _RemoveButton.Clicked += new EventHandler(OnRemoveButtonClicked);

            _TreeView.AppendColumn(_("Protocol"), new Gtk.CellRendererText(), "text", 1);
            _TreeView.AppendColumn(_("Hostname"), new Gtk.CellRendererText(), "text", 2);

            _TreeStore = new Gtk.TreeStore(typeof(ServerModel),
                                           typeof(string), // protocol
                                           typeof(string)  // hostname
                                           );
            _TreeView.RowActivated      += OnTreeViewRowActivated;
            _TreeView.Selection.Changed += OnTreeViewSelectionChanged;
            _TreeView.Model              = _TreeStore;
        }
Пример #21
0
        void Init()
        {
            ui = new Glade.XML(null, "dialogs.glade", "groupDialog", null);
            ui.Autoconnect(this);

            viewDialog = groupDialog;

            TreeViewColumn col;

            allUserStore                    = new ListStore(typeof(string));
            allUsersTreeview.Model          = allUserStore;
            allUsersTreeview.Selection.Mode = SelectionMode.Multiple;

            col = allUsersTreeview.AppendColumn("Name", new CellRendererText(), "text", 0);
            col.SortColumnId = 0;

            allUserStore.SetSortColumnId(0, SortType.Ascending);

            currentMemberStore                    = new ListStore(typeof(string));
            currentMembersTreeview.Model          = currentMemberStore;
            currentMembersTreeview.Selection.Mode = SelectionMode.Multiple;

            col = currentMembersTreeview.AppendColumn("Name", new CellRendererText(), "text", 0);
            col.SortColumnId = 0;

            currentMemberStore.SetSortColumnId(0, SortType.Ascending);

            groupDialog.Resize(350, 400);
        }
Пример #22
0
 public AddConnection(ConnectionCollection collection, Connections cons)
 {
     this.cons = cons;
     this.connections = collection;
     this.gxml = new Glade.XML(null, "irisim.glade", "addConnectionDialog", null);
     this.gxml.Autoconnect(this);
 }
Пример #23
0
        public void init()
        {
            /* Make Our Connection!*/
            Glade.XML gxml = new Glade.XML (SupportFileLoader.locateGameFile("gpremacy_gui/gpremacy_gui.glade"), "GameSetup", null);
            gxml.Autoconnect (this);

            GameSetup.Modal = true;
            GameSetup.TransientFor = MainWindow;

            GameSetup.DeleteEvent += on_GameSetup_delete_event;
            GameSetupSingleStart.Clicked += on_GameSetupSingleStart_clicked;
            GameSetupConnectButton.Clicked += on_GameSetupConnectButton_clicked;
            GameSetupMultiStart.Clicked += on_GameSetupMultiStart_clicked;

            GameSetupRadioClient.Toggled += on_MultiRadio_changed;
            GameSetupRadioServer.Toggled += on_MultiRadio_changed;

            GameSetupPortLabel.Text += "(normally " + Game.DefaultPort.ToString();

            GameSetupMultiStart.Sensitive = false;

            populatePlayers(GameSetupSingleCountryTable);
            populatePlayers(GameSetupCountryTable);
            /* Turn off the AI buttons */
            setSensitiveAIButtons(GameSetupCountryTable, false);

            on_MultiRadio_changed(null, null); /* Fake event */

            // Create a timer that waits one second, then invokes every second.
            UpdateStatusTimer = new Timer(new TimerCallback(updateStatus), null, 1000, 1000);
            UpdateStatusTimer.ToString(); // Shut UP, you damn warning!

            GameSetupEntryIP.Text = "192.168.1.150";
        }
Пример #24
0
        public static Gtk.Window Create()
        {
            string filename = GladeHelper.ProcessGladeFile(FileHelper.FindSupportFile("bygfoot_misc2.glade", true));
            Glade.XML gxml = new Glade.XML(filename, "window_warning", null);
            gxml.Autoconnect(typeof(WarningWindow));

            return window_warning;
        }
Пример #25
0
 public EditConnection(ConnectionCollection con, string key)
 {
     this._connection_collection = con;
     this._edit_key = key;
     this._gxml = new Glade.XML(null, "irisim.glade", "editConnectionDialog", null);
     this._gxml.Autoconnect(this);
     this.PopulateFields();
 }
Пример #26
0
        public TimeDateDialog()
        {
            ui = new Glade.XML(null, "lat.glade", "timeDateDialog", null);
            ui.Autoconnect(this);

            timeDateDialog.Icon = Global.latIcon;
            timeDateDialog.Run();
            timeDateDialog.Destroy();
        }
Пример #27
0
        public TimeDateDialog()
        {
            ui = new Glade.XML (null, "lat.glade", "timeDateDialog", null);
            ui.Autoconnect (this);

            timeDateDialog.Icon = Global.latIcon;
            timeDateDialog.Run ();
            timeDateDialog.Destroy ();
        }
Пример #28
0
 public Error(string message)
 {
     this.gxml = new Glade.XML(null, "irisim.glade", "errorDialog", null);
     this.gxml.Autoconnect(this);
     this.errorDialog.Resizable = true;
     this.errorDialog.AllowGrow = true;
     this.errorMessage.Text = message;
     this.errorDialog.Show();
 }
Пример #29
0
        void Init()
        {
            ui = new Glade.XML(null, "dialogs.glade", "adUserDialog", null);
            ui.Autoconnect(this);

            viewDialog = adUserDialog;

            adUserDialog.Icon = Global.latIcon;
        }
Пример #30
0
 public ConnectionStatus(Controller controller, string username, string password, string servername, string port)
 {
     Logger.log("Adding UI event processor", Logger.Verbosity.moderate);
     controller.message_pump.ui_event += new UIEvent(this.Processor);
     this._gxml = new Glade.XML(null, "irisim.glade", "connectionStatusDialog", null);
     this._gxml.Autoconnect(this);
     this.connectionProgressBar.Fraction = 0.2;
     this.SendConnectionMessage(controller, username, password, servername, port);
 }
Пример #31
0
        public PluginConfigureDialog(Connection connection, string pluginName)
        {
            conn     = connection;
            colNames = new List <string> ();
            colAttrs = new List <string> ();

            ui = new Glade.XML(null, "lat.glade", "pluginConfigureDialog", null);
            ui.Autoconnect(this);

            columnStore = new ListStore(typeof(string), typeof(string));

            CellRendererText cell = new CellRendererText();

            cell.Editable = true;
            cell.Edited  += new EditedHandler(OnNameEdit);
            columnsTreeView.AppendColumn("Name", cell, "text", 0);

            cell          = new CellRendererText();
            cell.Editable = true;
            cell.Edited  += new EditedHandler(OnAttributeEdit);
            columnsTreeView.AppendColumn("Attribute", cell, "text", 1);

            columnsTreeView.Model = columnStore;

            vp = Global.Plugins.GetViewPlugin(pluginName, connection.Settings.Name);
            if (vp != null)
            {
                for (int i = 0; i < vp.ColumnNames.Length; i++)
                {
                    columnStore.AppendValues(vp.ColumnNames[i], vp.ColumnAttributes[i]);
                    colNames.Add(vp.ColumnNames[i]);
                    colAttrs.Add(vp.ColumnAttributes[i]);
                }

                filterEntry.Text = vp.Filter;

                if (vp.DefaultNewContainer != "")
                {
                    newContainerButton.Label = vp.DefaultNewContainer;
                }

                if (vp.SearchBase != "")
                {
                    searchBaseButton.Label = vp.SearchBase;
                }
            }
            else
            {
                Log.Error("Unable to find view plugin {0}", pluginName);
            }

            pluginConfigureDialog.Icon = Global.latIcon;
            pluginConfigureDialog.Resize(300, 400);
            pluginConfigureDialog.Run();
            pluginConfigureDialog.Destroy();
        }
Пример #32
0
        public FacebookTagPopup(Dictionary <long, User> friends)
        {
            Friends = friends;

            Glade.XML xml = new Glade.XML(null, "FacebookExport.glade", "facebook_tag_popup", "f-spot");
            xml.Autoconnect(this);

            Popup = xml.GetWidget("facebook_tag_popup") as Gtk.Window;
            Popup.Show();
        }
Пример #33
0
        void Init()
        {
            ui = new Glade.XML(null, "dialogs.glade", "editContactDialog", null);
            ui.Autoconnect(this);

            viewDialog = editContactDialog;

            Gdk.Pixbuf pb = Gdk.Pixbuf.LoadFromResource("contact-new-48x48.png");
            image180.Pixbuf = pb;
        }
Пример #34
0
        private void Init()
        {
            ui = new Glade.XML(null, "lat.glade", "loginDialog", null);
            ui.Autoconnect(this);

            Gdk.Pixbuf pb = Gdk.Pixbuf.LoadFromResource("locked-48x48.png");
            image455.Pixbuf = pb;

            loginDialog.Icon = Global.latIcon;
        }
 public AddChannelWindow()
     : base(IntPtr.Zero)
 {
     Glade.XML gxml = new Glade.XML (null, "NewChannel.glade", "window", null);
     gxml.Autoconnect (this);
     Raw = window.Handle;
     url_entry.Text = "";
     url_entry.GrabFocus ();
     window.Present ();
 }
Пример #36
0
        void Init()
        {
            ui = new Glade.XML(null, "dialogs.glade", "newAdComputerDialog", null);
            ui.Autoconnect(this);

            viewDialog = newAdComputerDialog;

            Gdk.Pixbuf pb = Gdk.Pixbuf.LoadFromResource("x-directory-remote-server-48x48.png");
            image182.Pixbuf = pb;
        }
Пример #37
0
 void Initialize(Window parent)
 {
     Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("LadderLogic.Presentation.OpenFileDialog.glade");
     Glade.XML glade = new Glade.XML(stream, "OpenFileDialog", null);
     stream.Close();
     glade.Autoconnect(this);
     thisDialog = ((Gtk.Dialog)(glade.GetWidget("OpenFileDialog")));
     thisDialog.Modal = true;
     thisDialog.TransientFor = parent;
     thisDialog.SetPosition (WindowPosition.Center);
 }
Пример #38
0
        // Constructor
        public NoMusicFoundWindow(Window parent)
        {
            Glade.XML gxml =
                new Glade.XML
                    (null, "NoMusicFoundWindow.glade", "window", null);

            gxml.Autoconnect(this);

            window.TransientFor = parent;
            window.Visible      = true;
        }
Пример #39
0
        public DatabaseDescritpionEditorDialog(Window parent)
        {
            Glade.XML gxml = new Glade.XML(null,
                                           "mathtextlearner.glade",
                                           "databaseDescriptionEditorDialog",
                                           null);

            gxml.Autoconnect(this);

            databaseDescriptionEditorDialog.TransientFor = parent;
        }
Пример #40
0
		public EditIconFactoryDialog (Gtk.Window parent, Stetic.IProject project, ProjectIconFactory iconFactory)
		{
			this.iconFactory = iconFactory;
			this.parent = parent;
			this.project = project;
			
			Glade.XML xml = new Glade.XML (null, "stetic.glade", "EditIconFactoryDialog", null);
			xml.Autoconnect (this);
			
			customIconList = new ProjectIconList (project, iconFactory);
			iconListScrolledwindow.AddWithViewport (customIconList);
		}
Пример #41
0
        public LibraryManagerDialog()
        {
            Glade.XML xml = new Glade.XML (null, "stetic.glade", "LibraryManagerDialog", null);
            xml.Autoconnect (this);

            store = new Gtk.ListStore (typeof(string));
            libraryList.HeadersVisible = false;
            libraryList.Model = store;
            libraryList.AppendColumn ("Assembly", new Gtk.CellRendererText (), "text", 0);

            LoadList ();
        }
Пример #42
0
        public NonContainerWarningDialog()
        {
            Glade.XML xml = new Glade.XML(null, "stetic.glade", "AddNonContainerDialog", null);
            xml.Autoconnect(this);

            ((Gtk.Label)linkButton.Child).Markup = "<u><span foreground='blue'>" + Catalog.GetString("GTK# Widget Layout and Packing") + "</span></u>";

            linkButton.Clicked += delegate {
                Gnome.Url.Show("http://www.mono-project.com/GtkSharp:_Widget_Layout_and_Packing");
            };
            okbutton.HasFocus = true;
        }
		public DatabaseDescritpionEditorDialog(Window parent)
		{
			Glade.XML gxml = new Glade.XML(null,
			                               "mathtextlearner.glade", 
			                               "databaseDescriptionEditorDialog",
			                               null);
			
			gxml.Autoconnect(this);
			
			databaseDescriptionEditorDialog.TransientFor = parent;
			
		}
Пример #44
0
        public LibraryManagerDialog()
        {
            Glade.XML xml = new Glade.XML(null, "stetic.glade", "LibraryManagerDialog", null);
            xml.Autoconnect(this);

            store = new Gtk.ListStore(typeof(string));
            libraryList.HeadersVisible = false;
            libraryList.Model          = store;
            libraryList.AppendColumn("Assembly", new Gtk.CellRendererText(), "text", 0);

            LoadList();
        }
Пример #45
0
        void Initialize(Window parent)
        {
            Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("LadderLogic.Presentation.OpenFileDialog.glade");

            Glade.XML glade = new Glade.XML(stream, "OpenFileDialog", null);
            stream.Close();
            glade.Autoconnect(this);
            thisDialog              = ((Gtk.Dialog)(glade.GetWidget("OpenFileDialog")));
            thisDialog.Modal        = true;
            thisDialog.TransientFor = parent;
            thisDialog.SetPosition(WindowPosition.Center);
        }
		/// <summary>
		/// Crea una instancia del panel de seleccion de ficheros del
		/// asistente de creacion de nuevas basesd de datos de reconocimiento.
		/// </summary>
		/// <param name="assistant">
		/// El asistente al que pertenece el nuevo panel.
		/// </param>
		public FileSelectionStep(PanelAssistant assistant) 
			: base(assistant)
		{
			Glade.XML gxml =
				new Glade.XML(null,"databaseAssistant.glade","fileRootWidget",null);
				
			gxml.Autoconnect(this);
			
			SetRootWidget(fileRootWidget);
			
			InitializeWidgets();
		}
        /// <summary>
        /// Crea una instancia del panel de seleccion de ficheros del
        /// asistente de creacion de nuevas basesd de datos de reconocimiento.
        /// </summary>
        /// <param name="assistant">
        /// El asistente al que pertenece el nuevo panel.
        /// </param>
        public FileSelectionStep(PanelAssistant assistant)
            : base(assistant)
        {
            Glade.XML gxml =
                new Glade.XML(null, "databaseAssistant.glade", "fileRootWidget", null);

            gxml.Autoconnect(this);

            SetRootWidget(fileRootWidget);

            InitializeWidgets();
        }
Пример #48
0
        public EditIconFactoryDialog(Gtk.Window parent, Stetic.IProject project, ProjectIconFactory iconFactory)
        {
            this.iconFactory = iconFactory;
            this.parent      = parent;
            this.project     = project;

            Glade.XML xml = new Glade.XML(null, "stetic.glade", "EditIconFactoryDialog", null);
            xml.Autoconnect(this);

            customIconList = new ProjectIconList(project, iconFactory);
            iconListScrolledwindow.AddWithViewport(customIconList);
        }
Пример #49
0
        void Init()
        {
            _objectClass = new List <string> ();

            ui = new Glade.XML(null, "lat.glade", "templateEditorDialog", null);
            ui.Autoconnect(this);

            setupTreeViews();

            templateEditorDialog.Icon = Global.latIcon;
            templateEditorDialog.Resize(640, 480);
        }
Пример #50
0
        public NonContainerWarningDialog()
        {
            Glade.XML xml = new Glade.XML (null, "stetic.glade", "AddNonContainerDialog", null);
            xml.Autoconnect (this);

            ((Gtk.Label)linkButton.Child).Markup = "<u><span foreground='blue'>" + Catalog.GetString ("GTK# Widget Layout and Packing") + "</span></u>";

            linkButton.Clicked += delegate {
                Gnome.Url.Show ("http://www.mono-project.com/GtkSharp:_Widget_Layout_and_Packing");
            };
            okbutton.HasFocus = true;
        }
Пример #51
0
 public static void LoadUI(string filename, string root, Type handler)
 {
     try
     {
         string uifile = GladeHelper.ProcessGladeFile(FileHelper.FindSupportFile(filename, true));
         Glade.XML gxml = new Glade.XML(uifile, root, null);
         gxml.Autoconnect(handler);
     }
     catch (Exception ex)
     {
         Program.ExitProgram(ExitCodes.EXIT_FILE_NOT_FOUND, ": Problems found in the glade file: {0}\n", ex.Message);
     }
 }
        public SymbolLabelEditorWidget()
            : base(0.5f, 0.5f, 1.0f, 1.0f)
        {
            Glade.XML gxml =
                new Glade.XML(null, "gui.glade", "symbolLabelEditorHB", null);
            gxml.Autoconnect(this);

            InitializeWidgets();



            this.ShowAll();
        }
Пример #53
0
        /// <summary>
        /// El constructor de la clase <c>ImageLoadDialog</c>.
        /// </summary>
        private FolderOpenDialog(Window parent)
        {
            Glade.XML gxml =
                new Glade.XML(null, "gui.glade", "folderOpenDialog", null);

            gxml.Autoconnect(this);

            folderOpenDialog.TransientFor = parent;
            folderOpenDialog.Modal        = true;

            folderOpenDialog.AddActionWidget(okButton, ResponseType.Ok);
            folderOpenDialog.AddActionWidget(cancelButton, ResponseType.Cancel);
        }
Пример #54
0
        void Init()
        {
            ui = new Glade.XML(null, "lat.glade", "createEntryDialog", null);
            ui.Autoconnect(this);

            _objectClass = new List <string> ();

            setupTreeViews();

            browseButton.Label = conn.DirectoryRoot;

            createEntryDialog.Resize(320, 200);
        }
Пример #55
0
        public DatabaseDescritpionEditorWidget() : base(0.5f, 0.5f, 1.0f, 1.0f)
        {
            Glade.XML gxml = new Glade.XML(null,
                                           "mathtextlearner.glade",
                                           "databaseDescriptionEditorVB",
                                           null);

            gxml.Autoconnect(this);

            InitializeWidgets();

            this.ShowAll();
        }
Пример #56
0
        public PickFolderDialog(Gtk.Dialog parent, string folder)
        {
            Glade.XML xml = new Glade.XML(null, "MergeDb.glade", "pickfolder_dialog", "f-spot");
            xml.Autoconnect(this);
            Console.WriteLine("new pickfolder");
            pickfolder_dialog.Modal        = false;
            pickfolder_dialog.TransientFor = parent;

            pickfolder_chooser.LocalOnly = false;

            pickfolder_label.Text      = String.Format(Catalog.GetString("<big>The database refers to files contained in the <b>{0}</b> folder.\n Please select that folder so I can do the mapping.</big>"), folder);
            pickfolder_label.UseMarkup = true;
        }
Пример #57
0
        private void Initialize(Window parent)
        {
            //TODO: Looks like builder pattern needed here. too many copipaste with glade init.
            Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("GMTAboutDialog.glade");

            Glade.XML glade = new Glade.XML(stream, "GMTAboutDialog", null);
            stream.Close();
            glade.Autoconnect(this);
            thisDialog                = ((Gtk.Dialog)(glade.GetWidget("GMTAboutDialog")));
            thisDialog.Modal          = true;
            thisDialog.TransientFor   = parent;
            thisDialog.WindowPosition = WindowPosition.Center;
        }
Пример #58
0
        public void Run(SupportedService service, IBrowsableCollection selection, bool display_tags)
        {
            this.selection       = selection;
            this.current_service = FlickrRemote.Service.FromSupported(service);

            IconView view = new IconView(selection);

            view.DisplayTags  = display_tags;
            view.DisplayDates = false;

            xml = new Glade.XML(null, "FlickrExport.glade", dialog_name, "f-spot");
            xml.Autoconnect(this);

            Dialog.Modal        = false;
            Dialog.TransientFor = null;

            thumb_scrolledwindow.Add(view);
            HandleSizeActive(null, null);

            public_radio.Toggled    += HandlePublicChanged;
            tag_check.Toggled       += HandleTagChanged;
            hierarchy_check.Toggled += HandleHierarchyChanged;
            HandleTagChanged(null, null);
            HandleHierarchyChanged(null, null);

            Dialog.ShowAll();
            Dialog.Response       += HandleResponse;
            auth_flickr.Clicked   += HandleClicked;
            auth_text              = string.Format(auth_label.Text, current_service.Name);
            auth_label.Text        = auth_text;
            used_bandwidth.Visible = false;

            LoadPreference(SCALE_KEY);
            LoadPreference(SIZE_KEY);
            LoadPreference(BROWSER_KEY);
            LoadPreference(TAGS_KEY);
            LoadPreference(TAG_HIERARCHY_KEY);
            LoadPreference(IGNORE_TOP_LEVEL_KEY);
            LoadPreference(STRIP_META_KEY);
            LoadPreference(PUBLIC_KEY);
            LoadPreference(FAMILY_KEY);
            LoadPreference(FRIENDS_KEY);
            LoadPreference(current_service.PreferencePath);

            do_export_flickr.Sensitive = false;
            fr = new FlickrRemote(token, current_service);
            if (token != null && token.Length > 0)
            {
                StartAuth();
            }
        }
Пример #59
0
        public GoogleAccountDialog(Gtk.Window parent, GoogleAccount account, bool show_error, CaptchaException captcha_exception)
        {
            xml = new Glade.XML(null, "PicasaWebExport.glade", dialog_name, "f-spot");
            xml.Autoconnect(this);
            Dialog.Modal           = false;
            Dialog.TransientFor    = parent;
            Dialog.DefaultResponse = Gtk.ResponseType.Ok;

            this.account = account;

            bool show_captcha = (captcha_exception != null);

            status_area.Visible   = show_error;
            locked_area.Visible   = show_captcha;
            captcha_label.Visible = show_captcha;
            captcha_entry.Visible = show_captcha;
            captcha_image.Visible = show_captcha;

            password_entry.ActivatesDefault = true;
            username_entry.ActivatesDefault = true;

            if (show_captcha)
            {
                try {
                    using  (ImageFile img = ImageFile.Create(new Uri(captcha_exception.CaptchaUrl))) {
                        captcha_image.Pixbuf = img.Load();
                        token = captcha_exception.Token;
                    }
                } catch (Exception) {}
            }

            if (account != null)
            {
                password_entry.Text = account.Password;
                username_entry.Text = account.Username;
                add_button.Label    = Gtk.Stock.Ok;
                Dialog.Response    += HandleEditResponse;
            }

            if (remove_button != null)
            {
                remove_button.Visible = account != null;
            }

            this.Dialog.Show();

            password_entry.Changed += HandleChanged;
            username_entry.Changed += HandleChanged;
            HandleChanged(null, null);
        }
Пример #60
0
        public GoogleAddAlbum(GoogleExport export, PicasaWeb picasa)
        {
            xml = new Glade.XML(null, "PicasaWebExport.glade", dialog_name, "f-spot");
            xml.Autoconnect(this);

            this.export = export;
            this.picasa = picasa;

            Dialog.Response += HandleAddResponse;

            description_entry.Changed += HandleChanged;
            title_entry.Changed       += HandleChanged;
            HandleChanged(null, null);
        }