[meld] Remove 'Automatically supply newline' preference
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Remove 'Automatically supply newline' preference
- Date: Tue, 24 Aug 2010 09:50:57 +0000 (UTC)
commit 12e6e45009f2c3cec927e8616d69157311498397
Author: Kai Willadsen <kai willadsen gmail com>
Date: Tue May 4 16:58:04 2010 +1000
Remove 'Automatically supply newline' preference
data/ui/preferences.glade | 20 ++------------------
meld/filediff.py | 3 ---
meld/preferences.py | 4 ----
3 files changed, 2 insertions(+), 25 deletions(-)
---
diff --git a/data/ui/preferences.glade b/data/ui/preferences.glade
index 63e08f2..efebf55 100644
--- a/data/ui/preferences.glade
+++ b/data/ui/preferences.glade
@@ -251,22 +251,6 @@
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="checkbutton_supply_newline">
- <property name="label" translatable="yes">_Automatically supply missing newline at end of file</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_checkbutton_supply_newline_toggled"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
<widget class="GtkCheckButton" id="checkbutton_show_line_numbers">
<property name="label" translatable="yes">Show _line numbers</property>
<property name="visible">True</property>
@@ -279,7 +263,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
@@ -295,7 +279,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">6</property>
+ <property name="position">5</property>
</packing>
</child>
</widget>
diff --git a/meld/filediff.py b/meld/filediff.py
index 828c278..7fe99c4 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -788,9 +788,6 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
if hasattr(t.file, "newlines"):
self.bufferdata[t.pane].newlines = t.file.newlines
tasks.remove(t)
- if (self.prefs.supply_newline and t.text and not t.text[-1].endswith("\n")):
- t.buf.insert(t.buf.get_end_iter(), "\n")
- t.text.append("\n")
panetext[t.pane] = "".join(t.text)
yield 1
for b in self.textbuffer:
diff --git a/meld/preferences.py b/meld/preferences.py
index 3652b09..839cd93 100644
--- a/meld/preferences.py
+++ b/meld/preferences.py
@@ -150,7 +150,6 @@ class PreferencesDialog(gnomeglade.Component):
if self.prefs.edit_wrap_lines == gtk.WRAP_CHAR:
self.checkbutton_split_words.set_active(False)
self.checkbutton_wrap_text.set_active(True)
- self.checkbutton_supply_newline.set_active( self.prefs.supply_newline )
size_group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
size_group.add_widget(self.label1)
@@ -201,8 +200,6 @@ class PreferencesDialog(gnomeglade.Component):
else:
self.prefs.edit_wrap_lines = 1
- def on_checkbutton_supply_newline_toggled(self, check):
- self.prefs.supply_newline = check.get_active()
def on_checkbutton_show_line_numbers_toggled(self, check):
self.prefs.show_line_numbers = check.get_active()
def on_checkbutton_use_syntax_highlighting_toggled(self, check):
@@ -249,7 +246,6 @@ class MeldPreferences(prefs.Preferences):
"edit_wrap_lines" : prefs.Value(prefs.INT, 0),
"edit_command_type" : prefs.Value(prefs.STRING, "gnome"), #gnome, custom
"edit_command_custom" : prefs.Value(prefs.STRING, "gedit"),
- "supply_newline": prefs.Value(prefs.BOOL, False),
"text_codecs": prefs.Value(prefs.STRING, "utf8 latin1"),
"ignore_symlinks": prefs.Value(prefs.BOOL,0),
"vc_console_visible": prefs.Value(prefs.BOOL, 0),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]