Set the default orientation accordingly
This commit is contained in:
parent
76cadd7602
commit
788e3787f4
|
@ -287,6 +287,7 @@ static Tasks * _tasks_init(PanelAppletHelper * helper, GtkWidget ** widget)
|
||||||
{
|
{
|
||||||
Tasks * tasks;
|
Tasks * tasks;
|
||||||
char const * p;
|
char const * p;
|
||||||
|
GtkOrientation orientation;
|
||||||
|
|
||||||
if((tasks = malloc(sizeof(*tasks))) == NULL)
|
if((tasks = malloc(sizeof(*tasks))) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -316,10 +317,12 @@ static Tasks * _tasks_init(PanelAppletHelper * helper, GtkWidget ** widget)
|
||||||
#else
|
#else
|
||||||
tasks->embedded = FALSE;
|
tasks->embedded = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
orientation = panel_window_get_orientation(helper->window);
|
||||||
#if GTK_CHECK_VERSION(3, 0, 0)
|
#if GTK_CHECK_VERSION(3, 0, 0)
|
||||||
tasks->hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
|
tasks->hbox = gtk_box_new(orientation, 0);
|
||||||
#else
|
#else
|
||||||
tasks->hbox = gtk_hbox_new(FALSE, 0);
|
tasks->hbox = (orientation == GTK_ORIENTATION_VERTICAL)
|
||||||
|
? gtk_vbox_new(FALSE, 0) : gtk_hbox_new(FALSE, 0);
|
||||||
#endif
|
#endif
|
||||||
gtk_box_set_homogeneous(GTK_BOX(tasks->hbox), TRUE);
|
gtk_box_set_homogeneous(GTK_BOX(tasks->hbox), TRUE);
|
||||||
tasks->source = g_signal_connect(tasks->hbox, "screen-changed",
|
tasks->source = g_signal_connect(tasks->hbox, "screen-changed",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user