Example #1
0
 private void messageInputBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter && !e.Shift)
     {
         ViewPlugin.SendMessage(messageInputBox.Text);
         messageInputBox.Clear();
         e.SuppressKeyPress = true;
     }
     else if (e.KeyCode == Keys.Up)
     {
     }
 }
Example #2
0
        public UserDefaultValuesDialog(ViewPlugin plugin, Connection connection)
        {
            vp = plugin;
            conn = connection;

            ui = new Glade.XML (null, "dialogs.glade", "defaultValuesDialog", null);
            ui.Autoconnect (this);

            passwordEntry.Sensitive = false;
            SetDefaultValues ();

            defaultValuesDialog.Run ();
            defaultValuesDialog.Destroy ();
        }
Example #3
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 ();
        }
Example #4
0
 public void ConfigureView(ViewPlugin vp)
 {
     viewPlugin = vp;
     SetViewColumns ();
 }
Example #5
0
        public void ShowNewItemDialog(string viewName)
        {
            viewPlugin = null;

            viewPlugin = Global.Plugins.GetViewPlugin (viewName, conn.Settings.Name);
            if (viewPlugin == null) {
                return;
            }

            ConfigureView (viewPlugin);

            viewPlugin.OnAddEntry (conn);
            Populate ();
        }
Example #6
0
 //used when the tab is closed
 public void Close()
 {
     ViewPlugin.Close();
 }