Renamed "panel-settings" to "panelctl" (with the "-S" flag)
This commit is contained in:
parent
abd153174f
commit
6b003bb0d6
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Name=Panel settings
|
||||
Exec=panel-settings
|
||||
Exec=panelctl -S
|
||||
Icon=panel-settings
|
||||
Type=Application
|
||||
Categories=Settings;GTK;
|
||||
|
|
16
po/fr.po
16
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-09-09 19:20+0200\n"
|
||||
"POT-Creation-Date: 2011-10-27 16:31+0200\n"
|
||||
"PO-Revision-Date: 2010-04-22 12:45+0200\n"
|
||||
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
|
||||
"Language-Team: French\n"
|
||||
|
@ -88,8 +88,8 @@ msgstr "Verrouiller l'écran"
|
|||
msgid "Logging out is disabled"
|
||||
msgstr "Se déconnecter est désactivé"
|
||||
|
||||
#: ../src/applets/logout.c:69 ../src/panel.c:1278 ../src/panel.c:1285
|
||||
#: ../src/panel.c:1294
|
||||
#: ../src/applets/logout.c:69 ../src/panel.c:1282 ../src/panel.c:1289
|
||||
#: ../src/panel.c:1298
|
||||
msgid "Logout"
|
||||
msgstr "Déconnexion"
|
||||
|
||||
|
@ -223,7 +223,7 @@ msgstr "Panneau inférieur :"
|
|||
msgid "translator-credits"
|
||||
msgstr "Pierre Pronchery <khorben@defora.org>"
|
||||
|
||||
#: ../src/panel.c:1264
|
||||
#: ../src/panel.c:1268
|
||||
msgid ""
|
||||
"This will log you out of the current session, therefore closing any "
|
||||
"application currently opened and losing any unsaved data.\n"
|
||||
|
@ -234,7 +234,7 @@ msgstr ""
|
|||
"sauvegardées.\n"
|
||||
"Voulez-vous continuer?"
|
||||
|
||||
#: ../src/panel.c:1380
|
||||
#: ../src/panel.c:1384
|
||||
msgid ""
|
||||
"This will shutdown your device, therefore closing any application currently "
|
||||
"opened and losing any unsaved data.\n"
|
||||
|
@ -245,7 +245,7 @@ msgstr ""
|
|||
"sauvegardées.\n"
|
||||
"Voulez-vous continuer?"
|
||||
|
||||
#: ../src/panel.c:1385
|
||||
#: ../src/panel.c:1389
|
||||
msgid ""
|
||||
"This will shutdown your computer, therefore closing any application "
|
||||
"currently opened and losing any unsaved data.\n"
|
||||
|
@ -256,11 +256,11 @@ msgstr ""
|
|||
"sauvegardées.\n"
|
||||
"Voulez-vous continuer?"
|
||||
|
||||
#: ../src/panel.c:1399 ../src/panel.c:1406 ../src/panel.c:1415
|
||||
#: ../src/panel.c:1403 ../src/panel.c:1410 ../src/panel.c:1419
|
||||
msgid "Shutdown"
|
||||
msgstr "Arrêter"
|
||||
|
||||
#: ../src/panel.c:1405
|
||||
#: ../src/panel.c:1409
|
||||
msgid "Restart"
|
||||
msgstr "Redémarrer"
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
panel
|
||||
panel-settings
|
||||
panelctl
|
||||
run
|
||||
|
|
24
src/Makefile
24
src/Makefile
|
@ -1,5 +1,5 @@
|
|||
SUBDIRS = applets
|
||||
TARGETS = panel panel-settings run
|
||||
TARGETS = panel panelctl run
|
||||
PREFIX = /usr/local
|
||||
DESTDIR =
|
||||
BINDIR = $(PREFIX)/bin
|
||||
|
@ -26,12 +26,12 @@ panel_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) `pkg-config --libs libSystem libDesktop`
|
|||
panel: $(panel_OBJS)
|
||||
$(CC) -o panel $(panel_OBJS) $(panel_LDFLAGS)
|
||||
|
||||
panel-settings_OBJS = settings.o
|
||||
panel-settings_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) `pkg-config --cflags gtk+-2.0`
|
||||
panel-settings_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) `pkg-config --libs gtk+-2.0`
|
||||
panelctl_OBJS = panelctl.o
|
||||
panelctl_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) `pkg-config --cflags gtk+-2.0`
|
||||
panelctl_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) `pkg-config --libs gtk+-2.0`
|
||||
|
||||
panel-settings: $(panel-settings_OBJS)
|
||||
$(CC) -o panel-settings $(panel-settings_OBJS) $(panel-settings_LDFLAGS)
|
||||
panelctl: $(panelctl_OBJS)
|
||||
$(CC) -o panelctl $(panelctl_OBJS) $(panelctl_LDFLAGS)
|
||||
|
||||
run_OBJS = run.o
|
||||
run_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) -D PREFIX=\"$(PREFIX)\" $(CFLAGSF) $(CFLAGS) `pkg-config --cflags libSystem gtk+-2.0`
|
||||
|
@ -49,19 +49,19 @@ window.o: window.c common.h window.h
|
|||
main.o: main.c common.h ../config.h
|
||||
$(CC) $(panel_CFLAGS) -c main.c
|
||||
|
||||
settings.o: settings.c
|
||||
$(CC) $(panel-settings_CFLAGS) -c settings.c
|
||||
panelctl.o: panelctl.c
|
||||
$(CC) $(panelctl_CFLAGS) -c panelctl.c
|
||||
|
||||
run.o: run.c
|
||||
$(CC) $(run_CFLAGS) -c run.c
|
||||
|
||||
clean:
|
||||
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done
|
||||
$(RM) -- $(panel_OBJS) $(panel-settings_OBJS) $(run_OBJS)
|
||||
$(RM) -- $(panel_OBJS) $(panelctl_OBJS) $(run_OBJS)
|
||||
|
||||
distclean:
|
||||
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) distclean) || exit; done
|
||||
$(RM) -- $(panel_OBJS) $(panel-settings_OBJS) $(run_OBJS)
|
||||
$(RM) -- $(panel_OBJS) $(panelctl_OBJS) $(run_OBJS)
|
||||
$(RM) -- $(TARGETS)
|
||||
|
||||
install: $(TARGETS)
|
||||
|
@ -69,14 +69,14 @@ install: $(TARGETS)
|
|||
$(MKDIR) $(DESTDIR)$(BINDIR)
|
||||
$(INSTALL) -m 0755 -- panel $(DESTDIR)$(BINDIR)/panel
|
||||
$(MKDIR) $(DESTDIR)$(BINDIR)
|
||||
$(INSTALL) -m 0755 -- panel-settings $(DESTDIR)$(BINDIR)/panel-settings
|
||||
$(INSTALL) -m 0755 -- panelctl $(DESTDIR)$(BINDIR)/panelctl
|
||||
$(MKDIR) $(DESTDIR)$(BINDIR)
|
||||
$(INSTALL) -m 0755 -- run $(DESTDIR)$(BINDIR)/run
|
||||
|
||||
uninstall:
|
||||
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit; done
|
||||
$(RM) -- $(DESTDIR)$(BINDIR)/panel
|
||||
$(RM) -- $(DESTDIR)$(BINDIR)/panel-settings
|
||||
$(RM) -- $(DESTDIR)$(BINDIR)/panelctl
|
||||
$(RM) -- $(DESTDIR)$(BINDIR)/run
|
||||
|
||||
.PHONY: all subdirs clean distclean install uninstall
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* $Id$ */
|
||||
/* Copyright (c) 2010 Pierre Pronchery <khorben@defora.org> */
|
||||
/* Copyright (c) 2011 Pierre Pronchery <khorben@defora.org> */
|
||||
/* 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
|
||||
|
|
|
@ -22,28 +22,19 @@
|
|||
#include "common.h"
|
||||
|
||||
|
||||
/* usage */
|
||||
static int _usage(void)
|
||||
{
|
||||
fputs("Usage: panel-settings\n", stderr);
|
||||
return 1;
|
||||
}
|
||||
/* panelctl */
|
||||
/* private */
|
||||
/* prototypes */
|
||||
static int _panelctl(PanelMessageShow show);
|
||||
static int _usage(void);
|
||||
|
||||
|
||||
/* main */
|
||||
int main(int argc, char * argv[])
|
||||
/* functions */
|
||||
static int _panelctl(PanelMessageShow show)
|
||||
{
|
||||
int o;
|
||||
GdkEvent event;
|
||||
GdkEventClient * client = &event.client;
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
while((o = getopt(argc, argv, "")) != -1)
|
||||
switch(o)
|
||||
{
|
||||
default:
|
||||
return _usage();
|
||||
}
|
||||
memset(&event, 0, sizeof(event));
|
||||
client->type = GDK_CLIENT_EVENT;
|
||||
client->window = NULL;
|
||||
|
@ -51,8 +42,41 @@ int main(int argc, char * argv[])
|
|||
client->message_type = gdk_atom_intern(PANEL_CLIENT_MESSAGE, FALSE);
|
||||
client->data_format = 8;
|
||||
client->data.b[0] = PANEL_MESSAGE_SHOW;
|
||||
client->data.b[1] = PANEL_MESSAGE_SHOW_SETTINGS;
|
||||
client->data.b[1] = show;
|
||||
client->data.b[2] = TRUE;
|
||||
gdk_event_send_clientmessage_toall(&event);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* usage */
|
||||
static int _usage(void)
|
||||
{
|
||||
fputs("Usage: panelctl -S\n"
|
||||
" -S Display or change settings\n", stderr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* public */
|
||||
/* functions */
|
||||
/* main */
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
int o;
|
||||
int show = -1;
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
while((o = getopt(argc, argv, "S")) != -1)
|
||||
switch(o)
|
||||
{
|
||||
case 'S':
|
||||
show = PANEL_MESSAGE_SHOW_SETTINGS;
|
||||
break;
|
||||
default:
|
||||
return _usage();
|
||||
}
|
||||
if(argc != optind || show < 0)
|
||||
return _usage();
|
||||
return (_panelctl(show) == 0) ? 0 : 2;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
subdirs=applets
|
||||
targets=panel,panel-settings,run
|
||||
targets=panel,panelctl,run
|
||||
cppflags_force=-I ../include
|
||||
#cppflags=-D EMBEDDED
|
||||
cflags_force=-W
|
||||
|
@ -23,9 +23,9 @@ depends=common.h,window.h,../include/Panel.h,../config.h
|
|||
[window.c]
|
||||
depends=common.h,window.h
|
||||
|
||||
[panel-settings]
|
||||
[panelctl]
|
||||
type=binary
|
||||
sources=settings.c
|
||||
sources=panelctl.c
|
||||
cflags=`pkg-config --cflags gtk+-2.0`
|
||||
ldflags=`pkg-config --libs gtk+-2.0`
|
||||
install=$(BINDIR)
|
||||
|
|
Loading…
Reference in New Issue
Block a user