[gnome-control-center/remove-unused-func] sharing: Remove leftover remote_desktop_password_insert_text_cb




commit 7f7c75f08634e9365453848b07179fa0ab51a706
Author: Felipe Borges <felipeborges gnome org>
Date:   Thu Mar 10 15:20:37 2022 +0100

    sharing: Remove leftover remote_desktop_password_insert_text_cb
    
    This method is unused and was left behind after the rework in
    commit 0ae59467fbd694d59fa367a0621de2482f169f44
    
    Fixes #1703

 panels/sharing/cc-sharing-panel.c | 31 -------------------------------
 1 file changed, 31 deletions(-)
---
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index 6fb0210c3..d126a2236 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -979,37 +979,6 @@ cc_sharing_panel_check_schema_available (CcSharingPanel *self,
   return TRUE;
 }
 
-#define MAX_PASSWORD_SIZE 8
-static void
-remote_desktop_password_insert_text_cb (CcSharingPanel *self,
-                                        gchar          *new_text,
-                                        gint            new_text_length,
-                                        gpointer        position)
-{
-  int l, available_size;
-
-  l = gtk_entry_buffer_get_bytes (gtk_entry_get_buffer (GTK_ENTRY (self->remote_desktop_password_entry)));
-
-  if (l + new_text_length <= MAX_PASSWORD_SIZE)
-    return;
-
-  g_signal_stop_emission_by_name (self->remote_desktop_password_entry, "insert-text");
-  gtk_widget_error_bell (GTK_WIDGET (self->remote_desktop_password_entry));
-
-  available_size = g_utf8_strlen (new_text, MAX_PASSWORD_SIZE - l);
-  if (available_size == 0)
-    return;
-
-  g_signal_handlers_block_by_func (self->remote_desktop_password_entry,
-                                   (gpointer) remote_desktop_password_insert_text_cb,
-                                   self);
-  gtk_editable_insert_text (GTK_EDITABLE (self->remote_desktop_password_entry), new_text, available_size, 
position);
-  g_signal_handlers_unblock_by_func (self->remote_desktop_password_entry,
-                                     (gpointer) remote_desktop_password_insert_text_cb,
-                                     self);
-}
-#undef MAX_PASSWORD_SIZE
-
 static gboolean
 store_remote_desktop_credentials_timeout (gpointer user_data)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]