From 8f6b6e08102c61b11edacd8fb01210d3f3a541a5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 13 Oct 2009 13:48:46 -0500 Subject: Very basic. --- Makefile.am | 3 ++ configure.ac | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ data/Makefile.am | 1 + src/Makefile.am | 1 + 4 files changed, 95 insertions(+) create mode 100644 Makefile.am create mode 100644 configure.ac create mode 100644 data/Makefile.am create mode 100644 src/Makefile.am diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..77e3b2c --- /dev/null +++ b/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = data \ + src + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..fa9f69c --- /dev/null +++ b/configure.ac @@ -0,0 +1,90 @@ + +AC_INIT(indicator-custom, 0.0.1, ted@canonical.com) +AC_COPYRIGHT([Copyright 2009 Canonical]) + +AC_PREREQ(2.53) + +AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(indicator-custom, 0.2.6) + +AM_MAINTAINER_MODE + +AC_ISC_POSIX +AC_PROG_CC +AM_PROG_CC_C_O +AC_STDC_HEADERS +AC_PROG_LIBTOOL + +AC_SUBST(VERSION) +AC_CONFIG_MACRO_DIR([m4]) + +m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) + +########################### +# Dependencies +########################### + +GTK_REQUIRED_VERSION=2.12 +INDICATOR_REQUIRED_VERSION=0.2.0 +DBUSMENUGTK_REQUIRED_VERSION=0.1.1 + +PKG_CHECK_MODULES(INDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION + indicator >= $INDICATOR_REQUIRED_VERSION + dbusmenu-gtk >= $DBUSMENUGTK_REQUIRED_VERSION) + +AC_SUBST(INDICATOR_CFLAGS) +AC_SUBST(INDICATOR_LIBS) + +########################### +# Check to see if we're local +########################### + +with_localinstall="no" +AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install all of the files localy instead of system directories (for distcheck)]), with_localinstall=$enableval, with_localinstall=no) + +########################### +# Indicator Info +########################### + +if test "x$with_localinstall" = "xyes"; then + INDICATORDIR="${libdir}/indicators/2/" + INDICATORICONSDIR="${datadir}/libindicate/icons/" +else + INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator` + INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator` +fi +AC_SUBST(INDICATORDIR) +AC_SUBST(INDICATORICONSDIR) + +########################### +# DBus Service Info +########################### + +if test "x$with_localinstall" = "xyes"; then + DBUSSERVICEDIR="${datadir}/dbus-1/services/" +else + DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1` +fi +AC_SUBST(DBUSSERVICEDIR) + +########################### +# Files +########################### + +AC_OUTPUT([ +Makefile +src/Makefile +data/Makefile +]) + +########################### +# Results +########################### + +AC_MSG_NOTICE([ + +Custom Indicator Configuration: + + Prefix: $prefix + Indicator Dir: $INDICATORDIR +]) diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 0000000..599c41b --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1 @@ +# Data diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..599c41b --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1 @@ +# Data -- cgit v1.2.3 From 7bd4902e237c390890bb59a5e9a42886df3eecc2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 13 Oct 2009 14:02:17 -0500 Subject: Autogen and friends --- AUTHORS | 0 ChangeLog | 0 NEWS | 0 autogen.sh | 11 +++++++++++ 4 files changed, 11 insertions(+) create mode 100644 AUTHORS create mode 100644 ChangeLog create mode 100644 NEWS create mode 100755 autogen.sh diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..3483322 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +PKG_NAME="upanel" + +which gnome-autogen.sh || { + echo "You need gnome-common from GNOME SVN" + exit 1 +} + +USE_GNOME2_MACROS=1 \ +. gnome-autogen.sh -- cgit v1.2.3 From 6e1d6b90a262c90afe00a9ceb5cfe3de5d7bd4af Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 13 Oct 2009 14:34:09 -0500 Subject: DBus Service file --- .bzrignore | 1 + data/Makefile.am | 12 +++++++++++- data/indicator-custom.service.in | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .bzrignore create mode 100644 data/indicator-custom.service.in diff --git a/.bzrignore b/.bzrignore new file mode 100644 index 0000000..db1b136 --- /dev/null +++ b/.bzrignore @@ -0,0 +1 @@ +data/indicator-custom.service diff --git a/data/Makefile.am b/data/Makefile.am index 599c41b..e93e589 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1 +1,11 @@ -# Data + +dbus_servicesdir = $(DBUSSERVICEDIR) +dbus_services_DATA = indicator-custom.service + +%.service: %.service.in + sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ + +EXTRA_DIST = indicator-custom.service.in + +CLEANFILES = indicator-custom.service + diff --git a/data/indicator-custom.service.in b/data/indicator-custom.service.in new file mode 100644 index 0000000..be64983 --- /dev/null +++ b/data/indicator-custom.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.ayatana.indicator.custom +Exec=@libexecdir@/indicator-custom-service -- cgit v1.2.3 From 5b565b000b1d890f14eff094dd00edf09a32236a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 13 Oct 2009 14:39:35 -0500 Subject: Wrong version --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index fa9f69c..48b11c6 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ AC_COPYRIGHT([Copyright 2009 Canonical]) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-custom, 0.2.6) +AM_INIT_AUTOMAKE(indicator-custom, 0.0.1) AM_MAINTAINER_MODE -- cgit v1.2.3 From 683109ed34f0f093df792aa50c8133b3b8cdb425 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 13 Oct 2009 14:39:46 -0500 Subject: Local install on distcheck, now it passes. --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 77e3b2c..1d1ff09 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,4 @@ SUBDIRS = data \ src +DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall -- cgit v1.2.3 From d7640ed6bcf9eaa042e2947fe3c32791b71d3f95 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 13 Oct 2009 14:46:56 -0500 Subject: Cleaning up status --- .bzrignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.bzrignore b/.bzrignore index db1b136..40635af 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1 +1,4 @@ data/indicator-custom.service +compile +indicator-custom-[0-9].[0-9].[0-9].tar.gz +m4/ -- cgit v1.2.3 From fb328a435358e26c1f2779e2bf07ddb05b60e93e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 13 Oct 2009 15:37:08 -0500 Subject: Building a basic indicator and the service to go along with it. --- .bzrignore | 3 +++ src/Makefile.am | 32 +++++++++++++++++++++++++++++++- src/custom-service.c | 7 +++++++ src/indicator-custom.c | 28 ++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 src/custom-service.c create mode 100644 src/indicator-custom.c diff --git a/.bzrignore b/.bzrignore index 40635af..a33f7f0 100644 --- a/.bzrignore +++ b/.bzrignore @@ -2,3 +2,6 @@ data/indicator-custom.service compile indicator-custom-[0-9].[0-9].[0-9].tar.gz m4/ +src/indicator-custom-service +src/libcustom.la +src/libcustom_la-indicator-custom.lo diff --git a/src/Makefile.am b/src/Makefile.am index 599c41b..63f0c64 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1 +1,31 @@ -# Data + +libexec_PROGRAMS = indicator-custom-service + +################################## +# Indicator +################################## + +customlibdir = $(INDICATORDIR) +customlib_LTLIBRARIES = libcustom.la +libcustom_la_SOURCES = \ + indicator-custom.c +libcustom_la_CFLAGS = $(INDICATOR_CFLAGS) \ + -Wall \ + -Wl,-Bsymbolic-functions \ + -Wl,-z,defs \ + -Wl,--as-needed \ + -Werror +libcustom_la_LIBADD = $(INDICATOR_LIBS) +libcustom_la_LDFLAGS = -module -avoid-version + +################################## +# Service +################################## + +indicator_custom_service_SOURCES = \ + custom-service.c +indicator_custom_service_CFLAGS = \ + $(INDICATOR_CFLAGS) \ + -Wall -Werror +indicator_custom_service_LDADD = \ + $(INDICATOR_LIBS) diff --git a/src/custom-service.c b/src/custom-service.c new file mode 100644 index 0000000..63590c7 --- /dev/null +++ b/src/custom-service.c @@ -0,0 +1,7 @@ + +int +main (int argc, char ** argv) +{ + + return 0; +} diff --git a/src/indicator-custom.c b/src/indicator-custom.c new file mode 100644 index 0000000..1a09a9a --- /dev/null +++ b/src/indicator-custom.c @@ -0,0 +1,28 @@ + +#include "libindicator/indicator.h" + +INDICATOR_SET_VERSION +INDICATOR_SET_NAME("indicator-custom") + +GtkLabel * +get_label (void) +{ + return NULL; +} + +GtkImage * +get_icon (void) +{ + return GTK_IMAGE(gtk_image_new()); +} + +GtkMenu * +get_menu (void) +{ + GtkMenu * main_menu = GTK_MENU(gtk_menu_new()); + GtkWidget * loading_item = gtk_menu_item_new_with_label("Loading..."); + gtk_menu_shell_append(GTK_MENU_SHELL(main_menu), loading_item); + gtk_widget_show(GTK_WIDGET(loading_item)); + + return main_menu; +} -- cgit v1.2.3