forked from AuroraMiddleware/gtk
Put into #ifdef DO_BLINK to avoid an unused static function. (#97965)
* tests/testtext.c (blink_timeout): Put into #ifdef DO_BLINK to avoid an unused static function. (#97965) * gtk/gtktextiter.c (backward_line_leaving_caches_unmodified): * gtk/gtkstyle.c (radio_aa_bits): (draw_spin_entry_shadow): #if-0-out unused static functions and variables. (#97965) * gtk/gtktextview.c (text_window_get_allocation): * gtk/gtkcolorsel.c (gtk_color_selection_get_palette_size): (gtk_color_selection_get_palette_color): (gtk_color_selection_unset_palette_color): Remove unused static functions. (#97965) * gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_with_screen_hook): Fix doc comment.
This commit is contained in:
parent
b179b5eba4
commit
2d1ce5a4fb
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
||||
2002-11-08 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/testtext.c (blink_timeout): Put into #ifdef DO_BLINK to
|
||||
avoid an unused static function. (#97965)
|
||||
|
||||
* gtk/gtktextiter.c (backward_line_leaving_caches_unmodified):
|
||||
* gtk/gtkstyle.c (radio_aa_bits):
|
||||
(draw_spin_entry_shadow): #if-0-out unused static functions and
|
||||
variables. (#97965)
|
||||
|
||||
* gtk/gtktextview.c (text_window_get_allocation):
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_get_palette_size):
|
||||
(gtk_color_selection_get_palette_color):
|
||||
(gtk_color_selection_unset_palette_color): Remove unused static
|
||||
functions. (#97965)
|
||||
|
||||
* gtk/gtkcolorsel.c
|
||||
(gtk_color_selection_set_change_palette_with_screen_hook): Fix doc
|
||||
comment.
|
||||
|
||||
Fri Nov 8 17:08:54 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_new): Use
|
||||
|
@ -1,3 +1,23 @@
|
||||
2002-11-08 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/testtext.c (blink_timeout): Put into #ifdef DO_BLINK to
|
||||
avoid an unused static function. (#97965)
|
||||
|
||||
* gtk/gtktextiter.c (backward_line_leaving_caches_unmodified):
|
||||
* gtk/gtkstyle.c (radio_aa_bits):
|
||||
(draw_spin_entry_shadow): #if-0-out unused static functions and
|
||||
variables. (#97965)
|
||||
|
||||
* gtk/gtktextview.c (text_window_get_allocation):
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_get_palette_size):
|
||||
(gtk_color_selection_get_palette_color):
|
||||
(gtk_color_selection_unset_palette_color): Remove unused static
|
||||
functions. (#97965)
|
||||
|
||||
* gtk/gtkcolorsel.c
|
||||
(gtk_color_selection_set_change_palette_with_screen_hook): Fix doc
|
||||
comment.
|
||||
|
||||
Fri Nov 8 17:08:54 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_new): Use
|
||||
|
@ -1,3 +1,23 @@
|
||||
2002-11-08 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/testtext.c (blink_timeout): Put into #ifdef DO_BLINK to
|
||||
avoid an unused static function. (#97965)
|
||||
|
||||
* gtk/gtktextiter.c (backward_line_leaving_caches_unmodified):
|
||||
* gtk/gtkstyle.c (radio_aa_bits):
|
||||
(draw_spin_entry_shadow): #if-0-out unused static functions and
|
||||
variables. (#97965)
|
||||
|
||||
* gtk/gtktextview.c (text_window_get_allocation):
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_get_palette_size):
|
||||
(gtk_color_selection_get_palette_color):
|
||||
(gtk_color_selection_unset_palette_color): Remove unused static
|
||||
functions. (#97965)
|
||||
|
||||
* gtk/gtkcolorsel.c
|
||||
(gtk_color_selection_set_change_palette_with_screen_hook): Fix doc
|
||||
comment.
|
||||
|
||||
Fri Nov 8 17:08:54 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_new): Use
|
||||
|
@ -1,3 +1,23 @@
|
||||
2002-11-08 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/testtext.c (blink_timeout): Put into #ifdef DO_BLINK to
|
||||
avoid an unused static function. (#97965)
|
||||
|
||||
* gtk/gtktextiter.c (backward_line_leaving_caches_unmodified):
|
||||
* gtk/gtkstyle.c (radio_aa_bits):
|
||||
(draw_spin_entry_shadow): #if-0-out unused static functions and
|
||||
variables. (#97965)
|
||||
|
||||
* gtk/gtktextview.c (text_window_get_allocation):
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_get_palette_size):
|
||||
(gtk_color_selection_get_palette_color):
|
||||
(gtk_color_selection_unset_palette_color): Remove unused static
|
||||
functions. (#97965)
|
||||
|
||||
* gtk/gtkcolorsel.c
|
||||
(gtk_color_selection_set_change_palette_with_screen_hook): Fix doc
|
||||
comment.
|
||||
|
||||
Fri Nov 8 17:08:54 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_new): Use
|
||||
|
@ -1,3 +1,23 @@
|
||||
2002-11-08 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/testtext.c (blink_timeout): Put into #ifdef DO_BLINK to
|
||||
avoid an unused static function. (#97965)
|
||||
|
||||
* gtk/gtktextiter.c (backward_line_leaving_caches_unmodified):
|
||||
* gtk/gtkstyle.c (radio_aa_bits):
|
||||
(draw_spin_entry_shadow): #if-0-out unused static functions and
|
||||
variables. (#97965)
|
||||
|
||||
* gtk/gtktextview.c (text_window_get_allocation):
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_get_palette_size):
|
||||
(gtk_color_selection_get_palette_color):
|
||||
(gtk_color_selection_unset_palette_color): Remove unused static
|
||||
functions. (#97965)
|
||||
|
||||
* gtk/gtkcolorsel.c
|
||||
(gtk_color_selection_set_change_palette_with_screen_hook): Fix doc
|
||||
comment.
|
||||
|
||||
Fri Nov 8 17:08:54 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_new): Use
|
||||
|
@ -1,3 +1,23 @@
|
||||
2002-11-08 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/testtext.c (blink_timeout): Put into #ifdef DO_BLINK to
|
||||
avoid an unused static function. (#97965)
|
||||
|
||||
* gtk/gtktextiter.c (backward_line_leaving_caches_unmodified):
|
||||
* gtk/gtkstyle.c (radio_aa_bits):
|
||||
(draw_spin_entry_shadow): #if-0-out unused static functions and
|
||||
variables. (#97965)
|
||||
|
||||
* gtk/gtktextview.c (text_window_get_allocation):
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_get_palette_size):
|
||||
(gtk_color_selection_get_palette_color):
|
||||
(gtk_color_selection_unset_palette_color): Remove unused static
|
||||
functions. (#97965)
|
||||
|
||||
* gtk/gtkcolorsel.c
|
||||
(gtk_color_selection_set_change_palette_with_screen_hook): Fix doc
|
||||
comment.
|
||||
|
||||
Fri Nov 8 17:08:54 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_new): Use
|
||||
|
@ -159,15 +159,9 @@ static void gtk_color_selection_realize (GtkWidget *widget
|
||||
static void gtk_color_selection_unrealize (GtkWidget *widget);
|
||||
static void gtk_color_selection_show_all (GtkWidget *widget);
|
||||
|
||||
static gint gtk_color_selection_get_palette_size (GtkColorSelection *colorsel);
|
||||
static gboolean gtk_color_selection_get_palette_color (GtkColorSelection *colorsel,
|
||||
gint index,
|
||||
GdkColor *color);
|
||||
static void gtk_color_selection_set_palette_color (GtkColorSelection *colorsel,
|
||||
gint index,
|
||||
GdkColor *color);
|
||||
static void gtk_color_selection_unset_palette_color (GtkColorSelection *colorsel,
|
||||
gint index);
|
||||
static GdkGC *get_focus_gc (GtkWidget *drawing_area,
|
||||
gint *focus_width);
|
||||
static void default_noscreen_change_palette_func (const GdkColor *colors,
|
||||
@ -2463,86 +2457,6 @@ gtk_color_selection_set_palette_color (GtkColorSelection *colorsel,
|
||||
palette_set_color (priv->custom_palette[x][y], colorsel, col);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_color_selection_get_palette_color:
|
||||
* @colorsel: a #GtkColorSelection.
|
||||
* @index: the color index of the palette.
|
||||
* @color: a #GdkColor to fill in with the color value.
|
||||
*
|
||||
* Set @color to have the color found in the palette at @index. If
|
||||
* the palette is unset, it will leave the color unset.
|
||||
*
|
||||
* Return value: %TRUE if the palette located at @index has a color set. %FALSE
|
||||
* if it doesn't.
|
||||
**/
|
||||
static gboolean
|
||||
gtk_color_selection_get_palette_color (GtkColorSelection *colorsel,
|
||||
gint index,
|
||||
GdkColor *color)
|
||||
{
|
||||
ColorSelectionPrivate *priv;
|
||||
gint x, y;
|
||||
gdouble col[4];
|
||||
|
||||
g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), FALSE);
|
||||
g_return_val_if_fail (index >= 0 && index < GTK_CUSTOM_PALETTE_WIDTH*GTK_CUSTOM_PALETTE_HEIGHT, FALSE);
|
||||
|
||||
priv = colorsel->private_data;
|
||||
|
||||
x = index % GTK_CUSTOM_PALETTE_WIDTH;
|
||||
y = index / GTK_CUSTOM_PALETTE_WIDTH;
|
||||
|
||||
if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (priv->custom_palette[x][y]), "color_set")) == 0)
|
||||
return FALSE;
|
||||
|
||||
palette_get_color (priv->custom_palette[x][y], col);
|
||||
|
||||
color->red = UNSCALE (col[0]);
|
||||
color->green = UNSCALE (col[1]);
|
||||
color->blue = UNSCALE (col[2]);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_color_selection_unset_palette_color:
|
||||
* @colorsel: a #GtkColorSelection.
|
||||
* @index: the color index in the palette.
|
||||
*
|
||||
* Changes the palette located @index to have no color set.
|
||||
**/
|
||||
static void
|
||||
gtk_color_selection_unset_palette_color (GtkColorSelection *colorsel,
|
||||
gint index)
|
||||
{
|
||||
ColorSelectionPrivate *priv;
|
||||
gint x, y;
|
||||
|
||||
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
|
||||
g_return_if_fail (index >= 0 && index < GTK_CUSTOM_PALETTE_WIDTH*GTK_CUSTOM_PALETTE_HEIGHT);
|
||||
|
||||
x = index % GTK_CUSTOM_PALETTE_WIDTH;
|
||||
y = index / GTK_CUSTOM_PALETTE_WIDTH;
|
||||
|
||||
priv = colorsel->private_data;
|
||||
palette_unset_color (priv->custom_palette[x][y]);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_color_selection_get_current_alpha:
|
||||
* @colorsel: a #GtkColorSelection.
|
||||
*
|
||||
* Returns the maximum number of palette colors.
|
||||
*
|
||||
* Return value: the maximum number of palette indexes.
|
||||
**/
|
||||
static gint
|
||||
gtk_color_selection_get_palette_size (GtkColorSelection *colorsel)
|
||||
{
|
||||
return GTK_CUSTOM_PALETTE_WIDTH * GTK_CUSTOM_PALETTE_HEIGHT;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gtk_color_selection_is_adjusting:
|
||||
* @colorsel: a #GtkColorSelection.
|
||||
@ -2787,7 +2701,7 @@ gtk_color_selection_set_change_palette_hook (GtkColorSelectionChangePaletteFunc
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_color_selection_set_change_palette_hook:
|
||||
* gtk_color_selection_set_change_palette_with_screen_hook:
|
||||
* @func: a function to call when the custom palette needs saving.
|
||||
*
|
||||
* Installs a global function to be called whenever the user tries to
|
||||
|
@ -395,9 +395,14 @@ static guchar radio_light_bits[] = {
|
||||
static guchar radio_text_bits[] = {
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0xf0,0x01,0xf0,0x01,0xf0,
|
||||
0x01,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
|
||||
#if 0
|
||||
/*
|
||||
* radio_aa_bits is currently not used, since it is all zeros.
|
||||
*/
|
||||
static guchar radio_aa_bits[] = {
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
|
||||
#endif
|
||||
static guchar radio_base_bits[] = {
|
||||
0x00,0x00,0x00,0x00,0xf0,0x01,0xf8,0x03,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,
|
||||
0x07,0xfc,0x07,0xf8,0x03,0xf0,0x01,0x00,0x00,0x00,0x00,0x00,0x00};
|
||||
@ -2276,6 +2281,10 @@ draw_thin_shadow (GtkStyle *style,
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* See http://bugzilla.gnome.org/show_bug.cgi?id=80229
|
||||
*/
|
||||
static void
|
||||
draw_spin_entry_shadow (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
@ -2342,6 +2351,7 @@ draw_spin_entry_shadow (GtkStyle *style,
|
||||
gdk_gc_set_clip_rectangle (style->base_gc[state], NULL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
draw_spinbutton_shadow (GtkStyle *style,
|
||||
|
@ -1834,10 +1834,14 @@ forward_line_leaving_caches_unmodified (GtkTextRealIter *real)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/* The return value of this indicates WHETHER WE MOVED.
|
||||
* The return value of public functions indicates
|
||||
* (MOVEMENT OCCURRED && NEW ITER IS DEREFERENCEABLE)
|
||||
*
|
||||
* This function is currently unused, thus it is #if-0-ed. It is
|
||||
* left here, since it's non-trivial code that might be useful in
|
||||
* the future.
|
||||
*/
|
||||
static gboolean
|
||||
backward_line_leaving_caches_unmodified (GtkTextRealIter *real)
|
||||
@ -1878,6 +1882,7 @@ backward_line_leaving_caches_unmodified (GtkTextRealIter *real)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* The return value indicates (MOVEMENT OCCURRED && NEW ITER IS
|
||||
* DEREFERENCEABLE)
|
||||
|
@ -388,8 +388,6 @@ static void text_window_invalidate_rect (GtkTextWindow *win,
|
||||
|
||||
static gint text_window_get_width (GtkTextWindow *win);
|
||||
static gint text_window_get_height (GtkTextWindow *win);
|
||||
static void text_window_get_allocation (GtkTextWindow *win,
|
||||
GdkRectangle *rect);
|
||||
|
||||
|
||||
enum
|
||||
@ -6782,13 +6780,6 @@ text_window_get_height (GtkTextWindow *win)
|
||||
return win->allocation.height;
|
||||
}
|
||||
|
||||
static void
|
||||
text_window_get_allocation (GtkTextWindow *win,
|
||||
GdkRectangle *rect)
|
||||
{
|
||||
*rect = win->allocation;
|
||||
}
|
||||
|
||||
/* Windows */
|
||||
|
||||
|
||||
|
@ -308,6 +308,7 @@ msgbox_run (GtkWindow *parent,
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef DO_BLINK
|
||||
/*
|
||||
* Example buffer filling code
|
||||
*/
|
||||
@ -327,6 +328,7 @@ blink_timeout (gpointer data)
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static gint
|
||||
tag_event_handler (GtkTextTag *tag, GtkWidget *widget, GdkEvent *event,
|
||||
@ -442,8 +444,10 @@ fill_example_buffer (GtkTextBuffer *buffer)
|
||||
|
||||
tag = gtk_text_buffer_create_tag (buffer, "fg_blue", NULL);
|
||||
|
||||
/* gtk_timeout_add (1000, blink_timeout, tag); */
|
||||
|
||||
#ifdef DO_BLINK
|
||||
gtk_timeout_add (1000, blink_timeout, tag);
|
||||
#endif
|
||||
|
||||
setup_tag (tag);
|
||||
|
||||
color.red = color.green = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user