diff --git a/src/applets/network.c b/src/applets/network.c index ad360e3..ceeaa6c 100644 --- a/src/applets/network.c +++ b/src/applets/network.c @@ -93,8 +93,12 @@ static Network * _network_init(PanelAppletHelper * helper, GtkWidget ** widget) return NULL; } network->helper = helper; - /* FIXME the orientation may be wrong */ - network->widget = gtk_hbox_new(TRUE, 0); +#if GTK_CHECK_VERSION(3, 0, 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); network->source = g_timeout_add(500, _network_on_timeout, network); if((network->fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) diff --git a/src/applets/player.c b/src/applets/player.c index df27f5d..432a426 100644 --- a/src/applets/player.c +++ b/src/applets/player.c @@ -1,5 +1,5 @@ /* $Id$ */ -/* Copyright (c) 2013 Pierre Pronchery */ +/* Copyright (c) 2013-2014 Pierre Pronchery */ /* This file is part of DeforaOS Desktop Panel */ /* 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 @@ -79,8 +79,12 @@ static Player * _player_init(PanelAppletHelper * helper, GtkWidget ** widget) return NULL; } player->helper = helper; - /* FIXME choose the adequate orientation */ - player->widget = gtk_hbox_new(FALSE, 0); +#if GTK_CHECK_VERSION(3, 0, 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, _("Previous"), _player_on_previous); _init_add(player->widget, GTK_STOCK_MEDIA_REWIND, helper->icon_size,