summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
Diffstat (limited to 'libview')
-rw-r--r--libview/Makefile.am2
-rw-r--r--libview/ev-document-model.c10
-rw-r--r--libview/ev-page-accessible.c2
-rw-r--r--libview/ev-pixbuf-cache.c6
-rw-r--r--libview/ev-pixbuf-cache.h2
-rw-r--r--libview/ev-print-operation.c4
-rw-r--r--libview/ev-stock-icons.c17
-rw-r--r--libview/ev-stock-icons.h1
-rw-r--r--libview/ev-timeline.c4
-rw-r--r--libview/ev-timeline.h2
-rw-r--r--libview/ev-transition-animation.c2
-rw-r--r--libview/ev-transition-animation.h2
-rw-r--r--libview/ev-view-presentation.c3
-rw-r--r--libview/ev-view.c2
-rw-r--r--libview/ev-web-view.c2
-rw-r--r--libview/ev-web-view.h1
16 files changed, 13 insertions, 49 deletions
diff --git a/libview/Makefile.am b/libview/Makefile.am
index be5f7264..0835e9c3 100644
--- a/libview/Makefile.am
+++ b/libview/Makefile.am
@@ -141,7 +141,7 @@ AtrilView-$(EV_API_VERSION).gir: libatrilview.la Makefile $(INST_H_FILES) $(filt
--include=GdkPixbuf-2.0 \
--include=Gtk-3.0 \
--include=AtrilDocument-$(EV_API_VERSION) \
- --library=atrilview \
+ --library=libatrilview.la \
--libtool="$(LIBTOOL)" \
--output $@ \
--pkg atril-document-$(EV_API_VERSION) \
diff --git a/libview/ev-document-model.c b/libview/ev-document-model.c
index d5d97f62..c19f6544 100644
--- a/libview/ev-document-model.c
+++ b/libview/ev-document-model.c
@@ -500,7 +500,7 @@ _ev_document_model_set_dual_page_internal (EvDocumentModel *model,
if (dual_page == model->dual_page)
return;
- model->dual_page = dual_page;
+ model->dual_page = (dual_page != FALSE);
g_object_notify (G_OBJECT (model), "dual-page");
}
@@ -566,7 +566,7 @@ ev_document_model_set_inverted_colors (EvDocumentModel *model,
if (inverted_colors == model->inverted_colors)
return;
- model->inverted_colors = inverted_colors;
+ model->inverted_colors = (inverted_colors != FALSE);
g_object_notify (G_OBJECT (model), "inverted-colors");
}
@@ -590,7 +590,7 @@ ev_document_model_set_continuous (EvDocumentModel *model,
if (continuous == model->continuous)
return;
- model->continuous = continuous;
+ model->continuous = (continuous != FALSE);
g_object_notify (G_OBJECT (model), "continuous");
}
@@ -634,7 +634,7 @@ ev_document_model_set_dual_page_odd_pages_left (EvDocumentModel *model,
if (odd_left == model->dual_page_odd_left)
return;
- model->dual_page_odd_left = odd_left;
+ model->dual_page_odd_left = (odd_left != FALSE);
g_object_notify (G_OBJECT (model), "dual-odd-left");
}
@@ -658,7 +658,7 @@ ev_document_model_set_fullscreen (EvDocumentModel *model,
if (fullscreen == model->fullscreen)
return;
- model->fullscreen = fullscreen;
+ model->fullscreen = (fullscreen != FALSE);
g_object_notify (G_OBJECT (model), "fullscreen");
}
diff --git a/libview/ev-page-accessible.c b/libview/ev-page-accessible.c
index fba189c5..112f8020 100644
--- a/libview/ev-page-accessible.c
+++ b/libview/ev-page-accessible.c
@@ -37,7 +37,6 @@ struct _EvPageAccessiblePrivate {
gboolean children_initialized;
};
-
enum {
PROP_0,
PROP_VIEW_ACCESSIBLE,
@@ -412,7 +411,6 @@ treat_as_soft_return (EvView *view,
EvRectangle *next_word_end;
gint prev_offset, next_offset;
-
if (!log_attrs[offset].is_white)
return FALSE;
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
index 3c034343..163267f6 100644
--- a/libview/ev-pixbuf-cache.c
+++ b/libview/ev-pixbuf-cache.c
@@ -72,7 +72,6 @@ struct _EvPixbufCacheClass
void (* job_finished) (EvPixbufCache *pixbuf_cache);
};
-
enum
{
JOB_FINISHED,
@@ -92,7 +91,6 @@ static gboolean new_selection_surface_needed(EvPixbufCache *pixbuf_cac
gint page,
gfloat scale);
-
/* These are used for iterating through the prev and next arrays */
#define FIRST_VISIBLE_PREV(pixbuf_cache) \
(MAX (0, pixbuf_cache->preload_cache_size - pixbuf_cache->start_page))
@@ -223,7 +221,6 @@ ev_pixbuf_cache_dispose (GObject *object)
G_OBJECT_CLASS (ev_pixbuf_cache_parent_class)->dispose (object);
}
-
EvPixbufCache *
ev_pixbuf_cache_new (GtkWidget *view,
EvDocumentModel *model,
@@ -985,7 +982,6 @@ ev_pixbuf_cache_clear (EvPixbufCache *pixbuf_cache)
}
}
-
void
ev_pixbuf_cache_style_changed (EvPixbufCache *pixbuf_cache)
{
@@ -1265,7 +1261,6 @@ ev_pixbuf_cache_set_selection_list (EvPixbufCache *pixbuf_cache,
}
}
-
/* Returns what the pixbuf cache thinks is */
GList *
@@ -1356,4 +1351,3 @@ ev_pixbuf_cache_reload_page (EvPixbufCache *pixbuf_cache,
EV_JOB_PRIORITY_URGENT);
}
-
diff --git a/libview/ev-pixbuf-cache.h b/libview/ev-pixbuf-cache.h
index 5617ca9b..941e6862 100644
--- a/libview/ev-pixbuf-cache.h
+++ b/libview/ev-pixbuf-cache.h
@@ -39,8 +39,6 @@ G_BEGIN_DECLS
#define EV_PIXBUF_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_PIXBUF_CACHE, EvPixbufCache))
#define EV_IS_PIXBUF_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_PIXBUF_CACHE))
-
-
/* The coordinates in the rect here are at scale == 1.0, so that we can ignore
* resizings. There is one per page, maximum.
*/
diff --git a/libview/ev-print-operation.c b/libview/ev-print-operation.c
index baccc179..f2e90ba3 100644
--- a/libview/ev-print-operation.c
+++ b/libview/ev-print-operation.c
@@ -1257,8 +1257,8 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog *dial
export->pages_per_sheet = MAX (1, gtk_print_settings_get_number_up (print_settings));
export->copies = gtk_print_settings_get_n_copies (print_settings);
- export->collate = gtk_print_settings_get_collate (print_settings);
- export->reverse = gtk_print_settings_get_reverse (print_settings);
+ export->collate = (gtk_print_settings_get_collate (print_settings) != FALSE);
+ export->reverse = (gtk_print_settings_get_reverse (print_settings) != FALSE);
if (export->collate) {
export->uncollated_copies = export->copies;
diff --git a/libview/ev-stock-icons.c b/libview/ev-stock-icons.c
index 58da21b1..7447955a 100644
--- a/libview/ev-stock-icons.c
+++ b/libview/ev-stock-icons.c
@@ -51,15 +51,13 @@ static const EvStockIcon stock_icons [] = {
{ EV_STOCK_SEND_TO, "document-send"},
};
-static gchar *ev_icons_path;
+#define EV_ICONS_PATH ATRILDATADIR "/icons"
static void
ev_stock_icons_add_icons_path_for_screen (GdkScreen *screen)
{
GtkIconTheme *icon_theme;
- g_return_if_fail (ev_icons_path != NULL);
-
icon_theme = screen ? gtk_icon_theme_get_for_screen (screen) : gtk_icon_theme_get_default ();
if (icon_theme) {
gchar **path = NULL;
@@ -71,13 +69,13 @@ ev_stock_icons_add_icons_path_for_screen (GdkScreen *screen)
*/
gtk_icon_theme_get_search_path (icon_theme, &path, &n_paths);
for (i = n_paths - 1; i >= 0; i--) {
- if (g_ascii_strcasecmp (ev_icons_path, path[i]) == 0)
+ if (g_ascii_strcasecmp (EV_ICONS_PATH, path[i]) == 0)
break;
}
if (i < 0)
gtk_icon_theme_append_search_path (icon_theme,
- ev_icons_path);
+ EV_ICONS_PATH);
g_strfreev (path);
}
@@ -95,8 +93,6 @@ ev_stock_icons_init (void)
GtkIconSource *source;
gint i;
- ev_icons_path = g_build_filename (ATRILDATADIR, "icons", NULL);
-
factory = gtk_icon_factory_new ();
gtk_icon_factory_add_default (factory);
@@ -128,10 +124,3 @@ ev_stock_icons_set_screen (GdkScreen *screen)
ev_stock_icons_add_icons_path_for_screen (screen);
}
-
-void
-ev_stock_icons_shutdown (void)
-{
- g_free (ev_icons_path);
-}
-
diff --git a/libview/ev-stock-icons.h b/libview/ev-stock-icons.h
index ab9671e1..363b0c62 100644
--- a/libview/ev-stock-icons.h
+++ b/libview/ev-stock-icons.h
@@ -50,7 +50,6 @@ G_BEGIN_DECLS
#define EV_STOCK_SEND_TO "document-send"
void ev_stock_icons_init (void);
-void ev_stock_icons_shutdown (void);
void ev_stock_icons_set_screen (GdkScreen *screen);
G_END_DECLS
diff --git a/libview/ev-timeline.c b/libview/ev-timeline.c
index ce4153dc..f37aa189 100644
--- a/libview/ev-timeline.c
+++ b/libview/ev-timeline.c
@@ -56,10 +56,8 @@ enum {
static guint signals [LAST_SIGNAL] = { 0, };
-
G_DEFINE_TYPE_WITH_PRIVATE (EvTimeline, ev_timeline, G_TYPE_OBJECT)
-
static void
ev_timeline_init (EvTimeline *timeline)
{
@@ -389,7 +387,7 @@ ev_timeline_set_loop (EvTimeline *timeline,
g_return_if_fail (EV_IS_TIMELINE (timeline));
priv = ev_timeline_get_instance_private (timeline);
- priv->loop = loop;
+ priv->loop = (loop != FALSE);
g_object_notify (G_OBJECT (timeline), "loop");
}
diff --git a/libview/ev-timeline.h b/libview/ev-timeline.h
index d4f6ba78..4a2c86a9 100644
--- a/libview/ev-timeline.h
+++ b/libview/ev-timeline.h
@@ -59,7 +59,6 @@ struct EvTimelineClass {
gdouble progress);
};
-
GType ev_timeline_get_type (void) G_GNUC_CONST;
EvTimeline *ev_timeline_new (guint duration);
@@ -84,7 +83,6 @@ void ev_timeline_set_duration (EvTimeline *ti
gdouble ev_timeline_get_progress (EvTimeline *timeline);
-
G_END_DECLS
#endif /* __EV_TIMELINE_H__ */
diff --git a/libview/ev-transition-animation.c b/libview/ev-transition-animation.c
index f41aa85c..8589e1b4 100644
--- a/libview/ev-transition-animation.c
+++ b/libview/ev-transition-animation.c
@@ -41,10 +41,8 @@ enum {
PROP_DEST_SURFACE
};
-
G_DEFINE_TYPE_WITH_PRIVATE (EvTransitionAnimation, ev_transition_animation, EV_TYPE_TIMELINE)
-
static void
ev_transition_animation_init (EvTransitionAnimation *animation)
{
diff --git a/libview/ev-transition-animation.h b/libview/ev-transition-animation.h
index 8691fd66..f6e374f4 100644
--- a/libview/ev-transition-animation.h
+++ b/libview/ev-transition-animation.h
@@ -50,7 +50,6 @@ struct EvTransitionAnimationClass {
EvTimelineClass parent_class;
};
-
GType ev_transition_animation_get_type (void) G_GNUC_CONST;
EvTransitionAnimation * ev_transition_animation_new (EvTransitionEffect *effect);
@@ -67,7 +66,6 @@ void ev_transition_animation_paint (EvTransition
GdkRectangle page_area);
gboolean ev_transition_animation_ready (EvTransitionAnimation *animation);
-
G_END_DECLS
#endif /* __EV_TRANSITION_ANIMATION_H__ */
diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c
index 0bcfe54d..ac723eb2 100644
--- a/libview/ev-view-presentation.c
+++ b/libview/ev-view-presentation.c
@@ -425,7 +425,7 @@ ev_view_presentation_update_current_page (EvViewPresentation *pview,
{
gint jump;
- if (page < 0 || page >= ev_document_get_n_pages (pview->document))
+ if (page >= ev_document_get_n_pages (pview->document))
return;
ev_view_presentation_animation_cancel (pview);
@@ -1385,7 +1385,6 @@ ev_view_presentation_scroll_event (GtkWidget *widget,
return TRUE;
}
-
static void
add_change_page_binding_keypad (GtkBindingSet *binding_set,
guint keyval,
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 2e01035e..86c83944 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -5621,7 +5621,6 @@ ev_view_style_updated (GtkWidget *widget)
/*** Drawing ***/
-
static void
draw_rubberband (EvView *view,
cairo_t *cr,
@@ -5652,7 +5651,6 @@ draw_rubberband (EvView *view,
cairo_restore (cr);
}
-
static void
highlight_find_results (EvView *view, cairo_t *cr, int page)
{
diff --git a/libview/ev-web-view.c b/libview/ev-web-view.c
index ecd7a02b..7c6c83f3 100644
--- a/libview/ev-web-view.c
+++ b/libview/ev-web-view.c
@@ -31,7 +31,6 @@
#include "ev-document-model.h"
#include "ev-jobs.h"
-
typedef enum {
EV_WEB_VIEW_FIND_NEXT,
EV_WEB_VIEW_FIND_PREV
@@ -322,7 +321,6 @@ ev_web_view_reload (EvWebView *webview)
web_view_update_range_and_current_page (webview);
}
-
gboolean
ev_web_view_next_page (EvWebView *webview)
{
diff --git a/libview/ev-web-view.h b/libview/ev-web-view.h
index 16b82ba8..02f7ef64 100644
--- a/libview/ev-web-view.h
+++ b/libview/ev-web-view.h
@@ -35,7 +35,6 @@
#include <glib-object.h>
G_BEGIN_DECLS
-
typedef struct _EvWebView EvWebView;
typedef struct _EvWebViewClass EvWebViewClass;