summaryrefslogtreecommitdiffstats
path: root/src/ege-adjustment-action.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2007-03-22 04:43:20 +0000
committerjoncruz <joncruz@users.sourceforge.net>2007-03-22 04:43:20 +0000
commitf2ccc97eb7c98cd71e7c503b0506b217053844d0 (patch)
tree27c7aeb11a68dd9dec499749511e2908553619a5 /src/ege-adjustment-action.cpp
parentdrop more missing files from autoconf (diff)
downloadinkscape-f2ccc97eb7c98cd71e7c503b0506b217053844d0.tar.gz
inkscape-f2ccc97eb7c98cd71e7c503b0506b217053844d0.zip
Adding non-labeled default entries
(bzr r2735)
Diffstat (limited to 'src/ege-adjustment-action.cpp')
-rw-r--r--src/ege-adjustment-action.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ege-adjustment-action.cpp b/src/ege-adjustment-action.cpp
index 2d303c63d..54cde1d1d 100644
--- a/src/ege-adjustment-action.cpp
+++ b/src/ege-adjustment-action.cpp
@@ -453,10 +453,8 @@ void ege_adjustment_action_set_descriptions( EgeAdjustmentAction* action, gchar
guint i = 0;
for ( i = 0; i < count; i++ ) {
EgeAdjustmentDescr* descr = g_new0( EgeAdjustmentDescr, 1 );
- if ( descriptions[i] ) {
- descr->descr = g_strdup( descriptions[i] );
- descr->value = values[i];
- }
+ descr->descr = descriptions[i] ? g_strdup( descriptions[i] ) : 0;
+ descr->value = values[i];
action->private_data->descriptions = g_list_insert_sorted( action->private_data->descriptions, (gpointer)descr, egeAct_compare_descriptions );
}
}
@@ -540,7 +538,7 @@ static void create_single_menu_item( GCallback toggleCb, int val, GtkWidget* men
cur = g_list_next( cur );
}
- str = g_strdup_printf( act->private_data->format, num, (marker?" ":""), (marker?marker->descr:"") );
+ str = g_strdup_printf( act->private_data->format, num, (marker?" ":""), ( (marker && marker->descr) ? marker->descr:"") );
*dst = gtk_radio_menu_item_new_with_label( *group, str );
if ( !*group) {