[gtk] gizmo: return void from snapshot func
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] gizmo: return void from snapshot func
- Date: Fri, 18 Jan 2019 19:06:05 +0000 (UTC)
commit c49cc977fa53d148bda6768bfd1b7c0c34774d19
Author: Timm Bäder <mail baedert org>
Date: Fri Jan 18 08:01:40 2019 +0100
gizmo: return void from snapshot func
This boolean return was from the old gadget code and we weren't using it
in the new gizmo code.
gtk/gtkgizmoprivate.h | 2 +-
gtk/gtklevelbar.c | 4 +---
gtk/gtknotebook.c | 8 +++-----
gtk/gtkpaned.c | 4 +---
gtk/gtkprogressbar.c | 4 +---
gtk/gtkrange.c | 6 ++----
gtk/gtktexthandle.c | 3 +--
7 files changed, 10 insertions(+), 21 deletions(-)
---
diff --git a/gtk/gtkgizmoprivate.h b/gtk/gtkgizmoprivate.h
index 8a99f924e7..c65a430351 100644
--- a/gtk/gtkgizmoprivate.h
+++ b/gtk/gtkgizmoprivate.h
@@ -25,7 +25,7 @@ typedef void (* GtkGizmoAllocateFunc) (GtkGizmo *gizmo,
int width,
int height,
int baseline);
-typedef gboolean (* GtkGizmoSnapshotFunc) (GtkGizmo *gizmo,
+typedef void (* GtkGizmoSnapshotFunc) (GtkGizmo *gizmo,
GtkSnapshot *snapshot);
diff --git a/gtk/gtklevelbar.c b/gtk/gtklevelbar.c
index 1402e4dddf..2e91c160ac 100644
--- a/gtk/gtklevelbar.c
+++ b/gtk/gtklevelbar.c
@@ -337,7 +337,7 @@ gtk_level_bar_get_real_inverted (GtkLevelBar *self)
return priv->inverted;
}
-static gboolean
+static void
gtk_level_bar_render_trough (GtkGizmo *gizmo,
GtkSnapshot *snapshot)
{
@@ -367,8 +367,6 @@ gtk_level_bar_render_trough (GtkGizmo *gizmo,
for (i = 0; i < num_blocks; i++)
gtk_widget_snapshot_child (widget, priv->block_widget[i], snapshot);
}
-
- return FALSE;
}
static void
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 1ed14d842f..c3aa646546 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -452,7 +452,7 @@ static void gtk_notebook_allocate_tabs (GtkGizmo *gizmo,
int width,
int height,
int baseline);
-static gboolean gtk_notebook_snapshot_tabs (GtkGizmo *gizmo,
+static void gtk_notebook_snapshot_tabs (GtkGizmo *gizmo,
GtkSnapshot *snapshot);
/*** GtkNotebook Private Functions ***/
@@ -4335,7 +4335,7 @@ gtk_notebook_search_page (GtkNotebook *notebook,
return NULL;
}
-static gboolean
+static void
gtk_notebook_snapshot_tabs (GtkGizmo *gizmo,
GtkSnapshot *snapshot)
{
@@ -4355,7 +4355,7 @@ gtk_notebook_snapshot_tabs (GtkGizmo *gizmo,
showarrow = FALSE;
if (!gtk_notebook_has_current_page (notebook))
- return FALSE;
+ return;
if (!priv->first_tab)
priv->first_tab = priv->children;
@@ -4453,8 +4453,6 @@ gtk_notebook_snapshot_tabs (GtkGizmo *gizmo,
if (priv->operation != DRAG_OPERATION_DETACH)
gtk_widget_snapshot_child (GTK_WIDGET (gizmo), priv->cur_page->tab_widget, snapshot);
-
- return FALSE;
}
/* Private GtkNotebook Size Allocate Functions:
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index a95c18bcb4..30181396c7 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -1384,7 +1384,7 @@ gtk_paned_snapshot (GtkWidget *widget,
gtk_snapshot_pop (snapshot);
}
-static gboolean
+static void
gtk_paned_render_handle (GtkGizmo *gizmo,
GtkSnapshot *snapshot)
{
@@ -1400,8 +1400,6 @@ gtk_paned_render_handle (GtkGizmo *gizmo,
snapshot,
width, height,
GTK_CSS_IMAGE_BUILTIN_PANE_SEPARATOR);
-
- return FALSE;
}
static void
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index 921386cb12..d4c54e443b 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -446,7 +446,7 @@ allocate_trough (GtkGizmo *gizmo,
}
-static gboolean
+static void
snapshot_trough (GtkGizmo *gizmo,
GtkSnapshot *snapshot)
@@ -455,8 +455,6 @@ snapshot_trough (GtkGizmo *gizmo,
GtkProgressBarPrivate *priv = gtk_progress_bar_get_instance_private (pbar);
gtk_widget_snapshot_child (GTK_WIDGET (gizmo), priv->progress_widget, snapshot);
-
- return FALSE;
}
static void
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index dcd6b95899..74dea279b6 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -234,7 +234,7 @@ static void gtk_range_allocate_trough (GtkGizmo *gi
int width,
int height,
int baseline);
-static gboolean gtk_range_render_trough (GtkGizmo *gizmo,
+static void gtk_range_render_trough (GtkGizmo *gizmo,
GtkSnapshot *snapshot);
static gboolean gtk_range_scroll_controller_scroll (GtkEventControllerScroll *scroll,
@@ -1656,7 +1656,7 @@ gtk_range_direction_changed (GtkWidget *widget,
GTK_WIDGET_CLASS (gtk_range_parent_class)->direction_changed (widget, previous_direction);
}
-static gboolean
+static void
gtk_range_render_trough (GtkGizmo *gizmo,
GtkSnapshot *snapshot)
{
@@ -1681,8 +1681,6 @@ gtk_range_render_trough (GtkGizmo *gizmo,
gtk_widget_snapshot_child (GTK_WIDGET (gizmo), priv->highlight_widget, snapshot);
gtk_widget_snapshot_child (GTK_WIDGET (gizmo), priv->slider_widget, snapshot);
-
- return gtk_widget_has_visible_focus (widget);
}
static void
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c
index a78691cc78..84db1bedce 100644
--- a/gtk/gtktexthandle.c
+++ b/gtk/gtktexthandle.c
@@ -205,7 +205,7 @@ handle_drag_end (GtkGestureDrag *gesture,
gtk_text_handle_unset_state (handle, pos, GTK_STATE_FLAG_ACTIVE);
}
-static gboolean
+static void
snapshot_func (GtkGizmo *gizmo,
GtkSnapshot *snapshot)
{
@@ -216,7 +216,6 @@ snapshot_func (GtkGizmo *gizmo,
gtk_widget_get_width (GTK_WIDGET (gizmo)),
gtk_widget_get_height (GTK_WIDGET (gizmo)),
GTK_CSS_IMAGE_BUILTIN_HANDLE);
- return TRUE;
}
static GtkWidget *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]