[gedit] Rename mnb tabs-reordered signal to page-reordered.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Rename mnb tabs-reordered signal to page-reordered.
- Date: Tue, 5 Oct 2010 09:12:27 +0000 (UTC)
commit 7518f4f41a32fe1f4f8b4292bf423bd9b0170c63
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Tue Oct 5 11:11:48 2010 +0200
Rename mnb tabs-reordered signal to page-reordered.
gedit/gedit-documents-panel.c | 9 ++++++---
gedit/gedit-marshal.list | 1 +
gedit/gedit-multi-notebook.c | 25 ++++++++++++++-----------
gedit/gedit-multi-notebook.h | 2 +-
gedit/gedit-window.c | 13 ++++++++-----
5 files changed, 30 insertions(+), 20 deletions(-)
---
diff --git a/gedit/gedit-documents-panel.c b/gedit/gedit-documents-panel.c
index a2759d5..330a850 100644
--- a/gedit/gedit-documents-panel.c
+++ b/gedit/gedit-documents-panel.c
@@ -526,8 +526,11 @@ multi_notebook_notebook_removed (GeditMultiNotebook *mnb,
}
static void
-multi_notebook_tabs_reordered (GeditWindow *window,
- GeditDocumentsPanel *panel)
+multi_notebook_tabs_reordered (GeditMultiNotebook *mnb,
+ GeditNotebook *notebook,
+ GtkWidget *page,
+ gint page_num,
+ GeditDocumentsPanel *panel)
{
gedit_debug (DEBUG_PANEL);
@@ -562,7 +565,7 @@ set_window (GeditDocumentsPanel *panel,
G_CALLBACK (multi_notebook_tab_removed),
panel);
g_signal_connect (panel->priv->mnb,
- "tabs-reordered",
+ "page-reordered",
G_CALLBACK (multi_notebook_tabs_reordered),
panel);
g_signal_connect (panel->priv->mnb,
diff --git a/gedit/gedit-marshal.list b/gedit/gedit-marshal.list
index 646d363..bf6014a 100644
--- a/gedit/gedit-marshal.list
+++ b/gedit/gedit-marshal.list
@@ -13,4 +13,5 @@ VOID:UINT,POINTER
VOID:UINT64,UINT64
VOID:VOID
VOID:INT,INT
+VOID:OBJECT,OBJECT,INT
OBJECT:OBJECT,OBJECT,INT,INT
diff --git a/gedit/gedit-multi-notebook.c b/gedit/gedit-multi-notebook.c
index f491ac8..311ff3a 100644
--- a/gedit/gedit-multi-notebook.c
+++ b/gedit/gedit-multi-notebook.c
@@ -55,7 +55,7 @@ enum
SWITCH_TAB,
TAB_CLOSE_REQUEST,
CREATE_WINDOW,
- TABS_REORDERED,
+ PAGE_REORDERED,
SHOW_POPUP_MENU,
LAST_SIGNAL
};
@@ -187,15 +187,17 @@ gedit_multi_notebook_class_init (GeditMultiNotebookClass *klass)
GTK_TYPE_NOTEBOOK, 4,
GEDIT_TYPE_NOTEBOOK, GTK_TYPE_WIDGET,
G_TYPE_INT, G_TYPE_INT);
- signals[TABS_REORDERED] =
- g_signal_new ("tabs-reordered",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GeditMultiNotebookClass, tabs_reordered),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
+ signals[PAGE_REORDERED] =
+ g_signal_new ("page-reordered",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GeditMultiNotebookClass, page_reordered),
+ NULL, NULL,
+ gedit_marshal_VOID__OBJECT_OBJECT_INT,
+ G_TYPE_NONE,
+ 3,
+ GEDIT_TYPE_NOTEBOOK, GTK_TYPE_WIDGET,
+ G_TYPE_INT);
signals[SHOW_POPUP_MENU] =
g_signal_new ("show-popup-menu",
G_OBJECT_CLASS_TYPE (object_class),
@@ -271,7 +273,8 @@ notebook_page_reordered (GeditNotebook *notebook,
guint page_num,
GeditMultiNotebook *mnb)
{
- g_signal_emit (G_OBJECT (mnb), signals[TABS_REORDERED], 0);
+ g_signal_emit (G_OBJECT (mnb), signals[PAGE_REORDERED], 0, notebook,
+ child, page_num);
}
static void
diff --git a/gedit/gedit-multi-notebook.h b/gedit/gedit-multi-notebook.h
index 19dfb67..98ce8e4 100644
--- a/gedit/gedit-multi-notebook.h
+++ b/gedit/gedit-multi-notebook.h
@@ -78,7 +78,7 @@ struct _GeditMultiNotebookClass
GtkWidget *page,
gint x,
gint y);
- void (* tabs_reordered) (GeditMultiNotebook *mnb);
+ void (* page_reordered) (GeditMultiNotebook *mnb);
void (* show_popup_menu) (GeditMultiNotebook *mnb,
GdkEvent *event);
};
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index dad5a67..56b2156 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -3693,12 +3693,15 @@ on_tab_removed (GeditMultiNotebook *multi,
}
static void
-on_tabs_reordered (GeditMultiNotebook *multi,
- GeditWindow *window)
+on_page_reordered (GeditMultiNotebook *multi,
+ GeditNotebook *notebook,
+ GtkWidget *page,
+ gint page_num,
+ GeditWindow *window)
{
update_documents_list_menu (window);
update_next_prev_doc_sensitivity_per_window (window);
-
+
g_signal_emit (G_OBJECT (window), signals[TABS_REORDERED], 0);
}
@@ -4217,8 +4220,8 @@ gedit_window_init (GeditWindow *window)
window);
g_signal_connect (window->priv->multi_notebook,
- "tabs-reordered",
- G_CALLBACK (on_tabs_reordered),
+ "page-reordered",
+ G_CALLBACK (on_page_reordered),
window);
g_signal_connect (window->priv->multi_notebook,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]