Уведомления

Группа в Telegram: @pythonsu

#1 Фев. 16, 2007 10:42:57

pythonwin
От:
Зарегистрирован: 2006-07-18
Сообщения: 1294
Репутация: +  0  -
Профиль   Отправить e-mail  

ошибки для GTKClist

доброго времени суток! :)

пожалуйста, подскажите как решить проблему - нарисовал в Glade окно в котором есть таблица (GTKClLict)

<?xml version=“1.0” standalone=“no”?> <!–*- mode: xml -*–>
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd“>

<glade-interface>

<widget class=”GtkWindow“ id=”MainWindow“>
<property name=”visible“>True</property>
<property name=”title“ translatable=”yes“>MainWindow</property>
<property name=”type“>GTK_WINDOW_TOPLEVEL</property>
<property name=”window_position“>GTK_WIN_POS_NONE</property>
<property name=”modal“>False</property>
<property name=”resizable“>True</property>
<property name=”destroy_with_parent“>False</property>
<property name=”decorated“>True</property>
<property name=”skip_taskbar_hint“>False</property>
<property name=”skip_pager_hint“>False</property>
<property name=”type_hint“>GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name=”gravity“>GDK_GRAVITY_NORTH_WEST</property>
<property name=”focus_on_map“>True</property>
<property name=”urgency_hint“>False</property>
<signal name=”delete_event“ handler=”on_MainWindow_delete_event“ last_modification_time=”Fri, 16 Feb 2007 06:33:42 GMT“/>
<signal name=”destroy_event“ handler=”on_MainWindow_destroy_event“ last_modification_time=”Fri, 16 Feb 2007 06:33:52 GMT“/>

<child>
<widget class=”GtkTable“ id=”table1“>
<property name=”visible“>True</property>
<property name=”n_rows“>1</property>
<property name=”n_columns“>1</property>
<property name=”homogeneous“>False</property>
<property name=”row_spacing“>0</property>
<property name=”column_spacing“>0</property>

<child>
<widget class=”GtkScrolledWindow“ id=”scrolledwindow1“>
<property name=”visible“>True</property>
<property name=”can_focus“>True</property>
<property name=”hscrollbar_policy“>GTK_POLICY_AUTOMATIC</property>
<property name=”vscrollbar_policy“>GTK_POLICY_AUTOMATIC</property>
<property name=”shadow_type“>GTK_SHADOW_IN</property>
<property name=”window_placement“>GTK_CORNER_TOP_LEFT</property>

<child>
<widget class=”GtkCList“ id=”clist1“>
<property name=”visible“>True</property>
<property name=”can_focus“>True</property>
<property name=”has_focus“>True</property>
<property name=”n_columns“>4</property>
<property name=”column_widths“>80,80,80,80</property>
<property name=”selection_mode“>GTK_SELECTION_SINGLE</property>
<property name=”show_titles“>True</property>
<property name=”shadow_type“>GTK_SHADOW_IN</property>

<child>
<widget class=”GtkLabel“ id=”label5“>
<property name=”visible“>True</property>
<property name=”label“ translatable=”yes“>label5</property>
<property name=”use_underline“>False</property>
<property name=”use_markup“>False</property>
<property name=”justify“>GTK_JUSTIFY_LEFT</property>
<property name=”wrap“>False</property>
<property name=”selectable“>False</property>
<property name=”xalign“>0.5</property>
<property name=”yalign“>0.5</property>
<property name=”xpad“>0</property>
<property name=”ypad“>0</property>
<property name=”ellipsize“>PANGO_ELLIPSIZE_NONE</property>
<property name=”width_chars“>-1</property>
<property name=”single_line_mode“>False</property>
<property name=”angle“>0</property>
</widget>
</child>

<child>
<widget class=”GtkLabel“ id=”label6“>
<property name=”visible“>True</property>
<property name=”label“ translatable=”yes“>label6</property>
<property name=”use_underline“>False</property>
<property name=”use_markup“>False</property>
<property name=”justify“>GTK_JUSTIFY_LEFT</property>
<property name=”wrap“>False</property>
<property name=”selectable“>False</property>
<property name=”xalign“>0.5</property>
<property name=”yalign“>0.5</property>
<property name=”xpad“>0</property>
<property name=”ypad“>0</property>
<property name=”ellipsize“>PANGO_ELLIPSIZE_NONE</property>
<property name=”width_chars“>-1</property>
<property name=”single_line_mode“>False</property>
<property name=”angle“>0</property>
</widget>
</child>

<child>
<widget class=”GtkLabel“ id=”label7“>
<property name=”visible“>True</property>
<property name=”label“ translatable=”yes“>label7</property>
<property name=”use_underline“>False</property>
<property name=”use_markup“>False</property>
<property name=”justify“>GTK_JUSTIFY_LEFT</property>
<property name=”wrap“>False</property>
<property name=”selectable“>False</property>
<property name=”xalign“>0.5</property>
<property name=”yalign“>0.5</property>
<property name=”xpad“>0</property>
<property name=”ypad“>0</property>
<property name=”ellipsize“>PANGO_ELLIPSIZE_NONE</property>
<property name=”width_chars“>-1</property>
<property name=”single_line_mode“>False</property>
<property name=”angle“>0</property>
</widget>
</child>

<child>
<widget class=”GtkLabel“ id=”label8“>
<property name=”visible“>True</property>
<property name=”label“ translatable=”yes“>label8</property>
<property name=”use_underline“>False</property>
<property name=”use_markup“>False</property>
<property name=”justify“>GTK_JUSTIFY_LEFT</property>
<property name=”wrap“>False</property>
<property name=”selectable“>False</property>
<property name=”xalign“>0.5</property>
<property name=”yalign“>0.5</property>
<property name=”xpad“>0</property>
<property name=”ypad“>0</property>
<property name=”ellipsize“>PANGO_ELLIPSIZE_NONE</property>
<property name=”width_chars“>-1</property>
<property name=”single_line_mode“>False</property>
<property name=”angle“>0</property>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name=”left_attach“>0</property>
<property name=”right_attach“>1</property>
<property name=”top_attach“>0</property>
<property name=”bottom_attach">1</property>
</packing>
</child>
</widget>
</child>
</widget>

</glade-interface>
try:
	import pygtk
	pygtk.require("2.0")
except:
	pass
try:
	import gtk
	import gtk.glade
except:
	sys.exit(1)
class Foo:
    pass
class RootControler:
    gladefile = 'template/main_window_test.glade'
    window_name = 'MainWindow'
    dir_images = "static/images"
    def __init__(self):
        # Set the Glade file
        self.gladefile = self.gladefile
        self.wTree = gtk.glade.XML(self.gladefile)
        dic = {'on_MainWindow_delete_event':self.close_application}
        self.wTree.signal_autoconnect(dic)
        self.clist1 = self.wTree.get_widget('clist1')
        cl = self.clist1.append(['1','2','3','4'])
        cl = self.clist1.append(['5','6','7','8'])
   def close_application(self, widget, event, data=None):
        gtk.main_quit()
        return False

запускаю:
$ python Root.py
и получаю ошибки

(Root.py:4572): libglade-WARNING **: Unknown CList child property: visible

(Root.py:4572): libglade-WARNING **: Unknown CList child property: visible

(Root.py:4572): libglade-WARNING **: Unknown CList child property: visible

(Root.py:4572): libglade-WARNING **: Unknown CList child property: visible


но с окном можно работать(правда размер маленький), но ошибки не нравиться - как исправить?



Отредактировано (Фев. 16, 2007 10:46:12)

Офлайн

#2 Фев. 16, 2007 11:34:18

slav0nic
Команда
От: dp.ua
Зарегистрирован: 2006-05-07
Сообщения: 2260
Репутация: +  41  -
Профиль   Отправить e-mail  

ошибки для GTKClist

попробовать удалить строку <property name=“visible”>True</property>

Офлайн

Board footer

Модераторировать

Powered by DjangoBB

Lo-Fi Version