Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.1:Update
gnome-control-center
gnome-control-center-minimal-password-dialog.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gnome-control-center-minimal-password-dialog.patch of Package gnome-control-center
From baff22190bbebd28902ee9739b8c65aae26ffca3 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro <mike.catanzaro@gmail.com> Date: Mon, 14 Jan 2013 15:20:00 -0600 Subject: [PATCH] Use minimal password dialog --- panels/user-accounts/data/password-dialog.ui | 359 ++++++++++---------------- panels/user-accounts/um-password-dialog.c | 174 +------------ 2 files changed, 134 insertions(+), 399 deletions(-) diff --git a/panels/user-accounts/data/password-dialog.ui b/panels/user-accounts/data/password-dialog.ui index e80d657..660c499 100644 --- a/panels/user-accounts/data/password-dialog.ui +++ b/panels/user-accounts/data/password-dialog.ui @@ -1,7 +1,6 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 2.12 --> - <!-- interface-naming-policy toplevel-contextual --> <object class="GtkListStore" id="action-model"> <columns> <!-- column-name gchararray --> @@ -33,6 +32,7 @@ </data> </object> <object class="GtkDialog" id="dialog"> + <property name="can_focus">False</property> <property name="border_width">5</property> <property name="title"> </property> <property name="resizable">False</property> @@ -41,93 +41,109 @@ <property name="icon_name">system-users</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> - <object class="GtkVBox" id="dialog-vbox1"> + <object class="GtkBox" id="dialog-vbox1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="orientation">vertical</property> <property name="spacing">12</property> - <child> - <object class="GtkVBox" id="vbox7"> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> <property name="visible">True</property> - <property name="border_width">6</property> - <property name="orientation">vertical</property> - <property name="spacing">16</property> + <property name="can_focus">False</property> <child> - <object class="GtkTable" id="table4"> + <object class="GtkAlignment" id="alignment2"> <property name="visible">True</property> - <property name="n_rows">8</property> - <property name="n_columns">2</property> - <property name="column_spacing">10</property> - <property name="row_spacing">6</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> <child> - <object class="GtkVBox" id="vbox14"> + <object class="GtkLabel" id="password-normal-strength-hints-label"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkLabel" id="password-normal-hint-label"> - <property name="visible">True</property> - <property name="xalign">1</property> - <property name="label" translatable="yes">_Hint</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">normal-hint-entry</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label33"> - <property name="visible">True</property> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="label" translatable="yes">How to choose a strong password</property> + <property name="use_markup">True</property> + <property name="track_visited_links">False</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + <property name="secondary">True</property> + </packing> + </child> + <child> + <object class="GtkHButtonBox" id="hbuttonbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="cancel-button"> + <property name="label">gtk-cancel</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> </object> <packing> - <property name="top_attach">7</property> - <property name="bottom_attach">8</property> - <property name="x_options">GTK_FILL</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">end</property> + <property name="position">0</property> </packing> </child> <child> - <object class="GtkVBox" id="vbox15"> + <object class="GtkButton" id="ok-button"> + <property name="label" translatable="yes">Ch_ange</property> + <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkEntry" id="normal-hint-entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="password-normal-hint-description-label"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">This hint may be displayed at the login screen. It will be visible to all users of this system. Do <b>not</b> include the password here.</property> - <property name="use_markup">True</property> - <property name="wrap">True</property> - <attributes> - <attribute name="scale" value="0.83333333333329995"/> - </attributes> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">7</property> - <property name="bottom_attach">8</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">end</property> + <property name="position">1</property> </packing> </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + <property name="secondary">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="spacing">16</property> + <child> + <object class="GtkTable" id="table4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="n_rows">7</property> + <property name="n_columns">2</property> + <property name="column_spacing">10</property> + <property name="row_spacing">6</property> <child> <object class="GtkEntry" id="verify-entry"> <property name="visible">True</property> @@ -144,13 +160,11 @@ <child> <object class="GtkLabel" id="password-normal-verify-label"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="xalign">1</property> <property name="label" translatable="yes">C_onfirm password</property> <property name="use_underline">True</property> <property name="mnemonic_widget">verify-entry</property> - <style> - <class name="dim-label"/> - </style> </object> <packing> <property name="top_attach">5</property> @@ -161,30 +175,22 @@ <child> <object class="GtkVBox" id="vbox17"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <child> <object class="GtkLabel" id="password-normal-password-label"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="xalign">1</property> <property name="label" translatable="yes">_New password</property> <property name="use_underline">True</property> <property name="mnemonic_widget">password-entry</property> - <style> - <class name="dim-label"/> - </style> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> - <child> - <object class="GtkLabel" id="label35"> - <property name="visible">True</property> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> </object> <packing> <property name="top_attach">4</property> @@ -195,11 +201,12 @@ <child> <object class="GtkVBox" id="vbox16"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> <object class="GtkHBox" id="hbox1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> <object class="GtkEntry" id="password-entry"> @@ -208,69 +215,18 @@ <property name="visibility">False</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> - <child> - <object class="GtkButton" id="generate-again-button"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip_text" translatable="yes">Choose a generated password</property> - <child> - <object class="GtkImage" id="generate-again-image"> - <property name="visible">True</property> - <property name="stock">gtk-execute</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> - <child> - <object class="GtkHBox" id="hbox13"> - <property name="visible">True</property> - <property name="spacing">9</property> - <child> - <object class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="top_padding">6</property> - <property name="bottom_padding">6</property> - <child> - <object class="UmStrengthBar" id="strength-indicator"> - <property name="visible">True</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="strength-indicator-label"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Fair</property> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> </object> <packing> <property name="left_attach">1</property> @@ -282,13 +238,11 @@ <child> <object class="GtkLabel" id="old-password-label"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="xalign">1</property> <property name="label" translatable="yes">Current _password</property> <property name="use_underline">True</property> <property name="mnemonic_widget">old-password-entry</property> - <style> - <class name="dim-label"/> - </style> </object> <packing> <property name="top_attach">3</property> @@ -311,13 +265,11 @@ <child> <object class="GtkLabel" id="action-label"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="xalign">1</property> <property name="label" translatable="yes">_Action</property> <property name="use_underline">True</property> <property name="mnemonic_widget">action-combo</property> - <style> - <class name="dim-label"/> - </style> </object> <packing> <property name="top_attach">2</property> @@ -327,6 +279,7 @@ <child> <object class="GtkComboBox" id="action-combo"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="model">action-model</property> <child> <object class="GtkCellRendererText" id="renderer"/> @@ -345,6 +298,7 @@ <child> <object class="GtkLabel" id="label1"> <property name="visible">True</property> + <property name="can_focus">False</property> </object> <packing> <property name="top_attach">1</property> @@ -354,6 +308,7 @@ <child> <object class="GtkLabel" id="label2"> <property name="visible">True</property> + <property name="can_focus">False</property> </object> <packing> <property name="left_attach">1</property> @@ -365,20 +320,26 @@ <child> <object class="GtkHBox" id="hbox3"> <property name="visible">True</property> + <property name="can_focus">False</property> <child> <object class="GtkLabel" id="blablalabel23"> <property name="visible">True</property> + <property name="can_focus">False</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkImage" id="user-icon"> <property name="visible">True</property> + <property name="can_focus">False</property> </object> <packing> <property name="expand">False</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> @@ -390,27 +351,33 @@ <child> <object class="GtkVBox" id="vbox6"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <child> <object class="GtkLabel" id="label8"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="xalign">0</property> <property name="label" translatable="yes">Changing password for</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkLabel" id="user-name"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="xalign">0</property> <attributes> <attribute name="weight" value="bold"/> - <attribute name="scale" value="1.200000"/> + <attribute name="scale" value="1.2"/> </attributes> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> @@ -423,9 +390,12 @@ <child> <object class="GtkCheckButton" id="show-password-checkbutton"> <property name="label" translatable="yes">_Show password</property> + <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="halign">start</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> @@ -437,95 +407,30 @@ </packing> </child> <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area1"> - <property name="visible">True</property> - <property name="layout_style">edge</property> - <child> - <object class="GtkAlignment" id="alignment2"> - <property name="visible">True</property> - <property name="xalign">0</property> - <child> - <object class="GtkLabel" id="password-normal-strength-hints-label"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">How to choose a strong password</property> - <property name="use_markup">True</property> - <property name="track_visited_links">False</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - <property name="secondary">True</property> - </packing> - </child> - <child> - <object class="GtkHButtonBox" id="hbuttonbox1"> - <property name="visible">True</property> - <property name="spacing">6</property> - <property name="layout_style">end</property> - <child> - <object class="GtkButton" id="ok-button"> - <property name="label" translatable="yes">Ch_ange</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="receives_default">True</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="pack_type">end</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkButton" id="cancel-button"> - <property name="label">gtk-cancel</property> + <object class="GtkLabel" id="strength-indicator-label"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_stock">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Fair</property> </object> <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="pack_type">end</property> - <property name="position">0</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> </packing> </child> </object> <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - <property name="secondary">True</property> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> </packing> </child> </object> <packing> <property name="expand">False</property> - <property name="pack_type">end</property> - <property name="position">0</property> + <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> diff --git a/panels/user-accounts/um-password-dialog.c b/panels/user-accounts/um-password-dialog.c index 5bd652b..88e8fb9 100644 --- a/panels/user-accounts/um-password-dialog.c +++ b/panels/user-accounts/um-password-dialog.c @@ -46,12 +46,7 @@ struct _UmPasswordDialog { GtkWidget *action_combo; GtkWidget *password_entry; GtkWidget *verify_entry; - GtkWidget *strength_indicator; GtkWidget *strength_indicator_label; - GtkWidget *normal_hint_entry; - GtkWidget *normal_hint_label; - GtkWidget *generate_button; - GtkWidget *generate_menu; GtkWidget *show_password_button; GtkWidget *ok_button; @@ -64,125 +59,6 @@ struct _UmPasswordDialog { PasswdHandler *passwd_handler; }; -static void -generate_clicked (GtkButton *button, - UmPasswordDialog *um) -{ - gtk_menu_popup (GTK_MENU (um->generate_menu), - NULL, NULL, - (GtkMenuPositionFunc) popup_menu_below_button, um->generate_button, - 0, gtk_get_current_event_time ()); - - gtk_widget_set_has_tooltip (um->generate_button, FALSE); -} - -static void -generate_draw (GtkWidget *widget, - cairo_t *cr, - UmPasswordDialog *um) -{ - if (!gtk_widget_is_sensitive (widget)) - return; - - down_arrow (gtk_widget_get_style_context (widget), - cr, - gtk_widget_get_allocated_width (widget) - 12, - gtk_widget_get_allocated_height (widget) - 12, - 12, 12); -} - -static void -activate_password_item (GtkMenuItem *item, - UmPasswordDialog *um) -{ - const char *password; - - password = gtk_menu_item_get_label (item); - - gtk_entry_set_text (GTK_ENTRY (um->password_entry), password); - gtk_entry_set_text (GTK_ENTRY (um->verify_entry), ""); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (um->show_password_button), TRUE); - gtk_widget_grab_focus (um->verify_entry); -} - -static void generate_passwords (UmPasswordDialog *um); - -static void -activate_generate_item (GtkMenuItem *item, - UmPasswordDialog *um) -{ - generate_passwords (um); - generate_clicked (GTK_BUTTON (um->generate_button), um); -} - -static void -on_generate_menu_unmap (GtkWidget *menu, - UmPasswordDialog *um) -{ - gtk_widget_set_has_tooltip (um->generate_button, TRUE); -} - -static void -generate_passwords (UmPasswordDialog *um) -{ - gint min_len, max_len; - gchar *output, *err, *cmdline; - gint status; - GError *error; - gint i; - GtkWidget *item; - - min_len = 6; - max_len = 12; - - if (um->generate_menu) { - gtk_widget_destroy (um->generate_menu); - } - - um->generate_menu = gtk_menu_new (); - g_signal_connect (um->generate_menu, "unmap", - G_CALLBACK (on_generate_menu_unmap), um); - - cmdline = g_strdup_printf ("apg -n 6 -M SNC -m %d -x %d", min_len, max_len); - error = NULL; - output = NULL; - err = NULL; - if (!g_spawn_command_line_sync (cmdline, &output, &err, &status, &error)) { - g_warning ("Failed to run apg: %s", error->message); - g_error_free (error); - } else if (WEXITSTATUS (status) == 0) { - char **lines; - lines = g_strsplit (output, "\n", 0); - for (i = 0; lines[i]; i++) { - if (lines[i][0] == 0) - continue; - - item = gtk_menu_item_new_with_label (lines[i]); - g_signal_connect (item, "activate", - G_CALLBACK (activate_password_item), um); - gtk_widget_show (item); - gtk_menu_shell_append (GTK_MENU_SHELL (um->generate_menu), item); - } - g_strfreev (lines); - } else { - g_warning ("agp returned an error: %s", err); - } - - g_free (cmdline); - g_free (output); - g_free (err); - - item = gtk_separator_menu_item_new (); - gtk_widget_show (item); - gtk_menu_shell_append (GTK_MENU_SHELL (um->generate_menu), item); - - item = gtk_menu_item_new_with_label (_("More choices...")); - g_signal_connect (item, "activate", - G_CALLBACK (activate_generate_item), um); - gtk_widget_show (item); - gtk_menu_shell_append (GTK_MENU_SHELL (um->generate_menu), item); -} - /* This code is based on the Master Password dialog in Firefox * (pref-masterpass.js) * Original code triple-licensed under the MPL, GPL, and LGPL @@ -242,7 +118,6 @@ finish_password_change (UmPasswordDialog *um) gtk_entry_set_text (GTK_ENTRY (um->password_entry), " "); gtk_entry_set_text (GTK_ENTRY (um->verify_entry), ""); - gtk_entry_set_text (GTK_ENTRY (um->normal_hint_entry), ""); gtk_entry_set_text (GTK_ENTRY (um->old_password_entry), ""); um_password_dialog_set_user (um, NULL); @@ -321,7 +196,6 @@ accept_password_dialog (GtkButton *button, GtkTreeModel *model; GtkTreeIter iter; gint mode; - const gchar *hint; const gchar *password; model = gtk_combo_box_get_model (GTK_COMBO_BOX (um->action_combo)); @@ -329,7 +203,6 @@ accept_password_dialog (GtkButton *button, gtk_tree_model_get (model, &iter, 1, &mode, -1); password = gtk_entry_get_text (GTK_ENTRY (um->password_entry)); - hint = gtk_entry_get_text (GTK_ENTRY (um->normal_hint_entry)); if (mode == 0 && um_user_get_uid (um->user) == getuid ()) { GdkDisplay *display; @@ -348,7 +221,7 @@ accept_password_dialog (GtkButton *button, g_object_unref (cursor); } else { - um_user_set_password (um->user, mode, password, hint); + um_user_set_password (um->user, mode, password, ""); finish_password_change (um); } } @@ -411,12 +284,8 @@ action_changed (GtkComboBox *combo, active = gtk_combo_box_get_active (combo); if (active == 0) { gtk_widget_set_sensitive (um->password_entry, TRUE); - gtk_widget_set_sensitive (um->generate_button, TRUE); - gtk_widget_set_has_tooltip (um->generate_button, TRUE); gtk_widget_set_sensitive (um->verify_entry, TRUE); gtk_widget_set_sensitive (um->old_password_entry, TRUE); - gtk_widget_set_sensitive (um->normal_hint_entry, TRUE); - gtk_widget_set_sensitive (um->normal_hint_label, TRUE); gtk_widget_set_sensitive (um->strength_indicator_label, TRUE); gtk_widget_set_sensitive (um->show_password_button, TRUE); @@ -424,12 +293,8 @@ action_changed (GtkComboBox *combo, } else { gtk_widget_set_sensitive (um->password_entry, FALSE); - gtk_widget_set_sensitive (um->generate_button, FALSE); - gtk_widget_set_has_tooltip (um->generate_button, FALSE); gtk_widget_set_sensitive (um->verify_entry, FALSE); gtk_widget_set_sensitive (um->old_password_entry, FALSE); - gtk_widget_set_sensitive (um->normal_hint_entry, FALSE); - gtk_widget_set_sensitive (um->normal_hint_label, FALSE); gtk_widget_set_sensitive (um->strength_indicator_label, FALSE); gtk_widget_set_sensitive (um->show_password_button, FALSE); gtk_widget_set_sensitive (um->ok_button, TRUE); @@ -474,7 +339,6 @@ update_password_strength (UmPasswordDialog *um) else hint = C_("Password strength", "Strong"); - um_strength_bar_set_strength (UM_STRENGTH_BAR (um->strength_indicator), strength); gtk_label_set_label (GTK_LABEL (um->strength_indicator_label), hint); } @@ -522,14 +386,6 @@ verify_entry_focus_out (GtkWidget *entry, } static void -entry_size_changed (GtkWidget *entry, - GtkAllocation *allocation, - GtkWidget *label) -{ - gtk_widget_set_size_request (label, allocation->width, -1); -} - -static void auth_cb (PasswdHandler *handler, GError *error, UmPasswordDialog *um) @@ -700,36 +556,11 @@ um_password_dialog_new (void) widget = (GtkWidget *) gtk_builder_get_object (builder, "strength-indicator-label"); gtk_label_set_width_chars (GTK_LABEL (widget), len); - - widget = (GtkWidget *) gtk_builder_get_object (builder, "generate-again-button"); - g_signal_connect (widget, "clicked", - G_CALLBACK (generate_clicked), um); -#if 0 - g_signal_connect (widget, "state-changed", - G_CALLBACK (generate_state_changed), um); -#endif - um->generate_button = widget; - g_signal_connect_after (widget, "draw", - G_CALLBACK (generate_draw), um); - - um->normal_hint_entry = (GtkWidget *) gtk_builder_get_object (builder, "normal-hint-entry"); - - /* Label size hack. - * This only sort-of works because the dialog is non-resizable. - */ - widget = (GtkWidget *)gtk_builder_get_object (builder, "password-normal-hint-description-label"); - g_signal_connect (um->normal_hint_entry, "size-allocate", - G_CALLBACK (entry_size_changed), widget); - um->normal_hint_label = widget; - - um->strength_indicator = (GtkWidget *) gtk_builder_get_object (builder, "strength-indicator"); - um->strength_indicator_label = (GtkWidget *) gtk_builder_get_object (builder, "strength-indicator-label"); + gtk_label_set_label (GTK_LABEL (um->strength_indicator_label), ""); g_object_unref (builder); - generate_passwords (um); - return um; } @@ -793,7 +624,6 @@ um_password_dialog_set_user (UmPasswordDialog *um, gtk_entry_set_text (GTK_ENTRY (um->password_entry), ""); gtk_entry_set_text (GTK_ENTRY (um->verify_entry), ""); - gtk_entry_set_text (GTK_ENTRY (um->normal_hint_entry), ""); gtk_entry_set_text (GTK_ENTRY (um->old_password_entry), ""); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (um->show_password_button), FALSE); if (um_user_get_uid (um->user) == getuid()) { -- 1.7.7
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor