[gnome-control-center] printers: Don't initialize classes members to NULL/0/FALSE
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Don't initialize classes members to NULL/0/FALSE
- Date: Thu, 2 Jul 2020 16:25:23 +0000 (UTC)
commit 287aee437132e76422bb8bdf7aa5e7e52992bf77
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Jun 26 15:25:45 2020 +1200
printers: Don't initialize classes members to NULL/0/FALSE
These are the default values.
panels/printers/cc-printers-panel.c | 29 -----------------------------
panels/printers/pp-ipp-option-widget.c | 13 -------------
panels/printers/pp-options-dialog.c | 9 ---------
panels/printers/pp-ppd-option-widget.c | 14 --------------
4 files changed, 65 deletions(-)
---
diff --git a/panels/printers/cc-printers-panel.c b/panels/printers/cc-printers-panel.c
index 6f18f0dd4..b038ad4d9 100644
--- a/panels/printers/cc-printers-panel.c
+++ b/panels/printers/cc-printers-panel.c
@@ -1272,41 +1272,12 @@ cc_printers_panel_init (CcPrintersPanel *self)
/* initialize main data structure */
self->builder = gtk_builder_new ();
- self->dests = NULL;
- self->num_dests = 0;
-
- self->pp_new_printer_dialog = NULL;
-
- self->subscription_id = 0;
- self->cups_status_check_id = 0;
- self->subscription_renewal_id = 0;
- self->cups_proxy = NULL;
- self->cups_bus_connection = NULL;
- self->dbus_subscription_id = 0;
- self->remove_printer_timeout_id = 0;
-
- self->new_printer_name = NULL;
- self->new_printer_location = NULL;
- self->new_printer_make_and_model = NULL;
- self->new_printer_on_network = FALSE;
-
- self->renamed_printer_name = NULL;
- self->old_printer_name = NULL;
- self->deleted_printer_name = NULL;
- self->deleted_printers = NULL;
self->reference = g_object_new (G_TYPE_OBJECT, NULL);
- self->permission = NULL;
- self->lockdown_settings = NULL;
-
- self->all_ppds_list = NULL;
-
self->printer_entries = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,
NULL);
- self->entries_filled = FALSE;
- self->action = NULL;
g_type_ensure (CC_TYPE_PERMISSION_INFOBAR);
diff --git a/panels/printers/pp-ipp-option-widget.c b/panels/printers/pp-ipp-option-widget.c
index 9ca8ba2fd..97ba832bf 100644
--- a/panels/printers/pp-ipp-option-widget.c
+++ b/panels/printers/pp-ipp-option-widget.c
@@ -108,19 +108,6 @@ pp_ipp_option_widget_init (PpIPPOptionWidget *self)
{
gtk_orientable_set_orientation (GTK_ORIENTABLE (self),
GTK_ORIENTATION_HORIZONTAL);
-
- self->switch_button = NULL;
- self->spin_button = NULL;
- self->combo = NULL;
- self->box = NULL;
-
- self->printer_name = NULL;
- self->option_name = NULL;
-
- self->option_supported = NULL;
- self->option_default = NULL;
-
- self->ipp_attribute = NULL;
}
static void
diff --git a/panels/printers/pp-options-dialog.c b/panels/printers/pp-options-dialog.c
index 10abd3147..e41d04e7a 100644
--- a/panels/printers/pp-options-dialog.c
+++ b/panels/printers/pp-options-dialog.c
@@ -898,15 +898,6 @@ pp_options_dialog_new (gchar *printer_name,
self->printer_name = g_strdup (printer_name);
- self->ppd_filename = NULL;
- self->ppd_filename_set = FALSE;
-
- self->destination = NULL;
- self->destination_set = FALSE;
-
- self->ipp_attributes = NULL;
- self->ipp_attributes_set = FALSE;
-
self->sensitive = sensitive;
gtk_window_set_title (GTK_WINDOW (self), printer_name);
diff --git a/panels/printers/pp-ppd-option-widget.c b/panels/printers/pp-ppd-option-widget.c
index db409d078..56862ad62 100644
--- a/panels/printers/pp-ppd-option-widget.c
+++ b/panels/printers/pp-ppd-option-widget.c
@@ -146,20 +146,6 @@ pp_ppd_option_widget_init (PpPPDOptionWidget *self)
{
gtk_orientable_set_orientation (GTK_ORIENTABLE (self),
GTK_ORIENTATION_HORIZONTAL);
-
- self->switch_button = NULL;
- self->combo = NULL;
- self->image = NULL;
- self->box = NULL;
-
- self->printer_name = NULL;
- self->option_name = NULL;
-
- self->destination = NULL;
- self->destination_set = FALSE;
-
- self->ppd_filename = NULL;
- self->ppd_filename_set = FALSE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]