Harmonize the "tasks" data structure in embedded mode
This commit is contained in:
parent
c7921be51c
commit
af947b48b2
|
@ -48,9 +48,7 @@ typedef struct _Task
|
|||
Window window;
|
||||
GtkWidget * widget;
|
||||
GtkWidget * image;
|
||||
#ifndef EMBEDDED
|
||||
GtkWidget * label;
|
||||
#endif
|
||||
gboolean delete;
|
||||
} Task;
|
||||
|
||||
|
@ -202,6 +200,8 @@ static Task * _task_new(Tasks * tasks, Window window, char const * name,
|
|||
gtk_box_pack_start(GTK_BOX(hbox), task->label, FALSE, TRUE, 4);
|
||||
gtk_widget_set_size_request(task->widget, tasks->icon_width,
|
||||
tasks->icon_height);
|
||||
#else
|
||||
task->label = NULL;
|
||||
#endif
|
||||
gtk_container_add(GTK_CONTAINER(task->widget), hbox);
|
||||
_task_set(task, name, pixbuf);
|
||||
|
@ -221,9 +221,8 @@ static void _task_delete(Task * task)
|
|||
/* task_set */
|
||||
static void _task_set(Task * task, char const * name, GdkPixbuf * pixbuf)
|
||||
{
|
||||
#ifndef EMBEDDED
|
||||
if(task->label != NULL)
|
||||
gtk_label_set_text(GTK_LABEL(task->label), name);
|
||||
#endif
|
||||
#if GTK_CHECK_VERSION(2, 12, 0)
|
||||
gtk_widget_set_tooltip_text(task->widget, name);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user