Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
ed826020
Commit
ed826020
authored
Oct 22, 2015
by
Ghislain MARY
Browse files
Hide add contact icon in uribar when the contact is already a friend or if the uri bar is empty.
parent
6fab1343
Changes
2
Hide whitespace changes
Inline
Side-by-side
gtk/friendlist.c
View file @
ed826020
...
...
@@ -457,17 +457,19 @@ static void icon_press_handler(GtkEntry *entry){
}
static
void
update_star
(
GtkEntry
*
entry
,
gboolean
is_known
){
gtk_entry_set_icon_from_icon_name
(
entry
,
GTK_ENTRY_ICON_SECONDARY
,
"linphone-contact-add"
);
if
(
is_known
){
gtk_entry_set_icon_from_icon_name
(
entry
,
GTK_ENTRY_ICON_SECONDARY
,
NULL
);
gtk_entry_set_icon_sensitive
(
GTK_ENTRY
(
entry
),
GTK_ENTRY_ICON_SECONDARY
,
FALSE
);
gtk_entry_set_icon_tooltip_text
(
GTK_ENTRY
(
entry
),
GTK_ENTRY_ICON_SECONDARY
,
NULL
);
}
else
{
gtk_entry_set_icon_from_icon_name
(
entry
,
GTK_ENTRY_ICON_SECONDARY
,
"linphone-contact-add"
);
gtk_entry_set_icon_sensitive
(
GTK_ENTRY
(
entry
),
GTK_ENTRY_ICON_SECONDARY
,
TRUE
);
gtk_entry_set_icon_tooltip_text
(
GTK_ENTRY
(
entry
),
GTK_ENTRY_ICON_SECONDARY
,
_
(
"Add to addressbook"
));
}
}
static
void
check_contact
(
GtkEditable
*
editable
,
LinphoneCore
*
lc
){
bool_t
known
=
TRUE
;
char
*
tmp
=
gtk_editable_get_chars
(
editable
,
0
,
-
1
);
if
(
tmp
!=
NULL
){
if
(
strlen
(
tmp
)
>
0
){
...
...
@@ -483,10 +485,11 @@ static void check_contact(GtkEditable *editable, LinphoneCore *lc){
return
;
}
}
known
=
FALSE
;
}
g_free
(
tmp
);
}
update_star
(
GTK_ENTRY
(
editable
),
FALSE
);
update_star
(
GTK_ENTRY
(
editable
),
known
);
}
static
void
linphone_gtk_init_bookmark_icon
(
void
){
...
...
gtk/main.c
View file @
ed826020
...
...
@@ -1860,10 +1860,10 @@ static void linphone_gtk_init_main_window(){
GtkWidget
*
main_window
;
linphone_gtk_configure_main_window
();
linphone_gtk_manage_login
();
load_uri_history
();
linphone_gtk_load_identities
();
linphone_gtk_set_my_presence
(
linphone_core_get_presence_info
(
linphone_gtk_get_core
()));
linphone_gtk_show_friends
();
load_uri_history
();
linphone_core_reset_missed_calls_count
(
linphone_gtk_get_core
());
main_window
=
linphone_gtk_get_main_window
();
#ifndef CALL_LOGS_STORAGE_ENABLED
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment