[gtksourceview] don't add empty boxes to the SourceMark tooltip
- From: Paolo Borelli <pborelli src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtksourceview] don't add empty boxes to the SourceMark tooltip
- Date: Mon, 21 Sep 2009 20:55:29 +0000 (UTC)
commit 88b304382ea3716548ff376e35cfa79dc101e838
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Thu Sep 17 14:37:02 2009 +0200
don't add empty boxes to the SourceMark tooltip
https://bugzilla.gnome.org/show_bug.cgi?id=595450
gtksourceview/gtksourceview.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index d92c565..778897c 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -1232,21 +1232,19 @@ set_tooltip_widget_from_marks (GtkSourceView *view,
if (cat != NULL && cat->tooltip_func != NULL)
{
- GtkWidget *image;
- GtkWidget *label;
- GtkWidget *hbox;
- GtkWidget *separator;
gchar *text;
-
- hbox = gtk_hbox_new (FALSE, 4);
- gtk_widget_show (hbox);
- gtk_box_pack_start (GTK_BOX (vbox), hbox,
- FALSE, FALSE, 0);
-
text = cat->tooltip_func (mark, cat->tooltip_data);
if (text != NULL)
{
+ GtkWidget *label;
+ GtkWidget *hbox;
+
+ hbox = gtk_hbox_new (FALSE, 4);
+ gtk_widget_show (hbox);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox,
+ FALSE, FALSE, 0);
+
GdkPixbuf *pixbuf;
gint size;
@@ -1265,6 +1263,7 @@ set_tooltip_widget_from_marks (GtkSourceView *view,
if (pixbuf != NULL)
{
+ GtkWidget *image;
PangoLayoutLine *line;
PangoRectangle rect;
GtkWidget *align = gtk_alignment_new (0, 0, 0, 0);
@@ -1312,6 +1311,8 @@ set_tooltip_widget_from_marks (GtkSourceView *view,
if (g_slist_length (marks) != 1)
{
+ GtkWidget *separator;
+
separator = gtk_hseparator_new ();
gtk_widget_show (separator);
gtk_box_pack_start (GTK_BOX (vbox), separator,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]