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
e9c787b7
Commit
e9c787b7
authored
Oct 22, 2015
by
François Grisez
Browse files
Gtk: Greyed edit/remove button of the friend list when no contact is selected
parent
25589de5
Changes
2
Hide whitespace changes
Inline
Side-by-side
gtk/friendlist.c
View file @
e9c787b7
...
...
@@ -361,8 +361,19 @@ void linphone_gtk_chat_selected(GtkWidget *item){
void
linphone_gtk_contact_clicked
(
GtkTreeSelection
*
selection
){
GtkTreeView
*
friendlist
=
gtk_tree_selection_get_tree_view
(
selection
);
GtkWidget
*
mw
=
linphone_gtk_get_main_window
();
GtkWidget
*
edit_button
=
linphone_gtk_get_widget
(
mw
,
"edit_button"
);
GtkWidget
*
remove_button
=
linphone_gtk_get_widget
(
mw
,
"remove_button"
);
linphone_gtk_set_selection_to_uri_bar
(
friendlist
);
linphone_gtk_friend_list_update_button_display
(
friendlist
);
if
(
gtk_tree_selection_get_selected
(
selection
,
NULL
,
NULL
))
{
gtk_widget_set_sensitive
(
edit_button
,
TRUE
);
gtk_widget_set_sensitive
(
remove_button
,
TRUE
);
}
else
{
gtk_widget_set_sensitive
(
edit_button
,
FALSE
);
gtk_widget_set_sensitive
(
remove_button
,
FALSE
);
}
}
...
...
gtk/main.ui
View file @
e9c787b7
...
...
@@ -566,6 +566,7 @@
<property
name=
"width_request"
>
32
</property>
<property
name=
"height_request"
>
32
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"sensitive"
>
False
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"image"
>
edit_image1
</property>
...
...
@@ -582,6 +583,7 @@
<property
name=
"width_request"
>
32
</property>
<property
name=
"height_request"
>
32
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"sensitive"
>
False
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"image"
>
remove_image1
</property>
...
...
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