~ubuntu-branches/ubuntu/utopic/indicator-printers/utopic

« back to all changes in this revision

Viewing changes to src/indicator-printer-state-notifier.c

  • Committer: Package Import Robot
  • Author(s): Lars Uebernickel
  • Date: 2012-02-16 21:19:35 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120216211935-3xrgag9lqadzp96j
Tags: 0.1.1-0ubuntu1
* New upstream release.
  - prepare for i18n
  - make sure CUPS' dbus notification is on while the service is running
  - fix build system to enable out-of-tree builds

* debian/control
  - bump libindicator dependency 0.3.91

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include "indicator-printer-state-notifier.h"
20
20
 
 
21
#include <glib/gi18n.h>
21
22
#include <gtk/gtk.h>
22
23
#include <cups/cups.h>
23
24
#include <string.h>
125
126
    primary_text = g_strdup_printf (reason, printer);
126
127
 
127
128
    if (njobs == 1)
128
 
        fmt = "You have %d job queued to print on this printer.";
 
129
        fmt = _("You have %d job queued to print on this printer.");
129
130
    else
130
 
        fmt = "You have %d jobs queued to print on this printer.";
 
131
        fmt = _("You have %d jobs queued to print on this printer.");
131
132
    secondary_text = g_strdup_printf (fmt, njobs);
132
133
 
133
134
    dialog = g_object_new (GTK_TYPE_MESSAGE_DIALOG,
134
 
                           "title", "Printing Problem",
 
135
                           "title", _("Printing Problem"),
135
136
                           "icon-name", "printer",
136
137
                           "image", image,
137
138
                           "text", primary_text,
147
148
    g_free (secondary_text);
148
149
 
149
150
    gtk_dialog_add_buttons (GTK_DIALOG (dialog),
150
 
                            "_Settings…", RESPONSE_SHOW_SYSTEM_SETTINGS,
 
151
                            _("_Settings…"), RESPONSE_SHOW_SYSTEM_SETTINGS,
151
152
                            GTK_STOCK_OK, GTK_RESPONSE_OK,
152
153
                            NULL);
153
154
    gtk_dialog_set_default_response (GTK_DIALOG (dialog),
313
314
 
314
315
    priv->printer_alerts = g_hash_table_new (g_str_hash, g_str_equal);
315
316
    g_hash_table_insert_many ( priv->printer_alerts,
316
 
                               "media-low", "The printer “%s” is low on paper.",
317
 
                               "media-empty", "The printer “%s” is out of paper.",
318
 
                               "toner-low", "The printer “%s” is low on toner.",
319
 
                               "toner-empty", "The printer “%s” is out of toner.",
320
 
                               "cover-open", "A cover is open on the printer “%s”.",
321
 
                               "door-open", "A door is open on the printer “%s”.",
322
 
                               "cups-missing-filter", "The printer “%s” can’t be used, because required software is missing.",
323
 
                               "offline", "The printer “%s” is currently off-line.",
 
317
                               "media-low", _("The printer “%s” is low on paper."),
 
318
                               "media-empty", _("The printer “%s” is out of paper."),
 
319
                               "toner-low", _("The printer “%s” is low on toner."),
 
320
                               "toner-empty", _("The printer “%s” is out of toner."),
 
321
                               "cover-open", _("A cover is open on the printer “%s”."),
 
322
                               "door-open", _("A door is open on the printer “%s”."),
 
323
                               "cups-missing-filter", _("The printer “%s” can’t be used, because required software is missing."),
 
324
                               "offline", _("The printer “%s” is currently off-line."),
324
325
                               NULL);
325
326
}
326
327