3441: Need to connect on_result_delete_event on glade dialogs - part 2

svn: r14641
This commit is contained in:
Benny Malengier 2010-03-05 22:52:12 +00:00
parent 4df36b23d3
commit c6f071e43b
3 changed files with 25 additions and 3 deletions

View File

@ -88,12 +88,13 @@ class StyleListDisplay(object):
_('Document Styles') )
self.top.connect_signals({
"destroy_passed_object" : self.__close,
"destroy_passed_object" : self.__close,
"on_ok_clicked" : self.on_ok_clicked,
"on_add_clicked" : self.on_add_clicked,
"on_delete_clicked" : self.on_delete_clicked,
"on_button_press" : self.on_button_press,
"on_edit_clicked" : self.on_edit_clicked
"on_edit_clicked" : self.on_edit_clicked,
"on_save_style_clicked" : dummy_callback,
})
title_label = self.top.get_object('title')
@ -198,7 +199,12 @@ class StyleEditor(object):
self.top.connect_signals({
"on_save_style_clicked" : self.on_save_style_clicked,
"destroy_passed_object" : self.__close,
"destroy_passed_object" : self.__close,
"on_ok_clicked" : dummy_callback,
"on_add_clicked" : dummy_callback,
"on_delete_clicked" : dummy_callback,
"on_button_press" : dummy_callback,
"on_edit_clicked" : dummy_callback,
})
self.pname = self.top.get_object('pname')
@ -363,3 +369,10 @@ class StyleEditor(object):
self.current_name = store.get_value(node, 0)
self.current_p = objs[0]
self.draw()
def dummy_callback(obj):
"""Dummy callback to satisfy gtkbuilder on connect of signals.
There are two widgets in the glade file, although only one is needed,
the signals of the other must be connected too
"""
pass

View File

@ -10,10 +10,12 @@
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">8</property>
<child>
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="place_title">
<property name="visible">True</property>
@ -242,10 +244,12 @@
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox3">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">8</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="merge_title">
<property name="visible">True</property>
@ -447,6 +451,7 @@
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox4">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTable" id="table8">
<property name="visible">True</property>
@ -956,11 +961,13 @@
<child internal-child="vbox">
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">8</property>
<child>
<object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="people_title">

View File

@ -12,10 +12,12 @@
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="title">