~timo-jyrinki/ubuntu/trusty/pitivi/backport_utopic_fixes

« back to all changes in this revision

Viewing changes to pitivi/ui/filelisterrordialog.py

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-05-26 15:29:58 UTC
  • mfrom: (3.1.20 experimental)
  • Revision ID: james.westby@ubuntu.com-20110526152958-90je1myzzjly26vw
Tags: 0.13.9.90-1ubuntu1
* Resynchronize on Debian
* debian/control:
  - Depend on python-launchpad-integration
  - Drop hal from Recommends to Suggests. This version has the patch applied
    to not crash without hal.
* debian/patches/01_lpi.patch:
  - launchpad integration  
* debian/rules:
  - Use gnome.mk so a translation template is built

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from gettext import gettext as _
30
30
 
31
31
from pitivi.ui.glade import GladeWindow
 
32
from urllib import unquote
32
33
from pitivi.signalinterface import Signallable
33
34
from pitivi.log.loggable import Loggable
34
35
 
47
48
        self.widgets["headline"].set_text(headline)
48
49
        self.window.set_title(title)
49
50
        self.errorvbox = self.widgets["errorvbox"]
50
 
        self.window.set_geometry_hints(min_width=400, min_height=200)
51
51
 
52
52
    def addFailedFile(self, uri, reason=_("Unknown reason"), extra=None):
53
53
        """Add the given uri to the list of failed files. You can optionnaly
56
56
        """
57
57
        self.debug("Uri:%s, reason:%s, extra:%s", uri, reason, extra)
58
58
        exp = self._createFileExpander(uri, reason, extra)
59
 
        self.errorvbox.pack_start(exp)
 
59
        self.errorvbox.pack_start(exp, expand=False, fill=False)
 
60
        if len(self.errorvbox.get_children()) < 3:
 
61
            exp.set_expanded(True)  # Let's save the user some clicks
60
62
        exp.show_all()
61
63
        #self.storemodel.append([str(uri), str(reason)])
62
64
 
65
67
            if uri.startswith("file://"):
66
68
                uri = uri[7:]
67
69
            uri = uri.split('/')[-1]
 
70
            uri = unquote(uri)
68
71
            exp = gtk.Expander(uri)
69
72
        else:
70
73
            exp = gtk.Expander(reason)
76
79
        boldtag.props.weight = pango.WEIGHT_BOLD
77
80
        table.add(boldtag)
78
81
 
79
 
        if uri:
80
 
            # <b>URI :</b> % uri
81
 
            end = textbuffer.get_end_iter()
82
 
            textbuffer.insert_with_tags(end, _("URI:"), boldtag)
83
 
            end = textbuffer.get_end_iter()
84
 
            textbuffer.insert(end, "%s\n" % uri)
85
 
 
86
82
        end = textbuffer.get_end_iter()
87
 
        textbuffer.insert_with_tags(end, _("Problem:"), boldtag)
 
83
        textbuffer.insert_with_tags(end, _("Problem:") + " ", boldtag)
88
84
 
89
85
        end = textbuffer.get_end_iter()
90
86
        textbuffer.insert(end, "%s\n" % reason)
91
87
 
92
88
        if extra:
93
89
            end = textbuffer.get_end_iter()
94
 
            textbuffer.insert_with_tags(end, _("Extra information:"), boldtag)
 
90
            textbuffer.insert_with_tags(end, _("Extra information:") + " ", boldtag)
95
91
 
96
92
            end = textbuffer.get_end_iter()
97
93
            textbuffer.insert(end, "%s\n" % extra)