1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
From 22da0a85fec480943411c25c0d361b3fa2252381 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Granjoux?= <seb.sfo@free.fr>
Date: Wed, 14 Nov 2012 22:00:47 +0100
Subject: [PATCH 2/3] fix bgo #687432 - gtranslator can't load/save tab
layout, cause gdl 3.6
Do not save the layout after each change.
Fix the default layout to remove GtrOpenTranPlugin and GtrCharmapPanel pane as
GDL 3.6.0 does not hide them as it should.
---
data/layout.xml | 16 +++++-----------
src/gtr-tab.c | 18 ------------------
2 files changed, 5 insertions(+), 29 deletions(-)
diff --git a/data/layout.xml b/data/layout.xml
index f3e313e..117f471 100644
--- a/data/layout.xml
+++ b/data/layout.xml
@@ -4,19 +4,13 @@
<layout name="__default__">
<dock name="__dock_1" floating="no" width="-1" height="-1" floatx="0" floaty="0">
<paned orientation="horizontal" locked="no" iconified="no" closed="no" position="1164">
- <paned orientation="horizontal" locked="no" iconified="no" closed="no" position="244">
+ <paned orientation="vertical" locked="no" iconified="no" closed="no" position="416">
<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"/>
+ <item name="GtrMessageTable" orientation="vertical" locked="no" iconified="no" closed="no"/>
+ </notebook>
+ <notebook orientation="vertical" locked="no" iconified="no" closed="no" page="0">
+ <item name="GtrTranslationFields" orientation="vertical" locked="no" iconified="no" closed="no"/>
</notebook>
- <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" 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" iconified="no" closed="no" position="387">
<item name="GtrTranslationMemoryUI" orientation="vertical" locked="no" iconified="no" closed="no"/>
diff --git a/src/gtr-tab.c b/src/gtr-tab.c
index f22d546..4c7760a 100644
--- a/src/gtr-tab.c
+++ b/src/gtr-tab.c
@@ -671,13 +671,6 @@ save_layout (GtrTab *tab)
}
static void
-on_layout_changed (GdlDockMaster *master,
- GtrTab *tab)
-{
- save_layout (tab);
-}
-
-static void
extension_added (PeasExtensionSet *extensions,
PeasPluginInfo *info,
PeasExtension *exten,
@@ -732,11 +725,6 @@ gtr_tab_init (GtrTab * tab)
gtk_box_pack_start (GTK_BOX (hbox), dockbar, FALSE, FALSE, 0);
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,
gdl_dock_layout_get_master (priv->layout_manager),
@@ -967,17 +955,11 @@ 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;
}
--
1.8.0
|