Re: meat-grinder patch



Josh Barrow <drleary mac com> writes:
> -static int number_of_files = 0;
> -static int number_of_dirs = 0;
> -static char *file_icon = NULL;
> -static char *folder_icon = NULL;
> -static char *compress_icon = NULL;
> -static char *tar_prog = NULL;
> -static char *filename = NULL;
> +static gint number_of_files = 0;
> +static gint number_of_dirs = 0;
> +static gchar *file_icon = NULL;
> +static gchar *folder_icon = NULL;
> +static gchar *compress_icon = NULL;
> +static gchar *tar_prog = NULL;
> +static gchar *filename = NULL;
>  static pid_t temporary_pid = 0;
> -static char *temporary_file = NULL;
> +static gchar *temporary_file = NULL;

For future reference, many of us consider "gchar" and "gint" to be
stupid and don't use them. (e.g. Pango does not use them, I don't use
them in my code anymore.) This is just for those two types because
they have no purpose. "guint" is at least shorter to type than
"unsigned int" so is used. The ones with fixed sizes ("guint32") do
have a purpose so should be used when a fixed size is desired.

> +	response = gtk_dialog_run (GTK_DIALOG (req));
>  
> -	if (ret == 0)
> +	if (response == GTK_RESPONSE_YES)
>  		return TRUE;
>  	else /* this includes -1 which is "destroyed" */
>  		return FALSE;

Where does this dialog get destroyed? You need to destroy it I think.

> -	gtk_window_position (GTK_WINDOW (fsel), GTK_WIN_POS_MOUSE);
> +	gtk_window_set_position (GTK_WINDOW (fsel),
> GTK_WIN_POS_MOUSE);

POS_MOUSE is utter BS, I would remove this line entirely.

> +	gtk_signal_connect_full
>  		(GTK_OBJECT (fsel->cancel_button), "clicked",
>  		 GTK_SIGNAL_FUNC (gtk_widget_destroy), 
>  		 GTK_OBJECT (fsel));

g_signal_connect_data is the "g" equivalent of _full

> -	gtk_window_position (GTK_WINDOW (fsel), GTK_WIN_POS_MOUSE);
> +	gtk_window_set_position (GTK_WINDOW (fsel),
> GTK_WIN_POS_MOUSE);

POS_MOUSE is the spawn of satan.

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]