/usr/lib/sltv/ui/videobalance.py is in landell 0.92.1-1.1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | # -*- coding: utf-8 -*-
# Copyright (C) 2010 Holoscópio Tecnologia
# Author: Luciana Fujii Pontello <luciana@holoscopio.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import gobject
import gtk
from sltv.settings import UI_DIR
class VideoBalanceUI:
def __init__(self, ui, sltv):
self.ui = ui
self.sltv = sltv
self.interface = gtk.Builder()
self.interface.add_from_file(UI_DIR + "/videobalance.ui")
self.widget = self.interface.get_object("table1")
self.contrast_adjustment = gtk.Adjustment(1.0, 0, 2.0)
self.contrast_scale = gtk.HScale(self.contrast_adjustment)
self.contrast_scale.set_property("digits", 2)
self.widget.attach(self.contrast_scale, 1, 2, 0, 1)
self.brightness_adjustment = gtk.Adjustment(0, -1.0, 1.0)
self.brightness_scale = gtk.HScale(self.brightness_adjustment)
self.brightness_scale.set_property("digits", 2)
self.widget.attach(self.brightness_scale, 1, 2, 1, 2)
self.hue_adjustment = gtk.Adjustment(0, -1.0, 1.0)
self.hue_scale = gtk.HScale(self.hue_adjustment)
self.hue_scale.set_property("digits", 2)
self.widget.attach(self.hue_scale, 1, 2, 2, 3)
self.saturation_adjustment = gtk.Adjustment(1.0, 0, 2.0)
self.saturation_scale = gtk.HScale(self.saturation_adjustment)
self.saturation_scale.set_property("digits", 2)
self.widget.attach(self.saturation_scale, 1, 2, 3, 4)
self.widget.show_all()
self.contrast_scale.connect("value-changed", self._on_contrast_changed)
self.brightness_scale.connect("value-changed", self._on_brightness_changed)
self.hue_scale.connect("value-changed", self._on_hue_changed)
self.saturation_scale.connect("value-changed", self._on_saturation_changed)
def _on_contrast_changed(self, adjustment):
self.sltv.set_videobalance_contrast(self.contrast_scale.get_value())
def _on_brightness_changed(self, adjustment):
self.sltv.set_videobalance_brightness(self.brightness_scale.get_value())
def _on_hue_changed(self, adjustment):
self.sltv.set_videobalance_hue(self.hue_scale.get_value())
def _on_saturation_changed(self, adjustment):
self.sltv.set_videobalance_saturation(self.saturation_scale.get_value())
def get_widget(self):
return self.widget
|