Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 665016 Details for
Bug 848205
brasero ignoring File/Image Checksum type
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed patch
0001-Make-brasero_plugin_conf_option_choice_add-useful.patch (text/plain), 4.39 KB, created by
Tomáš Bžatek
on 2012-12-17 17:57:22 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Tomáš Bžatek
Created:
2012-12-17 17:57:22 UTC
Size:
4.39 KB
patch
obsolete
>From d3b3a2b1290accd7a1e883223f10b6efe6bcef2f Mon Sep 17 00:00:00 2001 >From: Tomas Bzatek <tbzatek@redhat.com> >Date: Mon, 17 Dec 2012 18:44:30 +0100 >Subject: [PATCH] Make brasero_plugin_conf_option_choice_add() useful > >When registering option choices, brasero_plugin_conf_option_choice_add() >takes a value argument that is supposed to be stored in GSettings when >selected. However, until now, combo box item index was stored instead. > >This patch changes the values stored, however double string <--> int conversion >is needed for combo box active ID mapping, which is kinda silly. > >Also fixes checksum plugins settings. >--- > data/org.gnome.brasero.gschema.xml.in | 8 ++-- > src/brasero-plugin-option.c | 50 +++++++++++++++++++++++++++++--- > 2 files changed, 49 insertions(+), 9 deletions(-) > >diff --git a/data/org.gnome.brasero.gschema.xml.in b/data/org.gnome.brasero.gschema.xml.in >index f9ba228..a8ae28a 100644 >--- a/data/org.gnome.brasero.gschema.xml.in >+++ b/data/org.gnome.brasero.gschema.xml.in >@@ -11,14 +11,14 @@ > </schema> > <schema id="org.gnome.brasero.config" path="/org/gnome/brasero/config/"> > <key name="checksum-image" type="i"> >- <default>0</default> >+ <default>2</default> > <_summary>The type of checksum used for images</_summary> >- <_description>Set to 0 for MD5, 1 for SHA1 and 2 for SHA256</_description> >+ <_description>Set to 2 for MD5, 8 for SHA1 and 32 for SHA256</_description> > </key> > <key name="checksum-files" type="i"> >- <default>0</default> >+ <default>4</default> > <_summary>The type of checksum used for files</_summary> >- <_description>Set to 0 for MD5, 1 for SHA1 and 2 for SHA256</_description> >+ <_description>Set to 4 for MD5, 16 for SHA1 and 64 for SHA256</_description> > </key> > <key name="tmpdir" type="s"> > <default>''</default> >diff --git a/src/brasero-plugin-option.c b/src/brasero-plugin-option.c >index 4e3bdca..0f1bbc1 100644 >--- a/src/brasero-plugin-option.c >+++ b/src/brasero-plugin-option.c >@@ -55,6 +55,40 @@ struct _BraseroPluginOptionPrivate > G_DEFINE_TYPE (BraseroPluginOption, brasero_plugin_option, GTK_TYPE_DIALOG); > #define BRASERO_SCHEMA_CONFIG "org.gnome.brasero.config" > >+ >+static GVariant * >+brasero_plugin_option_set_mapping (const GValue *value, >+ const GVariantType *expected_type, >+ gpointer user_data) >+{ >+ const gchar *val; >+ gint i; >+ >+ g_return_val_if_fail (G_VALUE_HOLDS_STRING (value), NULL); >+ g_return_val_if_fail (g_variant_type_equal (expected_type, G_VARIANT_TYPE_INT32), NULL); >+ >+ val = g_value_get_string (value); >+ i = g_ascii_strtoll (val, NULL, 0); >+ >+ return g_variant_new ("i", i); >+} >+ >+static gboolean >+brasero_plugin_option_get_mapping (GValue *value, >+ GVariant *variant, >+ gpointer user_data) >+{ >+ gchar *str; >+ >+ g_return_val_if_fail (g_variant_is_of_type (variant, G_VARIANT_TYPE_INT32), FALSE); >+ >+ str = g_strdup_printf ("%d", g_variant_get_int32 (variant)); >+ g_value_set_string (value, str); >+ g_free (str); >+ >+ return TRUE; >+} >+ > static GtkWidget * > brasero_plugin_option_add_conf_widget (BraseroPluginOption *self, > BraseroPluginConfOption *option, >@@ -190,7 +224,7 @@ brasero_plugin_option_add_conf_widget (BraseroPluginOption *self, > > model = gtk_list_store_new (COL_NUM, > G_TYPE_STRING, >- G_TYPE_INT); >+ G_TYPE_STRING); > widget = gtk_combo_box_new_with_model (GTK_TREE_MODEL (model)); > g_object_unref (model); > gtk_widget_show (widget); >@@ -208,15 +242,21 @@ brasero_plugin_option_add_conf_widget (BraseroPluginOption *self, > > pair = suboptions->data; > gtk_list_store_append (GTK_LIST_STORE (model), &iter); >+ char *s = g_strdup_printf ("%d", pair->value); > gtk_list_store_set (GTK_LIST_STORE (model), &iter, > STRING_COL, pair->string, >- VALUE_COL, pair->value, >+ VALUE_COL, s, > -1); >+ g_free (s); > } > >- g_settings_bind (priv->settings, key, >- widget, "active", >- G_SETTINGS_BIND_DEFAULT); >+ gtk_combo_box_set_id_column (GTK_COMBO_BOX (widget), 1); >+ g_settings_bind_with_mapping (priv->settings, key, >+ widget, "active-id", >+ G_SETTINGS_BIND_DEFAULT, >+ brasero_plugin_option_get_mapping, >+ brasero_plugin_option_set_mapping, >+ NULL, NULL); > > if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) { > if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter)) >-- >1.7.8.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 848205
: 665016