$ git clone http://tcclient.ion.nu/tc_client.git
commit 389321c31b924fe5c3f9dc245aa31f5eee8cf94e
Author: Alicia <...>
Date: Wed Sep 14 22:47:00 2016 +0200
tc_client-gtk: un-highlight selected PM tabs even if the sender has left.
diff --git a/ChangeLog b/ChangeLog
index 924abfe..1a0794e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@ tc_client-gtk: added menu item to hide a camera upon right-click.
tc_client-gtk: limit the camera preview to 640 by 480, scaling down if the input is larger.
tc_client-gtk: when resizing the window, resize the camera pane before the chat pane.
tc_client-gtk: break the cameras into two or more rows if it means they can be larger and still fit.
+tc_client-gtk: un-highlight selected PM tabs even if the sender has left.
tc_client-gtk and camviewer: fixed compatibility with newer libavutil.
tc_client-gtk and camviewer: added compatibility fallbacks for av_image_get_buffer_size() and av_packet_unref()
tc_client-gtk and camviewer: specify a scaling algorithm for libswscale (mandatory for older versions of libswscale)
diff --git a/utilities/gtk/gui.c b/utilities/gtk/gui.c
index 06853e3..52584ff 100644
--- a/utilities/gtk/gui.c
+++ b/utilities/gtk/gui.c
@@ -395,11 +395,16 @@ void pm_highlight(const char* nick)
char pm_select(GtkNotebook* tabs, GtkWidget* tab, int num, void* x)
{
- struct user* user=user_find_by_tab(tab);
- if(!user){return 0;}
+ if(num<1){return 0;} // Don't try to unhighlight Main
// Reset highlighting
- gtk_label_set_text(GTK_LABEL(user->pm_tablabel), user->nick);
- user->pm_highlight=0;
+ GtkContainer* box=GTK_CONTAINER(gtk_notebook_get_tab_label(tabs, tab));
+ GList* list=gtk_container_get_children(box);
+ GtkLabel* label=list->data; // Should be the first item
+ g_list_free(list);
+ const char* text=gtk_label_get_text(label);
+ gtk_label_set_text(label, text);
+ struct user* user=user_find_by_tab(tab);
+ if(user){user->pm_highlight=0;}
return 0;
}