Using the adequate orientation
This commit is contained in:
parent
1e60d8a741
commit
dc7cd33599
|
@ -93,8 +93,12 @@ static Network * _network_init(PanelAppletHelper * helper, GtkWidget ** widget)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
network->helper = helper;
|
network->helper = helper;
|
||||||
/* FIXME the orientation may be wrong */
|
#if GTK_CHECK_VERSION(3, 0, 0)
|
||||||
network->widget = gtk_hbox_new(TRUE, 0);
|
network->widget = gtk_box_new(helper->orientation, 0);
|
||||||
|
#else
|
||||||
|
network->widget = (helper->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||||
|
? gtk_hbox_new(TRUE, 0) : gtk_vbox_new(TRUE, 0);
|
||||||
|
#endif
|
||||||
gtk_widget_show(network->widget);
|
gtk_widget_show(network->widget);
|
||||||
network->source = g_timeout_add(500, _network_on_timeout, network);
|
network->source = g_timeout_add(500, _network_on_timeout, network);
|
||||||
if((network->fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
|
if((network->fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
/* Copyright (c) 2013 Pierre Pronchery <khorben@defora.org> */
|
/* Copyright (c) 2013-2014 Pierre Pronchery <khorben@defora.org> */
|
||||||
/* This file is part of DeforaOS Desktop Panel */
|
/* This file is part of DeforaOS Desktop Panel */
|
||||||
/* This program is free software: you can redistribute it and/or modify
|
/* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -79,8 +79,12 @@ static Player * _player_init(PanelAppletHelper * helper, GtkWidget ** widget)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
player->helper = helper;
|
player->helper = helper;
|
||||||
/* FIXME choose the adequate orientation */
|
#if GTK_CHECK_VERSION(3, 0, 0)
|
||||||
player->widget = gtk_hbox_new(FALSE, 0);
|
player->widget = gtk_box_new(helper->orientation, 0);
|
||||||
|
#else
|
||||||
|
player->widget = (helper->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||||
|
? gtk_hbox_new(FALSE, 0) : gtk_vbox_new(FALSE, 0);
|
||||||
|
#endif
|
||||||
_init_add(player->widget, GTK_STOCK_MEDIA_PREVIOUS, helper->icon_size,
|
_init_add(player->widget, GTK_STOCK_MEDIA_PREVIOUS, helper->icon_size,
|
||||||
_("Previous"), _player_on_previous);
|
_("Previous"), _player_on_previous);
|
||||||
_init_add(player->widget, GTK_STOCK_MEDIA_REWIND, helper->icon_size,
|
_init_add(player->widget, GTK_STOCK_MEDIA_REWIND, helper->icon_size,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user