~jeremywootten/pantheon-files/fix-backspace-in-columnv-view

« back to all changes in this revision

Viewing changes to src/TextRenderer.vala

  • Committer: Jeremy Wootten
  • Date: 2016-01-29 17:21:40 UTC
  • mfrom: (2023.1.25 pantheon-files)
  • Revision ID: jeremy@elementaryos.org-20160129172140-hirnjv1uo5mxiz7b
merge trunk r2048

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
namespace Marlin {
20
20
    public class TextRenderer: Gtk.CellRendererText {
21
21
 
22
 
        const int MAX_LINES = 3;
 
22
        const int MAX_LINES = 5;
23
23
        const uint BORDER_RADIUS = 6;
24
24
 
25
25
        public Marlin.ZoomLevel zoom_level {get; set;}
165
165
            entry.set_data ("marlin-text-renderer-path", path.dup ());
166
166
            entry.show_all ();
167
167
 
 
168
            base.start_editing (event, widget, path, background_area, cell_area, flags);
168
169
            return entry as Gtk.CellEditable;
169
170
        }
170
171
 
206
207
 
207
208
        private void connect_widget_signals () {
208
209
            widget.destroy.connect (invalidate);
209
 
            widget.style_set.connect (invalidate);
 
210
            widget.style_updated.connect (invalidate);
210
211
        }
211
212
 
212
213
        private void disconnect_widget_signals () {
213
214
            widget.destroy.disconnect (invalidate);
214
 
            widget.style_set.disconnect (invalidate);
 
215
            widget.style_updated.disconnect (invalidate);
215
216
        }
216
217
 
217
218
        private void invalidate () {
 
219
            disconnect_widget_signals ();
218
220
            set_widget (null);
219
221
            file = null;
220
222
        }