[anjuta] Revert "sourceview: use GdRevealer for sliding in the message area"
- From: James Liggett <jrliggett src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] Revert "sourceview: use GdRevealer for sliding in the message area"
- Date: Sat, 15 Jun 2013 00:03:15 +0000 (UTC)
commit c75f042c56429e4851eeff5477090471cd9284c2
Author: James Liggett <jrliggett cox net>
Date: Fri Jun 14 16:57:28 2013 -0700
Revert "sourceview: use GdRevealer for sliding in the message area"
This reverts commit 8455ceb29e9504383242cc78ed3f6a3904bd2a3a.
plugins/sourceview/Makefile.am | 4 +--
plugins/sourceview/sourceview-private.h | 1 -
plugins/sourceview/sourceview.c | 49 +++++++++---------------------
3 files changed, 16 insertions(+), 38 deletions(-)
---
diff --git a/plugins/sourceview/Makefile.am b/plugins/sourceview/Makefile.am
index 69bf443..247595d 100644
--- a/plugins/sourceview/Makefile.am
+++ b/plugins/sourceview/Makefile.am
@@ -30,7 +30,6 @@ AM_CPPFLAGS = \
$(GIO_CFLAGS) \
$(SOURCEVIEW_CFLAGS) \
$(LIBANJUTA_CFLAGS) \
- -I$(top_srcdir)/libgd \
-DG_LOG_DOMAIN=\"sourceview\"
# Where to install the plugin
@@ -80,8 +79,7 @@ libanjuta_sourceview_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
libanjuta_sourceview_la_LIBADD = \
$(GIO_LIBS) \
$(SOURCEVIEW_LIBS) \
- $(LIBANJUTA_LIBS) \
- $(top_builddir)/libgd/libgd.la
+ $(LIBANJUTA_LIBS)
gsettings_in_file = org.gnome.anjuta.plugins.sourceview.gschema.xml.in
gsettings_SCHEMAS = $(gsettings_in_file:.xml.in=.xml)
diff --git a/plugins/sourceview/sourceview-private.h b/plugins/sourceview/sourceview-private.h
index ff7482d..a5d1969 100644
--- a/plugins/sourceview/sourceview-private.h
+++ b/plugins/sourceview/sourceview-private.h
@@ -24,7 +24,6 @@
#include "sourceview-io.h"
#include <libanjuta/anjuta-plugin.h>
-#include <libgd/gd-revealer.h>
#include <glib.h>
struct SourceviewPrivate {
diff --git a/plugins/sourceview/sourceview.c b/plugins/sourceview/sourceview.c
index c42ebec..1f365c8 100644
--- a/plugins/sourceview/sourceview.c
+++ b/plugins/sourceview/sourceview.c
@@ -265,47 +265,28 @@ goto_line (Sourceview* sv, gint line)
static void
on_destroy_message_area (Sourceview* sv, GObject *finalized_object)
{
- if ((void*)finalized_object == (void*)sv->priv->message_area)
- sv->priv->message_area = NULL;
-
+ sv->priv->message_area = NULL;
g_signal_emit_by_name (G_OBJECT (sv), "update-save-ui");
}
static void
-message_area_destroy (GtkWidget* message_area)
-{
- GtkWidget* revealer;
-
- revealer = gtk_widget_get_parent (message_area);
- g_signal_connect (revealer, "notify::child-revealed",
- G_CALLBACK(gtk_widget_destroy), NULL);
- gd_revealer_set_reveal_child (GD_REVEALER (revealer), FALSE);
-}
-
-static void
-sourceview_set_message_area (Sourceview* sv, GtkWidget *message_area)
+sourceview_set_message_area (Sourceview* sv, GtkWidget *message_area)
{
- GtkWidget* revealer;
-
if (sv->priv->message_area != NULL)
- message_area_destroy (sv->priv->message_area);
-
+ gtk_widget_destroy (sv->priv->message_area);
sv->priv->message_area = message_area;
if (sv->priv->message_area == NULL)
return;
gtk_widget_show (message_area);
-
- revealer = gd_revealer_new ();
- gtk_widget_show (revealer);
- gtk_container_add (GTK_CONTAINER (revealer), message_area);
- gtk_box_pack_start (GTK_BOX (sv), revealer, FALSE, FALSE, 0);
-
- gd_revealer_set_reveal_child (GD_REVEALER (revealer), TRUE);
-
- g_object_weak_ref (G_OBJECT (message_area),
- (GWeakNotify)on_destroy_message_area, sv);
+ gtk_box_pack_start (GTK_BOX (sv),
+ message_area,
+ FALSE,
+ FALSE,
+ 0);
+ g_object_weak_ref (G_OBJECT (sv->priv->message_area),
+ (GWeakNotify)on_destroy_message_area, sv);
g_signal_emit_by_name (G_OBJECT (sv), "update-save-ui");
}
@@ -585,7 +566,7 @@ on_reload_dialog_response (GtkWidget *message_area, gint res, Sourceview *sv)
/* Set dirty */
gtk_text_buffer_set_modified(GTK_TEXT_BUFFER(sv->priv->document), TRUE);
}
- message_area_destroy (message_area);
+ gtk_widget_destroy (message_area);
}
static void
@@ -605,7 +586,7 @@ on_close_dialog_response (GtkWidget *message_area, gint res, Sourceview *sv)
/* Set dirty */
gtk_text_buffer_set_modified(GTK_TEXT_BUFFER(sv->priv->document), TRUE);
}
- message_area_destroy (message_area);
+ gtk_widget_destroy (message_area);
}
static gboolean
@@ -693,7 +674,7 @@ on_open_failed (SourceviewIO* io, GError* err, Sourceview* sv)
gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
GTK_STOCK_OK,
GTK_RESPONSE_OK);
- g_signal_connect (message_area, "response", G_CALLBACK(message_area_destroy), NULL);
+ g_signal_connect (message_area, "response", G_CALLBACK(gtk_widget_destroy), NULL);
sourceview_set_message_area (sv, message_area);
}
@@ -720,7 +701,7 @@ on_read_only_dialog_response (GtkWidget *message_area, gint res, Sourceview *sv)
TRUE);
sv->priv->read_only = FALSE;
}
- message_area_destroy (message_area);
+ gtk_widget_destroy (message_area);
}
/* Called when document is loaded completly */
@@ -803,7 +784,7 @@ static void on_save_failed (SourceviewIO* sio, GError* err, Sourceview* sv)
gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
GTK_STOCK_OK,
GTK_RESPONSE_OK);
- g_signal_connect (message_area, "response", G_CALLBACK(message_area_destroy), NULL);
+ g_signal_connect (message_area, "response", G_CALLBACK(gtk_widget_destroy), NULL);
sourceview_set_message_area (sv, message_area);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]