Fix stupid error introduced last night that was making things decidedly

Sun Jun 24 11:29:35 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
	introduced last night that was making things decidedly not work.

	* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
	so that we have getter/setter pairing everywhere it makes
	sense. (#55767)

	* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
	Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
	deprecated compat macro. (#55516)

	* gtk/gtklabel.[ch]: Add functions
	gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
	gtk_label_set_label(), which mirror the property API for GtkLabel.
	Make gtk_label_get_attributes() only reflect the attributes
	set by gtk_label_set_attributes.

	* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
	from gtk_notebook_set_page().
This commit is contained in:
Owen Taylor
2001-06-24 15:34:48 +00:00
committed by Owen Taylor
parent 5a5580a8e7
commit cc223eeff6
75 changed files with 2054 additions and 125 deletions

View File

@ -614,7 +614,7 @@ gtk_notebook_set_property (GObject *object,
gtk_notebook_set_homogeneous_tabs (notebook, g_value_get_boolean (value));
break;
case PROP_PAGE:
gtk_notebook_set_page (notebook, g_value_get_int (value));
gtk_notebook_set_current_page (notebook, g_value_get_int (value));
break;
case PROP_TAB_POS:
gtk_notebook_set_tab_pos (notebook, g_value_get_enum (value));
@ -3956,7 +3956,7 @@ gtk_notebook_remove_page (GtkNotebook *notebook,
/* Public GtkNotebook Page Switch Methods :
* gtk_notebook_get_current_page
* gtk_notebook_page_num
* gtk_notebook_set_page
* gtk_notebook_set_current_page
* gtk_notebook_next_page
* gtk_notebook_prev_page
*/
@ -4044,7 +4044,7 @@ gtk_notebook_page_num (GtkNotebook *notebook,
}
/**
* gtk_notebook_set_page:
* gtk_notebook_set_current_page:
* @notebook: a #GtkNotebook
* @page_num: index of the page to switch to, starting from 0.
* If negative, or greater than the number of pages
@ -4053,8 +4053,8 @@ gtk_notebook_page_num (GtkNotebook *notebook,
* Switches to the page number @page_num.
**/
void
gtk_notebook_set_page (GtkNotebook *notebook,
gint page_num)
gtk_notebook_set_current_page (GtkNotebook *notebook,
gint page_num)
{
GList *list;
@ -4159,6 +4159,23 @@ gtk_notebook_set_show_border (GtkNotebook *notebook,
}
}
/**
* gtk_notebook_get_show_border:
* @notebook: a #GtkNotebook
*
* Returns whether a bevel will be drawn around the notebook pages. See
* gtk_notebook_set_show_border().
*
* Return value: %TRUE if the bevel is drawn
**/
gboolean
gtk_notebook_get_show_border (GtkNotebook *notebook)
{
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), FALSE);
return notebook->show_border;
}
/**
* gtk_notebook_set_show_tabs:
* @notebook: a #GtkNotebook
@ -4214,6 +4231,23 @@ gtk_notebook_set_show_tabs (GtkNotebook *notebook,
g_object_notify (G_OBJECT (notebook), "show_tabs");
}
/**
* gtk_notebook_get_show_tabs:
* @notebook: a #GtkNotebook
*
* Returns whether the tabs of the notebook are shown. See
* gtk_notebook_set_show_tabs().
*
* Return value: %TRUE if the tabs are shown
**/
gboolean
gtk_notebook_get_show_tabs (GtkNotebook *notebook)
{
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), FALSE);
return notebook->show_tabs;
}
/**
* gtk_notebook_set_tab_pos:
* @notebook:
@ -4238,6 +4272,23 @@ gtk_notebook_set_tab_pos (GtkNotebook *notebook,
g_object_notify (G_OBJECT (notebook), "tab_pos");
}
/**
* gtk_notebook_get_tab_pos:
* @notebook: a #GtkNotebook
*
* Gets the edge at which the tabs for switching pages in the
* notebook are drawn.
*
* Return value: the edge at which the tabs are drawn
**/
GtkPositionType
gtk_notebook_get_tab_pos (GtkNotebook *notebook)
{
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), GTK_POS_TOP);
return notebook->tab_pos;
}
/**
* gtk_notebook_set_homogeneous_tabs:
* @notebook: a #GtkNotebook
@ -4373,6 +4424,23 @@ gtk_notebook_set_scrollable (GtkNotebook *notebook,
}
}
/**
* gtk_notebook_get_scrollable:
* @notebook: a #GtkNotebook
*
* Returns whether the tab label area has arrows for scrolling. See
* gtk_notebook_set_scrollable().
*
* Return value: %TRUE if arrows for scrolling are present
**/
gboolean
gtk_notebook_get_scrollable (GtkNotebook *notebook)
{
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), FALSE);
return notebook->scrollable;
}
/* Public GtkNotebook Popup Menu Methods:
*
* gtk_notebook_popup_enable
@ -4560,16 +4628,46 @@ gtk_notebook_set_tab_label_text (GtkNotebook *notebook,
gtk_widget_child_notify (child, "tab_label");
}
/**
* gtk_notebook_get_tab_label_text:
* @notebook: a #GtkNotebook
* @child: a widget contained in a page of @notebook
*
* Retrieves the text of the tab label for the page containing
* @child.
*
* Returns value: the text of the tab label, or %NULL if the
* tab label widget is not a #GtkLabel. The
* string is owned by the widget and must not
* be freed.
**/
G_CONST_RETURN gchar *
gtk_notebook_get_tab_label_text (GtkNotebook *notebook,
GtkWidget *child)
{
GtkWidget *tab_label;
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), NULL);
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
tab_label = gtk_notebook_get_tab_label (notebook, child);
if (tab_label && GTK_IS_LABEL (tab_label))
return gtk_label_get_text (GTK_LABEL (tab_label));
else
return NULL;
}
/**
* gtk_notebook_get_menu_label:
* @notebook: a #GtkNotebook
* @child: the page
* @child: a widget contained in a page of @notebook
*
* Returns the menu label of the page containing @child. NULL is
* returned if @child is not in @notebook or NULL if it has the
* default menu label.
* Retrieves the menu label widget of the page containing @child.
*
* Return value: the menu label
* Return value: the menu label, or %NULL if the
* notebook page does not have a menu label other
* than the default (the tab label).
**/
GtkWidget*
gtk_notebook_get_menu_label (GtkNotebook *notebook,
@ -4663,6 +4761,37 @@ gtk_notebook_set_menu_label_text (GtkNotebook *notebook,
gtk_widget_child_notify (child, "menu_label");
}
/**
* gtk_notebook_get_menu_label_text:
* @notebook: a #GtkNotebook
* @child: the child widget of a page of the notebook.
*
* Retrieves the text of the menu label for the page containing
* @child.
*
* Returns value: the text of the tab label, or %NULL if the
* widget does not have a menu label other than
* the default menu label, or the menu label widget
* is not a #GtkLabel. The string is owned by
* the widget and must not be freed.
**/
G_CONST_RETURN gchar *
gtk_notebook_get_menu_label_text (GtkNotebook *notebook,
GtkWidget *child)
{
GtkWidget *menu_label;
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), NULL);
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
menu_label = gtk_notebook_get_menu_label (notebook, child);
if (menu_label && GTK_IS_LABEL (menu_label))
return gtk_label_get_text (GTK_LABEL (menu_label));
else
return NULL;
}
/* Helper function called when pages are reordered
*/
static void