aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-printer-state-notifier.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-09-08 15:25:57 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-09-08 15:25:57 +0200
commita2f16e793b27769a133acd4a06c6ce86533f06fb (patch)
tree4c931ae18b832d4c439aba9363ae8576d9b6cf97 /src/indicator-printer-state-notifier.c
parent5859961e3b61fa2ca7fa17ca34f6f60b3921fcaa (diff)
parent7922e0d8cf83d6be01af1777b33089732344b672 (diff)
downloadayatana-indicator-printers-a2f16e793b27769a133acd4a06c6ce86533f06fb.tar.gz
ayatana-indicator-printers-a2f16e793b27769a133acd4a06c6ce86533f06fb.tar.bz2
ayatana-indicator-printers-a2f16e793b27769a133acd4a06c6ce86533f06fb.zip
Merge branch 'tari01-pr/warnings-deprecations'
Attributes GH PR #7: https://github.com/AyatanaIndicators/ayatana-indicator-printers/pull/7
Diffstat (limited to 'src/indicator-printer-state-notifier.c')
-rw-r--r--src/indicator-printer-state-notifier.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/indicator-printer-state-notifier.c b/src/indicator-printer-state-notifier.c
index c83ba82..7a587a0 100644
--- a/src/indicator-printer-state-notifier.c
+++ b/src/indicator-printer-state-notifier.c
@@ -30,10 +30,6 @@
#define RESPONSE_SHOW_SYSTEM_SETTINGS 1
-
-G_DEFINE_TYPE (IndicatorPrinterStateNotifier, indicator_printer_state_notifier, G_TYPE_OBJECT)
-
-
struct _IndicatorPrinterStateNotifierPrivate
{
CupsNotifier *cups_notifier;
@@ -45,6 +41,7 @@ struct _IndicatorPrinterStateNotifierPrivate
GHashTable *printer_alerts;
};
+G_DEFINE_TYPE_WITH_PRIVATE(IndicatorPrinterStateNotifier, indicator_printer_state_notifier, G_TYPE_OBJECT)
enum {
PROP_0,
@@ -107,7 +104,7 @@ show_alert_box (const gchar *printer,
primary_text = g_strdup_printf (reason, printer);
secondary_text = g_strdup_printf (ngettext(
- "You have %d job queued to print on this printer.",
+ "You have %d job queued to print on this printer.",
"You have %d jobs queued to print on this printer.", njobs),
njobs);
@@ -127,10 +124,7 @@ show_alert_box (const gchar *printer,
g_free (primary_text);
g_free (secondary_text);
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- _("_Settingsā€¦"), RESPONSE_SHOW_SYSTEM_SETTINGS,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
+ gtk_dialog_add_buttons(GTK_DIALOG (dialog), _("_Settingsā€¦"), RESPONSE_SHOW_SYSTEM_SETTINGS, _("_OK"), GTK_RESPONSE_OK, NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog),
GTK_RESPONSE_OK);
gtk_widget_show_all (dialog);
@@ -260,8 +254,6 @@ indicator_printer_state_notifier_class_init (IndicatorPrinterStateNotifierClass
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (IndicatorPrinterStateNotifierPrivate));
-
object_class->get_property = get_property;
object_class->set_property = set_property;
object_class->dispose = dispose;
@@ -282,9 +274,7 @@ indicator_printer_state_notifier_init (IndicatorPrinterStateNotifier *self)
{
IndicatorPrinterStateNotifierPrivate *priv;
- priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- INDICATOR_TYPE_PRINTER_STATE_NOTIFIER,
- IndicatorPrinterStateNotifierPrivate);
+ priv = indicator_printer_state_notifier_get_instance_private(self);
self->priv = priv;
priv->notified_printer_states = g_hash_table_new_full (g_str_hash,