[gthumb] fixed other warnings
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] fixed other warnings
- Date: Wed, 17 Aug 2016 17:30:57 +0000 (UTC)
commit 7f77c61a08eb061f253e602cede0a5f557a50eab
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Aug 17 19:17:04 2016 +0200
fixed other warnings
.../file_tools/gth-file-tool-adjust-contrast.c | 3 +++
gthumb/gio-utils.c | 2 +-
gthumb/gth-time-selector.c | 14 ++++++++++++--
gthumb/gth-window.c | 2 +-
4 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/extensions/file_tools/gth-file-tool-adjust-contrast.c
b/extensions/file_tools/gth-file-tool-adjust-contrast.c
index 478bdcf..f413ac2 100644
--- a/extensions/file_tools/gth-file-tool-adjust-contrast.c
+++ b/extensions/file_tools/gth-file-tool-adjust-contrast.c
@@ -91,6 +91,7 @@ get_histogram_value (GthHistogram *histogram,
Method method)
{
double h = gth_histogram_get_value (histogram, channel, bin);
+
switch (method) {
case METHOD_EQUALIZE_SQUARE_ROOT:
return (h >= 2) ? sqrt (h) : h;
@@ -99,6 +100,8 @@ get_histogram_value (GthHistogram *histogram,
default:
g_assert_not_reached ();
}
+
+ return 0;
}
diff --git a/gthumb/gio-utils.c b/gthumb/gio-utils.c
index 5fcb384..9bb383d 100644
--- a/gthumb/gio-utils.c
+++ b/gthumb/gio-utils.c
@@ -2602,7 +2602,7 @@ _g_directory_make (GFile *file,
GError **error)
{
if (! g_file_make_directory (file, NULL, error)) {
- if (! (*error)->code == G_IO_ERROR_EXISTS)
+ if ((*error)->code != G_IO_ERROR_EXISTS)
return FALSE;
g_clear_error (error);
}
diff --git a/gthumb/gth-time-selector.c b/gthumb/gth-time-selector.c
index 1819904..9d6ffa6 100644
--- a/gthumb/gth-time-selector.c
+++ b/gthumb/gth-time-selector.c
@@ -92,6 +92,16 @@ gth_time_selector_unmap (GtkWidget *widget)
}
+gboolean
+gth_time_selector_real_focus (GtkWidget *base,
+ GtkDirectionType direction)
+{
+ GthTimeSelector *self = GTH_TIME_SELECTOR (base);
+ gtk_widget_grab_focus (self->priv->date_entry);
+ return TRUE;
+}
+
+
static void
gth_time_selector_class_init (GthTimeSelectorClass *class)
{
@@ -105,7 +115,7 @@ gth_time_selector_class_init (GthTimeSelectorClass *class)
widget_class = (GtkWidgetClass *) class;
widget_class->unmap = gth_time_selector_unmap;
- widget_class->focus = gth_time_selector_focus;
+ widget_class->focus = gth_time_selector_real_focus;
gth_time_selector_signals[CHANGED] =
g_signal_new ("changed",
@@ -751,5 +761,5 @@ gth_time_selector_get_value (GthTimeSelector *self,
void
gth_time_selector_focus (GthTimeSelector *self)
{
- gtk_widget_grab_focus (self->priv->date_entry);
+ gth_time_selector_real_focus (GTK_WIDGET (self), GTK_DIR_RIGHT);
}
diff --git a/gthumb/gth-window.c b/gthumb/gth-window.c
index 03503da..4ff143e 100644
--- a/gthumb/gth-window.c
+++ b/gthumb/gth-window.c
@@ -147,7 +147,7 @@ _gth_window_add_header_bar (GthWindow *self)
gtk_widget_show (self->priv->headerbar);
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (self->priv->headerbar), TRUE);
- g_object_add_weak_pointer (G_OBJECT (self->priv->headerbar), &self->priv->headerbar);
+ g_object_add_weak_pointer (G_OBJECT (self->priv->headerbar), (gpointer *) &self->priv->headerbar);
#if GTK_CHECK_VERSION(3,12,0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]