diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2002-11-08 22:34:38 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2002-11-08 22:34:38 +0000 |
commit | 2d1ce5a4fb9da6f0f26bd658310cf057eb08bf8b (patch) | |
tree | 6f353519123dcc0de03f49aa864dbcdf4e6e7545 /gtk | |
parent | b179b5eba4c4ab4bd764a566f60f70203abe2dc0 (diff) | |
download | gdk-pixbuf-2d1ce5a4fb9da6f0f26bd658310cf057eb08bf8b.tar.gz |
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.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkcolorsel.c | 88 | ||||
-rw-r--r-- | gtk/gtkstyle.c | 10 | ||||
-rw-r--r-- | gtk/gtktextiter.c | 7 | ||||
-rw-r--r-- | gtk/gtktextview.c | 9 |
4 files changed, 17 insertions, 97 deletions
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c index fce957647..3d61c3a13 100644 --- a/gtk/gtkcolorsel.c +++ b/gtk/gtkcolorsel.c @@ -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, @@ -2464,86 +2458,6 @@ gtk_color_selection_set_palette_color (GtkColorSelection *colorsel, } /** - * 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 diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 60a20ca27..9c07b121e 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -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, diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c index 6c6cd7fb5..d81e1847f 100644 --- a/gtk/gtktextiter.c +++ b/gtk/gtktextiter.c @@ -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) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index da8d32b49..74f20c2ec 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -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 */ |