summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2012-12-21 08:35:32 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx.marker.es>2012-12-21 08:35:32 +0000
commit39309b4a709fad3beed6f02f7ce0289020835efd (patch)
tree0ecc19c6309bfa70f30f075a46d87774040cfb8a /src/widgets
parentnot working (diff)
parentfix crasher (diff)
downloadinkscape-39309b4a709fad3beed6f02f7ce0289020835efd.tar.gz
inkscape-39309b4a709fad3beed6f02f7ce0289020835efd.zip
not working, merge from branch
(bzr r11950.1.4)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/desktop-widget.cpp5
-rw-r--r--src/widgets/text-toolbar.cpp9
2 files changed, 11 insertions, 3 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index 3791ec73c..0fd8fd010 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -578,7 +578,12 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
if (create_dock) {
dtw->dock = new Inkscape::UI::Widget::Dock();
+#if WITH_GTKMM_3_0
+ Gtk::Paned *paned = new Gtk::Paned();
+#else
Gtk::HPaned *paned = new Gtk::HPaned();
+#endif
+
paned->pack1(*Glib::wrap(canvas_tbl));
paned->pack2(dtw->dock->getWidget(), Gtk::FILL);
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index 9e0977d51..6c22c81e3 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -174,6 +174,9 @@ static void sp_text_fontstyle_populate(GObject *tbl, font_instance *font=NULL)
Ink_ComboBoxEntry_Action* act = INK_COMBOBOXENTRY_ACTION( g_object_get_data( tbl, "TextFontFamilyAction" ) );
GtkTreeModel *model = ink_comboboxentry_action_get_model( act );
gchar *current_font = ink_comboboxentry_action_get_active_text( act );
+ if (!current_font) {
+ return;
+ }
// Get an iter to the selected font from the model data
// We cant get it from the combo, cause it might not have been created yet
@@ -183,11 +186,11 @@ static void sp_text_fontstyle_populate(GObject *tbl, font_instance *font=NULL)
while ( valid ) {
// Get text from list entry
- gchar* text = 0;
+ gchar* text = NULL;
gtk_tree_model_get( model, &iter, 0, &text, -1 ); // Column 0
// Check for match
- if( strcmp( current_font, text ) == 0 ){
+ if ( text && (strcmp( current_font, text ) == 0) ) {
found = true;
break;
}
@@ -199,7 +202,7 @@ static void sp_text_fontstyle_populate(GObject *tbl, font_instance *font=NULL)
}
// Get the list of styles from the selected font
- GList *list=0;
+ GList *list = NULL;
gtk_tree_model_get (model, &iter, 1, &list, -1);
Ink_ComboBoxEntry_Action* fontStyleAction = INK_COMBOBOXENTRY_ACTION( g_object_get_data( tbl, "TextFontStyleAction" ) );