Commit 2719590d authored by Richard Hughes's avatar Richard Hughes Committed by Richard Hughes

Apply patch from Benjamin Canou <bookeldor@gmail.com> to add the new

2006-11-25  Richard Hughes  <richard@hughsie.com>

* AUTHORS:
* applets/Makefile.am:
* applets/brightness/.cvsignore:
* applets/brightness/GNOME_BrightnessApplet.server.in.in:
* applets/brightness/GNOME_BrightnessApplet.xml:
* applets/brightness/Makefile.am:
* applets/brightness/brightness-applet.c:
* applets/brightness/brightness-applet.h:
* configure.in:
Apply patch from Benjamin Canou <bookeldor@gmail.com> to add
the new brightness applet. Many thanks for this great new
feature, and really good chunk of code.
parent 051aa691
Richard Hughes <richard@hughsie.com>
William Jon McCann <mccann@jhu.edu>
Jaap A. Haitsma <jaap@haitsma.org>
Benjamin Canou <bookeldor@gmail.com>
2006-11-25 Richard Hughes <richard@hughsie.com>
* AUTHORS:
* applets/Makefile.am:
* applets/brightness/.cvsignore:
* applets/brightness/GNOME_BrightnessApplet.server.in.in:
* applets/brightness/GNOME_BrightnessApplet.xml:
* applets/brightness/Makefile.am:
* applets/brightness/brightness-applet.c:
* applets/brightness/brightness-applet.h:
* configure.in:
Apply patch from Benjamin Canou <bookeldor@gmail.com> to add
the new brightness applet. Many thanks for this great new
feature, and really good chunk of code.
2006-11-25 Richard Hughes <richard@hughsie.com>
* src/gpm-powermanager.h:
......
SUBDIRS = brightness-applet
SUBDIRS = brightness
Makefile
Makefile.in
GNOME_BrightnessApplet.server.in
GNOME_BrightnessApplet.server
*.o
gnome-brightness-applet
<?xml version="1.0"?>
<oaf_info>
<oaf_server iid="OAFIID:GNOME_BrightnessApplet_Factory" type="exe" location="@BINDIR@/gnome-brightness-applet">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/GenericFactory:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="Brightness Applet Factory"/>
<oaf_attribute name="description" type="string" value="Factory for Brightness Applet"/>
</oaf_server>
<oaf_server iid="OAFIID:GNOME_BrightnessApplet" type="factory" location="OAFIID:GNOME_BrightnessApplet_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
<item value="IDL:Bonobo/Control:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="panel:category" type="string" value="System &amp; Hardware"/>
<oaf_attribute name="panel:icon" type="string" value="gpm-brightness"/>
<oaf_attribute name="name" type="string" value="Brightness Applet"/>
<oaf_attribute name="description" type="string" value="Adjusts Laptop panel brightness"/>
</oaf_server>
</oaf_info>
<Root>
<popups>
<popup name="button3">
<menuitem name="Help" verb="Help" _label="_Help" pixtype="stock" pixname="gtk-help"/>
<menuitem name="About" verb="About" _label="_About" pixtype="stock" pixname="gnome-stock-about" />
</popup>
</popups>
</Root>
INCLUDES=-I. -I$(srcdir) \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
$(GNOME_CFLAGS) \
-DDATADIR=\""$(prefix)/$(DATADIRNAME)"\" \
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
bin_PROGRAMS=gnome-brightness-applet
SRCDEPS=../../src/gpm-powermanager.c \
../../src/gpm-proxy.c \
../../src/gpm-debug.c \
../../src/gpm-dbus-monitor.c \
../../src/gpm-marshal.c
gnome_brightness_applet_SOURCES=brightness-applet.c brightness-applet.h $(SRCDEPS)
gnome_brightness_applet_LDADD=$(GNOME_LIBS)
serverdir = $(libdir)/bonobo/servers
server_in_files = GNOME_BrightnessApplet.server.in
server_DATA = $(server_in_files:.server.in=.server)
$(server_in_files): $(server_in_files:.server.in=.server.in.in)
sed -e "s|\@BINDIR\@|$(bindir)|" $< > $@
@INTLTOOL_SERVER_RULE@
uidir = $(datadir)/gnome-2.0/ui
ui_DATA = GNOME_BrightnessApplet.xml
EXTRA_DIST = GNOME_BrightnessApplet.server.in.in $(ui_DATA)
DISTCLEANFILES = \
$(server_DATA) $(server_DATA).in
\ No newline at end of file
This diff is collapsed.
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* GNOME Power Manager / Brightness Applet
* Copyright (C) 2006 Benjamin Canou <bookeldor@gmail.com>
*
* Licensed under the GNU General Public License Version 2
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __BRIGHTNESS_APPLET_H
#define __BRIGHTNESS_APPLET_H
#include <glib-object.h>
#include <panel-applet.h>
#include "../../src/gpm-powermanager.h"
G_BEGIN_DECLS
#define GPM_TYPE_BRIGHTNESS_APPLET (gpm_brightness_applet_get_type ())
#define GPM_BRIGHTNESS_APPLET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GPM_TYPE_BRIGHTNESS_APPLET, GpmBrightnessApplet))
#define GPM_BRIGHTNESS_APPLET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GPM_TYPE_BRIGHTNESS_APPLET, GpmBrightnessAppletClass))
#define GPM_IS_BRIGHTNESS_APPLET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GPM_TYPE_BRIGHTNESS_APPLET))
#define GPM_IS_BRIGHTNESS_APPLET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GPM_TYPE_BRIGHTNESS_APPLET))
#define GPM_BRIGHTNESS_APPLET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GPM_TYPE_BRIGHTNESS_APPLET, GpmBrightnessAppletClass))
typedef struct{
PanelApplet parent;
/* applet state */
gboolean enabled; /* the applet is active */
gboolean popped; /* the popup is shown */
/* the popup and its widgets */
GtkWidget *popup, *slider, *btn_plus, *btn_minus;
GtkTooltips *tooltip;
/* the icon and a cache for size*/
GdkPixbuf *icon;
gint icon_width, icon_height;
/* brightness */
GpmPowermanager *powermanager;
guint level;
/* a cache for panel size */
gint size;
} GpmBrightnessApplet;
typedef struct{
PanelAppletClass parent_class;
} GpmBrightnessAppletClass;
GType gpm_brightness_applet_get_type (void);
G_END_DECLS
#endif /* __BRIGHTNESS_APPLET_H */
......@@ -503,7 +503,7 @@ AC_OUTPUT([
Makefile
src/Makefile
applets/Makefile
applets/brightness-applet/Makefile
applets/brightness/Makefile
docs/Makefile
docs/gnome-power-manager.xml
man/Makefile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment