[anjuta] message-view: Use AnjutaCloseButton in tabs
- From: Carl-Anton Ingmarsson <carlantoni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] message-view: Use AnjutaCloseButton in tabs
- Date: Sun, 14 Apr 2013 20:54:37 +0000 (UTC)
commit 7ce0955b15494a672b0741abae14c5aa8b82bc18
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Sun Apr 14 20:57:32 2013 +0200
message-view: Use AnjutaCloseButton in tabs
https://bugzilla.gnome.org/show_bug.cgi?id=697030
plugins/message-view/anjuta-msgman.c | 23 +++++------------------
1 file changed, 5 insertions(+), 18 deletions(-)
---
diff --git a/plugins/message-view/anjuta-msgman.c b/plugins/message-view/anjuta-msgman.c
index 2f264a5..4bd747f 100644
--- a/plugins/message-view/anjuta-msgman.c
+++ b/plugins/message-view/anjuta-msgman.c
@@ -20,10 +20,11 @@
#include <libanjuta/anjuta-debug.h>
#include <libanjuta/anjuta-shell.h>
#include <libanjuta/anjuta-tabber.h>
-
+#include <libanjuta/anjuta-close-button.h>
#include <libanjuta/resources.h>
-#include "anjuta-msgman.h"
+
#include "message-view.h"
+#include "anjuta-msgman.h"
struct _AnjutaMsgmanPriv
{
@@ -43,7 +44,6 @@ struct _AnjutaMsgmanPage
GtkWidget *label;
GtkWidget *box;
GtkWidget *close_button;
- GtkWidget *close_icon;
};
enum
@@ -117,7 +117,6 @@ anjuta_msgman_page_new (GtkWidget * view, const gchar * name,
const gchar * pixmap, AnjutaMsgman * msgman)
{
AnjutaMsgmanPage *page;
- int h, w;
GtkWidget* box;
g_return_val_if_fail (view != NULL, NULL);
@@ -144,20 +143,8 @@ anjuta_msgman_page_new (GtkWidget * view, const gchar * name,
gtk_box_pack_start (GTK_BOX (box), page->pixmap, FALSE, FALSE, 0);
}
gtk_box_pack_start (GTK_BOX (box), page->label, TRUE, TRUE, 0);
- gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &w, &h);
- page->close_icon = gtk_image_new_from_stock(GTK_STOCK_CLOSE,
-
GTK_ICON_SIZE_MENU);
- gtk_widget_set_size_request(page->close_icon, w, h);
-
- page->close_button = gtk_button_new();
- gtk_container_add(GTK_CONTAINER(page->close_button), page->close_icon);
- gtk_widget_set_size_request (page->close_button, w, h);
- gtk_button_set_focus_on_click (GTK_BUTTON (page->close_button), FALSE);
- gtk_button_set_relief(GTK_BUTTON(page->close_button), GTK_RELIEF_NONE);
- /* This style is created int the document-manager which we simply
- * assume is loaded before this plugin
- */
- gtk_widget_set_name (page->close_button, "anjuta-tab-close-button");
+
+ page->close_button = anjuta_close_button_new ();
g_object_set_data (G_OBJECT (page->close_button), "message_view", page->widget);
g_signal_connect (page->close_button, "clicked",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]