Commit 80ae3611 authored by Debarshi Ray's avatar Debarshi Ray

Initial revision

parents
William Jon McCann
The AUTHORS is auto-generated when releasing. If you are seeing this,
use 'git log' for the list of people who have contributed.
This diff is collapsed.
2012-04-22 Debarshi Ray <debarshir@gnome.org>
* *: The ChangeLog is auto-generated when releasing. If you
are seeing this, use 'git log' for a detailed list of changes.
SUBDIRS = data src po
INTLTOOL_FILES = \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
$(NULL)
photosdocdir = $(docdir)
photosdoc_DATA = \
ARTISTS \
AUTHORS \
COPYING \
ChangeLog \
INSTALL \
NEWS \
README \
$(NULL)
EXTRA_DIST = \
$(INTLTOOL_FILES) \
$(photosdoc_DATA) \
$(NULL)
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update \
po/.intltool-merge-cache \
$(NULL)
dist-hook:
@if test -d "$(srcdir)/.git"; \
then \
echo Creating AUTHORS && \
( cd "$(top_srcdir)" && \
echo '# Generated by Makefile. Do not edit.'; echo; \
$(top_srcdir)/missing --run \
git log --no-merges --pretty=format:"%an" src \
| sort | uniq ) > AUTHORS.tmp \
&& mv -f AUTHORS.tmp $(top_distdir)/AUTHORS \
|| ( rm -f AUTHORS.tmp ; \
echo Failed to generate AUTHORS >&2 ); \
else \
echo A git clone is required to generate an AUTHORS >&2; \
fi
@if test -d "$(srcdir)/.git"; \
then \
echo Creating ChangeLog && \
( cd "$(top_srcdir)" && \
echo '# Generated by Makefile. Do not edit.'; echo; \
$(top_srcdir)/missing --run git log --stat ) > ChangeLog.tmp \
&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
|| ( rm -f ChangeLog.tmp ; \
echo Failed to generate ChangeLog >&2 ); \
else \
echo A git clone is required to generate a ChangeLog >&2; \
fi
----
Copyright (C) 2012 Red Hat, Inc.
All rights reserved.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Copyright (C) 2012 Red Hat, Inc.
All rights reserved.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
----
Photos - access, organize and share your photos on GNOME
========================================================
Bugs: https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-photos
Design: https://live.gnome.org/Design/Apps/Photos
Website: http://projects.gnome.org/photos
Download: http://download.gnome.org/sources/gnome-photos
----
Photos is licensed under 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.
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="gnome-photos"
(test -f $srcdir/src/photos-main.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
which gnome-autogen.sh || {
echo "You need to install gnome-common from the GNOME git"
exit 1
}
REQUIRED_AUTOCONF_VERSION=2.63
REQUIRED_AUTOMAKE_VERSION=1.11
REQUIRED_INTLTOOL_VERSION=0.40.0
REQUIRED_PKG_CONFIG_VERSION=0.22
. gnome-autogen.sh
AC_INIT([Photos],
[3.5.0],
[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-photos],
[gnome-photos],
[http://projects.gnome.org/photos])
AC_PREREQ(2.63)
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION)
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_CC_C_O
AC_HEADER_STDC
AC_CHECK_LIBM
AC_SUBST(LIBM)
GNOME_COMMON_INIT
GNOME_COMPILE_WARNINGS([maximum])
GNOME_DEBUG_CHECK
GNOME_MAINTAINER_MODE_DEFINES
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=AC_PACKAGE_TARNAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
[GETTEXT package name])
AM_GLIB_GNU_GETTEXT
LT_INIT
PKG_CHECK_MODULES(CLUTTER_GTK, [clutter-gtk-1.0])
PKG_CHECK_MODULES(GLIB, [glib-2.0])
PKG_CHECK_MODULES(GIO, [gio-2.0])
PKG_CHECK_MODULES(GTK, [gtk+-3.0])
PKG_CHECK_MODULES(TRACKER, [tracker-sparql-0.14])
AC_CONFIG_FILES([
Makefile
data/Makefile
data/gnome-photos.desktop.in
src/Makefile
po/Makefile.in
])
AC_OUTPUT
SUBDIRS =
desktopdir = $(datadir)/applications
desktop_in_files = $(PACKAGE_TARNAME).desktop.in.in
desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
EXTRA_DIST = \
$(desktop_in_files) \
$(NULL)
DISTCLEANFILES = \
$(desktop_DATA)
[Desktop Entry]
_Name=@PACKAGE_NAME@
_Comment=Access, organize and share photos
Exec=@PACKAGE_TARNAME@
Icon=@PACKAGE_TARNAME@
StartupNotify=true
Terminal=false
Type=Application
OnlyShowIn=GNOME
Categories=GNOME;GTK;Utility;Core;
_Keywords=Photos;Pictures;
<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:gnome="http://api.gnome.org/doap-extensions#"
xmlns="http://usefulinc.com/ns/doap#">
<name xml:lang="en">Photos</name>
<shortdesc xml:lang="en">Photos</shortdesc>
<homepage rdf:resource="http://projects.gnome.org/photos" />
<download-page rdf:resource="http://download.gnome.org/sources/gnome-photos" />
<bug-database rdf:resource="https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-photos" />
<category rdf:resource="http://api.gnome.org/doap-extensions#desktop" />
<maintainer>
<foaf:Person>
<foaf:name>Debarshi Ray</foaf:name>
<foaf:mbox rdf:resource="mailto:debarshir@gnome.org" />
<gnome:userid>debarshir</gnome:userid>
</foaf:Person>
</maintainer>
</Project>
# Please keep this list sorted alphabetically.
# List of source files containing translatable strings.
# Please keep this list sorted alphabetically.
src/photos-application.c
src/photos-main-window.c
bin_PROGRAMS = gnome-photos
gnome_photos_SOURCES = \
photos-application.c \
photos-application.h \
photos-main-window.c \
photos-main-window.h \
photos-main.c \
$(NULL)
AM_CPPFLAGS = \
-DPACKAGE_LOCALE_DIR=\""${datadir}/locale"\" \
$(CLUTTER_GTK_CFLAGS) \
$(GIO_CFLAGS) \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(TRACKER_CFLAGS) \
$(NULL)
gnome_photos_LDFLAGS =
gnome_photos_LDADD = \
$(CLUTTER_GTK_LIBS) \
$(GIO_LIBS) \
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(TRACKER_LIBS) \
$(NULL)
/*
* Photos - access, organize and share your photos on GNOME
* Copyright © 2012 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., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#include "config.h"
#include <clutter-gtk/clutter-gtk.h>
#include <gio/gio.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <tracker-sparql.h>
#include "photos-application.h"
#include "photos-main-window.h"
struct _PhotosApplicationPrivate
{
GtkWidget *main_window;
TrackerSparqlConnection *connection;
};
G_DEFINE_TYPE (PhotosApplication, photos_application, GTK_TYPE_APPLICATION)
static void
photos_application_about (GSimpleAction *simple, GVariant *parameter, gpointer user_data)
{
}
static void
photos_application_fullscreen (GSimpleAction *simple, GVariant *parameter, gpointer user_data)
{
}
static void
photos_application_quit (GSimpleAction *simple, GVariant *parameter, gpointer user_data)
{
PhotosApplication *self = PHOTOS_APPLICATION (user_data);
PhotosApplicationPrivate *priv = self->priv;
gtk_widget_destroy (priv->main_window);
}
static void
photos_application_activate (GApplication *application)
{
PhotosApplication *self = PHOTOS_APPLICATION (application);
PhotosApplicationPrivate *priv = self->priv;
gtk_window_present (GTK_WINDOW (priv->main_window));
}
static void
photos_application_startup (GApplication *application)
{
PhotosApplication *self = PHOTOS_APPLICATION (application);
PhotosApplicationPrivate *priv = self->priv;
GError *error;
GMenu *doc_actions;
GMenu *menu;
GSimpleAction *action;
G_APPLICATION_CLASS (photos_application_parent_class)
->startup (application);
if (gtk_clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
{
g_warning ("Unable to initialize Clutter");
return;
}
error = NULL;
priv->connection = tracker_sparql_connection_get (NULL, &error);
if (error != NULL)
{
g_warning ("Unable to connect to the Tracker database: %s", error->message);
return;
}
action = g_simple_action_new ("about", NULL);
g_signal_connect (action, "activate", G_CALLBACK (photos_application_about), self);
g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (action));
g_object_unref (action);
action = g_simple_action_new ("fullscreen", NULL);
g_signal_connect (action, "activate", G_CALLBACK (photos_application_fullscreen), self);
g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (action));
g_object_unref (action);
action = g_simple_action_new ("quit", NULL);
g_signal_connect (action, "activate", G_CALLBACK (photos_application_quit), self);
g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (action));
g_object_unref (action);
menu = g_menu_new ();
doc_actions = g_menu_new ();
g_menu_append (doc_actions, _("Fullscreen"), "app.fullscreen");
g_menu_append_section (menu, NULL, G_MENU_MODEL (doc_actions));
g_menu_append (menu, _("About Photos"), "app.about");
g_menu_append (menu, _("Quit"), "app.quit");
gtk_application_set_app_menu (GTK_APPLICATION (self), G_MENU_MODEL (menu));
priv->main_window = photos_main_window_new (GTK_APPLICATION (self));
}
static void
photos_application_dispose (GObject *object)
{
PhotosApplication *self = PHOTOS_APPLICATION (object);
PhotosApplicationPrivate *priv = self->priv;
if (priv->connection != NULL)
{
g_object_unref (priv->connection);
priv->connection = NULL;
}
G_OBJECT_CLASS (photos_application_parent_class)
->dispose (object);
}
static void
photos_application_init (PhotosApplication *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
PHOTOS_TYPE_APPLICATION,
PhotosApplicationPrivate);
}
static void
photos_application_class_init (PhotosApplicationClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GApplicationClass *application_class = G_APPLICATION_CLASS (class);
object_class->dispose = photos_application_dispose;
application_class->activate = photos_application_activate;
application_class->startup = photos_application_startup;
g_type_class_add_private (class, sizeof (PhotosApplicationPrivate));
}
GtkApplication *
photos_application_new (const gchar *application_id,
GApplicationFlags flags)
{
g_return_val_if_fail (g_application_id_is_valid (application_id), NULL);
g_type_init ();
return g_object_new (PHOTOS_TYPE_APPLICATION,
"application-id", application_id,
"flags", flags,
NULL);
}
/*
* Photos - access, organize and share your photos on GNOME
* Copyright © 2012 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., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#ifndef PHOTOS_APPLICATION_H
#define PHOTOS_APPLICATION_H
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define PHOTOS_TYPE_APPLICATION (photos_application_get_type ())
#define PHOTOS_APPLICATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PHOTOS_TYPE_APPLICATION, PhotosApplication))
#define PHOTOS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_APPLICATION, PhotosApplicationClass))
#define PHOTOS_IS_APPLICATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PHOTOS_TYPE_APPLICATION))
#define PHOTOS_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_APPLICATION))
#define PHOTOS_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_APPLICATION, PhotosApplicationClass))
typedef struct _PhotosApplication PhotosApplication;
typedef struct _PhotosApplicationClass PhotosApplicationClass;
typedef struct _PhotosApplicationPrivate PhotosApplicationPrivate;
struct _PhotosApplication
{
GtkApplication parent_instance;
PhotosApplicationPrivate *priv;
};
struct _PhotosApplicationClass
{
GtkApplicationClass parent_class;
};
GType photos_application_get_type (void) G_GNUC_CONST;
GtkApplication *photos_application_new (const gchar *application_id,
GApplicationFlags flags);
G_END_DECLS
#endif /* PHOTOS_APPLICATION_H */
/*
* Photos - access, organize and share your photos on GNOME
* Copyright © 2012 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., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#include "config.h"
#include <clutter-gtk/clutter-gtk.h>
#include <glib.h>
#include <glib/gi18n.h>
#include "photos-main-window.h"
struct _PhotosMainWindowPrivate
{
GtkWidget *clutter_embed;
};
G_DEFINE_TYPE (PhotosMainWindow, photos_main_window, GTK_TYPE_APPLICATION_WINDOW)
static void
photos_main_window_init (PhotosMainWindow *self)
{
PhotosMainWindowPrivate *priv;
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
PHOTOS_TYPE_MAIN_WINDOW,
PhotosMainWindowPrivate);
priv = self->priv;
priv->clutter_embed = gtk_clutter_embed_new ();
gtk_container_add (GTK_CONTAINER (self), priv->clutter_embed);
gtk_widget_show (priv->clutter_embed);
}
static void
photos_main_window_class_init (PhotosMainWindowClass *class)
{
g_type_class_add_private (class, sizeof (PhotosMainWindowPrivate));
}
GtkWidget *
photos_main_window_new (GtkApplication *application)
{
g_return_val_if_fail (GTK_IS_APPLICATION (application), NULL);
g_object_new (PHOTOS_TYPE_MAIN_WINDOW,
"application", application,
"hide-titlebar-when-maximized", TRUE,
"title", _(PACKAGE_NAME),
"window-position", GTK_WIN_POS_CENTER,
NULL);
}
/*
* Photos - access, organize and share your photos on GNOME
* Copyright © 2012 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., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#ifndef PHOTOS_MAIN_WINDOW_H
#define PHOTOS_MAIN_WINDOW_H
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define PHOTOS_TYPE_MAIN_WINDOW (photos_main_window_get_type ())
#define PHOTOS_MAIN_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PHOTOS_TYPE_MAIN_WINDOW, PhotosMainWindow))
#define PHOTOS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_MAIN_WINDOW, PhotosMainWindowClass))
#define PHOTOS_IS_MAIN_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PHOTOS_TYPE_MAIN_WINDOW))
#define PHOTOS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_MAIN_WINDOW))
#define PHOTOS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_MAIN_WINDOW, PhotosMainWindowClass))
typedef struct _PhotosMainWindow PhotosMainWindow;
typedef struct _PhotosMainWindowClass PhotosMainWindowClass;
typedef struct _PhotosMainWindowPrivate PhotosMainWindowPrivate;
struct _PhotosMainWindow
{
GtkApplicationWindow parent_instance;
PhotosMainWindowPrivate *priv;
};
struct _PhotosMainWindowClass
{
GtkApplicationWindowClass parent_class;
};
GType photos_main_window_get_type (void) G_GNUC_CONST;
GtkWidget *photos_main_window_new (GtkApplication *application);
G_END_DECLS
#endif /* PHOTOS_MAIN_WINDOW_H */
/*
* Photos - access, organize and share your photos on GNOME
* Copyright © 2012 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., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#include "config.h"
#include <glib.h>
#include <glib/gi18n.h>
#include "photos-application.h"
gint
main (gint argc, gchar *argv[])
{
GtkApplication *app;
gint exit_status;
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
g_set_prgname (PACKAGE_TARNAME);
app = photos_application_new ("org.gnome." PACKAGE_NAME, G_APPLICATION_FLAGS_NONE);
exit_status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
return exit_status;
}
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