5 Commits
0.2.2 ... 0.2.4

Author SHA1 Message Date
Johannes H. Jensen
1cba177277 0.2.4 release. 2008-08-28 00:51:49 +02:00
Johannes H. Jensen
fe74f4b470 Store alarms in a global GConf directory: /apps/alarm-clock (LP: #261877) 2008-08-27 17:19:03 +02:00
Johannes H. Jensen
ba8b925263 Remove old checkbox code. 2008-08-27 16:05:37 +02:00
Johannes H. Jensen
18d6a2f889 0.2.3 bugfix release. 2008-06-25 18:21:22 +02:00
Johannes H. Jensen
51515f9d51 When an alarm is added, connect alarm_triggered so notifications are displayed (LP: #240728)
Remove timer and stop player on alarm dispose.
2008-06-19 01:19:59 +02:00
27 changed files with 73 additions and 71 deletions

View File

@@ -2,8 +2,8 @@ dnl ***************************************************************************
dnl *** configure.ac for ALARM-CLOCK ***
dnl ***************************************************************************
AC_INIT([Alarm Clock], [0.2.2],
[Johannes H. Jensen <joh@deworks.net>],
AC_INIT([Alarm Clock], [0.2.4],
[Johannes H. Jensen <joh@pseudoberries.com>],
[alarm-clock])
AM_CONFIG_HEADER(config.h)
@@ -162,4 +162,4 @@ echo "Configure summary:"
echo " Notifications (libnotify): $HAVE_LIBNOTIFY"
echo
echo "*************************************************"
echo
echo

View File

@@ -1,7 +1,7 @@
/*
* alarm-applet.c -- Alarm Clock applet bootstrap
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include "alarm-applet.h"
@@ -427,7 +427,7 @@ alarm_applet_alarms_load (AlarmApplet *applet)
}
/* Fetch list of alarms */
applet->alarms = alarm_get_list (applet->gconf_dir);
applet->alarms = alarm_get_list (ALARM_GCONF_DIR);
}
void
@@ -438,6 +438,8 @@ alarm_applet_alarms_add (AlarmApplet *applet, Alarm *alarm)
g_signal_connect (alarm, "notify::sound-file", G_CALLBACK (alarm_sound_file_changed), applet);
g_signal_connect (alarm, "notify::active", G_CALLBACK (alarm_active_changed), applet);
g_signal_connect (alarm, "notify::time", G_CALLBACK (alarm_active_changed), applet);
g_signal_connect (alarm, "alarm", G_CALLBACK (alarm_triggered), applet);
}
void
@@ -463,6 +465,11 @@ alarm_applet_alarms_remove (AlarmApplet *applet, Alarm *alarm)
alarm_applet_upcoming_alarm_update (applet);
}
/*
* Remove any signal handlers for this alarm instance.
*/
g_signal_handlers_disconnect_matched (alarm, 0, 0, 0, NULL, NULL, NULL);
/*
* Dereference alarm
*/

View File

@@ -1,7 +1,7 @@
/*
* alarm-applet.h -- Alarm Clock applet bootstrap
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#ifndef ALARMAPPLET_H_
@@ -67,6 +67,7 @@ void alarm_applet_clear_alarms (AlarmApplet *applet);
#define ALARM_ICON "alarm-clock"
#define TIMER_ICON "alarm-timer"
#define SNOOZE_ICON "alarm-snooze"
#define ALARM_GCONF_DIR "/apps/alarm-clock"
#define ALARM_SCHEMA_DIR "/schemas/apps/alarm_clock/prefs"
#define ALARM_UI_XML GNOME_GLADEDIR "/alarm-clock.glade"
#define ALARM_SOUNDS_DIR GNOME_SOUNDSDIR

View File

@@ -1,7 +1,7 @@
/*
* alarm-gconf.c -- GConf routines
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include <time.h>
@@ -119,7 +119,7 @@ alarm_applet_gconf_global_change (GConfClient *client,
*
* Here we extract {something}
*/
dir = applet->gconf_dir;
dir = ALARM_GCONF_DIR;
len = strlen (entry->key);
str = g_string_new ("");
@@ -175,7 +175,7 @@ alarm_applet_gconf_global_change (GConfClient *client,
/*
* Add to list
*/
a = alarm_new (applet->gconf_dir, id);
a = alarm_new (ALARM_GCONF_DIR, id);
g_debug ("\tADD alarm #%d %p", id, a);
@@ -226,14 +226,11 @@ alarm_applet_gconf_init (AlarmApplet *applet)
* Listen for changes to the alarms.
* We want to know when an alarm is added and removed.
*/
key = panel_applet_get_preferences_key(PANEL_APPLET (applet->parent));
applet->listeners [2] =
gconf_client_notify_add (
client, key,
client, ALARM_GCONF_DIR,
(GConfClientNotifyFunc) alarm_applet_gconf_global_change,
applet, NULL, NULL);
g_free (key);
}

View File

@@ -1,7 +1,7 @@
/*
* alarm-gconf.h -- GConf routines
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#ifndef ALARM_GCONF_H_

View File

@@ -1,7 +1,7 @@
/*
* alarm.c -- Core alarm functionality
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include <stdio.h>
@@ -1434,6 +1434,8 @@ alarm_dispose (GObject *object)
parent->dispose (object);
alarm_gconf_disconnect (alarm);
alarm_timer_remove(alarm);
alarm_clear (alarm);
}
/*

View File

@@ -1,7 +1,7 @@
/*
* alarm.h -- Core alarm functionality
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#ifndef ALARM_H_

View File

@@ -1,7 +1,7 @@
/*
* alarms-list.d -- List alarms dialog
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include "alarms-list.h"
@@ -296,7 +296,7 @@ add_button_cb (GtkButton *button, gpointer data)
/*
* Create new alarm, will fall back to defaults.
*/
alarm = alarm_new (applet->gconf_dir, -1);
alarm = alarm_new (ALARM_GCONF_DIR, -1);
/*
* Set first sound / app in list

View File

@@ -1,7 +1,7 @@
/*
* alarms-list.h -- List alarms dialog
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#ifndef ALARMSLIST_H_

View File

@@ -1,7 +1,7 @@
/*
* edit-alarm.c -- Alarm settings dialog
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include "edit-alarm.h"

View File

@@ -1,7 +1,7 @@
/*
* edit-alarm.h -- Alarm settings dialog
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#ifndef EDITALARM_H_

View File

@@ -1,7 +1,7 @@
/*
* list-entry.c -- Simple data structure to hold name, data and icon.
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include <string.h>

View File

@@ -1,7 +1,7 @@
/*
* list-entry.h -- Simple data structure to hold name, data and icon.
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#ifndef LISTENTRY_H_

View File

@@ -1,7 +1,7 @@
/*
* player.c - Simple media player based on GStreamer
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include <gst/gst.h>

View File

@@ -1,7 +1,7 @@
/*
* player.h - Simple media player based on GStreamer
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#ifndef PLAYER_H_

View File

@@ -1,7 +1,7 @@
/*
* prefs.c -- Alarm Clock global preferences
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include "prefs.h"

View File

@@ -1,7 +1,7 @@
/*
* prefs.h -- Alarm Clock global preferences
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#ifndef PREFS_H_

View File

@@ -1,7 +1,7 @@
/*
* glade_view.c -- Test utility for running a glade file.
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include <gtk/gtk.h>
@@ -47,16 +47,11 @@ int main (int argc, char **argv)
return 1;
}
GtkWidget *checkbox = glade_xml_get_widget(ui, "repeat-check");
GtkWidget *checkbox = glade_xml_get_widget(ui, "snooze-check");
/* you can't do this from glade */
GtkWidget *checkbox_label = gtk_bin_get_child (GTK_BIN (checkbox));
g_object_set (G_OBJECT (checkbox_label), "use_markup", TRUE, NULL);
checkbox = glade_xml_get_widget(ui, "snooze-check");
/* you can't do this from glade */
checkbox_label = gtk_bin_get_child (GTK_BIN (checkbox));
g_object_set (G_OBJECT (checkbox_label), "use_markup", TRUE, NULL);
gtk_main();
return 0;

View File

@@ -1,7 +1,7 @@
/*
* test_alarm.c -- Alarm test suite
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include "alarm.h"

View File

@@ -1,7 +1,7 @@
/*
* test_gconf_recursive.c -- Test utility for recursively unsetting a gconf dir.
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include <glib.h>

View File

@@ -1,7 +1,7 @@
/*
* test_list_entry.c -- Test for AlarmListEntry
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include <glib.h>

View File

@@ -1,7 +1,7 @@
/*
* test_player.c -- Test utility for the MediaPlayer system.
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include <glib.h>

View File

@@ -1,7 +1,7 @@
/*
* glade_util.c -- Test for alarm utilities.
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include <time.h>

View File

@@ -1,7 +1,7 @@
/*
* ui.c - Alarm Clock applet UI routines
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include <time.h>
@@ -658,11 +658,11 @@ menu_about_cb (BonoboUIComponent *component,
g_debug("about_dialog");
static const gchar *const authors[] = {
"Johannes H. Jensen <joh@deworks.net>",
"Johannes H. Jensen <joh@pseudoberries.com>",
NULL
};
static const gchar *const documenters[] = {
"Johannes H. Jensen <joh@deworks.net>",
"Johannes H. Jensen <joh@pseudoberries.com>",
NULL
};
static const gchar *const artists[] = {

View File

@@ -1,7 +1,7 @@
/*
* ui.h - Alarm Clock applet UI routines
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#ifndef UI_H_

View File

@@ -1,7 +1,7 @@
/*
* util.c -- Misc utilities
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#include <string.h>

View File

@@ -1,7 +1,7 @@
/*
* util.h -- Misc utilities
*
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@deworks.net>
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors:
* Johannes H. Jensen <joh@deworks.net>
* Johannes H. Jensen <joh@pseudoberries.com>
*/
#ifndef UTIL_H_