aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-printer-state-notifier.c
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2020-09-06 00:33:33 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-09-08 15:24:47 +0200
commit7922e0d8cf83d6be01af1777b33089732344b672 (patch)
tree4c931ae18b832d4c439aba9363ae8576d9b6cf97 /src/indicator-printer-state-notifier.c
parent9b28b85284abd8de9dabb8adb9cd74eda065bc79 (diff)
downloadayatana-indicator-printers-7922e0d8cf83d6be01af1777b33089732344b672.tar.gz
ayatana-indicator-printers-7922e0d8cf83d6be01af1777b33089732344b672.tar.bz2
ayatana-indicator-printers-7922e0d8cf83d6be01af1777b33089732344b672.zip
Fix deprecations and build warnings
Fixes AyatanaIndicators/ayatana-indicator-printers#3.
Diffstat (limited to 'src/indicator-printer-state-notifier.c')
-rw-r--r--src/indicator-printer-state-notifier.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/indicator-printer-state-notifier.c b/src/indicator-printer-state-notifier.c
index a9b3a9a..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,
@@ -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,