resizing for xml input now works as expected

This commit is contained in:
Nikos Kouremenos 2005-07-04 23:18:05 +00:00
parent 56fefe30f8
commit 5e8000419a
2 changed files with 59 additions and 72 deletions

View File

@ -862,8 +862,6 @@ class XMLConsoleWindow:
self.stanzas_log_textview = self.xml.get_widget('stanzas_log_textview')
self.input_tv_buffer = self.input_textview.get_buffer()
print self.xml.get_widget('expander').set_resize_mode(gtk.RESIZE_IMMEDIATE)
self.input_textview.modify_base(
gtk.STATE_NORMAL, gtk.gdk.color_parse('black'))
self.input_textview.modify_text(
@ -875,15 +873,12 @@ class XMLConsoleWindow:
gtk.STATE_NORMAL, gtk.gdk.color_parse('green'))
if len(gajim.connections) > 1:
title = _('XML Console for %s')\
% gajim.config.get_per('accounts', self.account, 'name')
title = _('XML Console for %s') % self.account
else:
title = _('XML Console')
self.window.set_title(title)
self.input_textview.grab_focus()
self.xml.signal_autoconnect(self)
self.window.show_all()
@ -908,9 +903,11 @@ class XMLConsoleWindow:
self.input_tv_buffer.set_text(
'<message to="" type=""><body></body></message>'
)
def on_expander_size_request(self, widget, req):
pass
def on_expander_activate(self, widget):
if not widget.get_expanded(): # it's the opposite!
# it's expanded!!
self.input_textview.grab_focus()
def on_xml_console_window_destroy(self, widget):
# remove us from open windows

View File

@ -16304,77 +16304,65 @@ Maybe I'll refactor later</property>
<signal name="destroy" handler="on_xml_console_window_destroy" last_modification_time="Mon, 04 Jul 2005 20:12:04 GMT"/>
<child>
<widget class="GtkVPaned" id="vpaned4">
<widget class="GtkVBox" id="vbox">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position">390</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkVBox" id="traffic_vbox">
<widget class="GtkLabel" id="label342">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<property name="label" translatable="yes">&lt;b&gt;Jabber Traffic&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow43">
<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="GtkLabel" id="label342">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Jabber Traffic&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow43">
<widget class="GtkTextView" id="stanzas_log_textview">
<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="GtkTextView" id="stanzas_log_textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="overwrite">False</property>
<property name="accepts_tab">True</property>
<property name="justification">GTK_JUSTIFY_LEFT</property>
<property name="wrap_mode">GTK_WRAP_CHAR</property>
<property name="cursor_visible">True</property>
<property name="pixels_above_lines">0</property>
<property name="pixels_below_lines">0</property>
<property name="pixels_inside_wrap">0</property>
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
<property name="text" translatable="yes"></property>
</widget>
</child>
<property name="editable">False</property>
<property name="overwrite">False</property>
<property name="accepts_tab">True</property>
<property name="justification">GTK_JUSTIFY_LEFT</property>
<property name="wrap_mode">GTK_WRAP_CHAR</property>
<property name="cursor_visible">True</property>
<property name="pixels_above_lines">0</property>
<property name="pixels_below_lines">0</property>
<property name="pixels_inside_wrap">0</property>
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
<property name="text" translatable="yes"></property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="shrink">True</property>
<property name="resize">True</property>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
@ -16384,10 +16372,10 @@ Maybe I'll refactor later</property>
<property name="can_focus">True</property>
<property name="expanded">False</property>
<property name="spacing">6</property>
<signal name="size_request" handler="on_expander_size_request" last_modification_time="Mon, 04 Jul 2005 21:12:26 GMT"/>
<signal name="activate" handler="on_expander_activate" last_modification_time="Mon, 04 Jul 2005 22:24:33 GMT"/>
<child>
<widget class="GtkVBox" id="vbox104">
<widget class="GtkVBox" id="input_vbox">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
@ -16437,6 +16425,7 @@ Maybe I'll refactor later</property>
<child>
<widget class="GtkButton" id="iq_button">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Info/Query</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_IQ</property>
<property name="use_underline">True</property>
@ -16570,8 +16559,9 @@ Maybe I'll refactor later</property>
</child>
</widget>
<packing>
<property name="shrink">True</property>
<property name="resize">True</property>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</widget>