ekiga r6647 - trunk/lib/engine/gui/gtk-frontend
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6647 - trunk/lib/engine/gui/gtk-frontend
- Date: Mon, 18 Aug 2008 20:27:26 +0000 (UTC)
Author: jpuydt
Date: Mon Aug 18 20:27:26 2008
New Revision: 6647
URL: http://svn.gnome.org/viewvc/ekiga?rev=6647&view=rev
Log:
Fixed bug #548160
Modified:
trunk/lib/engine/gui/gtk-frontend/chat-window.cpp
Modified: trunk/lib/engine/gui/gtk-frontend/chat-window.cpp
==============================================================================
--- trunk/lib/engine/gui/gtk-frontend/chat-window.cpp (original)
+++ trunk/lib/engine/gui/gtk-frontend/chat-window.cpp Mon Aug 18 20:27:26 2008
@@ -67,6 +67,9 @@
/* signal callbacks (declarations) */
+static void on_close_button_clicked (GtkButton* button,
+ gpointer data);
+
static void on_switch_page (GtkNotebook* notebook,
GtkNotebookPage* page,
guint num,
@@ -119,6 +122,23 @@
/* signal callbacks (implementations) */
static void
+on_close_button_clicked (GtkButton* button,
+ gpointer data)
+{
+ ChatWindow* self = (ChatWindow*)data;
+ GtkWidget* page = NULL;
+ gint num = 0;
+
+ page = (GtkWidget*)g_object_get_data (G_OBJECT (button), "page-widget");
+ num = gtk_notebook_page_num (GTK_NOTEBOOK (self->priv->notebook), page);
+
+ if (num != -1) {
+
+ gtk_notebook_remove_page (GTK_NOTEBOOK (self->priv->notebook), num);
+ }
+}
+
+static void
on_switch_page (G_GNUC_UNUSED GtkNotebook* notebook,
G_GNUC_UNUSED GtkNotebookPage* page_,
guint num,
@@ -253,6 +273,9 @@
gtk_button_set_focus_on_click (GTK_BUTTON (close_button), FALSE);
close_image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (close_button), close_image);
+ g_object_set_data (G_OBJECT (close_button), "page-widget", page);
+ g_signal_connect (close_button, "clicked",
+ G_CALLBACK (on_close_button_clicked), self);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 2);
g_object_set_data (G_OBJECT (hbox), "label-widget", label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]