[gnome-builder/editor-layout] fix some warnings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/editor-layout] fix some warnings
- Date: Wed, 26 Nov 2014 23:45:27 +0000 (UTC)
commit d839039fbef16ee0319669fa5c84adc1980ac1ff
Author: Christian Hergert <christian hergert me>
Date: Wed Nov 26 03:10:01 2014 -0800
fix some warnings
src/tabs/gb-tab-grid.c | 19 +++++++++----------
src/tabs/gb-tab-stack.c | 4 ++--
2 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/src/tabs/gb-tab-grid.c b/src/tabs/gb-tab-grid.c
index 70a0a47..a549615 100644
--- a/src/tabs/gb-tab-grid.c
+++ b/src/tabs/gb-tab-grid.c
@@ -170,17 +170,16 @@ GbTab *
gb_tab_grid_get_active (GbTabGrid *grid)
{
GbTabStack *last_focused_stack;
- GtkWidget *ret = NULL;
+ GbTab *ret = NULL;
g_return_val_if_fail (GB_IS_TAB_GRID (grid), NULL);
last_focused_stack = gb_tab_grid_get_last_focused (grid);
if (last_focused_stack)
- if ((ret = gb_tab_stack_get_active (last_focused_stack)))
- return GB_TAB (ret);
+ ret = gb_tab_stack_get_active (last_focused_stack);
- return NULL;
+ return ret;
}
static void
@@ -644,12 +643,12 @@ on_move_right (GSimpleAction *action,
if (GB_IS_TAB_STACK (last_focused_stack))
{
- GtkWidget *active;
+ GbTab *active;
active = gb_tab_stack_get_active (last_focused_stack);
- if (GB_IS_TAB (active))
- gb_tab_grid_move_tab_right (self, GB_TAB (active));
+ if (active)
+ gb_tab_grid_move_tab_right (self, active);
}
EXIT;
@@ -671,12 +670,12 @@ on_move_left (GSimpleAction *action,
if (GB_IS_TAB_STACK (last_focused_stack))
{
- GtkWidget *active;
+ GbTab *active;
active = gb_tab_stack_get_active (last_focused_stack);
- if (GB_IS_TAB (active))
- gb_tab_grid_move_tab_left (self, GB_TAB (active));
+ if (active)
+ gb_tab_grid_move_tab_left (self, active);
}
EXIT;
diff --git a/src/tabs/gb-tab-stack.c b/src/tabs/gb-tab-stack.c
index 39e1ea4..4c83cc6 100644
--- a/src/tabs/gb-tab-stack.c
+++ b/src/tabs/gb-tab-stack.c
@@ -150,8 +150,8 @@ gb_tab_stack_focus_tab (GbTabStack *stack,
{
GtkTreeIter iter;
- g_return_if_fail (GB_IS_TAB_STACK (stack));
- g_return_if_fail (GB_IS_TAB (tab));
+ g_return_val_if_fail (GB_IS_TAB_STACK (stack), FALSE);
+ g_return_val_if_fail (GB_IS_TAB (tab), FALSE);
if (gb_tab_stack_get_tab_iter (stack, tab, &iter))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]