mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Gtk: Greyed edit/remove button of the friend list when no contact is selected
This commit is contained in:
parent
25589de545
commit
e9c787b799
2 changed files with 13 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue