Example #1
0
        public NewPhoneBook()
        {
            booknames = new ArrayList();

            Glade.XML xml = new Glade.XML(null, "gfax.glade", "NewPhoneBookDialog", null);
            xml.Autoconnect(this);

            GfaxRadioButton.Active = true;

            EvolutionRadioButton.Sensitive = true;
            // turn these off until somewhere near supported
            DatabaseRadioButton.Visible = false;
            LDAPRadioButton.Visible     = false;

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

            view = new G_ListView(EvolutionTreeView, store);

            view.AddColumnTitleToggle(Catalog.GetString("Use"), 0, COLUMN_0);
            view.AddColumnTitle(Catalog.GetString("Phone Book"), 0, COLUMN_1);

            EvolutionTreeView.HeadersVisible = true;

            NewPhoneBookDruid.ShowAll();
        }
Example #2
0
        public GfaxSend(string fname, string[] args)
        {
            filename        = fname;
            includeFilename = args[0];

            Application.Init();

            if (Settings.Faxtracing == true)
            {
                Console.WriteLine("[GfaxSend] File name is : {0}", fname);
            }

            // check to see if we've run before, if so gfax will be there
            if (Settings.RunSetupAtStart)
            {
                Settings.RunSetupAtStart = false;
                MessageDialog md;
                md = new MessageDialog(
                    null,
                    DialogFlags.DestroyWithParent,
                    MessageType.Info,
                    ButtonsType.Ok,
                    Catalog.GetString(
                        @"
This is the first time you have run Gfax.
Please run Gfax from the menu or command line and set your 
MODEM TYPE, PORT and Fax number under preferences.

Gfax is initially setup to use Efax, you may change it use 
Hylafax if you prefer or require connection to a network 
facsimile server.")
                    );
                md.Run();
                md.Destroy();
                Application.Quit();
                dosend = false;
                Environment.Exit(0);
            }

/*
 *                      if ( Settings.FaxNumber.Length <= 4 ) {
 *                              MessageDialog md;
 *                              md = new MessageDialog (
 *                                      null,
 *                                      DialogFlags.DestroyWithParent,
 *                                      MessageType.Info,
 *                                      ButtonsType.Ok,
 *                                      Catalog.GetString(
 *                                              @"
 * You must have a Fax number set in your preferences under
 * Phone Information.")
 *                              );
 *                              md.Run ();
 *                              md.Destroy();
 *                              //Application.Quit();
 *                              dosend = false;
 *                              return;
 *                      }
 */
            gxml = new Glade.XML(null, "send-druid.glade", "NewFaxDialog", null);
            gxml.Autoconnect(this);

            // Set the program icon
            //Gdk.Pixbuf Icon = new Gdk.Pixbuf(null, "gfax.png");
            //((Gtk.Window) gxml["NewFaxDialog"]).Icon = Icon;
            //NewFaxDialog.Icon = Icon;

            ItemStore = new ListStore(
                typeof(Boolean),
                typeof(string),
                typeof(string),
                typeof(string));

            ItemListview = new G_ListView(ItemTreeview, ItemStore);

            ItemListview.AddColumnTitleToggle(Catalog.GetString("Send"), 0, COLUMN_0);
            ItemListview.AddColumnTitle(Catalog.GetString("Phone Number"), 0, COLUMN_1);
            ItemListview.AddColumnTitle(Catalog.GetString("Organization"), 0, COLUMN_2);
            ItemListview.AddColumnTitle(Catalog.GetString("Contact"), 0, COLUMN_3);

            ItemTreeview.HeadersVisible = true;

            //ItemTreeview.Selection.Mode = SelectionMode.Multiple;

            ResolutionCheckbutton.Active = Settings.HiResolution;
            EmailCheckbutton.Active      = Settings.EmailNotify;
            EmailEntry.Text = Settings.EmailAddress;

            if (Settings.TransmitAgent == "efax")
            {
                EmailCheckbutton.Visible = false;
                EmailEntry.Visible       = false;
                SendCheckbutton.Visible  = false;
                SendDateedit.Visible     = false;
            }

            if (SendCheckbutton.Active)
            {
                SendDateedit.Sensitive = false;
            }

            // If we have a file name from the gnome print dialog
            if (includeFilename != "do_filename")
            {
                FilenameEntry.Text      = Catalog.GetString("Spooled from print job");
                FilenameEntry.Sensitive = false;
                BrowseButton.Sensitive  = false;
            }

            Application.Run();
        }
Example #3
0
        public GfaxSend(string fname, string[] args)
        {
            filename = fname;
            includeFilename = args[0];

            Application.Init ();

            if (Settings.Faxtracing == true) {
                Console.WriteLine("[GfaxSend] File name is : {0}", fname);
            }

            // check to see if we've run before, if so gfax will be there
            if ( Settings.RunSetupAtStart ) {
                Settings.RunSetupAtStart = false;
                MessageDialog md;
                md = new MessageDialog (
                    null,
                    DialogFlags.DestroyWithParent,
                    MessageType.Info,
                    ButtonsType.Ok,
                    Catalog.GetString(
                        @"
            This is the first time you have run Gfax.
            Please run Gfax from the menu or command line and set your
            MODEM TYPE, PORT and Fax number under preferences.

            Gfax is initially setup to use Efax, you may change it use
            Hylafax if you prefer or require connection to a network
            facsimile server.")
                );
                md.Run ();
                md.Destroy();
                Application.Quit();
                dosend = false;
                Environment.Exit(0);
            }
            /*
            if ( Settings.FaxNumber.Length <= 4 ) {
                MessageDialog md;
                md = new MessageDialog (
                    null,
                    DialogFlags.DestroyWithParent,
                    MessageType.Info,
                    ButtonsType.Ok,
                    Catalog.GetString(
                        @"
            You must have a Fax number set in your preferences under
            Phone Information.")
                );
                md.Run ();
                md.Destroy();
                //Application.Quit();
                dosend = false;
                return;
            }
            */
            gxml = new Glade.XML (null, "send-druid.glade","NewFaxDialog",null);
            gxml.Autoconnect (this);

            // Set the program icon
            //Gdk.Pixbuf Icon = new Gdk.Pixbuf(null, "gfax.png");
            //((Gtk.Window) gxml["NewFaxDialog"]).Icon = Icon;
            //NewFaxDialog.Icon = Icon;

            ItemStore = new ListStore(
                    typeof (Boolean),
                    typeof (string),
                    typeof (string),
                    typeof (string));

            ItemListview = new G_ListView(ItemTreeview, ItemStore);

            ItemListview.AddColumnTitleToggle(Catalog.GetString("Send"), 0, COLUMN_0);
            ItemListview.AddColumnTitle(Catalog.GetString("Phone Number"), 0, COLUMN_1);
            ItemListview.AddColumnTitle(Catalog.GetString("Organization"), 0, COLUMN_2);
            ItemListview.AddColumnTitle(Catalog.GetString("Contact"), 0, COLUMN_3);

            ItemTreeview.HeadersVisible = true;

            //ItemTreeview.Selection.Mode = SelectionMode.Multiple;

            ResolutionCheckbutton.Active = Settings.HiResolution;
            EmailCheckbutton.Active = Settings.EmailNotify;
            EmailEntry.Text = Settings.EmailAddress;

            if (Settings.TransmitAgent == "efax") {
                EmailCheckbutton.Visible = false;
                EmailEntry.Visible = false;
                SendCheckbutton.Visible = false;
                SendDateedit.Visible = false;
            }

            if (SendCheckbutton.Active)
                SendDateedit.Sensitive = false;

            // If we have a file name from the gnome print dialog
            if (includeFilename != "do_filename") {
                FilenameEntry.Text = Catalog.GetString("Spooled from print job");
                FilenameEntry.Sensitive = false;
                BrowseButton.Sensitive = false;
            }

            Application.Run ();
        }