Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
9658a949
Commit
9658a949
authored
15 years ago
by
Emmanuel Milou
Browse files
Options
Downloads
Patches
Plain Diff
[#2315] Hide pw in security tab, display when editing, sync with basic tab
parent
dc6ec0c8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sflphone-client-gnome/src/config/accountconfigdialog.c
+20
-3
20 additions, 3 deletions
sflphone-client-gnome/src/config/accountconfigdialog.c
with
20 additions
and
3 deletions
sflphone-client-gnome/src/config/accountconfigdialog.c
+
20
−
3
View file @
9658a949
...
...
@@ -134,6 +134,7 @@ static void update_credential_cb(GtkWidget *widget, gpointer data UNUSED)
GtkTreeIter
iter
;
gtk_tree_model_get_iter_from_string
((
GtkTreeModel
*
)
credentialStore
,
&
iter
,
"0"
);
gint
column
=
GPOINTER_TO_INT
(
g_object_get_data
(
G_OBJECT
(
widget
),
"column"
));
g_print
(
"set password to %s
\n
"
,
(
gchar
*
)
gtk_entry_get_text
(
GTK_ENTRY
(
widget
)));
gtk_list_store_set
(
GTK_LIST_STORE
(
credentialStore
),
&
iter
,
column
,
(
gchar
*
)
gtk_entry_get_text
(
GTK_ENTRY
(
widget
)),
-
1
);
}
...
...
@@ -312,7 +313,8 @@ static void fill_treeview_with_credential (GtkListStore * credentialStore, accou
gtk_list_store_set
(
credentialStore
,
&
iter
,
COLUMN_CREDENTIAL_REALM
,
g_hash_table_lookup
(
account
->
properties
,
ACCOUNT_REALM
),
COLUMN_CREDENTIAL_USERNAME
,
g_hash_table_lookup
(
account
->
properties
,
ACCOUNT_AUTHENTICATION_USERNAME
),
COLUMN_CREDENTIAL_PASSWORD
,
gtk_entry_get_text
(
GTK_ENTRY
(
entryPassword
)),
// COLUMN_CREDENTIAL_PASSWORD, gtk_entry_get_text(GTK_ENTRY(entryPassword)),
COLUMN_CREDENTIAL_PASSWORD
,
PW_HIDDEN
,
COLUMN_CREDENTIAL_DATA
,
account
,
-
1
);
g_signal_handlers_disconnect_by_func
(
G_OBJECT
(
entryUsername
),
G_CALLBACK
(
update_credential_cb
),
NULL
);
...
...
@@ -388,12 +390,19 @@ static void cell_edited_cb(GtkCellRendererText *renderer, gchar *path_desc, gcha
GtkTreePath
*
path
=
gtk_tree_path_new_from_string
(
path_desc
);
GtkTreeIter
iter
;
gint
column
=
GPOINTER_TO_INT
(
g_object_get_data
(
G_OBJECT
(
renderer
),
"column"
));
g_print
(
"path desc in cell_edited_cb: %s
\n
"
,
text
);
if
(
g_strcasecmp
(
path_desc
,
"0"
)
==
0
)
{
if
(
g_strcasecmp
(
text
,
gtk_entry_get_text
(
GTK_ENTRY
(
entryUsername
)))
!=
0
)
{
g_signal_handlers_disconnect_by_func
(
G_OBJECT
(
entryUsername
),
G_CALLBACK
(
update_credential_cb
),
NULL
);
}
if
(
column
==
COLUMN_CREDENTIAL_PASSWORD
)
{
// && g_strcasecmp (text, gtk_entry_get_text (GTK_ENTRY (entryPassword))) == 0) {
gtk_entry_set_text
(
GTK_ENTRY
(
entryPassword
),
text
);
text
=
PW_HIDDEN
;
}
}
gtk_tree_model_get_iter
(
model
,
&
iter
,
path
);
...
...
@@ -405,7 +414,13 @@ static void cell_edited_cb(GtkCellRendererText *renderer, gchar *path_desc, gcha
static
void
editing_started_cb
(
GtkCellRenderer
*
cell
,
GtkCellEditable
*
editable
,
const
gchar
*
path
,
gpointer
data
)
{
DEBUG
(
"Editing started"
);
// gtk_entry_set_text (GTK_ENTRY (editable), gtk_entry_get_text (GTK_ENTRY(entryPassword)));
g_print
(
"path desc in editing_started_cb: %s
\n
"
,
path
);
// If we are dealing the first row
if
(
g_strcasecmp
(
path
,
"0"
)
==
0
)
{
gtk_entry_set_text
(
GTK_ENTRY
(
editable
),
gtk_entry_get_text
(
GTK_ENTRY
(
entryPassword
)));
}
}
static
void
show_advanced_zrtp_options_cb
(
GtkWidget
*
widget
UNUSED
,
gpointer
data
)
...
...
@@ -964,7 +979,9 @@ static GPtrArray * getNewCredential(GHashTable * properties)
g_hash_table_insert
(
properties
,
g_strdup
(
ACCOUNT_REALM
),
realm
);
g_hash_table_insert
(
properties
,
g_strdup
(
ACCOUNT_AUTHENTICATION_USERNAME
),
username
);
g_hash_table_insert
(
properties
,
g_strdup
(
ACCOUNT_PASSWORD
),
password
);
// Do not change the password is nothing has been changed by the user
if
(
g_strcasecmp
(
password
,
PW_HIDDEN
)
!=
0
)
g_hash_table_insert
(
properties
,
g_strdup
(
ACCOUNT_PASSWORD
),
password
);
valid
=
gtk_tree_model_iter_next
(
GTK_TREE_MODEL
(
credentialStore
),
&
iter
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment