2 ===================================================================
3 --- src/Makefile.am (revision 2474)
4 +++ src/Makefile.am (working copy)
12 +caja_PROGRAMS = libgnome-mplayer-caja-properties-page.so
14 +libgnome_mplayer_caja_properties_page_so_SOURCES = \
17 + caja_property_page.c \
18 + property_page_common.c \
19 + property_page_common.h
21 +libgnome_mplayer_caja_properties_page_so_CFLAGS = -fPIC \
27 +libgnome_mplayer_caja_properties_page_so_LDFLAGS = -shared
29 +libgnome_mplayer_caja_properties_page_so_LDADD = \
40 Index: src/caja_property_page.c
41 ===================================================================
42 --- src/caja_property_page.c (revision 0)
43 +++ src/caja_property_page.c (revision 2475)
46 + * caja_property_page.c
47 + * Copyright (C) Kevin DeKorte 2009 <kdekorte@gmail.com>
49 + * caja_property_page.c is free software.
51 + * You may redistribute it and/or modify it under the terms of the
52 + * GNU General Public License, as published by the Free Software
53 + * Foundation; either version 2 of the License, or (at your option)
54 + * any later version.
56 + * caja_property_page.c is distributed in the hope that it will be useful,
57 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
58 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
59 + * See the GNU General Public License for more details.
61 + * You should have received a copy of the GNU General Public License
62 + * along with playlist.c. If not, write to:
63 + * The Free Software Foundation, Inc.,
64 + * 51 Franklin Street, Fifth Floor
65 + * Boston, MA 02110-1301, USA.
71 +#include "mime_types.h"
72 +#include <libcaja-extension/caja-extension-types.h>
73 +#include <libcaja-extension/caja-property-page-provider.h>
77 +#include <glib/gstdio.h>
78 +#include <glib/gi18n.h>
80 +#include "property_page_common.h"
82 +#define ENABLE_CAJA_PLUGIN "enable-nautilus-plugin"
83 +#define VERBOSE "verbose"
87 +static GType pp_type = 0;
93 +static GList *gnome_mplayer_properties_get_pages(CajaPropertyPageProvider * provider, GList * files)
95 + GList *pages = NULL;
97 + GtkWidget *page, *label;
98 + CajaPropertyPage *property_page;
100 + gboolean found = FALSE;
103 + /* only add properties page if a single file is selected */
104 + if (files == NULL || files->next != NULL)
107 + file = files->data;
109 + /* only add the properties page to these mime types */
110 + for (i = 0; i < G_N_ELEMENTS(mime_types); i++) {
111 + if (caja_file_info_is_mime_type(file, mime_types[i])) {
118 + uri = caja_file_info_get_uri(file);
119 + label = gtk_label_new(dgettext(GETTEXT_PACKAGE, "Audio/Video"));
120 + page = gtk_table_new(20, 2, FALSE);
121 + gtk_container_set_border_width(GTK_CONTAINER(page), 6);
122 + if (get_properties(page, uri)) {
123 + gtk_widget_show_all(page);
124 + property_page = caja_property_page_new("video-properties", label, page);
125 + pages = g_list_prepend(pages, property_page);
132 +static void property_page_provider_iface_init(CajaPropertyPageProviderIface * iface)
134 + iface->get_pages = gnome_mplayer_properties_get_pages;
137 +static void gnome_mplayer_properties_plugin_register_type(GTypeModule * module)
139 + const GTypeInfo info = {
140 + sizeof(GObjectClass),
141 + (GBaseInitFunc) NULL,
142 + (GBaseFinalizeFunc) NULL,
143 + (GClassInitFunc) NULL,
148 + (GInstanceInitFunc) NULL
150 + const GInterfaceInfo property_page_provider_iface_info = {
151 + (GInterfaceInitFunc) property_page_provider_iface_init,
156 + pp_type = g_type_module_register_type(module, G_TYPE_OBJECT, "GnomeMPlayerPropertiesPlugin", &info, 0);
157 + g_type_module_add_interface(module, pp_type, CAJA_TYPE_PROPERTY_PAGE_PROVIDER, &property_page_provider_iface_info);
163 +/* --- extension interface --- */
164 +void caja_module_initialize(GTypeModule * module)
166 + GmPrefStore *gm_store;
169 + bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
170 + bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
171 + // specify the domain in the translation calls so
172 + // we don't mess up the translation of the other tabs
173 + // textdomain(GETTEXT_PACKAGE);
178 + gm_store = gm_pref_store_new("gnome-mplayer");
179 + if (gm_pref_store_get_boolean_with_default(gm_store, ENABLE_CAJA_PLUGIN, TRUE)) {
180 + verbose = gm_pref_store_get_int(gm_store, VERBOSE);
181 + gnome_mplayer_properties_plugin_register_type(module);
183 + gm_pref_store_free(gm_store);
186 +void caja_module_shutdown(void)
190 +void caja_module_list_types(const GType ** types, int *num_types)
192 + static GType type_list[1];
194 + type_list[0] = pp_type;
195 + *types = type_list;
196 + *num_types = G_N_ELEMENTS(type_list);
199 ===================================================================
200 --- configure.in (revision 2474)
201 +++ configure.in (working copy)
204 AM_CONDITIONAL(HAVE_NEMO, test x$HAVE_NEMO = "xyes")
207 + AC_HELP_STRING([--enable-caja],[compile the caja plugin]),
208 + [case "${enableval}" in
209 + yes) ENABLE_CAJA=yes ;;
210 + no) ENABLE_CAJA=no ;;
211 + *) AC_MSG_ERROR(bad value ${enableval} for --enable-nautilus) ;;
213 + [ENABLE_CAJA=yes]) dnl Default value
215 +if test x$ENABLE_CAJA = "xyes" ; then
216 + PKG_CHECK_MODULES(CAJA, libcaja-extension,
217 + [HAVE_CAJA=yes], [HAVE_CAJA=no])
220 +AC_SUBST(CAJA_CFLAGS)
222 +if test x$HAVE_CAJA = "xyes"; then
223 + AC_DEFINE(HAVE_CAJA, 1, [defined if you build the caja plugin])
224 + CAJADIR=`pkg-config --variable=extensiondir libcaja-extension`
227 +AM_CONDITIONAL(HAVE_CAJA, test x$HAVE_CAJA = "xyes")
230 AC_HELP_STRING([--enable-gseal],[Enable flag for testing]),
231 [case "${enableval}" in
233 ===================================================================
234 --- ChangeLog (revision 2474)
235 +++ ChangeLog (working copy)
240 Fix storing of disable fetch cover art preference
241 Work on fixing fullscreen mode hanging when control menu goes thru show/hide sequence