Commit dec56755 authored by Kai Willadsen's avatar Kai Willadsen

Replace deprecated GObject.property with GObject.Property

parent 0c06996d
......@@ -257,7 +257,7 @@ class DirDiff(MeldDoc, Component):
('ignore-blank-lines', 'ignore-blank-lines'),
)
apply_text_filters = GObject.property(
apply_text_filters = GObject.Property(
type=bool,
nick="Apply text filters",
blurb=(
......@@ -265,30 +265,30 @@ class DirDiff(MeldDoc, Component):
"should be applied when comparing file contents"),
default=False,
)
ignore_blank_lines = GObject.property(
ignore_blank_lines = GObject.Property(
type=bool,
nick="Ignore blank lines",
blurb="Whether to ignore blank lines when comparing file contents",
default=False,
)
ignore_symlinks = GObject.property(
ignore_symlinks = GObject.Property(
type=bool,
nick="Ignore symbolic links",
blurb="Whether to follow symbolic links when comparing folders",
default=False,
)
shallow_comparison = GObject.property(
shallow_comparison = GObject.Property(
type=bool,
nick="Use shallow comparison",
blurb="Whether to compare files based solely on size and mtime",
default=False,
)
status_filters = GObject.property(
status_filters = GObject.Property(
type=GObject.TYPE_STRV,
nick="File status filters",
blurb="Files with these statuses will be shown by the comparison.",
)
time_resolution = GObject.property(
time_resolution = GObject.Property(
type=int,
nick="Time resolution",
blurb="When comparing based on mtime, the minimum difference in "
......
......@@ -98,7 +98,7 @@ class FileDiff(MeldDoc, Component):
('ignore-blank-lines', 'ignore-blank-lines'),
)
ignore_blank_lines = GObject.property(
ignore_blank_lines = GObject.Property(
type=bool,
nick="Ignore blank lines",
blurb="Whether to ignore blank lines when comparing file contents",
......
......@@ -91,7 +91,7 @@ class MeldBufferData(GObject.GObject):
str('file-changed'): (GObject.SignalFlags.RUN_FIRST, None, ()),
}
encoding = GObject.property(
encoding = GObject.Property(
type=GtkSource.Encoding,
nick="The file encoding of the linked GtkSourceFile",
default=None,
......
......@@ -159,24 +159,24 @@ class GSettingsIntComboBox(GSettingsComboBox):
__gtype_name__ = "GSettingsIntComboBox"
gsettings_column = GObject.property(type=int, default=0)
gsettings_value = GObject.property(type=int)
gsettings_column = GObject.Property(type=int, default=0)
gsettings_value = GObject.Property(type=int)
class GSettingsBoolComboBox(GSettingsComboBox):
__gtype_name__ = "GSettingsBoolComboBox"
gsettings_column = GObject.property(type=int, default=0)
gsettings_value = GObject.property(type=bool, default=False)
gsettings_column = GObject.Property(type=int, default=0)
gsettings_value = GObject.Property(type=bool, default=False)
class GSettingsStringComboBox(GSettingsComboBox):
__gtype_name__ = "GSettingsStringComboBox"
gsettings_column = GObject.property(type=int, default=0)
gsettings_value = GObject.property(type=str, default="")
gsettings_column = GObject.Property(type=int, default=0)
gsettings_value = GObject.Property(type=str, default="")
class PreferencesDialog(Component):
......
......@@ -104,7 +104,7 @@ class MeldSourceView(GtkSource.View):
)
# Named so as not to conflict with the GtkSourceView property
highlight_current_line_local = GObject.property(type=bool, default=False)
highlight_current_line_local = GObject.Property(type=bool, default=False)
def get_show_line_numbers(self):
return self._show_line_numbers
......@@ -119,7 +119,7 @@ class MeldSourceView(GtkSource.View):
self._show_line_numbers = bool(show)
self.notify("show-line-numbers")
show_line_numbers = GObject.property(
show_line_numbers = GObject.Property(
type=bool, default=False, getter=get_show_line_numbers,
setter=set_show_line_numbers)
......
......@@ -39,7 +39,7 @@ class CellRendererDate(Gtk.CellRendererText):
self.props.markup = time_str
self._datetime = value
timestamp = GObject.property(
timestamp = GObject.Property(
type=object,
nick="Unix timestamp to display",
getter=get_timestamp,
......@@ -73,7 +73,7 @@ class CellRendererByteSize(Gtk.CellRendererText):
self.props.markup = byte_str
self._bytesize = value
bytesize = GObject.property(
bytesize = GObject.Property(
type=object,
nick="Byte size to display",
getter=get_bytesize,
......@@ -103,7 +103,7 @@ class CellRendererFileMode(Gtk.CellRendererText):
self.props.markup = mode_str
self._file_mode = value
file_mode = GObject.property(
file_mode = GObject.Property(
type=object,
nick="Byte size to display",
getter=get_file_mode,
......
......@@ -56,7 +56,7 @@ def _clamp_list_store(liststore, max_items):
class HistoryCombo(Gtk.ComboBox):
__gtype_name__ = "HistoryCombo"
history_id = GObject.property(
history_id = GObject.Property(
type=str,
nick="History ID",
blurb="Identifier associated with entry's history store",
......@@ -64,7 +64,7 @@ class HistoryCombo(Gtk.ComboBox):
flags=GObject.PARAM_READWRITE,
)
history_length = GObject.property(
history_length = GObject.Property(
type=int,
nick="History length",
blurb="Number of history items to display in the combo",
......
......@@ -60,7 +60,7 @@ class MeldStatusMenuButton(Gtk.MenuButton):
return
self._label.set_markup(markup)
label = GObject.property(
label = GObject.Property(
type=str,
nick="The GtkSourceLanguage displayed in the status bar",
default=None,
......@@ -111,19 +111,19 @@ class MeldStatusBar(Gtk.Statusbar):
GObject.SignalFlags.RUN_FIRST, None, (GtkSource.Encoding,)),
}
cursor_position = GObject.property(
cursor_position = GObject.Property(
type=object,
nick="The position of the cursor displayed in the status bar",
default=None,
)
source_encoding = GObject.property(
source_encoding = GObject.Property(
type=GtkSource.Encoding,
nick="The file encoding displayed in the status bar",
default=None,
)
source_language = GObject.property(
source_language = GObject.Property(
type=GtkSource.Language,
nick="The GtkSourceLanguage displayed in the status bar",
default=None,
......
......@@ -31,7 +31,7 @@ class CommitDialog(GObject.GObject, Component):
__gtype_name__ = "CommitDialog"
break_commit_message = GObject.property(type=bool, default=False)
break_commit_message = GObject.Property(type=bool, default=False)
def __init__(self, parent):
GObject.GObject.__init__(self)
......
......@@ -131,13 +131,13 @@ class VcView(MeldDoc, Component):
('vc-merge-file-order', 'merge-file-order'),
)
status_filters = GObject.property(
status_filters = GObject.Property(
type=GObject.TYPE_STRV,
nick="File status filters",
blurb="Files with these statuses will be shown by the comparison.",
)
left_is_local = GObject.property(type=bool, default=False)
merge_file_order = GObject.property(type=str, default="local-merge-remote")
left_is_local = GObject.Property(type=bool, default=False)
merge_file_order = GObject.Property(type=str, default="local-merge-remote")
# Map for inter-tab command() calls
command_map = {
......
......@@ -27,13 +27,13 @@ class SavedWindowState(GObject.GObject):
__gtype_name__ = 'SavedWindowState'
width = GObject.property(
width = GObject.Property(
type=int, nick='Current window width', default=-1)
height = GObject.property(
height = GObject.Property(
type=int, nick='Current window height', default=-1)
is_maximized = GObject.property(
is_maximized = GObject.Property(
type=bool, nick='Is window maximized', default=False)
is_fullscreen = GObject.property(
is_fullscreen = GObject.Property(
type=bool, nick='Is window fullscreen', default=False)
def bind(self, window):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment