Пример #1
0
    def populate_files_table(self):
        """
        First clears and then populates the files table based on the items
        retrieved in self.load()

        """

        self.files_table.clear()
        n = 0
        for item in self.items:
            if item.path in self.changes:
                checked = self.changes[item.path]
            else:
                checked = self.should_item_be_activated(item)

            if not self.should_item_be_visible(item):
                continue

            n += 1
            self.files_table.append([
                checked,
                item.path,
                helper.get_file_extension(item.path),
                item.simple_content_status(),
                item.simple_metadata_status()
            ])
        self.get_widget("status").set_text(_("Found %d item(s)") % n)
Пример #2
0
 def populate_files_table(self):
     self.files_table.clear()
     for item in self.items:
         self.files_table.append([
             True,
             S(item.path), item.path,
             helper.get_file_extension(item.path)
         ])
Пример #3
0
 def populate_files_table(self):
     self.files_table.clear()
     for item in self.items:
         self.files_table.append([
             True,
             item.path,
             helper.get_file_extension(item.path)
         ])
Пример #4
0
 def populate_files_table(self):
     self.files_table.clear()
     self.items = self.action.get_result(0)
     for item in self.items:
         self.files_table.append([
             item.path,
             item.simple_content_status(),
             helper.get_file_extension(item.path)
         ])
Пример #5
0
 def populate_files_table(self):
     self.files_table.clear()
     for item in self.items:
         self.files_table.append([
             True, item.path,
             helper.get_file_extension(item.path),
             item.simple_content_status(),
             item.simple_metadata_status()
         ])
Пример #6
0
 def populate_files_table(self):
     self.files_table.clear()
     self.items = self.action.get_result(0)
     for item in self.items:
         self.files_table.append([
             item.path,
             item.simple_content_status(),
             helper.get_file_extension(item.path)
         ])
Пример #7
0
 def populate_files_table(self):
     self.files_table.clear()
     for item in self.items:
         self.files_table.append([
             True,
             item.path,
             helper.get_file_extension(item.path),
             item.simple_content_status(),
             item.simple_metadata_status()
         ])
Пример #8
0
def get_ignore_list_items(paths):
    """
    Build up a list of items to ignore based on the selected paths

    @param  paths: The selected paths
    @type   paths: list

    """
    ignore_items = []

    # Used to weed out duplicate menu items
    added_ignore_labels = []

    # These are ignore-by-filename items
    ignorebyfilename_index = 0
    for path in paths:
        basename = os.path.basename(path)
        if basename not in added_ignore_labels:
            key = "IgnoreByFileName%s" % str(ignorebyfilename_index)

            class MenuIgnoreFilenameClass(MenuItem):
                identifier = "RabbitVCS::%s" % key
                label = basename
                tooltip = _("Ignore item by filename")
                callback_name = "ignore_by_filename"
                callback_args = (path)
                condition_name = "ignore_by_filename"
                condition_args = (path)

            ignore_items.append((MenuIgnoreFilenameClass, None))

    # These are ignore-by-extension items
    ignorebyfileext_index = 0
    for path in paths:
        extension = helper.get_file_extension(path)

        ext_str = "*%s" % extension
        if ext_str not in added_ignore_labels:

            class MenuIgnoreFileExtClass(MenuItem):
                identifier = "RabbitVCS::%s" % key
                label = ext_str
                tooltip = _("Ignore item by file extension")
                callback_name = "ignore_by_file_extension"
                callback_args = (path, extension)
                condition_name = "ignore_by_file_extension"
                condition_args = (path, extension)

            ignore_items.append((MenuIgnoreFileExtClass, None))

    return ignore_items
Пример #9
0
    def populate_files_table(self):
        for item in self.items:

            locked = ""
            if self.svn.is_locked(item.path):
                locked = _("Yes")
            if not self.svn.is_versioned(item.path):
                continue

            self.files_table.append([
                True,
                S(item.path), item.path,
                helper.get_file_extension(item.path), locked
            ])
Пример #10
0
    def populate_files_table(self):
        for item in self.items:

            locked = ""
            if self.svn.is_locked(item.path):
                locked = _("Yes")
            if not self.svn.is_versioned(item.path):
                continue

            self.files_table.append([
                True,
                item.path,
                helper.get_file_extension(item.path),
                locked
            ])
Пример #11
0
    def populate_files_table(self):
        self.files_table.clear()
        self.items = self.action.get_result(0)
        for item in self.items:
            revision = -1
            author = ""

            if item.revision is not None:
                revision = item.revision
            if item.author is not None:
                author = item.author

            self.files_table.append([
                item.path,
                helper.get_file_extension(item.path), item.remote_content,
                item.remote_metadata,
                str(revision), author
            ])
Пример #12
0
    def populate_files_table(self):
        self.files_table.clear()
        self.items = self.action.get_result(0)
        for item in self.items:
            revision = -1
            author = ""

            if item.revision is not None:
                revision = item.revision
            if item.author is not None:
                author = item.author

            self.files_table.append([
                item.path,
                helper.get_file_extension(item.path),
                item.remote_content,
                item.remote_metadata,
                str(revision),
                author
            ])
Пример #13
0
    def populate_files_table(self):
        self.files_table.clear()

        found = 0
        for item in self.items:
            # FIXME: ...
            if item.simple_content_status() in (
                    rabbitvcs.vcs.status.status_unversioned,
                    rabbitvcs.vcs.status.status_ignored):
                continue

            if not self.svn.is_locked(item.path):
                continue

            self.files_table.append([
                True,
                S(item.path), item.path,
                helper.get_file_extension(item.path)
            ])
            found += 1

        self.get_widget("status").set_text(_("Found %d item(s)") % found)
Пример #14
0
    def populate_files_table(self):
        """
        First clears and then populates the files table based on the items
        retrieved in self.load()

        """

        self.files_table.clear()
        n = 0
        m = 0
        for item in self.items:
            if item.path in self.changes:
                checked = self.changes[item.path]
            else:
                checked = self.should_item_be_activated(item)
            checked = False

            if item.is_versioned():
                n += 1
            else:
                m += 1

            if not self.should_item_be_visible(item):
                continue

            self.files_table.append([
                checked,
                S(item.path), item.path,
                helper.get_file_extension(item.path),
                item.simple_content_status(),
                item.simple_metadata_status()
            ])
        self.get_widget("status").set_text(
            _("Found %(changed)d changed and %(unversioned)d unversioned item(s)"
              ) % {
                  "changed": n,
                  "unversioned": m
              })