view src/gtkcellrendererprogress.h @ 4029:31480901bf29

[gaim-migrate @ 4233] "with the change to .60 and the new method of using perl_call argument parsing was broken. What essentially happened is that the previous method of pre-parsing was to generate a string in the for 'arg one','arg two','arg three' and execute the perl function via &perlfunc(args). This would make the perl function in essense parse the variables for us. With the introduction of perl_call, however, that argument list was being treated as one long, singular argument. perl_call asks for lists of pointers to character arrays that are NULL terminated, and it passes them into the function using an internal method. With this said, I changed the function execute_perl from requiring (char* function, char* args) to (char* function, char** args). It no longer takes a single argument and inserts it into the appropriate data type that is terminated with a NULL element, instead you now have to pass it a pre-NULL terminated array of character pointers to accomodate some functions wanting to give it more than one argument. I modified the functions that use execute_perl to use this method, and commented those lines, as well chopping the multiple argument section into buf[0] = looking sections for clarity. Finally, I inserted a heft comment above execute_perl to try and explain what I did, I hope it is understandable. " -- Eric Timme (var1ety) committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 01 Dec 2002 20:43:00 +0000
parents 29664b8a1368
children fa6395637e2c
line wrap: on
line source

/* gtkcellrendererprogress.h
 * Copyright (C) 2002, Sean Egan <bj91704@binghamton.edu>
 *
 * 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 __GTK_CELL_RENDERER_PROGRESS_H__
#define __GTK_CELL_RENDERER_PROGRESS_H__

#include <gtk/gtkcellrenderer.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */


#define GTK_TYPE_CELL_RENDERER_PROGRESS         (gtk_cell_renderer_progress_get_type())
#define GTK_CELL_RENDERER_PROGRESS(obj)         (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgress))
#define GTK_CELL_RENDERER_PROGRESS_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgressClass))
#define GTK_IS_CELL_PROGRESS_PROGRESS(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER_PROGRESS))
#define GTK_IS_CELL_PROGRESS_PROGRESS_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_PROGRESS))
#define GTK_CELL_RENDERER_PROGRESS_GET_CLASS(obj)         (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_PROGRESS, GtkCellRendererProgressClass))

typedef struct _GtkCellRendererProgress GtkCellRendererProgress;
typedef struct _GtkCellRendererProgressClass GtkCellRendererProgressClass;

	struct _GtkCellRendererProgress {
		GtkCellRenderer parent;

		gdouble progress;
		gchar *text;
		gboolean text_set;
	};

	struct _GtkCellRendererProgressClass {
		GtkCellRendererClass parent_class;
	};

	GType            gtk_cell_renderer_progress_get_type     (void);
	GtkCellRenderer  *gtk_cell_renderer_progress_new          (void);


#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __GTK_CELL_RENDERER_PROGRESS_H__ */