brasero r2003 - in trunk: . src src/plugins/checksum src/plugins/local-track src/plugins/transcode
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r2003 - in trunk: . src src/plugins/checksum src/plugins/local-track src/plugins/transcode
- Date: Wed, 25 Feb 2009 13:23:13 +0000 (UTC)
Author: philippr
Date: Wed Feb 25 13:23:13 2009
New Revision: 2003
URL: http://svn.gnome.org/viewvc/brasero?rev=2003&view=rev
Log:
2009-02-25 Philippe Rouquier <bonfire-app wanadoo fr>
Add a new function for plugin to specify whether they are necessary
It is then used to determine which plugins can be enabled/disabled by
the user in the UI.
Now burn:// plugin is compulsory and therefore cannot be disabled.
* src/brasero-plugin-manager-ui.c
(plugin_manager_ui_populate_lists):
* src/burn-plugin-manager.c
(brasero_plugin_manager_set_plugins_state):
* src/burn-plugin-private.h:
* src/burn-plugin.c (brasero_plugin_set_compulsory),
(brasero_plugin_get_compulsory), (brasero_plugin_init):
* src/burn-plugin.h:
* src/plugins/checksum/burn-checksum-files.c
(brasero_checksum_files_init),
(brasero_checksum_files_export_caps):
* src/plugins/checksum/burn-checksum-image.c
(brasero_checksum_image_export_caps):
* src/plugins/local-track/burn-local-image.c
(brasero_local_track_export_caps):
* src/plugins/transcode/burn-normalize.c
(brasero_normalize_export_caps):
Modified:
trunk/ChangeLog
trunk/src/brasero-plugin-manager-ui.c
trunk/src/burn-plugin-manager.c
trunk/src/burn-plugin-private.h
trunk/src/burn-plugin.c
trunk/src/burn-plugin.h
trunk/src/plugins/checksum/burn-checksum-files.c
trunk/src/plugins/checksum/burn-checksum-image.c
trunk/src/plugins/local-track/burn-local-image.c
trunk/src/plugins/transcode/burn-normalize.c
Modified: trunk/src/brasero-plugin-manager-ui.c
==============================================================================
--- trunk/src/brasero-plugin-manager-ui.c (original)
+++ trunk/src/brasero-plugin-manager-ui.c Wed Feb 25 13:23:13 2009
@@ -360,10 +360,8 @@
for (; plugins; plugins = plugins->next) {
plugin = plugins->data;
- if (brasero_plugin_can_burn (plugin) == BRASERO_BURN_OK
- || brasero_plugin_can_convert (plugin) == BRASERO_BURN_OK
- || brasero_plugin_can_image (plugin) == BRASERO_BURN_OK
- || brasero_plugin_get_gtype (plugin) == G_TYPE_NONE)
+ if (brasero_plugin_get_gtype (plugin) == G_TYPE_NONE
+ || brasero_plugin_get_compulsory (plugin))
continue;
gtk_list_store_append (model, &iter);
Modified: trunk/src/burn-plugin-manager.c
==============================================================================
--- trunk/src/burn-plugin-manager.c (original)
+++ trunk/src/burn-plugin-manager.c Wed Feb 25 13:23:13 2009
@@ -166,14 +166,6 @@
BraseroPlugin *plugin;
plugin = iter->data;
-
- if (brasero_plugin_can_burn (plugin) == BRASERO_BURN_OK
- || brasero_plugin_can_convert (plugin) == BRASERO_BURN_OK
- || brasero_plugin_can_image (plugin) == BRASERO_BURN_OK) {
- brasero_plugin_set_active (plugin, TRUE);
- continue;
- }
-
brasero_plugin_set_active (plugin, TRUE);
}
@@ -186,9 +178,7 @@
plugin = iter->data;
- if (brasero_plugin_can_burn (plugin) == BRASERO_BURN_OK
- || brasero_plugin_can_convert (plugin) == BRASERO_BURN_OK
- || brasero_plugin_can_image (plugin) == BRASERO_BURN_OK) {
+ if (brasero_plugin_get_compulsory (plugin)) {
brasero_plugin_set_active (plugin, TRUE);
BRASERO_BURN_LOG ("Setting plugin %s %s",
brasero_plugin_get_name (plugin),
Modified: trunk/src/burn-plugin-private.h
==============================================================================
--- trunk/src/burn-plugin-private.h (original)
+++ trunk/src/burn-plugin-private.h Wed Feb 25 13:23:13 2009
@@ -76,6 +76,9 @@
const gchar *
brasero_plugin_get_error (BraseroPlugin *plugin);
+gboolean
+brasero_plugin_get_compulsory (BraseroPlugin *plugin);
+
guint
brasero_plugin_get_priority (BraseroPlugin *plugin);
Modified: trunk/src/burn-plugin.c
==============================================================================
--- trunk/src/burn-plugin.c (original)
+++ trunk/src/burn-plugin.c Wed Feb 25 13:23:13 2009
@@ -101,6 +101,8 @@
GSList *blank_flags;
BraseroPluginProcessFlag process_flags;
+
+ guint compulsory:1;
};
static const gchar *default_icon = "gtk-cdrom";
@@ -126,6 +128,25 @@
static guint plugin_signals [LAST_SIGNAL] = { 0 };
void
+brasero_plugin_set_compulsory (BraseroPlugin *self,
+ gboolean compulsory)
+{
+ BraseroPluginPrivate *priv;
+
+ priv = BRASERO_PLUGIN_PRIVATE (self);
+ priv->compulsory = compulsory;
+}
+
+gboolean
+brasero_plugin_get_compulsory (BraseroPlugin *self)
+{
+ BraseroPluginPrivate *priv;
+
+ priv = BRASERO_PLUGIN_PRIVATE (self);
+ return priv->compulsory;
+}
+
+void
brasero_plugin_set_active (BraseroPlugin *self, gboolean active)
{
BraseroPluginPrivate *priv;
@@ -1160,6 +1181,7 @@
priv = BRASERO_PLUGIN_PRIVATE (object);
priv->type = G_TYPE_NONE;
+ priv->compulsory = TRUE;
}
static void
Modified: trunk/src/burn-plugin.h
==============================================================================
--- trunk/src/burn-plugin.h (original)
+++ trunk/src/burn-plugin.h Wed Feb 25 13:23:13 2009
@@ -83,6 +83,10 @@
const gchar *author,
guint priority);
void
+brasero_plugin_set_compulsory (BraseroPlugin *self,
+ gboolean compulsory);
+
+void
brasero_plugin_register_group (BraseroPlugin *plugin,
const gchar *name);
Modified: trunk/src/plugins/checksum/burn-checksum-files.c
==============================================================================
--- trunk/src/plugins/checksum/burn-checksum-files.c (original)
+++ trunk/src/plugins/checksum/burn-checksum-files.c Wed Feb 25 13:23:13 2009
@@ -1360,7 +1360,8 @@
static void
brasero_checksum_files_init (BraseroChecksumFiles *obj)
-{ BraseroChecksumFilesPrivate *priv;
+{
+ BraseroChecksumFilesPrivate *priv;
priv = BRASERO_CHECKSUM_FILES_PRIVATE (obj);
@@ -1486,5 +1487,7 @@
brasero_plugin_add_conf_option (plugin, checksum_type);
+ brasero_plugin_set_compulsory (plugin, FALSE);
+
return BRASERO_BURN_OK;
}
Modified: trunk/src/plugins/checksum/burn-checksum-image.c
==============================================================================
--- trunk/src/plugins/checksum/burn-checksum-image.c (original)
+++ trunk/src/plugins/checksum/burn-checksum-image.c Wed Feb 25 13:23:13 2009
@@ -816,5 +816,7 @@
brasero_plugin_add_conf_option (plugin, checksum_type);
+ brasero_plugin_set_compulsory (plugin, FALSE);
+
return BRASERO_BURN_OK;
}
Modified: trunk/src/plugins/local-track/burn-local-image.c
==============================================================================
--- trunk/src/plugins/local-track/burn-local-image.c (original)
+++ trunk/src/plugins/local-track/burn-local-image.c Wed Feb 25 13:23:13 2009
@@ -1141,5 +1141,7 @@
brasero_plugin_set_process_flags (plugin, BRASERO_PLUGIN_RUN_PREPROCESSING);
+ brasero_plugin_set_compulsory (plugin, FALSE);
+
return BRASERO_BURN_OK;
}
Modified: trunk/src/plugins/transcode/burn-normalize.c
==============================================================================
--- trunk/src/plugins/transcode/burn-normalize.c (original)
+++ trunk/src/plugins/transcode/burn-normalize.c Wed Feb 25 13:23:13 2009
@@ -623,5 +623,7 @@
/* We should run first */
brasero_plugin_set_process_flags (plugin, BRASERO_PLUGIN_RUN_PREPROCESSING);
+ brasero_plugin_set_compulsory (plugin, FALSE);
+
return BRASERO_BURN_OK;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]