This is a fully working newLister with clickable titlebar.
Clicking on the left half of titlebar will go back to top-menu, and clicking on the right half will go up one level.
The attachment is the binary file. Install as I described in the previous post.
Because the code is too simple, diff file is not needed. I just put my code here:
in "lister.c", add a line:
Code:
g_signal_connect(G_OBJECT(titleBackground), "button_press_event",
G_CALLBACK(ls_titlebar_press_event), NULL);
just before (or after) the line:
Code:
g_signal_connect(G_OBJECT(titleBackground), "expose-event", G_CALLBACK(ls_lister_expose_event), NULL);
And add the function call:
Code:
gboolean ls_titlebar_press_event(GtkWidget * widget, GdkEventButton * event, gpointer data)
{
int x = (int) ((GdkEvent*)event)->button.x_root;
if(x>=768/2){
CL_LOGPRINTF("OVERVIEW_BUTTON LONG");
pm_SendKey(GDK_Home);
}else{
CL_LOGPRINTF("OVERVIEW_BUTTON");
pm_SendKey(GDK_F5);
}
return FALSE;
}
Note:
When you click on the title bar, LED won't flash. To make LED falsh just as we push MODE button and OVERVIEW button, some more code is needed.