meld r1282 - in trunk: . glade2
- From: stevek svn gnome org
- To: svn-commits-list gnome org
- Subject: meld r1282 - in trunk: . glade2
- Date: Sat, 21 Mar 2009 15:59:15 +0000 (UTC)
Author: stevek
Date: Sat Mar 21 15:59:15 2009
New Revision: 1282
URL: http://svn.gnome.org/viewvc/meld?rev=1282&view=rev
Log:
Limit entry width. Rework search & replace buttons.
Findbar close button fixed.
Modified:
trunk/findbar.py
trunk/glade2/findbar.glade
Modified: trunk/findbar.py
==============================================================================
--- trunk/findbar.py (original)
+++ trunk/findbar.py Sat Mar 21 15:59:15 2009
@@ -37,15 +37,13 @@
self.replace_label.hide()
self.replace_entry.hide()
self.replace_button.hide()
- self.replace_all_button.hide()
- self.replace_filler.hide()
self.widget.show()
self.find_entry.grab_focus()
def start_find_next(self, textview):
self.textview = textview
if self.find_entry.get_text():
- self.find_button.activate()
+ self.find_next_button.activate()
else:
self.start_find(self.textview)
@@ -54,16 +52,19 @@
self.widget.show_all()
self.find_entry.grab_focus()
+ def on_findbar_close__clicked(self, button):
+ self.hide()
+
def on_find_entry__activate(self, entry):
- self.find_button.activate()
+ self.find_next_button.activate()
def on_replace_entry__activate(self, entry):
self.replace_button.activate()
- def on_find_button__activate(self, button):
+ def on_find_next_button__clicked(self, button):
self._find_text()
- def on_replace_button__activate(self, entry):
+ def on_replace_button__clicked(self, entry):
buf = self.textview.get_buffer()
oldpos = buf.props.cursor_position
self._find_text(0)
Modified: trunk/glade2/findbar.glade
==============================================================================
--- trunk/glade2/findbar.glade (original)
+++ trunk/glade2/findbar.glade Sat Mar 21 15:59:15 2009
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Sun Mar 15 19:50:53 2009 -->
+<!--Generated with glade3 3.4.5 on Sat Mar 21 15:56:10 2009 -->
<glade-interface>
<widget class="GtkWindow" id="window1">
<child>
@@ -11,61 +11,40 @@
<placeholder/>
</child>
<child>
- <widget class="GtkLabel" id="replace_filler">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">5</property>
- <property name="right_attach">6</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="replace_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="label" translatable="yes">_Replace</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
+ <placeholder/>
</child>
<child>
- <widget class="GtkButton" id="find_button">
+ <widget class="GtkHButtonBox" id="hbuttonbox2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="label" translatable="yes">Find</property>
- <property name="response_id">0</property>
+ <property name="layout_style">GTK_BUTTONBOX_START</property>
+ <child>
+ <widget class="GtkButton" id="replace_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="label" translatable="yes">_Replace</property>
+ <property name="use_underline">True</property>
+ <property name="focus_on_click">False</property>
+ <property name="response_id">0</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkButton" id="replace_all_button">
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">Replace _All</property>
+ <property name="use_underline">True</property>
+ <property name="focus_on_click">False</property>
+ <property name="response_id">0</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="replace_all_button">
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Replace _All</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- </widget>
- <packing>
- <property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
@@ -74,85 +53,71 @@
</packing>
</child>
<child>
- <widget class="GtkHBox" id="find_options">
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
<property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_START</property>
<child>
- <widget class="GtkCheckButton" id="match_case">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Match Case</property>
- <property name="use_underline">True</property>
- <property name="focus_on_click">False</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="whole_word">
- <property name="visible">True</property>
+ <widget class="GtkButton" id="find_previous_button">
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Who_le word</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">_Previous</property>
<property name="use_underline">True</property>
- <property name="focus_on_click">False</property>
<property name="response_id">0</property>
- <property name="draw_indicator">True</property>
</widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
</child>
<child>
- <widget class="GtkCheckButton" id="regex">
+ <widget class="GtkButton" id="find_next_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Regular E_xpression</property>
+ <property name="receives_default">True</property>
+ <property name="label" translatable="yes">_Next</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
<property name="response_id">0</property>
- <property name="draw_indicator">True</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
<packing>
- <property name="left_attach">4</property>
- <property name="right_attach">6</property>
+ <property name="left_attach">3</property>
+ <property name="right_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
- <property name="x_padding">7</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="replace_entry">
+ <widget class="GtkButton" id="findbar_close">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="focus_on_click">False</property>
+ <property name="response_id">0</property>
+ <child>
+ <widget class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="stock">gtk-cancel</property>
+ <property name="icon_size">1</property>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="replace_label">
+ <widget class="GtkLabel" id="find_label">
<property name="visible">True</property>
- <property name="label" translatable="yes">Replace _With</property>
+ <property name="label" translatable="yes">_Search for</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">replace_entry</property>
+ <property name="mnemonic_widget">find_entry</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
<property name="x_padding">3</property>
@@ -162,46 +127,100 @@
<widget class="GtkEntry" id="find_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="width_chars">32</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="find_label">
+ <widget class="GtkLabel" id="replace_label">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Search for</property>
+ <property name="label" translatable="yes">Replace _With</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">find_entry</property>
+ <property name="mnemonic_widget">replace_entry</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
<property name="x_padding">3</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="findbar_close">
+ <widget class="GtkEntry" id="replace_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="focus_on_click">False</property>
- <property name="response_id">0</property>
+ <property name="width_chars">32</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="find_options">
+ <property name="visible">True</property>
<child>
- <widget class="GtkImage" id="image2">
+ <widget class="GtkCheckButton" id="match_case">
<property name="visible">True</property>
- <property name="stock">gtk-cancel</property>
- <property name="icon_size">1</property>
+ <property name="label" translatable="yes">_Match Case</property>
+ <property name="use_underline">True</property>
+ <property name="focus_on_click">False</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="whole_word">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Who_le word</property>
+ <property name="use_underline">True</property>
+ <property name="focus_on_click">False</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
</widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="regex">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Regular E_xpression</property>
+ <property name="use_underline">True</property>
+ <property name="focus_on_click">False</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
</child>
</widget>
<packing>
+ <property name="left_attach">5</property>
+ <property name="right_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
+ <property name="x_padding">7</property>
</packing>
</child>
</widget>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]