[gnome-photos] print-setup, tracker-queue: Silence -Wswitch-default and -Wswitch-enum
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] print-setup, tracker-queue: Silence -Wswitch-default and -Wswitch-enum
- Date: Mon, 16 Feb 2015 08:29:56 +0000 (UTC)
commit 791137950935223ebd732820ec8da20264a16dc6
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Feb 16 09:27:53 2015 +0100
print-setup, tracker-queue: Silence -Wswitch-default and -Wswitch-enum
src/photos-print-setup.c | 16 ++++++++++++++++
src/photos-tracker-queue.c | 4 ++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-print-setup.c b/src/photos-print-setup.c
index 5ef0246..4a79d10 100644
--- a/src/photos-print-setup.c
+++ b/src/photos-print-setup.c
@@ -144,6 +144,8 @@ get_scale_to_px_factor (PhotosPrintSetup *self)
case GTK_UNIT_INCH:
factor = FACTOR_INCH_TO_PIXEL;
break;
+ case GTK_UNIT_NONE:
+ case GTK_UNIT_POINTS:
default:
g_assert_not_reached ();
}
@@ -346,6 +348,9 @@ photos_print_setup_position_values_changed (PhotosPrintSetup *self,
pos *= FACTOR_MM_TO_INCH;
photos_print_preview_set_image_position (PHOTOS_PRINT_PREVIEW (priv->preview), -1, pos);
break;
+ default:
+ g_assert_not_reached ();
+ break;
}
}
@@ -452,6 +457,9 @@ photos_print_setup_size_changed (PhotosPrintSetup *self,
orig_size_y = (gdouble) bbox.width / factor;
orig_size_x = (gdouble) bbox.height / factor;
break;
+ default:
+ g_assert_not_reached ();
+ break;
}
scale = CLAMP (size_x / orig_size_x, 0, 1);
@@ -471,6 +479,9 @@ photos_print_setup_size_changed (PhotosPrintSetup *self,
case CHANGE_VERT:
update_image_pos_ranges (self, page_size_y, page_size_x, size_y, size_x);
break;
+ default:
+ g_assert_not_reached ();
+ break;
}
gtk_range_set_value (GTK_RANGE (priv->scaling), 100*scale);
@@ -566,6 +577,8 @@ photos_print_setup_set_scale_unit (PhotosPrintSetup *setup, GtkUnit unit)
step = 0.01;
page = 0.1;
break;
+ case GTK_UNIT_NONE:
+ case GTK_UNIT_POINTS:
default:
g_assert_not_reached ();
}
@@ -650,6 +663,9 @@ on_preview_image_scrolled (GtkWidget *widget, GdkEventScroll *event, gpointer us
/* scale down */
scale *= 0.9;
break;
+ case GDK_SCROLL_LEFT:
+ case GDK_SCROLL_RIGHT:
+ case GDK_SCROLL_SMOOTH:
default:
return FALSE;
break;
diff --git a/src/photos-tracker-queue.c b/src/photos-tracker-queue.c
index 766aca5..28a3794 100644
--- a/src/photos-tracker-queue.c
+++ b/src/photos-tracker-queue.c
@@ -166,6 +166,10 @@ photos_tracker_queue_check (PhotosTrackerQueue *self)
photos_tracker_queue_collector,
g_object_ref (self));
break;
+
+ default:
+ g_assert_not_reached ();
+ break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]