[latexila] Remove hack for the natural size of the calltip windows
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Remove hack for the natural size of the calltip windows
- Date: Wed, 16 Jan 2013 21:47:11 +0000 (UTC)
commit 306f537116e847ff336ad1eb9398dc154476ef9c
Author: SÃbastien Wilmet <swilmet gnome org>
Date: Wed Jan 16 14:50:35 2013 +0100
Remove hack for the natural size of the calltip windows
This is fixed in GtkSourceView master.
src/completion.vala | 13 -------------
src/document_view.vala | 22 ----------------------
2 files changed, 0 insertions(+), 35 deletions(-)
---
diff --git a/src/completion.vala b/src/completion.vala
index 436380f..e1480d7 100644
--- a/src/completion.vala
+++ b/src/completion.vala
@@ -303,14 +303,6 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
private void init_calltip_window ()
{
_calltip_window = new SourceCompletionInfo ();
-
- // HACK: no scrollbars
- if (_calltip_window.get_child () is ScrolledWindow)
- {
- ScrolledWindow sw = _calltip_window.get_child () as ScrolledWindow;
- sw.set_policy (PolicyType.NEVER, PolicyType.NEVER);
- }
-
_calltip_window_label = new Label (null);
_calltip_window.set_widget (_calltip_window_label);
}
@@ -337,11 +329,6 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
_calltip_window_label.set_markup (markup);
- // Set better size
- Requisition size;
- _calltip_window_label.get_preferred_size (null, out size);
- _calltip_window.resize (size.width + 10, size.height + 10);
-
MainWindow window = Latexila.get_instance ().active_window;
_calltip_window.set_transient_for (window);
_calltip_window.set_attached_to (window.active_view);
diff --git a/src/document_view.vala b/src/document_view.vala
index 2777de2..1ac8477 100644
--- a/src/document_view.vala
+++ b/src/document_view.vala
@@ -69,28 +69,6 @@ public class DocumentView : Gtk.SourceView
{
provider.hide_calltip_window ();
});
-
- /* Natural size of the calltip */
- // When the set_sizing() function is back, this hack can be removed.
- SourceCompletionInfo info = completion.get_info_window ();
-
- // This code is highly dependent on the implementation in GtkSourceView.
- if (info.get_child () is ScrolledWindow)
- {
- ScrolledWindow scrolled_window = info.get_child () as ScrolledWindow;
- scrolled_window.set_policy (PolicyType.NEVER, PolicyType.NEVER);
- }
-
- info.draw.connect (() =>
- {
- Widget child = info.get_widget ();
-
- Requisition size;
- child.get_preferred_size (null, out size);
- info.resize (size.width + 10, size.height + 10);
-
- return false;
- });
}
catch (GLib.Error e)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]