summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--ChangeLog.pre-2-1011
-rw-r--r--ChangeLog.pre-2-411
-rw-r--r--ChangeLog.pre-2-611
-rw-r--r--ChangeLog.pre-2-811
-rw-r--r--gtk/gtknotebook.c86
-rw-r--r--gtk/gtknotebook.h12
7 files changed, 114 insertions, 39 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b91ace7d..5edefc400 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Fri Jan 16 00:04:43 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtknotebook.h:
+ * gtk/gtknotebook.c (gtk_notebook_append_page):
+ * gtk/gtknotebook.c (gtk_notebook_append_page_menu):
+ * gtk/gtknotebook.c (gtk_notebook_prepend_page):
+ * gtk/gtknotebook.c (gtk_notebook_prepend_page_menu):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu): Return the
+ index of the newly inserted page. (#130986, Olexiy Avramchenko)
+
Thu Jan 15 23:17:14 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c (gtk_ui_manager_get_toplevels): Inserting
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 8b91ace7d..5edefc400 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,14 @@
+Fri Jan 16 00:04:43 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtknotebook.h:
+ * gtk/gtknotebook.c (gtk_notebook_append_page):
+ * gtk/gtknotebook.c (gtk_notebook_append_page_menu):
+ * gtk/gtknotebook.c (gtk_notebook_prepend_page):
+ * gtk/gtknotebook.c (gtk_notebook_prepend_page_menu):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu): Return the
+ index of the newly inserted page. (#130986, Olexiy Avramchenko)
+
Thu Jan 15 23:17:14 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c (gtk_ui_manager_get_toplevels): Inserting
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 8b91ace7d..5edefc400 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,14 @@
+Fri Jan 16 00:04:43 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtknotebook.h:
+ * gtk/gtknotebook.c (gtk_notebook_append_page):
+ * gtk/gtknotebook.c (gtk_notebook_append_page_menu):
+ * gtk/gtknotebook.c (gtk_notebook_prepend_page):
+ * gtk/gtknotebook.c (gtk_notebook_prepend_page_menu):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu): Return the
+ index of the newly inserted page. (#130986, Olexiy Avramchenko)
+
Thu Jan 15 23:17:14 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c (gtk_ui_manager_get_toplevels): Inserting
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 8b91ace7d..5edefc400 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,14 @@
+Fri Jan 16 00:04:43 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtknotebook.h:
+ * gtk/gtknotebook.c (gtk_notebook_append_page):
+ * gtk/gtknotebook.c (gtk_notebook_append_page_menu):
+ * gtk/gtknotebook.c (gtk_notebook_prepend_page):
+ * gtk/gtknotebook.c (gtk_notebook_prepend_page_menu):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu): Return the
+ index of the newly inserted page. (#130986, Olexiy Avramchenko)
+
Thu Jan 15 23:17:14 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c (gtk_ui_manager_get_toplevels): Inserting
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 8b91ace7d..5edefc400 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,14 @@
+Fri Jan 16 00:04:43 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtknotebook.h:
+ * gtk/gtknotebook.c (gtk_notebook_append_page):
+ * gtk/gtknotebook.c (gtk_notebook_append_page_menu):
+ * gtk/gtknotebook.c (gtk_notebook_prepend_page):
+ * gtk/gtknotebook.c (gtk_notebook_prepend_page_menu):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu): Return the
+ index of the newly inserted page. (#130986, Olexiy Avramchenko)
+
Thu Jan 15 23:17:14 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c (gtk_ui_manager_get_toplevels): Inserting
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 9e1c31765..5b38af8b4 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -4124,17 +4124,20 @@ gtk_notebook_set_tab_vborder_internal (GtkNotebook *notebook,
* or %NULL to use the default label, 'page N'.
*
* Appends a page to @notebook.
+ *
+ * Return value: the index (starting from 0) of the appended
+ * page in the notebook, or -1 if function fails
**/
-void
+gint
gtk_notebook_append_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label)
{
- g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
- g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label));
+ g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1);
+ g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
+ g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
- gtk_notebook_insert_page_menu (notebook, child, tab_label, NULL, -1);
+ return gtk_notebook_insert_page_menu (notebook, child, tab_label, NULL, -1);
}
/**
@@ -4152,19 +4155,22 @@ gtk_notebook_append_page (GtkNotebook *notebook,
*
* Appends a page to @notebook, specifying the widget to use as the
* label in the popup menu.
+ *
+ * Return value: the index (starting from 0) of the appended
+ * page in the notebook, or -1 if function fails
**/
-void
+gint
gtk_notebook_append_page_menu (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
GtkWidget *menu_label)
{
- g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
- g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label));
- g_return_if_fail (menu_label == NULL || GTK_IS_WIDGET (menu_label));
+ g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1);
+ g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
+ g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
+ g_return_val_if_fail (menu_label == NULL || GTK_IS_WIDGET (menu_label), -1);
- gtk_notebook_insert_page_menu (notebook, child, tab_label, menu_label, -1);
+ return gtk_notebook_insert_page_menu (notebook, child, tab_label, menu_label, -1);
}
/**
@@ -4175,17 +4181,20 @@ gtk_notebook_append_page_menu (GtkNotebook *notebook,
* or %NULL to use the default label, 'page N'.
*
* Prepends a page to @notebook.
+ *
+ * Return value: the index (starting from 0) of the prepended
+ * page in the notebook, or -1 if function fails
**/
-void
+gint
gtk_notebook_prepend_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label)
{
- g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
- g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label));
+ g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1);
+ g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
+ g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
- gtk_notebook_insert_page_menu (notebook, child, tab_label, NULL, 0);
+ return gtk_notebook_insert_page_menu (notebook, child, tab_label, NULL, 0);
}
/**
@@ -4203,19 +4212,22 @@ gtk_notebook_prepend_page (GtkNotebook *notebook,
*
* Prepends a page to @notebook, specifying the widget to use as the
* label in the popup menu.
+ *
+ * Return value: the index (starting from 0) of the prepended
+ * page in the notebook, or -1 if function fails
**/
-void
+gint
gtk_notebook_prepend_page_menu (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
GtkWidget *menu_label)
{
- g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
- g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label));
- g_return_if_fail (menu_label == NULL || GTK_IS_WIDGET (menu_label));
+ g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1);
+ g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
+ g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
+ g_return_val_if_fail (menu_label == NULL || GTK_IS_WIDGET (menu_label), -1);
- gtk_notebook_insert_page_menu (notebook, child, tab_label, menu_label, 0);
+ return gtk_notebook_insert_page_menu (notebook, child, tab_label, menu_label, 0);
}
/**
@@ -4227,19 +4239,22 @@ gtk_notebook_prepend_page_menu (GtkNotebook *notebook,
* @position: the index (starting at 0) at which to insert the page,
* or -1 to append the page after all other pages.
*
- * Insert a page into @notebook at the given position
+ * Insert a page into @notebook at the given position.
+ *
+ * Return value: the index (starting from 0) of the inserted
+ * page in the notebook, or -1 if function fails
**/
-void
+gint
gtk_notebook_insert_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
gint position)
{
- g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
- g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label));
+ g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1);
+ g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
+ g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
- gtk_notebook_insert_page_menu (notebook, child, tab_label, NULL, position);
+ return gtk_notebook_insert_page_menu (notebook, child, tab_label, NULL, position);
}
@@ -4289,8 +4304,11 @@ gtk_notebook_mnemonic_activate_switch_page (GtkWidget *child,
*
* Insert a page into @notebook at the given position, specifying
* the widget to use as the label in the popup menu.
+ *
+ * Return value: the index (starting from 0) of the inserted
+ * page in the notebook, or -1 if function fails
**/
-void
+gint
gtk_notebook_insert_page_menu (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
@@ -4300,10 +4318,10 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
GtkNotebookPage *page;
gint nchildren;
- g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
- g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label));
- g_return_if_fail (menu_label == NULL || GTK_IS_WIDGET (menu_label));
+ g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1);
+ g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
+ g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
+ g_return_val_if_fail (menu_label == NULL || GTK_IS_WIDGET (menu_label), -1);
gtk_widget_freeze_child_notify (child);
@@ -4394,6 +4412,8 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
gtk_widget_child_notify (child, "menu_label");
gtk_widget_child_notify (child, "position");
gtk_widget_thaw_child_notify (child);
+
+ return position;
}
/**
diff --git a/gtk/gtknotebook.h b/gtk/gtknotebook.h
index 860c7c5b0..1879145ee 100644
--- a/gtk/gtknotebook.h
+++ b/gtk/gtknotebook.h
@@ -122,25 +122,25 @@ struct _GtkNotebookClass
GType gtk_notebook_get_type (void) G_GNUC_CONST;
GtkWidget * gtk_notebook_new (void);
-void gtk_notebook_append_page (GtkNotebook *notebook,
+gint gtk_notebook_append_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label);
-void gtk_notebook_append_page_menu (GtkNotebook *notebook,
+gint gtk_notebook_append_page_menu (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
GtkWidget *menu_label);
-void gtk_notebook_prepend_page (GtkNotebook *notebook,
+gint gtk_notebook_prepend_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label);
-void gtk_notebook_prepend_page_menu (GtkNotebook *notebook,
+gint gtk_notebook_prepend_page_menu (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
GtkWidget *menu_label);
-void gtk_notebook_insert_page (GtkNotebook *notebook,
+gint gtk_notebook_insert_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
gint position);
-void gtk_notebook_insert_page_menu (GtkNotebook *notebook,
+gint gtk_notebook_insert_page_menu (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
GtkWidget *menu_label,