[gtk+] gtk: Make functions static that don't need to be non-static
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk: Make functions static that don't need to be non-static
- Date: Tue, 2 Oct 2012 17:34:19 +0000 (UTC)
commit 12683da8f74e847392fff32d4b06dd2c50baa37c
Author: Benjamin Otte <otte redhat com>
Date: Tue Oct 2 19:23:29 2012 +0200
gtk: Make functions static that don't need to be non-static
Also remove the starting underscore from function names where
appropriate, as those functions are static now and not exported anymore.
This is part of a bunch of fixes for gcc complaining about
-Wmissing-declarations.
gtk/gtkbuilderparser.c | 10 +++++-----
gtk/gtkcssimage.c | 4 ++--
gtk/gtkcssimagegradient.c | 6 +++---
gtk/gtkcssparser.c | 14 +++++++-------
gtk/gtkentrycompletion.c | 6 +++---
gtk/gtkplug.c | 12 ++++++------
gtk/gtkrbtree.c | 34 +++++++++++++++++-----------------
gtk/gtkstyleproperties.c | 2 +-
gtk/gtktoolpalette.c | 8 ++++----
gtk/updateiconcache.c | 6 +++---
10 files changed, 51 insertions(+), 51 deletions(-)
---
diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c
index 59c0721..6344258 100644
--- a/gtk/gtkbuilderparser.c
+++ b/gtk/gtkbuilderparser.c
@@ -641,9 +641,9 @@ _free_signal_info (SignalInfo *info,
g_slice_free (SignalInfo, info);
}
-void
-_free_requires_info (RequiresInfo *info,
- gpointer user_data)
+static void
+free_requires_info (RequiresInfo *info,
+ gpointer user_data)
{
g_free (info->library);
g_slice_free (RequiresInfo, info);
@@ -958,7 +958,7 @@ end_element (GMarkupParseContext *context,
req_info->major, req_info->minor,
GTK_MAJOR_VERSION, GTK_MINOR_VERSION);
}
- _free_requires_info (req_info, NULL);
+ free_requires_info (req_info, NULL);
}
else if (strcmp (element_name, "interface") == 0)
{
@@ -1110,7 +1110,7 @@ free_info (CommonInfo *info)
else if (strcmp (info->tag.name, "signal") == 0)
_free_signal_info ((SignalInfo *)info, NULL);
else if (strcmp (info->tag.name, "requires") == 0)
- _free_requires_info ((RequiresInfo *)info, NULL);
+ free_requires_info ((RequiresInfo *)info, NULL);
else if (strcmp (info->tag.name, "menu") == 0)
free_menu_info ((MenuInfo *)info);
else
diff --git a/gtk/gtkcssimage.c b/gtk/gtkcssimage.c
index 999c548..924dc2a 100644
--- a/gtk/gtkcssimage.c
+++ b/gtk/gtkcssimage.c
@@ -69,7 +69,7 @@ gtk_css_image_real_compute (GtkCssImage *image,
return g_object_ref (image);
}
-GtkCssImage *
+static GtkCssImage *
gtk_css_image_real_transition (GtkCssImage *start,
GtkCssImage *end,
guint property_id,
@@ -375,7 +375,7 @@ _gtk_css_image_get_surface (GtkCssImage *image,
return result;
}
-GType
+static GType
gtk_css_image_get_parser_type (GtkCssParser *parser)
{
static const struct {
diff --git a/gtk/gtkcssimagegradient.c b/gtk/gtkcssimagegradient.c
index 4085719..a241733 100644
--- a/gtk/gtkcssimagegradient.c
+++ b/gtk/gtkcssimagegradient.c
@@ -48,7 +48,7 @@ gtk_css_image_gradient_compute (GtkCssImage *image,
return GTK_CSS_IMAGE (copy);
}
-cairo_pattern_t *
+static cairo_pattern_t *
fade_pattern (cairo_pattern_t *pattern,
double opacity)
{
@@ -82,7 +82,7 @@ fade_pattern (cairo_pattern_t *pattern,
return pattern;
}
-cairo_pattern_t *
+static cairo_pattern_t *
transition_pattern (cairo_pattern_t *start,
cairo_pattern_t *end,
double progress)
@@ -141,7 +141,7 @@ transition_pattern (cairo_pattern_t *start,
return result;
}
-GtkCssImage *
+static GtkCssImage *
gtk_css_image_gradient_transition (GtkCssImage *start_image,
GtkCssImage *end_image,
guint property_id,
diff --git a/gtk/gtkcssparser.c b/gtk/gtkcssparser.c
index 04242aa..d00b525 100644
--- a/gtk/gtkcssparser.c
+++ b/gtk/gtkcssparser.c
@@ -885,11 +885,11 @@ _gtk_css_parser_read_url (GtkCssParser *parser)
return file;
}
-void
-_gtk_css_parser_resync_internal (GtkCssParser *parser,
- gboolean sync_at_semicolon,
- gboolean read_sync_token,
- char terminator)
+static void
+gtk_css_parser_resync_internal (GtkCssParser *parser,
+ gboolean sync_at_semicolon,
+ gboolean read_sync_token,
+ char terminator)
{
gsize len;
@@ -984,7 +984,7 @@ _gtk_css_parser_read_value (GtkCssParser *parser)
start = parser->data;
/* This needs to be done better */
- _gtk_css_parser_resync_internal (parser, TRUE, FALSE, '}');
+ gtk_css_parser_resync_internal (parser, TRUE, FALSE, '}');
result = g_strndup (start, parser->data - start);
if (result)
@@ -1010,5 +1010,5 @@ _gtk_css_parser_resync (GtkCssParser *parser,
{
g_return_if_fail (GTK_IS_CSS_PARSER (parser));
- _gtk_css_parser_resync_internal (parser, sync_at_semicolon, TRUE, terminator);
+ gtk_css_parser_resync_internal (parser, sync_at_semicolon, TRUE, terminator);
}
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index 3e06c5f..dbc14f0 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -1584,8 +1584,8 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
return above;
}
-void
-_gtk_entry_completion_popup (GtkEntryCompletion *completion)
+static void
+gtk_entry_completion_popup (GtkEntryCompletion *completion)
{
GtkTreeViewColumn *column;
GtkStyleContext *context;
@@ -2182,7 +2182,7 @@ gtk_entry_completion_timeout (gpointer data)
if (gtk_widget_get_visible (completion->priv->popup_window))
_gtk_entry_completion_resize_popup (completion);
else
- _gtk_entry_completion_popup (completion);
+ gtk_entry_completion_popup (completion);
}
else
_gtk_entry_completion_popdown (completion);
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 0b9f028..9c019dd 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -441,16 +441,16 @@ _gtk_plug_add_to_socket (GtkPlug *plug,
g_signal_emit_by_name (socket_, "plug-added");
}
-/**
- * _gtk_plug_send_delete_event:
+/*
+ * gtk_plug_send_delete_event:
* @widget: a #GtkWidget
*
* Send a GDK_DELETE event to the @widget and destroy it if
* necessary. Internal GTK function, called from this file or the
* backend-specific GtkPlug implementation.
*/
-void
-_gtk_plug_send_delete_event (GtkWidget *widget)
+static void
+gtk_plug_send_delete_event (GtkWidget *widget)
{
GdkEvent *event = gdk_event_new (GDK_DELETE);
@@ -530,7 +530,7 @@ _gtk_plug_remove_from_socket (GtkPlug *plug,
gtk_widget_destroy (GTK_WIDGET (socket_));
if (window)
- _gtk_plug_send_delete_event (widget);
+ gtk_plug_send_delete_event (widget);
g_object_unref (plug);
@@ -895,7 +895,7 @@ gtk_plug_filter_func (GdkXEvent *gdk_xevent,
if (xre->parent == GDK_WINDOW_XID (gdk_screen_get_root_window (screen)))
{
GTK_NOTE (PLUGSOCKET, g_message ("GtkPlug: calling gtk_plug_send_delete_event()"));
- _gtk_plug_send_delete_event (widget);
+ gtk_plug_send_delete_event (widget);
g_object_notify (G_OBJECT (plug), "embedded");
}
diff --git a/gtk/gtkrbtree.c b/gtk/gtkrbtree.c
index 7011239..d3e1fef 100644
--- a/gtk/gtkrbtree.c
+++ b/gtk/gtkrbtree.c
@@ -973,11 +973,11 @@ _gtk_rbtree_node_get_index (GtkRBTree *tree,
return retval;
}
-gint
-_gtk_rbtree_real_find_offset (GtkRBTree *tree,
- gint height,
- GtkRBTree **new_tree,
- GtkRBNode **new_node)
+static gint
+gtk_rbtree_real_find_offset (GtkRBTree *tree,
+ gint height,
+ GtkRBTree **new_tree,
+ GtkRBNode **new_node)
{
GtkRBNode *tmp_node;
@@ -1021,14 +1021,14 @@ _gtk_rbtree_real_find_offset (GtkRBTree *tree,
*new_node = tmp_node;
return (height - tmp_node->left->offset);
}
- return _gtk_rbtree_real_find_offset (tmp_node->children,
- height - tmp_node->left->offset -
- (tmp_node->offset -
- tmp_node->left->offset -
- tmp_node->right->offset -
- tmp_node->children->root->offset),
- new_tree,
- new_node);
+ return gtk_rbtree_real_find_offset (tmp_node->children,
+ height - tmp_node->left->offset -
+ (tmp_node->offset -
+ tmp_node->left->offset -
+ tmp_node->right->offset -
+ tmp_node->children->root->offset),
+ new_tree,
+ new_node);
}
*new_tree = tree;
*new_node = tmp_node;
@@ -1037,9 +1037,9 @@ _gtk_rbtree_real_find_offset (GtkRBTree *tree,
gint
_gtk_rbtree_find_offset (GtkRBTree *tree,
- gint height,
- GtkRBTree **new_tree,
- GtkRBNode **new_node)
+ gint height,
+ GtkRBTree **new_tree,
+ GtkRBNode **new_node)
{
g_assert (tree);
@@ -1051,7 +1051,7 @@ _gtk_rbtree_find_offset (GtkRBTree *tree,
return 0;
}
- return _gtk_rbtree_real_find_offset (tree, height, new_tree, new_node);
+ return gtk_rbtree_real_find_offset (tree, height, new_tree, new_node);
}
gboolean
diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c
index fe91feb..3589535 100644
--- a/gtk/gtkstyleproperties.c
+++ b/gtk/gtkstyleproperties.c
@@ -279,7 +279,7 @@ gtk_style_properties_finalize (GObject *object)
G_OBJECT_CLASS (gtk_style_properties_parent_class)->finalize (object);
}
-GtkStyleProperties *
+static GtkStyleProperties *
gtk_style_properties_get_style (GtkStyleProvider *provider,
GtkWidgetPath *path)
{
diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
index 1503276..688688c 100644
--- a/gtk/gtktoolpalette.c
+++ b/gtk/gtktoolpalette.c
@@ -1298,9 +1298,9 @@ gtk_tool_palette_get_style (GtkToolPalette *palette)
return palette->priv->style;
}
-gint
-_gtk_tool_palette_compare_groups (gconstpointer a,
- gconstpointer b)
+static gint
+gtk_tool_palette_compare_groups (gconstpointer a,
+ gconstpointer b)
{
const GtkToolItemGroupInfo *group_a = a;
const GtkToolItemGroupInfo *group_b = b;
@@ -1351,7 +1351,7 @@ gtk_tool_palette_set_group_position (GtkToolPalette *palette,
group_new->pos = position;
group_old->pos = old_position;
- g_ptr_array_sort (palette->priv->groups, _gtk_tool_palette_compare_groups);
+ g_ptr_array_sort (palette->priv->groups, gtk_tool_palette_compare_groups);
gtk_widget_queue_resize (GTK_WIDGET (palette));
}
diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c
index 2fe910b..4159c93 100644
--- a/gtk/updateiconcache.c
+++ b/gtk/updateiconcache.c
@@ -88,9 +88,9 @@ static int check_dir_mtime (const char *dir,
return 0;
}
- gboolean
- is_cache_up_to_date (const gchar *path)
- {
+static gboolean
+is_cache_up_to_date (const gchar *path)
+{
gchar *cache_path;
gint retval;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]