Sun, 23 May 2004 22:17:38 +0000
[gaim-migrate @ 9821]
nosnilmot wrote:
" This patch prevents turning strings with '@' in them
into mailto: links if they are not valid email addresses.
An example would be copying from a shell something like:
[user@host dir]$ thing
would create a mailto link to "[user@host"
It adds a gaim_email_is_valid function to util.c which
could also be used elsewhere :)
Thanks to Alver on #gaim for reporting this buglet."
And also said:
"Updated patch attached, tested against 86,171 valid email
addresses and as many invalid addresses as I could make up"
committer: Tim Ringenbach <marv@pidgin.im>
| 3832 | 1 | /* gtkcellrendererprogress.h |
| 8046 | 2 | * Gaim is the legal property of its developers, whose names are too numerous |
| 3 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 4 | * source distribution. | |
| 3832 | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | |
| 7 | * it under the terms of the GNU General Public License as published by | |
| 8 | * the Free Software Foundation; either version 2 of the License, or | |
| 9 | * (at your option) any later version. | |
| 10 | * | |
| 11 | * This program is distributed in the hope that it will be useful, | |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 14 | * GNU General Public License for more details. | |
| 15 | * | |
| 16 | * You should have received a copy of the GNU General Public License | |
| 17 | * along with this program; if not, write to the Free Software | |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 19 | * | |
| 20 | */ | |
| 21 | ||
| 22 | #ifndef __GTK_CELL_RENDERER_PROGRESS_H__ | |
| 23 | #define __GTK_CELL_RENDERER_PROGRESS_H__ | |
| 24 | ||
| 25 | #include <gtk/gtkcellrenderer.h> | |
| 26 | ||
| 27 | #ifdef __cplusplus | |
| 28 | extern "C" { | |
| 29 | #endif /* __cplusplus */ | |
| 30 | ||
| 31 | ||
| 32 | #define GTK_TYPE_CELL_RENDERER_PROGRESS (gtk_cell_renderer_progress_get_type()) | |
| 33 | #define GTK_CELL_RENDERER_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgress)) | |
| 34 | #define GTK_CELL_RENDERER_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgressClass)) | |
| 35 | #define GTK_IS_CELL_PROGRESS_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER_PROGRESS)) | |
| 36 | #define GTK_IS_CELL_PROGRESS_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_PROGRESS)) | |
| 37 | #define GTK_CELL_RENDERER_PROGRESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgressClass)) | |
| 38 | ||
| 39 | typedef struct _GtkCellRendererProgress GtkCellRendererProgress; | |
| 40 | typedef struct _GtkCellRendererProgressClass GtkCellRendererProgressClass; | |
| 41 | ||
| 42 | struct _GtkCellRendererProgress { | |
| 43 | GtkCellRenderer parent; | |
| 44 | ||
| 45 | gdouble progress; | |
| 46 | gchar *text; | |
| 47 | gboolean text_set; | |
| 48 | }; | |
| 49 | ||
| 50 | struct _GtkCellRendererProgressClass { | |
| 51 | GtkCellRendererClass parent_class; | |
| 52 | }; | |
| 53 | ||
| 54 | GType gtk_cell_renderer_progress_get_type (void); | |
| 55 | GtkCellRenderer *gtk_cell_renderer_progress_new (void); | |
| 56 | ||
| 57 | ||
| 58 | #ifdef __cplusplus | |
| 59 | } | |
| 60 | #endif /* __cplusplus */ | |
| 61 | ||
| 62 | #endif /* __GTK_CELL_RENDERER_PROGRESS_H__ */ |