~ubuntu-branches/ubuntu/raring/software-center/raring-proposed

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/dialogs/dependency_dialogs.py

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2012-10-11 15:33:05 UTC
  • mfrom: (195.1.18 quantal)
  • Revision ID: package-import@ubuntu.com-20121011153305-fm5ln7if3rpzts4n
Tags: 5.4.1.1
* lp:~mvo/software-center/reinstall-previous-purchase-token-fix:
  - fix reinstall previous purchases that have a system-wide
    license key LP: #1065481
* lp:~mvo/software-center/lp1060106:
  - Add missing gettext init for utils/update-software-center-agent
    (LP: #1060106)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from gettext import gettext as _
23
23
 
 
24
import softwarecenter.paths
24
25
from softwarecenter.ui.gtk3.dialogs import SimpleGtkbuilderDialog
25
26
 
26
27
from softwarecenter.distro import get_distro
36
37
_DIALOG = None
37
38
 
38
39
 
39
 
def confirm_install(parent, datadir, app, db, icons):
 
40
def confirm_install(parent, app, db, icons):
40
41
    """Confirm install of the given app
41
42
 
42
43
       (currently only shows a dialog if a installed app needs to be removed
53
54
        return True
54
55
    (primary, button_text) = distro.get_install_warning_text(cache,
55
56
        appdetails.pkg, app.name, depends)
56
 
    return _confirm_internal(parent, datadir, app, db, icons, primary,
 
57
    return _confirm_internal(parent, app, db, icons, primary,
57
58
        button_text, depends, cache)
58
59
 
59
60
 
60
 
def confirm_remove(parent, datadir, app, db, icons):
 
61
def confirm_remove(parent, app, db, icons):
61
62
    """ Confirm removing of the given app """
62
63
    cache = db._aptcache
63
64
    distro = get_distro()
73
74
        return True
74
75
    (primary, button_text) = distro.get_removal_warning_text(
75
76
        db._aptcache, appdetails.pkg, app.name, depends)
76
 
    return _confirm_internal(parent, datadir, app, db, icons, primary,
 
77
    return _confirm_internal(parent, app, db, icons, primary,
77
78
        button_text, depends, cache)
78
79
 
79
80
 
80
 
def _get_confirm_internal_dialog(parent, datadir, app, db, icons, primary,
 
81
def _get_confirm_internal_dialog(parent, app, db, icons, primary,
81
82
    button_text, depends, cache):
82
 
    glade_dialog = SimpleGtkbuilderDialog(datadir, domain="software-center")
 
83
    glade_dialog = SimpleGtkbuilderDialog(
 
84
        softwarecenter.paths.datadir, domain="software-center")
83
85
    dialog = glade_dialog.dialog_dependency_alert
84
86
    dialog.set_resizable(True)
85
87
    dialog.set_transient_for(parent)