1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
3 /*
4 * GThumb
5 *
6 * Copyright (C) 2009 Free Software Foundation, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22
23 #include <config.h>
24 #include <gtk/gtk.h>
25 #include <gthumb.h>
26 #include "gth-image-histogram.h"
27 #include "gth-image-viewer-page.h"
28 #include "gth-metadata-provider-image.h"
29 #include "callbacks.h"
30 #include "preferences.h"
31 #include "shortcuts.h"
32
33
34 static GthShortcutCategory shortcut_categories[] = {
35 { GTH_SHORTCUT_CATEGORY_IMAGE_VIEWER, N_("Image Viewer"), 21 },
36 { GTH_SHORTCUT_CATEGORY_SCROLL_IMAGE, N_("Scroll Image"), 22 },
37 { GTH_SHORTCUT_CATEGORY_IMAGE_EDITOR, N_("Image Editor"), 23 },
38 };
39
40
41 G_MODULE_EXPORT void
gthumb_extension_activate(void)42 gthumb_extension_activate (void)
43 {
44 gth_main_register_metadata_provider (GTH_TYPE_METADATA_PROVIDER_IMAGE);
45 gth_main_register_object (GTH_TYPE_VIEWER_PAGE, NULL, GTH_TYPE_IMAGE_VIEWER_PAGE, NULL);
46 gth_main_register_type ("file-properties", GTH_TYPE_IMAGE_HISTOGRAM);
47 gth_main_register_shortcut_category (shortcut_categories, G_N_ELEMENTS (shortcut_categories));
48 gth_hook_add_callback ("dlg-preferences-construct", 10, G_CALLBACK (image_viewer__dlg_preferences_construct_cb), NULL);
49 gth_hook_add_callback ("gth-browser-construct", 7, G_CALLBACK (image_viewer__gth_browser_construct_cb), NULL);
50 }
51
52
53 G_MODULE_EXPORT void
gthumb_extension_deactivate(void)54 gthumb_extension_deactivate (void)
55 {
56 }
57
58
59 G_MODULE_EXPORT gboolean
gthumb_extension_is_configurable(void)60 gthumb_extension_is_configurable (void)
61 {
62 return FALSE;
63 }
64
65
66 G_MODULE_EXPORT void
gthumb_extension_configure(GtkWindow * parent)67 gthumb_extension_configure (GtkWindow *parent)
68 {
69 }
70