[gtranslator] fix bgo #680399 - gtranslator 2.91.5 segfaults trying to use any plugin (gnome 3.5.x stack)
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] fix bgo #680399 - gtranslator 2.91.5 segfaults trying to use any plugin (gnome 3.5.x stack)
- Date: Tue, 13 Nov 2012 21:04:51 +0000 (UTC)
commit 68d6bc237c2076d3ff2a75a6a85e198807f8132a
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Tue Nov 6 21:03:39 2012 +0100
fix bgo #680399 - gtranslator 2.91.5 segfaults trying to use any plugin (gnome 3.5.x stack)
- Update data/layout.xml, some attributes have changed
- Several Dock object constructors take a G_OBJECT instead of a GDL_DOCK
- GdlDockLayout member master is not accessible anymore
- Block layout-changed signal when loading a new layout
data/layout.xml | 34 +++++++++++++++-------------------
src/gtr-tab.c | 14 ++++++++++----
2 files changed, 25 insertions(+), 23 deletions(-)
---
diff --git a/data/layout.xml b/data/layout.xml
index 85f7f64..f3e313e 100644
--- a/data/layout.xml
+++ b/data/layout.xml
@@ -3,30 +3,26 @@
<dock-layout>
<layout name="__default__">
<dock name="__dock_1" floating="no" width="-1" height="-1" floatx="0" floaty="0">
- <paned orientation="horizontal" locked="no" position="1164">
- <paned orientation="horizontal" locked="no" position="244">
- <notebook orientation="vertical" locked="no" page="0">
- <item name="GtrOpenTranPlugin" orientation="vertical" locked="no"/>
- <item name="GtrCharmapPanel" orientation="vertical" locked="no"/>
- <placeholder name="ph_left" next-placement="center"/>
+ <paned orientation="horizontal" locked="no" iconified="no" closed="no" position="1164">
+ <paned orientation="horizontal" locked="no" iconified="no" closed="no" position="244">
+ <notebook orientation="vertical" locked="no" iconified="no" closed="no" page="0">
+ <item name="GtrOpenTranPlugin" orientation="vertical" locked="no" iconified="no" closed="no"/>
+ <item name="GtrCharmapPanel" orientation="vertical" locked="no" iconified="no" closed="no"/>
</notebook>
- <paned orientation="vertical" locked="no" position="416">
- <notebook orientation="vertical" locked="no" page="0">
- <item name="GtrMessageTable" orientation="vertical" locked="no"/>
- <placeholder name="ph_top" next-placement="center"/>
+ <paned orientation="vertical" locked="no" iconified="no" closed="no" position="416">
+ <notebook orientation="vertical" locked="no" iconified="no" closed="no" page="0">
+ <item name="GtrMessageTable" orientation="vertical" locked="no" iconified="no" closed="no"/>
</notebook>
- <notebook orientation="vertical" locked="no" page="0">
- <item name="GtrTranslationFields" orientation="vertical" locked="no"/>
- <placeholder name="ph_center" next-placement="bottom"/>
+ <notebook orientation="vertical" locked="no" iconified="no" closed="no" page="0">
+ <item name="GtrTranslationFields" orientation="vertical" locked="no" iconified="no" closed="no"/>
</notebook>
</paned>
</paned>
- <paned orientation="vertical" locked="no" position="387">
- <item name="GtrTranslationMemoryUI" orientation="vertical" locked="no"/>
- <notebook orientation="vertical" locked="no" page="0">
- <item name="GtrContextPanel" orientation="vertical" locked="no"/>
- <item name="GtrAlternateLangPluginPanel" orientation="vertical" locked="no"/>
- <placeholder name="ph_right" next-placement="center"/>
+ <paned orientation="vertical" locked="no" iconified="no" closed="no" position="387">
+ <item name="GtrTranslationMemoryUI" orientation="vertical" locked="no" iconified="no" closed="no"/>
+ <notebook orientation="vertical" locked="no" iconified="no" closed="no" page="0">
+ <item name="GtrContextPanel" orientation="vertical" locked="no" iconified="no" closed="no"/>
+ <item name="GtrAlternateLangPluginPanel" orientation="vertical" locked="no" iconified="no" closed="no"/>
</notebook>
</paned>
</paned>
diff --git a/src/gtr-tab.c b/src/gtr-tab.c
index 75fbd35..f22d546 100644
--- a/src/gtr-tab.c
+++ b/src/gtr-tab.c
@@ -727,19 +727,19 @@ gtr_tab_init (GtrTab * tab)
gtk_widget_show (priv->dock);
gtk_box_pack_end (GTK_BOX (hbox), priv->dock, TRUE, TRUE, 0);
- dockbar = gdl_dock_bar_new (GDL_DOCK (priv->dock));
+ dockbar = gdl_dock_bar_new (G_OBJECT (priv->dock));
gtk_widget_show (dockbar);
gtk_box_pack_start (GTK_BOX (hbox), dockbar, FALSE, FALSE, 0);
- priv->layout_manager = gdl_dock_layout_new (GDL_DOCK (priv->dock));
- g_signal_connect (priv->layout_manager->master,
+ priv->layout_manager = gdl_dock_layout_new (G_OBJECT (priv->dock));
+ g_signal_connect (gdl_dock_layout_get_master (priv->layout_manager),
"layout-changed",
G_CALLBACK (on_layout_changed),
tab);
g_settings_bind (priv->ui_settings,
GTR_SETTINGS_PANEL_SWITCHER_STYLE,
- priv->layout_manager->master,
+ gdl_dock_layout_get_master (priv->layout_manager),
"switcher-style",
G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
@@ -967,11 +967,17 @@ gtr_tab_realize (GtkWidget *widget)
tab);
/* Loading dock layout */
+ g_signal_handlers_block_by_func (gdl_dock_layout_get_master (tab->priv->layout_manager),
+ G_CALLBACK (on_layout_changed),
+ tab);
filename = g_build_filename (gtr_dirs_get_user_config_dir (),
"layout.xml", NULL);
gtr_tab_layout_load (tab, filename, NULL);
g_free (filename);
+ g_signal_handlers_unblock_by_func (gdl_dock_layout_get_master (tab->priv->layout_manager),
+ G_CALLBACK (on_layout_changed),
+ tab);
tab->priv->tab_realized = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]