Skip to content

Commit baa1646

Browse files
committed
Merge branch 'Gio'
2 parents 17c1d0d + 41e753d commit baa1646

15 files changed

Lines changed: 418 additions & 403 deletions

data/org.gnome.meld.gschema.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353

5454
<!-- File loading settings -->
5555
<key name="detect-encodings" type="as">
56-
<default>["utf8"]</default>
57-
<summary>Automatically detected text encodings</summary>
58-
<description>These text encodings will be automatically used (in order) to try to decode loaded text files.</description>
56+
<default>[]</default>
57+
<summary>Additional automatically detected text encodings</summary>
58+
<description>Meld will use these text encodings to try to decode loaded text files before trying any other encodings. In addition to the encodings in this list, UTF-8 and the current locale-default encoding will always be used; other encodings may also be tried, depending on the user's locale.</description>
5959
</key>
6060

6161

data/ui/filediff.ui

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,17 +326,16 @@
326326
<property name="can_focus">False</property>
327327
<property name="receives_default">False</property>
328328
<property name="tooltip_text" translatable="yes">This file can not be written to. You may click here to unlock this file and make changes anyway, but these changes must be saved to a new file.</property>
329-
<property name="icon_name">emblem-readonly</property>
329+
<property name="icon_name">changes-prevent-symbolic</property>
330330
<signal name="toggled" handler="on_readonly_button_toggled" swapped="no"/>
331331
</object>
332332
</child>
333333
<child>
334334
<object class="GtkToolButton" id="file_save_button2">
335-
<property name="stock-id">gtk-save</property>
335+
<property name="icon-name">document-save</property>
336336
<property name="visible">True</property>
337337
<property name="can_focus">True</property>
338338
<property name="receives_default">False</property>
339-
<property name="use_underline">True</property>
340339
<signal name="clicked" handler="on_file_save_button_clicked" swapped="no"/>
341340
</object>
342341
</child>
@@ -403,11 +402,10 @@
403402
</child>
404403
<child>
405404
<object class="GtkToolButton" id="file_save_button1">
406-
<property name="stock-id">gtk-save</property>
405+
<property name="icon-name">document-save-symbolic</property>
407406
<property name="visible">True</property>
408407
<property name="can_focus">True</property>
409408
<property name="receives_default">False</property>
410-
<property name="use_underline">True</property>
411409
<signal name="clicked" handler="on_file_save_button_clicked" swapped="no"/>
412410
</object>
413411
</child>
@@ -474,11 +472,10 @@
474472
</child>
475473
<child>
476474
<object class="GtkToolButton" id="file_save_button0">
477-
<property name="stock-id">gtk-save</property>
475+
<property name="icon-name">document-save-symbolic</property>
478476
<property name="visible">True</property>
479477
<property name="can_focus">True</property>
480478
<property name="receives_default">False</property>
481-
<property name="use_underline">True</property>
482479
<signal name="clicked" handler="on_file_save_button_clicked" swapped="no"/>
483480
</object>
484481
</child>

meld/const.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
from gi.repository import GtkSource
3+
24
from meld.conf import _
35

46
# Chunk action mode, set by filediff and used in gutterrendererchunk
@@ -7,7 +9,7 @@
79
MODE_INSERT = 2
810

911
NEWLINES = {
10-
'\n': _("UNIX (LF)"),
11-
'\r\n': _("DOS/Windows (CR-LF)"),
12-
'\r': _("Mac OS (CR)"),
12+
GtkSource.NewlineType.LF: ('\n', _("UNIX (LF)")),
13+
GtkSource.NewlineType.CR_LF: ('\r\n', _("DOS/Windows (CR-LF)")),
14+
GtkSource.NewlineType.CR: ('\r', _("Mac OS (CR)")),
1315
}

meld/dirdiff.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ def _show_identical_status(self):
852852

853853
for pane in range(self.num_panes):
854854
msgarea = self.msgarea_mgr[pane].new_from_text_and_icon(
855-
Gtk.STOCK_INFO, primary, secondary)
855+
'dialog-information-symbolic', primary, secondary)
856856
button = msgarea.add_button(_("Hide"), Gtk.ResponseType.CLOSE)
857857
if pane == 0:
858858
button.props.label = _("Hi_de")
@@ -902,17 +902,8 @@ def _show_tree_wide_errors(self, invalid_filenames, shadowed_entries):
902902
else:
903903
continue
904904
secondary = "\n".join(messages)
905-
self.add_dismissable_msg(pane, Gtk.STOCK_DIALOG_ERROR, header,
906-
secondary)
907-
908-
def add_dismissable_msg(self, pane, icon, primary, secondary):
909-
msgarea = self.msgarea_mgr[pane].new_from_text_and_icon(
910-
icon, primary, secondary)
911-
msgarea.add_button(_("Hi_de"), Gtk.ResponseType.CLOSE)
912-
msgarea.connect("response",
913-
lambda *args: self.msgarea_mgr[pane].clear())
914-
msgarea.show_all()
915-
return msgarea
905+
self.msgarea_mgr[pane].add_dismissable_msg(
906+
'dialog-error-symbolic', header, secondary)
916907

917908
def copy_selected(self, direction):
918909
assert direction in (-1, 1)
@@ -1571,7 +1562,7 @@ def next_diff(self, direction):
15711562
def on_refresh_activate(self, *extra):
15721563
self.on_fileentry_file_set(None)
15731564

1574-
def on_delete_event(self, appquit=0):
1565+
def on_delete_event(self):
15751566
for h in self.settings_handlers:
15761567
meldsettings.disconnect(h)
15771568
self.emit('close', 0)

0 commit comments

Comments
 (0)