Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
* Version 1.5
Browse files Browse the repository at this point in the history
* iCalendar file extension .ics is forced now
  • Loading branch information
kgraefe committed Mar 19, 2010
1 parent f02d5fa commit 2942769
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 20 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 1.5 (2010/03/20):
* Renamed project to pidgin-birthday-reminder
* Added tabs in the preferences window
* iCalendar files are forced to have the .ics extension now
* Added spanish translation (many thanks to Christoph Miebach)

Version 1.4 (2010/03/03):
* Added iCalendar export
* Added french translation (many thanks to Pierre Etchemaïté)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5-0beta1
1.5
8 changes: 4 additions & 4 deletions config.h.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
#define PACKAGE_NAME "pidgin-birthday-reminder"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "pidgin-birthday-reminder 1.5-0beta1"
#define PACKAGE_STRING "pidgin-birthday-reminder 1.5"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pidgin-birthday-reminder"
Expand All @@ -75,7 +75,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.5-0beta1"
#define PACKAGE_VERSION "1.5"

/* Define the plugin author to be used */
#define PLUGIN_AUTHOR "Konrad Gräfe <[email protected]>"
Expand All @@ -87,7 +87,7 @@
#define PLUGIN_STATIC_NAME "birthday-reminder"

/* Define the plugin version to be used */
#define PLUGIN_VERSION "1.5-0beta1"
#define PLUGIN_VERSION "1.5"

/* Define the plugin website to be used */
#define PLUGIN_WEBSITE "http://freakazoid.teamblind.de/2009/02/14/pidgin-birthday-reminder/"
Expand All @@ -96,4 +96,4 @@
#define STDC_HEADERS 1

/* Version number of package */
#define VERSION "1.5-0beta1"
#define VERSION "1.5"
22 changes: 11 additions & 11 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for pidgin-birthday-reminder 1.5-0beta1.
# Generated by GNU Autoconf 2.64 for pidgin-birthday-reminder 1.5.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
Expand Down Expand Up @@ -695,8 +695,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='pidgin-birthday-reminder'
PACKAGE_TARNAME='pidgin-birthday-reminder'
PACKAGE_VERSION='1.5-0beta1'
PACKAGE_STRING='pidgin-birthday-reminder 1.5-0beta1'
PACKAGE_VERSION='1.5'
PACKAGE_STRING='pidgin-birthday-reminder 1.5'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1456,7 +1456,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures pidgin-birthday-reminder 1.5-0beta1 to adapt to many kinds of systems.
\`configure' configures pidgin-birthday-reminder 1.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1527,7 +1527,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of pidgin-birthday-reminder 1.5-0beta1:";;
short | recursive ) echo "Configuration of pidgin-birthday-reminder 1.5:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1631,7 +1631,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
pidgin-birthday-reminder configure 1.5-0beta1
pidgin-birthday-reminder configure 1.5
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1996,7 +1996,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by pidgin-birthday-reminder $as_me 1.5-0beta1, which was
It was created by pidgin-birthday-reminder $as_me 1.5, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2804,7 +2804,7 @@ fi

# Define the identity of the package.
PACKAGE='pidgin-birthday-reminder'
VERSION='1.5-0beta1'
VERSION='1.5'


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -2851,7 +2851,7 @@ ac_config_headers="$ac_config_headers config.h"


cat >>confdefs.h <<_ACEOF
#define PLUGIN_VERSION "1.5-0beta1"
#define PLUGIN_VERSION "1.5"
_ACEOF


Expand Down Expand Up @@ -12455,7 +12455,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by pidgin-birthday-reminder $as_me 1.5-0beta1, which was
This file was extended by pidgin-birthday-reminder $as_me 1.5, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -12519,7 +12519,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
pidgin-birthday-reminder config.status 1.5-0beta1
pidgin-birthday-reminder config.status 1.5
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Expand Down
4 changes: 2 additions & 2 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT(pidgin-birthday-reminder, 1.5-0beta1)
AC_INIT(pidgin-birthday-reminder, 1.5)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/birthday_reminder.c])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])

AC_DEFINE_UNQUOTED(PLUGIN_VERSION, ["1.5-0beta1"], [Define the plugin version to be used])
AC_DEFINE_UNQUOTED(PLUGIN_VERSION, ["1.5"], [Define the plugin version to be used])

AC_DEFINE_UNQUOTED(PLUGIN_WEBSITE, ["http://freakazoid.teamblind.de/2009/02/14/pidgin-birthday-reminder/"], [Define the plugin website to be used])

Expand Down
Binary file modified po/de.gmo
Binary file not shown.
Binary file modified po/es.gmo
Binary file not shown.
Binary file modified po/fr.gmo
Binary file not shown.
Binary file modified po/ru.gmo
Binary file not shown.
18 changes: 18 additions & 0 deletions src/functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "internal.h"

#include <string.h>


void g_date_set_today(GDate *date) {
#if !GLIB_CHECK_VERSION(2,10,0)
Expand Down Expand Up @@ -77,3 +79,19 @@ gboolean node_account_connected(PurpleBlistNode *node) {

return purple_account_is_connected(acc);
}

gboolean has_file_extension(const char *filename, const char *ext) {
int len, extlen;

if (filename == NULL || *filename == '\0' || ext == NULL)
return 0;

extlen = strlen(ext);
len = strlen(filename) - extlen;

if (len < 0)
return 0;

return (strncasecmp(filename + len, ext, extlen) == 0);
}

2 changes: 2 additions & 0 deletions src/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ void write_im(PurpleBlistNode *node);

gboolean node_account_connected(PurpleBlistNode *node);

gboolean has_file_extension(const char *filename, const char *ext);

#endif
12 changes: 11 additions & 1 deletion src/plugin_actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "check.h"
#include "birthday_list.h"
#include "icsexport.h"
#include "functions.h"

static void check_birthdays_plugin_action_cb(PurplePluginAction *action) {
check_birthdays(NULL, NULL);
Expand All @@ -42,6 +43,7 @@ static void birthday_list_show_cb(PurplePluginAction *action) {
static void export_birthdays_cb(PurplePluginAction *action) {
GtkWidget *dialog;
GtkFileFilter *filter;
gchar *path, *tmp;

dialog = gtk_file_chooser_dialog_new(_("Save birthday list as..."),
NULL,
Expand All @@ -60,7 +62,15 @@ static void export_birthdays_cb(PurplePluginAction *action) {
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);

if(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
icsexport(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)));
path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
if(!has_file_extension(path, "ics")) {
tmp = path;
path = g_strdup_printf("%s.ics", tmp);
g_free(tmp);
}

icsexport(path);
g_free(path);
}

gtk_widget_destroy(dialog);
Expand Down
8 changes: 7 additions & 1 deletion src/prefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "birthday_reminder.h"
#include "icsexport.h"
#include "functions.h"

extern PurplePlugin *plugin;

Expand Down Expand Up @@ -67,7 +68,7 @@ static void export_filechooser_cb(GtkWidget *widget, gpointer data) {
GtkEntry *entry;
GtkWidget *dialog;
GtkFileFilter *filter;
gchar *new_path;
gchar *new_path, *tmp;

entry = (GtkEntry *) data;

Expand All @@ -89,6 +90,11 @@ static void export_filechooser_cb(GtkWidget *widget, gpointer data) {

if(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
new_path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
if(!has_file_extension(new_path, "ics")) {
tmp = new_path;
new_path = g_strdup_printf("%s.ics", tmp);
g_free(tmp);
}
gtk_entry_set_text(entry, new_path);
g_free(new_path);
}
Expand Down

0 comments on commit 2942769

Please sign in to comment.