grim/guifications2

[gf2-migrate @ 244]
org.guifications.gf2
2007-02-04, John Bailey
c5f9d67d08a7
Parents d27a75d2844a
Children 4cdf51cddadc
[gf2-migrate @ 244]
(2007-02-03 22:50:53) Me: should we change the url the update notify
in gf2 looks at for 2.13 and later?
(2007-02-03 22:51:07) Gary Kramlich: we need to just remove that
--- a/src/Makefile.am Sun Jan 21 05:35:54 2007 -0500
+++ b/src/Makefile.am Sun Feb 04 05:18:29 2007 -0500
@@ -15,7 +15,6 @@
gf_menu.h \
gf_notification.h \
gf_preferences.h \
- gf_release.h \
gf_stock.h \
gf_theme.h \
gf_theme_editor.h \
@@ -48,7 +47,6 @@
gf_menu.c \
gf_notification.c \
gf_preferences.c \
- gf_release.c \
gf_stock.c \
gf_theme.c \
gf_theme_editor.c \
--- a/src/Makefile.mingw Sun Jan 21 05:35:54 2007 -0500
+++ b/src/Makefile.mingw Sun Feb 04 05:18:29 2007 -0500
@@ -77,7 +77,6 @@
gf_menu.c \
gf_notification.c \
gf_preferences.c \
- gf_release.c \
gf_stock.c \
gf_theme.c \
gf_theme_editor.c \
--- a/src/gf_event.c Sun Jan 21 05:35:54 2007 -0500
+++ b/src/gf_event.c Sun Feb 04 05:18:29 2007 -0500
@@ -41,7 +41,6 @@
#include "gf_internal.h"
#include "gf_notification.h"
#include "gf_preferences.h"
-#include "gf_release.h"
struct _GfEvent {
gchar *n_type;
@@ -238,8 +237,6 @@
gf_event_connection_throttle_cb(gpointer data) {
GaimAccount *account = (GaimAccount *)data;
- gf_release_check();
-
if(!account)
return FALSE;
--- a/src/gf_preferences.c Sun Jan 21 05:35:54 2007 -0500
+++ b/src/gf_preferences.c Sun Feb 04 05:18:29 2007 -0500
@@ -1271,12 +1271,6 @@
vbox = make_notebook_page(GTK_NOTEBOOK(notebook), _("Advanced"), -1);
- frame = gaim_gtk_make_frame(vbox, _("Release Notification"));
-
- gaim_gtk_prefs_checkbox(_("_Check for new releases"),
- GF_PREF_ADVANCED_RELEASE_NOTIFICATION,
- frame);
-
frame = gaim_gtk_make_frame(vbox, _("Display Options"));
gaim_gtk_prefs_labeled_spin_button(frame, _("Max _Visible Guifications:"),
--- a/src/gf_release.c Sun Jan 21 05:35:54 2007 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
- * Guifications - The end all, be all, toaster popup plugin
- * Copyright (C) 2003-2005 Gary Kramlich
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-#include <glib.h>
-
-#include <debug.h>
-#include <notify.h>
-#include <prefs.h>
-#include <util.h>
-
-#ifdef HAVE_CONFIG_H
-# include "../gf_config.h"
-#endif
-
-#include "gf_internal.h"
-#include "gf_preferences.h"
-#include "gf_release.h"
-
-static void
-gf_release_check_cb(GaimUtilFetchUrlData *url_data, gpointer userdata,
- const gchar *data, size_t len, const gchar *err_msg)
-{
- const gchar *changelog = data;
- GString *notification;
- gchar *cur_ver, *formatted;
- gint i = 0;
-
- if (!changelog || !len)
- return;
-
- while (changelog[i] && changelog[i] != '\n')
- i++;
-
- cur_ver = g_strndup(changelog, i);
- changelog += i;
-
- while (*changelog == '\n')
- changelog++;
-
- notification = g_string_new("");
- g_string_append_printf(notification,
- _("Guifications %s is available, "
- "you are running version %s."),
- cur_ver,
-#ifdef _WIN32
- GF_VERSION
-#else
- VERSION
-#endif
- );
-
- notification = g_string_append(notification, "<hr>");
-
- if (*changelog) {
- formatted = gaim_strdup_withhtml(changelog);
- g_string_append_printf(notification, "<b>%s</b><br>%s",
- _("ChangeLog:"), formatted);
- g_free(formatted);
- }
-
- formatted = g_strdup_printf(_("You can download version %s from"), cur_ver);
- g_string_append_printf(notification,
- "<hr>%s <a href=\"%s\">%s</a>.",
- formatted, GF_WEBSITE, GF_WEBSITE);
- g_free(formatted);
-
- gaim_notify_formatted(NULL, _("New version available"),
- _("There is a new version of Guifications available!"),
- NULL, notification->str, NULL, NULL);
-
- g_string_free(notification, TRUE);
- g_free(cur_ver);
-}
-
-void
-gf_release_check() {
- int last_checked;
- gchar *url;
- time_t t;
-
- if(gaim_prefs_get_bool(GF_PREF_ADVANCED_RELEASE_NOTIFICATION)) {
- last_checked = gaim_prefs_get_int(GF_PREF_ADVANCED_RELEASE_LAST_CHECK);
- t = time(NULL);
-
- if (t - last_checked > 86400 /* one day */) {
- gaim_debug_info("Guifications", "Checking for a new version\n");
-
- url = g_strdup_printf("http://guifications.sourceforge.net/version.php?module=guifications&version=%s",
-#ifdef _WIN32
- GF_VERSION);
-#else
- VERSION);
-#endif
- gaim_util_fetch_url(url, TRUE, NULL, FALSE, gf_release_check_cb, NULL);
- gaim_prefs_set_int(GF_PREF_ADVANCED_RELEASE_LAST_CHECK, t);
- g_free(url);
- }
- }
-}
--- a/src/gf_release.h Sun Jan 21 05:35:54 2007 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
- * Guifications - The end all, be all, toaster popup plugin
- * Copyright (C) 2003-2005 Gary Kramlich
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-#ifndef GF_RELEASE_H
-#define GF_RELEASE_H
-
-G_BEGIN_DECLS
-
-void gf_release_check();
-
-G_END_DECLS
-
-#endif /* GF_RELEASE_H */