Commit ba92cb3e authored by Manish Singh's avatar Manish Singh Committed by Manish Singh
Browse files

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.
parent ba35af08
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
......@@ -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,
"stroke-options", stroke_options,
NULL));
return g_object_new (GIMP_TYPE_DASH_EDITOR,
"stroke-options", stroke_options,
NULL);
}
......
......@@ -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);
......
......@@ -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;
......
......@@ -37,9 +37,9 @@
/* memory sizes
*/
#define GIMP_MAX_MEMSIZE ((guint64) 1 << 42) /* 4 terabyte;
* needs a 64bit variable
* and must be < G_MAXDOUBLE
*/
* needs a 64bit variable
* and must be < G_MAXDOUBLE
*/
/* the size of the checks which indicate transparency...
......
......@@ -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++;
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment