Author: kelnos
Date: 2008-11-08 07:11:23 +0000 (Sat, 08 Nov 2008)
New Revision: 28657
Modified:
xfwm4/trunk/NEWS
xfwm4/trunk/settings-dialogs/xfwm4-settings.c
Log:
fix possible crash if the dbl_click_action setting gets unset
Modified: xfwm4/trunk/NEWS
===================================================================
--- xfwm4/trunk/NEWS 2008-11-08 00:00:28 UTC (rev 28656)
+++ xfwm4/trunk/NEWS 2008-11-08 07:11:23 UTC (rev 28657)
@@ -8,6 +8,7 @@
- Simplify management of transients.
- Add support for keyboard shortcuts (Bug #4492).
- Add new option do disable blinking of urgent windows.
+- Fix possible crash when the dbl_click_action setting gets unset.
4.5.91 (Xfce 4.6beta1)
======================
Modified: xfwm4/trunk/settings-dialogs/xfwm4-settings.c
===================================================================
--- xfwm4/trunk/settings-dialogs/xfwm4-settings.c 2008-11-08 00:00:28 UTC
(rev 28656)
+++ xfwm4/trunk/settings-dialogs/xfwm4-settings.c 2008-11-08 07:11:23 UTC
(rev 28657)
@@ -1547,6 +1547,7 @@
GtkTreeModel *model;
GtkTreeIter iter;
GtkWidget *combo;
+ const gchar *new_value;
gchar *current_value;
g_return_if_fail (XFWM_IS_SETTINGS (settings));
@@ -1554,13 +1555,18 @@
combo = glade_xml_get_widget (settings->priv->glade_xml,
"double_click_action_combo");
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
+ if (G_UNLIKELY (G_VALUE_TYPE (value) == G_TYPE_INVALID))
+ new_value = "maximize";
+ else
+ new_value = g_value_get_string (value);
+
if (G_LIKELY (gtk_tree_model_get_iter_first (model, &iter)))
{
do
{
gtk_tree_model_get (model, &iter, 1, ¤t_value, -1);
- if (G_UNLIKELY (g_str_equal (current_value, g_value_get_string
(value))))
+ if (G_UNLIKELY (g_str_equal (current_value, new_value)))
{
g_free (current_value);
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo), &iter);
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits