From 1628d25244d2d3cc27675908578d209c56213422 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 22 Aug 2011 23:35:03 +0000 Subject: [PATCH] Removed the need for PanelAppletPosition with the new "spacer" plug-in --- Makefile | 1 + include/Panel.h | 7 ---- po/fr.po | 76 ++++++++++++++++++------------------ src/applets/Makefile | 17 +++++++- src/applets/battery.c | 1 - src/applets/bluetooth.c | 1 - src/applets/clock.c | 1 - src/applets/close.c | 1 - src/applets/cpu.c | 1 - src/applets/cpufreq.c | 1 - src/applets/desktop.c | 1 - src/applets/gps.c | 1 - src/applets/gsm.c | 1 - src/applets/keyboard.c | 1 - src/applets/lock.c | 1 - src/applets/logout.c | 1 - src/applets/main.c | 1 - src/applets/memory.c | 1 - src/applets/pager.c | 1 - src/applets/phone.c | 1 - src/applets/project.conf | 10 ++++- src/applets/spacer.c | 64 ++++++++++++++++++++++++++++++ src/applets/swap.c | 1 - src/applets/systray.c | 1 - src/applets/tasks.c | 1 - src/applets/title.c | 1 - src/applets/usb.c | 1 - src/applets/volume.c | 1 - src/applets/wpa_supplicant.c | 1 - src/panel.c | 2 +- src/window.c | 14 +------ src/window.h | 2 +- 32 files changed, 131 insertions(+), 85 deletions(-) create mode 100644 src/applets/spacer.c diff --git a/Makefile b/Makefile index aee772f..c839def 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,7 @@ dist: $(PACKAGE)-$(VERSION)/src/applets/pager.c \ $(PACKAGE)-$(VERSION)/src/applets/phone.c \ $(PACKAGE)-$(VERSION)/src/applets/separator.c \ + $(PACKAGE)-$(VERSION)/src/applets/spacer.c \ $(PACKAGE)-$(VERSION)/src/applets/swap.c \ $(PACKAGE)-$(VERSION)/src/applets/systray.c \ $(PACKAGE)-$(VERSION)/src/applets/tasks.c \ diff --git a/include/Panel.h b/include/Panel.h index cdca729..1f582e8 100644 --- a/include/Panel.h +++ b/include/Panel.h @@ -46,12 +46,6 @@ typedef struct _PanelAppletHelper int (*suspend)(Panel * panel); } PanelAppletHelper; -typedef enum _PanelAppletPosition -{ - PANEL_APPLET_POSITION_START = 0, - PANEL_APPLET_POSITION_END -} PanelAppletPosition; - struct _PanelApplet { PanelAppletHelper * helper; @@ -61,7 +55,6 @@ struct _PanelApplet void (*destroy)(PanelApplet * applet); GtkWidget * (*settings)(PanelApplet * applet, gboolean apply, gboolean reset); - PanelAppletPosition position; gboolean expand; gboolean fill; void * priv; diff --git a/po/fr.po b/po/fr.po index f66ab1c..badaac6 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Panel 0.0.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-08-06 01:55+0200\n" +"POT-Creation-Date: 2011-08-23 01:18+0200\n" "PO-Revision-Date: 2010-04-22 12:45+0200\n" "Last-Translator: Pierre Pronchery \n" "Language-Team: French\n" @@ -17,33 +17,33 @@ msgstr "" "Language: \n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: ../src/applets/battery.c:170 +#: ../src/applets/battery.c:169 msgid "Unknown" msgstr "Inconnu" -#: ../src/applets/battery.c:186 ../src/panel.c:426 ../src/panel.c:431 +#: ../src/applets/battery.c:185 ../src/panel.c:426 ../src/panel.c:431 #: ../src/run.c:214 ../src/run.c:220 msgid "Error" msgstr "Erreur" -#: ../src/applets/battery.c:192 +#: ../src/applets/battery.c:191 #, c-format msgid "Battery level: %.0lf%%%s" msgstr "Batterie : %.0lf%%%s" -#: ../src/applets/battery.c:193 +#: ../src/applets/battery.c:192 msgid " (charging)" msgstr " (en charge)" -#: ../src/applets/bluetooth.c:100 +#: ../src/applets/bluetooth.c:99 msgid "Bluetooth is enabled" msgstr "Bluetooth actif" -#: ../src/applets/clock.c:86 ../src/applets/clock.c:97 +#: ../src/applets/clock.c:85 ../src/applets/clock.c:96 msgid "%H:%M" msgstr "%H:%M" -#: ../src/applets/clock.c:95 +#: ../src/applets/clock.c:94 msgid "" "%H:%M:%S\n" "%d/%m/%Y" @@ -51,121 +51,121 @@ msgstr "" "%H:%M:%S\n" "%d/%m/%Y" -#: ../src/applets/close.c:96 +#: ../src/applets/close.c:95 msgid "Close" msgstr "Fermer" -#: ../src/applets/cpu.c:95 +#: ../src/applets/cpu.c:94 msgid "CPU:" msgstr "" -#: ../src/applets/cpu.c:111 ../src/applets/cpufreq.c:128 -#: ../src/applets/memory.c:105 ../src/applets/swap.c:105 +#: ../src/applets/cpu.c:110 ../src/applets/cpufreq.c:127 +#: ../src/applets/memory.c:104 ../src/applets/swap.c:104 msgid "Unsupported platform" msgstr "Plate-forme non supportée" -#: ../src/applets/cpufreq.c:120 +#: ../src/applets/cpufreq.c:119 msgid "MHz" msgstr "MHz" -#: ../src/applets/desktop.c:66 +#: ../src/applets/desktop.c:65 msgid "Show desktop" msgstr "Afficher le bureau" -#: ../src/applets/gps.c:92 +#: ../src/applets/gps.c:91 msgid "GPS is enabled" msgstr "GPS actif" -#: ../src/applets/gsm.c:99 +#: ../src/applets/gsm.c:98 msgid "GSM is enabled" msgstr "GSM actif" -#: ../src/applets/lock.c:77 ../src/applets/main.c:320 +#: ../src/applets/lock.c:76 ../src/applets/main.c:319 msgid "Lock screen" msgstr "Verrouiller l'écran" -#: ../src/applets/logout.c:61 +#: ../src/applets/logout.c:60 msgid "Logging out is disabled" msgstr "Se déconnecter est désactivé" -#: ../src/applets/logout.c:70 ../src/panel.c:856 ../src/panel.c:863 +#: ../src/applets/logout.c:69 ../src/panel.c:856 ../src/panel.c:863 #: ../src/panel.c:872 msgid "Logout" msgstr "Déconnexion" -#: ../src/applets/main.c:136 +#: ../src/applets/main.c:135 msgid "Main menu" msgstr "Menu principal" -#: ../src/applets/main.c:302 +#: ../src/applets/main.c:301 msgid "Applications" msgstr "Programmes" -#: ../src/applets/main.c:308 +#: ../src/applets/main.c:307 msgid "Run..." msgstr "Exécuter..." -#: ../src/applets/main.c:326 +#: ../src/applets/main.c:325 msgid "Logout..." msgstr "Déconnecter..." -#: ../src/applets/main.c:333 +#: ../src/applets/main.c:332 msgid "Suspend" msgstr "Suspendre" -#: ../src/applets/main.c:338 +#: ../src/applets/main.c:337 msgid "Shutdown..." msgstr "Arrêter..." -#: ../src/applets/memory.c:91 +#: ../src/applets/memory.c:90 msgid "RAM:" msgstr "Mémoire :" -#: ../src/applets/swap.c:91 +#: ../src/applets/swap.c:90 msgid "Swap:" msgstr "Échange :" -#: ../src/applets/tasks.c:459 ../src/applets/title.c:230 +#: ../src/applets/tasks.c:458 ../src/applets/title.c:229 msgid "(Untitled)" msgstr "(Sans titre)" -#: ../src/applets/tasks.c:732 +#: ../src/applets/tasks.c:731 msgid "Move" msgstr "Déplacer" -#: ../src/applets/tasks.c:734 +#: ../src/applets/tasks.c:733 msgid "Resize" msgstr "Redimensionner" -#: ../src/applets/tasks.c:736 +#: ../src/applets/tasks.c:735 msgid "Minimize" msgstr "Réduire" -#: ../src/applets/tasks.c:738 +#: ../src/applets/tasks.c:737 msgid "Shade" msgstr "Masquer" -#: ../src/applets/tasks.c:740 +#: ../src/applets/tasks.c:739 msgid "Stick" msgstr "Attacher" -#: ../src/applets/tasks.c:742 +#: ../src/applets/tasks.c:741 msgid "Maximize horizontally" msgstr "Maximiser horizontalement" -#: ../src/applets/tasks.c:744 +#: ../src/applets/tasks.c:743 msgid "Maximize vertically" msgstr "Maximiser verticalement" -#: ../src/applets/tasks.c:748 +#: ../src/applets/tasks.c:747 msgid "Change desktop" msgstr "Déplacer vers le bureau" -#: ../src/applets/tasks.c:785 +#: ../src/applets/tasks.c:784 msgid "Maximize" msgstr "Maximiser" -#: ../src/applets/usb.c:93 +#: ../src/applets/usb.c:92 msgid "USB networking device connected" msgstr "Périphérique réseau USB connecté" diff --git a/src/applets/Makefile b/src/applets/Makefile index 4ccd866..8375ee3 100644 --- a/src/applets/Makefile +++ b/src/applets/Makefile @@ -1,4 +1,4 @@ -TARGETS = battery.so bluetooth.so clock.so close.so cpu.so cpufreq.so desktop.so gps.so gsm.so keyboard.so lock.so logout.so main.so memory.so pager.so phone.so separator.so swap.so systray.so tasks.so title.so usb.so volume.so wpa_supplicant.so +TARGETS = battery.so bluetooth.so clock.so close.so cpu.so cpufreq.so desktop.so gps.so gsm.so keyboard.so lock.so logout.so main.so memory.so pager.so phone.so separator.so spacer.so swap.so systray.so tasks.so title.so usb.so volume.so wpa_supplicant.so PREFIX = /usr/local DESTDIR = LIBDIR = $(PREFIX)/lib @@ -137,6 +137,13 @@ separator_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) separator.so: $(separator_OBJS) $(LD) -o separator.so $(separator_OBJS) $(separator_LDFLAGS) +spacer_OBJS = spacer.o +spacer_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) +spacer_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) + +spacer.so: $(spacer_OBJS) + $(LD) -o spacer.so $(spacer_OBJS) $(spacer_LDFLAGS) + swap_OBJS = swap.o swap_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) swap_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) @@ -237,6 +244,9 @@ phone.o: phone.c ../../include/Panel.h separator.o: separator.c ../../include/Panel.h $(CC) $(separator_CFLAGS) -c separator.c +spacer.o: spacer.c ../../include/Panel.h + $(CC) $(spacer_CFLAGS) -c spacer.c + swap.o: swap.c ../../include/Panel.h $(CC) $(swap_CFLAGS) -c swap.c @@ -259,7 +269,7 @@ wpa_supplicant.o: wpa_supplicant.c ../../include/Panel.h $(CC) $(wpa_supplicant_CFLAGS) -c wpa_supplicant.c clean: - $(RM) -- $(battery_OBJS) $(bluetooth_OBJS) $(clock_OBJS) $(close_OBJS) $(cpu_OBJS) $(cpufreq_OBJS) $(desktop_OBJS) $(gps_OBJS) $(gsm_OBJS) $(keyboard_OBJS) $(lock_OBJS) $(logout_OBJS) $(main_OBJS) $(memory_OBJS) $(pager_OBJS) $(phone_OBJS) $(separator_OBJS) $(swap_OBJS) $(systray_OBJS) $(tasks_OBJS) $(title_OBJS) $(usb_OBJS) $(volume_OBJS) $(wpa_supplicant_OBJS) + $(RM) -- $(battery_OBJS) $(bluetooth_OBJS) $(clock_OBJS) $(close_OBJS) $(cpu_OBJS) $(cpufreq_OBJS) $(desktop_OBJS) $(gps_OBJS) $(gsm_OBJS) $(keyboard_OBJS) $(lock_OBJS) $(logout_OBJS) $(main_OBJS) $(memory_OBJS) $(pager_OBJS) $(phone_OBJS) $(separator_OBJS) $(spacer_OBJS) $(swap_OBJS) $(systray_OBJS) $(tasks_OBJS) $(title_OBJS) $(usb_OBJS) $(volume_OBJS) $(wpa_supplicant_OBJS) distclean: clean $(RM) -- $(TARGETS) @@ -300,6 +310,8 @@ install: $(TARGETS) $(MKDIR) $(DESTDIR)$(LIBDIR)/Panel/applets $(INSTALL) -m 0644 -- separator.so $(DESTDIR)$(LIBDIR)/Panel/applets/separator.so $(MKDIR) $(DESTDIR)$(LIBDIR)/Panel/applets + $(INSTALL) -m 0644 -- spacer.so $(DESTDIR)$(LIBDIR)/Panel/applets/spacer.so + $(MKDIR) $(DESTDIR)$(LIBDIR)/Panel/applets $(INSTALL) -m 0644 -- swap.so $(DESTDIR)$(LIBDIR)/Panel/applets/swap.so $(MKDIR) $(DESTDIR)$(LIBDIR)/Panel/applets $(INSTALL) -m 0644 -- systray.so $(DESTDIR)$(LIBDIR)/Panel/applets/systray.so @@ -332,6 +344,7 @@ uninstall: $(RM) -- $(DESTDIR)$(LIBDIR)/Panel/applets/pager.so $(RM) -- $(DESTDIR)$(LIBDIR)/Panel/applets/phone.so $(RM) -- $(DESTDIR)$(LIBDIR)/Panel/applets/separator.so + $(RM) -- $(DESTDIR)$(LIBDIR)/Panel/applets/spacer.so $(RM) -- $(DESTDIR)$(LIBDIR)/Panel/applets/swap.so $(RM) -- $(DESTDIR)$(LIBDIR)/Panel/applets/systray.so $(RM) -- $(DESTDIR)$(LIBDIR)/Panel/applets/tasks.so diff --git a/src/applets/battery.c b/src/applets/battery.c index 973d33a..077bc51 100644 --- a/src/applets/battery.c +++ b/src/applets/battery.c @@ -94,7 +94,6 @@ PanelApplet applet = _battery_init, _battery_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/bluetooth.c b/src/applets/bluetooth.c index b5e8714..6a0d1e1 100644 --- a/src/applets/bluetooth.c +++ b/src/applets/bluetooth.c @@ -71,7 +71,6 @@ PanelApplet applet = _bluetooth_init, _bluetooth_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/clock.c b/src/applets/clock.c index b08c667..df28d91 100644 --- a/src/applets/clock.c +++ b/src/applets/clock.c @@ -57,7 +57,6 @@ PanelApplet applet = _clock_init, _clock_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/close.c b/src/applets/close.c index 610a4cf..c9727fc 100644 --- a/src/applets/close.c +++ b/src/applets/close.c @@ -71,7 +71,6 @@ PanelApplet applet = _close_init, _close_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/cpu.c b/src/applets/cpu.c index 89b6a4c..ad4ae50 100644 --- a/src/applets/cpu.c +++ b/src/applets/cpu.c @@ -64,7 +64,6 @@ PanelApplet applet = _cpu_init, _cpu_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/cpufreq.c b/src/applets/cpufreq.c index 745435c..18d78cd 100644 --- a/src/applets/cpufreq.c +++ b/src/applets/cpufreq.c @@ -66,7 +66,6 @@ PanelApplet applet = _cpufreq_init, _cpufreq_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/desktop.c b/src/applets/desktop.c index e115ad0..c860276 100644 --- a/src/applets/desktop.c +++ b/src/applets/desktop.c @@ -42,7 +42,6 @@ PanelApplet applet = _desktop_init, NULL, NULL, - PANEL_APPLET_POSITION_START, FALSE, TRUE, NULL diff --git a/src/applets/gps.c b/src/applets/gps.c index 261afb4..3f4a6b5 100644 --- a/src/applets/gps.c +++ b/src/applets/gps.c @@ -63,7 +63,6 @@ PanelApplet applet = _gps_init, _gps_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/gsm.c b/src/applets/gsm.c index 5cbaf96..1b2a98c 100644 --- a/src/applets/gsm.c +++ b/src/applets/gsm.c @@ -68,7 +68,6 @@ PanelApplet applet = _gsm_init, _gsm_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/keyboard.c b/src/applets/keyboard.c index 87eb8b6..096b1a5 100644 --- a/src/applets/keyboard.c +++ b/src/applets/keyboard.c @@ -71,7 +71,6 @@ PanelApplet applet = _keyboard_init, _keyboard_destroy, _keyboard_settings, - PANEL_APPLET_POSITION_START, FALSE, TRUE, NULL diff --git a/src/applets/lock.c b/src/applets/lock.c index dbcee4a..cf86eaa 100644 --- a/src/applets/lock.c +++ b/src/applets/lock.c @@ -52,7 +52,6 @@ PanelApplet applet = _lock_init, _lock_destroy, _lock_settings, - PANEL_APPLET_POSITION_START, FALSE, TRUE, NULL diff --git a/src/applets/logout.c b/src/applets/logout.c index eb3c901..0f42304 100644 --- a/src/applets/logout.c +++ b/src/applets/logout.c @@ -40,7 +40,6 @@ PanelApplet applet = _logout_init, NULL, NULL, - PANEL_APPLET_POSITION_START, FALSE, TRUE, NULL diff --git a/src/applets/main.c b/src/applets/main.c index d35137f..6e2bf3a 100644 --- a/src/applets/main.c +++ b/src/applets/main.c @@ -104,7 +104,6 @@ PanelApplet applet = _main_init, _main_destroy, NULL, - PANEL_APPLET_POSITION_START, FALSE, TRUE, NULL diff --git a/src/applets/memory.c b/src/applets/memory.c index c677ada..03b6df7 100644 --- a/src/applets/memory.c +++ b/src/applets/memory.c @@ -60,7 +60,6 @@ PanelApplet applet = _memory_init, _memory_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/pager.c b/src/applets/pager.c index 627876e..fc9edd6 100644 --- a/src/applets/pager.c +++ b/src/applets/pager.c @@ -91,7 +91,6 @@ PanelApplet applet = _pager_init, _pager_destroy, NULL, - PANEL_APPLET_POSITION_START, FALSE, TRUE, NULL diff --git a/src/applets/phone.c b/src/applets/phone.c index 0987fd1..9bdf3f4 100644 --- a/src/applets/phone.c +++ b/src/applets/phone.c @@ -53,7 +53,6 @@ PanelApplet applet = _phone_init, NULL, NULL, - PANEL_APPLET_POSITION_START, FALSE, TRUE, NULL diff --git a/src/applets/project.conf b/src/applets/project.conf index 920a5fe..af436b1 100644 --- a/src/applets/project.conf +++ b/src/applets/project.conf @@ -1,4 +1,4 @@ -targets=battery,bluetooth,clock,close,cpu,cpufreq,desktop,gps,gsm,keyboard,lock,logout,main,memory,pager,phone,separator,swap,systray,tasks,title,usb,volume,wpa_supplicant +targets=battery,bluetooth,clock,close,cpu,cpufreq,desktop,gps,gsm,keyboard,lock,logout,main,memory,pager,phone,separator,spacer,swap,systray,tasks,title,usb,volume,wpa_supplicant cppflags_force=-I ../../include #cppflags=-D EMBEDDED cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0` -fPIC @@ -142,6 +142,14 @@ install=$(LIBDIR)/Panel/applets [separator.c] depends=../../include/Panel.h +[spacer] +type=plugin +sources=spacer.c +install=$(LIBDIR)/Panel/applets + +[spacer.c] +depends=../../include/Panel.h + [swap] type=plugin sources=swap.c diff --git a/src/applets/spacer.c b/src/applets/spacer.c new file mode 100644 index 0000000..2b847ab --- /dev/null +++ b/src/applets/spacer.c @@ -0,0 +1,64 @@ +/* $Id$ */ +/* Copyright (c) 2011 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 + * the Free Software Foundation, version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + + + +#include "Panel.h" + + +/* spacer */ +/* private */ +/* prototypes */ +/* plug-in */ +static GtkWidget * _spacer_init(PanelApplet * applet); +static void _spacer_destroy(PanelApplet * applet); + + +/* public */ +/* variables */ +PanelApplet applet = +{ + NULL, + "Spacer", + NULL, + _spacer_init, + _spacer_destroy, + NULL, + TRUE, + TRUE, + NULL +}; + + +/* private */ +/* functions */ +static GtkWidget * _spacer_init(PanelApplet * applet) +{ + GtkWidget * widget; + + widget = gtk_label_new(NULL); + applet->priv = widget; + gtk_widget_show(widget); + return widget; +} + + +/* spacer_destroy */ +static void _spacer_destroy(PanelApplet * applet) +{ + GtkWidget * widget = applet->priv; + + gtk_widget_destroy(widget); +} diff --git a/src/applets/swap.c b/src/applets/swap.c index cdcd65f..88672cd 100644 --- a/src/applets/swap.c +++ b/src/applets/swap.c @@ -60,7 +60,6 @@ PanelApplet applet = _swap_init, _swap_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/systray.c b/src/applets/systray.c index e2bcade..bd3ac78 100644 --- a/src/applets/systray.c +++ b/src/applets/systray.c @@ -66,7 +66,6 @@ PanelApplet applet = _systray_init, _systray_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/tasks.c b/src/applets/tasks.c index 98f9b15..2f2f33b 100644 --- a/src/applets/tasks.c +++ b/src/applets/tasks.c @@ -141,7 +141,6 @@ PanelApplet applet = _tasks_init, _tasks_destroy, NULL, - PANEL_APPLET_POSITION_START, #ifndef EMBEDDED TRUE, #else diff --git a/src/applets/title.c b/src/applets/title.c index 944740f..aeb7654 100644 --- a/src/applets/title.c +++ b/src/applets/title.c @@ -75,7 +75,6 @@ PanelApplet applet = _title_init, _title_destroy, NULL, - PANEL_APPLET_POSITION_START, FALSE, TRUE, NULL diff --git a/src/applets/usb.c b/src/applets/usb.c index 7f5b7da..af87222 100644 --- a/src/applets/usb.c +++ b/src/applets/usb.c @@ -66,7 +66,6 @@ PanelApplet applet = _usb_init, _usb_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/volume.c b/src/applets/volume.c index 865e5c8..5552546 100644 --- a/src/applets/volume.c +++ b/src/applets/volume.c @@ -51,7 +51,6 @@ PanelApplet applet = _volume_init, _volume_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/applets/wpa_supplicant.c b/src/applets/wpa_supplicant.c index 4f32125..6e712c6 100644 --- a/src/applets/wpa_supplicant.c +++ b/src/applets/wpa_supplicant.c @@ -89,7 +89,6 @@ PanelApplet applet = _wpa_init, _wpa_destroy, NULL, - PANEL_APPLET_POSITION_END, FALSE, TRUE, NULL diff --git a/src/panel.c b/src/panel.c index 27c4447..eb7119b 100644 --- a/src/panel.c +++ b/src/panel.c @@ -487,7 +487,7 @@ int panel_load(Panel * panel, PanelPosition position, char const * applet) plugin_delete(plugin); return -1; } - panel_window_append(window, widget, pa->expand, pa->fill, pa->position); + panel_window_append(window, widget, pa->expand, pa->fill); if(pa->settings != NULL && (widget = pa->settings(pa, FALSE, FALSE)) != NULL) { diff --git a/src/window.c b/src/window.c index ab57693..36f162c 100644 --- a/src/window.c +++ b/src/window.c @@ -150,17 +150,7 @@ int panel_window_get_height(PanelWindow * panel) /* useful */ void panel_window_append(PanelWindow * panel, GtkWidget * widget, - gboolean expand, gboolean fill, PanelAppletPosition position) + gboolean expand, gboolean fill) { - switch(position) - { - case PANEL_APPLET_POSITION_END: - gtk_box_pack_end(GTK_BOX(panel->hbox), widget, expand, - fill, 0); - break; - case PANEL_APPLET_POSITION_START: - gtk_box_pack_start(GTK_BOX(panel->hbox), widget, expand, - fill, 0); - break; - } + gtk_box_pack_start(GTK_BOX(panel->hbox), widget, expand, fill, 0); } diff --git a/src/window.h b/src/window.h index d243862..0126940 100644 --- a/src/window.h +++ b/src/window.h @@ -36,6 +36,6 @@ int panel_window_get_height(PanelWindow * panel); /* useful */ void panel_window_append(PanelWindow * panel, GtkWidget * widget, - gboolean expand, gboolean fill, PanelAppletPosition position); + gboolean expand, gboolean fill); #endif /* !PANEL_WINDOW_H */