summaryrefslogtreecommitdiff
path: root/capplets/about-me
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-27 14:22:58 +0200
committerLuke from DC <[email protected]>2022-02-09 04:42:12 +0000
commit2a06f17c2ef442bd63cc0463c5ee2d5b6cc84c64 (patch)
tree0de842f92df7aa496d2867a65f160322687e47a4 /capplets/about-me
parent0bfa4ca16e527fdc333fc1ded8b1d9f5963ccf1e (diff)
downloadmate-control-center-2a06f17c2ef442bd63cc0463c5ee2d5b6cc84c64.tar.bz2
mate-control-center-2a06f17c2ef442bd63cc0463c5ee2d5b6cc84c64.tar.xz
Unnecessary G_OBJECT cast when calling signal connect function
Diffstat (limited to 'capplets/about-me')
-rw-r--r--capplets/about-me/mate-about-me-fingerprint.c35
-rw-r--r--capplets/about-me/mate-about-me-password.c25
2 files changed, 36 insertions, 24 deletions
diff --git a/capplets/about-me/mate-about-me-fingerprint.c b/capplets/about-me/mate-about-me-fingerprint.c
index a6bced28..7457b013 100644
--- a/capplets/about-me/mate-about-me-fingerprint.c
+++ b/capplets/about-me/mate-about-me-fingerprint.c
@@ -756,24 +756,31 @@ enroll_fingerprints (GtkWindow *parent, GtkWidget *enable, GtkWidget *disable)
gtk_window_set_title (GTK_WINDOW (ass), _("Enable Fingerprint Login"));
gtk_window_set_transient_for (GTK_WINDOW (ass), parent);
gtk_window_set_position (GTK_WINDOW (ass), GTK_WIN_POS_CENTER_ON_PARENT);
- g_signal_connect (G_OBJECT (ass), "cancel",
- G_CALLBACK (assistant_cancelled), data);
- g_signal_connect (G_OBJECT (ass), "close",
- G_CALLBACK (assistant_cancelled), data);
- g_signal_connect (G_OBJECT (ass), "prepare",
- G_CALLBACK (assistant_prepare), data);
+ g_signal_connect (ass, "cancel",
+ G_CALLBACK (assistant_cancelled),
+ data);
+ g_signal_connect (ass, "close",
+ G_CALLBACK (assistant_cancelled),
+ data);
+ g_signal_connect (ass, "prepare",
+ G_CALLBACK (assistant_prepare),
+ data);
/* Page 1 */
gtk_combo_box_set_active (GTK_COMBO_BOX (WID ("finger_combobox")), 0);
- g_signal_connect (G_OBJECT (WID ("radiobutton1")), "toggled",
- G_CALLBACK (finger_radio_button_toggled), data);
- g_signal_connect (G_OBJECT (WID ("radiobutton2")), "toggled",
- G_CALLBACK (finger_radio_button_toggled), data);
- g_signal_connect (G_OBJECT (WID ("radiobutton3")), "toggled",
- G_CALLBACK (finger_radio_button_toggled), data);
- g_signal_connect (G_OBJECT (WID ("finger_combobox")), "changed",
- G_CALLBACK (finger_combobox_changed), data);
+ g_signal_connect (gtk_builder_get_object (dialog, "radiobutton1"), "toggled",
+ G_CALLBACK (finger_radio_button_toggled),
+ data);
+ g_signal_connect (gtk_builder_get_object (dialog, "radiobutton2"), "toggled",
+ G_CALLBACK (finger_radio_button_toggled),
+ data);
+ g_signal_connect (gtk_builder_get_object (dialog, "radiobutton3"), "toggled",
+ G_CALLBACK (finger_radio_button_toggled),
+ data);
+ g_signal_connect (gtk_builder_get_object (dialog, "finger_combobox"), "changed",
+ G_CALLBACK (finger_combobox_changed),
+ data);
data->finger = selected_finger (dialog);
diff --git a/capplets/about-me/mate-about-me-password.c b/capplets/about-me/mate-about-me-password.c
index 3b9fce9d..5800c3ca 100644
--- a/capplets/about-me/mate-about-me-password.c
+++ b/capplets/about-me/mate-about-me-password.c
@@ -1112,12 +1112,14 @@ passdlg_init (PasswordDialog *pdialog, GtkWindow *parent)
0);
/* Activate authenticate-button when enter is pressed in current-password */
- g_signal_connect (G_OBJECT (pdialog->current_password), "activate",
- G_CALLBACK (passdlg_activate), WID ("authenticate-button"));
+ g_signal_connect (pdialog->current_password, "activate",
+ G_CALLBACK (passdlg_activate),
+ WID ("authenticate-button"));
/* Activate retyped-password when enter is pressed in new-password */
- g_signal_connect (G_OBJECT (pdialog->new_password), "activate",
- G_CALLBACK (passdlg_activate), pdialog->retyped_password);
+ g_signal_connect (pdialog->new_password, "activate",
+ G_CALLBACK (passdlg_activate),
+ pdialog->retyped_password);
/* Clear status message */
passdlg_set_status (pdialog, "");
@@ -1126,14 +1128,17 @@ passdlg_init (PasswordDialog *pdialog, GtkWindow *parent)
passdlg_set_auth_state (pdialog, FALSE);
/* Connect signal handlers */
- g_signal_connect (G_OBJECT (WID ("authenticate-button")), "clicked",
- G_CALLBACK (passdlg_authenticate), pdialog);
+ g_signal_connect (gtk_builder_get_object (dialog, "authenticate-button"), "clicked",
+ G_CALLBACK (passdlg_authenticate),
+ pdialog);
/* Verify new passwords on-the-fly */
- g_signal_connect (G_OBJECT (WID ("new-password")), "changed",
- G_CALLBACK (passdlg_check_password), pdialog);
- g_signal_connect (G_OBJECT (WID ("retyped-password")), "changed",
- G_CALLBACK (passdlg_check_password), pdialog);
+ g_signal_connect (gtk_builder_get_object (dialog, "new-password"), "changed",
+ G_CALLBACK (passdlg_check_password),
+ pdialog);
+ g_signal_connect (gtk_builder_get_object (dialog, "retyped-password"), "changed",
+ G_CALLBACK (passdlg_check_password),
+ pdialog);
/* Set misc dialog properties */
gtk_window_set_resizable (GTK_WINDOW (wpassdlg), FALSE);