[nautilus-actions/file-manager-actions] fma_keys_xxx are renamed to fma_desktop_keys_xxx
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions/file-manager-actions] fma_keys_xxx are renamed to fma_desktop_keys_xxx
- Date: Tue, 8 Sep 2015 14:46:38 +0000 (UTC)
commit e00bd064346d9250178a65ea41512dd1759b2a5e
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Sep 8 16:17:31 2015 +0200
fma_keys_xxx are renamed to fma_desktop_keys_xxx
src/io-desktop/Makefile.am | 4 +-
src/io-desktop/fma-desktop-file.c | 24 ++++----
src/io-desktop/{fma-keys.c => fma-desktop-keys.c} | 2 +-
src/io-desktop/fma-desktop-keys.h | 69 +++++++++++++++++++++
src/io-desktop/fma-desktop-provider.c | 2 +-
src/io-desktop/fma-desktop-reader.c | 14 ++--
src/io-desktop/fma-keys.h | 69 ---------------------
src/io-desktop/nadp-writer.c | 16 +++---
8 files changed, 100 insertions(+), 100 deletions(-)
---
diff --git a/src/io-desktop/Makefile.am b/src/io-desktop/Makefile.am
index b4f38bd..81c7624 100644
--- a/src/io-desktop/Makefile.am
+++ b/src/io-desktop/Makefile.am
@@ -47,8 +47,8 @@ libna_io_desktop_la_SOURCES = \
fma-desktop-provider.h \
fma-desktop-formats.c \
fma-desktop-formats.h \
- fma-keys.c \
- fma-keys.h \
+ fma-desktop-keys.c \
+ fma-desktop-keys.h \
fma-module.c \
fma-monitor.c \
fma-monitor.h \
diff --git a/src/io-desktop/fma-desktop-file.c b/src/io-desktop/fma-desktop-file.c
index 7ae79c2..30b6771 100644
--- a/src/io-desktop/fma-desktop-file.c
+++ b/src/io-desktop/fma-desktop-file.c
@@ -38,7 +38,7 @@
#include <api/fma-core-utils.h>
#include "fma-desktop-file.h"
-#include "fma-keys.h"
+#include "fma-desktop-keys.h"
/* private class data
*/
@@ -458,21 +458,21 @@ check_key_file( FMADesktopFile *ndf )
/* start group must be [Desktop Entry] */
start_group = g_key_file_get_start_group( ndf->private->key_file );
- if( strcmp( start_group, FMA_GROUP_DESKTOP )){
+ if( strcmp( start_group, FMA_DESKTOP_GROUP_DESKTOP )){
g_debug( "%s: %s: invalid start group, found %s, waited for %s",
- thisfn, ndf->private->uri, start_group, FMA_GROUP_DESKTOP );
+ thisfn, ndf->private->uri, start_group, FMA_DESKTOP_GROUP_DESKTOP );
ret = FALSE;
}
/* must not have Hidden=true value */
if( ret ){
- has_key = g_key_file_has_key( ndf->private->key_file, start_group, FMA_KEY_HIDDEN, &error );
+ has_key = g_key_file_has_key( ndf->private->key_file, start_group, FMA_DESTOP_KEY_HIDDEN,
&error );
if( error ){
g_debug( "%s: %s: %s", thisfn, ndf->private->uri, error->message );
ret = FALSE;
} else if( has_key ){
- hidden = g_key_file_get_boolean( ndf->private->key_file, start_group, FMA_KEY_HIDDEN,
&error );
+ hidden = g_key_file_get_boolean( ndf->private->key_file, start_group,
FMA_DESTOP_KEY_HIDDEN, &error );
if( error ){
g_debug( "%s: %s: %s", thisfn, ndf->private->uri, error->message );
ret = FALSE;
@@ -489,14 +489,14 @@ check_key_file( FMADesktopFile *ndf )
*/
if( ret ){
type = NULL;
- has_key = g_key_file_has_key( ndf->private->key_file, start_group, FMA_KEY_TYPE, &error );
+ has_key = g_key_file_has_key( ndf->private->key_file, start_group, FMA_DESTOP_KEY_TYPE,
&error );
if( error ){
g_debug( "%s: %s", thisfn, error->message );
g_error_free( error );
ret = FALSE;
} else if( has_key ){
- type = g_key_file_get_string( ndf->private->key_file, start_group, FMA_KEY_TYPE,
&error );
+ type = g_key_file_get_string( ndf->private->key_file, start_group,
FMA_DESTOP_KEY_TYPE, &error );
if( error ){
g_debug( "%s: %s", thisfn, error->message );
g_free( type );
@@ -506,9 +506,9 @@ check_key_file( FMADesktopFile *ndf )
}
if( ret ){
if( !type || !strlen( type )){
- type = g_strdup( FMA_VALUE_TYPE_ACTION );
+ type = g_strdup( FMA_DESKTOP_VALUE_TYPE_ACTION );
- } else if( strcmp( type, FMA_VALUE_TYPE_MENU ) && strcmp( type, FMA_VALUE_TYPE_ACTION
)){
+ } else if( strcmp( type, FMA_DESKTOP_VALUE_TYPE_MENU ) && strcmp( type,
FMA_DESKTOP_VALUE_TYPE_ACTION )){
g_debug( "%s: unmanaged type: %s", thisfn, type );
g_free( type );
ret = FALSE;
@@ -600,7 +600,7 @@ fma_desktop_file_get_profiles( const FMADesktopFile *ndf )
groups = g_key_file_get_groups( ndf->private->key_file, NULL );
if( groups ){
ig = groups;
- profile_pfx = g_strdup_printf( "%s ", FMA_GROUP_PROFILE );
+ profile_pfx = g_strdup_printf( "%s ", FMA_DESKTOP_GROUP_PROFILE );
pfx_len = strlen( profile_pfx );
while( *ig ){
@@ -643,7 +643,7 @@ fma_desktop_file_has_profile( const FMADesktopFile *ndf, const gchar *profile_id
if( !ndf->private->dispose_has_run ){
- group_name = g_strdup_printf( "%s %s", FMA_GROUP_PROFILE, profile_id );
+ group_name = g_strdup_printf( "%s %s", FMA_DESKTOP_GROUP_PROFILE, profile_id );
has_profile = g_key_file_has_group( ndf->private->key_file, group_name );
g_free( group_name );
}
@@ -708,7 +708,7 @@ fma_desktop_file_remove_profile( const FMADesktopFile *ndf, const gchar *profile
if( !ndf->private->dispose_has_run ){
- group_name = g_strdup_printf( "%s %s", FMA_GROUP_PROFILE, profile_id );
+ group_name = g_strdup_printf( "%s %s", FMA_DESKTOP_GROUP_PROFILE, profile_id );
g_key_file_remove_group( ndf->private->key_file, group_name, NULL );
g_free( group_name );
}
diff --git a/src/io-desktop/fma-keys.c b/src/io-desktop/fma-desktop-keys.c
similarity index 97%
rename from src/io-desktop/fma-keys.c
rename to src/io-desktop/fma-desktop-keys.c
index 078b034..5786d9b 100644
--- a/src/io-desktop/fma-keys.c
+++ b/src/io-desktop/fma-desktop-keys.c
@@ -31,4 +31,4 @@
#include <config.h>
#endif
-#include "fma-keys.h"
+#include "fma-desktop-keys.h"
diff --git a/src/io-desktop/fma-desktop-keys.h b/src/io-desktop/fma-desktop-keys.h
new file mode 100644
index 0000000..b5f1cf0
--- /dev/null
+++ b/src/io-desktop/fma-desktop-keys.h
@@ -0,0 +1,69 @@
+/*
+ * FileManager-Actions
+ * A file-manager extension which offers configurable context menu actions.
+ *
+ * Copyright (C) 2005 The GNOME Foundation
+ * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
+ * Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
+ *
+ * FileManager-Actions is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * FileManager-Actions is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FileManager-Actions; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Frederic Ruaudel <grumz grumz net>
+ * Rodrigo Moya <rodrigo gnome-db org>
+ * Pierre Wieser <pwieser trychlos org>
+ * ... and many others (see AUTHORS)
+ */
+
+#ifndef __IO_DESKTOP_FMA_DESKTOP_KEYS_H__
+#define __IO_DESKTOP_FMA_DESKTOP_KEYS_H__
+
+#include <api/fma-data-def.h>
+
+G_BEGIN_DECLS
+
+#define FMA_DESKTOP_GROUP_DESKTOP G_KEY_FILE_DESKTOP_GROUP
+#define FMA_DESKTOP_GROUP_PROFILE "X-Action-Profile"
+
+#define FMA_DESTOP_KEY_TYPE
G_KEY_FILE_DESKTOP_KEY_TYPE
+#define FMA_DESKTOP_VALUE_TYPE_ACTION "Action"
+#define FMA_DESKTOP_VALUE_TYPE_MENU "Menu"
+
+#define FMA_DESTOP_KEY_PROFILES "Profiles"
+
+#define FMA_DESTOP_KEY_EXECUTION_MODE "ExecutionMode"
+#define FMA_DESKTOP_VALUE_EXECUTION_MODE_NORMAL "Normal"
+#define FMA_DESKTOP_VALUE_EXECUTION_MODE_MINIMIZED "Minimized"
+#define FMA_DESKTOP_VALUE_EXECUTION_MODE_MAXIMIZED "Maximized"
+#define FMA_DESKTOP_VALUE_EXECUTION_MODE_TERMINAL "Terminal"
+#define FMA_DESKTOP_VALUE_EXECUTION_MODE_EMBEDDED "Embedded"
+#define FMA_DESKTOP_VALUE_EXECUTION_MODE_DISPLAY_OUTPUT "DisplayOutput"
+
+#define FMA_DESTOP_KEY_ITEMS_LIST "ItemsList"
+
+#define FMA_DESTOP_KEY_ONLY_SHOW_IN
G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN
+#define FMA_DESTOP_KEY_NOT_SHOW_IN
G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN
+#define FMA_DESTOP_KEY_NO_DISPLAY "NoDisplay"
+#define FMA_DESTOP_KEY_HIDDEN G_KEY_FILE_DESKTOP_KEY_HIDDEN
+#define FMA_DESTOP_KEY_CAPABILITIES "Capabilities"
+#define FMA_DESKTOP_VALUE_CAPABILITY_OWNER "Owner"
+#define FMA_DESKTOP_VALUE_CAPABILITY_READABLE "Readable"
+#define FMA_DESKTOP_VALUE_CAPABILITY_WRITABLE "Writable"
+#define FMA_DESKTOP_VALUE_CAPABILITY_EXECUTABLE "Executable"
+#define FMA_DESKTOP_VALUE_CAPABILITY_LOCAL "Local"
+
+G_END_DECLS
+
+#endif /* __IO_DESKTOP_FMA_DESKTOP_KEYS_H__ */
diff --git a/src/io-desktop/fma-desktop-provider.c b/src/io-desktop/fma-desktop-provider.c
index 383e675..d0c293a 100644
--- a/src/io-desktop/fma-desktop-provider.c
+++ b/src/io-desktop/fma-desktop-provider.c
@@ -39,7 +39,7 @@
#include "fma-desktop-provider.h"
#include "fma-desktop-formats.h"
-#include "fma-keys.h"
+#include "fma-desktop-keys.h"
#include "fma-monitor.h"
#include "fma-desktop-reader.h"
#include "nadp-writer.h"
diff --git a/src/io-desktop/fma-desktop-reader.c b/src/io-desktop/fma-desktop-reader.c
index e03e79d..2830d30 100644
--- a/src/io-desktop/fma-desktop-reader.c
+++ b/src/io-desktop/fma-desktop-reader.c
@@ -42,7 +42,7 @@
#include <api/fma-object-api.h>
#include "fma-desktop-provider.h"
-#include "fma-keys.h"
+#include "fma-desktop-keys.h"
#include "fma-desktop-reader.h"
#include "nadp-utils.h"
#include "nadp-xdg-dirs.h"
@@ -281,10 +281,10 @@ item_from_desktop_file( const FMADesktopProvider *provider, FMADesktopFile *ndf,
item = NULL;
type = fma_desktop_file_get_file_type( ndf );
- if( !strcmp( type, FMA_VALUE_TYPE_ACTION )){
+ if( !strcmp( type, FMA_DESKTOP_VALUE_TYPE_ACTION )){
item = FMA_IFACTORY_OBJECT( fma_object_action_new());
- } else if( !strcmp( type, FMA_VALUE_TYPE_MENU )){
+ } else if( !strcmp( type, FMA_DESKTOP_VALUE_TYPE_MENU )){
item = FMA_IFACTORY_OBJECT( fma_object_menu_new());
} else {
@@ -454,8 +454,8 @@ read_start_read_subitems_key( const FMAIFactoryProvider *provider, FMAObjectItem
gboolean key_found;
subitems = fma_desktop_file_get_string_list( reader_data->ndf,
- FMA_GROUP_DESKTOP,
- FMA_IS_OBJECT_ACTION( item ) ? FMA_KEY_PROFILES : FMA_KEY_ITEMS_LIST,
+ FMA_DESKTOP_GROUP_DESKTOP,
+ FMA_IS_OBJECT_ACTION( item ) ? FMA_DESTOP_KEY_PROFILES : FMA_DESTOP_KEY_ITEMS_LIST,
&key_found,
NULL );
@@ -510,12 +510,12 @@ fma_desktop_reader_ifactory_provider_read_data( const FMAIFactoryProvider *reade
if( def->desktop_entry ){
if( FMA_IS_OBJECT_ITEM( object )){
- group = g_strdup( FMA_GROUP_DESKTOP );
+ group = g_strdup( FMA_DESKTOP_GROUP_DESKTOP );
} else {
g_return_val_if_fail( FMA_IS_OBJECT_PROFILE( object ), NULL );
id = fma_object_get_id( object );
- group = g_strdup_printf( "%s %s", FMA_GROUP_PROFILE, id );
+ group = g_strdup_printf( "%s %s", FMA_DESKTOP_GROUP_PROFILE, id );
g_free( id );
}
diff --git a/src/io-desktop/nadp-writer.c b/src/io-desktop/nadp-writer.c
index 6f38765..240161b 100644
--- a/src/io-desktop/nadp-writer.c
+++ b/src/io-desktop/nadp-writer.c
@@ -42,7 +42,7 @@
#include "fma-desktop-file.h"
#include "fma-desktop-provider.h"
#include "fma-desktop-formats.h"
-#include "fma-keys.h"
+#include "fma-desktop-keys.h"
#include "nadp-utils.h"
#include "nadp-writer.h"
#include "nadp-xdg-dirs.h"
@@ -488,9 +488,9 @@ write_start_write_type( FMADesktopFile *ndp, FMAObjectItem *item )
{
fma_desktop_file_set_string(
ndp,
- FMA_GROUP_DESKTOP,
- FMA_KEY_TYPE,
- FMA_IS_OBJECT_ACTION( item ) ? FMA_VALUE_TYPE_ACTION : FMA_VALUE_TYPE_MENU );
+ FMA_DESKTOP_GROUP_DESKTOP,
+ FMA_DESTOP_KEY_TYPE,
+ FMA_IS_OBJECT_ACTION( item ) ? FMA_DESKTOP_VALUE_TYPE_ACTION :
FMA_DESKTOP_VALUE_TYPE_MENU );
}
/*
@@ -525,11 +525,11 @@ nadp_writer_ifactory_provider_write_data(
if( FMA_IS_OBJECT_PROFILE( object )){
profile_id = fma_object_get_id( object );
- group_name = g_strdup_printf( "%s %s", FMA_GROUP_PROFILE, profile_id );
+ group_name = g_strdup_printf( "%s %s", FMA_DESKTOP_GROUP_PROFILE, profile_id );
g_free( profile_id );
} else {
- group_name = g_strdup( FMA_GROUP_DESKTOP );
+ group_name = g_strdup( FMA_DESKTOP_GROUP_DESKTOP );
}
if( !fma_data_boxed_is_default( boxed ) || def->write_if_default ){
@@ -614,8 +614,8 @@ write_done_write_subitems_list( FMADesktopFile *ndp, FMAObjectItem *item )
fma_desktop_file_set_string_list(
ndp,
- FMA_GROUP_DESKTOP,
- FMA_IS_OBJECT_ACTION( item ) ? FMA_KEY_PROFILES : FMA_KEY_ITEMS_LIST,
+ FMA_DESKTOP_GROUP_DESKTOP,
+ FMA_IS_OBJECT_ACTION( item ) ? FMA_DESTOP_KEY_PROFILES : FMA_DESTOP_KEY_ITEMS_LIST,
subitems );
profile_groups = fma_desktop_file_get_profiles( ndp );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]