Author: rpmcruz Date: Wed Oct 20 22:04:25 2010 New Revision: 62654 URL: http://svn.opensuse.org/viewcvs/yast?rev=62654&view=rev Log: * src/YGTable.cc: bug fix 640091: crash when modifying a custom sorted table. Modified: trunk/gtk/ChangeLog trunk/gtk/src/YGTable.cc trunk/gtk/src/pkg/ygtkpkgmenubar.cc Modified: trunk/gtk/ChangeLog URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=62654&r1=62653&r2=62654&view=diff ============================================================================== --- trunk/gtk/ChangeLog (original) +++ trunk/gtk/ChangeLog Wed Oct 20 22:04:25 2010 @@ -1,3 +1,8 @@ +2010-10-20 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> + + * src/YGTable.cc: bug fix 640091: crash when modifying + a custom sorted table. + 2010-10-04 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> * src/*.cc & src/pkg/*.cc: general string review, Modified: trunk/gtk/src/YGTable.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGTable.cc?rev=62654&r1=62653&r2=62654&view=diff ============================================================================== --- trunk/gtk/src/YGTable.cc (original) +++ trunk/gtk/src/YGTable.cc Wed Oct 20 22:04:25 2010 @@ -300,8 +300,8 @@ if (label == "X") label = YUI::app()->glyph (YUIGlyph_CheckMark); } - setCellIcon (iter, index, icon); - setCellLabel (iter, index+1, label); + setCellIcon (iter, index, icon); + setCellLabel (iter, index+1, label); } void setSortable (bool sortable) @@ -425,9 +425,10 @@ gchar *str_a, *str_b; gtk_tree_model_get (model, a, index, &str_a, -1); gtk_tree_model_get (model, b, index, &str_b, -1); + if (!str_a) str_a = g_strdup (""); + if (!str_b) str_b = g_strdup (""); int ret = strcmp (str_a, str_b); - g_free (str_a); - g_free (str_b); + g_free (str_a); g_free (str_b); return ret; } Modified: trunk/gtk/src/pkg/ygtkpkgmenubar.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgmenubar.cc?rev=62654&r1=62653&r2=62654&view=diff ============================================================================== --- trunk/gtk/src/pkg/ygtkpkgmenubar.cc (original) +++ trunk/gtk/src/pkg/ygtkpkgmenubar.cc Wed Oct 20 22:04:25 2010 @@ -74,11 +74,11 @@ GtkWidget *item; if (stock && text) { GtkWidget *icon = gtk_image_new_from_stock (stock, GTK_ICON_SIZE_MENU); - item = gtk_image_menu_item_new_with_label (text); + item = gtk_image_menu_item_new_with_mnemonic (text); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), icon); } else if (text) - item = gtk_menu_item_new_with_label (text); + item = gtk_menu_item_new_with_mnemonic (text); else if (stock) item = gtk_image_menu_item_new_from_stock (stock, NULL); else @@ -685,7 +685,7 @@ Flags flags; GtkWidget *menu_bar = m_menu, *item, *submenu; - item = append_menu_item (menu_bar, _("_File"), NULL, NULL, NULL); + item = append_menu_item (menu_bar, _("F_ile"), NULL, NULL, NULL); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), (submenu = gtk_menu_new())); append_menu_item (submenu, _("_Import..."), NULL, G_CALLBACK (import_file_cb), this); @@ -724,7 +724,7 @@ new AllowVendorChangeCheckItem (submenu, _("_Allow vendor change"), &flags); } - item = append_menu_item (menu_bar, _("_Extras"), NULL, NULL, NULL); + item = append_menu_item (menu_bar, _("E_xtras"), NULL, NULL, NULL); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), (submenu = gtk_menu_new())); append_menu_item (submenu, _("Show _Products"), NULL, G_CALLBACK (show_products_cb), this); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org