remove unnecessary GTK_WIDGET() cast.

2004-01-06  Manish Singh  <yosh@gimp.org>

        * app/widgets/gimpdasheditor.c (gimp_dash_editor_new): remove
        unnecessary GTK_WIDGET() cast.

        * app/widgets/gimpstrokeeditor.c (gimp_stroke_editor_constructor):
        remove unnecessary G_OBJECT() casts.

        * libgimpbase/gimplimits.h: cosmetic cleanup.

        * libgimpbase/gimpenv.c (gimp_toplevel_directory): add (void)
        to prototype.

        * plug-ins/script-fu/script-fu-console.c (script_fu_cc_key_function):
        set cursor to end of line after history navigation.

        * plug-ins/common/struc.c (strucpi): use CLAMP0255.
This commit is contained in:
Manish Singh 2004-01-06 10:04:31 +00:00 committed by Manish Singh
parent ba35af08b2
commit ba92cb3ea3
7 changed files with 36 additions and 19 deletions

View File

@ -1,3 +1,21 @@
2004-01-06 Manish Singh <yosh@gimp.org>
* app/widgets/gimpdasheditor.c (gimp_dash_editor_new): remove
unnecessary GTK_WIDGET() cast.
* app/widgets/gimpstrokeeditor.c (gimp_stroke_editor_constructor):
remove unnecessary G_OBJECT() casts.
* libgimpbase/gimplimits.h: cosmetic cleanup.
* libgimpbase/gimpenv.c (gimp_toplevel_directory): add (void)
to prototype.
* plug-ins/script-fu/script-fu-console.c (script_fu_cc_key_function):
set cursor to end of line after history navigation.
* plug-ins/common/struc.c (strucpi): use CLAMP0255.
2004-01-06 Manish Singh <yosh@gimp.org>
* plug-ins/common/png.c: Implemented default settings, for both

View File

@ -421,9 +421,9 @@ gimp_dash_editor_new (GimpStrokeOptions *stroke_options)
{
g_return_val_if_fail (GIMP_IS_STROKE_OPTIONS (stroke_options), NULL);
return GTK_WIDGET (g_object_new (GIMP_TYPE_DASH_EDITOR,
return g_object_new (GIMP_TYPE_DASH_EDITOR,
"stroke-options", stroke_options,
NULL));
NULL);
}

View File

@ -228,10 +228,10 @@ gimp_stroke_editor_constructor (GType type,
"width-request", 14,
NULL);
gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
g_signal_connect_object (G_OBJECT (button), "clicked",
g_signal_connect_object (button, "clicked",
G_CALLBACK (gimp_dash_editor_shift_left),
dash_editor, G_CONNECT_SWAPPED);
g_signal_connect_after (G_OBJECT (button), "expose-event",
g_signal_connect_after (button, "expose-event",
G_CALLBACK (gimp_stroke_editor_paint_button),
button);
gtk_widget_show (button);
@ -244,10 +244,10 @@ gimp_stroke_editor_constructor (GType type,
"width-request", 14,
NULL);
gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
g_signal_connect_object (G_OBJECT (button), "clicked",
g_signal_connect_object (button, "clicked",
G_CALLBACK (gimp_dash_editor_shift_right),
dash_editor, G_CONNECT_SWAPPED);
g_signal_connect_after (G_OBJECT (button), "expose-event",
g_signal_connect_after (button, "expose-event",
G_CALLBACK (gimp_stroke_editor_paint_button),
NULL);
gtk_widget_show (button);
@ -263,7 +263,7 @@ gimp_stroke_editor_constructor (GType type,
box = gimp_enum_option_menu_new (GIMP_TYPE_DASH_PRESET,
G_CALLBACK (gimp_stroke_editor_dash_preset),
editor->options);
g_signal_connect_object (G_OBJECT (editor->options), "dash_info_changed",
g_signal_connect_object (editor->options, "dash_info_changed",
G_CALLBACK (gtk_option_menu_set_history),
box, G_CONNECT_SWAPPED);

View File

@ -190,7 +190,7 @@ gimp_personal_rc_file (const gchar *basename)
#ifdef G_OS_WIN32
gchar *
gimp_toplevel_directory ()
gimp_toplevel_directory (void)
{
/* Figure it out from the executable name */
static gchar *toplevel = NULL;

View File

@ -1391,7 +1391,7 @@ strucpi (GimpDrawable *drawable)
for (col = 0; col < (x2 - x1) * bytes; col+=bytes)
{
varde = cur_row[col] + mult*sdata[rcol*xm+rrow*ym+offs];
*d++ = (guchar) CLAMP (varde, 0, 255);
*d++ = (guchar) CLAMP0255 (varde);
if (bytes == 2)
*d++ = cur_row[col+1];
rcol++;
@ -1403,11 +1403,11 @@ strucpi (GimpDrawable *drawable)
for (col = 0; col < (x2 - x1) * bytes; col+=bytes)
{
varde = cur_row[col] + mult * sdata[rcol*xm+rrow*ym+offs];
*d++ = (guchar) CLAMP (varde, 0, 255);
*d++ = (guchar) CLAMP0255 (varde);
varde = cur_row[col+1] + mult * sdata[rcol*xm+rrow*ym+offs];
*d++ = (guchar) CLAMP (varde, 0, 255);
*d++ = (guchar) CLAMP0255 (varde);
varde = cur_row[col+2] + mult * sdata[rcol*xm+rrow*ym+offs];
*d++ = (guchar) CLAMP (varde, 0, 255);
*d++ = (guchar) CLAMP0255 (varde);
if (bytes == 4)
*d++ = cur_row[col+3];
rcol++;

View File

@ -53,9 +53,6 @@
#define BUFSIZE 256
#define message(string) printf("(%s): %d ::: %s\n", __PRETTY_FUNCTION__, __LINE__, string)
typedef struct
{
GtkTextBuffer *console;
@ -554,6 +551,8 @@ script_fu_cc_key_function (GtkWidget *widget,
gtk_entry_set_text (GTK_ENTRY (cint.cc),
(gchar *) (g_list_nth (history, history_cur))->data);
gtk_editable_set_position (GTK_EDITABLE (cint.cc), -1);
return TRUE;
}