Added an executable to display the panel settings
This commit is contained in:
parent
283a0e63aa
commit
1fe4e3e8a4
7
Makefile
7
Makefile
|
@ -22,21 +22,27 @@ dist:
|
|||
$(LN) -s -- . $(PACKAGE)-$(VERSION)
|
||||
@$(TAR) $(PACKAGE)-$(VERSION).tar.gz -- \
|
||||
$(PACKAGE)-$(VERSION)/data/Makefile \
|
||||
$(PACKAGE)-$(VERSION)/data/panel-settings.desktop \
|
||||
$(PACKAGE)-$(VERSION)/data/project.conf \
|
||||
$(PACKAGE)-$(VERSION)/data/16x16/Makefile \
|
||||
$(PACKAGE)-$(VERSION)/data/16x16/panel-applet-bluetooth.png \
|
||||
$(PACKAGE)-$(VERSION)/data/16x16/panel-settings.png \
|
||||
$(PACKAGE)-$(VERSION)/data/16x16/project.conf \
|
||||
$(PACKAGE)-$(VERSION)/data/22x22/Makefile \
|
||||
$(PACKAGE)-$(VERSION)/data/22x22/panel-applet-bluetooth.png \
|
||||
$(PACKAGE)-$(VERSION)/data/22x22/panel-settings.png \
|
||||
$(PACKAGE)-$(VERSION)/data/22x22/project.conf \
|
||||
$(PACKAGE)-$(VERSION)/data/24x24/Makefile \
|
||||
$(PACKAGE)-$(VERSION)/data/24x24/panel-applet-bluetooth.png \
|
||||
$(PACKAGE)-$(VERSION)/data/24x24/panel-settings.png \
|
||||
$(PACKAGE)-$(VERSION)/data/24x24/project.conf \
|
||||
$(PACKAGE)-$(VERSION)/data/32x32/Makefile \
|
||||
$(PACKAGE)-$(VERSION)/data/32x32/panel-applet-bluetooth.png \
|
||||
$(PACKAGE)-$(VERSION)/data/32x32/panel-settings.png \
|
||||
$(PACKAGE)-$(VERSION)/data/32x32/project.conf \
|
||||
$(PACKAGE)-$(VERSION)/data/48x48/Makefile \
|
||||
$(PACKAGE)-$(VERSION)/data/48x48/panel-applet-bluetooth.png \
|
||||
$(PACKAGE)-$(VERSION)/data/48x48/panel-settings.png \
|
||||
$(PACKAGE)-$(VERSION)/data/48x48/project.conf \
|
||||
$(PACKAGE)-$(VERSION)/data/scalable/Makefile \
|
||||
$(PACKAGE)-$(VERSION)/data/scalable/panel-applet-bluetooth.svg \
|
||||
|
@ -52,6 +58,7 @@ dist:
|
|||
$(PACKAGE)-$(VERSION)/src/panel.c \
|
||||
$(PACKAGE)-$(VERSION)/src/window.c \
|
||||
$(PACKAGE)-$(VERSION)/src/main.c \
|
||||
$(PACKAGE)-$(VERSION)/src/settings.c \
|
||||
$(PACKAGE)-$(VERSION)/src/run.c \
|
||||
$(PACKAGE)-$(VERSION)/src/Makefile \
|
||||
$(PACKAGE)-$(VERSION)/src/common.h \
|
||||
|
|
|
@ -14,8 +14,11 @@ distclean: clean
|
|||
install:
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps
|
||||
$(INSTALL) -m 0644 -- panel-applet-bluetooth.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/panel-applet-bluetooth.png
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps
|
||||
$(INSTALL) -m 0644 -- panel-settings.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/panel-settings.png
|
||||
|
||||
uninstall:
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/panel-applet-bluetooth.png
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/panel-settings.png
|
||||
|
||||
.PHONY: all clean distclean install uninstall
|
||||
|
|
BIN
data/16x16/panel-settings.png
Normal file
BIN
data/16x16/panel-settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 354 B |
|
@ -1,4 +1,7 @@
|
|||
dist=Makefile,panel-applet-bluetooth.png
|
||||
dist=Makefile,panel-applet-bluetooth.png,panel-settings.png
|
||||
|
||||
[panel-applet-bluetooth.png]
|
||||
install=$(PREFIX)/share/icons/hicolor/16x16/apps
|
||||
|
||||
[panel-settings.png]
|
||||
install=$(PREFIX)/share/icons/hicolor/16x16/apps
|
||||
|
|
|
@ -14,8 +14,11 @@ distclean: clean
|
|||
install:
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/22x22/apps
|
||||
$(INSTALL) -m 0644 -- panel-applet-bluetooth.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/22x22/apps/panel-applet-bluetooth.png
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/22x22/apps
|
||||
$(INSTALL) -m 0644 -- panel-settings.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/22x22/apps/panel-settings.png
|
||||
|
||||
uninstall:
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/22x22/apps/panel-applet-bluetooth.png
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/22x22/apps/panel-settings.png
|
||||
|
||||
.PHONY: all clean distclean install uninstall
|
||||
|
|
BIN
data/22x22/panel-settings.png
Normal file
BIN
data/22x22/panel-settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 394 B |
|
@ -1,4 +1,7 @@
|
|||
dist=Makefile,panel-applet-bluetooth.png
|
||||
dist=Makefile,panel-applet-bluetooth.png,panel-settings.png
|
||||
|
||||
[panel-applet-bluetooth.png]
|
||||
install=$(PREFIX)/share/icons/hicolor/22x22/apps
|
||||
|
||||
[panel-settings.png]
|
||||
install=$(PREFIX)/share/icons/hicolor/22x22/apps
|
||||
|
|
|
@ -14,8 +14,11 @@ distclean: clean
|
|||
install:
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps
|
||||
$(INSTALL) -m 0644 -- panel-applet-bluetooth.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/panel-applet-bluetooth.png
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps
|
||||
$(INSTALL) -m 0644 -- panel-settings.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/panel-settings.png
|
||||
|
||||
uninstall:
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/panel-applet-bluetooth.png
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/panel-settings.png
|
||||
|
||||
.PHONY: all clean distclean install uninstall
|
||||
|
|
BIN
data/24x24/panel-settings.png
Normal file
BIN
data/24x24/panel-settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 430 B |
|
@ -1,4 +1,7 @@
|
|||
dist=Makefile,panel-applet-bluetooth.png
|
||||
dist=Makefile,panel-applet-bluetooth.png,panel-settings.png
|
||||
|
||||
[panel-applet-bluetooth.png]
|
||||
install=$(PREFIX)/share/icons/hicolor/24x24/apps
|
||||
|
||||
[panel-settings.png]
|
||||
install=$(PREFIX)/share/icons/hicolor/24x24/apps
|
||||
|
|
|
@ -14,8 +14,11 @@ distclean: clean
|
|||
install:
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps
|
||||
$(INSTALL) -m 0644 -- panel-applet-bluetooth.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps/panel-applet-bluetooth.png
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps
|
||||
$(INSTALL) -m 0644 -- panel-settings.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps/panel-settings.png
|
||||
|
||||
uninstall:
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps/panel-applet-bluetooth.png
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps/panel-settings.png
|
||||
|
||||
.PHONY: all clean distclean install uninstall
|
||||
|
|
BIN
data/32x32/panel-settings.png
Normal file
BIN
data/32x32/panel-settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
|
@ -1,4 +1,7 @@
|
|||
dist=Makefile,panel-applet-bluetooth.png
|
||||
dist=Makefile,panel-applet-bluetooth.png,panel-settings.png
|
||||
|
||||
[panel-applet-bluetooth.png]
|
||||
install=$(PREFIX)/share/icons/hicolor/32x32/apps
|
||||
|
||||
[panel-settings.png]
|
||||
install=$(PREFIX)/share/icons/hicolor/32x32/apps
|
||||
|
|
|
@ -14,8 +14,11 @@ distclean: clean
|
|||
install:
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
|
||||
$(INSTALL) -m 0644 -- panel-applet-bluetooth.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/panel-applet-bluetooth.png
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
|
||||
$(INSTALL) -m 0644 -- panel-settings.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/panel-settings.png
|
||||
|
||||
uninstall:
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/panel-applet-bluetooth.png
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/panel-settings.png
|
||||
|
||||
.PHONY: all clean distclean install uninstall
|
||||
|
|
BIN
data/48x48/panel-settings.png
Normal file
BIN
data/48x48/panel-settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -1,4 +1,7 @@
|
|||
dist=Makefile,panel-applet-bluetooth.png
|
||||
dist=Makefile,panel-applet-bluetooth.png,panel-settings.png
|
||||
|
||||
[panel-applet-bluetooth.png]
|
||||
install=$(PREFIX)/share/icons/hicolor/48x48/apps
|
||||
|
||||
[panel-settings.png]
|
||||
install=$(PREFIX)/share/icons/hicolor/48x48/apps
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
SUBDIRS = 16x16 22x22 24x24 32x32 48x48 scalable
|
||||
PREFIX = /usr/local
|
||||
DESTDIR =
|
||||
MKDIR = mkdir -p
|
||||
INSTALL = install
|
||||
RM = rm -f
|
||||
|
||||
|
||||
all: subdirs
|
||||
|
@ -14,8 +19,11 @@ distclean:
|
|||
|
||||
install:
|
||||
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) install) || exit; done
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/applications
|
||||
$(INSTALL) -m 0644 -- panel-settings.desktop $(DESTDIR)$(PREFIX)/share/applications/panel-settings.desktop
|
||||
|
||||
uninstall:
|
||||
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit; done
|
||||
$(RM) -- $(DESTDIR)$(PREFIX)/share/applications/panel-settings.desktop
|
||||
|
||||
.PHONY: all subdirs clean distclean install uninstall
|
||||
|
|
6
data/panel-settings.desktop
Normal file
6
data/panel-settings.desktop
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Name=Panel settings
|
||||
Exec=panel-settings
|
||||
Icon=panel-settings
|
||||
Type=Application
|
||||
Categories=Settings;GTK;
|
|
@ -1,2 +1,5 @@
|
|||
subdirs=16x16,22x22,24x24,32x32,48x48,scalable
|
||||
dist=Makefile
|
||||
dist=Makefile,panel-settings.desktop
|
||||
|
||||
[panel-settings.desktop]
|
||||
install=$(PREFIX)/share/applications
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
.cvsignore
|
||||
panel
|
||||
panel-settings
|
||||
run
|
||||
|
|
19
src/Makefile
19
src/Makefile
|
@ -1,5 +1,5 @@
|
|||
SUBDIRS = applets
|
||||
TARGETS = panel run
|
||||
TARGETS = panel panel-settings run
|
||||
PREFIX = /usr/local
|
||||
DESTDIR =
|
||||
BINDIR = $(PREFIX)/bin
|
||||
|
@ -28,6 +28,13 @@ panel_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
|
|||
panel: $(panel_OBJS)
|
||||
$(CC) -o panel $(panel_OBJS) $(panel_LDFLAGS)
|
||||
|
||||
panel-settings_OBJS = settings.o
|
||||
panel-settings_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
||||
panel-settings_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
|
||||
|
||||
panel-settings: $(panel-settings_OBJS)
|
||||
$(CC) -o panel-settings $(panel-settings_OBJS) $(panel-settings_LDFLAGS)
|
||||
|
||||
run_OBJS = run.o
|
||||
run_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) -D PREFIX=\"$(PREFIX)\" $(CFLAGSF) $(CFLAGS)
|
||||
run_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
|
||||
|
@ -44,16 +51,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
|
||||
|
||||
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) $(run_OBJS)
|
||||
$(RM) -- $(panel_OBJS) $(panel-settings_OBJS) $(run_OBJS)
|
||||
|
||||
distclean:
|
||||
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) distclean) || exit; done
|
||||
$(RM) -- $(panel_OBJS) $(run_OBJS)
|
||||
$(RM) -- $(panel_OBJS) $(panel-settings_OBJS) $(run_OBJS)
|
||||
$(RM) -- $(TARGETS)
|
||||
|
||||
install: $(TARGETS)
|
||||
|
@ -61,11 +71,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
|
||||
$(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)/run
|
||||
|
||||
.PHONY: all subdirs clean distclean install uninstall
|
||||
|
|
25
src/common.h
25
src/common.h
|
@ -24,6 +24,16 @@
|
|||
|
||||
/* Panel */
|
||||
/* types */
|
||||
typedef enum _PanelMessage
|
||||
{
|
||||
PANEL_MESSAGE_SHOW = 0
|
||||
} PanelMessage;
|
||||
|
||||
typedef enum _PanelMessageShow
|
||||
{
|
||||
PANEL_MESSAGE_SHOW_SETTINGS = 0
|
||||
} PanelMessageShow;
|
||||
|
||||
typedef enum _PanelPosition
|
||||
{
|
||||
PANEL_POSITION_BOTTOM = 0x1,
|
||||
|
@ -41,12 +51,15 @@ typedef struct _PanelPrefs
|
|||
|
||||
|
||||
/* constants */
|
||||
#define PANEL_BORDER_WIDTH 4
|
||||
#define PANEL_ICON_SIZE_DEFAULT GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
#define PANEL_ICON_SIZE_UNSET GTK_ICON_SIZE_INVALID
|
||||
#define PANEL_ICON_SIZE_SMALL GTK_ICON_SIZE_SMALL_TOOLBAR
|
||||
#define PANEL_ICON_SIZE_SMALLER GTK_ICON_SIZE_MENU
|
||||
#define PANEL_ICON_SIZE_LARGE GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
# define PANEL_BORDER_WIDTH 4
|
||||
|
||||
# define PANEL_CLIENT_MESSAGE "DEFORAOS_DESKTOP_PANEL_CLIENT"
|
||||
|
||||
# define PANEL_ICON_SIZE_DEFAULT GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
# define PANEL_ICON_SIZE_UNSET GTK_ICON_SIZE_INVALID
|
||||
# define PANEL_ICON_SIZE_SMALL GTK_ICON_SIZE_SMALL_TOOLBAR
|
||||
# define PANEL_ICON_SIZE_SMALLER GTK_ICON_SIZE_MENU
|
||||
# define PANEL_ICON_SIZE_LARGE GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
|
||||
|
||||
/* functions */
|
||||
|
|
31
src/panel.c
31
src/panel.c
|
@ -109,6 +109,8 @@ static GtkIconSize _new_size(Panel * panel, PanelPosition position);
|
|||
static gboolean _on_idle(gpointer data);
|
||||
static void _idle_load(Panel * panel, PanelPosition position,
|
||||
char const * plugins);
|
||||
static GdkFilterReturn _on_root_event(GdkXEvent * xevent, GdkEvent * event,
|
||||
gpointer data);
|
||||
|
||||
Panel * panel_new(PanelPrefs const * prefs)
|
||||
{
|
||||
|
@ -175,6 +177,10 @@ Panel * panel_new(PanelPrefs const * prefs)
|
|||
panel->bottom = (prefs->position & PANEL_POSITION_BOTTOM)
|
||||
? panel_window_new(PANEL_POSITION_BOTTOM,
|
||||
&panel->bottom_helper, &rect) : NULL;
|
||||
/* manage root window events */
|
||||
gdk_add_client_message_filter(gdk_atom_intern(PANEL_CLIENT_MESSAGE,
|
||||
FALSE), _on_root_event, panel);
|
||||
/* load plug-ins when idle */
|
||||
g_idle_add(_on_idle, panel);
|
||||
return panel;
|
||||
}
|
||||
|
@ -297,6 +303,31 @@ static void _idle_load(Panel * panel, PanelPosition position,
|
|||
free(p);
|
||||
}
|
||||
|
||||
static GdkFilterReturn _on_root_event(GdkXEvent * xevent, GdkEvent * event,
|
||||
gpointer data)
|
||||
{
|
||||
Panel * panel = data;
|
||||
XEvent * xe = xevent;
|
||||
XClientMessageEvent * xcme;
|
||||
PanelMessage message;
|
||||
|
||||
if(xe->type != ClientMessage)
|
||||
return GDK_FILTER_CONTINUE;
|
||||
xcme = &xe->xclient;
|
||||
if(xcme->message_type != gdk_x11_get_xatom_by_name(
|
||||
PANEL_CLIENT_MESSAGE))
|
||||
return GDK_FILTER_CONTINUE;
|
||||
message = xcme->data.b[0];
|
||||
switch(message)
|
||||
{
|
||||
case PANEL_MESSAGE_SHOW:
|
||||
if(xcme->data.b[1] == PANEL_MESSAGE_SHOW_SETTINGS)
|
||||
panel_show_preferences(panel, TRUE);
|
||||
break;
|
||||
}
|
||||
return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
/* panel_delete */
|
||||
void panel_delete(Panel * panel)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
subdirs=applets
|
||||
targets=panel,run
|
||||
targets=panel,panel-settings,run
|
||||
cppflags_force=-I ../include
|
||||
#cppflags=-D EMBEDDED
|
||||
cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0`
|
||||
|
@ -23,6 +23,11 @@ depends=common.h,window.h,../include/Panel.h,../config.h
|
|||
[window.c]
|
||||
depends=common.h,window.h
|
||||
|
||||
[panel-settings]
|
||||
type=binary
|
||||
sources=settings.c
|
||||
install=$(BINDIR)
|
||||
|
||||
[run]
|
||||
type=binary
|
||||
sources=run.c
|
||||
|
|
58
src/settings.c
Normal file
58
src/settings.c
Normal file
|
@ -0,0 +1,58 @@
|
|||
/* $Id$ */
|
||||
/* 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
|
||||
* 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 <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "common.h"
|
||||
|
||||
|
||||
/* usage */
|
||||
static int _usage(void)
|
||||
{
|
||||
fputs("Usage: panel-settings\n", stderr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* main */
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
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;
|
||||
client->send_event = TRUE;
|
||||
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[2] = TRUE;
|
||||
gdk_event_send_clientmessage_toall(&event);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user