From e487a22d138bb502b3fa5e88acbfa35312f13361 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 17 Mar 2014 22:38:15 +0900 Subject: [PATCH] The panel applet helper now knows the panel's orientation --- include/Panel.h | 1 + src/panel.c | 1 + tools/helper.c | 3 ++- tools/wifibrowser.c | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/Panel.h b/include/Panel.h index 9306b72..9d109dd 100644 --- a/include/Panel.h +++ b/include/Panel.h @@ -38,6 +38,7 @@ typedef struct _PanelAppletHelper Panel * panel; PanelAppletType type; GtkIconSize icon_size; + GtkOrientation orientation; char const * (*config_get)(Panel * panel, char const * section, char const * variable); int (*config_set)(Panel * panel, char const * section, diff --git a/src/panel.c b/src/panel.c index 0ae6943..496ea24 100644 --- a/src/panel.c +++ b/src/panel.c @@ -169,6 +169,7 @@ Panel * panel_new(PanelPrefs const * prefs) panel->top_helper.panel = panel; panel->top_helper.type = PANEL_APPLET_TYPE_NORMAL; panel->top_helper.icon_size = GTK_ICON_SIZE_LARGE_TOOLBAR; + panel->top_helper.orientation = GTK_ORIENTATION_HORIZONTAL; panel->top_helper.config_get = _panel_helper_config_get; panel->top_helper.config_set = _panel_helper_config_set; panel->top_helper.error = _panel_helper_error; diff --git a/tools/helper.c b/tools/helper.c index 7df5fc8..6c48948 100644 --- a/tools/helper.c +++ b/tools/helper.c @@ -1,5 +1,5 @@ /* $Id$ */ -/* Copyright (c) 2012-2013 Pierre Pronchery */ +/* Copyright (c) 2012-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 @@ -254,6 +254,7 @@ static void _helper_init(PanelAppletHelper * helper, Panel * panel, helper->panel = panel; helper->type = type; helper->icon_size = iconsize; + helper->orientation = GTK_ORIENTATION_HORIZONTAL; helper->config_get = _panel_helper_config_get; helper->config_set = _panel_helper_config_set; helper->error = _panel_helper_error; diff --git a/tools/wifibrowser.c b/tools/wifibrowser.c index 9e39c7d..402ae19 100644 --- a/tools/wifibrowser.c +++ b/tools/wifibrowser.c @@ -109,6 +109,7 @@ static int _wifibrowser(char const * configfile, char const * interface) helper.panel = &panel; helper.type = PANEL_APPLET_TYPE_NORMAL; helper.icon_size = GTK_ICON_SIZE_MENU; + helper.orientation = GTK_ORIENTATION_HORIZONTAL; helper.error = _error; helper.config_get = _helper_config_get; if((wpa = _wpa_init(&helper, &widget)) == NULL)