Exemplo n.º 1
0
 void HandleNotifyHandler(object o, GLib.NotifyArgs args)
 {
     if (!settingSize && sizesLoaded)
     {
         relativeSplitSizes = GetRelativeSplitSizes().ToList();
     }
 }
 void LabelWidgetChanged(object obj, GLib.NotifyArgs args)
 {
     if (!IsDisposed && frame.LabelWidget != null && !(frame.LabelWidget is Stetic.Placeholder))
     {
         ObjectWrapper.Create(proj, frame.LabelWidget);
     }
 }
 void OnColumnWidthChanged(object o, GLib.NotifyArgs args)
 {
     if (!columnSizesUpdating && allowStoreColumnSizes)
     {
         StoreColumnSizes();
     }
 }
Exemplo n.º 4
0
 private void ParentActiveNotification(object o, GLib.NotifyArgs args)
 {
     if (parent.IsActive)
     {
         Hide();
         parent.RemoveNotification("is-active", ParentActiveNotification);
     }
 }
Exemplo n.º 5
0
        private void OnLocationChanged(object source, GLib.NotifyArgs args)
        {
            int x;
            int y;

            WrappedObject.GetLocation(out x, out y);

            Allocation.X = x;
            Allocation.Y = y;
        }
Exemplo n.º 6
0
        private void HandleIdChanged(object source, GLib.NotifyArgs args)
        {
            Wrappers.Wrapper wrapped = Wrappers.Wrapper.Wrap((Cdn.Object)source);
            Gtk.MenuItem     item    = d_map[wrapped].Item;

            item.Remove(item.Child);
            Gtk.Label lbl = new Gtk.Label(wrapped.Id.Replace("_", "__"));
            lbl.Show();

            item.Add(lbl);
        }
Exemplo n.º 7
0
 internal void HandlePopupShownChanged(object o, GLib.NotifyArgs args)
 {
     if (Handler.Control.PopupShown)
     {
         Handler.Callback.OnDropDownOpening(Handler.Widget, EventArgs.Empty);
     }
     else
     {
         Handler.Callback.OnDropDownClosed(Handler.Widget, EventArgs.Empty);
     }
 }
Exemplo n.º 8
0
 void PositionChanged(object o, GLib.NotifyArgs args)
 {
     if (!Widget.Loaded || suppressSplitterMoved > 0)
     {
         return;
     }
     // keep track of the desired position (for removing/re-adding/resizing the control)
     UpdateRelative();
     EnsurePosition();
     Callback.OnPositionChanged(Widget, EventArgs.Empty);
 }
Exemplo n.º 9
0
        private void OnFilterChanged(object o, GLib.NotifyArgs args)
        {
            FileChooserDialog fcd = (FileChooserDialog)o;

            // find the FormatDescriptor
            FormatDescriptor format_desc = PintaCore.System.ImageFormats.Formats.Single(f => f.Filter == fcd.Filter);

            // adjust the filename
            var p = fcd.Filename;

            p = Path.ChangeExtension(Path.GetFileName(p), format_desc.Extensions[0]);
            fcd.CurrentName = p;
        }
Exemplo n.º 10
0
 private void ParentActiveNotification(object o, GLib.NotifyArgs args)
 {
     // If our parent window is ever somehow activated while we are
     // visible, this will ensure we merge back into the parent
     if (parent.IsActive)
     {
         parent.GdkWindow.SkipPagerHint   = false;
         parent.GdkWindow.SkipTaskbarHint = false;
         parent.RemoveNotification("is-active", ParentActiveNotification);
     }
     else
     {
         parent.GdkWindow.SkipPagerHint   = true;
         parent.GdkWindow.SkipTaskbarHint = true;
     }
 }
Exemplo n.º 11
0
        void ExpansionChanged(object obj, GLib.NotifyArgs args)
        {
            Gtk.Expander exp = obj as Gtk.Expander;

            int ind = lines.IndexOf(exp);

            if (ind == -1)
            {
                return;
            }

            ind++;
            while (ind < lines.Count && !(lines[ind] is Gtk.Expander))
            {
                if (lines[ind] is Widget)
                {
                    Widget w = (Widget)lines[ind];
                    if (exp.Expanded)
                    {
                        w.Show();
                    }
                    else
                    {
                        w.Hide();
                    }
                }
                else if (lines[ind] is Pair)
                {
                    Pair p = (Pair)lines[ind];
                    if (exp.Expanded)
                    {
                        p.Label.Show();
                        p.Editor.Show();
                    }
                    else
                    {
                        p.Label.Hide();
                        p.Editor.Hide();
                    }
                }
                ind++;
            }

            QueueDraw();
        }
Exemplo n.º 12
0
        private void OnCapsSet(object o, GLib.NotifyArgs args)
        {
            Structure s = null;
            int       width, height, fps_n, fps_d, par_n, par_d;
            Caps      caps = ((Pad)o).CurrentCaps;

            width = height = fps_n = fps_d = 0;
            if (caps == null)
            {
                return;
            }

            /* Get video decoder caps */
            s = caps.GetStructure(0);
            if (s != null)
            {
                /* We need at least width/height and framerate */
                if (!(s.HasField("framerate") && s.HasField("width") && s.HasField("height")))
                {
                    return;
                }
                Fraction f = new Fraction(s.GetValue("framerate"));
                fps_n = f.Numerator;
                fps_d = f.Denominator;
                GLib.Value val;
                width  = (int)s.GetValue("width");
                height = (int)s.GetValue("height");
                /* Get the PAR if available */
                val = s.GetValue("pixel-aspect-ratio");
                if (!val.Equals(GLib.Value.Empty))
                {
                    Fraction par = new Fraction(val);
                    par_n = par.Numerator;
                    par_d = par.Denominator;
                }
                else   /* Square pixels */
                {
                    par_n = 1;
                    par_d = 1;
                }

                /* Notify PlayerEngine if a callback was set */
                RaiseVideoGeometry(width, height, fps_n, fps_d, par_n, par_d);
            }
        }
Exemplo n.º 13
0
        private void OnSourceChanged(object o, GLib.NotifyArgs args)
        {
            if (Device == null)
            {
                return;
            }

            var playbin = o as Element;
            var dvd_src = GetDvdSource(playbin);

            if (dvd_src == null)
            {
                return;
            }

            // dvd source elements should always have this property
            dvd_src ["device"] = Device;
            Log.DebugFormat("dvd: setting device property on source ({0})", Device);
        }
        private void OnFilterChanged(object o, GLib.NotifyArgs args)
        {
            FileChooserDialog fcd = (FileChooserDialog)o;

            // Ensure that the file filter is never blank.
            if (fcd.Filter == null)
            {
                fcd.Filter = PintaCore.System.ImageFormats.GetDefaultSaveFormat().Filter;
                return;
            }

            // find the FormatDescriptor
            FormatDescriptor format_desc = PintaCore.System.ImageFormats.Formats.Single(f => f.Filter == fcd.Filter);

            // adjust the filename
            var p = fcd.Filename;

            p = Path.ChangeExtension(Path.GetFileName(p), format_desc.Extensions[0]);
            fcd.CurrentName = p;
        }
Exemplo n.º 15
0
        void NotifyHandler(object obj, GLib.NotifyArgs args)
        {
            if (Loading)
            {
                return;
            }

            // Translate gtk names into descriptor names.
            foreach (ItemGroup group in ClassDescriptor.ItemGroups)
            {
                foreach (ItemDescriptor item in group)
                {
                    TypedPropertyDescriptor prop = item as TypedPropertyDescriptor;
                    if (prop != null && prop.GladeName == args.Property)
                    {
                        EmitNotify(prop.Name);
                        return;
                    }
                }
            }
        }
Exemplo n.º 16
0
        private void OnSourceChanged(object o, GLib.NotifyArgs args)
        {
            if (Device == null)
            {
                return;
            }
            var playbin = o as Element;

            var cdda_src = GetCddaSource(playbin);

            if (cdda_src == null)
            {
                return;
            }

            // CddaBaseSrc elements should always have this property
            Log.DebugFormat("cdda: setting device property on source ({0})", Device);
            cdda_src ["device"] = Device;

            // If the GstCddaBaseSrc is cdparanoia, it will have this property, so set it
            try {
                cdda_src ["paranoia-mode"] = 0;
            } catch (Gst.PropertyNotFoundException) { }
        }
Exemplo n.º 17
0
 void OnNotifyPosition(object sender, GLib.NotifyArgs a)
 {
     positionChanged = true;
 }
Exemplo n.º 18
0
		void AdjustmentNotifyHandler (object obj, GLib.NotifyArgs args)
		{
			EmitNotify (args.Property);
		}
Exemplo n.º 19
0
        private void NotifyAnnotationHandler(object source, GLib.NotifyArgs args)
        {
            ExtractAnnotationInfo();

            DoRequestRedraw();
        }
Exemplo n.º 20
0
 private void OnPropertyChanged(object source, GLib.NotifyArgs args)
 {
     EmitChanged();
 }
Exemplo n.º 21
0
 private void OnVolumeChanged(object o, GLib.NotifyArgs args)
 {
     OnEventChanged(PlayerEvent.Volume);
 }
Exemplo n.º 22
0
 private void NotifyIdHandler(object source, GLib.NotifyArgs args)
 {
     DoRequestRedraw();
 }
Exemplo n.º 23
0
 private void HandleNotifyIntegrator(object source, GLib.NotifyArgs args)
 {
     UpdateIntegrator(d_network.Integrator);
 }
Exemplo n.º 24
0
 private void OnFromChanged(object source, GLib.NotifyArgs args)
 {
     UpdateFrom();
     CalculateAnchors();
 }
Exemplo n.º 25
0
 private void OnProxyChanged(object o, GLib.NotifyArgs args)
 {
     Variable = d_iface.Lookup(d_name);
 }
Exemplo n.º 26
0
 void PositionChangedBefore(object o, GLib.NotifyArgs args) => PositionChanged(o, args);
Exemplo n.º 27
0
 void HandleMove(object o, GLib.NotifyArgs args)
 {
     ApplicationContext.InvokeUserCode(delegate {
         EventSink.OnPositionChanged();
     });
 }
Exemplo n.º 28
0
 private void HandleIdChanged(object source, GLib.NotifyArgs args)
 {
     d_entry.Text = d_object.Id;
 }
Exemplo n.º 29
0
 void EnsureIconLoaded(object o, GLib.NotifyArgs args)
 {
     ImageService.EnsureStockIconIsLoaded(StockId, (IconSize)StockSize);
 }
Exemplo n.º 30
0
        /// <summary>
        /// Internal constructor to create a new group based on an edsContact
        /// </summary>

        /*
         * internal PersonGroup(Evolution.Contact edsContact)
         * {
         *      //this.edsContact = edsContact;
         *      locker = new System.Object();
         *      personTreeStore = new Gtk.TreeStore(typeof(Person));
         *      UpdateModel();
         * }
         */
        #endregion


        #region Interal Methods
        /// <summary>
        /// Created to handle property changes on an eds Contact, but it's not working
        /// </summary>
        internal void PropertyChangedNotifyHandler(object o, GLib.NotifyArgs args)
        {
            Logger.Debug("A Property has changed on Group: {0}", this.DisplayName);
        }