From 2942769817e4d37bcb7303af277d318f95525507 Mon Sep 17 00:00:00 2001 From: kgraefe <> Date: Fri, 19 Mar 2010 23:55:15 +0000 Subject: [PATCH] * Version 1.5 * iCalendar file extension .ics is forced now --- ChangeLog | 6 ++++++ VERSION | 2 +- config.h.mingw | 8 ++++---- configure | 22 +++++++++++----------- configure.in | 4 ++-- po/de.gmo | Bin 4837 -> 4836 bytes po/es.gmo | Bin 4875 -> 4863 bytes po/fr.gmo | Bin 5084 -> 5083 bytes po/ru.gmo | Bin 6304 -> 6303 bytes src/functions.c | 18 ++++++++++++++++++ src/functions.h | 2 ++ src/plugin_actions.c | 12 +++++++++++- src/prefs.c | 8 +++++++- 13 files changed, 62 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05a2d7b..6d51a40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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é) diff --git a/VERSION b/VERSION index f7bfa52..c239c60 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5-0beta1 +1.5 diff --git a/config.h.mingw b/config.h.mingw index 7e2f5f9..2d23691 100644 --- a/config.h.mingw +++ b/config.h.mingw @@ -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" @@ -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 " @@ -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/" @@ -96,4 +96,4 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.5-0beta1" +#define VERSION "1.5" diff --git a/configure b/configure index bba654f..505d773 100755 --- a/configure +++ b/configure @@ -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 @@ -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='' @@ -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]... @@ -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 @@ -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. @@ -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 $@ @@ -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 @@ -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 @@ -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 @@ -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'`\\" diff --git a/configure.in b/configure.in index 8ad474d..627c40b 100644 --- a/configure.in +++ b/configure.in @@ -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]) diff --git a/po/de.gmo b/po/de.gmo index 13aac77e5bcf6c83e73d25f5bc358ff8c66ea3b8..f1c8282145568b23cbe1d70f022d0955f4f02057 100644 GIT binary patch delta 618 zcmXZZODIH99LMqhH8Yuq@n#sWoAH>MsF@-oHWqBiPO(ywJd%w`Hn%9V8=1S1NJ-Xc z7D`f6*vvwTELeK1tduMi-@m4Aeg5~{bAJDO&UtNpX+60&tb~XJydrK)p$E6ofd^QL zM_7vISb{k;@d>94ksl23K3OEvj4K$%UDS0~ScVT+jPH5Bip2VF;PQ*K^C5^DFo5+q zjoNSx8!?Twc#1B}A-&}etMNJSCu&14-I}l-b$%a4Z~%3qi^Y~m4aEur8nlH$+(X^b z88+Z8R^bO~po711VhBSR#sVBh%^5}gfeF;Sh5UFDJ9$rI3uY~fHi|clqo4EAg+qDA zk)AS-6}XBWm_iM{KocKPPw*Rg#3V$oE{Y}&;uy|gAztDk#&0Nm6m#VwT#F=7ce0Lp z0vo7-`^Z!|M!lk}?Qw1zV(&O3Mvr~%Od9=}5m%kdp7s8^qj579>+R~!EcuoT{{WHm BLID5( delta 620 zcmXZZIYBbcH<00z0Jl5a?`tiN!mrv~f24$5ZeSBy|4Vc6> zTt;oUg&pW%GoGUh3rKId!$y2A`ia`mOSevJN1Y$TFixUwG~u^JnkZ5XXwV+E;1TMM zF0dVMu>n6&15N(Q#31(I0G8kkYR)X`4=kYOtrf?2afo*ZgP5}^dMVy8ihj;Z7fu(Q zM|#RC*5M`&Vj4C03N3s@J;86}kuE~?>PFGRDV)PNy73xMF?vJcrC6yI;aVh#x|40x z6WBowJVvHU2K9<^j>k+JG3USx8{*{69V3#RakaXPbthi&TRuEyjf_u>MzRU-hWih1 CRYI=- diff --git a/po/es.gmo b/po/es.gmo index 73c260c21b603df40b38b431d9bbeee1992460f2..c7000be201a5dc816bc54720851aeebba2d3cff3 100644 GIT binary patch delta 953 zcmYk(Pe>F|9Ki86x~r+JJ3DDsW7Ko(CO z1d|?79V(UxB2pAPb?DGi5JFwL^yk#ALsZ}~vhPy~VVKW*^WN|Me(yI^yH{H0KN|Tf zLWsIbAvWPOR^VMM#RAsg6EyK9MsW!xe!-+6#2?(s{PJcYnsEZ#uz)&l3H3Q&u^NA` zDv^(J)F zIJ9^oTpxa%tTf7dWp{U9&w<5El~rO6F|90%|>wx+Jm?Ch4tYSMFSLo*h)lv0YY5F)iAA_yXQ?Ywlto!Mq~2oLRo zmxKt(2T?(2M&0ZW9)d)oq*Hc@f)3d=A-Z(v5J`Q1F@Y2e^O^Ve_h){kuWo<*PAgwx zjBScCRt+a$4ZI20!5O#_K7b~ihcUPWIs6E1jj>hOfbmcrV_RVfw!s-l=awMdvkVRR zEmYH4`Oku>Gqwc_X~UHfsJqhQbix&2KWA(5 z`WU2u_hAM;ggfAJIh?4*scuZ{fz-;2kP;h*=oXuXl)xh z^-S;7r248)*Gr!rlAb3#_VVsgmls@XaaO1)uD!#T>Wk6eC4F9$UfyR({M%Q!&6xo!BcJ%jJ%85-qyTs59Xn_1s9R Mr-_u-tCka~-?xg%n*aa+ diff --git a/po/fr.gmo b/po/fr.gmo index 3cf1dab314fe611d2018af66c0775b31ed064c38..ecd2f3a393b38e7cb10b7cc30ae90e3ca7df4127 100644 GIT binary patch delta 618 zcmXZZJxhX76u|NGl$M&>i=k0b(hCNHsJ$B55D6`TO?`l-$gm-TAh3oA8j5g;f}lVP zq9Ae!_lBrR+iVh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KiW+Ph^B#gB`eNQ}j?g;4B*X zBK5e64S0o>`0n=exyC5D9o0b&(ZUxT#G=B~OH5)dc@w+v3b)bA>D0^Y<2S}`DAa&c zL!=6msG}68Uc!SRViPh$`Z128wWoAI0QGQvd(} delta 620 zcmXZY&nv@m7{Kx8%cgCNnX$2h`4u&6Gt0Kx#V%_llA$nTm&eE5zNXf=y;VjS(bT+6qynf%x+$^QoD6hahkYJQ`Ke3XB6 z;{vJ+cW?x+ke__;Q4PM(jb^6vV+hr`HB{&JQ7ux!S$suilwnI!q?aJXdg{V?R1Fe1 zfLRRSJ$7LQ)rFQ;kp_(6Bu--;9%2U`p*nwo5qz%IEmo05@ + void g_date_set_today(GDate *date) { #if !GLIB_CHECK_VERSION(2,10,0) @@ -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); +} + diff --git a/src/functions.h b/src/functions.h index 43de44d..d7c1e6f 100644 --- a/src/functions.h +++ b/src/functions.h @@ -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 diff --git a/src/plugin_actions.c b/src/plugin_actions.c index 1048989..73b75f7 100644 --- a/src/plugin_actions.c +++ b/src/plugin_actions.c @@ -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); @@ -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, @@ -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); diff --git a/src/prefs.c b/src/prefs.c index 8f77756..cf90b61 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -27,6 +27,7 @@ #include "birthday_reminder.h" #include "icsexport.h" +#include "functions.h" extern PurplePlugin *plugin; @@ -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; @@ -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); }