Commit 8c4511b5 authored by Marek Kašík's avatar Marek Kašík

Initial implementation of Printers panel

Created by Marek Kasik, modified by Jon McCann.
It has been implemented according to design at:
http://live.gnome.org/Design/SystemSettings/Printers
(not fully implemented yet)
parent 34e47312
......@@ -106,6 +106,10 @@ PKG_CHECK_MODULES(PULSEAUDIO,
libpulse-mainloop-glib >= $PA_REQUIRED_VERSION)
AC_SUBST(PULSEAUDIO_CFLAGS)
AC_SUBST(PULSEAUDIO_LIBS)
# check for cups
AC_CHECK_HEADERS(cups/cups.h cups/http.h cups/ipp.h)
CUPS_LIBS=-lcups
AC_SUBST(CUPS_LIBS)
gtk_lib_dir=`$PKG_CONFIG --variable libdir gtk+-3.0`
gtk_binary_version=`$PKG_CONFIG --variable gtk_binary_version gtk+-3.0`
......@@ -372,6 +376,8 @@ panels/info/Makefile
panels/info/gnome-info-panel.desktop.in
panels/power/Makefile
panels/power/gnome-power-panel.desktop.in
panels/printers/Makefile
panels/printers/gnome-printers-panel.desktop.in
panels/network/Makefile
panels/network/gnome-network-panel.desktop.in
panels/universal-access/Makefile
......
......@@ -5,6 +5,7 @@ SUBDIRS= \
display \
media \
mouse \
printers \
region \
network \
info \
......
uidir = $(pkgdatadir)/ui/printers
dist_ui_DATA = \
printers.ui
INCLUDES = \
$(PANEL_CFLAGS) \
$(DBUS_CFLAGS) \
$(GNOMECC_CAPPLETS_CFLAGS) \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\"" \
-DDATADIR="\"$(uidir)\"" \
$(NULL)
ccpanelsdir = $(PANELS_DIR)
ccpanels_LTLIBRARIES = libprinters.la
libprinters_la_SOURCES = \
printers-module.c \
cc-printers-panel.c \
cc-printers-panel.h
libprinters_la_LIBADD = $(PANEL_LIBS) $(CUPS_LIBS) $(DBUS_LIBS)
libprinters_la_LDFLAGS = $(PANEL_LDFLAGS)
@INTLTOOL_DESKTOP_RULE@
desktopdir = $(datadir)/applications
desktop_in_files = gnome-printers-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA)
-include $(top_srcdir)/git.mk
This diff is collapsed.
/*
* Copyright (C) 2010 Red Hat, Inc
*
* 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 _CC_PRINTERS_PANEL_H
#define _CC_PRINTERS_PANEL_H
#include <libgnome-control-center/cc-panel.h>
G_BEGIN_DECLS
#define CC_TYPE_PRINTERS_PANEL cc_printers_panel_get_type()
#define CC_PRINTERS_PANEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
CC_TYPE_PRINTERS_PANEL, CcPrintersPanel))
#define CC_PRINTERS_PANEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
CC_TYPE_PRINTERS_PANEL, CcPrintersPanelClass))
#define CC_IS_PRINTERS_PANEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
CC_TYPE_PRINTERS_PANEL))
#define CC_IS_PRINTERS_PANEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
CC_TYPE_PRINTERS_PANEL))
#define CC_PRINTERS_PANEL_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
CC_TYPE_PRINTERS_PANEL, CcPrintersPanelClass))
typedef struct _CcPrintersPanel CcPrintersPanel;
typedef struct _CcPrintersPanelClass CcPrintersPanelClass;
typedef struct _CcPrintersPanelPrivate CcPrintersPanelPrivate;
struct _CcPrintersPanel
{
CcPanel parent;
CcPrintersPanelPrivate *priv;
};
struct _CcPrintersPanelClass
{
CcPanelClass parent_class;
};
GType cc_printers_panel_get_type (void) G_GNUC_CONST;
void cc_printers_panel_register (GIOModule *module);
G_END_DECLS
#endif /* _CC_PRINTERS_PANEL_H */
[Desktop Entry]
_Name=Printers
_Comment=Change printer settings
Exec=gnome-control-center printers
Icon=printer
Terminal=false
Type=Application
StartupNotify=true
# The X-GNOME-Settings-Panel is necessary to show in the main shell UI
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;
OnlyShowIn=GNOME;
X-GNOME-Settings-Panel=printers
# Translators: those are keywords for the printing control-center panel
_X-GNOME-Keywords=Foo;Bar;Baz;
/*
* Copyright (C) 2010 Red Hat, Inc
*
* 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.
*
*/
#include <config.h>
#include "cc-printers-panel.h"
#include <glib/gi18n.h>
void
g_io_module_load (GIOModule *module)
{
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
/* register the panel */
cc_printers_panel_register (module);
}
void
g_io_module_unload (GIOModule *module)
{
}
This diff is collapsed.
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