1997-11-24 22:37:52 +00:00
|
|
|
/* GTK - The GIMP Toolkit
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
2000-07-26 11:33:08 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1997-11-24 22:37:52 +00:00
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2000-07-26 11:33:08 +00:00
|
|
|
* Lesser General Public License for more details.
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
2000-07-26 11:33:08 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
1998-04-13 02:02:47 +00:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
1999-02-24 07:37:18 +00:00
|
|
|
|
|
|
|
/*
|
2000-07-26 11:33:08 +00:00
|
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
1999-02-24 07:37:18 +00:00
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
* files for a list of changes. These files are distributed with
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
2004-03-06 03:38:59 +00:00
|
|
|
#include <config.h>
|
1997-11-24 22:37:52 +00:00
|
|
|
#include "gtknotebook.h"
|
1998-02-19 05:13:46 +00:00
|
|
|
#include "gtkmain.h"
|
|
|
|
#include "gtkmenu.h"
|
|
|
|
#include "gtkmenuitem.h"
|
|
|
|
#include "gtklabel.h"
|
|
|
|
#include <gdk/gdkkeysyms.h>
|
|
|
|
#include <stdio.h>
|
1998-12-18 01:32:33 +00:00
|
|
|
#include "gtkintl.h"
|
2001-11-17 23:28:51 +00:00
|
|
|
#include "gtkmarshalers.h"
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
#include "gtkbindings.h"
|
2005-03-22 02:14:55 +00:00
|
|
|
#include "gtkprivate.h"
|
2005-03-20 07:01:23 +00:00
|
|
|
#include "gtkalias.h"
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
|
2006-01-12 21:31:55 +00:00
|
|
|
#define ARROW_SIZE 12
|
|
|
|
#define ARROW_SPACING 0
|
|
|
|
#define SCROLL_DELAY_FACTOR 5
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
|
1998-01-06 21:59:43 +00:00
|
|
|
enum {
|
|
|
|
SWITCH_PAGE,
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
FOCUS_TAB,
|
|
|
|
SELECT_PAGE,
|
2001-11-16 22:20:00 +00:00
|
|
|
CHANGE_CURRENT_PAGE,
|
2002-02-08 01:10:25 +00:00
|
|
|
MOVE_FOCUS_OUT,
|
1998-01-06 21:59:43 +00:00
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
1998-02-19 05:13:46 +00:00
|
|
|
enum {
|
|
|
|
STEP_PREV,
|
|
|
|
STEP_NEXT
|
|
|
|
};
|
|
|
|
|
2003-05-22 22:34:31 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
ARROW_NONE,
|
|
|
|
ARROW_LEFT_BEFORE,
|
|
|
|
ARROW_RIGHT_BEFORE,
|
|
|
|
ARROW_LEFT_AFTER,
|
|
|
|
ARROW_RIGHT_AFTER
|
|
|
|
} GtkNotebookArrow;
|
|
|
|
|
|
|
|
#define ARROW_IS_LEFT(arrow) ((arrow) == ARROW_LEFT_BEFORE || (arrow) == ARROW_LEFT_AFTER)
|
|
|
|
#define ARROW_IS_BEFORE(arrow) ((arrow) == ARROW_LEFT_BEFORE || (arrow) == ARROW_RIGHT_BEFORE)
|
|
|
|
|
1998-07-16 20:23:12 +00:00
|
|
|
enum {
|
2001-05-17 16:22:06 +00:00
|
|
|
PROP_0,
|
|
|
|
PROP_TAB_POS,
|
|
|
|
PROP_SHOW_TABS,
|
|
|
|
PROP_SHOW_BORDER,
|
|
|
|
PROP_SCROLLABLE,
|
|
|
|
PROP_TAB_BORDER,
|
|
|
|
PROP_TAB_HBORDER,
|
|
|
|
PROP_TAB_VBORDER,
|
|
|
|
PROP_PAGE,
|
|
|
|
PROP_ENABLE_POPUP,
|
|
|
|
PROP_HOMOGENEOUS
|
1998-07-16 20:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
CHILD_PROP_0,
|
|
|
|
CHILD_PROP_TAB_LABEL,
|
|
|
|
CHILD_PROP_MENU_LABEL,
|
|
|
|
CHILD_PROP_POSITION,
|
|
|
|
CHILD_PROP_TAB_EXPAND,
|
|
|
|
CHILD_PROP_TAB_FILL,
|
|
|
|
CHILD_PROP_TAB_PACK
|
1998-07-16 20:23:12 +00:00
|
|
|
};
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
#define GTK_NOTEBOOK_PAGE(_glist_) ((GtkNotebookPage *)((GList *)(_glist_))->data)
|
|
|
|
|
|
|
|
struct _GtkNotebookPage
|
|
|
|
{
|
|
|
|
GtkWidget *child;
|
|
|
|
GtkWidget *tab_label;
|
|
|
|
GtkWidget *menu_label;
|
2002-01-15 17:40:44 +00:00
|
|
|
GtkWidget *last_focus_child; /* Last descendant of the page that had focus */
|
2000-12-11 17:47:24 +00:00
|
|
|
|
|
|
|
guint default_menu : 1; /* If true, we create the menu label ourself */
|
|
|
|
guint default_tab : 1; /* If true, we create the tab label ourself */
|
|
|
|
guint expand : 1;
|
|
|
|
guint fill : 1;
|
|
|
|
guint pack : 1;
|
|
|
|
|
|
|
|
GtkRequisition requisition;
|
|
|
|
GtkAllocation allocation;
|
2001-03-21 18:58:28 +00:00
|
|
|
|
2006-02-20 23:11:55 +00:00
|
|
|
gulong mnemonic_activate_signal;
|
|
|
|
gulong notify_visible_handler;
|
2000-12-11 17:47:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef G_DISABLE_CHECKS
|
|
|
|
#define CHECK_FIND_CHILD(notebook, child) \
|
2001-07-31 21:23:19 +00:00
|
|
|
gtk_notebook_find_child (notebook, child, G_STRLOC)
|
2000-12-11 17:47:24 +00:00
|
|
|
#else
|
|
|
|
#define CHECK_FIND_CHILD(notebook, child) \
|
2001-07-31 21:23:19 +00:00
|
|
|
gtk_notebook_find_child (notebook, child, NULL)
|
2000-12-11 17:47:24 +00:00
|
|
|
#endif
|
|
|
|
|
2000-09-07 18:07:59 +00:00
|
|
|
/*** GtkNotebook Methods ***/
|
1998-02-19 05:13:46 +00:00
|
|
|
static void gtk_notebook_class_init (GtkNotebookClass *klass);
|
|
|
|
static void gtk_notebook_init (GtkNotebook *notebook);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2002-02-08 01:10:25 +00:00
|
|
|
static gboolean gtk_notebook_select_page (GtkNotebook *notebook,
|
|
|
|
gboolean move_focus);
|
|
|
|
static gboolean gtk_notebook_focus_tab (GtkNotebook *notebook,
|
|
|
|
GtkNotebookTab type);
|
|
|
|
static void gtk_notebook_change_current_page (GtkNotebook *notebook,
|
|
|
|
gint offset);
|
|
|
|
static void gtk_notebook_move_focus_out (GtkNotebook *notebook,
|
|
|
|
GtkDirectionType direction_type);
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
|
2000-09-07 18:07:59 +00:00
|
|
|
/*** GtkObject Methods ***/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void gtk_notebook_destroy (GtkObject *object);
|
2001-05-17 16:22:06 +00:00
|
|
|
static void gtk_notebook_set_property (GObject *object,
|
|
|
|
guint prop_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
static void gtk_notebook_get_property (GObject *object,
|
|
|
|
guint prop_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2000-09-07 18:07:59 +00:00
|
|
|
/*** GtkWidget Methods ***/
|
1998-02-19 05:13:46 +00:00
|
|
|
static void gtk_notebook_map (GtkWidget *widget);
|
|
|
|
static void gtk_notebook_unmap (GtkWidget *widget);
|
|
|
|
static void gtk_notebook_realize (GtkWidget *widget);
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
static void gtk_notebook_unrealize (GtkWidget *widget);
|
1998-02-19 05:13:46 +00:00
|
|
|
static void gtk_notebook_size_request (GtkWidget *widget,
|
|
|
|
GtkRequisition *requisition);
|
|
|
|
static void gtk_notebook_size_allocate (GtkWidget *widget,
|
|
|
|
GtkAllocation *allocation);
|
|
|
|
static gint gtk_notebook_expose (GtkWidget *widget,
|
|
|
|
GdkEventExpose *event);
|
2004-07-03 01:51:17 +00:00
|
|
|
static gboolean gtk_notebook_scroll (GtkWidget *widget,
|
|
|
|
GdkEventScroll *event);
|
1998-02-19 05:13:46 +00:00
|
|
|
static gint gtk_notebook_button_press (GtkWidget *widget,
|
|
|
|
GdkEventButton *event);
|
|
|
|
static gint gtk_notebook_button_release (GtkWidget *widget,
|
|
|
|
GdkEventButton *event);
|
2006-02-22 16:35:09 +00:00
|
|
|
static gboolean gtk_notebook_popup_menu (GtkWidget *widget);
|
1998-02-19 05:13:46 +00:00
|
|
|
static gint gtk_notebook_enter_notify (GtkWidget *widget,
|
|
|
|
GdkEventCrossing *event);
|
|
|
|
static gint gtk_notebook_leave_notify (GtkWidget *widget,
|
|
|
|
GdkEventCrossing *event);
|
|
|
|
static gint gtk_notebook_motion_notify (GtkWidget *widget,
|
|
|
|
GdkEventMotion *event);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static gint gtk_notebook_focus_in (GtkWidget *widget,
|
|
|
|
GdkEventFocus *event);
|
2003-07-19 09:54:30 +00:00
|
|
|
static gint gtk_notebook_focus_out (GtkWidget *widget,
|
|
|
|
GdkEventFocus *event);
|
2003-03-29 00:11:32 +00:00
|
|
|
static void gtk_notebook_grab_notify (GtkWidget *widget,
|
|
|
|
gboolean was_grabbed);
|
|
|
|
static void gtk_notebook_state_changed (GtkWidget *widget,
|
|
|
|
GtkStateType previous_state);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void gtk_notebook_draw_focus (GtkWidget *widget);
|
2001-06-08 18:09:34 +00:00
|
|
|
static gint gtk_notebook_focus (GtkWidget *widget,
|
|
|
|
GtkDirectionType direction);
|
2003-05-22 22:34:31 +00:00
|
|
|
static void gtk_notebook_style_set (GtkWidget *widget,
|
|
|
|
GtkStyle *previous);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2000-09-07 18:07:59 +00:00
|
|
|
/*** GtkContainer Methods ***/
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
static void gtk_notebook_set_child_property (GtkContainer *container,
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkWidget *child,
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
static void gtk_notebook_get_child_property (GtkContainer *container,
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkWidget *child,
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec);
|
1998-02-19 05:13:46 +00:00
|
|
|
static void gtk_notebook_add (GtkContainer *container,
|
|
|
|
GtkWidget *widget);
|
|
|
|
static void gtk_notebook_remove (GtkContainer *container,
|
|
|
|
GtkWidget *widget);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void gtk_notebook_set_focus_child (GtkContainer *container,
|
|
|
|
GtkWidget *child);
|
2002-10-05 23:15:39 +00:00
|
|
|
static GType gtk_notebook_child_type (GtkContainer *container);
|
GTK_MENU_DIR_CHILD: check for the existance of
Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current):
GTK_MENU_DIR_CHILD: check for the existance of
menu_shell->active_menu_item before accessing its child.
GTK_MENU_DIR_PREV:
GTK_MENU_DIR_NEXT: if we haven't had an active item and still
don't, make a default selection.
Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_propagate_state): iterate
the children with _forall for sensitivity changes and with
_foreach on pure state changes. this fixes a lot of the
old inclusions of internal widgets into _foreach calls.
* gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall
do the work. don't walk the subtrees of first level children.
* gtk/gtktreeitem.c: provide a _forall implementation,
which walks the subtrees as well for include_internals.
* gtk/gtkmenuitem.c: provide a _forall implementation, which walks
the submenus as well for include_internals.
* gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and
implemented gtk_scrolled_window_forall, which will iterate over
the viewport and the scrollbars for gtk_container_forall or
iterate over the viewports children for gtk_container_foreach.
* gtk/gtktoolbar.c:
* gtk/gtktable.c:
* gtk/gtkpaned.c:
* gtk/gtkpacker.c:
* gtk/gtkmenushell.c:
* gtk/gtklist.c:
* gtk/gtkfixed.c:
* gtk/gtkclist.c:
* gtk/gtkbox.c:
* gtk/gtkbin.c:
* gtk/gtknotebook.c:
removed the old gtk_*_foreach functions and provided gtk_*_forall.
* gtk/gtknotebook.c:
(gtk_notebook_real_switch_page): expose tabs.
(gtk_notebook_page_num): new function to return the page number
of a distinct child.
(gtk_notebook_focus): minor fixups. foxus handling is still screwed
under some circumstances.
* gtk/gtktreeitem.c:
(gtk_real_tree_item_select):
(gtk_real_tree_item_deselect): major fixes.
some general fixups wrt queue_redraw, and tree items not being
NO_WINDOW widgets.
* gtk/gtklistitem.c:
(gtk_real_list_item_select):
(gtk_real_list_item_deselect):
(gtk_real_list_item_toggle):
removed unneccessary queue_redraw calls.
Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c: allow optionmenus to have the focus and
automatically popup the menu on space bar.
Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class
method), which acts similar to gtk_container_foreach(), but iterates
over internal children. the GtkContainer::foreach signal vanished in
favour of a new class method ->forall() that optionally includes
internal widgets.
* gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation
but a _forall implementation, since all child widgets we have are
internal ones.
(column_button_create): set the parent window prior
to gtk_widget_set_parent().
* gtk/gtkwidget.c:
exchanged all calls to gtk_container_foreach() with
gtk_container_forall().
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through
the GtkWidget::composite_child argument. to have a widget created
with the flag initially, two new functions got added to wrap a widgets
creation:
gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag().
Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c: exported gtk_tooltips_create_window() as
gtk_tooltips_force_window(), so tooltips->tip_window can be accessed
prior to the first tip being set.
don't put an extra reference on the window, since it is a toplevel,
it wont get destroyed from anywhere else.
* overall macro and GtkType fixups.
1998-09-03 02:38:53 +00:00
|
|
|
static void gtk_notebook_forall (GtkContainer *container,
|
|
|
|
gboolean include_internals,
|
1998-02-19 05:13:46 +00:00
|
|
|
GtkCallback callback,
|
|
|
|
gpointer callback_data);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2000-09-07 18:07:59 +00:00
|
|
|
/*** GtkNotebook Private Functions ***/
|
2000-12-11 17:47:24 +00:00
|
|
|
static void gtk_notebook_redraw_tabs (GtkNotebook *notebook);
|
|
|
|
static void gtk_notebook_redraw_arrows (GtkNotebook *notebook);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void gtk_notebook_real_remove (GtkNotebook *notebook,
|
2002-12-10 12:02:43 +00:00
|
|
|
GList *list,
|
|
|
|
gboolean destroying);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void gtk_notebook_update_labels (GtkNotebook *notebook);
|
|
|
|
static gint gtk_notebook_timer (GtkNotebook *notebook);
|
|
|
|
static gint gtk_notebook_page_compare (gconstpointer a,
|
|
|
|
gconstpointer b);
|
2001-07-31 21:23:19 +00:00
|
|
|
static GList* gtk_notebook_find_child (GtkNotebook *notebook,
|
2000-12-11 17:47:24 +00:00
|
|
|
GtkWidget *child,
|
|
|
|
const gchar *function);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static gint gtk_notebook_real_page_position (GtkNotebook *notebook,
|
|
|
|
GList *list);
|
|
|
|
static GList * gtk_notebook_search_page (GtkNotebook *notebook,
|
|
|
|
GList *list,
|
|
|
|
gint direction,
|
|
|
|
gboolean find_visible);
|
|
|
|
|
2000-09-07 18:07:59 +00:00
|
|
|
/*** GtkNotebook Drawing Functions ***/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void gtk_notebook_paint (GtkWidget *widget,
|
|
|
|
GdkRectangle *area);
|
1998-02-19 05:13:46 +00:00
|
|
|
static void gtk_notebook_draw_tab (GtkNotebook *notebook,
|
|
|
|
GtkNotebookPage *page,
|
|
|
|
GdkRectangle *area);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void gtk_notebook_draw_arrow (GtkNotebook *notebook,
|
2003-05-30 16:25:55 +00:00
|
|
|
GtkNotebookArrow arrow);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2000-09-07 18:07:59 +00:00
|
|
|
/*** GtkNotebook Size Allocate Functions ***/
|
2000-12-11 17:47:24 +00:00
|
|
|
static void gtk_notebook_pages_allocate (GtkNotebook *notebook);
|
1998-02-19 05:13:46 +00:00
|
|
|
static void gtk_notebook_page_allocate (GtkNotebook *notebook,
|
|
|
|
GtkNotebookPage *page,
|
|
|
|
GtkAllocation *allocation);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void gtk_notebook_calc_tabs (GtkNotebook *notebook,
|
|
|
|
GList *start,
|
1998-02-19 05:13:46 +00:00
|
|
|
GList **end,
|
|
|
|
gint *tab_space,
|
|
|
|
guint direction);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2000-09-07 18:07:59 +00:00
|
|
|
/*** GtkNotebook Page Switch Methods ***/
|
GTK_MENU_DIR_CHILD: check for the existance of
Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current):
GTK_MENU_DIR_CHILD: check for the existance of
menu_shell->active_menu_item before accessing its child.
GTK_MENU_DIR_PREV:
GTK_MENU_DIR_NEXT: if we haven't had an active item and still
don't, make a default selection.
Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_propagate_state): iterate
the children with _forall for sensitivity changes and with
_foreach on pure state changes. this fixes a lot of the
old inclusions of internal widgets into _foreach calls.
* gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall
do the work. don't walk the subtrees of first level children.
* gtk/gtktreeitem.c: provide a _forall implementation,
which walks the subtrees as well for include_internals.
* gtk/gtkmenuitem.c: provide a _forall implementation, which walks
the submenus as well for include_internals.
* gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and
implemented gtk_scrolled_window_forall, which will iterate over
the viewport and the scrollbars for gtk_container_forall or
iterate over the viewports children for gtk_container_foreach.
* gtk/gtktoolbar.c:
* gtk/gtktable.c:
* gtk/gtkpaned.c:
* gtk/gtkpacker.c:
* gtk/gtkmenushell.c:
* gtk/gtklist.c:
* gtk/gtkfixed.c:
* gtk/gtkclist.c:
* gtk/gtkbox.c:
* gtk/gtkbin.c:
* gtk/gtknotebook.c:
removed the old gtk_*_foreach functions and provided gtk_*_forall.
* gtk/gtknotebook.c:
(gtk_notebook_real_switch_page): expose tabs.
(gtk_notebook_page_num): new function to return the page number
of a distinct child.
(gtk_notebook_focus): minor fixups. foxus handling is still screwed
under some circumstances.
* gtk/gtktreeitem.c:
(gtk_real_tree_item_select):
(gtk_real_tree_item_deselect): major fixes.
some general fixups wrt queue_redraw, and tree items not being
NO_WINDOW widgets.
* gtk/gtklistitem.c:
(gtk_real_list_item_select):
(gtk_real_list_item_deselect):
(gtk_real_list_item_toggle):
removed unneccessary queue_redraw calls.
Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c: allow optionmenus to have the focus and
automatically popup the menu on space bar.
Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class
method), which acts similar to gtk_container_foreach(), but iterates
over internal children. the GtkContainer::foreach signal vanished in
favour of a new class method ->forall() that optionally includes
internal widgets.
* gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation
but a _forall implementation, since all child widgets we have are
internal ones.
(column_button_create): set the parent window prior
to gtk_widget_set_parent().
* gtk/gtkwidget.c:
exchanged all calls to gtk_container_foreach() with
gtk_container_forall().
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through
the GtkWidget::composite_child argument. to have a widget created
with the flag initially, two new functions got added to wrap a widgets
creation:
gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag().
Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c: exported gtk_tooltips_create_window() as
gtk_tooltips_force_window(), so tooltips->tip_window can be accessed
prior to the first tip being set.
don't put an extra reference on the window, since it is a toplevel,
it wont get destroyed from anywhere else.
* overall macro and GtkType fixups.
1998-09-03 02:38:53 +00:00
|
|
|
static void gtk_notebook_real_switch_page (GtkNotebook *notebook,
|
1998-06-10 21:48:21 +00:00
|
|
|
GtkNotebookPage *page,
|
1998-07-16 20:23:12 +00:00
|
|
|
guint page_num);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2000-09-07 18:07:59 +00:00
|
|
|
/*** GtkNotebook Page Switch Functions ***/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void gtk_notebook_switch_page (GtkNotebook *notebook,
|
|
|
|
GtkNotebookPage *page,
|
1998-11-29 22:00:28 +00:00
|
|
|
gint page_num);
|
2000-12-11 17:47:24 +00:00
|
|
|
static gint gtk_notebook_page_select (GtkNotebook *notebook,
|
|
|
|
gboolean move_focus);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void gtk_notebook_switch_focus_tab (GtkNotebook *notebook,
|
|
|
|
GList *new_child);
|
1998-02-19 05:13:46 +00:00
|
|
|
static void gtk_notebook_menu_switch_page (GtkWidget *widget,
|
|
|
|
GtkNotebookPage *page);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2000-09-07 18:07:59 +00:00
|
|
|
/*** GtkNotebook Menu Functions ***/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void gtk_notebook_menu_item_create (GtkNotebook *notebook,
|
|
|
|
GList *list);
|
|
|
|
static void gtk_notebook_menu_label_unparent (GtkWidget *widget,
|
|
|
|
gpointer data);
|
1998-02-19 05:13:46 +00:00
|
|
|
static void gtk_notebook_menu_detacher (GtkWidget *widget,
|
|
|
|
GtkMenu *menu);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
/*** GtkNotebook Private Setters ***/
|
|
|
|
static void gtk_notebook_set_homogeneous_tabs_internal (GtkNotebook *notebook,
|
|
|
|
gboolean homogeneous);
|
|
|
|
static void gtk_notebook_set_tab_border_internal (GtkNotebook *notebook,
|
|
|
|
guint border_width);
|
|
|
|
static void gtk_notebook_set_tab_hborder_internal (GtkNotebook *notebook,
|
|
|
|
guint tab_hborder);
|
|
|
|
static void gtk_notebook_set_tab_vborder_internal (GtkNotebook *notebook,
|
|
|
|
guint tab_vborder);
|
|
|
|
|
2002-02-08 01:10:25 +00:00
|
|
|
static gboolean focus_tabs_in (GtkNotebook *notebook);
|
|
|
|
static gboolean focus_child_in (GtkNotebook *notebook,
|
|
|
|
GtkDirectionType direction);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2005-03-22 17:36:41 +00:00
|
|
|
static void stop_scrolling (GtkNotebook *notebook);
|
|
|
|
|
|
|
|
|
1998-01-06 21:59:43 +00:00
|
|
|
static GtkContainerClass *parent_class = NULL;
|
1998-03-09 15:16:28 +00:00
|
|
|
static guint notebook_signals[LAST_SIGNAL] = { 0 };
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2002-10-05 23:15:39 +00:00
|
|
|
GType
|
1998-05-03 22:41:32 +00:00
|
|
|
gtk_notebook_get_type (void)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
2002-10-05 23:15:39 +00:00
|
|
|
static GType notebook_type = 0;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
if (!notebook_type)
|
|
|
|
{
|
2002-10-05 23:15:39 +00:00
|
|
|
static const GTypeInfo notebook_info =
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
sizeof (GtkNotebookClass),
|
2002-10-05 23:15:39 +00:00
|
|
|
NULL, /* base_init */
|
|
|
|
NULL, /* base_finalize */
|
|
|
|
(GClassInitFunc) gtk_notebook_class_init,
|
|
|
|
NULL, /* class_finalize */
|
|
|
|
NULL, /* class_data */
|
|
|
|
sizeof (GtkNotebook),
|
|
|
|
0, /* n_preallocs */
|
|
|
|
(GInstanceInitFunc) gtk_notebook_init,
|
1997-11-24 22:37:52 +00:00
|
|
|
};
|
|
|
|
|
2005-09-01 05:11:46 +00:00
|
|
|
notebook_type = g_type_register_static (GTK_TYPE_CONTAINER, I_("GtkNotebook"),
|
2002-10-05 23:15:39 +00:00
|
|
|
¬ebook_info, 0);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return notebook_type;
|
|
|
|
}
|
|
|
|
|
2002-02-08 01:10:25 +00:00
|
|
|
static void
|
|
|
|
add_tab_bindings (GtkBindingSet *binding_set,
|
|
|
|
GdkModifierType modifiers,
|
|
|
|
GtkDirectionType direction)
|
|
|
|
{
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_Tab, modifiers,
|
|
|
|
"move_focus_out", 1,
|
|
|
|
GTK_TYPE_DIRECTION_TYPE, direction);
|
|
|
|
gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, modifiers,
|
|
|
|
"move_focus_out", 1,
|
|
|
|
GTK_TYPE_DIRECTION_TYPE, direction);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
add_arrow_bindings (GtkBindingSet *binding_set,
|
|
|
|
guint keysym,
|
|
|
|
GtkDirectionType direction)
|
|
|
|
{
|
|
|
|
guint keypad_keysym = keysym - GDK_Left + GDK_KP_Left;
|
|
|
|
|
|
|
|
gtk_binding_entry_add_signal (binding_set, keysym, GDK_CONTROL_MASK,
|
|
|
|
"move_focus_out", 1,
|
|
|
|
GTK_TYPE_DIRECTION_TYPE, direction);
|
|
|
|
gtk_binding_entry_add_signal (binding_set, keypad_keysym, GDK_CONTROL_MASK,
|
|
|
|
"move_focus_out", 1,
|
|
|
|
GTK_TYPE_DIRECTION_TYPE, direction);
|
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_class_init (GtkNotebookClass *class)
|
|
|
|
{
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
|
|
|
|
GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
|
|
|
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
|
|
|
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (class);
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
GtkBindingSet *binding_set;
|
|
|
|
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
parent_class = g_type_class_peek_parent (class);
|
1998-01-06 21:59:43 +00:00
|
|
|
|
2001-05-17 16:22:06 +00:00
|
|
|
gobject_class->set_property = gtk_notebook_set_property;
|
|
|
|
gobject_class->get_property = gtk_notebook_get_property;
|
1998-02-19 05:13:46 +00:00
|
|
|
object_class->destroy = gtk_notebook_destroy;
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
widget_class->map = gtk_notebook_map;
|
|
|
|
widget_class->unmap = gtk_notebook_unmap;
|
|
|
|
widget_class->realize = gtk_notebook_realize;
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
widget_class->unrealize = gtk_notebook_unrealize;
|
1997-11-24 22:37:52 +00:00
|
|
|
widget_class->size_request = gtk_notebook_size_request;
|
|
|
|
widget_class->size_allocate = gtk_notebook_size_allocate;
|
|
|
|
widget_class->expose_event = gtk_notebook_expose;
|
2004-07-03 01:51:17 +00:00
|
|
|
widget_class->scroll_event = gtk_notebook_scroll;
|
1997-11-24 22:37:52 +00:00
|
|
|
widget_class->button_press_event = gtk_notebook_button_press;
|
1998-02-19 05:13:46 +00:00
|
|
|
widget_class->button_release_event = gtk_notebook_button_release;
|
2006-02-22 16:35:09 +00:00
|
|
|
widget_class->popup_menu = gtk_notebook_popup_menu;
|
1998-02-19 05:13:46 +00:00
|
|
|
widget_class->enter_notify_event = gtk_notebook_enter_notify;
|
|
|
|
widget_class->leave_notify_event = gtk_notebook_leave_notify;
|
|
|
|
widget_class->motion_notify_event = gtk_notebook_motion_notify;
|
2003-03-29 00:11:32 +00:00
|
|
|
widget_class->grab_notify = gtk_notebook_grab_notify;
|
|
|
|
widget_class->state_changed = gtk_notebook_state_changed;
|
1998-02-19 05:13:46 +00:00
|
|
|
widget_class->focus_in_event = gtk_notebook_focus_in;
|
2003-07-19 09:54:30 +00:00
|
|
|
widget_class->focus_out_event = gtk_notebook_focus_out;
|
2001-06-08 18:09:34 +00:00
|
|
|
widget_class->focus = gtk_notebook_focus;
|
2003-05-22 22:34:31 +00:00
|
|
|
widget_class->style_set = gtk_notebook_style_set;
|
2001-06-08 18:09:34 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
container_class->add = gtk_notebook_add;
|
|
|
|
container_class->remove = gtk_notebook_remove;
|
GTK_MENU_DIR_CHILD: check for the existance of
Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current):
GTK_MENU_DIR_CHILD: check for the existance of
menu_shell->active_menu_item before accessing its child.
GTK_MENU_DIR_PREV:
GTK_MENU_DIR_NEXT: if we haven't had an active item and still
don't, make a default selection.
Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_propagate_state): iterate
the children with _forall for sensitivity changes and with
_foreach on pure state changes. this fixes a lot of the
old inclusions of internal widgets into _foreach calls.
* gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall
do the work. don't walk the subtrees of first level children.
* gtk/gtktreeitem.c: provide a _forall implementation,
which walks the subtrees as well for include_internals.
* gtk/gtkmenuitem.c: provide a _forall implementation, which walks
the submenus as well for include_internals.
* gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and
implemented gtk_scrolled_window_forall, which will iterate over
the viewport and the scrollbars for gtk_container_forall or
iterate over the viewports children for gtk_container_foreach.
* gtk/gtktoolbar.c:
* gtk/gtktable.c:
* gtk/gtkpaned.c:
* gtk/gtkpacker.c:
* gtk/gtkmenushell.c:
* gtk/gtklist.c:
* gtk/gtkfixed.c:
* gtk/gtkclist.c:
* gtk/gtkbox.c:
* gtk/gtkbin.c:
* gtk/gtknotebook.c:
removed the old gtk_*_foreach functions and provided gtk_*_forall.
* gtk/gtknotebook.c:
(gtk_notebook_real_switch_page): expose tabs.
(gtk_notebook_page_num): new function to return the page number
of a distinct child.
(gtk_notebook_focus): minor fixups. foxus handling is still screwed
under some circumstances.
* gtk/gtktreeitem.c:
(gtk_real_tree_item_select):
(gtk_real_tree_item_deselect): major fixes.
some general fixups wrt queue_redraw, and tree items not being
NO_WINDOW widgets.
* gtk/gtklistitem.c:
(gtk_real_list_item_select):
(gtk_real_list_item_deselect):
(gtk_real_list_item_toggle):
removed unneccessary queue_redraw calls.
Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c: allow optionmenus to have the focus and
automatically popup the menu on space bar.
Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class
method), which acts similar to gtk_container_foreach(), but iterates
over internal children. the GtkContainer::foreach signal vanished in
favour of a new class method ->forall() that optionally includes
internal widgets.
* gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation
but a _forall implementation, since all child widgets we have are
internal ones.
(column_button_create): set the parent window prior
to gtk_widget_set_parent().
* gtk/gtkwidget.c:
exchanged all calls to gtk_container_foreach() with
gtk_container_forall().
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through
the GtkWidget::composite_child argument. to have a widget created
with the flag initially, two new functions got added to wrap a widgets
creation:
gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag().
Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c: exported gtk_tooltips_create_window() as
gtk_tooltips_force_window(), so tooltips->tip_window can be accessed
prior to the first tip being set.
don't put an extra reference on the window, since it is a toplevel,
it wont get destroyed from anywhere else.
* overall macro and GtkType fixups.
1998-09-03 02:38:53 +00:00
|
|
|
container_class->forall = gtk_notebook_forall;
|
1998-06-10 21:48:21 +00:00
|
|
|
container_class->set_focus_child = gtk_notebook_set_focus_child;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
container_class->get_child_property = gtk_notebook_get_child_property;
|
|
|
|
container_class->set_child_property = gtk_notebook_set_child_property;
|
1998-06-16 05:20:05 +00:00
|
|
|
container_class->child_type = gtk_notebook_child_type;
|
1998-01-06 21:59:43 +00:00
|
|
|
|
GTK_MENU_DIR_CHILD: check for the existance of
Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current):
GTK_MENU_DIR_CHILD: check for the existance of
menu_shell->active_menu_item before accessing its child.
GTK_MENU_DIR_PREV:
GTK_MENU_DIR_NEXT: if we haven't had an active item and still
don't, make a default selection.
Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_propagate_state): iterate
the children with _forall for sensitivity changes and with
_foreach on pure state changes. this fixes a lot of the
old inclusions of internal widgets into _foreach calls.
* gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall
do the work. don't walk the subtrees of first level children.
* gtk/gtktreeitem.c: provide a _forall implementation,
which walks the subtrees as well for include_internals.
* gtk/gtkmenuitem.c: provide a _forall implementation, which walks
the submenus as well for include_internals.
* gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and
implemented gtk_scrolled_window_forall, which will iterate over
the viewport and the scrollbars for gtk_container_forall or
iterate over the viewports children for gtk_container_foreach.
* gtk/gtktoolbar.c:
* gtk/gtktable.c:
* gtk/gtkpaned.c:
* gtk/gtkpacker.c:
* gtk/gtkmenushell.c:
* gtk/gtklist.c:
* gtk/gtkfixed.c:
* gtk/gtkclist.c:
* gtk/gtkbox.c:
* gtk/gtkbin.c:
* gtk/gtknotebook.c:
removed the old gtk_*_foreach functions and provided gtk_*_forall.
* gtk/gtknotebook.c:
(gtk_notebook_real_switch_page): expose tabs.
(gtk_notebook_page_num): new function to return the page number
of a distinct child.
(gtk_notebook_focus): minor fixups. foxus handling is still screwed
under some circumstances.
* gtk/gtktreeitem.c:
(gtk_real_tree_item_select):
(gtk_real_tree_item_deselect): major fixes.
some general fixups wrt queue_redraw, and tree items not being
NO_WINDOW widgets.
* gtk/gtklistitem.c:
(gtk_real_list_item_select):
(gtk_real_list_item_deselect):
(gtk_real_list_item_toggle):
removed unneccessary queue_redraw calls.
Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c: allow optionmenus to have the focus and
automatically popup the menu on space bar.
Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class
method), which acts similar to gtk_container_foreach(), but iterates
over internal children. the GtkContainer::foreach signal vanished in
favour of a new class method ->forall() that optionally includes
internal widgets.
* gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation
but a _forall implementation, since all child widgets we have are
internal ones.
(column_button_create): set the parent window prior
to gtk_widget_set_parent().
* gtk/gtkwidget.c:
exchanged all calls to gtk_container_foreach() with
gtk_container_forall().
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through
the GtkWidget::composite_child argument. to have a widget created
with the flag initially, two new functions got added to wrap a widgets
creation:
gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag().
Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c: exported gtk_tooltips_create_window() as
gtk_tooltips_force_window(), so tooltips->tip_window can be accessed
prior to the first tip being set.
don't put an extra reference on the window, since it is a toplevel,
it wont get destroyed from anywhere else.
* overall macro and GtkType fixups.
1998-09-03 02:38:53 +00:00
|
|
|
class->switch_page = gtk_notebook_real_switch_page;
|
doh, this was broken beyond believe.
Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
* gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
* gtk/gtkbox.c: change property types from (u)long to (u)int for
::position and ::padding.
* gtk/gtkcontainer.c: make ::border_width an INT property.
* gtk/gtkpacker.c: make ::position an INT property.
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
guard against NULL h/v scrollbars, since this is used at construction
time.
* gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
internal gtk_clist_constructor().
* gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
gtk_ctree_constructor().
* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
* docs/reference/Makefile.am: fun stuff, disabled docs generation
again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
* gtk/gtkwidget.[hc]:
removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
and gtk_widget_get().
(gtk_widget_new): use g_object_new_valist().
(gtk_widget_set): use g_object_set_valist().
* gtk/gtkobject.[hc]:
removed gtk_object_arg_get_info(), gtk_object_getv(),
gtk_object_query_args(), gtk_object_newv(),
gtk_object_class_add_signals(),
gtk_object_class_user_signal_new(),
gtk_object_class_user_signal_newv(),
gtk_object_arg_set(), gtk_object_arg_get(),
gtk_object_args_collect(),
gtk_object_default_construct(),
gtk_object_constructed(),
GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
removed nsignals, signals and n_args members from GtkObjectClass.
(gtk_object_new): use g_object_new_valist().
(gtk_object_set): use g_object_set_valist().
(gtk_object_get): use g_object_get_valist().
* gtk/gtkcompat.h: define gtk_object_default_construct().
* gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
g_object_new().
* gtk/*.c: removed gtk_object_class_add_signals() from class_init()
fucntions, cleaned up method assignments (make sure your structures
are setup properly before calling out). removed all GTK_CONSTRUCTED
hacks ;)
2000-12-13 01:34:41 +00:00
|
|
|
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
class->focus_tab = gtk_notebook_focus_tab;
|
|
|
|
class->select_page = gtk_notebook_select_page;
|
2001-11-16 22:20:00 +00:00
|
|
|
class->change_current_page = gtk_notebook_change_current_page;
|
2002-02-08 01:10:25 +00:00
|
|
|
class->move_focus_out = gtk_notebook_move_focus_out;
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
|
2001-05-17 16:22:06 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_PAGE,
|
|
|
|
g_param_spec_int ("page",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Page"),
|
|
|
|
P_("The index of the current page"),
|
2001-05-17 16:22:06 +00:00
|
|
|
0,
|
|
|
|
G_MAXINT,
|
|
|
|
0,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_TAB_POS,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_enum ("tab-pos",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Tab Position"),
|
|
|
|
P_("Which side of the notebook holds the tabs"),
|
2001-05-17 16:22:06 +00:00
|
|
|
GTK_TYPE_POSITION_TYPE,
|
|
|
|
GTK_POS_TOP,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_TAB_BORDER,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_uint ("tab-border",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Tab Border"),
|
|
|
|
P_("Width of the border around the tab labels"),
|
2001-05-17 16:22:06 +00:00
|
|
|
0,
|
|
|
|
G_MAXUINT,
|
|
|
|
2,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_WRITABLE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_TAB_HBORDER,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_uint ("tab-hborder",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Horizontal Tab Border"),
|
|
|
|
P_("Width of the horizontal border of tab labels"),
|
2001-05-17 16:22:06 +00:00
|
|
|
0,
|
|
|
|
G_MAXUINT,
|
|
|
|
2,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_TAB_VBORDER,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_uint ("tab-vborder",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Vertical Tab Border"),
|
|
|
|
P_("Width of the vertical border of tab labels"),
|
2001-05-17 16:22:06 +00:00
|
|
|
0,
|
|
|
|
G_MAXUINT,
|
|
|
|
2,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_SHOW_TABS,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_boolean ("show-tabs",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Show Tabs"),
|
|
|
|
P_("Whether tabs should be shown or not"),
|
2001-05-17 16:22:06 +00:00
|
|
|
TRUE,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_SHOW_BORDER,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_boolean ("show-border",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Show Border"),
|
|
|
|
P_("Whether the border should be shown or not"),
|
2001-05-17 16:22:06 +00:00
|
|
|
TRUE,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_SCROLLABLE,
|
|
|
|
g_param_spec_boolean ("scrollable",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Scrollable"),
|
|
|
|
P_("If TRUE, scroll arrows are added if there are too many tabs to fit"),
|
2001-05-17 16:22:06 +00:00
|
|
|
FALSE,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_ENABLE_POPUP,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_boolean ("enable-popup",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Enable Popup"),
|
|
|
|
P_("If TRUE, pressing the right mouse button on the notebook pops up a menu that you can use to go to a page"),
|
2001-05-17 16:22:06 +00:00
|
|
|
FALSE,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_HOMOGENEOUS,
|
|
|
|
g_param_spec_boolean ("homogeneous",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Homogeneous"),
|
|
|
|
P_("Whether tabs should have homogeneous sizes"),
|
2001-05-17 16:22:06 +00:00
|
|
|
FALSE,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
|
|
|
|
gtk_container_class_install_child_property (container_class,
|
|
|
|
CHILD_PROP_TAB_LABEL,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_string ("tab-label",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Tab label"),
|
2004-08-04 05:38:58 +00:00
|
|
|
P_("The string displayed on the child's tab label"),
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
NULL,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_container_class_install_child_property (container_class,
|
|
|
|
CHILD_PROP_MENU_LABEL,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_string ("menu-label",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Menu label"),
|
2004-08-04 05:38:58 +00:00
|
|
|
P_("The string displayed in the child's menu entry"),
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
NULL,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_container_class_install_child_property (container_class,
|
|
|
|
CHILD_PROP_POSITION,
|
2002-05-02 00:03:49 +00:00
|
|
|
g_param_spec_int ("position",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Position"),
|
|
|
|
P_("The index of the child in the parent"),
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
-1, G_MAXINT, 0,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_container_class_install_child_property (container_class,
|
|
|
|
CHILD_PROP_TAB_EXPAND,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_boolean ("tab-expand",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Tab expand"),
|
2004-08-04 05:38:58 +00:00
|
|
|
P_("Whether to expand the child's tab or not"),
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
TRUE,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_container_class_install_child_property (container_class,
|
|
|
|
CHILD_PROP_TAB_FILL,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_boolean ("tab-fill",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Tab fill"),
|
2004-08-04 05:38:58 +00:00
|
|
|
P_("Whether the child's tab should fill the allocated area or not"),
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
TRUE,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_container_class_install_child_property (container_class,
|
|
|
|
CHILD_PROP_TAB_PACK,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_enum ("tab-pack",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Tab pack type"),
|
|
|
|
P_("A GtkPackType indicating whether the child is packed with reference to the start or end of the parent"),
|
2001-07-31 21:23:19 +00:00
|
|
|
GTK_TYPE_PACK_TYPE, GTK_PACK_START,
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READWRITE));
|
2003-06-14 22:27:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GtkNotebook:has-secondary-backward-stepper:
|
|
|
|
*
|
|
|
|
* The "has-secondary-backward-stepper" property determines whether
|
|
|
|
* a second backward arrow button is displayed on the opposite end
|
|
|
|
* of the tab area.
|
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
*/
|
2003-05-22 22:34:31 +00:00
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_boolean ("has-secondary-backward-stepper",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Secondary backward stepper"),
|
|
|
|
P_("Display a second backward arrow button on the opposite end of the tab area"),
|
2003-05-22 22:34:31 +00:00
|
|
|
FALSE,
|
|
|
|
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READABLE));
|
2003-05-22 22:34:31 +00:00
|
|
|
|
2003-06-14 22:27:14 +00:00
|
|
|
/**
|
|
|
|
* GtkNotebook:has-secondary-forward-stepper:
|
|
|
|
*
|
|
|
|
* The "has-secondary-forward-stepper" property determines whether
|
|
|
|
* a second forward arrow button is displayed on the opposite end
|
|
|
|
* of the tab area.
|
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
*/
|
2003-05-22 22:34:31 +00:00
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_boolean ("has-secondary-forward-stepper",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Secondary forward stepper"),
|
|
|
|
P_("Display a second forward arrow button on the opposite end of the tab area"),
|
2003-05-22 22:34:31 +00:00
|
|
|
FALSE,
|
|
|
|
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READABLE));
|
2003-05-22 22:34:31 +00:00
|
|
|
|
2003-06-14 22:27:14 +00:00
|
|
|
/**
|
|
|
|
* GtkNotebook:has-backward-stepper:
|
|
|
|
*
|
|
|
|
* The "has-backward-stepper" property determines whether
|
|
|
|
* the standard backward arrow button is displayed.
|
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
*/
|
2003-05-22 22:34:31 +00:00
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_boolean ("has-backward-stepper",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Backward stepper"),
|
|
|
|
P_("Display the standard backward arrow button"),
|
2003-05-22 22:34:31 +00:00
|
|
|
TRUE,
|
|
|
|
|
2005-03-22 02:14:55 +00:00
|
|
|
GTK_PARAM_READABLE));
|
2003-05-22 22:34:31 +00:00
|
|
|
|
2003-06-14 22:27:14 +00:00
|
|
|
/**
|
|
|
|
* GtkNotebook:has-forward-stepper:
|
|
|
|
*
|
|
|
|
* The "has-forward-stepper" property determines whether
|
|
|
|
* the standard forward arrow button is displayed.
|
|
|
|
*
|
|
|
|
* Since: 2.4
|
|
|
|
*/
|
2003-05-22 22:34:31 +00:00
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
2005-03-09 04:04:40 +00:00
|
|
|
g_param_spec_boolean ("has-forward-stepper",
|
2004-01-16 23:10:05 +00:00
|
|
|
P_("Forward stepper"),
|
|
|
|
P_("Display the standard forward arrow button"),
|
2003-05-22 22:34:31 +00:00
|
|
|
TRUE,
|
|
|
|
|
2006-01-12 21:31:55 +00:00
|
|
|
GTK_PARAM_READABLE));
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GtkNotebook:tab-overlap:
|
|
|
|
*
|
|
|
|
* The "tab-overlap" property defines size of tab overlap
|
|
|
|
* area.
|
|
|
|
*
|
|
|
|
* Since: 2.10
|
|
|
|
*/
|
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
|
|
|
g_param_spec_int ("tab-overlap",
|
|
|
|
P_("Tab overlap"),
|
|
|
|
P_("Size of tab overlap area"),
|
|
|
|
G_MININT,
|
|
|
|
G_MAXINT,
|
|
|
|
2,
|
|
|
|
GTK_PARAM_READABLE));
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GtkNotebook:tab-curvature:
|
|
|
|
*
|
|
|
|
* The "tab-curvature" property defines size of tab curvature.
|
|
|
|
*
|
|
|
|
* Since: 2.10
|
|
|
|
*/
|
|
|
|
gtk_widget_class_install_style_property (widget_class,
|
|
|
|
g_param_spec_int ("tab-curvature",
|
|
|
|
P_("Tab curvature"),
|
|
|
|
P_("Size of tab curvature"),
|
|
|
|
0,
|
|
|
|
G_MAXINT,
|
|
|
|
1,
|
|
|
|
GTK_PARAM_READABLE));
|
2003-05-22 22:34:31 +00:00
|
|
|
|
doh, this was broken beyond believe.
Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
* gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
* gtk/gtkbox.c: change property types from (u)long to (u)int for
::position and ::padding.
* gtk/gtkcontainer.c: make ::border_width an INT property.
* gtk/gtkpacker.c: make ::position an INT property.
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
guard against NULL h/v scrollbars, since this is used at construction
time.
* gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
internal gtk_clist_constructor().
* gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
gtk_ctree_constructor().
* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
* docs/reference/Makefile.am: fun stuff, disabled docs generation
again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
* gtk/gtkwidget.[hc]:
removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
and gtk_widget_get().
(gtk_widget_new): use g_object_new_valist().
(gtk_widget_set): use g_object_set_valist().
* gtk/gtkobject.[hc]:
removed gtk_object_arg_get_info(), gtk_object_getv(),
gtk_object_query_args(), gtk_object_newv(),
gtk_object_class_add_signals(),
gtk_object_class_user_signal_new(),
gtk_object_class_user_signal_newv(),
gtk_object_arg_set(), gtk_object_arg_get(),
gtk_object_args_collect(),
gtk_object_default_construct(),
gtk_object_constructed(),
GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
removed nsignals, signals and n_args members from GtkObjectClass.
(gtk_object_new): use g_object_new_valist().
(gtk_object_set): use g_object_set_valist().
(gtk_object_get): use g_object_get_valist().
* gtk/gtkcompat.h: define gtk_object_default_construct().
* gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
g_object_new().
* gtk/*.c: removed gtk_object_class_add_signals() from class_init()
fucntions, cleaned up method assignments (make sure your structures
are setup properly before calling out). removed all GTK_CONSTRUCTED
hacks ;)
2000-12-13 01:34:41 +00:00
|
|
|
notebook_signals[SWITCH_PAGE] =
|
2005-09-01 05:11:46 +00:00
|
|
|
g_signal_new (I_("switch_page"),
|
2002-10-05 23:15:39 +00:00
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
G_STRUCT_OFFSET (GtkNotebookClass, switch_page),
|
|
|
|
NULL, NULL,
|
|
|
|
_gtk_marshal_VOID__POINTER_UINT,
|
|
|
|
G_TYPE_NONE, 2,
|
|
|
|
G_TYPE_POINTER,
|
|
|
|
G_TYPE_UINT);
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
notebook_signals[FOCUS_TAB] =
|
2005-09-01 05:11:46 +00:00
|
|
|
g_signal_new (I_("focus_tab"),
|
2002-10-05 23:15:39 +00:00
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
2001-06-29 16:30:25 +00:00
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
|
|
|
G_STRUCT_OFFSET (GtkNotebookClass, focus_tab),
|
|
|
|
NULL, NULL,
|
2002-01-17 00:34:58 +00:00
|
|
|
_gtk_marshal_BOOLEAN__ENUM,
|
2002-02-08 00:02:52 +00:00
|
|
|
G_TYPE_BOOLEAN, 1,
|
2001-06-29 16:30:25 +00:00
|
|
|
GTK_TYPE_NOTEBOOK_TAB);
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
notebook_signals[SELECT_PAGE] =
|
2005-09-01 05:11:46 +00:00
|
|
|
g_signal_new (I_("select_page"),
|
2002-10-05 23:15:39 +00:00
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
2001-06-29 16:30:25 +00:00
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
|
|
|
G_STRUCT_OFFSET (GtkNotebookClass, select_page),
|
|
|
|
NULL, NULL,
|
2002-01-17 00:34:58 +00:00
|
|
|
_gtk_marshal_BOOLEAN__BOOLEAN,
|
|
|
|
G_TYPE_BOOLEAN, 1,
|
2001-06-29 16:30:25 +00:00
|
|
|
G_TYPE_BOOLEAN);
|
2001-11-16 22:20:00 +00:00
|
|
|
notebook_signals[CHANGE_CURRENT_PAGE] =
|
2005-09-01 05:11:46 +00:00
|
|
|
g_signal_new (I_("change_current_page"),
|
2002-10-05 23:15:39 +00:00
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
2001-11-16 22:20:00 +00:00
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
|
|
|
G_STRUCT_OFFSET (GtkNotebookClass, change_current_page),
|
|
|
|
NULL, NULL,
|
2002-02-08 01:10:25 +00:00
|
|
|
_gtk_marshal_VOID__INT,
|
|
|
|
G_TYPE_NONE, 1,
|
2001-11-16 22:20:00 +00:00
|
|
|
G_TYPE_INT);
|
2002-02-08 01:10:25 +00:00
|
|
|
notebook_signals[MOVE_FOCUS_OUT] =
|
2005-09-01 05:11:46 +00:00
|
|
|
g_signal_new (I_("move_focus_out"),
|
2002-10-05 23:15:39 +00:00
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
2002-02-08 01:10:25 +00:00
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
|
|
|
G_STRUCT_OFFSET (GtkNotebookClass, move_focus_out),
|
|
|
|
NULL, NULL,
|
|
|
|
_gtk_marshal_VOID__ENUM,
|
|
|
|
G_TYPE_NONE, 1,
|
|
|
|
GTK_TYPE_DIRECTION_TYPE);
|
|
|
|
|
2001-06-29 16:30:25 +00:00
|
|
|
|
2002-10-05 23:15:39 +00:00
|
|
|
binding_set = gtk_binding_set_by_class (class);
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
|
|
|
GDK_space, 0,
|
|
|
|
"select_page", 1,
|
|
|
|
G_TYPE_BOOLEAN, FALSE);
|
Clip the retrieved image data to the screen, using a server grab to avoid
2001-06-28 Havoc Pennington <hp@pobox.com>
* gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): Clip the retrieved
image data to the screen, using a server grab to avoid race
conditions.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
check for NULL return from gtk_image_new_from_stock(), it never
returns NULL.
(gtk_item_factory_create_item): fix bug where we parsed the stock
ID as an inline pixbuf
* gtk/gtktext.c (gtk_text_key_press): numeric keypad support
* gtk/gtkspinbutton.c (gtk_spin_button_key_press): numeric keypad
support (should be using binding set here)
* gtk/gtkoptionmenu.c (gtk_option_menu_key_press): numeric keypad
support (should be using binding set here)
* gtk/gtkmenushell.c (gtk_menu_shell_class_init): numeric keypad
support
* gtk/gtkmenu.c (gtk_menu_class_init): numeric keypad support
* gtk/gtkmenubar.c (gtk_menu_bar_class_init): numeric keypad
* gtk/gtklistitem.c (gtk_list_item_class_init): numeric keypad
* gtk/gtkimcontextsimple.c
(gtk_im_context_simple_filter_keypress): keypad
* gtk/gtkfilesel.c (gtk_file_selection_key_press): keypad
* gtk/gtkentry.c (gtk_entry_class_init): numeric keypad fixes
* gtk/gtkctree.c (gtk_ctree_class_init): numeric keypad support
* gtk/gtkcolorsel.c (palette_activate): keypad support (of course,
should be binding-setted)
* gtk/gtkwindow.c (gtk_window_class_init): numeric keypad fixes
* gtk/gtkclist.c (gtk_clist_class_init): numeric keypad fixes
* gtk/gtkcalendar.c: numeric keypad fixes
* gtk/gtktextview.c (gtk_text_view_class_init): numeric keypad
support
* gdk/gdkwindow.c (gdk_window_get_clip_region): fix infinite loop
screwup
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
clip the render area to the drawable's clip region in advance,
so we don't get data from the server that we don't need.
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
check return value of gdk_pixbuf_get_from_drawable(), fall back
to bilevel alpha if we can't get the pixbuf to composite against.
* gdk/gdkdraw.c (gdk_drawable_get_image): set the image colormap
* gdk/gdkimage.c (gdk_image_get_colormap): add
gdk_image_set_colormap, gdk_image_get_colormap
* gdk/gdkpixbuf-drawable.c (rgbconvert): Change all converters to
take a region of the image, instead of converting the entire
image.
* gtk/gtkwidget.h (struct _GtkWidgetClass): add show_help
keybinding signal. Add default bindings for it. Add default
handler for show_help that shows the tooltip for the widget.
* gtk/gtkdialog.c (gtk_dialog_class_init): add binding set and
"close" keybinding signal, remove key press handler.
* gtk/gtktooltips.c (gtk_tooltips_set_colors): Just remove this,
it's not our usual practice to leave a deprecated function around
with a runtime warning, plus we don't want it to appear in docs,
plus if we make them yellow no one will want to change them
anyhow.
2001-06-29 01:59:02 +00:00
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
|
|
|
GDK_KP_Space, 0,
|
|
|
|
"select_page", 1,
|
|
|
|
G_TYPE_BOOLEAN, FALSE);
|
|
|
|
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
|
|
|
GDK_Home, 0,
|
|
|
|
"focus_tab", 1,
|
|
|
|
GTK_TYPE_NOTEBOOK_TAB, GTK_NOTEBOOK_TAB_FIRST);
|
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
|
|
|
GDK_KP_Home, 0,
|
|
|
|
"focus_tab", 1,
|
|
|
|
GTK_TYPE_NOTEBOOK_TAB, GTK_NOTEBOOK_TAB_FIRST);
|
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
|
|
|
GDK_End, 0,
|
|
|
|
"focus_tab", 1,
|
|
|
|
GTK_TYPE_NOTEBOOK_TAB, GTK_NOTEBOOK_TAB_LAST);
|
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
|
|
|
GDK_KP_End, 0,
|
|
|
|
"focus_tab", 1,
|
|
|
|
GTK_TYPE_NOTEBOOK_TAB, GTK_NOTEBOOK_TAB_LAST);
|
2001-11-16 22:20:00 +00:00
|
|
|
|
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
|
|
|
GDK_Page_Up, GDK_CONTROL_MASK,
|
|
|
|
"change_current_page", 1,
|
|
|
|
G_TYPE_INT, -1);
|
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
|
|
|
GDK_Page_Down, GDK_CONTROL_MASK,
|
|
|
|
"change_current_page", 1,
|
|
|
|
G_TYPE_INT, 1);
|
2002-02-08 01:10:25 +00:00
|
|
|
|
2003-02-05 23:48:11 +00:00
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
2003-03-28 23:44:23 +00:00
|
|
|
GDK_Page_Up, GDK_CONTROL_MASK | GDK_MOD1_MASK,
|
2003-02-05 23:48:11 +00:00
|
|
|
"change_current_page", 1,
|
|
|
|
G_TYPE_INT, -1);
|
|
|
|
gtk_binding_entry_add_signal (binding_set,
|
2003-03-28 23:44:23 +00:00
|
|
|
GDK_Page_Down, GDK_CONTROL_MASK | GDK_MOD1_MASK,
|
2003-02-05 23:48:11 +00:00
|
|
|
"change_current_page", 1,
|
|
|
|
G_TYPE_INT, 1);
|
|
|
|
|
2002-02-08 01:10:25 +00:00
|
|
|
add_arrow_bindings (binding_set, GDK_Up, GTK_DIR_UP);
|
|
|
|
add_arrow_bindings (binding_set, GDK_Down, GTK_DIR_DOWN);
|
|
|
|
add_arrow_bindings (binding_set, GDK_Left, GTK_DIR_LEFT);
|
|
|
|
add_arrow_bindings (binding_set, GDK_Right, GTK_DIR_RIGHT);
|
|
|
|
|
|
|
|
add_tab_bindings (binding_set, GDK_CONTROL_MASK, GTK_DIR_TAB_FORWARD);
|
|
|
|
add_tab_bindings (binding_set, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
1998-07-16 20:23:12 +00:00
|
|
|
static void
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_init (GtkNotebook *notebook)
|
|
|
|
{
|
2002-11-13 17:20:33 +00:00
|
|
|
GTK_WIDGET_SET_FLAGS (notebook, GTK_CAN_FOCUS);
|
2001-11-15 21:04:51 +00:00
|
|
|
GTK_WIDGET_SET_FLAGS (notebook, GTK_NO_WINDOW);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
notebook->cur_page = NULL;
|
|
|
|
notebook->children = NULL;
|
|
|
|
notebook->first_tab = NULL;
|
|
|
|
notebook->focus_tab = NULL;
|
2001-11-15 21:04:51 +00:00
|
|
|
notebook->event_window = NULL;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook->menu = NULL;
|
|
|
|
|
|
|
|
notebook->tab_hborder = 2;
|
|
|
|
notebook->tab_vborder = 2;
|
|
|
|
|
|
|
|
notebook->show_tabs = TRUE;
|
|
|
|
notebook->show_border = TRUE;
|
|
|
|
notebook->tab_pos = GTK_POS_TOP;
|
|
|
|
notebook->scrollable = FALSE;
|
|
|
|
notebook->in_child = 0;
|
|
|
|
notebook->click_child = 0;
|
|
|
|
notebook->button = 0;
|
|
|
|
notebook->need_timer = 0;
|
|
|
|
notebook->child_has_focus = FALSE;
|
1999-01-12 15:12:14 +00:00
|
|
|
notebook->have_visible_child = FALSE;
|
2002-02-08 01:10:25 +00:00
|
|
|
notebook->focus_out = FALSE;
|
2003-05-22 22:34:31 +00:00
|
|
|
|
|
|
|
notebook->has_before_previous = 1;
|
|
|
|
notebook->has_before_next = 0;
|
|
|
|
notebook->has_after_previous = 0;
|
|
|
|
notebook->has_after_next = 1;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
2002-01-17 00:34:58 +00:00
|
|
|
static gboolean
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
gtk_notebook_select_page (GtkNotebook *notebook,
|
|
|
|
gboolean move_focus)
|
|
|
|
{
|
2002-01-17 00:34:58 +00:00
|
|
|
if (gtk_widget_is_focus (GTK_WIDGET (notebook)))
|
|
|
|
{
|
|
|
|
gtk_notebook_page_select (notebook, move_focus);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return FALSE;
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
}
|
|
|
|
|
2002-01-17 00:34:58 +00:00
|
|
|
static gboolean
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
gtk_notebook_focus_tab (GtkNotebook *notebook,
|
|
|
|
GtkNotebookTab type)
|
|
|
|
{
|
|
|
|
GList *list;
|
2002-01-17 00:34:58 +00:00
|
|
|
|
|
|
|
if (gtk_widget_is_focus (GTK_WIDGET (notebook)))
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
{
|
2002-01-17 00:34:58 +00:00
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case GTK_NOTEBOOK_TAB_FIRST:
|
|
|
|
list = gtk_notebook_search_page (notebook, NULL, STEP_NEXT, TRUE);
|
|
|
|
if (list)
|
|
|
|
gtk_notebook_switch_focus_tab (notebook, list);
|
|
|
|
break;
|
|
|
|
case GTK_NOTEBOOK_TAB_LAST:
|
|
|
|
list = gtk_notebook_search_page (notebook, NULL, STEP_PREV, TRUE);
|
|
|
|
if (list)
|
|
|
|
gtk_notebook_switch_focus_tab (notebook, list);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
}
|
2002-01-17 00:34:58 +00:00
|
|
|
else
|
|
|
|
return FALSE;
|
voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
(gtk_text_layout_move_iter_to_next_line): fix these two for
invisible text, lots of other stuff still hosed.
* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
new function, replaces the get/set palette stuff. This function
is intended for use by libgnomeui which should set the hook to a
thing which sets the palette in GConf, and we need the
GConf-to-xsettings proxy which will result in the change being
propagated back to the GTK app.
* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
about unusable signals that it may be because the signal has
parameters.
* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
style, otherwise gtkrc.c won't know to create a new GtkStyle for
it.
(gtk_widget_modify_color_component): call
gtk_widget_modify_style() so the rc style will get copied.
(gtk_widget_modify_font): ditto
* gtk/gtkrc.c: make a couple variables static
* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
help button by default, since it does nothing
* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
around with UI
* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
so we can have tooltips
* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
can have tooltips
* gdk/gdkimage.h: mark gdk_image_new_bitmap with
GDK_ENABLE_BROKEN, because its memory behavior is completely
hosed.
* gtk/gtknotebook.c: remove key press handler, replace with
binding set, add numeric keypad support
* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete
* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms
* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
addition to plain Delete
* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
GDK_KP_Enter in addition to GDK_Return
* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
activate on entry instead of key press
(gtk_font_selection_on_clist_key_press): get
rid of this signal handler, not needed with new font sel.
* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
no-longer-needed emit_stop_by_name(), just return TRUE
* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
cruft, this widget is no longer focusable.
* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
move_slider action signal, add binding set for vscale/hscale, in
the process support numeric keypad
* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
make GDK_Return and GDK_KP_Enter activate the entry via
binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
|
|
|
}
|
|
|
|
|
2001-11-16 22:20:00 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_change_current_page (GtkNotebook *notebook,
|
|
|
|
gint offset)
|
|
|
|
{
|
|
|
|
GList *current = NULL;
|
|
|
|
|
|
|
|
if (notebook->cur_page)
|
|
|
|
current = g_list_find (notebook->children, notebook->cur_page);
|
|
|
|
|
|
|
|
while (offset != 0)
|
|
|
|
{
|
|
|
|
current = gtk_notebook_search_page (notebook, current, offset < 0 ? STEP_PREV : STEP_NEXT, TRUE);
|
|
|
|
offset += offset < 0 ? 1 : -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (current)
|
|
|
|
gtk_notebook_switch_page (notebook, current->data, -1);
|
2002-02-08 01:10:25 +00:00
|
|
|
else
|
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
* gtk/gtkclipboard.[ch]: Add gtk_clipboard_get_for_display(),
make internals multihead aware.
* gtk/gtkcolorsel.[ch]: Add
gtk_color_selection_set_change_palette_with_screen_hook () [ugh!]
make up for non-multihead safety of
gtk_color_selection_set_change_palette_hook()
* gtk/gtkinvisible.[ch] gtk/gtkmenu.[ch] gtkwindow.[ch]: Add
gtk_{invisible,menu,window}_set_screen(); add "screen" properties
for GtkWindow and GtkMenu.
* gtk/gtkplug.[ch]: Add gtk_plug_construct_for_display(),
gtk_plug_new_for_display(). Multihead fixes.
* gtk/gtkselection.[ch]: Add gtk_selection_owner_set_for_display(),
make internals multihead aware.
* gtk/gtksettings.[ch]: Add gtk_settings_get_for_screen(), get
rid of now-useless gtk_settings_constructor().
* gtk/gtkstyle.[ch]: Add gtk_style_get_font_for_display(), fix
check/radio button indicators bitmap handling to be multihead
safe.
* gtk/gtkwidget.[ch]: Add gtk_widget_get_screen(), gtk_widget_has_screen(),
gtk_widget_get_display(), gtk_widget_get_clipboard(),
gtk_widget_get_root_window().
* gtk/gtkbindings.c gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkcombo.c
gtk/gtkctree.c gtk/gtkdnd.c gtk/gtkfilesel.c gtk/gtkgamma.c
gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtkimcontext.c gtk/gtklabel.c
gtk/gtklist.c gtk/gtkmain.c gtk/gtkmenuitem.c gtk/gtkmenushell.c
gtk/gtknotebook.c gtk/gtkoldeditable.c gtk/gtkoptionmenu.c
gtk/gtkpaned.c gtk/gtkpreview.c gtk/gtksocket.c gtk/gtktext.c
gtk/gtktextbuffer.c gtk/gtktextview.c gtk/gtktipsquery.c
gtk/gtktooltips.c gtk/gtktreeview.c gtk/gtktreeviewcolumn.c:
misc mechanical multihead-safety fixes.
* gtk/gtkclipboard.c: Use a GtkImage rather than a pixmap for
the dropper, look up the color palette only at realization time,
other multihead fixes.
* gtk/gtkcombo.c (gtk_combo_unrealize): Popdown the list when
unrealizing.
* gtk/gtkentry.c: Only claim ownership of the primary selection
when realized, misc multihead fixes.
* gtk/gtkfontsel.c: Only fill in fonts when attached to a screen,
fix gtk_font_selection_get_font() for multihead.
* gtk/gtkgc.c: make the depth => drawable hash per-screen.
* gtk/gtkinvisible.c: Add a constructor that realizes the
widget, so we get a realized widget with g_object_new() as
well gtk_invisible_new() as before.
* gtk/gtkmain.c: Get rid of unused gtk_visual/gtk_colormap
variables.
* gtk/gtktextdisplay.c: Add warnings if stipple bitmaps
are used on the wrong screen.
* gtk/gtktoolbar.c: Make handling of GtkSettings-based layout
read properties and connect to settings when the screen is changed,
rather than on init/finalize.
* gtk/gtkwindow.c: Fix icon handing to be multihead safe ...
default icon pixmaps/mask are only shared between windows on the
same screen. Misc multihead fixes.
Sat Apr 27 13:49:53 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclipboard.c (gtk_clipboard_get_for_display):
Update docs to reference GDK_SELECTION_CLIPBOARD rather GDK_NONE.
2002-04-29 Alex Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkproperty-fb.c (gdk_property_get):
Fix silly bug, noticed by Sven Neumann.
Sun Apr 28 22:43:55 2002 Jonathan Blandford <jrb@gnome.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
so that you can set a new sort func.
2002-04-29 22:53:45 +00:00
|
|
|
gdk_display_beep (gtk_widget_get_display (GTK_WIDGET (notebook)));
|
2002-02-08 01:10:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GtkDirectionType
|
|
|
|
get_effective_direction (GtkNotebook *notebook,
|
|
|
|
GtkDirectionType direction)
|
|
|
|
{
|
|
|
|
/* Remap the directions into the effective direction it would be for a
|
|
|
|
* GTK_POS_TOP notebook
|
|
|
|
*/
|
2003-12-08 21:07:17 +00:00
|
|
|
|
2002-02-08 01:10:25 +00:00
|
|
|
#define D(rest) GTK_DIR_##rest
|
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
static const GtkDirectionType translate_direction[2][4][6] = {
|
|
|
|
/* LEFT */ {{ D(TAB_FORWARD), D(TAB_BACKWARD), D(LEFT), D(RIGHT), D(UP), D(DOWN) },
|
2002-02-08 01:10:25 +00:00
|
|
|
/* RIGHT */ { D(TAB_BACKWARD), D(TAB_FORWARD), D(LEFT), D(RIGHT), D(DOWN), D(UP) },
|
|
|
|
/* TOP */ { D(TAB_FORWARD), D(TAB_BACKWARD), D(UP), D(DOWN), D(LEFT), D(RIGHT) },
|
2003-12-08 21:07:17 +00:00
|
|
|
/* BOTTOM */ { D(TAB_BACKWARD), D(TAB_FORWARD), D(DOWN), D(UP), D(LEFT), D(RIGHT) }},
|
|
|
|
/* LEFT */ {{ D(TAB_BACKWARD), D(TAB_FORWARD), D(LEFT), D(RIGHT), D(DOWN), D(UP) },
|
|
|
|
/* RIGHT */ { D(TAB_FORWARD), D(TAB_BACKWARD), D(LEFT), D(RIGHT), D(UP), D(DOWN) },
|
|
|
|
/* TOP */ { D(TAB_FORWARD), D(TAB_BACKWARD), D(UP), D(DOWN), D(RIGHT), D(LEFT) },
|
|
|
|
/* BOTTOM */ { D(TAB_BACKWARD), D(TAB_FORWARD), D(DOWN), D(UP), D(RIGHT), D(LEFT) }},
|
2002-02-08 01:10:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#undef D
|
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
int text_dir = gtk_widget_get_direction (GTK_WIDGET (notebook)) == GTK_TEXT_DIR_RTL ? 1 : 0;
|
|
|
|
|
|
|
|
return translate_direction[text_dir][notebook->tab_pos][direction];
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
|
|
|
get_effective_tab_pos (GtkNotebook *notebook)
|
|
|
|
{
|
|
|
|
if (gtk_widget_get_direction (GTK_WIDGET (notebook)) == GTK_TEXT_DIR_RTL)
|
|
|
|
{
|
|
|
|
switch (notebook->tab_pos)
|
|
|
|
{
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
return GTK_POS_RIGHT;
|
|
|
|
case GTK_POS_RIGHT:
|
|
|
|
return GTK_POS_LEFT;
|
|
|
|
default: ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return notebook->tab_pos;
|
2002-02-08 01:10:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_notebook_move_focus_out (GtkNotebook *notebook,
|
|
|
|
GtkDirectionType direction_type)
|
|
|
|
{
|
|
|
|
GtkDirectionType effective_direction = get_effective_direction (notebook, direction_type);
|
|
|
|
GtkWidget *toplevel;
|
|
|
|
|
|
|
|
if (GTK_CONTAINER (notebook)->focus_child && effective_direction == GTK_DIR_UP)
|
|
|
|
if (focus_tabs_in (notebook))
|
|
|
|
return;
|
|
|
|
if (gtk_widget_is_focus (GTK_WIDGET (notebook)) && effective_direction == GTK_DIR_DOWN)
|
|
|
|
if (focus_child_in (notebook, GTK_DIR_TAB_FORWARD))
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* At this point, we know we should be focusing out of the notebook entirely. We
|
|
|
|
* do this by setting a flag, then propagating the focus motion to the notebook.
|
|
|
|
*/
|
|
|
|
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (notebook));
|
|
|
|
if (!GTK_WIDGET_TOPLEVEL (toplevel))
|
|
|
|
return;
|
|
|
|
|
|
|
|
g_object_ref (notebook);
|
|
|
|
|
|
|
|
notebook->focus_out = TRUE;
|
2002-10-05 23:15:39 +00:00
|
|
|
g_signal_emit_by_name (toplevel, "move_focus", direction_type);
|
2002-02-08 01:10:25 +00:00
|
|
|
notebook->focus_out = FALSE;
|
|
|
|
|
|
|
|
g_object_unref (notebook);
|
|
|
|
|
2001-11-16 22:20:00 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_new:
|
|
|
|
*
|
|
|
|
* Creates a new #GtkNotebook widget with no pages.
|
|
|
|
|
|
|
|
* Return value: the newly created #GtkNotebook
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkWidget*
|
|
|
|
gtk_notebook_new (void)
|
|
|
|
{
|
2002-10-05 23:15:39 +00:00
|
|
|
return g_object_new (GTK_TYPE_NOTEBOOK, NULL);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Private GtkObject Methods :
|
|
|
|
*
|
|
|
|
* gtk_notebook_destroy
|
|
|
|
* gtk_notebook_set_arg
|
|
|
|
* gtk_notebook_get_arg
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gtk_notebook_destroy (GtkObject *object)
|
|
|
|
{
|
2002-12-10 12:02:43 +00:00
|
|
|
GList *children;
|
2001-12-04 03:27:30 +00:00
|
|
|
GtkNotebook *notebook = GTK_NOTEBOOK (object);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (notebook->menu)
|
|
|
|
gtk_notebook_popup_disable (notebook);
|
|
|
|
|
2002-12-10 12:02:43 +00:00
|
|
|
children = notebook->children;
|
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
GList *child = children;
|
|
|
|
children = child->next;
|
|
|
|
|
|
|
|
gtk_notebook_real_remove (notebook, child, TRUE);
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2001-05-17 16:22:06 +00:00
|
|
|
gtk_notebook_set_property (GObject *object,
|
|
|
|
guint prop_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec)
|
1998-07-16 20:23:12 +00:00
|
|
|
{
|
|
|
|
GtkNotebook *notebook;
|
|
|
|
|
|
|
|
notebook = GTK_NOTEBOOK (object);
|
|
|
|
|
2001-05-17 16:22:06 +00:00
|
|
|
switch (prop_id)
|
1998-07-16 20:23:12 +00:00
|
|
|
{
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_SHOW_TABS:
|
|
|
|
gtk_notebook_set_show_tabs (notebook, g_value_get_boolean (value));
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_SHOW_BORDER:
|
|
|
|
gtk_notebook_set_show_border (notebook, g_value_get_boolean (value));
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_SCROLLABLE:
|
|
|
|
gtk_notebook_set_scrollable (notebook, g_value_get_boolean (value));
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_ENABLE_POPUP:
|
|
|
|
if (g_value_get_boolean (value))
|
1998-07-16 20:23:12 +00:00
|
|
|
gtk_notebook_popup_enable (notebook);
|
|
|
|
else
|
|
|
|
gtk_notebook_popup_disable (notebook);
|
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_HOMOGENEOUS:
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
gtk_notebook_set_homogeneous_tabs_internal (notebook, g_value_get_boolean (value));
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_PAGE:
|
2001-06-24 15:34:48 +00:00
|
|
|
gtk_notebook_set_current_page (notebook, g_value_get_int (value));
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_TAB_POS:
|
|
|
|
gtk_notebook_set_tab_pos (notebook, g_value_get_enum (value));
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_TAB_BORDER:
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
gtk_notebook_set_tab_border_internal (notebook, g_value_get_uint (value));
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_TAB_HBORDER:
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
gtk_notebook_set_tab_hborder_internal (notebook, g_value_get_uint (value));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_TAB_VBORDER:
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
gtk_notebook_set_tab_vborder_internal (notebook, g_value_get_uint (value));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
1998-07-16 20:23:12 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2001-05-17 16:22:06 +00:00
|
|
|
gtk_notebook_get_property (GObject *object,
|
|
|
|
guint prop_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec)
|
1998-07-16 20:23:12 +00:00
|
|
|
{
|
|
|
|
GtkNotebook *notebook;
|
|
|
|
|
|
|
|
notebook = GTK_NOTEBOOK (object);
|
|
|
|
|
2001-05-17 16:22:06 +00:00
|
|
|
switch (prop_id)
|
1998-07-16 20:23:12 +00:00
|
|
|
{
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_SHOW_TABS:
|
|
|
|
g_value_set_boolean (value, notebook->show_tabs);
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_SHOW_BORDER:
|
|
|
|
g_value_set_boolean (value, notebook->show_border);
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_SCROLLABLE:
|
|
|
|
g_value_set_boolean (value, notebook->scrollable);
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_ENABLE_POPUP:
|
|
|
|
g_value_set_boolean (value, notebook->menu != NULL);
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_HOMOGENEOUS:
|
|
|
|
g_value_set_boolean (value, notebook->homogeneous);
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_PAGE:
|
|
|
|
g_value_set_int (value, gtk_notebook_get_current_page (notebook));
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_TAB_POS:
|
|
|
|
g_value_set_enum (value, notebook->tab_pos);
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_TAB_HBORDER:
|
|
|
|
g_value_set_uint (value, notebook->tab_hborder);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
2001-05-17 16:22:06 +00:00
|
|
|
case PROP_TAB_VBORDER:
|
|
|
|
g_value_set_uint (value, notebook->tab_vborder);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
1998-07-16 20:23:12 +00:00
|
|
|
default:
|
2001-05-17 16:22:06 +00:00
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
1998-07-16 20:23:12 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* Private GtkWidget Methods :
|
|
|
|
*
|
|
|
|
* gtk_notebook_map
|
|
|
|
* gtk_notebook_unmap
|
|
|
|
* gtk_notebook_realize
|
|
|
|
* gtk_notebook_size_request
|
|
|
|
* gtk_notebook_size_allocate
|
|
|
|
* gtk_notebook_expose
|
2004-07-03 01:51:17 +00:00
|
|
|
* gtk_notebook_scroll
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
* gtk_notebook_button_press
|
|
|
|
* gtk_notebook_button_release
|
2006-02-22 16:35:09 +00:00
|
|
|
* gtk_notebook_popup_menu
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
* gtk_notebook_enter_notify
|
|
|
|
* gtk_notebook_leave_notify
|
|
|
|
* gtk_notebook_motion_notify
|
|
|
|
* gtk_notebook_focus_in
|
|
|
|
* gtk_notebook_focus_out
|
|
|
|
* gtk_notebook_draw_focus
|
|
|
|
* gtk_notebook_style_set
|
|
|
|
*/
|
2001-11-15 21:04:51 +00:00
|
|
|
static gboolean
|
|
|
|
gtk_notebook_get_event_window_position (GtkNotebook *notebook,
|
|
|
|
GdkRectangle *rectangle)
|
|
|
|
{
|
|
|
|
GtkWidget *widget = GTK_WIDGET (notebook);
|
2001-11-15 21:12:27 +00:00
|
|
|
gint border_width = GTK_CONTAINER (notebook)->border_width;
|
2002-09-27 20:19:16 +00:00
|
|
|
GtkNotebookPage *visible_page = NULL;
|
|
|
|
GList *tmp_list;
|
2003-12-08 21:07:17 +00:00
|
|
|
gint tab_pos = get_effective_tab_pos (notebook);
|
2001-11-15 21:04:51 +00:00
|
|
|
|
2002-09-27 20:19:16 +00:00
|
|
|
for (tmp_list = notebook->children; tmp_list; tmp_list = tmp_list->next)
|
2001-11-15 21:04:51 +00:00
|
|
|
{
|
2002-09-27 20:19:16 +00:00
|
|
|
GtkNotebookPage *page = tmp_list->data;
|
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
2001-11-15 21:04:51 +00:00
|
|
|
{
|
2002-09-27 20:19:16 +00:00
|
|
|
visible_page = page;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2001-11-15 21:04:51 +00:00
|
|
|
|
2002-09-27 20:19:16 +00:00
|
|
|
if (notebook->show_tabs && visible_page)
|
|
|
|
{
|
|
|
|
if (rectangle)
|
|
|
|
{
|
2001-11-15 21:12:27 +00:00
|
|
|
rectangle->x = widget->allocation.x + border_width;
|
|
|
|
rectangle->y = widget->allocation.y + border_width;
|
2001-11-15 21:04:51 +00:00
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
2001-11-15 21:04:51 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
2001-11-15 21:12:27 +00:00
|
|
|
rectangle->width = widget->allocation.width - 2 * border_width;
|
2002-09-27 20:19:16 +00:00
|
|
|
rectangle->height = visible_page->requisition.height;
|
2003-12-08 21:07:17 +00:00
|
|
|
if (tab_pos == GTK_POS_BOTTOM)
|
2001-11-15 21:12:27 +00:00
|
|
|
rectangle->y += widget->allocation.height - 2 * border_width - rectangle->height;
|
2001-11-15 21:04:51 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
2002-09-27 20:19:16 +00:00
|
|
|
rectangle->width = visible_page->requisition.width;
|
2001-11-15 21:12:27 +00:00
|
|
|
rectangle->height = widget->allocation.height - 2 * border_width;
|
2003-12-08 21:07:17 +00:00
|
|
|
if (tab_pos == GTK_POS_RIGHT)
|
2001-11-15 21:12:27 +00:00
|
|
|
rectangle->x += widget->allocation.width - 2 * border_width - rectangle->width;
|
2001-11-15 21:04:51 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (rectangle)
|
|
|
|
{
|
|
|
|
rectangle->x = rectangle->y = 0;
|
|
|
|
rectangle->width = rectangle->height = 10;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
1998-07-16 20:23:12 +00:00
|
|
|
static void
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_map (GtkWidget *widget)
|
1998-07-16 20:23:12 +00:00
|
|
|
{
|
|
|
|
GtkNotebook *notebook;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebookPage *page;
|
|
|
|
GList *children;
|
1998-07-16 20:23:12 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (widget));
|
1998-07-16 20:23:12 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
|
1998-07-19 19:09:27 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook = GTK_NOTEBOOK (widget);
|
1998-07-19 19:09:27 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->cur_page &&
|
|
|
|
GTK_WIDGET_VISIBLE (notebook->cur_page->child) &&
|
|
|
|
!GTK_WIDGET_MAPPED (notebook->cur_page->child))
|
|
|
|
gtk_widget_map (notebook->cur_page->child);
|
1998-07-19 19:09:27 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->scrollable)
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_pages_allocate (notebook);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
children = notebook->children;
|
1998-07-19 19:09:27 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
while (children)
|
1998-07-19 19:09:27 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page = children->data;
|
|
|
|
children = children->next;
|
1998-07-19 19:09:27 +00:00
|
|
|
|
2000-03-14 19:57:25 +00:00
|
|
|
if (page->tab_label &&
|
|
|
|
GTK_WIDGET_VISIBLE (page->tab_label) &&
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
!GTK_WIDGET_MAPPED (page->tab_label))
|
|
|
|
gtk_widget_map (page->tab_label);
|
1998-07-19 19:09:27 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1999-01-15 16:00:39 +00:00
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
if (gtk_notebook_get_event_window_position (notebook, NULL))
|
2001-11-19 22:04:24 +00:00
|
|
|
gdk_window_show_unraised (notebook->event_window);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1998-07-19 19:09:27 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_unmap (GtkWidget *widget)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (widget));
|
1998-07-19 19:09:27 +00:00
|
|
|
|
2005-03-22 17:36:41 +00:00
|
|
|
stop_scrolling (GTK_NOTEBOOK (widget));
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
|
2001-11-15 21:04:51 +00:00
|
|
|
|
|
|
|
gdk_window_hide (GTK_NOTEBOOK (widget)->event_window);
|
2001-11-20 17:42:56 +00:00
|
|
|
|
|
|
|
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
|
1998-07-16 20:23:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_realize (GtkWidget *widget)
|
1998-07-16 20:23:12 +00:00
|
|
|
{
|
|
|
|
GtkNotebook *notebook;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GdkWindowAttr attributes;
|
|
|
|
gint attributes_mask;
|
2001-11-15 21:04:51 +00:00
|
|
|
GdkRectangle event_window_pos;
|
1998-07-16 20:23:12 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (widget));
|
1998-07-16 20:23:12 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook = GTK_NOTEBOOK (widget);
|
|
|
|
GTK_WIDGET_SET_FLAGS (notebook, GTK_REALIZED);
|
1998-07-16 20:23:12 +00:00
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
gtk_notebook_get_event_window_position (notebook, &event_window_pos);
|
|
|
|
|
|
|
|
widget->window = gtk_widget_get_parent_window (widget);
|
2002-10-05 23:15:39 +00:00
|
|
|
g_object_ref (widget->window);
|
2001-11-15 21:04:51 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
attributes.window_type = GDK_WINDOW_CHILD;
|
2001-11-15 21:04:51 +00:00
|
|
|
attributes.x = event_window_pos.x;
|
|
|
|
attributes.y = event_window_pos.y;
|
|
|
|
attributes.width = event_window_pos.width;
|
|
|
|
attributes.height = event_window_pos.height;
|
|
|
|
attributes.wclass = GDK_INPUT_ONLY;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
attributes.event_mask = gtk_widget_get_events (widget);
|
2003-07-08 18:59:16 +00:00
|
|
|
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
|
2004-07-03 01:51:17 +00:00
|
|
|
GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK |
|
|
|
|
GDK_SCROLL_MASK);
|
2001-11-15 21:04:51 +00:00
|
|
|
attributes_mask = GDK_WA_X | GDK_WA_Y;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
notebook->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
|
|
|
&attributes, attributes_mask);
|
|
|
|
gdk_window_set_user_data (notebook->event_window, notebook);
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
widget->style = gtk_style_attach (widget->style, widget->window);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_unrealize (GtkWidget *widget)
|
|
|
|
{
|
|
|
|
GtkNotebook *notebook;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (widget));
|
|
|
|
|
|
|
|
notebook = GTK_NOTEBOOK (widget);
|
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
gdk_window_set_user_data (notebook->event_window, NULL);
|
|
|
|
gdk_window_destroy (notebook->event_window);
|
|
|
|
notebook->event_window = NULL;
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
|
|
|
|
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
|
|
|
|
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
|
|
|
|
}
|
|
|
|
|
1998-02-19 05:13:46 +00:00
|
|
|
static void
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_size_request (GtkWidget *widget,
|
|
|
|
GtkRequisition *requisition)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2001-12-04 03:27:30 +00:00
|
|
|
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebookPage *page;
|
|
|
|
GList *children;
|
1999-02-10 02:35:09 +00:00
|
|
|
GtkRequisition child_requisition;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gboolean switch_page = FALSE;
|
|
|
|
gint vis_pages;
|
2001-12-04 03:27:30 +00:00
|
|
|
gint focus_width;
|
2006-01-12 21:31:55 +00:00
|
|
|
gint tab_overlap;
|
|
|
|
gint tab_curvature;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2006-01-12 21:31:55 +00:00
|
|
|
gtk_widget_style_get (widget,
|
|
|
|
"focus-line-width", &focus_width,
|
|
|
|
"tab-overlap", &tab_overlap,
|
|
|
|
"tab-curvature", &tab_curvature,
|
|
|
|
NULL);
|
2001-12-04 03:27:30 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
widget->requisition.width = 0;
|
|
|
|
widget->requisition.height = 0;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
for (children = notebook->children, vis_pages = 0; children;
|
|
|
|
children = children->next)
|
|
|
|
{
|
|
|
|
page = children->data;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
{
|
|
|
|
vis_pages++;
|
1999-02-10 02:35:09 +00:00
|
|
|
gtk_widget_size_request (page->child, &child_requisition);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
widget->requisition.width = MAX (widget->requisition.width,
|
1999-02-10 02:35:09 +00:00
|
|
|
child_requisition.width);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
widget->requisition.height = MAX (widget->requisition.height,
|
1999-02-10 02:35:09 +00:00
|
|
|
child_requisition.height);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->menu && page->menu_label->parent &&
|
|
|
|
!GTK_WIDGET_VISIBLE (page->menu_label->parent))
|
|
|
|
gtk_widget_show (page->menu_label->parent);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (page == notebook->cur_page)
|
|
|
|
switch_page = TRUE;
|
|
|
|
if (notebook->menu && page->menu_label->parent &&
|
|
|
|
GTK_WIDGET_VISIBLE (page->menu_label->parent))
|
|
|
|
gtk_widget_hide (page->menu_label->parent);
|
|
|
|
}
|
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->show_border || notebook->show_tabs)
|
|
|
|
{
|
Make this compile without framebuffer enabled
2000-06-20 Havoc Pennington <hp@redhat.com>
* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled
* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure
* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height
* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.
2000-06-19 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.
2000-06-14 Havoc Pennington <hp@redhat.com>
* gdk/Makefile.am: add gdkpixmap.c
* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
s/gdk_image_init/_gdk_windowing_image_init
* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
ref/unref
* gdk/gdkcolor.h: make GdkColormap a GObject subclass
* gdk/gdkcompat.h: remove GdkWindowType compat, since
GdkWindowType is now non-deprecated;
change gdk_window_get_type() compat to be
gdk_window_get_window_type().
* gdk/gdkdnd.h: make GdkDragContext a GObject.
* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
virtual GObject. Make all functions call into the vtable.
Move gdk_image_put() guts in here. Remove GdkDrawableType
and gdk_drawable_get_type(), these are now GdkWindow-specific.
draw_image, get_depth, get_size, set_colormap, get_colormap,
get_visual added to the vtable.
* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
GObject. Virtualize everything.
(gdk_gc_new_with_values): remove check for destroyed window,
because now GdkWindow::create_gc will check this.
(gdk_gc_set_values): New function to set GC values, this
was already implemented but wasn't in the header
* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.
* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
_gdk_window_draw_image(), remove _gdk_windowing_window_class,
remove _gdk_window_class; add _gdk_window_impl_get_type() and
_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
_gdk_windowing_window_init, rename gdk_image_init to
_gdk_windowing_image_init.
* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
(gdk_draw_layout): Remove check for destroyed window,
because all the drawable methods already check it.
* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
Add gdkpixmap.c which contains implementation of GdkDrawable
virtual table (by chaining to a platform-specific implementation
object).
* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
GdkColormapPrivate.
* gdk/gdktypes.h: #include <glib-object.h>
* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
Move most functionality to platform-specific implementation
object. GdkWindow itself now handles the backing store, then
chains to the platform-specific implementation.
(gdk_window_get_window_type): return GdkWindowType of the window.
(gdk_window_peek_children): New routine, returns the children of
a GdkWindow
(gdk_window_get_children): Was in X11-specific code and did
XQueryTree. Changed to simply return a copy of window->children;
so it can go in cross-platform code.
* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path
* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
GdkColormap; just changed to use the new private data instead
of casting to GdkColormapPrivate.
* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
gdk_cursor_new().
* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
(private data member in the GObject).
(xdnd_manager_source_filter): Function had broken
error handling, fix it (use gdk_error_trap_push).
* gdk/x11/gdkdrawable-x11.c: This file now implements
a base class for GdkWindowImplX11/GdkPixmapImplX11. This
base class is purely for the convenience of the X port,
and not part of the interface to cross-platform GDK.
* gdk/x11/gdkevents-x11.c: Reflect various renamings.
* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
specific to X, and returned by the create_gc virtual method
of GdkDrawableImplX11.
(gdk_x11_gc_set_dashes): Change this to take an array of gint8
rather than gchar, this was also changed in the GdkGC vtable.
(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
mask is 0, return immediately, instead of checking every flag.
This is faster, and keeps us from segfaulting if values is NULL
and the mask contains some nonzero flags.
* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
GdkWindow.
* gdk/x11/gdkglobals-x11.c: change type of grab window, since
GdkWindowPrivate is gone.
* gdk/x11/gdkim-x11.c: rename things that got renamed.
* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
remove the image_put stuff that got transferred to GdkDrawable.
* gdk/x11/gdkinput.c: renamings
* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>
* gdk/x11/gdkpixmap-x11.c: GObject conversion
* gdk/x11/gdkprivate-x11.h: indentation fixes
* gdk/x11/gdkproperty-x11.c: renamings
* gdk/x11/gdkselection-x11.c: renamings
* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
implements the platform-specific "impl" object.
Moved gdk_window_get_children to gdk/gdkwindow.c
* gdk/x11/gdkx.h: Remove all the private structs and private datas
that no longer exist. Add declaration of GdkGCX11 object here.
Fix all the macros to still work.
* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
GdkDragContext from the boxed types since they are now GObjects.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
moved xthickness/ythickness into the instance. GtkStyleClass
functions are now in the standard vtable for GtkStyle, so you have
to create a GObject subclass to write a theme engine.
(gtk_style_copy): fixed a leaked PangoFontDescription
(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
can be the standard GObject function.
* Throughout GTK:
s/style->klass->[xy]thickness/style->[xy]thickness
s/pango_layout_unref/g_object_unref/
* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.
* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
accessing GDK internals.
* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
accessing GDK internals.
2000-06-20 21:04:44 +00:00
|
|
|
widget->requisition.width += widget->style->xthickness * 2;
|
|
|
|
widget->requisition.height += widget->style->ythickness * 2;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->show_tabs)
|
|
|
|
{
|
|
|
|
gint tab_width = 0;
|
|
|
|
gint tab_height = 0;
|
|
|
|
gint tab_max = 0;
|
|
|
|
gint padding;
|
|
|
|
|
|
|
|
for (children = notebook->children; children;
|
|
|
|
children = children->next)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
{
|
|
|
|
if (!GTK_WIDGET_VISIBLE (page->tab_label))
|
|
|
|
gtk_widget_show (page->tab_label);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1999-02-10 02:35:09 +00:00
|
|
|
gtk_widget_size_request (page->tab_label,
|
|
|
|
&child_requisition);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page->requisition.width =
|
1999-02-10 02:35:09 +00:00
|
|
|
child_requisition.width +
|
Make this compile without framebuffer enabled
2000-06-20 Havoc Pennington <hp@redhat.com>
* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled
* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure
* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height
* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.
2000-06-19 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.
2000-06-14 Havoc Pennington <hp@redhat.com>
* gdk/Makefile.am: add gdkpixmap.c
* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
s/gdk_image_init/_gdk_windowing_image_init
* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
ref/unref
* gdk/gdkcolor.h: make GdkColormap a GObject subclass
* gdk/gdkcompat.h: remove GdkWindowType compat, since
GdkWindowType is now non-deprecated;
change gdk_window_get_type() compat to be
gdk_window_get_window_type().
* gdk/gdkdnd.h: make GdkDragContext a GObject.
* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
virtual GObject. Make all functions call into the vtable.
Move gdk_image_put() guts in here. Remove GdkDrawableType
and gdk_drawable_get_type(), these are now GdkWindow-specific.
draw_image, get_depth, get_size, set_colormap, get_colormap,
get_visual added to the vtable.
* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
GObject. Virtualize everything.
(gdk_gc_new_with_values): remove check for destroyed window,
because now GdkWindow::create_gc will check this.
(gdk_gc_set_values): New function to set GC values, this
was already implemented but wasn't in the header
* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.
* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
_gdk_window_draw_image(), remove _gdk_windowing_window_class,
remove _gdk_window_class; add _gdk_window_impl_get_type() and
_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
_gdk_windowing_window_init, rename gdk_image_init to
_gdk_windowing_image_init.
* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
(gdk_draw_layout): Remove check for destroyed window,
because all the drawable methods already check it.
* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
Add gdkpixmap.c which contains implementation of GdkDrawable
virtual table (by chaining to a platform-specific implementation
object).
* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
GdkColormapPrivate.
* gdk/gdktypes.h: #include <glib-object.h>
* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
Move most functionality to platform-specific implementation
object. GdkWindow itself now handles the backing store, then
chains to the platform-specific implementation.
(gdk_window_get_window_type): return GdkWindowType of the window.
(gdk_window_peek_children): New routine, returns the children of
a GdkWindow
(gdk_window_get_children): Was in X11-specific code and did
XQueryTree. Changed to simply return a copy of window->children;
so it can go in cross-platform code.
* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path
* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
GdkColormap; just changed to use the new private data instead
of casting to GdkColormapPrivate.
* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
gdk_cursor_new().
* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
(private data member in the GObject).
(xdnd_manager_source_filter): Function had broken
error handling, fix it (use gdk_error_trap_push).
* gdk/x11/gdkdrawable-x11.c: This file now implements
a base class for GdkWindowImplX11/GdkPixmapImplX11. This
base class is purely for the convenience of the X port,
and not part of the interface to cross-platform GDK.
* gdk/x11/gdkevents-x11.c: Reflect various renamings.
* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
specific to X, and returned by the create_gc virtual method
of GdkDrawableImplX11.
(gdk_x11_gc_set_dashes): Change this to take an array of gint8
rather than gchar, this was also changed in the GdkGC vtable.
(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
mask is 0, return immediately, instead of checking every flag.
This is faster, and keeps us from segfaulting if values is NULL
and the mask contains some nonzero flags.
* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
GdkWindow.
* gdk/x11/gdkglobals-x11.c: change type of grab window, since
GdkWindowPrivate is gone.
* gdk/x11/gdkim-x11.c: rename things that got renamed.
* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
remove the image_put stuff that got transferred to GdkDrawable.
* gdk/x11/gdkinput.c: renamings
* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>
* gdk/x11/gdkpixmap-x11.c: GObject conversion
* gdk/x11/gdkprivate-x11.h: indentation fixes
* gdk/x11/gdkproperty-x11.c: renamings
* gdk/x11/gdkselection-x11.c: renamings
* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
implements the platform-specific "impl" object.
Moved gdk_window_get_children to gdk/gdkwindow.c
* gdk/x11/gdkx.h: Remove all the private structs and private datas
that no longer exist. Add declaration of GdkGCX11 object here.
Fix all the macros to still work.
* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
GdkDragContext from the boxed types since they are now GObjects.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
moved xthickness/ythickness into the instance. GtkStyleClass
functions are now in the standard vtable for GtkStyle, so you have
to create a GObject subclass to write a theme engine.
(gtk_style_copy): fixed a leaked PangoFontDescription
(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
can be the standard GObject function.
* Throughout GTK:
s/style->klass->[xy]thickness/style->[xy]thickness
s/pango_layout_unref/g_object_unref/
* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.
* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
accessing GDK internals.
* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
accessing GDK internals.
2000-06-20 21:04:44 +00:00
|
|
|
2 * widget->style->xthickness;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page->requisition.height =
|
1999-02-10 02:35:09 +00:00
|
|
|
child_requisition.height +
|
Make this compile without framebuffer enabled
2000-06-20 Havoc Pennington <hp@redhat.com>
* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled
* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure
* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height
* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.
2000-06-19 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.
2000-06-14 Havoc Pennington <hp@redhat.com>
* gdk/Makefile.am: add gdkpixmap.c
* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
s/gdk_image_init/_gdk_windowing_image_init
* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
ref/unref
* gdk/gdkcolor.h: make GdkColormap a GObject subclass
* gdk/gdkcompat.h: remove GdkWindowType compat, since
GdkWindowType is now non-deprecated;
change gdk_window_get_type() compat to be
gdk_window_get_window_type().
* gdk/gdkdnd.h: make GdkDragContext a GObject.
* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
virtual GObject. Make all functions call into the vtable.
Move gdk_image_put() guts in here. Remove GdkDrawableType
and gdk_drawable_get_type(), these are now GdkWindow-specific.
draw_image, get_depth, get_size, set_colormap, get_colormap,
get_visual added to the vtable.
* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
GObject. Virtualize everything.
(gdk_gc_new_with_values): remove check for destroyed window,
because now GdkWindow::create_gc will check this.
(gdk_gc_set_values): New function to set GC values, this
was already implemented but wasn't in the header
* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.
* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
_gdk_window_draw_image(), remove _gdk_windowing_window_class,
remove _gdk_window_class; add _gdk_window_impl_get_type() and
_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
_gdk_windowing_window_init, rename gdk_image_init to
_gdk_windowing_image_init.
* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
(gdk_draw_layout): Remove check for destroyed window,
because all the drawable methods already check it.
* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
Add gdkpixmap.c which contains implementation of GdkDrawable
virtual table (by chaining to a platform-specific implementation
object).
* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
GdkColormapPrivate.
* gdk/gdktypes.h: #include <glib-object.h>
* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
Move most functionality to platform-specific implementation
object. GdkWindow itself now handles the backing store, then
chains to the platform-specific implementation.
(gdk_window_get_window_type): return GdkWindowType of the window.
(gdk_window_peek_children): New routine, returns the children of
a GdkWindow
(gdk_window_get_children): Was in X11-specific code and did
XQueryTree. Changed to simply return a copy of window->children;
so it can go in cross-platform code.
* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path
* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
GdkColormap; just changed to use the new private data instead
of casting to GdkColormapPrivate.
* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
gdk_cursor_new().
* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
(private data member in the GObject).
(xdnd_manager_source_filter): Function had broken
error handling, fix it (use gdk_error_trap_push).
* gdk/x11/gdkdrawable-x11.c: This file now implements
a base class for GdkWindowImplX11/GdkPixmapImplX11. This
base class is purely for the convenience of the X port,
and not part of the interface to cross-platform GDK.
* gdk/x11/gdkevents-x11.c: Reflect various renamings.
* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
specific to X, and returned by the create_gc virtual method
of GdkDrawableImplX11.
(gdk_x11_gc_set_dashes): Change this to take an array of gint8
rather than gchar, this was also changed in the GdkGC vtable.
(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
mask is 0, return immediately, instead of checking every flag.
This is faster, and keeps us from segfaulting if values is NULL
and the mask contains some nonzero flags.
* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
GdkWindow.
* gdk/x11/gdkglobals-x11.c: change type of grab window, since
GdkWindowPrivate is gone.
* gdk/x11/gdkim-x11.c: rename things that got renamed.
* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
remove the image_put stuff that got transferred to GdkDrawable.
* gdk/x11/gdkinput.c: renamings
* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>
* gdk/x11/gdkpixmap-x11.c: GObject conversion
* gdk/x11/gdkprivate-x11.h: indentation fixes
* gdk/x11/gdkproperty-x11.c: renamings
* gdk/x11/gdkselection-x11.c: renamings
* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
implements the platform-specific "impl" object.
Moved gdk_window_get_children to gdk/gdkwindow.c
* gdk/x11/gdkx.h: Remove all the private structs and private datas
that no longer exist. Add declaration of GdkGCX11 object here.
Fix all the macros to still work.
* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
GdkDragContext from the boxed types since they are now GObjects.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
moved xthickness/ythickness into the instance. GtkStyleClass
functions are now in the standard vtable for GtkStyle, so you have
to create a GObject subclass to write a theme engine.
(gtk_style_copy): fixed a leaked PangoFontDescription
(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
can be the standard GObject function.
* Throughout GTK:
s/style->klass->[xy]thickness/style->[xy]thickness
s/pango_layout_unref/g_object_unref/
* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.
* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
accessing GDK internals.
* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
accessing GDK internals.
2000-06-20 21:04:44 +00:00
|
|
|
2 * widget->style->ythickness;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
switch (notebook->tab_pos)
|
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
|
|
|
page->requisition.height += 2 * (notebook->tab_vborder +
|
2001-12-04 03:27:30 +00:00
|
|
|
focus_width);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
tab_height = MAX (tab_height, page->requisition.height);
|
|
|
|
tab_max = MAX (tab_max, page->requisition.width);
|
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
|
|
|
page->requisition.width += 2 * (notebook->tab_hborder +
|
2001-12-04 03:27:30 +00:00
|
|
|
focus_width);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
tab_width = MAX (tab_width, page->requisition.width);
|
|
|
|
tab_max = MAX (tab_max, page->requisition.height);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (GTK_WIDGET_VISIBLE (page->tab_label))
|
|
|
|
gtk_widget_hide (page->tab_label);
|
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
children = notebook->children;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (vis_pages)
|
|
|
|
{
|
|
|
|
switch (notebook->tab_pos)
|
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
|
|
|
if (tab_height == 0)
|
|
|
|
break;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->scrollable && vis_pages > 1 &&
|
|
|
|
widget->requisition.width < tab_width)
|
|
|
|
tab_height = MAX (tab_height, ARROW_SIZE);
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2006-01-12 21:31:55 +00:00
|
|
|
padding = 2 * (tab_curvature + focus_width +
|
|
|
|
notebook->tab_hborder) - tab_overlap;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
tab_max += padding;
|
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
children = children->next;
|
|
|
|
|
|
|
|
if (!GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
continue;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->homogeneous)
|
|
|
|
page->requisition.width = tab_max;
|
|
|
|
else
|
|
|
|
page->requisition.width += padding;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
tab_width += page->requisition.width;
|
|
|
|
page->requisition.height = tab_height;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->scrollable && vis_pages > 1 &&
|
|
|
|
widget->requisition.width < tab_width)
|
|
|
|
tab_width = tab_max + 2 * (ARROW_SIZE + ARROW_SPACING);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->homogeneous && !notebook->scrollable)
|
|
|
|
widget->requisition.width = MAX (widget->requisition.width,
|
|
|
|
vis_pages * tab_max +
|
2006-01-12 21:31:55 +00:00
|
|
|
tab_overlap);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
|
|
|
widget->requisition.width = MAX (widget->requisition.width,
|
2006-01-12 21:31:55 +00:00
|
|
|
tab_width + tab_overlap);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
widget->requisition.height += tab_height;
|
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
|
|
|
if (tab_width == 0)
|
|
|
|
break;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->scrollable && vis_pages > 1 &&
|
|
|
|
widget->requisition.height < tab_height)
|
2003-05-22 22:34:31 +00:00
|
|
|
tab_width = MAX (tab_width, ARROW_SPACING + 2 * ARROW_SIZE);
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2006-01-12 21:31:55 +00:00
|
|
|
padding = 2 * (tab_curvature + focus_width +
|
|
|
|
notebook->tab_vborder) - tab_overlap;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
tab_max += padding;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
children = children->next;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
continue;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page->requisition.width = tab_width;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->homogeneous)
|
|
|
|
page->requisition.height = tab_max;
|
|
|
|
else
|
|
|
|
page->requisition.height += padding;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
tab_height += page->requisition.height;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->scrollable && vis_pages > 1 &&
|
|
|
|
widget->requisition.height < tab_height)
|
|
|
|
tab_height = tab_max + ARROW_SIZE + ARROW_SPACING;
|
|
|
|
|
|
|
|
widget->requisition.width += tab_width;
|
|
|
|
|
|
|
|
if (notebook->homogeneous && !notebook->scrollable)
|
|
|
|
widget->requisition.height =
|
|
|
|
MAX (widget->requisition.height,
|
2006-01-12 21:31:55 +00:00
|
|
|
vis_pages * tab_max + tab_overlap);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
|
|
|
widget->requisition.height =
|
|
|
|
MAX (widget->requisition.height,
|
2006-01-12 21:31:55 +00:00
|
|
|
tab_height + tab_overlap);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (!notebook->homogeneous || notebook->scrollable)
|
|
|
|
vis_pages = 1;
|
|
|
|
widget->requisition.height = MAX (widget->requisition.height,
|
|
|
|
vis_pages * tab_max +
|
2006-01-12 21:31:55 +00:00
|
|
|
tab_overlap);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
1998-03-12 07:28:41 +00:00
|
|
|
}
|
2000-03-14 19:57:25 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
for (children = notebook->children; children;
|
|
|
|
children = children->next)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
|
|
|
|
if (page->tab_label && GTK_WIDGET_VISIBLE (page->tab_label))
|
|
|
|
gtk_widget_hide (page->tab_label);
|
|
|
|
}
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
widget->requisition.width += GTK_CONTAINER (widget)->border_width * 2;
|
|
|
|
widget->requisition.height += GTK_CONTAINER (widget)->border_width * 2;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (switch_page)
|
1998-07-16 20:23:12 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (vis_pages)
|
|
|
|
{
|
|
|
|
for (children = notebook->children; children;
|
|
|
|
children = children->next)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
{
|
|
|
|
gtk_notebook_switch_page (notebook, page, -1);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (GTK_WIDGET_VISIBLE (widget))
|
|
|
|
{
|
|
|
|
widget->requisition.width = GTK_CONTAINER (widget)->border_width * 2;
|
|
|
|
widget->requisition.height= GTK_CONTAINER (widget)->border_width * 2;
|
|
|
|
}
|
1998-07-16 20:23:12 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (vis_pages && !notebook->cur_page)
|
1998-07-16 20:23:12 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
children = gtk_notebook_search_page (notebook, NULL, STEP_NEXT, TRUE);
|
|
|
|
if (children)
|
|
|
|
{
|
|
|
|
notebook->first_tab = children;
|
|
|
|
gtk_notebook_switch_page (notebook, GTK_NOTEBOOK_PAGE (children),-1);
|
|
|
|
}
|
1998-07-16 20:23:12 +00:00
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_size_allocate (GtkWidget *widget,
|
|
|
|
GtkAllocation *allocation)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2001-11-16 19:19:30 +00:00
|
|
|
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
|
2002-01-18 01:18:05 +00:00
|
|
|
gint vis_pages = 0;
|
2003-12-08 21:07:17 +00:00
|
|
|
gint tab_pos = get_effective_tab_pos (notebook);
|
2001-11-15 21:04:51 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
widget->allocation = *allocation;
|
|
|
|
if (GTK_WIDGET_REALIZED (widget))
|
2001-11-15 21:04:51 +00:00
|
|
|
{
|
|
|
|
GdkRectangle position;
|
|
|
|
|
|
|
|
if (gtk_notebook_get_event_window_position (notebook, &position))
|
2003-01-15 20:31:28 +00:00
|
|
|
{
|
|
|
|
gdk_window_move_resize (notebook->event_window,
|
|
|
|
position.x, position.y,
|
|
|
|
position.width, position.height);
|
2003-06-02 23:05:45 +00:00
|
|
|
if (GTK_WIDGET_MAPPED (notebook))
|
|
|
|
gdk_window_show_unraised (notebook->event_window);
|
2003-01-15 20:31:28 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
gdk_window_hide (notebook->event_window);
|
2001-11-15 21:04:51 +00:00
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->children)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
2001-11-16 19:19:30 +00:00
|
|
|
gint border_width = GTK_CONTAINER (widget)->border_width;
|
|
|
|
GtkNotebookPage *page;
|
|
|
|
GtkAllocation child_allocation;
|
|
|
|
GList *children;
|
|
|
|
|
|
|
|
child_allocation.x = widget->allocation.x + border_width;
|
|
|
|
child_allocation.y = widget->allocation.y + border_width;
|
|
|
|
child_allocation.width = MAX (1, allocation->width - border_width * 2);
|
|
|
|
child_allocation.height = MAX (1, allocation->height - border_width * 2);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (notebook->show_tabs || notebook->show_border)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
Make this compile without framebuffer enabled
2000-06-20 Havoc Pennington <hp@redhat.com>
* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled
* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure
* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height
* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.
2000-06-19 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.
2000-06-14 Havoc Pennington <hp@redhat.com>
* gdk/Makefile.am: add gdkpixmap.c
* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
s/gdk_image_init/_gdk_windowing_image_init
* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
ref/unref
* gdk/gdkcolor.h: make GdkColormap a GObject subclass
* gdk/gdkcompat.h: remove GdkWindowType compat, since
GdkWindowType is now non-deprecated;
change gdk_window_get_type() compat to be
gdk_window_get_window_type().
* gdk/gdkdnd.h: make GdkDragContext a GObject.
* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
virtual GObject. Make all functions call into the vtable.
Move gdk_image_put() guts in here. Remove GdkDrawableType
and gdk_drawable_get_type(), these are now GdkWindow-specific.
draw_image, get_depth, get_size, set_colormap, get_colormap,
get_visual added to the vtable.
* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
GObject. Virtualize everything.
(gdk_gc_new_with_values): remove check for destroyed window,
because now GdkWindow::create_gc will check this.
(gdk_gc_set_values): New function to set GC values, this
was already implemented but wasn't in the header
* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.
* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
_gdk_window_draw_image(), remove _gdk_windowing_window_class,
remove _gdk_window_class; add _gdk_window_impl_get_type() and
_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
_gdk_windowing_window_init, rename gdk_image_init to
_gdk_windowing_image_init.
* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
(gdk_draw_layout): Remove check for destroyed window,
because all the drawable methods already check it.
* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
Add gdkpixmap.c which contains implementation of GdkDrawable
virtual table (by chaining to a platform-specific implementation
object).
* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
GdkColormapPrivate.
* gdk/gdktypes.h: #include <glib-object.h>
* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
Move most functionality to platform-specific implementation
object. GdkWindow itself now handles the backing store, then
chains to the platform-specific implementation.
(gdk_window_get_window_type): return GdkWindowType of the window.
(gdk_window_peek_children): New routine, returns the children of
a GdkWindow
(gdk_window_get_children): Was in X11-specific code and did
XQueryTree. Changed to simply return a copy of window->children;
so it can go in cross-platform code.
* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path
* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
GdkColormap; just changed to use the new private data instead
of casting to GdkColormapPrivate.
* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
gdk_cursor_new().
* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
(private data member in the GObject).
(xdnd_manager_source_filter): Function had broken
error handling, fix it (use gdk_error_trap_push).
* gdk/x11/gdkdrawable-x11.c: This file now implements
a base class for GdkWindowImplX11/GdkPixmapImplX11. This
base class is purely for the convenience of the X port,
and not part of the interface to cross-platform GDK.
* gdk/x11/gdkevents-x11.c: Reflect various renamings.
* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
specific to X, and returned by the create_gc virtual method
of GdkDrawableImplX11.
(gdk_x11_gc_set_dashes): Change this to take an array of gint8
rather than gchar, this was also changed in the GdkGC vtable.
(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
mask is 0, return immediately, instead of checking every flag.
This is faster, and keeps us from segfaulting if values is NULL
and the mask contains some nonzero flags.
* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
GdkWindow.
* gdk/x11/gdkglobals-x11.c: change type of grab window, since
GdkWindowPrivate is gone.
* gdk/x11/gdkim-x11.c: rename things that got renamed.
* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
remove the image_put stuff that got transferred to GdkDrawable.
* gdk/x11/gdkinput.c: renamings
* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>
* gdk/x11/gdkpixmap-x11.c: GObject conversion
* gdk/x11/gdkprivate-x11.h: indentation fixes
* gdk/x11/gdkproperty-x11.c: renamings
* gdk/x11/gdkselection-x11.c: renamings
* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
implements the platform-specific "impl" object.
Moved gdk_window_get_children to gdk/gdkwindow.c
* gdk/x11/gdkx.h: Remove all the private structs and private datas
that no longer exist. Add declaration of GdkGCX11 object here.
Fix all the macros to still work.
* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
GdkDragContext from the boxed types since they are now GObjects.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
moved xthickness/ythickness into the instance. GtkStyleClass
functions are now in the standard vtable for GtkStyle, so you have
to create a GObject subclass to write a theme engine.
(gtk_style_copy): fixed a leaked PangoFontDescription
(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
can be the standard GObject function.
* Throughout GTK:
s/style->klass->[xy]thickness/style->[xy]thickness
s/pango_layout_unref/g_object_unref/
* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.
* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
accessing GDK internals.
* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
accessing GDK internals.
2000-06-20 21:04:44 +00:00
|
|
|
child_allocation.x += widget->style->xthickness;
|
|
|
|
child_allocation.y += widget->style->ythickness;
|
2001-11-15 21:04:51 +00:00
|
|
|
child_allocation.width = MAX (1, child_allocation.width -
|
|
|
|
widget->style->xthickness * 2);
|
|
|
|
child_allocation.height = MAX (1, child_allocation.height -
|
|
|
|
widget->style->ythickness * 2);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (notebook->show_tabs && notebook->children && notebook->cur_page)
|
|
|
|
{
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
child_allocation.y += notebook->cur_page->requisition.height;
|
|
|
|
case GTK_POS_BOTTOM:
|
|
|
|
child_allocation.height =
|
2001-11-15 21:04:51 +00:00
|
|
|
MAX (1, child_allocation.height -
|
|
|
|
notebook->cur_page->requisition.height);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
child_allocation.x += notebook->cur_page->requisition.width;
|
|
|
|
case GTK_POS_RIGHT:
|
|
|
|
child_allocation.width =
|
2001-11-15 21:04:51 +00:00
|
|
|
MAX (1, child_allocation.width -
|
|
|
|
notebook->cur_page->requisition.width);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
children = notebook->children;
|
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
children = children->next;
|
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
2002-01-18 01:18:05 +00:00
|
|
|
{
|
|
|
|
gtk_widget_size_allocate (page->child, &child_allocation);
|
|
|
|
vis_pages++;
|
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_pages_allocate (notebook);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static gint
|
|
|
|
gtk_notebook_expose (GtkWidget *widget,
|
|
|
|
GdkEventExpose *event)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebook *notebook;
|
|
|
|
GdkRectangle child_area;
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (widget), FALSE);
|
|
|
|
g_return_val_if_fail (event != NULL, FALSE);
|
1998-02-21 14:11:40 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (GTK_WIDGET_DRAWABLE (widget))
|
|
|
|
{
|
|
|
|
notebook = GTK_NOTEBOOK (widget);
|
1998-03-12 07:28:41 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_paint (widget, &event->area);
|
1998-11-26 18:47:58 +00:00
|
|
|
if (notebook->show_tabs)
|
|
|
|
{
|
|
|
|
if (notebook->cur_page &&
|
|
|
|
gtk_widget_intersect (notebook->cur_page->tab_label,
|
|
|
|
&event->area, &child_area))
|
2001-02-28 19:07:46 +00:00
|
|
|
gtk_notebook_draw_focus (widget);
|
1998-11-26 18:47:58 +00:00
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2001-03-09 13:28:26 +00:00
|
|
|
|
|
|
|
if (notebook->cur_page)
|
|
|
|
gtk_container_propagate_expose (GTK_CONTAINER (notebook),
|
|
|
|
notebook->cur_page->child,
|
|
|
|
event);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1998-02-21 14:11:40 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
return FALSE;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
static gboolean
|
|
|
|
gtk_notebook_show_arrows (GtkNotebook *notebook)
|
|
|
|
{
|
|
|
|
gboolean show_arrow = FALSE;
|
|
|
|
GList *children;
|
|
|
|
|
|
|
|
if (!notebook->scrollable)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
children = notebook->children;
|
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
GtkNotebookPage *page = children->data;
|
|
|
|
|
|
|
|
if (page->tab_label && !gtk_widget_get_child_visible (page->tab_label))
|
|
|
|
show_arrow = TRUE;
|
|
|
|
|
|
|
|
children = children->next;
|
|
|
|
}
|
|
|
|
|
|
|
|
return show_arrow;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2003-05-22 22:34:31 +00:00
|
|
|
gtk_notebook_get_arrow_rect (GtkNotebook *notebook,
|
|
|
|
GdkRectangle *rectangle,
|
|
|
|
GtkNotebookArrow arrow)
|
2001-11-15 21:04:51 +00:00
|
|
|
{
|
|
|
|
GdkRectangle event_window_pos;
|
2003-05-22 22:34:31 +00:00
|
|
|
gboolean before = ARROW_IS_BEFORE (arrow);
|
|
|
|
gboolean left = ARROW_IS_LEFT (arrow);
|
2001-11-15 21:04:51 +00:00
|
|
|
|
|
|
|
if (gtk_notebook_get_event_window_position (notebook, &event_window_pos))
|
|
|
|
{
|
2003-05-22 22:34:31 +00:00
|
|
|
rectangle->width = ARROW_SIZE;
|
2001-11-15 21:04:51 +00:00
|
|
|
rectangle->height = ARROW_SIZE;
|
|
|
|
|
|
|
|
switch (notebook->tab_pos)
|
|
|
|
{
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
2003-05-22 22:34:31 +00:00
|
|
|
if ((before && (notebook->has_before_previous != notebook->has_before_next)) ||
|
|
|
|
(!before && (notebook->has_after_previous != notebook->has_after_next)))
|
2001-11-15 21:12:27 +00:00
|
|
|
rectangle->x = event_window_pos.x + (event_window_pos.width - rectangle->width) / 2;
|
2003-05-22 22:34:31 +00:00
|
|
|
else if (left)
|
|
|
|
rectangle->x = event_window_pos.x + event_window_pos.width / 2 - rectangle->width;
|
|
|
|
else
|
|
|
|
rectangle->x = event_window_pos.x + event_window_pos.width / 2;
|
|
|
|
rectangle->y = event_window_pos.y;
|
|
|
|
if (!before)
|
|
|
|
rectangle->y += event_window_pos.height - rectangle->height;
|
2001-11-15 21:04:51 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
2003-05-22 22:34:31 +00:00
|
|
|
if (before)
|
|
|
|
{
|
|
|
|
if (left || !notebook->has_before_previous)
|
|
|
|
rectangle->x = event_window_pos.x;
|
|
|
|
else
|
|
|
|
rectangle->x = event_window_pos.x + rectangle->width;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!left || !notebook->has_after_next)
|
|
|
|
rectangle->x = event_window_pos.x + event_window_pos.width - rectangle->width;
|
|
|
|
else
|
|
|
|
rectangle->x = event_window_pos.x + event_window_pos.width - 2 * rectangle->width;
|
|
|
|
}
|
2001-11-15 21:04:51 +00:00
|
|
|
rectangle->y = event_window_pos.y + (event_window_pos.height - rectangle->height) / 2;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-05-22 22:34:31 +00:00
|
|
|
static GtkNotebookArrow
|
2001-11-15 21:04:51 +00:00
|
|
|
gtk_notebook_get_arrow (GtkNotebook *notebook,
|
|
|
|
gint x,
|
|
|
|
gint y)
|
|
|
|
{
|
|
|
|
GdkRectangle arrow_rect;
|
|
|
|
GdkRectangle event_window_pos;
|
2003-05-22 22:34:31 +00:00
|
|
|
gint i;
|
|
|
|
gint x0, y0;
|
|
|
|
GtkNotebookArrow arrow[4];
|
|
|
|
|
|
|
|
arrow[0] = notebook->has_before_previous ? ARROW_LEFT_BEFORE : ARROW_NONE;
|
|
|
|
arrow[1] = notebook->has_before_next ? ARROW_RIGHT_BEFORE : ARROW_NONE;
|
|
|
|
arrow[2] = notebook->has_after_previous ? ARROW_LEFT_AFTER : ARROW_NONE;
|
|
|
|
arrow[3] = notebook->has_after_next ? ARROW_RIGHT_AFTER : ARROW_NONE;
|
2001-11-15 21:04:51 +00:00
|
|
|
|
|
|
|
if (gtk_notebook_show_arrows (notebook))
|
|
|
|
{
|
|
|
|
gtk_notebook_get_event_window_position (notebook, &event_window_pos);
|
2003-05-22 22:34:31 +00:00
|
|
|
for (i = 0; i < 4; i++)
|
|
|
|
{
|
|
|
|
if (arrow[i] == ARROW_NONE)
|
|
|
|
continue;
|
2001-11-15 21:04:51 +00:00
|
|
|
|
2003-05-22 22:34:31 +00:00
|
|
|
gtk_notebook_get_arrow_rect (notebook, &arrow_rect, arrow[i]);
|
2001-11-15 21:04:51 +00:00
|
|
|
|
2003-05-22 22:34:31 +00:00
|
|
|
x0 = x - arrow_rect.x;
|
|
|
|
y0 = y - arrow_rect.y;
|
|
|
|
|
|
|
|
if (y0 >= 0 && y0 < arrow_rect.height &&
|
|
|
|
x0 >= 0 && x0 < arrow_rect.width)
|
|
|
|
return arrow[i];
|
2001-11-15 21:04:51 +00:00
|
|
|
}
|
|
|
|
}
|
2003-05-22 22:34:31 +00:00
|
|
|
|
|
|
|
return ARROW_NONE;
|
2001-11-15 21:04:51 +00:00
|
|
|
}
|
|
|
|
|
2002-03-07 15:39:31 +00:00
|
|
|
static void
|
2003-05-22 22:34:31 +00:00
|
|
|
gtk_notebook_do_arrow (GtkNotebook *notebook,
|
|
|
|
GtkNotebookArrow arrow)
|
2002-03-07 15:39:31 +00:00
|
|
|
{
|
|
|
|
GtkWidget *widget = GTK_WIDGET (notebook);
|
|
|
|
GtkDirectionType dir;
|
2003-12-08 21:07:17 +00:00
|
|
|
gboolean is_rtl, left;
|
|
|
|
|
|
|
|
is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
|
|
|
|
left = (ARROW_IS_LEFT (arrow) && !is_rtl) ||
|
|
|
|
(!ARROW_IS_LEFT (arrow) && is_rtl);
|
2002-03-07 15:39:31 +00:00
|
|
|
|
|
|
|
if (!notebook->focus_tab ||
|
|
|
|
gtk_notebook_search_page (notebook, notebook->focus_tab,
|
2003-05-22 22:34:31 +00:00
|
|
|
left ? STEP_PREV : STEP_NEXT,
|
2002-03-07 15:39:31 +00:00
|
|
|
TRUE))
|
|
|
|
{
|
|
|
|
if (notebook->tab_pos == GTK_POS_LEFT ||
|
|
|
|
notebook->tab_pos == GTK_POS_RIGHT)
|
2003-12-08 21:07:17 +00:00
|
|
|
dir = ARROW_IS_LEFT (arrow) ? GTK_DIR_UP : GTK_DIR_DOWN;
|
2002-03-07 15:39:31 +00:00
|
|
|
else
|
2003-12-08 21:07:17 +00:00
|
|
|
dir = ARROW_IS_LEFT (arrow) ? GTK_DIR_LEFT : GTK_DIR_RIGHT;
|
2002-03-07 15:39:31 +00:00
|
|
|
gtk_widget_child_focus (widget, dir);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
static gboolean
|
2003-05-22 22:34:31 +00:00
|
|
|
gtk_notebook_arrow_button_press (GtkNotebook *notebook,
|
|
|
|
GtkNotebookArrow arrow,
|
|
|
|
GdkEventButton *event)
|
2000-12-11 17:47:24 +00:00
|
|
|
{
|
|
|
|
GtkWidget *widget = GTK_WIDGET (notebook);
|
2003-12-08 21:07:17 +00:00
|
|
|
gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
|
|
|
|
gboolean left = (ARROW_IS_LEFT (arrow) && !is_rtl) ||
|
|
|
|
(!ARROW_IS_LEFT (arrow) && is_rtl);
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
if (!GTK_WIDGET_HAS_FOCUS (widget))
|
|
|
|
gtk_widget_grab_focus (widget);
|
|
|
|
|
|
|
|
notebook->button = event->button;
|
|
|
|
notebook->click_child = arrow;
|
|
|
|
|
|
|
|
if (event->button == 1)
|
|
|
|
{
|
2002-03-07 15:39:31 +00:00
|
|
|
gtk_notebook_do_arrow (notebook, arrow);
|
2000-12-11 17:47:24 +00:00
|
|
|
|
|
|
|
if (!notebook->timer)
|
|
|
|
{
|
2005-11-22 12:40:15 +00:00
|
|
|
GtkSettings *settings = gtk_widget_get_settings (widget);
|
|
|
|
guint timeout;
|
|
|
|
|
|
|
|
g_object_get (settings, "gtk-timeout-initial", &timeout, NULL);
|
|
|
|
|
|
|
|
notebook->timer = g_timeout_add (timeout,
|
|
|
|
(GSourceFunc) gtk_notebook_timer,
|
2003-02-05 23:48:11 +00:00
|
|
|
(gpointer) notebook);
|
2000-12-11 17:47:24 +00:00
|
|
|
notebook->need_timer = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (event->button == 2)
|
|
|
|
gtk_notebook_page_select (notebook, TRUE);
|
|
|
|
else if (event->button == 3)
|
|
|
|
gtk_notebook_switch_focus_tab (notebook,
|
|
|
|
gtk_notebook_search_page (notebook,
|
|
|
|
NULL,
|
2003-12-08 21:07:17 +00:00
|
|
|
left ? STEP_NEXT : STEP_PREV,
|
2000-12-11 17:47:24 +00:00
|
|
|
TRUE));
|
|
|
|
gtk_notebook_redraw_arrows (notebook);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2001-11-24 00:24:18 +00:00
|
|
|
static gboolean
|
|
|
|
get_widget_coordinates (GtkWidget *widget,
|
|
|
|
GdkEvent *event,
|
|
|
|
gint *x,
|
|
|
|
gint *y)
|
|
|
|
{
|
|
|
|
GdkWindow *window = ((GdkEventAny *)event)->window;
|
|
|
|
gdouble tx, ty;
|
|
|
|
|
|
|
|
if (!gdk_event_get_coords (event, &tx, &ty))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
while (window && window != widget->window)
|
|
|
|
{
|
|
|
|
gint window_x, window_y;
|
|
|
|
|
|
|
|
gdk_window_get_position (window, &window_x, &window_y);
|
|
|
|
tx += window_x;
|
|
|
|
ty += window_y;
|
|
|
|
|
|
|
|
window = gdk_window_get_parent (window);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (window)
|
|
|
|
{
|
|
|
|
*x = tx;
|
|
|
|
*y = ty;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2004-07-03 01:51:17 +00:00
|
|
|
static gboolean
|
|
|
|
gtk_notebook_scroll (GtkWidget *widget,
|
|
|
|
GdkEventScroll *event)
|
|
|
|
{
|
|
|
|
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
|
|
|
|
|
2004-07-25 23:53:15 +00:00
|
|
|
GtkWidget* child;
|
|
|
|
GtkWidget* originator;
|
|
|
|
|
|
|
|
if (!notebook->cur_page)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
child = notebook->cur_page->child;
|
|
|
|
originator = gtk_get_event_widget ((GdkEvent *)event);
|
|
|
|
|
|
|
|
/* ignore scroll events from the content of the page */
|
|
|
|
if (!originator || gtk_widget_is_ancestor (originator, child))
|
|
|
|
return FALSE;
|
|
|
|
|
2004-07-03 01:51:17 +00:00
|
|
|
switch (event->direction)
|
|
|
|
{
|
|
|
|
case GDK_SCROLL_RIGHT:
|
|
|
|
case GDK_SCROLL_DOWN:
|
|
|
|
gtk_notebook_next_page (notebook);
|
|
|
|
break;
|
|
|
|
case GDK_SCROLL_LEFT:
|
|
|
|
case GDK_SCROLL_UP:
|
|
|
|
gtk_notebook_prev_page (notebook);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
static gboolean
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_button_press (GtkWidget *widget,
|
|
|
|
GdkEventButton *event)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
2001-11-15 21:04:51 +00:00
|
|
|
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebookPage *page;
|
1997-11-24 22:37:52 +00:00
|
|
|
GList *children;
|
2003-05-22 22:34:31 +00:00
|
|
|
GtkNotebookArrow arrow;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gint num;
|
2001-11-15 21:04:51 +00:00
|
|
|
gint x, y;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2003-06-09 20:29:16 +00:00
|
|
|
if (event->type != GDK_BUTTON_PRESS || !notebook->children ||
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook->button)
|
|
|
|
return FALSE;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2001-11-24 00:24:18 +00:00
|
|
|
if (!get_widget_coordinates (widget, (GdkEvent *)event, &x, &y))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
arrow = gtk_notebook_get_arrow (notebook, x, y);
|
2001-11-15 21:04:51 +00:00
|
|
|
if (arrow)
|
|
|
|
return gtk_notebook_arrow_button_press (notebook, arrow, event);
|
|
|
|
|
|
|
|
if (event->button == 3 && notebook->menu)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
2001-11-15 21:04:51 +00:00
|
|
|
gtk_menu_popup (GTK_MENU (notebook->menu), NULL, NULL,
|
|
|
|
NULL, NULL, 3, event->time);
|
|
|
|
return TRUE;
|
1998-07-16 20:23:12 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2002-10-25 21:50:19 +00:00
|
|
|
if (event->button != 1)
|
|
|
|
return FALSE;
|
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
num = 0;
|
|
|
|
children = notebook->children;
|
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (page->child) &&
|
|
|
|
page->tab_label && GTK_WIDGET_MAPPED (page->tab_label) &&
|
|
|
|
(x >= page->allocation.x) &&
|
|
|
|
(y >= page->allocation.y) &&
|
|
|
|
(x <= (page->allocation.x + page->allocation.width)) &&
|
|
|
|
(y <= (page->allocation.y + page->allocation.height)))
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
2002-11-13 17:20:33 +00:00
|
|
|
gboolean page_changed = page != notebook->cur_page;
|
2002-11-14 04:46:20 +00:00
|
|
|
gboolean was_focus = gtk_widget_is_focus (widget);
|
2002-11-13 17:20:33 +00:00
|
|
|
|
|
|
|
gtk_notebook_switch_focus_tab (notebook, children);
|
|
|
|
gtk_widget_grab_focus (widget);
|
|
|
|
|
|
|
|
if (page_changed && !was_focus)
|
|
|
|
gtk_widget_child_focus (page->child, GTK_DIR_TAB_FORWARD);
|
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
break;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
2001-11-15 21:04:51 +00:00
|
|
|
children = children->next;
|
|
|
|
num++;
|
1998-07-16 20:23:12 +00:00
|
|
|
}
|
2001-11-15 21:04:51 +00:00
|
|
|
|
|
|
|
return TRUE;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
2006-02-22 16:35:09 +00:00
|
|
|
static void
|
|
|
|
popup_position_func (GtkMenu *menu,
|
|
|
|
gint *x,
|
|
|
|
gint *y,
|
|
|
|
gboolean *push_in,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
GtkNotebook *notebook = data;
|
|
|
|
GtkWidget *w;
|
|
|
|
GtkRequisition requisition;
|
|
|
|
|
|
|
|
if (notebook->focus_tab)
|
|
|
|
{
|
|
|
|
GtkNotebookPage *page;
|
|
|
|
|
|
|
|
page = notebook->focus_tab->data;
|
|
|
|
w = page->tab_label;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
w = GTK_WIDGET (notebook);
|
|
|
|
}
|
|
|
|
|
|
|
|
gdk_window_get_origin (w->window, x, y);
|
|
|
|
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
|
|
|
|
|
|
|
|
if (gtk_widget_get_direction (w) == GTK_TEXT_DIR_RTL)
|
|
|
|
*x += w->allocation.x + w->allocation.width - requisition.width;
|
|
|
|
else
|
|
|
|
*x += w->allocation.x;
|
|
|
|
|
|
|
|
*y += w->allocation.y + w->allocation.height;
|
|
|
|
|
|
|
|
*push_in = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gtk_notebook_popup_menu (GtkWidget *widget)
|
|
|
|
{
|
|
|
|
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
|
|
|
|
|
|
|
|
if (notebook->menu)
|
|
|
|
{
|
|
|
|
gtk_menu_popup (GTK_MENU (notebook->menu), NULL, NULL,
|
|
|
|
popup_position_func, notebook,
|
|
|
|
0, gtk_get_current_event_time ());
|
|
|
|
gtk_menu_shell_select_first (GTK_MENU_SHELL (notebook->menu), FALSE);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-03-29 00:11:32 +00:00
|
|
|
static void
|
|
|
|
stop_scrolling (GtkNotebook *notebook)
|
|
|
|
{
|
|
|
|
if (notebook->timer)
|
|
|
|
{
|
2003-03-29 00:19:50 +00:00
|
|
|
g_source_remove (notebook->timer);
|
2003-03-29 00:11:32 +00:00
|
|
|
notebook->timer = 0;
|
|
|
|
notebook->need_timer = FALSE;
|
|
|
|
}
|
|
|
|
notebook->click_child = 0;
|
|
|
|
notebook->button = 0;
|
|
|
|
gtk_notebook_redraw_arrows (notebook);
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static gint
|
|
|
|
gtk_notebook_button_release (GtkWidget *widget,
|
|
|
|
GdkEventButton *event)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebook *notebook;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (widget), FALSE);
|
|
|
|
g_return_val_if_fail (event != NULL, FALSE);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (event->type != GDK_BUTTON_RELEASE)
|
|
|
|
return FALSE;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook = GTK_NOTEBOOK (widget);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (event->button == notebook->button)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2003-03-29 00:11:32 +00:00
|
|
|
stop_scrolling (notebook);
|
2001-03-24 06:10:40 +00:00
|
|
|
|
|
|
|
return TRUE;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
2001-03-24 06:10:40 +00:00
|
|
|
else
|
|
|
|
return FALSE;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static gint
|
|
|
|
gtk_notebook_enter_notify (GtkWidget *widget,
|
|
|
|
GdkEventCrossing *event)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebook *notebook;
|
2003-05-22 22:34:31 +00:00
|
|
|
GtkNotebookArrow arrow;
|
2001-11-24 00:24:18 +00:00
|
|
|
gint x, y;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (widget), FALSE);
|
|
|
|
g_return_val_if_fail (event != NULL, FALSE);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook = GTK_NOTEBOOK (widget);
|
|
|
|
|
2001-11-24 00:24:18 +00:00
|
|
|
if (!get_widget_coordinates (widget, (GdkEvent *)event, &x, &y))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
arrow = gtk_notebook_get_arrow (notebook, x, y);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
if (arrow != notebook->in_child)
|
|
|
|
{
|
|
|
|
notebook->in_child = arrow;
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_redraw_arrows (notebook);
|
2001-11-15 21:04:51 +00:00
|
|
|
|
|
|
|
return TRUE;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
return TRUE;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static gint
|
|
|
|
gtk_notebook_leave_notify (GtkWidget *widget,
|
|
|
|
GdkEventCrossing *event)
|
1998-07-19 19:09:27 +00:00
|
|
|
{
|
2001-11-15 21:04:51 +00:00
|
|
|
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
|
2001-11-24 00:24:18 +00:00
|
|
|
gint x, y;
|
|
|
|
|
|
|
|
if (!get_widget_coordinates (widget, (GdkEvent *)event, &x, &y))
|
|
|
|
return FALSE;
|
1998-07-19 19:09:27 +00:00
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
if (notebook->in_child)
|
|
|
|
{
|
|
|
|
notebook->in_child = 0;
|
|
|
|
gtk_notebook_redraw_arrows (notebook);
|
|
|
|
}
|
2000-12-11 17:47:24 +00:00
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
return TRUE;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1998-07-19 19:09:27 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static gint
|
|
|
|
gtk_notebook_motion_notify (GtkWidget *widget,
|
|
|
|
GdkEventMotion *event)
|
|
|
|
{
|
2001-11-15 21:04:51 +00:00
|
|
|
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
|
2003-05-22 22:34:31 +00:00
|
|
|
GtkNotebookArrow arrow;
|
2001-11-24 00:24:18 +00:00
|
|
|
gint x, y;
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->button)
|
|
|
|
return FALSE;
|
|
|
|
|
2001-11-24 00:24:18 +00:00
|
|
|
if (!get_widget_coordinates (widget, (GdkEvent *)event, &x, &y))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
arrow = gtk_notebook_get_arrow (notebook, x, y);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
if (arrow != notebook->in_child)
|
|
|
|
{
|
|
|
|
notebook->in_child = arrow;
|
|
|
|
gtk_notebook_redraw_arrows (notebook);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
2000-12-11 17:47:24 +00:00
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
return TRUE;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
2003-03-29 00:11:32 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_grab_notify (GtkWidget *widget,
|
|
|
|
gboolean was_grabbed)
|
|
|
|
{
|
|
|
|
if (!was_grabbed)
|
|
|
|
stop_scrolling (GTK_NOTEBOOK (widget));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_notebook_state_changed (GtkWidget *widget,
|
|
|
|
GtkStateType previous_state)
|
|
|
|
{
|
|
|
|
if (!GTK_WIDGET_IS_SENSITIVE (widget))
|
|
|
|
stop_scrolling (GTK_NOTEBOOK (widget));
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static gint
|
|
|
|
gtk_notebook_focus_in (GtkWidget *widget,
|
|
|
|
GdkEventFocus *event)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GTK_NOTEBOOK (widget)->child_has_focus = FALSE;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2003-07-19 09:54:30 +00:00
|
|
|
gtk_notebook_redraw_tabs (GTK_NOTEBOOK (widget));
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
|
|
|
gtk_notebook_focus_out (GtkWidget *widget,
|
|
|
|
GdkEventFocus *event)
|
|
|
|
{
|
|
|
|
gtk_notebook_redraw_tabs (GTK_NOTEBOOK (widget));
|
|
|
|
|
|
|
|
return FALSE;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
GTK_MENU_DIR_CHILD: check for the existance of
Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current):
GTK_MENU_DIR_CHILD: check for the existance of
menu_shell->active_menu_item before accessing its child.
GTK_MENU_DIR_PREV:
GTK_MENU_DIR_NEXT: if we haven't had an active item and still
don't, make a default selection.
Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_propagate_state): iterate
the children with _forall for sensitivity changes and with
_foreach on pure state changes. this fixes a lot of the
old inclusions of internal widgets into _foreach calls.
* gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall
do the work. don't walk the subtrees of first level children.
* gtk/gtktreeitem.c: provide a _forall implementation,
which walks the subtrees as well for include_internals.
* gtk/gtkmenuitem.c: provide a _forall implementation, which walks
the submenus as well for include_internals.
* gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and
implemented gtk_scrolled_window_forall, which will iterate over
the viewport and the scrollbars for gtk_container_forall or
iterate over the viewports children for gtk_container_foreach.
* gtk/gtktoolbar.c:
* gtk/gtktable.c:
* gtk/gtkpaned.c:
* gtk/gtkpacker.c:
* gtk/gtkmenushell.c:
* gtk/gtklist.c:
* gtk/gtkfixed.c:
* gtk/gtkclist.c:
* gtk/gtkbox.c:
* gtk/gtkbin.c:
* gtk/gtknotebook.c:
removed the old gtk_*_foreach functions and provided gtk_*_forall.
* gtk/gtknotebook.c:
(gtk_notebook_real_switch_page): expose tabs.
(gtk_notebook_page_num): new function to return the page number
of a distinct child.
(gtk_notebook_focus): minor fixups. foxus handling is still screwed
under some circumstances.
* gtk/gtktreeitem.c:
(gtk_real_tree_item_select):
(gtk_real_tree_item_deselect): major fixes.
some general fixups wrt queue_redraw, and tree items not being
NO_WINDOW widgets.
* gtk/gtklistitem.c:
(gtk_real_list_item_select):
(gtk_real_list_item_deselect):
(gtk_real_list_item_toggle):
removed unneccessary queue_redraw calls.
Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c: allow optionmenus to have the focus and
automatically popup the menu on space bar.
Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class
method), which acts similar to gtk_container_foreach(), but iterates
over internal children. the GtkContainer::foreach signal vanished in
favour of a new class method ->forall() that optionally includes
internal widgets.
* gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation
but a _forall implementation, since all child widgets we have are
internal ones.
(column_button_create): set the parent window prior
to gtk_widget_set_parent().
* gtk/gtkwidget.c:
exchanged all calls to gtk_container_foreach() with
gtk_container_forall().
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through
the GtkWidget::composite_child argument. to have a widget created
with the flag initially, two new functions got added to wrap a widgets
creation:
gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag().
Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c: exported gtk_tooltips_create_window() as
gtk_tooltips_force_window(), so tooltips->tip_window can be accessed
prior to the first tip being set.
don't put an extra reference on the window, since it is a toplevel,
it wont get destroyed from anywhere else.
* overall macro and GtkType fixups.
1998-09-03 02:38:53 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_draw_focus (GtkWidget *widget)
|
|
|
|
{
|
2001-11-15 21:04:51 +00:00
|
|
|
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (GTK_WIDGET_DRAWABLE (widget) && notebook->show_tabs &&
|
|
|
|
notebook->focus_tab)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebookPage *page;
|
|
|
|
GdkRectangle area;
|
2001-12-04 03:27:30 +00:00
|
|
|
gint focus_width;
|
|
|
|
|
|
|
|
gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
page = notebook->focus_tab->data;
|
|
|
|
|
2001-12-04 03:27:30 +00:00
|
|
|
area.x = page->tab_label->allocation.x - focus_width;
|
|
|
|
area.y = page->tab_label->allocation.y - focus_width;
|
|
|
|
area.width = page->tab_label->allocation.width + 2 * focus_width;
|
|
|
|
area.height = page->tab_label->allocation.height + 2 * focus_width;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
1998-11-26 18:47:58 +00:00
|
|
|
gtk_notebook_draw_tab (GTK_NOTEBOOK (widget), page, &area);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-05-22 22:34:31 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_style_set (GtkWidget *widget,
|
|
|
|
GtkStyle *previous)
|
|
|
|
{
|
|
|
|
GtkNotebook *notebook;
|
|
|
|
|
|
|
|
gboolean has_before_previous;
|
|
|
|
gboolean has_before_next;
|
|
|
|
gboolean has_after_previous;
|
|
|
|
gboolean has_after_next;
|
|
|
|
|
|
|
|
notebook = GTK_NOTEBOOK (widget);
|
|
|
|
|
|
|
|
gtk_widget_style_get (widget,
|
2005-03-26 05:49:15 +00:00
|
|
|
"has-backward-stepper", &has_before_previous,
|
|
|
|
"has-secondary-forward-stepper", &has_before_next,
|
|
|
|
"has-secondary-backward-stepper", &has_after_previous,
|
|
|
|
"has-forward-stepper", &has_after_next,
|
2003-05-22 22:34:31 +00:00
|
|
|
NULL);
|
|
|
|
|
|
|
|
notebook->has_before_previous = has_before_previous;
|
|
|
|
notebook->has_before_next = has_before_next;
|
|
|
|
notebook->has_after_previous = has_after_previous;
|
|
|
|
notebook->has_after_next = has_after_next;
|
|
|
|
|
|
|
|
(* GTK_WIDGET_CLASS (parent_class)->style_set) (widget, previous);
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* Private GtkContainer Methods :
|
|
|
|
*
|
|
|
|
* gtk_notebook_set_child_arg
|
|
|
|
* gtk_notebook_get_child_arg
|
|
|
|
* gtk_notebook_add
|
|
|
|
* gtk_notebook_remove
|
|
|
|
* gtk_notebook_focus
|
|
|
|
* gtk_notebook_set_focus_child
|
|
|
|
* gtk_notebook_child_type
|
|
|
|
* gtk_notebook_forall
|
|
|
|
*/
|
|
|
|
static void
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_notebook_set_child_property (GtkContainer *container,
|
|
|
|
GtkWidget *child,
|
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gboolean expand;
|
|
|
|
gboolean fill;
|
|
|
|
GtkPackType pack_type;
|
1998-11-06 22:05:02 +00:00
|
|
|
|
2001-07-31 21:23:19 +00:00
|
|
|
/* not finding child's page is valid for menus or labels */
|
|
|
|
if (!gtk_notebook_find_child (GTK_NOTEBOOK (container), child, NULL))
|
|
|
|
return;
|
|
|
|
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
switch (property_id)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_TAB_LABEL:
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* a NULL pointer indicates a default_tab setting, otherwise
|
|
|
|
* we need to set the associated label
|
|
|
|
*/
|
|
|
|
gtk_notebook_set_tab_label_text (GTK_NOTEBOOK (container), child,
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_get_string (value));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_MENU_LABEL:
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_set_menu_label_text (GTK_NOTEBOOK (container), child,
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_get_string (value));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_POSITION:
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_reorder_child (GTK_NOTEBOOK (container), child,
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_get_int (value));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_TAB_EXPAND:
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_query_tab_label_packing (GTK_NOTEBOOK (container), child,
|
|
|
|
&expand, &fill, &pack_type);
|
|
|
|
gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (container), child,
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_get_boolean (value),
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
fill, pack_type);
|
|
|
|
break;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_TAB_FILL:
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_query_tab_label_packing (GTK_NOTEBOOK (container), child,
|
|
|
|
&expand, &fill, &pack_type);
|
|
|
|
gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (container), child,
|
|
|
|
expand,
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_get_boolean (value),
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
pack_type);
|
|
|
|
break;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_TAB_PACK:
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_query_tab_label_packing (GTK_NOTEBOOK (container), child,
|
|
|
|
&expand, &fill, &pack_type);
|
|
|
|
gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (container), child,
|
|
|
|
expand, fill,
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_get_enum (value));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
default:
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
1998-11-06 22:05:02 +00:00
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
static void
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_notebook_get_child_property (GtkContainer *container,
|
|
|
|
GtkWidget *child,
|
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GList *list;
|
1997-11-24 22:37:52 +00:00
|
|
|
GtkNotebook *notebook;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkWidget *label;
|
|
|
|
gboolean expand;
|
|
|
|
gboolean fill;
|
|
|
|
GtkPackType pack_type;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook = GTK_NOTEBOOK (container);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2001-07-31 21:23:19 +00:00
|
|
|
/* not finding child's page is valid for menus or labels */
|
|
|
|
list = gtk_notebook_find_child (notebook, child, NULL);
|
|
|
|
if (!list)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
2001-07-31 21:23:19 +00:00
|
|
|
/* nothing to set on labels or menus */
|
|
|
|
g_param_value_set_default (pspec, value);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
return;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
switch (property_id)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_TAB_LABEL:
|
1998-11-28 07:42:37 +00:00
|
|
|
label = gtk_notebook_get_tab_label (notebook, child);
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (label && GTK_IS_LABEL (label))
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_set_string (value, GTK_LABEL (label)->label);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_set_string (value, NULL);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_MENU_LABEL:
|
1998-11-28 07:42:37 +00:00
|
|
|
label = gtk_notebook_get_menu_label (notebook, child);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (label && GTK_IS_LABEL (label))
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_set_string (value, GTK_LABEL (label)->label);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_set_string (value, NULL);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_POSITION:
|
|
|
|
g_value_set_int (value, g_list_position (notebook->children, list));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_TAB_EXPAND:
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_query_tab_label_packing (GTK_NOTEBOOK (container), child,
|
|
|
|
&expand, NULL, NULL);
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_set_boolean (value, expand);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_TAB_FILL:
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_query_tab_label_packing (GTK_NOTEBOOK (container), child,
|
|
|
|
NULL, &fill, NULL);
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_set_boolean (value, fill);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
case CHILD_PROP_TAB_PACK:
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_query_tab_label_packing (GTK_NOTEBOOK (container), child,
|
|
|
|
NULL, NULL, &pack_type);
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
g_value_set_enum (value, pack_type);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
default:
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_add (GtkContainer *container,
|
|
|
|
GtkWidget *widget)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (container));
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_insert_page_menu (GTK_NOTEBOOK (container), widget,
|
|
|
|
NULL, NULL, -1);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_remove (GtkContainer *container,
|
|
|
|
GtkWidget *widget)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
GtkNotebook *notebook;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebookPage *page;
|
|
|
|
GList *children;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (container));
|
1997-11-24 22:37:52 +00:00
|
|
|
g_return_if_fail (widget != NULL);
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook = GTK_NOTEBOOK (container);
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
children = notebook->children;
|
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
if (page->child == widget)
|
|
|
|
{
|
2002-12-10 12:02:43 +00:00
|
|
|
gtk_notebook_real_remove (notebook, children, FALSE);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
children = children->next;
|
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
static gboolean
|
|
|
|
focus_tabs_in (GtkNotebook *notebook)
|
|
|
|
{
|
2002-01-15 17:40:44 +00:00
|
|
|
if (notebook->show_tabs && notebook->cur_page)
|
2000-12-11 17:47:24 +00:00
|
|
|
{
|
|
|
|
gtk_widget_grab_focus (GTK_WIDGET (notebook));
|
|
|
|
|
|
|
|
gtk_notebook_switch_focus_tab (notebook,
|
|
|
|
g_list_find (notebook->children,
|
|
|
|
notebook->cur_page));
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
focus_tabs_move (GtkNotebook *notebook,
|
|
|
|
GtkDirectionType direction,
|
|
|
|
gint search_direction)
|
|
|
|
{
|
|
|
|
GList *new_page;
|
|
|
|
|
|
|
|
new_page = gtk_notebook_search_page (notebook, notebook->focus_tab,
|
|
|
|
search_direction, TRUE);
|
2002-02-08 01:10:25 +00:00
|
|
|
if (new_page)
|
|
|
|
gtk_notebook_switch_focus_tab (notebook, new_page);
|
|
|
|
else
|
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
* gtk/gtkclipboard.[ch]: Add gtk_clipboard_get_for_display(),
make internals multihead aware.
* gtk/gtkcolorsel.[ch]: Add
gtk_color_selection_set_change_palette_with_screen_hook () [ugh!]
make up for non-multihead safety of
gtk_color_selection_set_change_palette_hook()
* gtk/gtkinvisible.[ch] gtk/gtkmenu.[ch] gtkwindow.[ch]: Add
gtk_{invisible,menu,window}_set_screen(); add "screen" properties
for GtkWindow and GtkMenu.
* gtk/gtkplug.[ch]: Add gtk_plug_construct_for_display(),
gtk_plug_new_for_display(). Multihead fixes.
* gtk/gtkselection.[ch]: Add gtk_selection_owner_set_for_display(),
make internals multihead aware.
* gtk/gtksettings.[ch]: Add gtk_settings_get_for_screen(), get
rid of now-useless gtk_settings_constructor().
* gtk/gtkstyle.[ch]: Add gtk_style_get_font_for_display(), fix
check/radio button indicators bitmap handling to be multihead
safe.
* gtk/gtkwidget.[ch]: Add gtk_widget_get_screen(), gtk_widget_has_screen(),
gtk_widget_get_display(), gtk_widget_get_clipboard(),
gtk_widget_get_root_window().
* gtk/gtkbindings.c gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkcombo.c
gtk/gtkctree.c gtk/gtkdnd.c gtk/gtkfilesel.c gtk/gtkgamma.c
gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtkimcontext.c gtk/gtklabel.c
gtk/gtklist.c gtk/gtkmain.c gtk/gtkmenuitem.c gtk/gtkmenushell.c
gtk/gtknotebook.c gtk/gtkoldeditable.c gtk/gtkoptionmenu.c
gtk/gtkpaned.c gtk/gtkpreview.c gtk/gtksocket.c gtk/gtktext.c
gtk/gtktextbuffer.c gtk/gtktextview.c gtk/gtktipsquery.c
gtk/gtktooltips.c gtk/gtktreeview.c gtk/gtktreeviewcolumn.c:
misc mechanical multihead-safety fixes.
* gtk/gtkclipboard.c: Use a GtkImage rather than a pixmap for
the dropper, look up the color palette only at realization time,
other multihead fixes.
* gtk/gtkcombo.c (gtk_combo_unrealize): Popdown the list when
unrealizing.
* gtk/gtkentry.c: Only claim ownership of the primary selection
when realized, misc multihead fixes.
* gtk/gtkfontsel.c: Only fill in fonts when attached to a screen,
fix gtk_font_selection_get_font() for multihead.
* gtk/gtkgc.c: make the depth => drawable hash per-screen.
* gtk/gtkinvisible.c: Add a constructor that realizes the
widget, so we get a realized widget with g_object_new() as
well gtk_invisible_new() as before.
* gtk/gtkmain.c: Get rid of unused gtk_visual/gtk_colormap
variables.
* gtk/gtktextdisplay.c: Add warnings if stipple bitmaps
are used on the wrong screen.
* gtk/gtktoolbar.c: Make handling of GtkSettings-based layout
read properties and connect to settings when the screen is changed,
rather than on init/finalize.
* gtk/gtkwindow.c: Fix icon handing to be multihead safe ...
default icon pixmaps/mask are only shared between windows on the
same screen. Misc multihead fixes.
Sat Apr 27 13:49:53 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclipboard.c (gtk_clipboard_get_for_display):
Update docs to reference GDK_SELECTION_CLIPBOARD rather GDK_NONE.
2002-04-29 Alex Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkproperty-fb.c (gdk_property_get):
Fix silly bug, noticed by Sven Neumann.
Sun Apr 28 22:43:55 2002 Jonathan Blandford <jrb@gnome.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
so that you can set a new sort func.
2002-04-29 22:53:45 +00:00
|
|
|
gdk_display_beep (gtk_widget_get_display (GTK_WIDGET (notebook)));
|
2000-12-11 17:47:24 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
focus_child_in (GtkNotebook *notebook,
|
|
|
|
GtkDirectionType direction)
|
|
|
|
{
|
2002-02-01 17:53:56 +00:00
|
|
|
if (notebook->cur_page)
|
|
|
|
return gtk_widget_child_focus (notebook->cur_page->child, direction);
|
2002-02-03 01:25:32 +00:00
|
|
|
else
|
|
|
|
return FALSE;
|
2000-12-11 17:47:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Focus in the notebook can either be on the pages, or on
|
|
|
|
* the tabs.
|
|
|
|
*/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static gint
|
2001-06-08 18:09:34 +00:00
|
|
|
gtk_notebook_focus (GtkWidget *widget,
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkDirectionType direction)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2000-12-11 17:47:24 +00:00
|
|
|
GtkWidget *old_focus_child;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebook *notebook;
|
2000-12-11 17:47:24 +00:00
|
|
|
GtkDirectionType effective_direction;
|
|
|
|
|
|
|
|
gboolean widget_is_focus;
|
2001-06-08 18:09:34 +00:00
|
|
|
GtkContainer *container;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2001-06-08 18:09:34 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (widget), FALSE);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2001-06-08 18:09:34 +00:00
|
|
|
container = GTK_CONTAINER (widget);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook = GTK_NOTEBOOK (container);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2002-02-08 01:10:25 +00:00
|
|
|
if (notebook->focus_out)
|
|
|
|
{
|
|
|
|
notebook->focus_out = FALSE; /* Clear this to catch the wrap-around case */
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2001-06-08 18:09:34 +00:00
|
|
|
widget_is_focus = gtk_widget_is_focus (widget);
|
2000-12-11 17:47:24 +00:00
|
|
|
old_focus_child = container->focus_child;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2002-02-08 01:10:25 +00:00
|
|
|
effective_direction = get_effective_direction (notebook, direction);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
if (old_focus_child) /* Focus on page child */
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
2001-06-08 18:09:34 +00:00
|
|
|
if (gtk_widget_child_focus (old_focus_child, direction))
|
|
|
|
return TRUE;
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
switch (effective_direction)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
2000-12-11 17:47:24 +00:00
|
|
|
case GTK_DIR_TAB_BACKWARD:
|
|
|
|
case GTK_DIR_UP:
|
|
|
|
/* Focus onto the tabs */
|
2002-01-15 17:40:44 +00:00
|
|
|
return focus_tabs_in (notebook);
|
2000-12-11 17:47:24 +00:00
|
|
|
case GTK_DIR_DOWN:
|
|
|
|
case GTK_DIR_TAB_FORWARD:
|
|
|
|
case GTK_DIR_LEFT:
|
|
|
|
case GTK_DIR_RIGHT:
|
|
|
|
return FALSE;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
}
|
2000-12-11 17:47:24 +00:00
|
|
|
else if (widget_is_focus) /* Focus was on tabs */
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
2000-12-11 17:47:24 +00:00
|
|
|
switch (effective_direction)
|
|
|
|
{
|
|
|
|
case GTK_DIR_TAB_BACKWARD:
|
|
|
|
case GTK_DIR_UP:
|
|
|
|
return FALSE;
|
|
|
|
case GTK_DIR_TAB_FORWARD:
|
|
|
|
case GTK_DIR_DOWN:
|
2002-02-08 01:10:25 +00:00
|
|
|
/* We use TAB_FORWARD rather than direction so that we focus a more
|
|
|
|
* predictable widget for the user; users may be using arrow focusing
|
|
|
|
* in this situation even if they don't usually use arrow focusing.
|
|
|
|
*/
|
|
|
|
return focus_child_in (notebook, GTK_DIR_TAB_FORWARD);
|
2000-12-11 17:47:24 +00:00
|
|
|
case GTK_DIR_LEFT:
|
|
|
|
return focus_tabs_move (notebook, direction, STEP_PREV);
|
|
|
|
case GTK_DIR_RIGHT:
|
|
|
|
return focus_tabs_move (notebook, direction, STEP_NEXT);
|
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
2000-12-11 17:47:24 +00:00
|
|
|
else /* Focus was not on widget */
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
2000-12-11 17:47:24 +00:00
|
|
|
switch (effective_direction)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
2000-12-11 17:47:24 +00:00
|
|
|
case GTK_DIR_TAB_FORWARD:
|
|
|
|
case GTK_DIR_DOWN:
|
|
|
|
if (focus_tabs_in (notebook))
|
|
|
|
return TRUE;
|
|
|
|
if (focus_child_in (notebook, direction))
|
|
|
|
return TRUE;
|
|
|
|
return FALSE;
|
|
|
|
case GTK_DIR_TAB_BACKWARD:
|
|
|
|
case GTK_DIR_UP:
|
|
|
|
if (focus_child_in (notebook, direction))
|
|
|
|
return TRUE;
|
|
|
|
if (focus_tabs_in (notebook))
|
|
|
|
return TRUE;
|
|
|
|
return FALSE;
|
|
|
|
case GTK_DIR_LEFT:
|
|
|
|
case GTK_DIR_RIGHT:
|
|
|
|
return focus_child_in (notebook, direction);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
g_assert_not_reached ();
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
return FALSE;
|
2000-12-11 17:47:24 +00:00
|
|
|
}
|
2002-02-09 22:12:04 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_set_focus_child (GtkContainer *container,
|
|
|
|
GtkWidget *child)
|
|
|
|
{
|
2002-01-15 17:40:44 +00:00
|
|
|
GtkNotebook *notebook = GTK_NOTEBOOK (container);
|
|
|
|
GtkWidget *page_child;
|
|
|
|
GtkWidget *toplevel;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2002-01-15 17:40:44 +00:00
|
|
|
/* If the old focus widget was within a page of the notebook,
|
|
|
|
* (child may either be NULL or not in this case), record it
|
|
|
|
* for future use if we switch to the page with a mnemonic.
|
|
|
|
*/
|
|
|
|
|
|
|
|
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (container));
|
|
|
|
if (toplevel && GTK_WIDGET_TOPLEVEL (toplevel))
|
|
|
|
{
|
|
|
|
page_child = GTK_WINDOW (toplevel)->focus_widget;
|
|
|
|
while (page_child)
|
|
|
|
{
|
|
|
|
if (page_child->parent == GTK_WIDGET (container))
|
|
|
|
{
|
|
|
|
GList *list = gtk_notebook_find_child (notebook, page_child, NULL);
|
2002-02-09 22:12:04 +00:00
|
|
|
if (list != NULL)
|
|
|
|
{
|
|
|
|
GtkNotebookPage *page = list->data;
|
2002-01-15 17:40:44 +00:00
|
|
|
|
2002-02-09 22:12:04 +00:00
|
|
|
if (page->last_focus_child)
|
|
|
|
g_object_remove_weak_pointer (G_OBJECT (page->last_focus_child), (gpointer *)&page->last_focus_child);
|
|
|
|
|
|
|
|
page->last_focus_child = GTK_WINDOW (toplevel)->focus_widget;
|
|
|
|
g_object_add_weak_pointer (G_OBJECT (page->last_focus_child), (gpointer *)&page->last_focus_child);
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
2002-01-15 17:40:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
page_child = page_child->parent;
|
|
|
|
}
|
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (child)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_WIDGET (child));
|
|
|
|
|
|
|
|
notebook->child_has_focus = TRUE;
|
|
|
|
if (!notebook->focus_tab)
|
|
|
|
{
|
|
|
|
GList *children;
|
|
|
|
GtkNotebookPage *page;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
children = notebook->children;
|
1998-02-19 05:13:46 +00:00
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page->child == child || page->tab_label == child)
|
|
|
|
gtk_notebook_switch_focus_tab (notebook, children);
|
1998-02-19 05:13:46 +00:00
|
|
|
children = children->next;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
2002-01-15 17:40:44 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
parent_class->set_focus_child (container, child);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_forall (GtkContainer *container,
|
|
|
|
gboolean include_internals,
|
|
|
|
GtkCallback callback,
|
|
|
|
gpointer callback_data)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
GtkNotebook *notebook;
|
|
|
|
GList *children;
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (container));
|
|
|
|
g_return_if_fail (callback != NULL);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook = GTK_NOTEBOOK (container);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
children = notebook->children;
|
|
|
|
while (children)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebookPage *page;
|
|
|
|
|
|
|
|
page = children->data;
|
|
|
|
children = children->next;
|
|
|
|
(* callback) (page->child, callback_data);
|
|
|
|
if (include_internals)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page->tab_label)
|
|
|
|
(* callback) (page->tab_label, callback_data);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2002-10-05 23:15:39 +00:00
|
|
|
static GType
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_child_type (GtkContainer *container)
|
|
|
|
{
|
|
|
|
return GTK_TYPE_WIDGET;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* Private GtkNotebook Functions:
|
|
|
|
*
|
2000-12-11 17:47:24 +00:00
|
|
|
* gtk_notebook_redraw_tabs
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
* gtk_notebook_real_remove
|
|
|
|
* gtk_notebook_update_labels
|
|
|
|
* gtk_notebook_timer
|
|
|
|
* gtk_notebook_page_compare
|
|
|
|
* gtk_notebook_real_page_position
|
|
|
|
* gtk_notebook_search_page
|
|
|
|
*/
|
1997-11-24 22:37:52 +00:00
|
|
|
static void
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_redraw_tabs (GtkNotebook *notebook)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkWidget *widget;
|
1997-11-24 22:37:52 +00:00
|
|
|
GtkNotebookPage *page;
|
2000-12-11 17:47:24 +00:00
|
|
|
GdkRectangle redraw_rect;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gint border;
|
2003-12-08 21:07:17 +00:00
|
|
|
gint tab_pos = get_effective_tab_pos (notebook);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
widget = GTK_WIDGET (notebook);
|
|
|
|
border = GTK_CONTAINER (notebook)->border_width;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!GTK_WIDGET_MAPPED (notebook) || !notebook->first_tab)
|
|
|
|
return;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page = notebook->first_tab->data;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
redraw_rect.x = border;
|
|
|
|
redraw_rect.y = border;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_BOTTOM:
|
2000-12-11 17:47:24 +00:00
|
|
|
redraw_rect.y = (widget->allocation.height - border -
|
|
|
|
page->allocation.height -
|
|
|
|
widget->style->ythickness);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page != notebook->cur_page)
|
2000-12-11 17:47:24 +00:00
|
|
|
redraw_rect.y -= widget->style->ythickness;
|
|
|
|
/* fall through */
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_TOP:
|
2000-12-11 17:47:24 +00:00
|
|
|
redraw_rect.width = widget->allocation.width - 2 * border;
|
|
|
|
redraw_rect.height = (page->allocation.height +
|
|
|
|
widget->style->ythickness);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page != notebook->cur_page)
|
2000-12-11 17:47:24 +00:00
|
|
|
redraw_rect.height += widget->style->ythickness;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_RIGHT:
|
2000-12-11 17:47:24 +00:00
|
|
|
redraw_rect.x = (widget->allocation.width - border -
|
|
|
|
page->allocation.width -
|
|
|
|
widget->style->xthickness);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page != notebook->cur_page)
|
2000-12-11 17:47:24 +00:00
|
|
|
redraw_rect.x -= widget->style->xthickness;
|
|
|
|
/* fall through */
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_LEFT:
|
2000-12-11 17:47:24 +00:00
|
|
|
redraw_rect.width = (page->allocation.width +
|
|
|
|
widget->style->xthickness);
|
|
|
|
redraw_rect.height = widget->allocation.height - 2 * border;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page != notebook->cur_page)
|
2000-12-11 17:47:24 +00:00
|
|
|
redraw_rect.width += widget->style->xthickness;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
2000-12-11 17:47:24 +00:00
|
|
|
}
|
|
|
|
|
2002-01-18 01:18:05 +00:00
|
|
|
redraw_rect.x += widget->allocation.x;
|
|
|
|
redraw_rect.y += widget->allocation.y;
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
gdk_window_invalidate_rect (widget->window, &redraw_rect, TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_notebook_redraw_arrows (GtkNotebook *notebook)
|
|
|
|
{
|
2001-11-15 21:04:51 +00:00
|
|
|
if (GTK_WIDGET_MAPPED (notebook) && gtk_notebook_show_arrows (notebook))
|
|
|
|
{
|
|
|
|
GdkRectangle rect;
|
2003-05-22 22:34:31 +00:00
|
|
|
gint i;
|
|
|
|
GtkNotebookArrow arrow[4];
|
2001-11-15 21:04:51 +00:00
|
|
|
|
2003-05-22 22:34:31 +00:00
|
|
|
arrow[0] = notebook->has_before_previous ? ARROW_LEFT_BEFORE : ARROW_NONE;
|
|
|
|
arrow[1] = notebook->has_before_next ? ARROW_RIGHT_BEFORE : ARROW_NONE;
|
|
|
|
arrow[2] = notebook->has_after_previous ? ARROW_LEFT_AFTER : ARROW_NONE;
|
|
|
|
arrow[3] = notebook->has_after_next ? ARROW_RIGHT_AFTER : ARROW_NONE;
|
|
|
|
|
|
|
|
for (i = 0; i < 4; i++)
|
|
|
|
{
|
|
|
|
if (arrow[i] == ARROW_NONE)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
gtk_notebook_get_arrow_rect (notebook, &rect, arrow[i]);
|
|
|
|
gdk_window_invalidate_rect (GTK_WIDGET (notebook)->window,
|
|
|
|
&rect, FALSE);
|
|
|
|
}
|
2001-11-15 21:04:51 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1998-11-06 22:05:02 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static gint
|
|
|
|
gtk_notebook_timer (GtkNotebook *notebook)
|
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
gboolean retval = FALSE;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1998-12-16 20:09:30 +00:00
|
|
|
GDK_THREADS_ENTER ();
|
2002-03-07 15:39:31 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->timer)
|
|
|
|
{
|
2002-03-07 15:39:31 +00:00
|
|
|
gtk_notebook_do_arrow (notebook, notebook->click_child);
|
|
|
|
|
2005-11-22 12:40:15 +00:00
|
|
|
if (notebook->need_timer)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
2005-11-22 12:40:15 +00:00
|
|
|
GtkSettings *settings;
|
|
|
|
guint timeout;
|
|
|
|
|
|
|
|
settings = gtk_widget_get_settings (GTK_WIDGET (notebook));
|
|
|
|
g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL);
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook->need_timer = FALSE;
|
2005-11-22 12:40:15 +00:00
|
|
|
notebook->timer = g_timeout_add (timeout * SCROLL_DELAY_FACTOR,
|
|
|
|
(GSourceFunc) gtk_notebook_timer,
|
2003-02-05 23:48:11 +00:00
|
|
|
(gpointer) notebook);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1998-12-15 07:32:11 +00:00
|
|
|
else
|
|
|
|
retval = TRUE;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1998-12-15 07:32:11 +00:00
|
|
|
|
1998-12-16 20:09:30 +00:00
|
|
|
GDK_THREADS_LEAVE ();
|
1998-12-15 07:32:11 +00:00
|
|
|
|
|
|
|
return retval;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
|
|
|
gtk_notebook_page_compare (gconstpointer a,
|
|
|
|
gconstpointer b)
|
|
|
|
{
|
|
|
|
return (((GtkNotebookPage *) a)->child != b);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
2001-07-31 21:23:19 +00:00
|
|
|
static GList*
|
|
|
|
gtk_notebook_find_child (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
const gchar *function)
|
2000-12-11 17:47:24 +00:00
|
|
|
{
|
|
|
|
GList *list = g_list_find_custom (notebook->children, child,
|
|
|
|
gtk_notebook_page_compare);
|
|
|
|
|
|
|
|
#ifndef G_DISABLE_CHECKS
|
2001-07-31 21:23:19 +00:00
|
|
|
if (!list && function)
|
|
|
|
g_warning ("%s: unable to find child %p in notebook %p",
|
|
|
|
function, child, notebook);
|
2000-12-11 17:47:24 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
|
2001-09-26 20:33:23 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_remove_tab_label (GtkNotebook *notebook,
|
|
|
|
GtkNotebookPage *page)
|
|
|
|
{
|
|
|
|
if (page->tab_label)
|
|
|
|
{
|
|
|
|
if (page->mnemonic_activate_signal)
|
2002-10-05 23:15:39 +00:00
|
|
|
g_signal_handler_disconnect (page->tab_label,
|
|
|
|
page->mnemonic_activate_signal);
|
2001-11-30 23:17:29 +00:00
|
|
|
page->mnemonic_activate_signal = 0;
|
2001-09-26 20:33:23 +00:00
|
|
|
|
2003-01-30 21:57:08 +00:00
|
|
|
gtk_widget_set_state (page->tab_label, GTK_STATE_NORMAL);
|
2003-02-01 01:36:15 +00:00
|
|
|
gtk_widget_unparent (page->tab_label);
|
2001-09-26 20:33:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
static void
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_real_remove (GtkNotebook *notebook,
|
2002-12-10 12:02:43 +00:00
|
|
|
GList *list,
|
|
|
|
gboolean destroying)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebookPage *page;
|
|
|
|
GList * next_list;
|
|
|
|
gint need_resize = FALSE;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
next_list = gtk_notebook_search_page (notebook, list, STEP_PREV, TRUE);
|
|
|
|
if (!next_list)
|
|
|
|
next_list = gtk_notebook_search_page (notebook, list, STEP_NEXT, TRUE);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->cur_page == list->data)
|
|
|
|
{
|
|
|
|
notebook->cur_page = NULL;
|
2002-12-10 12:02:43 +00:00
|
|
|
if (next_list && !destroying)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_switch_page (notebook, GTK_NOTEBOOK_PAGE (next_list), -1);
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (list == notebook->first_tab)
|
|
|
|
notebook->first_tab = next_list;
|
2002-12-10 12:02:43 +00:00
|
|
|
if (list == notebook->focus_tab && !destroying)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_switch_focus_tab (notebook, next_list);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page = list->data;
|
2002-01-15 17:40:44 +00:00
|
|
|
|
2006-02-20 23:11:55 +00:00
|
|
|
g_signal_handler_disconnect (page->child, page->notify_visible_handler);
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (GTK_WIDGET_VISIBLE (page->child) && GTK_WIDGET_VISIBLE (notebook))
|
|
|
|
need_resize = TRUE;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_widget_unparent (page->child);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2001-09-26 20:33:23 +00:00
|
|
|
gtk_notebook_remove_tab_label (notebook, page);
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->menu)
|
|
|
|
{
|
|
|
|
gtk_container_remove (GTK_CONTAINER (notebook->menu),
|
|
|
|
page->menu_label->parent);
|
|
|
|
gtk_widget_queue_resize (notebook->menu);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!page->default_menu)
|
2002-10-05 23:15:39 +00:00
|
|
|
g_object_unref (page->menu_label);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
notebook->children = g_list_remove_link (notebook->children, list);
|
|
|
|
g_list_free (list);
|
2002-04-12 21:52:16 +00:00
|
|
|
|
|
|
|
if (page->last_focus_child)
|
|
|
|
{
|
|
|
|
g_object_remove_weak_pointer (G_OBJECT (page->last_focus_child), (gpointer *)&page->last_focus_child);
|
|
|
|
page->last_focus_child = NULL;
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_free (page);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_update_labels (notebook);
|
|
|
|
if (need_resize)
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_update_labels (GtkNotebook *notebook)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
GtkNotebookPage *page;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GList *list;
|
|
|
|
gchar string[32];
|
|
|
|
gint page_num = 1;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
for (list = gtk_notebook_search_page (notebook, NULL, STEP_NEXT, FALSE);
|
|
|
|
list;
|
|
|
|
list = gtk_notebook_search_page (notebook, list, STEP_NEXT, FALSE))
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page = list->data;
|
1999-01-02 03:16:07 +00:00
|
|
|
g_snprintf (string, sizeof(string), _("Page %u"), page_num++);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->show_tabs)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page->default_tab)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!page->tab_label)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page->tab_label = gtk_label_new (string);
|
|
|
|
gtk_widget_set_parent (page->tab_label,
|
|
|
|
GTK_WIDGET (notebook));
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
1998-12-15 20:31:26 +00:00
|
|
|
gtk_label_set_text (GTK_LABEL (page->tab_label), string);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (page->child) &&
|
|
|
|
!GTK_WIDGET_VISIBLE (page->tab_label))
|
|
|
|
gtk_widget_show (page->tab_label);
|
|
|
|
else if (!GTK_WIDGET_VISIBLE (page->child) &&
|
|
|
|
GTK_WIDGET_VISIBLE (page->tab_label))
|
|
|
|
gtk_widget_hide (page->tab_label);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->menu && page->default_menu)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page->tab_label && GTK_IS_LABEL (page->tab_label))
|
1998-12-15 20:31:26 +00:00
|
|
|
gtk_label_set_text (GTK_LABEL (page->menu_label),
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GTK_LABEL (page->tab_label)->label);
|
|
|
|
else
|
1998-12-15 20:31:26 +00:00
|
|
|
gtk_label_set_text (GTK_LABEL (page->menu_label), string);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
|
|
|
gtk_notebook_real_page_position (GtkNotebook *notebook,
|
|
|
|
GList *list)
|
|
|
|
{
|
|
|
|
GList *work;
|
|
|
|
gint count_start;
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1);
|
|
|
|
g_return_val_if_fail (list != NULL, -1);
|
|
|
|
|
|
|
|
for (work = notebook->children, count_start = 0;
|
|
|
|
work && work != list; work = work->next)
|
|
|
|
if (GTK_NOTEBOOK_PAGE (work)->pack == GTK_PACK_START)
|
|
|
|
count_start++;
|
|
|
|
|
|
|
|
if (!work)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
if (GTK_NOTEBOOK_PAGE (list)->pack == GTK_PACK_START)
|
|
|
|
return count_start;
|
|
|
|
|
|
|
|
return (count_start + g_list_length (list) - 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
static GList *
|
|
|
|
gtk_notebook_search_page (GtkNotebook *notebook,
|
|
|
|
GList *list,
|
|
|
|
gint direction,
|
|
|
|
gboolean find_visible)
|
|
|
|
{
|
|
|
|
GtkNotebookPage *page = NULL;
|
|
|
|
GList *old_list = NULL;
|
|
|
|
gint flag = 0;
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), NULL);
|
|
|
|
|
|
|
|
switch (direction)
|
|
|
|
{
|
|
|
|
case STEP_PREV:
|
|
|
|
flag = GTK_PACK_END;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case STEP_NEXT:
|
|
|
|
flag = GTK_PACK_START;
|
|
|
|
break;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (list)
|
|
|
|
page = list->data;
|
|
|
|
|
|
|
|
if (!page || page->pack == flag)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (list)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
old_list = list;
|
|
|
|
list = list->next;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
|
|
|
list = notebook->children;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
while (list)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page = list->data;
|
|
|
|
if (page->pack == flag &&
|
|
|
|
(!find_visible || GTK_WIDGET_VISIBLE (page->child)))
|
|
|
|
return list;
|
|
|
|
old_list = list;
|
|
|
|
list = list->next;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
list = old_list;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
old_list = list;
|
|
|
|
list = list->prev;
|
|
|
|
}
|
|
|
|
while (list)
|
|
|
|
{
|
|
|
|
page = list->data;
|
|
|
|
if (page->pack != flag &&
|
|
|
|
(!find_visible || GTK_WIDGET_VISIBLE (page->child)))
|
|
|
|
return list;
|
|
|
|
old_list = list;
|
|
|
|
list = list->prev;
|
|
|
|
}
|
|
|
|
return NULL;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* Private GtkNotebook Drawing Functions:
|
|
|
|
*
|
|
|
|
* gtk_notebook_paint
|
|
|
|
* gtk_notebook_draw_tab
|
|
|
|
* gtk_notebook_draw_arrow
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gtk_notebook_paint (GtkWidget *widget,
|
|
|
|
GdkRectangle *area)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-02-19 05:13:46 +00:00
|
|
|
GtkNotebook *notebook;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebookPage *page;
|
|
|
|
GList *children;
|
|
|
|
gboolean showarrow;
|
|
|
|
gint width, height;
|
|
|
|
gint x, y;
|
2001-11-15 21:04:51 +00:00
|
|
|
gint border_width = GTK_CONTAINER (widget)->border_width;
|
2003-12-08 21:07:17 +00:00
|
|
|
gint gap_x = 0, gap_width = 0, step = STEP_PREV;
|
|
|
|
gboolean is_rtl;
|
|
|
|
gint tab_pos;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (widget));
|
|
|
|
g_return_if_fail (area != NULL);
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!GTK_WIDGET_DRAWABLE (widget))
|
|
|
|
return;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
|
|
|
notebook = GTK_NOTEBOOK (widget);
|
2003-12-08 21:07:17 +00:00
|
|
|
is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
|
|
|
|
tab_pos = get_effective_tab_pos (notebook);
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if ((!notebook->show_tabs && !notebook->show_border) ||
|
|
|
|
!notebook->cur_page || !GTK_WIDGET_VISIBLE (notebook->cur_page->child))
|
2001-11-15 21:04:51 +00:00
|
|
|
return;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
x = widget->allocation.x + border_width;
|
|
|
|
y = widget->allocation.y + border_width;
|
2001-11-16 19:19:30 +00:00
|
|
|
width = widget->allocation.width - border_width * 2;
|
|
|
|
height = widget->allocation.height - border_width * 2;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->show_border && (!notebook->show_tabs || !notebook->children))
|
|
|
|
{
|
1999-01-12 15:12:14 +00:00
|
|
|
gtk_paint_box (widget->style, widget->window,
|
|
|
|
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
|
|
|
|
area, widget, "notebook",
|
|
|
|
x, y, width, height);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
return;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!GTK_WIDGET_MAPPED (notebook->cur_page->tab_label))
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page = notebook->first_tab->data;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_TOP:
|
Make this compile without framebuffer enabled
2000-06-20 Havoc Pennington <hp@redhat.com>
* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled
* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure
* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height
* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.
2000-06-19 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.
2000-06-14 Havoc Pennington <hp@redhat.com>
* gdk/Makefile.am: add gdkpixmap.c
* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
s/gdk_image_init/_gdk_windowing_image_init
* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
ref/unref
* gdk/gdkcolor.h: make GdkColormap a GObject subclass
* gdk/gdkcompat.h: remove GdkWindowType compat, since
GdkWindowType is now non-deprecated;
change gdk_window_get_type() compat to be
gdk_window_get_window_type().
* gdk/gdkdnd.h: make GdkDragContext a GObject.
* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
virtual GObject. Make all functions call into the vtable.
Move gdk_image_put() guts in here. Remove GdkDrawableType
and gdk_drawable_get_type(), these are now GdkWindow-specific.
draw_image, get_depth, get_size, set_colormap, get_colormap,
get_visual added to the vtable.
* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
GObject. Virtualize everything.
(gdk_gc_new_with_values): remove check for destroyed window,
because now GdkWindow::create_gc will check this.
(gdk_gc_set_values): New function to set GC values, this
was already implemented but wasn't in the header
* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.
* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
_gdk_window_draw_image(), remove _gdk_windowing_window_class,
remove _gdk_window_class; add _gdk_window_impl_get_type() and
_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
_gdk_windowing_window_init, rename gdk_image_init to
_gdk_windowing_image_init.
* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
(gdk_draw_layout): Remove check for destroyed window,
because all the drawable methods already check it.
* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
Add gdkpixmap.c which contains implementation of GdkDrawable
virtual table (by chaining to a platform-specific implementation
object).
* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
GdkColormapPrivate.
* gdk/gdktypes.h: #include <glib-object.h>
* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
Move most functionality to platform-specific implementation
object. GdkWindow itself now handles the backing store, then
chains to the platform-specific implementation.
(gdk_window_get_window_type): return GdkWindowType of the window.
(gdk_window_peek_children): New routine, returns the children of
a GdkWindow
(gdk_window_get_children): Was in X11-specific code and did
XQueryTree. Changed to simply return a copy of window->children;
so it can go in cross-platform code.
* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path
* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
GdkColormap; just changed to use the new private data instead
of casting to GdkColormapPrivate.
* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
gdk_cursor_new().
* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
(private data member in the GObject).
(xdnd_manager_source_filter): Function had broken
error handling, fix it (use gdk_error_trap_push).
* gdk/x11/gdkdrawable-x11.c: This file now implements
a base class for GdkWindowImplX11/GdkPixmapImplX11. This
base class is purely for the convenience of the X port,
and not part of the interface to cross-platform GDK.
* gdk/x11/gdkevents-x11.c: Reflect various renamings.
* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
specific to X, and returned by the create_gc virtual method
of GdkDrawableImplX11.
(gdk_x11_gc_set_dashes): Change this to take an array of gint8
rather than gchar, this was also changed in the GdkGC vtable.
(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
mask is 0, return immediately, instead of checking every flag.
This is faster, and keeps us from segfaulting if values is NULL
and the mask contains some nonzero flags.
* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
GdkWindow.
* gdk/x11/gdkglobals-x11.c: change type of grab window, since
GdkWindowPrivate is gone.
* gdk/x11/gdkim-x11.c: rename things that got renamed.
* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
remove the image_put stuff that got transferred to GdkDrawable.
* gdk/x11/gdkinput.c: renamings
* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>
* gdk/x11/gdkpixmap-x11.c: GObject conversion
* gdk/x11/gdkprivate-x11.h: indentation fixes
* gdk/x11/gdkproperty-x11.c: renamings
* gdk/x11/gdkselection-x11.c: renamings
* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
implements the platform-specific "impl" object.
Moved gdk_window_get_children to gdk/gdkwindow.c
* gdk/x11/gdkx.h: Remove all the private structs and private datas
that no longer exist. Add declaration of GdkGCX11 object here.
Fix all the macros to still work.
* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
GdkDragContext from the boxed types since they are now GObjects.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
moved xthickness/ythickness into the instance. GtkStyleClass
functions are now in the standard vtable for GtkStyle, so you have
to create a GObject subclass to write a theme engine.
(gtk_style_copy): fixed a leaked PangoFontDescription
(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
can be the standard GObject function.
* Throughout GTK:
s/style->klass->[xy]thickness/style->[xy]thickness
s/pango_layout_unref/g_object_unref/
* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.
* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
accessing GDK internals.
* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
accessing GDK internals.
2000-06-20 21:04:44 +00:00
|
|
|
y += page->allocation.height + widget->style->ythickness;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_BOTTOM:
|
Make this compile without framebuffer enabled
2000-06-20 Havoc Pennington <hp@redhat.com>
* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled
* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure
* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height
* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.
2000-06-19 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.
2000-06-14 Havoc Pennington <hp@redhat.com>
* gdk/Makefile.am: add gdkpixmap.c
* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
s/gdk_image_init/_gdk_windowing_image_init
* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
ref/unref
* gdk/gdkcolor.h: make GdkColormap a GObject subclass
* gdk/gdkcompat.h: remove GdkWindowType compat, since
GdkWindowType is now non-deprecated;
change gdk_window_get_type() compat to be
gdk_window_get_window_type().
* gdk/gdkdnd.h: make GdkDragContext a GObject.
* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
virtual GObject. Make all functions call into the vtable.
Move gdk_image_put() guts in here. Remove GdkDrawableType
and gdk_drawable_get_type(), these are now GdkWindow-specific.
draw_image, get_depth, get_size, set_colormap, get_colormap,
get_visual added to the vtable.
* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
GObject. Virtualize everything.
(gdk_gc_new_with_values): remove check for destroyed window,
because now GdkWindow::create_gc will check this.
(gdk_gc_set_values): New function to set GC values, this
was already implemented but wasn't in the header
* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.
* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
_gdk_window_draw_image(), remove _gdk_windowing_window_class,
remove _gdk_window_class; add _gdk_window_impl_get_type() and
_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
_gdk_windowing_window_init, rename gdk_image_init to
_gdk_windowing_image_init.
* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
(gdk_draw_layout): Remove check for destroyed window,
because all the drawable methods already check it.
* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
Add gdkpixmap.c which contains implementation of GdkDrawable
virtual table (by chaining to a platform-specific implementation
object).
* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
GdkColormapPrivate.
* gdk/gdktypes.h: #include <glib-object.h>
* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
Move most functionality to platform-specific implementation
object. GdkWindow itself now handles the backing store, then
chains to the platform-specific implementation.
(gdk_window_get_window_type): return GdkWindowType of the window.
(gdk_window_peek_children): New routine, returns the children of
a GdkWindow
(gdk_window_get_children): Was in X11-specific code and did
XQueryTree. Changed to simply return a copy of window->children;
so it can go in cross-platform code.
* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path
* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
GdkColormap; just changed to use the new private data instead
of casting to GdkColormapPrivate.
* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
gdk_cursor_new().
* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
(private data member in the GObject).
(xdnd_manager_source_filter): Function had broken
error handling, fix it (use gdk_error_trap_push).
* gdk/x11/gdkdrawable-x11.c: This file now implements
a base class for GdkWindowImplX11/GdkPixmapImplX11. This
base class is purely for the convenience of the X port,
and not part of the interface to cross-platform GDK.
* gdk/x11/gdkevents-x11.c: Reflect various renamings.
* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
specific to X, and returned by the create_gc virtual method
of GdkDrawableImplX11.
(gdk_x11_gc_set_dashes): Change this to take an array of gint8
rather than gchar, this was also changed in the GdkGC vtable.
(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
mask is 0, return immediately, instead of checking every flag.
This is faster, and keeps us from segfaulting if values is NULL
and the mask contains some nonzero flags.
* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
GdkWindow.
* gdk/x11/gdkglobals-x11.c: change type of grab window, since
GdkWindowPrivate is gone.
* gdk/x11/gdkim-x11.c: rename things that got renamed.
* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
remove the image_put stuff that got transferred to GdkDrawable.
* gdk/x11/gdkinput.c: renamings
* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>
* gdk/x11/gdkpixmap-x11.c: GObject conversion
* gdk/x11/gdkprivate-x11.h: indentation fixes
* gdk/x11/gdkproperty-x11.c: renamings
* gdk/x11/gdkselection-x11.c: renamings
* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
implements the platform-specific "impl" object.
Moved gdk_window_get_children to gdk/gdkwindow.c
* gdk/x11/gdkx.h: Remove all the private structs and private datas
that no longer exist. Add declaration of GdkGCX11 object here.
Fix all the macros to still work.
* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
GdkDragContext from the boxed types since they are now GObjects.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
moved xthickness/ythickness into the instance. GtkStyleClass
functions are now in the standard vtable for GtkStyle, so you have
to create a GObject subclass to write a theme engine.
(gtk_style_copy): fixed a leaked PangoFontDescription
(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
can be the standard GObject function.
* Throughout GTK:
s/style->klass->[xy]thickness/style->[xy]thickness
s/pango_layout_unref/g_object_unref/
* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.
* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
accessing GDK internals.
* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
accessing GDK internals.
2000-06-20 21:04:44 +00:00
|
|
|
height -= page->allocation.height + widget->style->ythickness;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
Make this compile without framebuffer enabled
2000-06-20 Havoc Pennington <hp@redhat.com>
* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled
* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure
* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height
* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.
2000-06-19 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.
2000-06-14 Havoc Pennington <hp@redhat.com>
* gdk/Makefile.am: add gdkpixmap.c
* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
s/gdk_image_init/_gdk_windowing_image_init
* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
ref/unref
* gdk/gdkcolor.h: make GdkColormap a GObject subclass
* gdk/gdkcompat.h: remove GdkWindowType compat, since
GdkWindowType is now non-deprecated;
change gdk_window_get_type() compat to be
gdk_window_get_window_type().
* gdk/gdkdnd.h: make GdkDragContext a GObject.
* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
virtual GObject. Make all functions call into the vtable.
Move gdk_image_put() guts in here. Remove GdkDrawableType
and gdk_drawable_get_type(), these are now GdkWindow-specific.
draw_image, get_depth, get_size, set_colormap, get_colormap,
get_visual added to the vtable.
* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
GObject. Virtualize everything.
(gdk_gc_new_with_values): remove check for destroyed window,
because now GdkWindow::create_gc will check this.
(gdk_gc_set_values): New function to set GC values, this
was already implemented but wasn't in the header
* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.
* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
_gdk_window_draw_image(), remove _gdk_windowing_window_class,
remove _gdk_window_class; add _gdk_window_impl_get_type() and
_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
_gdk_windowing_window_init, rename gdk_image_init to
_gdk_windowing_image_init.
* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
(gdk_draw_layout): Remove check for destroyed window,
because all the drawable methods already check it.
* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
Add gdkpixmap.c which contains implementation of GdkDrawable
virtual table (by chaining to a platform-specific implementation
object).
* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
GdkColormapPrivate.
* gdk/gdktypes.h: #include <glib-object.h>
* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
Move most functionality to platform-specific implementation
object. GdkWindow itself now handles the backing store, then
chains to the platform-specific implementation.
(gdk_window_get_window_type): return GdkWindowType of the window.
(gdk_window_peek_children): New routine, returns the children of
a GdkWindow
(gdk_window_get_children): Was in X11-specific code and did
XQueryTree. Changed to simply return a copy of window->children;
so it can go in cross-platform code.
* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path
* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
GdkColormap; just changed to use the new private data instead
of casting to GdkColormapPrivate.
* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
gdk_cursor_new().
* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
(private data member in the GObject).
(xdnd_manager_source_filter): Function had broken
error handling, fix it (use gdk_error_trap_push).
* gdk/x11/gdkdrawable-x11.c: This file now implements
a base class for GdkWindowImplX11/GdkPixmapImplX11. This
base class is purely for the convenience of the X port,
and not part of the interface to cross-platform GDK.
* gdk/x11/gdkevents-x11.c: Reflect various renamings.
* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
specific to X, and returned by the create_gc virtual method
of GdkDrawableImplX11.
(gdk_x11_gc_set_dashes): Change this to take an array of gint8
rather than gchar, this was also changed in the GdkGC vtable.
(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
mask is 0, return immediately, instead of checking every flag.
This is faster, and keeps us from segfaulting if values is NULL
and the mask contains some nonzero flags.
* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
GdkWindow.
* gdk/x11/gdkglobals-x11.c: change type of grab window, since
GdkWindowPrivate is gone.
* gdk/x11/gdkim-x11.c: rename things that got renamed.
* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
remove the image_put stuff that got transferred to GdkDrawable.
* gdk/x11/gdkinput.c: renamings
* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>
* gdk/x11/gdkpixmap-x11.c: GObject conversion
* gdk/x11/gdkprivate-x11.h: indentation fixes
* gdk/x11/gdkproperty-x11.c: renamings
* gdk/x11/gdkselection-x11.c: renamings
* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
implements the platform-specific "impl" object.
Moved gdk_window_get_children to gdk/gdkwindow.c
* gdk/x11/gdkx.h: Remove all the private structs and private datas
that no longer exist. Add declaration of GdkGCX11 object here.
Fix all the macros to still work.
* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
GdkDragContext from the boxed types since they are now GObjects.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
moved xthickness/ythickness into the instance. GtkStyleClass
functions are now in the standard vtable for GtkStyle, so you have
to create a GObject subclass to write a theme engine.
(gtk_style_copy): fixed a leaked PangoFontDescription
(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
can be the standard GObject function.
* Throughout GTK:
s/style->klass->[xy]thickness/style->[xy]thickness
s/pango_layout_unref/g_object_unref/
* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.
* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
accessing GDK internals.
* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
accessing GDK internals.
2000-06-20 21:04:44 +00:00
|
|
|
x += page->allocation.width + widget->style->xthickness;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_RIGHT:
|
Make this compile without framebuffer enabled
2000-06-20 Havoc Pennington <hp@redhat.com>
* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled
* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure
* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height
* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.
2000-06-19 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.
2000-06-14 Havoc Pennington <hp@redhat.com>
* gdk/Makefile.am: add gdkpixmap.c
* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
s/gdk_image_init/_gdk_windowing_image_init
* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
ref/unref
* gdk/gdkcolor.h: make GdkColormap a GObject subclass
* gdk/gdkcompat.h: remove GdkWindowType compat, since
GdkWindowType is now non-deprecated;
change gdk_window_get_type() compat to be
gdk_window_get_window_type().
* gdk/gdkdnd.h: make GdkDragContext a GObject.
* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
virtual GObject. Make all functions call into the vtable.
Move gdk_image_put() guts in here. Remove GdkDrawableType
and gdk_drawable_get_type(), these are now GdkWindow-specific.
draw_image, get_depth, get_size, set_colormap, get_colormap,
get_visual added to the vtable.
* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
GObject. Virtualize everything.
(gdk_gc_new_with_values): remove check for destroyed window,
because now GdkWindow::create_gc will check this.
(gdk_gc_set_values): New function to set GC values, this
was already implemented but wasn't in the header
* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.
* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
_gdk_window_draw_image(), remove _gdk_windowing_window_class,
remove _gdk_window_class; add _gdk_window_impl_get_type() and
_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
_gdk_windowing_window_init, rename gdk_image_init to
_gdk_windowing_image_init.
* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
(gdk_draw_layout): Remove check for destroyed window,
because all the drawable methods already check it.
* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
Add gdkpixmap.c which contains implementation of GdkDrawable
virtual table (by chaining to a platform-specific implementation
object).
* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
GdkColormapPrivate.
* gdk/gdktypes.h: #include <glib-object.h>
* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
Move most functionality to platform-specific implementation
object. GdkWindow itself now handles the backing store, then
chains to the platform-specific implementation.
(gdk_window_get_window_type): return GdkWindowType of the window.
(gdk_window_peek_children): New routine, returns the children of
a GdkWindow
(gdk_window_get_children): Was in X11-specific code and did
XQueryTree. Changed to simply return a copy of window->children;
so it can go in cross-platform code.
* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path
* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
GdkColormap; just changed to use the new private data instead
of casting to GdkColormapPrivate.
* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
gdk_cursor_new().
* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
(private data member in the GObject).
(xdnd_manager_source_filter): Function had broken
error handling, fix it (use gdk_error_trap_push).
* gdk/x11/gdkdrawable-x11.c: This file now implements
a base class for GdkWindowImplX11/GdkPixmapImplX11. This
base class is purely for the convenience of the X port,
and not part of the interface to cross-platform GDK.
* gdk/x11/gdkevents-x11.c: Reflect various renamings.
* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
specific to X, and returned by the create_gc virtual method
of GdkDrawableImplX11.
(gdk_x11_gc_set_dashes): Change this to take an array of gint8
rather than gchar, this was also changed in the GdkGC vtable.
(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
mask is 0, return immediately, instead of checking every flag.
This is faster, and keeps us from segfaulting if values is NULL
and the mask contains some nonzero flags.
* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
GdkWindow.
* gdk/x11/gdkglobals-x11.c: change type of grab window, since
GdkWindowPrivate is gone.
* gdk/x11/gdkim-x11.c: rename things that got renamed.
* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
remove the image_put stuff that got transferred to GdkDrawable.
* gdk/x11/gdkinput.c: renamings
* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>
* gdk/x11/gdkpixmap-x11.c: GObject conversion
* gdk/x11/gdkprivate-x11.h: indentation fixes
* gdk/x11/gdkproperty-x11.c: renamings
* gdk/x11/gdkselection-x11.c: renamings
* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
implements the platform-specific "impl" object.
Moved gdk_window_get_children to gdk/gdkwindow.c
* gdk/x11/gdkx.h: Remove all the private structs and private datas
that no longer exist. Add declaration of GdkGCX11 object here.
Fix all the macros to still work.
* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
GdkDragContext from the boxed types since they are now GObjects.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
moved xthickness/ythickness into the instance. GtkStyleClass
functions are now in the standard vtable for GtkStyle, so you have
to create a GObject subclass to write a theme engine.
(gtk_style_copy): fixed a leaked PangoFontDescription
(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
can be the standard GObject function.
* Throughout GTK:
s/style->klass->[xy]thickness/style->[xy]thickness
s/pango_layout_unref/g_object_unref/
* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.
* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
accessing GDK internals.
* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
accessing GDK internals.
2000-06-20 21:04:44 +00:00
|
|
|
width -= page->allocation.width + widget->style->xthickness;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_paint_box (widget->style, widget->window,
|
|
|
|
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
|
|
|
|
area, widget, "notebook",
|
|
|
|
x, y, width, height);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_TOP:
|
|
|
|
y += notebook->cur_page->allocation.height;
|
|
|
|
case GTK_POS_BOTTOM:
|
|
|
|
height -= notebook->cur_page->allocation.height;
|
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
x += notebook->cur_page->allocation.width;
|
|
|
|
case GTK_POS_RIGHT:
|
|
|
|
width -= notebook->cur_page->allocation.width;
|
|
|
|
break;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
2001-11-20 17:42:56 +00:00
|
|
|
gap_x = (notebook->cur_page->allocation.x - widget->allocation.x - border_width);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gap_width = notebook->cur_page->allocation.width;
|
2003-12-08 21:07:17 +00:00
|
|
|
step = is_rtl ? STEP_NEXT : STEP_PREV;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
2001-11-20 17:42:56 +00:00
|
|
|
gap_x = (notebook->cur_page->allocation.y - widget->allocation.y - border_width);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gap_width = notebook->cur_page->allocation.height;
|
2003-12-08 21:07:17 +00:00
|
|
|
step = STEP_PREV;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
2003-12-08 21:07:17 +00:00
|
|
|
gtk_paint_box_gap (widget->style, widget->window,
|
|
|
|
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
|
|
|
|
area, widget, "notebook",
|
|
|
|
x, y, width, height,
|
|
|
|
tab_pos, gap_x, gap_width);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
showarrow = FALSE;
|
2003-12-08 21:07:17 +00:00
|
|
|
children = gtk_notebook_search_page (notebook, NULL, step, TRUE);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
children = gtk_notebook_search_page (notebook, children,
|
2003-12-08 21:07:17 +00:00
|
|
|
step, TRUE);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
continue;
|
|
|
|
if (!GTK_WIDGET_MAPPED (page->tab_label))
|
|
|
|
showarrow = TRUE;
|
|
|
|
else if (page != notebook->cur_page)
|
|
|
|
gtk_notebook_draw_tab (notebook, page, area);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (showarrow && notebook->scrollable)
|
|
|
|
{
|
2003-05-22 22:34:31 +00:00
|
|
|
if (notebook->has_before_previous)
|
|
|
|
gtk_notebook_draw_arrow (notebook, ARROW_LEFT_BEFORE);
|
|
|
|
if (notebook->has_before_next)
|
|
|
|
gtk_notebook_draw_arrow (notebook, ARROW_RIGHT_BEFORE);
|
|
|
|
if (notebook->has_after_previous)
|
|
|
|
gtk_notebook_draw_arrow (notebook, ARROW_LEFT_AFTER);
|
|
|
|
if (notebook->has_after_next)
|
|
|
|
gtk_notebook_draw_arrow (notebook, ARROW_RIGHT_AFTER);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
gtk_notebook_draw_tab (notebook, notebook->cur_page, area);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_draw_tab (GtkNotebook *notebook,
|
|
|
|
GtkNotebookPage *page,
|
|
|
|
GdkRectangle *area)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GdkRectangle child_area;
|
|
|
|
GdkRectangle page_area;
|
|
|
|
GtkStateType state_type;
|
|
|
|
GtkPositionType gap_side;
|
2003-12-08 21:07:17 +00:00
|
|
|
gint tab_pos = get_effective_tab_pos (notebook);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
g_return_if_fail (notebook != NULL);
|
|
|
|
g_return_if_fail (page != NULL);
|
|
|
|
g_return_if_fail (area != NULL);
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!GTK_WIDGET_MAPPED (page->tab_label) ||
|
|
|
|
(page->allocation.width == 0) || (page->allocation.height == 0))
|
|
|
|
return;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page_area.x = page->allocation.x;
|
|
|
|
page_area.y = page->allocation.y;
|
|
|
|
page_area.width = page->allocation.width;
|
|
|
|
page_area.height = page->allocation.height;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (gdk_rectangle_intersect (&page_area, area, &child_area))
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkWidget *widget;
|
|
|
|
|
|
|
|
widget = GTK_WIDGET (notebook);
|
|
|
|
gap_side = 0;
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_TOP:
|
|
|
|
gap_side = GTK_POS_BOTTOM;
|
|
|
|
break;
|
|
|
|
case GTK_POS_BOTTOM:
|
|
|
|
gap_side = GTK_POS_TOP;
|
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
gap_side = GTK_POS_RIGHT;
|
|
|
|
break;
|
|
|
|
case GTK_POS_RIGHT:
|
|
|
|
gap_side = GTK_POS_LEFT;
|
|
|
|
break;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (notebook->cur_page == page)
|
|
|
|
state_type = GTK_STATE_NORMAL;
|
|
|
|
else
|
|
|
|
state_type = GTK_STATE_ACTIVE;
|
|
|
|
gtk_paint_extension(widget->style, widget->window,
|
|
|
|
state_type, GTK_SHADOW_OUT,
|
|
|
|
area, widget, "tab",
|
|
|
|
page_area.x, page_area.y,
|
|
|
|
page_area.width, page_area.height,
|
|
|
|
gap_side);
|
|
|
|
if ((GTK_WIDGET_HAS_FOCUS (widget)) &&
|
1998-11-26 18:47:58 +00:00
|
|
|
notebook->focus_tab && (notebook->focus_tab->data == page))
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2001-12-04 03:27:30 +00:00
|
|
|
gint focus_width;
|
|
|
|
|
|
|
|
gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
|
|
|
|
|
|
|
|
gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget),
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
area, widget, "tab",
|
2001-12-04 03:27:30 +00:00
|
|
|
page->tab_label->allocation.x - focus_width,
|
|
|
|
page->tab_label->allocation.y - focus_width,
|
|
|
|
page->tab_label->allocation.width + 2 * focus_width,
|
|
|
|
page->tab_label->allocation.height + 2 * focus_width);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
2000-12-04 23:04:17 +00:00
|
|
|
if (gtk_widget_intersect (page->tab_label, area, &child_area) &&
|
|
|
|
GTK_WIDGET_DRAWABLE (page->tab_label))
|
|
|
|
{
|
2002-10-03 20:53:30 +00:00
|
|
|
GdkEvent *expose_event = gdk_event_new (GDK_EXPOSE);
|
2000-12-04 23:04:17 +00:00
|
|
|
|
|
|
|
/* This is a lame hack since all this code needs rewriting anyhow */
|
|
|
|
|
2002-10-03 20:53:30 +00:00
|
|
|
expose_event->expose.window = g_object_ref (page->tab_label->window);
|
|
|
|
expose_event->expose.area = child_area;
|
|
|
|
expose_event->expose.region = gdk_region_rectangle (&child_area);
|
|
|
|
expose_event->expose.send_event = TRUE;
|
|
|
|
expose_event->expose.count = 0;
|
2001-03-09 13:28:26 +00:00
|
|
|
|
2002-10-05 22:36:36 +00:00
|
|
|
gtk_container_propagate_expose (GTK_CONTAINER (notebook), page->tab_label, (GdkEventExpose *)expose_event);
|
2001-03-09 13:28:26 +00:00
|
|
|
|
2002-10-03 20:53:30 +00:00
|
|
|
gdk_event_free (expose_event);
|
2000-12-04 23:04:17 +00:00
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void
|
2003-05-22 22:34:31 +00:00
|
|
|
gtk_notebook_draw_arrow (GtkNotebook *notebook,
|
|
|
|
GtkNotebookArrow nbarrow)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkStateType state_type;
|
|
|
|
GtkShadowType shadow_type;
|
|
|
|
GtkWidget *widget;
|
2001-11-15 21:04:51 +00:00
|
|
|
GdkRectangle arrow_rect;
|
2003-05-22 22:34:31 +00:00
|
|
|
GtkArrowType arrow;
|
2003-12-08 21:07:17 +00:00
|
|
|
gboolean is_rtl, left;
|
2001-11-15 21:04:51 +00:00
|
|
|
|
2003-05-22 22:34:31 +00:00
|
|
|
gtk_notebook_get_arrow_rect (notebook, &arrow_rect, nbarrow);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2003-05-22 22:34:31 +00:00
|
|
|
widget = GTK_WIDGET (notebook);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
|
|
|
|
left = (ARROW_IS_LEFT (nbarrow) && !is_rtl) ||
|
|
|
|
(!ARROW_IS_LEFT (nbarrow) && is_rtl);
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (GTK_WIDGET_DRAWABLE (notebook))
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2003-05-22 22:34:31 +00:00
|
|
|
if (notebook->in_child == nbarrow)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2003-05-22 22:34:31 +00:00
|
|
|
if (notebook->click_child == nbarrow)
|
1998-02-19 05:13:46 +00:00
|
|
|
state_type = GTK_STATE_ACTIVE;
|
|
|
|
else
|
|
|
|
state_type = GTK_STATE_PRELIGHT;
|
|
|
|
}
|
|
|
|
else
|
2003-03-29 00:11:32 +00:00
|
|
|
state_type = GTK_WIDGET_STATE (widget);
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2003-05-22 22:34:31 +00:00
|
|
|
if (notebook->click_child == nbarrow)
|
1998-02-19 05:13:46 +00:00
|
|
|
shadow_type = GTK_SHADOW_IN;
|
|
|
|
else
|
|
|
|
shadow_type = GTK_SHADOW_OUT;
|
|
|
|
|
2003-05-22 22:34:31 +00:00
|
|
|
if (notebook->focus_tab &&
|
|
|
|
!gtk_notebook_search_page (notebook, notebook->focus_tab,
|
2003-12-08 21:07:17 +00:00
|
|
|
left? STEP_PREV : STEP_NEXT, TRUE))
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2003-05-22 22:34:31 +00:00
|
|
|
shadow_type = GTK_SHADOW_ETCHED_IN;
|
|
|
|
state_type = GTK_STATE_INSENSITIVE;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
2003-05-22 22:34:31 +00:00
|
|
|
|
|
|
|
if (notebook->tab_pos == GTK_POS_LEFT ||
|
|
|
|
notebook->tab_pos == GTK_POS_RIGHT)
|
|
|
|
arrow = (ARROW_IS_LEFT (nbarrow) ? GTK_ARROW_UP : GTK_ARROW_DOWN);
|
1998-02-19 05:13:46 +00:00
|
|
|
else
|
2003-05-22 22:34:31 +00:00
|
|
|
arrow = (ARROW_IS_LEFT (nbarrow) ? GTK_ARROW_LEFT : GTK_ARROW_RIGHT);
|
|
|
|
|
|
|
|
gtk_paint_arrow (widget->style, widget->window, state_type,
|
|
|
|
shadow_type, NULL, widget, "notebook",
|
|
|
|
arrow, TRUE, arrow_rect.x, arrow_rect.y,
|
|
|
|
ARROW_SIZE, ARROW_SIZE);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* Private GtkNotebook Size Allocate Functions:
|
|
|
|
*
|
|
|
|
* gtk_notebook_pages_allocate
|
|
|
|
* gtk_notebook_page_allocate
|
|
|
|
* gtk_notebook_calc_tabs
|
|
|
|
*/
|
1997-11-24 22:37:52 +00:00
|
|
|
static void
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_pages_allocate (GtkNotebook *notebook)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
2000-12-11 17:47:24 +00:00
|
|
|
GtkWidget *widget = GTK_WIDGET (notebook);
|
|
|
|
GtkContainer *container = GTK_CONTAINER (notebook);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebookPage *page = NULL;
|
2000-12-11 17:47:24 +00:00
|
|
|
GtkAllocation *allocation = &widget->allocation;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkAllocation child_allocation;
|
|
|
|
GList *children = NULL;
|
|
|
|
GList *last_child = NULL;
|
|
|
|
gboolean showarrow = FALSE;
|
|
|
|
gint tab_space = 0;
|
|
|
|
gint delta;
|
|
|
|
gint i;
|
|
|
|
gint n = 1;
|
|
|
|
gint old_fill = 0;
|
|
|
|
gint new_fill = 0;
|
2003-12-08 21:07:17 +00:00
|
|
|
gint tab_pos = get_effective_tab_pos (notebook);
|
|
|
|
gboolean is_rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL &&
|
|
|
|
(tab_pos == GTK_POS_TOP || tab_pos == GTK_POS_BOTTOM));
|
|
|
|
gint memo_x;
|
2006-01-12 21:31:55 +00:00
|
|
|
gint tab_overlap;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!notebook->show_tabs || !notebook->children || !notebook->cur_page)
|
1998-02-19 05:13:46 +00:00
|
|
|
return;
|
|
|
|
|
2006-01-12 21:31:55 +00:00
|
|
|
gtk_widget_style_get (widget, "tab-overlap", &tab_overlap, NULL);
|
|
|
|
|
2001-11-16 19:19:30 +00:00
|
|
|
child_allocation.x = widget->allocation.x + container->border_width;
|
|
|
|
child_allocation.y = widget->allocation.y + container->border_width;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_BOTTOM:
|
2001-11-16 19:19:30 +00:00
|
|
|
child_allocation.y = (widget->allocation.y +
|
|
|
|
allocation->height -
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook->cur_page->requisition.height -
|
|
|
|
container->border_width);
|
2000-12-11 17:47:24 +00:00
|
|
|
/* fall through */
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_TOP:
|
|
|
|
child_allocation.height = notebook->cur_page->requisition.height;
|
|
|
|
break;
|
2000-12-11 17:47:24 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_RIGHT:
|
2001-11-16 19:19:30 +00:00
|
|
|
child_allocation.x = (widget->allocation.x +
|
|
|
|
allocation->width -
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook->cur_page->requisition.width -
|
|
|
|
container->border_width);
|
2000-12-11 17:47:24 +00:00
|
|
|
/* fall through */
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_LEFT:
|
|
|
|
child_allocation.width = notebook->cur_page->requisition.width;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (notebook->scrollable)
|
|
|
|
{
|
|
|
|
GList *focus_tab;
|
|
|
|
|
|
|
|
children = notebook->children;
|
|
|
|
|
|
|
|
if (notebook->focus_tab)
|
|
|
|
focus_tab = notebook->focus_tab;
|
|
|
|
else if (notebook->first_tab)
|
|
|
|
focus_tab = notebook->first_tab;
|
|
|
|
else
|
|
|
|
focus_tab = gtk_notebook_search_page (notebook, NULL, STEP_NEXT, TRUE);
|
1998-01-02 20:22:38 +00:00
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
children = children->next;
|
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
tab_space += page->requisition.width;
|
|
|
|
}
|
|
|
|
if (tab_space >
|
2006-01-12 21:31:55 +00:00
|
|
|
allocation->width - 2 * container->border_width - tab_overlap)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
showarrow = TRUE;
|
|
|
|
page = focus_tab->data;
|
|
|
|
|
2006-01-12 21:31:55 +00:00
|
|
|
tab_space = allocation->width - tab_overlap -
|
2003-05-22 22:34:31 +00:00
|
|
|
page->requisition.width - 2 * container->border_width;
|
|
|
|
if (notebook->has_after_previous)
|
|
|
|
tab_space -= ARROW_SPACING + ARROW_SIZE;
|
|
|
|
if (notebook->has_after_next)
|
|
|
|
tab_space -= ARROW_SPACING + ARROW_SIZE;
|
|
|
|
if (notebook->has_before_previous)
|
|
|
|
{
|
|
|
|
tab_space -= ARROW_SPACING + ARROW_SIZE;
|
|
|
|
child_allocation.x += ARROW_SPACING + ARROW_SIZE;
|
|
|
|
}
|
|
|
|
if (notebook->has_before_next)
|
|
|
|
{
|
|
|
|
tab_space -= ARROW_SPACING + ARROW_SIZE;
|
|
|
|
child_allocation.x += ARROW_SPACING + ARROW_SIZE;
|
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
children = children->next;
|
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
tab_space += page->requisition.height;
|
|
|
|
}
|
|
|
|
if (tab_space >
|
2006-01-12 21:31:55 +00:00
|
|
|
(allocation->height - 2 * container->border_width - tab_overlap))
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
showarrow = TRUE;
|
|
|
|
page = focus_tab->data;
|
2003-05-22 22:34:31 +00:00
|
|
|
tab_space = allocation->height
|
2006-01-12 21:31:55 +00:00
|
|
|
- tab_overlap - 2 * container->border_width
|
2003-05-22 22:34:31 +00:00
|
|
|
- page->requisition.height;
|
|
|
|
if (notebook->has_after_previous || notebook->has_after_next)
|
|
|
|
tab_space -= ARROW_SPACING + ARROW_SIZE;
|
|
|
|
if (notebook->has_before_previous || notebook->has_before_next)
|
|
|
|
{
|
|
|
|
tab_space -= ARROW_SPACING + ARROW_SIZE;
|
|
|
|
child_allocation.y += ARROW_SPACING + ARROW_SIZE;
|
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
break;
|
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (showarrow) /* first_tab <- focus_tab */
|
|
|
|
{
|
|
|
|
if (tab_space <= 0)
|
|
|
|
{
|
|
|
|
notebook->first_tab = focus_tab;
|
|
|
|
last_child = gtk_notebook_search_page (notebook, focus_tab,
|
|
|
|
STEP_NEXT, TRUE);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
children = NULL;
|
|
|
|
if (notebook->first_tab && notebook->first_tab != focus_tab)
|
|
|
|
{
|
|
|
|
/* Is first_tab really predecessor of focus_tab ? */
|
|
|
|
page = notebook->first_tab->data;
|
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
for (children = focus_tab;
|
|
|
|
children && children != notebook->first_tab;
|
|
|
|
children = gtk_notebook_search_page (notebook,
|
|
|
|
children,
|
|
|
|
STEP_PREV,
|
|
|
|
TRUE));
|
|
|
|
}
|
|
|
|
if (!children)
|
|
|
|
notebook->first_tab = focus_tab;
|
|
|
|
else
|
|
|
|
gtk_notebook_calc_tabs (notebook,
|
|
|
|
gtk_notebook_search_page (notebook,
|
|
|
|
focus_tab,
|
|
|
|
STEP_PREV,
|
|
|
|
TRUE),
|
|
|
|
&(notebook->first_tab), &tab_space,
|
|
|
|
STEP_PREV);
|
|
|
|
|
|
|
|
if (tab_space <= 0)
|
|
|
|
{
|
|
|
|
notebook->first_tab =
|
|
|
|
gtk_notebook_search_page (notebook, notebook->first_tab,
|
|
|
|
STEP_NEXT, TRUE);
|
|
|
|
if (!notebook->first_tab)
|
|
|
|
notebook->first_tab = focus_tab;
|
|
|
|
last_child = gtk_notebook_search_page (notebook, focus_tab,
|
|
|
|
STEP_NEXT, TRUE);
|
|
|
|
}
|
|
|
|
else /* focus_tab -> end */
|
|
|
|
{
|
|
|
|
if (!notebook->first_tab)
|
|
|
|
notebook->first_tab = gtk_notebook_search_page (notebook,
|
|
|
|
NULL,
|
|
|
|
STEP_NEXT,
|
|
|
|
TRUE);
|
|
|
|
children = NULL;
|
|
|
|
gtk_notebook_calc_tabs (notebook,
|
|
|
|
gtk_notebook_search_page (notebook,
|
|
|
|
focus_tab,
|
|
|
|
STEP_NEXT,
|
|
|
|
TRUE),
|
|
|
|
&children, &tab_space, STEP_NEXT);
|
|
|
|
|
|
|
|
if (tab_space <= 0)
|
|
|
|
last_child = children;
|
|
|
|
else /* start <- first_tab */
|
|
|
|
{
|
|
|
|
last_child = NULL;
|
|
|
|
children = NULL;
|
|
|
|
gtk_notebook_calc_tabs
|
|
|
|
(notebook,
|
|
|
|
gtk_notebook_search_page (notebook,
|
|
|
|
notebook->first_tab,
|
|
|
|
STEP_PREV,
|
|
|
|
TRUE),
|
|
|
|
&children, &tab_space, STEP_PREV);
|
|
|
|
notebook->first_tab = gtk_notebook_search_page(notebook,
|
|
|
|
children,
|
|
|
|
STEP_NEXT,
|
|
|
|
TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tab_space < 0)
|
|
|
|
{
|
|
|
|
tab_space = -tab_space;
|
|
|
|
n = 0;
|
|
|
|
for (children = notebook->first_tab;
|
|
|
|
children && children != last_child;
|
|
|
|
children = gtk_notebook_search_page (notebook, children,
|
|
|
|
STEP_NEXT, TRUE))
|
|
|
|
n++;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
tab_space = 0;
|
|
|
|
|
|
|
|
/*unmap all non-visible tabs*/
|
|
|
|
for (children = gtk_notebook_search_page (notebook, NULL,
|
|
|
|
STEP_NEXT, TRUE);
|
|
|
|
children && children != notebook->first_tab;
|
|
|
|
children = gtk_notebook_search_page (notebook, children,
|
|
|
|
STEP_NEXT, TRUE))
|
|
|
|
{
|
|
|
|
page = children->data;
|
2001-07-19 14:57:15 +00:00
|
|
|
if (page->tab_label)
|
|
|
|
gtk_widget_set_child_visible (page->tab_label, FALSE);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
for (children = last_child; children;
|
|
|
|
children = gtk_notebook_search_page (notebook, children,
|
|
|
|
STEP_NEXT, TRUE))
|
|
|
|
{
|
|
|
|
page = children->data;
|
2001-07-19 14:57:15 +00:00
|
|
|
if (page->tab_label)
|
|
|
|
gtk_widget_set_child_visible (page->tab_label, FALSE);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else /* !showarrow */
|
1998-01-02 20:22:38 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook->first_tab = gtk_notebook_search_page (notebook, NULL,
|
|
|
|
STEP_NEXT, TRUE);
|
|
|
|
tab_space = 0;
|
1998-01-02 20:22:38 +00:00
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!showarrow)
|
1998-06-10 21:48:21 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gint c = 0;
|
1998-06-10 21:48:21 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
n = 0;
|
|
|
|
children = notebook->children;
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
1998-06-10 21:48:21 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
children = children->next;
|
1998-06-10 21:48:21 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
{
|
|
|
|
c++;
|
|
|
|
tab_space += page->requisition.width;
|
|
|
|
if (page->expand)
|
|
|
|
n++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tab_space -= allocation->width;
|
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
1998-06-10 21:48:21 +00:00
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
children = children->next;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
{
|
|
|
|
c++;
|
|
|
|
tab_space += page->requisition.height;
|
|
|
|
if (page->expand)
|
|
|
|
n++;
|
|
|
|
}
|
1998-06-10 21:48:21 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
tab_space -= allocation->height;
|
1998-06-10 21:48:21 +00:00
|
|
|
}
|
2006-01-12 21:31:55 +00:00
|
|
|
tab_space += 2 * container->border_width + tab_overlap;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
tab_space *= -1;
|
|
|
|
notebook->first_tab = gtk_notebook_search_page (notebook, NULL,
|
|
|
|
STEP_NEXT, TRUE);
|
|
|
|
if (notebook->homogeneous && n)
|
|
|
|
n = c;
|
1998-06-10 21:48:21 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
children = notebook->first_tab;
|
2003-12-08 21:07:17 +00:00
|
|
|
i = 1;
|
|
|
|
|
|
|
|
memo_x = child_allocation.x;
|
|
|
|
if (notebook->children && is_rtl)
|
|
|
|
{
|
|
|
|
child_allocation.x = (allocation->x + allocation->width -
|
|
|
|
container->border_width);
|
2003-12-11 22:50:09 +00:00
|
|
|
if (showarrow)
|
2003-12-08 21:07:17 +00:00
|
|
|
{
|
|
|
|
if (notebook->has_after_previous)
|
|
|
|
child_allocation.x -= ARROW_SPACING + ARROW_SIZE;
|
|
|
|
if (notebook->has_after_next)
|
|
|
|
child_allocation.x -= ARROW_SPACING + ARROW_SIZE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
if (children == last_child)
|
|
|
|
{
|
2000-12-11 17:47:24 +00:00
|
|
|
/* FIXME double check */
|
|
|
|
goto done;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1998-06-10 21:48:21 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page = children->data;
|
2003-12-08 21:07:17 +00:00
|
|
|
if (!showarrow && page->pack != GTK_PACK_START)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
children = gtk_notebook_search_page (notebook, children, STEP_NEXT,TRUE);
|
|
|
|
|
|
|
|
delta = 0;
|
|
|
|
if (n && (showarrow || page->expand || notebook->homogeneous))
|
|
|
|
{
|
|
|
|
new_fill = (tab_space * i++) / n;
|
|
|
|
delta = new_fill - old_fill;
|
|
|
|
old_fill = new_fill;
|
|
|
|
}
|
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
|
|
|
child_allocation.width = (page->requisition.width +
|
2006-01-12 21:31:55 +00:00
|
|
|
tab_overlap + delta);
|
2003-12-08 21:07:17 +00:00
|
|
|
if (is_rtl)
|
|
|
|
child_allocation.x -= child_allocation.width;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
|
|
|
child_allocation.height = (page->requisition.height +
|
2006-01-12 21:31:55 +00:00
|
|
|
tab_overlap + delta);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_page_allocate (notebook, page, &child_allocation);
|
2003-12-08 21:07:17 +00:00
|
|
|
|
|
|
|
switch (tab_pos)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
2003-12-08 21:07:17 +00:00
|
|
|
if (!is_rtl)
|
2006-01-12 21:31:55 +00:00
|
|
|
child_allocation.x += child_allocation.width - tab_overlap;
|
2003-12-08 21:07:17 +00:00
|
|
|
else
|
2006-01-12 21:31:55 +00:00
|
|
|
child_allocation.x += tab_overlap;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
2006-01-12 21:31:55 +00:00
|
|
|
child_allocation.y += child_allocation.height - tab_overlap;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2001-07-19 14:57:15 +00:00
|
|
|
if (page->tab_label)
|
|
|
|
gtk_widget_set_child_visible (page->tab_label, TRUE);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (children)
|
|
|
|
{
|
|
|
|
children = notebook->children;
|
2003-12-08 21:07:17 +00:00
|
|
|
|
|
|
|
switch (tab_pos)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
2003-12-08 21:07:17 +00:00
|
|
|
if (!is_rtl)
|
|
|
|
child_allocation.x = (allocation->x + allocation->width -
|
|
|
|
container->border_width);
|
|
|
|
else
|
|
|
|
child_allocation.x = memo_x;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
|
|
|
child_allocation.y = (allocation->y + allocation->height -
|
|
|
|
container->border_width);
|
|
|
|
break;
|
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
while (children != last_child)
|
|
|
|
{
|
|
|
|
page = children->data;
|
|
|
|
children = children->next;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
if (page->pack != GTK_PACK_END || !GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
continue;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
delta = 0;
|
|
|
|
if (n && (page->expand || notebook->homogeneous))
|
|
|
|
{
|
|
|
|
new_fill = (tab_space * i++) / n;
|
|
|
|
delta = new_fill - old_fill;
|
|
|
|
old_fill = new_fill;
|
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
|
|
|
child_allocation.width = (page->requisition.width +
|
2006-01-12 21:31:55 +00:00
|
|
|
tab_overlap + delta);
|
2003-12-08 21:07:17 +00:00
|
|
|
if (!is_rtl)
|
|
|
|
child_allocation.x -= child_allocation.width;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
|
|
|
child_allocation.height = (page->requisition.height +
|
2006-01-12 21:31:55 +00:00
|
|
|
tab_overlap + delta);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
child_allocation.y -= child_allocation.height;
|
|
|
|
break;
|
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_page_allocate (notebook, page, &child_allocation);
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
2003-12-08 21:07:17 +00:00
|
|
|
if (!is_rtl)
|
2006-01-12 21:31:55 +00:00
|
|
|
child_allocation.x += tab_overlap;
|
2003-12-08 21:07:17 +00:00
|
|
|
else
|
2006-01-12 21:31:55 +00:00
|
|
|
child_allocation.x += child_allocation.width - tab_overlap;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
2006-01-12 21:31:55 +00:00
|
|
|
child_allocation.y += tab_overlap;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2001-07-19 14:57:15 +00:00
|
|
|
if (page->tab_label)
|
|
|
|
gtk_widget_set_child_visible (page->tab_label, TRUE);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
2000-12-11 17:47:24 +00:00
|
|
|
|
|
|
|
done:
|
|
|
|
gtk_notebook_redraw_tabs (notebook);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_page_allocate (GtkNotebook *notebook,
|
|
|
|
GtkNotebookPage *page,
|
|
|
|
GtkAllocation *allocation)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2001-12-04 03:27:30 +00:00
|
|
|
GtkWidget *widget = GTK_WIDGET (notebook);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkAllocation child_allocation;
|
1999-02-10 02:35:09 +00:00
|
|
|
GtkRequisition tab_requisition;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gint xthickness;
|
|
|
|
gint ythickness;
|
|
|
|
gint padding;
|
2001-12-04 03:27:30 +00:00
|
|
|
gint focus_width;
|
2006-01-12 21:31:55 +00:00
|
|
|
gint tab_curvature;
|
2003-12-08 21:07:17 +00:00
|
|
|
gint tab_pos = get_effective_tab_pos (notebook);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2006-01-12 21:31:55 +00:00
|
|
|
gtk_widget_style_get (widget,
|
|
|
|
"focus-line-width", &focus_width,
|
|
|
|
"tab-curvature", &tab_curvature,
|
|
|
|
NULL);
|
2001-12-04 03:27:30 +00:00
|
|
|
|
Make this compile without framebuffer enabled
2000-06-20 Havoc Pennington <hp@redhat.com>
* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled
* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure
* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height
* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.
2000-06-19 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.
2000-06-14 Havoc Pennington <hp@redhat.com>
* gdk/Makefile.am: add gdkpixmap.c
* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
s/gdk_image_init/_gdk_windowing_image_init
* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
ref/unref
* gdk/gdkcolor.h: make GdkColormap a GObject subclass
* gdk/gdkcompat.h: remove GdkWindowType compat, since
GdkWindowType is now non-deprecated;
change gdk_window_get_type() compat to be
gdk_window_get_window_type().
* gdk/gdkdnd.h: make GdkDragContext a GObject.
* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
virtual GObject. Make all functions call into the vtable.
Move gdk_image_put() guts in here. Remove GdkDrawableType
and gdk_drawable_get_type(), these are now GdkWindow-specific.
draw_image, get_depth, get_size, set_colormap, get_colormap,
get_visual added to the vtable.
* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
GObject. Virtualize everything.
(gdk_gc_new_with_values): remove check for destroyed window,
because now GdkWindow::create_gc will check this.
(gdk_gc_set_values): New function to set GC values, this
was already implemented but wasn't in the header
* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.
* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
_gdk_window_draw_image(), remove _gdk_windowing_window_class,
remove _gdk_window_class; add _gdk_window_impl_get_type() and
_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
_gdk_windowing_window_init, rename gdk_image_init to
_gdk_windowing_image_init.
* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
(gdk_draw_layout): Remove check for destroyed window,
because all the drawable methods already check it.
* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
Add gdkpixmap.c which contains implementation of GdkDrawable
virtual table (by chaining to a platform-specific implementation
object).
* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
GdkColormapPrivate.
* gdk/gdktypes.h: #include <glib-object.h>
* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
Move most functionality to platform-specific implementation
object. GdkWindow itself now handles the backing store, then
chains to the platform-specific implementation.
(gdk_window_get_window_type): return GdkWindowType of the window.
(gdk_window_peek_children): New routine, returns the children of
a GdkWindow
(gdk_window_get_children): Was in X11-specific code and did
XQueryTree. Changed to simply return a copy of window->children;
so it can go in cross-platform code.
* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path
* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
GdkColormap; just changed to use the new private data instead
of casting to GdkColormapPrivate.
* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
gdk_cursor_new().
* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
(private data member in the GObject).
(xdnd_manager_source_filter): Function had broken
error handling, fix it (use gdk_error_trap_push).
* gdk/x11/gdkdrawable-x11.c: This file now implements
a base class for GdkWindowImplX11/GdkPixmapImplX11. This
base class is purely for the convenience of the X port,
and not part of the interface to cross-platform GDK.
* gdk/x11/gdkevents-x11.c: Reflect various renamings.
* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
specific to X, and returned by the create_gc virtual method
of GdkDrawableImplX11.
(gdk_x11_gc_set_dashes): Change this to take an array of gint8
rather than gchar, this was also changed in the GdkGC vtable.
(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
mask is 0, return immediately, instead of checking every flag.
This is faster, and keeps us from segfaulting if values is NULL
and the mask contains some nonzero flags.
* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
GdkWindow.
* gdk/x11/gdkglobals-x11.c: change type of grab window, since
GdkWindowPrivate is gone.
* gdk/x11/gdkim-x11.c: rename things that got renamed.
* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
remove the image_put stuff that got transferred to GdkDrawable.
* gdk/x11/gdkinput.c: renamings
* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>
* gdk/x11/gdkpixmap-x11.c: GObject conversion
* gdk/x11/gdkprivate-x11.h: indentation fixes
* gdk/x11/gdkproperty-x11.c: renamings
* gdk/x11/gdkselection-x11.c: renamings
* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
implements the platform-specific "impl" object.
Moved gdk_window_get_children to gdk/gdkwindow.c
* gdk/x11/gdkx.h: Remove all the private structs and private datas
that no longer exist. Add declaration of GdkGCX11 object here.
Fix all the macros to still work.
* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
GdkDragContext from the boxed types since they are now GObjects.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
moved xthickness/ythickness into the instance. GtkStyleClass
functions are now in the standard vtable for GtkStyle, so you have
to create a GObject subclass to write a theme engine.
(gtk_style_copy): fixed a leaked PangoFontDescription
(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
can be the standard GObject function.
* Throughout GTK:
s/style->klass->[xy]thickness/style->[xy]thickness
s/pango_layout_unref/g_object_unref/
* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.
* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
accessing GDK internals.
* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
accessing GDK internals.
2000-06-20 21:04:44 +00:00
|
|
|
xthickness = widget->style->xthickness;
|
|
|
|
ythickness = widget->style->ythickness;
|
1999-01-26 00:37:58 +00:00
|
|
|
|
|
|
|
page->allocation = *allocation;
|
1999-02-10 02:35:09 +00:00
|
|
|
gtk_widget_get_child_requisition (page->tab_label, &tab_requisition);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (notebook->cur_page != page)
|
|
|
|
{
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
page->allocation.y += ythickness;
|
|
|
|
case GTK_POS_BOTTOM:
|
2005-07-27 00:00:05 +00:00
|
|
|
page->allocation.height = MAX (1, page->allocation.height - ythickness);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
page->allocation.x += xthickness;
|
|
|
|
case GTK_POS_RIGHT:
|
2005-07-27 00:00:05 +00:00
|
|
|
page->allocation.width = MAX (1, page->allocation.width - xthickness);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
2006-01-12 21:31:55 +00:00
|
|
|
padding = tab_curvature + focus_width + notebook->tab_hborder;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page->fill)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2001-12-04 03:27:30 +00:00
|
|
|
child_allocation.x = (xthickness + focus_width +
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook->tab_hborder);
|
2001-11-15 21:04:51 +00:00
|
|
|
child_allocation.width = MAX (1, (page->allocation.width -
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
2 * child_allocation.x));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
child_allocation.x += page->allocation.x;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
child_allocation.x = (page->allocation.x +
|
|
|
|
(page->allocation.width -
|
1999-02-10 02:35:09 +00:00
|
|
|
tab_requisition.width) / 2);
|
|
|
|
child_allocation.width = tab_requisition.width;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
2001-12-04 03:27:30 +00:00
|
|
|
child_allocation.y = (notebook->tab_vborder + focus_width +
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page->allocation.y);
|
2003-12-08 21:07:17 +00:00
|
|
|
if (tab_pos == GTK_POS_TOP)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
child_allocation.y += ythickness;
|
2001-12-04 03:27:30 +00:00
|
|
|
child_allocation.height = MAX (1, (((gint) page->allocation.height) - ythickness -
|
|
|
|
2 * (notebook->tab_vborder + focus_width)));
|
1998-02-19 05:13:46 +00:00
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
2006-01-12 21:31:55 +00:00
|
|
|
padding = tab_curvature + focus_width + notebook->tab_vborder;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page->fill)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
child_allocation.y = ythickness + padding;
|
2001-11-15 21:04:51 +00:00
|
|
|
child_allocation.height = MAX (1, (page->allocation.height -
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
2 * child_allocation.y));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
child_allocation.y += page->allocation.y;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
child_allocation.y = (page->allocation.y + (page->allocation.height -
|
|
|
|
tab_requisition.height) / 2);
|
1999-02-10 02:35:09 +00:00
|
|
|
child_allocation.height = tab_requisition.height;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
2001-12-04 03:27:30 +00:00
|
|
|
child_allocation.x = page->allocation.x + notebook->tab_hborder + focus_width;
|
2003-12-08 21:07:17 +00:00
|
|
|
if (tab_pos == GTK_POS_LEFT)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
child_allocation.x += xthickness;
|
2001-12-04 03:27:30 +00:00
|
|
|
child_allocation.width = MAX (1, (((gint) page->allocation.width) - xthickness -
|
|
|
|
2 * (notebook->tab_hborder + focus_width)));
|
1998-02-19 05:13:46 +00:00
|
|
|
break;
|
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (page->tab_label)
|
|
|
|
gtk_widget_size_allocate (page->tab_label, &child_allocation);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_calc_tabs (GtkNotebook *notebook,
|
|
|
|
GList *start,
|
|
|
|
GList **end,
|
|
|
|
gint *tab_space,
|
|
|
|
guint direction)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
|
|
|
GtkNotebookPage *page = NULL;
|
|
|
|
GList *children;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GList *last_list = NULL;
|
|
|
|
gboolean pack;
|
2003-12-08 21:07:17 +00:00
|
|
|
gint tab_pos = get_effective_tab_pos (notebook);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (!start)
|
1998-02-19 05:13:46 +00:00
|
|
|
return;
|
1998-06-10 21:48:21 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
children = start;
|
|
|
|
pack = GTK_NOTEBOOK_PAGE (start)->pack;
|
|
|
|
if (pack == GTK_PACK_END)
|
|
|
|
direction = (direction == STEP_PREV) ? STEP_NEXT : STEP_PREV;
|
|
|
|
|
|
|
|
while (1)
|
|
|
|
{
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
|
|
|
case GTK_POS_TOP:
|
|
|
|
case GTK_POS_BOTTOM:
|
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
{
|
|
|
|
if (page->pack == pack)
|
|
|
|
{
|
|
|
|
*tab_space -= page->requisition.width;
|
|
|
|
if (*tab_space < 0 || children == *end)
|
|
|
|
{
|
|
|
|
if (*tab_space < 0)
|
|
|
|
{
|
|
|
|
*tab_space = - (*tab_space +
|
|
|
|
page->requisition.width);
|
|
|
|
*end = children;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
last_list = children;
|
|
|
|
}
|
|
|
|
if (direction == STEP_NEXT)
|
|
|
|
children = children->next;
|
1998-02-19 05:13:46 +00:00
|
|
|
else
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
children = children->prev;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
case GTK_POS_RIGHT:
|
|
|
|
while (children)
|
|
|
|
{
|
|
|
|
page = children->data;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
{
|
|
|
|
if (page->pack == pack)
|
|
|
|
{
|
|
|
|
*tab_space -= page->requisition.height;
|
|
|
|
if (*tab_space < 0 || children == *end)
|
|
|
|
{
|
|
|
|
if (*tab_space < 0)
|
|
|
|
{
|
|
|
|
*tab_space = - (*tab_space +
|
|
|
|
page->requisition.height);
|
|
|
|
*end = children;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
last_list = children;
|
|
|
|
}
|
|
|
|
if (direction == STEP_NEXT)
|
|
|
|
children = children->next;
|
1998-02-19 05:13:46 +00:00
|
|
|
else
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
children = children->prev;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (direction == STEP_PREV)
|
|
|
|
return;
|
|
|
|
pack = (pack == GTK_PACK_END) ? GTK_PACK_START : GTK_PACK_END;
|
|
|
|
direction = STEP_PREV;
|
|
|
|
children = last_list;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-01-30 21:57:08 +00:00
|
|
|
static void
|
|
|
|
gtk_notebook_update_tab_states (GtkNotebook *notebook)
|
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
for (list = notebook->children; list != NULL; list = list->next)
|
|
|
|
{
|
|
|
|
GtkNotebookPage *page = list->data;
|
|
|
|
|
|
|
|
if (page->tab_label)
|
|
|
|
{
|
|
|
|
if (page == notebook->cur_page)
|
|
|
|
gtk_widget_set_state (page->tab_label, GTK_STATE_NORMAL);
|
|
|
|
else
|
|
|
|
gtk_widget_set_state (page->tab_label, GTK_STATE_ACTIVE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* Private GtkNotebook Page Switch Methods:
|
|
|
|
*
|
|
|
|
* gtk_notebook_real_switch_page
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gtk_notebook_real_switch_page (GtkNotebook *notebook,
|
|
|
|
GtkNotebookPage *page,
|
|
|
|
guint page_num)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
g_return_if_fail (page != NULL);
|
|
|
|
|
|
|
|
if (notebook->cur_page == page || !GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
return;
|
|
|
|
|
2001-07-19 14:57:15 +00:00
|
|
|
if (notebook->cur_page)
|
|
|
|
gtk_widget_set_child_visible (notebook->cur_page->child, FALSE);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
notebook->cur_page = page;
|
|
|
|
|
|
|
|
if (!notebook->focus_tab ||
|
|
|
|
notebook->focus_tab->data != (gpointer) notebook->cur_page)
|
|
|
|
notebook->focus_tab =
|
|
|
|
g_list_find (notebook->children, notebook->cur_page);
|
|
|
|
|
2001-07-19 14:57:15 +00:00
|
|
|
gtk_widget_set_child_visible (notebook->cur_page->child, TRUE);
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
|
2002-01-15 17:40:44 +00:00
|
|
|
/* If the focus was on the previous page, move it to the first
|
|
|
|
* element on the new page, if possible, or if not, to the
|
|
|
|
* notebook itself.
|
|
|
|
*/
|
|
|
|
if (notebook->child_has_focus)
|
|
|
|
{
|
|
|
|
if (notebook->cur_page->last_focus_child &&
|
|
|
|
gtk_widget_is_ancestor (notebook->cur_page->last_focus_child, notebook->cur_page->child))
|
|
|
|
gtk_widget_grab_focus (notebook->cur_page->last_focus_child);
|
|
|
|
else
|
|
|
|
if (!gtk_widget_child_focus (notebook->cur_page->child, GTK_DIR_TAB_FORWARD))
|
|
|
|
gtk_widget_grab_focus (GTK_WIDGET (notebook));
|
|
|
|
}
|
|
|
|
|
2003-01-30 21:57:08 +00:00
|
|
|
gtk_notebook_update_tab_states (notebook);
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
2001-05-17 16:22:06 +00:00
|
|
|
g_object_notify (G_OBJECT (notebook), "page");
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Private GtkNotebook Page Switch Functions:
|
|
|
|
*
|
|
|
|
* gtk_notebook_switch_page
|
|
|
|
* gtk_notebook_page_select
|
|
|
|
* gtk_notebook_switch_focus_tab
|
|
|
|
* gtk_notebook_menu_switch_page
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gtk_notebook_switch_page (GtkNotebook *notebook,
|
|
|
|
GtkNotebookPage *page,
|
1998-11-29 22:00:28 +00:00
|
|
|
gint page_num)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
g_return_if_fail (page != NULL);
|
|
|
|
|
|
|
|
if (notebook->cur_page == page)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (page_num < 0)
|
|
|
|
page_num = g_list_index (notebook->children, page);
|
|
|
|
|
2002-10-05 23:15:39 +00:00
|
|
|
g_signal_emit (notebook,
|
|
|
|
notebook_signals[SWITCH_PAGE],
|
|
|
|
0,
|
|
|
|
page,
|
|
|
|
page_num);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_page_select (GtkNotebook *notebook,
|
|
|
|
gboolean move_focus)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
GtkNotebookPage *page;
|
2000-12-11 17:47:24 +00:00
|
|
|
GtkDirectionType dir = GTK_DIR_DOWN; /* Quiet GCC */
|
2003-12-08 21:07:17 +00:00
|
|
|
gint tab_pos = get_effective_tab_pos (notebook);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), FALSE);
|
|
|
|
|
|
|
|
if (!notebook->focus_tab)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
page = notebook->focus_tab->data;
|
|
|
|
gtk_notebook_switch_page (notebook, page, -1);
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
if (move_focus)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
2003-12-08 21:07:17 +00:00
|
|
|
switch (tab_pos)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
2000-12-11 17:47:24 +00:00
|
|
|
case GTK_POS_TOP:
|
|
|
|
dir = GTK_DIR_DOWN;
|
|
|
|
break;
|
|
|
|
case GTK_POS_BOTTOM:
|
|
|
|
dir = GTK_DIR_UP;
|
|
|
|
break;
|
|
|
|
case GTK_POS_LEFT:
|
|
|
|
dir = GTK_DIR_RIGHT;
|
|
|
|
break;
|
|
|
|
case GTK_POS_RIGHT:
|
|
|
|
dir = GTK_DIR_LEFT;
|
|
|
|
break;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
2001-06-08 18:09:34 +00:00
|
|
|
|
|
|
|
if (gtk_widget_child_focus (page->child, dir))
|
|
|
|
return TRUE;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_notebook_switch_focus_tab (GtkNotebook *notebook,
|
|
|
|
GList *new_child)
|
|
|
|
{
|
|
|
|
GList *old_child;
|
|
|
|
GtkNotebookPage *page;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
|
|
|
if (notebook->focus_tab == new_child)
|
|
|
|
return;
|
|
|
|
|
|
|
|
old_child = notebook->focus_tab;
|
|
|
|
notebook->focus_tab = new_child;
|
|
|
|
|
2001-11-15 21:04:51 +00:00
|
|
|
if (notebook->scrollable)
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_redraw_arrows (notebook);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (!notebook->show_tabs || !notebook->focus_tab)
|
|
|
|
return;
|
|
|
|
|
|
|
|
page = notebook->focus_tab->data;
|
|
|
|
if (GTK_WIDGET_MAPPED (page->tab_label))
|
2002-11-13 17:20:33 +00:00
|
|
|
gtk_notebook_redraw_tabs (notebook);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_pages_allocate (notebook);
|
2002-10-25 21:59:10 +00:00
|
|
|
|
|
|
|
gtk_notebook_switch_page (notebook, page,
|
|
|
|
g_list_index (notebook->children, page));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_notebook_menu_switch_page (GtkWidget *widget,
|
|
|
|
GtkNotebookPage *page)
|
|
|
|
{
|
|
|
|
GtkNotebook *notebook;
|
|
|
|
GList *children;
|
|
|
|
guint page_num;
|
|
|
|
|
|
|
|
g_return_if_fail (widget != NULL);
|
|
|
|
g_return_if_fail (page != NULL);
|
|
|
|
|
|
|
|
notebook = GTK_NOTEBOOK (gtk_menu_get_attach_widget
|
|
|
|
(GTK_MENU (widget->parent)));
|
|
|
|
|
|
|
|
if (notebook->cur_page == page)
|
|
|
|
return;
|
|
|
|
|
|
|
|
page_num = 0;
|
|
|
|
children = notebook->children;
|
|
|
|
while (children && children->data != page)
|
|
|
|
{
|
|
|
|
children = children->next;
|
|
|
|
page_num++;
|
|
|
|
}
|
|
|
|
|
2002-10-05 23:15:39 +00:00
|
|
|
g_signal_emit (notebook,
|
|
|
|
notebook_signals[SWITCH_PAGE],
|
|
|
|
0,
|
|
|
|
page,
|
|
|
|
page_num);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Private GtkNotebook Menu Functions:
|
|
|
|
*
|
|
|
|
* gtk_notebook_menu_item_create
|
|
|
|
* gtk_notebook_menu_label_unparent
|
|
|
|
* gtk_notebook_menu_detacher
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gtk_notebook_menu_item_create (GtkNotebook *notebook,
|
|
|
|
GList *list)
|
|
|
|
{
|
|
|
|
GtkNotebookPage *page;
|
|
|
|
GtkWidget *menu_item;
|
|
|
|
|
|
|
|
page = list->data;
|
|
|
|
if (page->default_menu)
|
|
|
|
{
|
|
|
|
if (page->tab_label && GTK_IS_LABEL (page->tab_label))
|
|
|
|
page->menu_label = gtk_label_new (GTK_LABEL (page->tab_label)->label);
|
|
|
|
else
|
|
|
|
page->menu_label = gtk_label_new ("");
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (page->menu_label), 0.0, 0.5);
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_widget_show (page->menu_label);
|
|
|
|
menu_item = gtk_menu_item_new ();
|
|
|
|
gtk_container_add (GTK_CONTAINER (menu_item), page->menu_label);
|
Add note about GtkMenuPositionFunc API changes.
2000-11-08 Alexander Larsson <alexl@redhat.com>
* docs/Changes-2.0.txt: Add note about GtkMenuPositionFunc
API changes.
* gtk/gtkmenu.c: Add support for scrolling menus.
Remove gtk_menu_append/prepend/insert, these have been moved to
gtkcompat.h as #defines.
* gtk/gtkcompat.h.in:
Add compatibility #defines for gtk_menu_append/prepend/insert
* gtk/gtkmenu.h: Add data needed for scrolling menus.
GtkMenuPositionFunc gets an extra argument push_in.
gtk_menu_append/prepend/insert removed.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Change menu
positioning behaviour to fit to scrolling menus.
* gtk/gtkmenuitem.c (gtk_menu_item_forall): Don't recurse
into menuitem->submeny. That is wrong, and broke torn
off submenus of torn off menus, since they were unrealized
when the first menu was unrealized.
* gtk/gtkmenushell.[ch]: Virtualize gtk_menu_shell_insert() and
gtk_menu_shell_select_item() since these need to be overridden in
GtkMenu.
* gtk/gtkoptionmenu.c (gtk_opttion_menu_position): Change menu
positioning behaviour to fit to scrolling menus.
(gtk_option_menu_key_press, gtk_option_menu_button_press): Select
the current item so that it is prelighted when the menu pops up.
This is a workaround to the fact that the menu doesn't get the
initial enter event (due to grabs).
* gtk/gtkfilesel.c, gtk/gtkinputdialog.c, gtk/testgtk.c:
s/gtk_menu_append/gtk_menu_shell_append/
* gtk/gtknotebook.c:
s/gtk_menu_insert/gtk_menu_shell_insert/
* gtk/testgtk.c (create_menu, create_menus):
Create the first menu with 50 items so that menu scrolling
can be tested.
Patch from Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmenuitem.[ch] (gtk_menu_item_toggle_size_request): new
system to handle size requests. First, we ask what the size of
the toggle is. Then, when allocating the size, we allocate the
toggle_size first. This way we can have multiple menu-item
classes w/o needing a seperate class for each.
* gtk/gtkmenu.c (gtk_menu_size_request): Actually use the new system.
* gtk/gtkmenu.c (gtk_menu_size_allocate): Use the new system.
* gtk/gtkcheckmenuitem.c
(gtk_check_menu_item_toggle_size_request): New function to handle
the toggle size-request.
2000-11-08 17:34:52 +00:00
|
|
|
gtk_menu_shell_insert (GTK_MENU_SHELL (notebook->menu), menu_item,
|
|
|
|
gtk_notebook_real_page_position (notebook, list));
|
2002-10-05 23:15:39 +00:00
|
|
|
g_signal_connect (menu_item, "activate",
|
|
|
|
G_CALLBACK (gtk_notebook_menu_switch_page), page);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (GTK_WIDGET_VISIBLE (page->child))
|
|
|
|
gtk_widget_show (menu_item);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_notebook_menu_label_unparent (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
gtk_widget_unparent (GTK_BIN(widget)->child);
|
|
|
|
GTK_BIN(widget)->child = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_notebook_menu_detacher (GtkWidget *widget,
|
|
|
|
GtkMenu *menu)
|
|
|
|
{
|
|
|
|
GtkNotebook *notebook;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (widget));
|
|
|
|
|
|
|
|
notebook = GTK_NOTEBOOK (widget);
|
|
|
|
g_return_if_fail (notebook->menu == (GtkWidget*) menu);
|
|
|
|
|
|
|
|
notebook->menu = NULL;
|
|
|
|
}
|
|
|
|
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
/* Private GtkNotebook Setter Functions:
|
|
|
|
*
|
|
|
|
* gtk_notebook_set_homogeneous_tabs_internal
|
|
|
|
* gtk_notebook_set_tab_border_internal
|
|
|
|
* gtk_notebook_set_tab_hborder_internal
|
|
|
|
* gtk_notebook_set_tab_vborder_internal
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gtk_notebook_set_homogeneous_tabs_internal (GtkNotebook *notebook,
|
|
|
|
gboolean homogeneous)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
|
|
|
if (homogeneous == notebook->homogeneous)
|
|
|
|
return;
|
|
|
|
|
|
|
|
notebook->homogeneous = homogeneous;
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
|
|
|
|
|
|
|
g_object_notify (G_OBJECT (notebook), "homogeneous");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_notebook_set_tab_border_internal (GtkNotebook *notebook,
|
|
|
|
guint border_width)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
|
|
|
notebook->tab_hborder = border_width;
|
|
|
|
notebook->tab_vborder = border_width;
|
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
|
|
|
|
|
|
|
g_object_freeze_notify (G_OBJECT (notebook));
|
2005-03-26 05:49:15 +00:00
|
|
|
g_object_notify (G_OBJECT (notebook), "tab-hborder");
|
|
|
|
g_object_notify (G_OBJECT (notebook), "tab-vborder");
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
g_object_thaw_notify (G_OBJECT (notebook));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_notebook_set_tab_hborder_internal (GtkNotebook *notebook,
|
|
|
|
guint tab_hborder)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
|
|
|
if (notebook->tab_hborder == tab_hborder)
|
|
|
|
return;
|
|
|
|
|
|
|
|
notebook->tab_hborder = tab_hborder;
|
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
|
|
|
|
2005-03-26 05:49:15 +00:00
|
|
|
g_object_notify (G_OBJECT (notebook), "tab-hborder");
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_notebook_set_tab_vborder_internal (GtkNotebook *notebook,
|
|
|
|
guint tab_vborder)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
|
|
|
if (notebook->tab_vborder == tab_vborder)
|
|
|
|
return;
|
|
|
|
|
|
|
|
notebook->tab_vborder = tab_vborder;
|
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
|
|
|
|
2005-03-26 05:49:15 +00:00
|
|
|
g_object_notify (G_OBJECT (notebook), "tab-vborder");
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* Public GtkNotebook Page Insert/Remove Methods :
|
|
|
|
*
|
|
|
|
* gtk_notebook_append_page
|
|
|
|
* gtk_notebook_append_page_menu
|
|
|
|
* gtk_notebook_prepend_page
|
|
|
|
* gtk_notebook_prepend_page_menu
|
|
|
|
* gtk_notebook_insert_page
|
|
|
|
* gtk_notebook_insert_page_menu
|
|
|
|
* gtk_notebook_remove_page
|
|
|
|
*/
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_append_page:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the #GtkWidget to use as the contents of the page.
|
|
|
|
* @tab_label: the #GtkWidget to be used as the label for the page,
|
|
|
|
* or %NULL to use the default label, 'page N'.
|
|
|
|
*
|
|
|
|
* Appends a page to @notebook.
|
2004-01-15 23:04:43 +00:00
|
|
|
*
|
|
|
|
* Return value: the index (starting from 0) of the appended
|
|
|
|
* page in the notebook, or -1 if function fails
|
2000-12-11 17:47:24 +00:00
|
|
|
**/
|
2004-01-15 23:04:43 +00:00
|
|
|
gint
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_append_page (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
GtkWidget *tab_label)
|
|
|
|
{
|
2004-01-15 23:04:43 +00:00
|
|
|
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);
|
2000-12-11 17:47:24 +00:00
|
|
|
|
2004-01-15 23:04:43 +00:00
|
|
|
return gtk_notebook_insert_page_menu (notebook, child, tab_label, NULL, -1);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_append_page_menu:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the #GtkWidget to use as the contents of the page.
|
|
|
|
* @tab_label: the #GtkWidget to be used as the label for the page,
|
|
|
|
* or %NULL to use the default label, 'page N'.
|
|
|
|
* @menu_label: the widget to use as a label for the page-switch
|
|
|
|
* menu, if that is enabled. If %NULL, and @tab_label
|
|
|
|
* is a #GtkLabel or %NULL, then the menu label will be
|
|
|
|
* a newly created label with the same text as @tab_label;
|
|
|
|
* If @tab_label is not a #GtkLabel, @menu_label must be
|
|
|
|
* specified if the page-switch menu is to be used.
|
|
|
|
*
|
|
|
|
* Appends a page to @notebook, specifying the widget to use as the
|
|
|
|
* label in the popup menu.
|
2004-01-15 23:04:43 +00:00
|
|
|
*
|
|
|
|
* Return value: the index (starting from 0) of the appended
|
|
|
|
* page in the notebook, or -1 if function fails
|
2000-12-11 17:47:24 +00:00
|
|
|
**/
|
2004-01-15 23:04:43 +00:00
|
|
|
gint
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_append_page_menu (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
GtkWidget *tab_label,
|
|
|
|
GtkWidget *menu_label)
|
|
|
|
{
|
2004-01-15 23:04:43 +00:00
|
|
|
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);
|
2000-12-11 17:47:24 +00:00
|
|
|
|
2004-01-15 23:04:43 +00:00
|
|
|
return gtk_notebook_insert_page_menu (notebook, child, tab_label, menu_label, -1);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_prepend_page:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the #GtkWidget to use as the contents of the page.
|
|
|
|
* @tab_label: the #GtkWidget to be used as the label for the page,
|
|
|
|
* or %NULL to use the default label, 'page N'.
|
|
|
|
*
|
2001-11-14 22:36:23 +00:00
|
|
|
* Prepends a page to @notebook.
|
2004-01-15 23:04:43 +00:00
|
|
|
*
|
|
|
|
* Return value: the index (starting from 0) of the prepended
|
|
|
|
* page in the notebook, or -1 if function fails
|
2000-12-11 17:47:24 +00:00
|
|
|
**/
|
2004-01-15 23:04:43 +00:00
|
|
|
gint
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_prepend_page (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
GtkWidget *tab_label)
|
|
|
|
{
|
2004-01-15 23:04:43 +00:00
|
|
|
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);
|
2000-12-11 17:47:24 +00:00
|
|
|
|
2004-01-15 23:04:43 +00:00
|
|
|
return gtk_notebook_insert_page_menu (notebook, child, tab_label, NULL, 0);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_prepend_page_menu:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the #GtkWidget to use as the contents of the page.
|
|
|
|
* @tab_label: the #GtkWidget to be used as the label for the page,
|
|
|
|
* or %NULL to use the default label, 'page N'.
|
|
|
|
* @menu_label: the widget to use as a label for the page-switch
|
|
|
|
* menu, if that is enabled. If %NULL, and @tab_label
|
|
|
|
* is a #GtkLabel or %NULL, then the menu label will be
|
|
|
|
* a newly created label with the same text as @tab_label;
|
|
|
|
* If @tab_label is not a #GtkLabel, @menu_label must be
|
|
|
|
* specified if the page-switch menu is to be used.
|
|
|
|
*
|
|
|
|
* Prepends a page to @notebook, specifying the widget to use as the
|
|
|
|
* label in the popup menu.
|
2004-01-15 23:04:43 +00:00
|
|
|
*
|
|
|
|
* Return value: the index (starting from 0) of the prepended
|
|
|
|
* page in the notebook, or -1 if function fails
|
2000-12-11 17:47:24 +00:00
|
|
|
**/
|
2004-01-15 23:04:43 +00:00
|
|
|
gint
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_prepend_page_menu (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
GtkWidget *tab_label,
|
|
|
|
GtkWidget *menu_label)
|
|
|
|
{
|
2004-01-15 23:04:43 +00:00
|
|
|
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);
|
2000-12-11 17:47:24 +00:00
|
|
|
|
2004-01-15 23:04:43 +00:00
|
|
|
return gtk_notebook_insert_page_menu (notebook, child, tab_label, menu_label, 0);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_insert_page:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the #GtkWidget to use as the contents of the page.
|
|
|
|
* @tab_label: the #GtkWidget to be used as the label for the page,
|
|
|
|
* or %NULL to use the default label, 'page N'.
|
|
|
|
* @position: the index (starting at 0) at which to insert the page,
|
|
|
|
* or -1 to append the page after all other pages.
|
|
|
|
*
|
2004-01-15 23:04:43 +00:00
|
|
|
* 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
|
2000-12-11 17:47:24 +00:00
|
|
|
**/
|
2004-01-15 23:04:43 +00:00
|
|
|
gint
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_insert_page (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
GtkWidget *tab_label,
|
|
|
|
gint position)
|
|
|
|
{
|
2004-01-15 23:04:43 +00:00
|
|
|
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);
|
2000-12-11 17:47:24 +00:00
|
|
|
|
2004-01-15 23:04:43 +00:00
|
|
|
return gtk_notebook_insert_page_menu (notebook, child, tab_label, NULL, position);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
2001-03-21 18:58:28 +00:00
|
|
|
|
|
|
|
static gint
|
|
|
|
gtk_notebook_page_compare_tab (gconstpointer a,
|
|
|
|
gconstpointer b)
|
|
|
|
{
|
|
|
|
return (((GtkNotebookPage *) a)->tab_label != b);
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2001-04-01 07:32:41 +00:00
|
|
|
gtk_notebook_mnemonic_activate_switch_page (GtkWidget *child,
|
2001-03-21 18:58:28 +00:00
|
|
|
gboolean overload,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
GtkNotebook *notebook = GTK_NOTEBOOK (data);
|
|
|
|
GList *list;
|
2001-03-22 13:44:00 +00:00
|
|
|
|
2001-03-21 18:58:28 +00:00
|
|
|
list = g_list_find_custom (notebook->children, child,
|
|
|
|
gtk_notebook_page_compare_tab);
|
2001-03-22 13:44:00 +00:00
|
|
|
if (list)
|
|
|
|
{
|
|
|
|
GtkNotebookPage *page = list->data;
|
2001-03-21 18:58:28 +00:00
|
|
|
|
2002-01-17 00:34:58 +00:00
|
|
|
gtk_widget_grab_focus (GTK_WIDGET (notebook)); /* Do this first to avoid focusing new page */
|
2001-03-22 13:44:00 +00:00
|
|
|
gtk_notebook_switch_page (notebook, page, -1);
|
2002-01-15 17:40:44 +00:00
|
|
|
focus_tabs_in (notebook);
|
2001-03-22 13:44:00 +00:00
|
|
|
}
|
2001-03-21 18:58:28 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2006-02-20 23:11:55 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
page_visible_cb (GtkWidget *page,
|
|
|
|
GParamSpec *arg,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
GtkNotebook *notebook = (GtkNotebook *)data;
|
|
|
|
GList *list;
|
|
|
|
GList *next = NULL;
|
|
|
|
|
|
|
|
if (notebook->cur_page &&
|
|
|
|
notebook->cur_page->child == page &&
|
|
|
|
!GTK_WIDGET_VISIBLE (page))
|
|
|
|
{
|
|
|
|
list = g_list_find (notebook->children, notebook->cur_page);
|
|
|
|
if (list)
|
|
|
|
{
|
|
|
|
next = gtk_notebook_search_page (notebook, list, STEP_NEXT, TRUE);
|
|
|
|
if (!next)
|
|
|
|
next = gtk_notebook_search_page (notebook, list, STEP_PREV, TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (next)
|
|
|
|
gtk_notebook_switch_page (notebook, GTK_NOTEBOOK_PAGE (next), -1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_insert_page_menu:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the #GtkWidget to use as the contents of the page.
|
|
|
|
* @tab_label: the #GtkWidget to be used as the label for the page,
|
|
|
|
* or %NULL to use the default label, 'page N'.
|
|
|
|
* @menu_label: the widget to use as a label for the page-switch
|
|
|
|
* menu, if that is enabled. If %NULL, and @tab_label
|
|
|
|
* is a #GtkLabel or %NULL, then the menu label will be
|
|
|
|
* a newly created label with the same text as @tab_label;
|
|
|
|
* If @tab_label is not a #GtkLabel, @menu_label must be
|
|
|
|
* specified if the page-switch menu is to be used.
|
|
|
|
* @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, specifying
|
|
|
|
* the widget to use as the label in the popup menu.
|
2004-01-15 23:04:43 +00:00
|
|
|
*
|
|
|
|
* Return value: the index (starting from 0) of the inserted
|
|
|
|
* page in the notebook, or -1 if function fails
|
2000-12-11 17:47:24 +00:00
|
|
|
**/
|
2004-01-15 23:04:43 +00:00
|
|
|
gint
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_insert_page_menu (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
GtkWidget *tab_label,
|
|
|
|
GtkWidget *menu_label,
|
|
|
|
gint position)
|
|
|
|
{
|
|
|
|
GtkNotebookPage *page;
|
|
|
|
gint nchildren;
|
|
|
|
|
2004-01-15 23:04:43 +00:00
|
|
|
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);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_widget_freeze_child_notify (child);
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page = g_new (GtkNotebookPage, 1);
|
|
|
|
page->child = child;
|
2002-01-15 17:40:44 +00:00
|
|
|
page->last_focus_child = NULL;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page->requisition.width = 0;
|
|
|
|
page->requisition.height = 0;
|
|
|
|
page->allocation.x = 0;
|
|
|
|
page->allocation.y = 0;
|
|
|
|
page->allocation.width = 0;
|
|
|
|
page->allocation.height = 0;
|
|
|
|
page->default_menu = FALSE;
|
|
|
|
page->default_tab = FALSE;
|
2001-04-01 07:32:41 +00:00
|
|
|
page->mnemonic_activate_signal = 0;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
nchildren = g_list_length (notebook->children);
|
|
|
|
if ((position < 0) || (position > nchildren))
|
|
|
|
position = nchildren;
|
|
|
|
|
|
|
|
notebook->children = g_list_insert (notebook->children, page, position);
|
|
|
|
|
|
|
|
if (!tab_label)
|
|
|
|
{
|
|
|
|
page->default_tab = TRUE;
|
|
|
|
if (notebook->show_tabs)
|
|
|
|
tab_label = gtk_label_new ("");
|
|
|
|
}
|
|
|
|
page->tab_label = tab_label;
|
|
|
|
page->menu_label = menu_label;
|
|
|
|
page->expand = FALSE;
|
|
|
|
page->fill = TRUE;
|
2003-12-08 21:07:17 +00:00
|
|
|
page->pack = GTK_PACK_START;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (!menu_label)
|
|
|
|
page->default_menu = TRUE;
|
|
|
|
else
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2005-11-23 18:06:58 +00:00
|
|
|
g_object_ref_sink (page->menu_label);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (notebook->menu)
|
|
|
|
gtk_notebook_menu_item_create (notebook,
|
|
|
|
g_list_find (notebook->children, page));
|
|
|
|
|
2001-07-31 21:23:19 +00:00
|
|
|
gtk_widget_set_parent (child, GTK_WIDGET (notebook));
|
|
|
|
if (tab_label)
|
|
|
|
gtk_widget_set_parent (tab_label, GTK_WIDGET (notebook));
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_update_labels (notebook);
|
|
|
|
|
|
|
|
if (!notebook->first_tab)
|
|
|
|
notebook->first_tab = notebook->children;
|
|
|
|
|
2005-05-06 19:36:41 +00:00
|
|
|
/* child visible will be turned on by switch_page below */
|
|
|
|
gtk_widget_set_child_visible (child, FALSE);
|
2001-07-19 14:57:15 +00:00
|
|
|
|
|
|
|
if (tab_label)
|
|
|
|
{
|
|
|
|
if (notebook->show_tabs && GTK_WIDGET_VISIBLE (child))
|
|
|
|
gtk_widget_show (tab_label);
|
|
|
|
else
|
|
|
|
gtk_widget_hide (tab_label);
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!notebook->cur_page)
|
|
|
|
{
|
|
|
|
gtk_notebook_switch_page (notebook, page, 0);
|
|
|
|
gtk_notebook_switch_focus_tab (notebook, NULL);
|
|
|
|
}
|
|
|
|
|
2006-02-20 23:11:55 +00:00
|
|
|
page->notify_visible_handler = g_signal_connect (G_OBJECT (child), "notify::visible", G_CALLBACK (page_visible_cb), notebook);
|
|
|
|
|
2003-01-30 21:57:08 +00:00
|
|
|
gtk_notebook_update_tab_states (notebook);
|
|
|
|
|
2001-03-21 18:58:28 +00:00
|
|
|
if (tab_label)
|
2001-04-01 07:32:41 +00:00
|
|
|
page->mnemonic_activate_signal =
|
2002-10-05 23:15:39 +00:00
|
|
|
g_signal_connect (tab_label,
|
|
|
|
"mnemonic_activate",
|
|
|
|
G_CALLBACK (gtk_notebook_mnemonic_activate_switch_page),
|
|
|
|
notebook);
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
|
2005-03-26 05:49:15 +00:00
|
|
|
gtk_widget_child_notify (child, "tab-expand");
|
|
|
|
gtk_widget_child_notify (child, "tab-fill");
|
|
|
|
gtk_widget_child_notify (child, "tab-pack");
|
|
|
|
gtk_widget_child_notify (child, "tab-label");
|
|
|
|
gtk_widget_child_notify (child, "menu-label");
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_widget_child_notify (child, "position");
|
|
|
|
gtk_widget_thaw_child_notify (child);
|
2004-01-15 23:04:43 +00:00
|
|
|
|
|
|
|
return position;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_remove_page:
|
|
|
|
* @notebook: a #GtkNotebook.
|
|
|
|
* @page_num: the index of a notebook page, starting
|
|
|
|
* from 0. If -1, the last page will
|
|
|
|
* be removed.
|
|
|
|
*
|
|
|
|
* Removes a page from the notebook given its index
|
|
|
|
* in the notebook.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_remove_page (GtkNotebook *notebook,
|
|
|
|
gint page_num)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GList *list;
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page_num >= 0)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
list = g_list_nth (notebook->children, page_num);
|
|
|
|
if (list)
|
2002-12-10 12:02:43 +00:00
|
|
|
gtk_notebook_real_remove (notebook, list, FALSE);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
list = g_list_last (notebook->children);
|
|
|
|
if (list)
|
2002-12-10 12:02:43 +00:00
|
|
|
gtk_notebook_real_remove (notebook, list, FALSE);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
1998-01-06 21:59:43 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* Public GtkNotebook Page Switch Methods :
|
1998-11-28 07:42:37 +00:00
|
|
|
* gtk_notebook_get_current_page
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
* gtk_notebook_page_num
|
2001-06-24 15:34:48 +00:00
|
|
|
* gtk_notebook_set_current_page
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
* gtk_notebook_next_page
|
|
|
|
* gtk_notebook_prev_page
|
|
|
|
*/
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_get_current_page:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
*
|
|
|
|
* Returns the page number of the current page.
|
|
|
|
*
|
|
|
|
* Return value: the index (starting from 0) of the current
|
|
|
|
* page in the notebook. If the notebook has no pages, then
|
|
|
|
* -1 will be returned.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gint
|
1998-11-28 07:42:37 +00:00
|
|
|
gtk_notebook_get_current_page (GtkNotebook *notebook)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1);
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!notebook->cur_page)
|
|
|
|
return -1;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
return g_list_index (notebook->children, notebook->cur_page);
|
|
|
|
}
|
1998-02-25 22:03:10 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_get_nth_page:
|
|
|
|
* @notebook: a #GtkNotebook
|
2002-09-23 22:05:41 +00:00
|
|
|
* @page_num: the index of a page in the noteobok, or -1
|
|
|
|
* to get the last page.
|
2000-12-11 17:47:24 +00:00
|
|
|
*
|
|
|
|
* Returns the child widget contained in page number @page_num.
|
|
|
|
*
|
|
|
|
* Return value: the child widget, or %NULL if @page_num is
|
|
|
|
* out of bounds.
|
|
|
|
**/
|
1998-12-02 03:40:03 +00:00
|
|
|
GtkWidget*
|
|
|
|
gtk_notebook_get_nth_page (GtkNotebook *notebook,
|
|
|
|
gint page_num)
|
1998-12-02 00:52:14 +00:00
|
|
|
{
|
|
|
|
GtkNotebookPage *page;
|
2002-09-23 22:05:41 +00:00
|
|
|
GList *list;
|
1998-12-02 00:52:14 +00:00
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), NULL);
|
|
|
|
|
2002-09-23 22:05:41 +00:00
|
|
|
if (page_num >= 0)
|
|
|
|
list = g_list_nth (notebook->children, page_num);
|
|
|
|
else
|
|
|
|
list = g_list_last (notebook->children);
|
1998-12-02 00:52:14 +00:00
|
|
|
|
2002-09-23 22:05:41 +00:00
|
|
|
if (list)
|
|
|
|
{
|
|
|
|
page = list->data;
|
|
|
|
return page->child;
|
|
|
|
}
|
1998-12-02 00:52:14 +00:00
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2002-09-23 22:05:41 +00:00
|
|
|
/**
|
2002-10-10 23:42:57 +00:00
|
|
|
* gtk_notebook_get_n_pages:
|
2002-09-23 22:05:41 +00:00
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
*
|
|
|
|
* Gets the number of pages in a notebook.
|
|
|
|
*
|
|
|
|
* Return value: the number of pages in the notebook.
|
2002-11-28 00:33:17 +00:00
|
|
|
*
|
|
|
|
* Since: 2.2
|
2002-09-23 22:05:41 +00:00
|
|
|
**/
|
|
|
|
gint
|
|
|
|
gtk_notebook_get_n_pages (GtkNotebook *notebook)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), 0);
|
|
|
|
|
|
|
|
return g_list_length (notebook->children);
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_page_num:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: a #GtkWidget
|
|
|
|
*
|
|
|
|
* Finds the index of the page which contains the given child
|
|
|
|
* widget.
|
|
|
|
*
|
|
|
|
* Return value: the index of the page containing @child, or
|
|
|
|
* -1 if @child is not in the notebook.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gint
|
|
|
|
gtk_notebook_page_num (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child)
|
|
|
|
{
|
|
|
|
GList *children;
|
|
|
|
gint num;
|
1998-02-25 22:03:10 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1);
|
|
|
|
|
|
|
|
num = 0;
|
1998-02-19 05:13:46 +00:00
|
|
|
children = notebook->children;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
while (children)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
2000-12-11 17:47:24 +00:00
|
|
|
GtkNotebookPage *page = children->data;
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page->child == child)
|
|
|
|
return num;
|
|
|
|
|
1998-02-19 05:13:46 +00:00
|
|
|
children = children->next;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
num++;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
return -1;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
2001-06-24 15:34:48 +00:00
|
|
|
* gtk_notebook_set_current_page:
|
2000-12-11 17:47:24 +00:00
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @page_num: index of the page to switch to, starting from 0.
|
2002-03-04 15:54:09 +00:00
|
|
|
* If negative, the last page will be used. If greater
|
|
|
|
* than the number of pages in the notebook, nothing
|
|
|
|
* will be done.
|
2000-12-11 17:47:24 +00:00
|
|
|
*
|
|
|
|
* Switches to the page number @page_num.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
2001-06-24 15:34:48 +00:00
|
|
|
gtk_notebook_set_current_page (GtkNotebook *notebook,
|
|
|
|
gint page_num)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
|
1998-02-25 22:03:10 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (page_num >= 0)
|
|
|
|
list = g_list_nth (notebook->children, page_num);
|
|
|
|
else
|
2000-12-11 17:47:24 +00:00
|
|
|
list = g_list_last (notebook->children);
|
|
|
|
|
|
|
|
page_num = g_list_index (notebook->children, list);
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (list)
|
|
|
|
gtk_notebook_switch_page (notebook, GTK_NOTEBOOK_PAGE (list), page_num);
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_next_page:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
*
|
|
|
|
* Switches to the next page. Nothing happens if the current page is
|
|
|
|
* the last page.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_next_page (GtkNotebook *notebook)
|
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
|
|
|
list = g_list_find (notebook->children, notebook->cur_page);
|
|
|
|
if (!list)
|
1998-02-25 22:03:10 +00:00
|
|
|
return;
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
list = gtk_notebook_search_page (notebook, list, STEP_NEXT, TRUE);
|
|
|
|
if (!list)
|
|
|
|
return;
|
|
|
|
|
|
|
|
gtk_notebook_switch_page (notebook, GTK_NOTEBOOK_PAGE (list), -1);
|
1998-01-06 21:59:43 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_prev_page:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
*
|
|
|
|
* Switches to the previous page. Nothing happens if the current page
|
|
|
|
* is the first page.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_prev_page (GtkNotebook *notebook)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GList *list;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
list = g_list_find (notebook->children, notebook->cur_page);
|
|
|
|
if (!list)
|
|
|
|
return;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
list = gtk_notebook_search_page (notebook, list, STEP_PREV, TRUE);
|
|
|
|
if (!list)
|
|
|
|
return;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_switch_page (notebook, GTK_NOTEBOOK_PAGE (list), -1);
|
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* Public GtkNotebook/Tab Style Functions
|
|
|
|
*
|
|
|
|
* gtk_notebook_set_show_border
|
|
|
|
* gtk_notebook_set_show_tabs
|
|
|
|
* gtk_notebook_set_tab_pos
|
|
|
|
* gtk_notebook_set_homogeneous_tabs
|
|
|
|
* gtk_notebook_set_tab_border
|
|
|
|
* gtk_notebook_set_tab_hborder
|
|
|
|
* gtk_notebook_set_tab_vborder
|
|
|
|
* gtk_notebook_set_scrollable
|
|
|
|
*/
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_show_border:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @show_border: %TRUE if a bevel should be drawn around the notebook.
|
|
|
|
*
|
|
|
|
* Sets whether a bevel will be drawn around the notebook pages.
|
2002-05-02 19:16:06 +00:00
|
|
|
* This only has a visual effect when the tabs are not shown.
|
2000-12-11 17:47:24 +00:00
|
|
|
* See gtk_notebook_set_show_tabs().
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_show_border (GtkNotebook *notebook,
|
1999-09-17 18:17:20 +00:00
|
|
|
gboolean show_border)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
|
|
|
if (notebook->show_border != show_border)
|
|
|
|
{
|
|
|
|
notebook->show_border = show_border;
|
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (notebook))
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
2001-05-17 16:22:06 +00:00
|
|
|
|
2005-03-26 05:49:15 +00:00
|
|
|
g_object_notify (G_OBJECT (notebook), "show-border");
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2001-06-24 15:34:48 +00:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_show_tabs:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @show_tabs: %TRUE if the tabs should be shown.
|
|
|
|
*
|
|
|
|
* Sets whether to show the tabs for the notebook or not.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_show_tabs (GtkNotebook *notebook,
|
|
|
|
gboolean show_tabs)
|
|
|
|
{
|
|
|
|
GtkNotebookPage *page;
|
|
|
|
GList *children;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
show_tabs = show_tabs != FALSE;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->show_tabs == show_tabs)
|
|
|
|
return;
|
|
|
|
|
|
|
|
notebook->show_tabs = show_tabs;
|
|
|
|
children = notebook->children;
|
|
|
|
|
|
|
|
if (!show_tabs)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GTK_WIDGET_UNSET_FLAGS (notebook, GTK_CAN_FOCUS);
|
|
|
|
|
|
|
|
while (children)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page = children->data;
|
|
|
|
children = children->next;
|
|
|
|
if (page->default_tab)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_widget_destroy (page->tab_label);
|
|
|
|
page->tab_label = NULL;
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
|
|
|
gtk_widget_hide (page->tab_label);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
}
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
else
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GTK_WIDGET_SET_FLAGS (notebook, GTK_CAN_FOCUS);
|
|
|
|
gtk_notebook_update_labels (notebook);
|
|
|
|
}
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
2001-05-17 16:22:06 +00:00
|
|
|
|
2005-03-26 05:49:15 +00:00
|
|
|
g_object_notify (G_OBJECT (notebook), "show-tabs");
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2001-06-24 15:34:48 +00:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_tab_pos:
|
Mass fixing of trivial doc bugs. (#63544, #57007, #64141, #63472, #57108,
* gtk/gtkiconfactory.c, gtk/gtktextbuffer.c, gtk/gtktreemodel.c,
gtk/gtkwindow.c, gtk/gtknotebook.c, gtk/gtkradiobutton.c,
gtk/gtktextiter.c, gtk/gtkdialog.c: Mass fixing of trivial doc bugs.
(#63544, #57007, #64141, #63472, #57108, #60818, #61562)
* gtk/tmpl/gtkaccellabel.sgml, gtk/tmpl/gtkcombo.sgml,
gtk/tmpl/gtkentry.sgml, gtk/tmpl/gtkhscrollbar.sgml,
gtk/tmpl/gtkvscrollbar.sgml, gtk/tmpl/gtktoolbar.sgml,
gtk/tmpl/gtkdialog.sgml, gtk/tmpl/gtkstatusbar.sgml:
Mass fixing of trivial doc bugs. (#55579, #56760, #58769, #55918,
#64154, #60422, #54697)
2001-11-10 22:06:44 +00:00
|
|
|
* @notebook: a #GtkNotebook.
|
|
|
|
* @pos: the edge to draw the tabs at.
|
2000-12-11 17:47:24 +00:00
|
|
|
*
|
|
|
|
* Sets the edge at which the tabs for switching pages in the
|
|
|
|
* notebook are drawn.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_tab_pos (GtkNotebook *notebook,
|
|
|
|
GtkPositionType pos)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
1998-07-19 19:09:27 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->tab_pos != pos)
|
|
|
|
{
|
|
|
|
notebook->tab_pos = pos;
|
|
|
|
if (GTK_WIDGET_VISIBLE (notebook))
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
2001-05-17 16:22:06 +00:00
|
|
|
|
2005-03-26 05:49:15 +00:00
|
|
|
g_object_notify (G_OBJECT (notebook), "tab-pos");
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2001-06-24 15:34:48 +00:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_homogeneous_tabs:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @homogeneous: %TRUE if all tabs should be the same size.
|
|
|
|
*
|
|
|
|
* Sets whether the tabs must have all the same size or not.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_homogeneous_tabs (GtkNotebook *notebook,
|
|
|
|
gboolean homogeneous)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
1998-06-10 21:48:21 +00:00
|
|
|
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
gtk_notebook_set_homogeneous_tabs_internal (notebook, homogeneous);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_tab_border:
|
|
|
|
* @notebook: a #GtkNotebook
|
2001-01-09 16:23:57 +00:00
|
|
|
* @border_width: width of the border around the tab labels.
|
2000-12-11 17:47:24 +00:00
|
|
|
*
|
2001-01-09 16:23:57 +00:00
|
|
|
* Sets the width the border around the tab labels
|
2000-12-11 17:47:24 +00:00
|
|
|
* in a notebook. This is equivalent to calling
|
2001-01-09 16:23:57 +00:00
|
|
|
* gtk_notebook_set_tab_hborder (@notebook, @border_width) followed
|
Mass fixing of trivial doc bugs. (#63544, #57007, #64141, #63472, #57108,
* gtk/gtkiconfactory.c, gtk/gtktextbuffer.c, gtk/gtktreemodel.c,
gtk/gtkwindow.c, gtk/gtknotebook.c, gtk/gtkradiobutton.c,
gtk/gtktextiter.c, gtk/gtkdialog.c: Mass fixing of trivial doc bugs.
(#63544, #57007, #64141, #63472, #57108, #60818, #61562)
* gtk/tmpl/gtkaccellabel.sgml, gtk/tmpl/gtkcombo.sgml,
gtk/tmpl/gtkentry.sgml, gtk/tmpl/gtkhscrollbar.sgml,
gtk/tmpl/gtkvscrollbar.sgml, gtk/tmpl/gtktoolbar.sgml,
gtk/tmpl/gtkdialog.sgml, gtk/tmpl/gtkstatusbar.sgml:
Mass fixing of trivial doc bugs. (#55579, #56760, #58769, #55918,
#64154, #60422, #54697)
2001-11-10 22:06:44 +00:00
|
|
|
* by gtk_notebook_set_tab_vborder (@notebook, @border_width).
|
2000-12-11 17:47:24 +00:00
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_tab_border (GtkNotebook *notebook,
|
2001-01-09 16:23:57 +00:00
|
|
|
guint border_width)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
1998-02-19 05:13:46 +00:00
|
|
|
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
gtk_notebook_set_tab_border_internal (notebook, border_width);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_tab_hborder:
|
|
|
|
* @notebook: a #GtkNotebook
|
2001-01-09 16:23:57 +00:00
|
|
|
* @tab_hborder: width of the horizontal border of tab labels.
|
2000-12-11 17:47:24 +00:00
|
|
|
*
|
2001-01-09 16:23:57 +00:00
|
|
|
* Sets the width of the horizontal border of tab labels.
|
2000-12-11 17:47:24 +00:00
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_tab_hborder (GtkNotebook *notebook,
|
|
|
|
guint tab_hborder)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
gtk_notebook_set_tab_hborder_internal (notebook, tab_hborder);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_tab_vborder:
|
|
|
|
* @notebook: a #GtkNotebook
|
2001-01-09 16:23:57 +00:00
|
|
|
* @tab_vborder: width of the vertical border of tab labels.
|
2000-12-11 17:47:24 +00:00
|
|
|
*
|
2001-01-09 16:23:57 +00:00
|
|
|
* Sets the width of the vertical border of tab labels.
|
2000-12-11 17:47:24 +00:00
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_tab_vborder (GtkNotebook *notebook,
|
|
|
|
guint tab_vborder)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
top of gtktypebuiltins.c.
* gtk/gtkclist.c
* gtk/gtkcombo.c
* gtk/gtkctree.c
* gtk/gtklist.c
* gtk/gtklistitem.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtksignal.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c
* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
and compat code.
* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
to set_color_internal, and use that. The deprecated function now
merely wraps it.
* gtk/gtkfontsel.c: same as above, except with
gtk_font_selection_get_font.
* gtk/gtknotebook.c: same as above, except with
gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
hborder,vborder}.
* gtk/gtkprogressbar.c: same as above, except with
gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
activity_blocks}.
* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.
* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.
* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
GtkMenuFactory stuff if GTK_COMPILATION, since they are used
internally by the compat code.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
now).
* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.
* gtk/gtkobject.c: replaced various deprecated functions. In set and
get_property, use g_object_{set,get}_data with "user_data" instead
of gtk_object_{set,get}_user_data.
* gtk/gtkprogress.h: API declared if GTK_COMPILATION
* gtk/gtkprogress.c: port get_type to GObject API.
* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
if GTK_COMPILATION.
* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
gtk_widget_queue_draw instead of the other way around.
* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED
* tests/testgtk.c
* tests/testselection.c
* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
deprecated stuff.
2002-11-20 01:07:33 +00:00
|
|
|
gtk_notebook_set_tab_vborder_internal (notebook, tab_vborder);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_scrollable:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @scrollable: %TRUE if scroll arrows should be added
|
|
|
|
*
|
|
|
|
* Sets whether the tab label area will have arrows for scrolling if
|
|
|
|
* there are too many tabs to fit in the area.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_scrollable (GtkNotebook *notebook,
|
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkgamma.h: Adapt cast macros to standard.
[ Merges from 1.2 ]
Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
If translation does not include a '/', use entire
translation instead of crashing.
Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
* docs/gtk_tut.sgml:
s/gtk_accel_group_attach/gtk_window_add_accel_group/.
Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c (gtk_target_list_remove): Use
g_list_remove_link, not g_list_remove.
[ From Geert Bevin <gbevin@thunderstorms.org> ]
Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (real_undo_selection): commented out g_print()
statement upon unselection (how the heck did that slip in?).
Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_freeze):
(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
in frozen state (and aparently crashes). patch provided by Anders
Melchiorsen <and@kampsax.dtu.dk>.
Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
* fix insensitive default/focus widget activation,
reported by Matt Goodall <mgg@isotek.co.uk>.
* gtk/gtkwindow.c (gtk_window_key_press_event):
(gtk_window_activate_default):
(gtk_window_activate_focus):
return handled=FALSE for actiavtion of insensitive default
widgets. return handled=TRUE for activation of insensitive
focus widgets. don't activate in either case.
Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk-config.in (lib_gtk): Switch order of @x_cflags@
and $glib_cflags to match library order and in the
theory that an old version of GLib is more likely to
be in the include directory for X then vice-versa.
(Bug #2776)
Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
to determine the locale for fontsets, not LC_MESSAGES;
the user may want English messages with a handling
for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
will still be broken) (Bug #2891)
Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
* gtk/gtkrc.ko: Changed the Korean default fontset.
Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
where when scrolling to the left or top double exposes
were done, causing major slowdowns.
Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
names to lowercase and alphanumeric, before looking
them up.
* gtk/Makefile.am: Install codeset variant gtkrc files
with normalized names.
Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
popup menus when the menu is already visible, but its parent
is still hidden, (happens after tornoff window got hidden).
Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (install-data-local): Fix
a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
deleted, causing error messages on install.
Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
the handle as well, since we now sometimes ignore
exposes on the handle while resizing.
Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
extra g_free introduced in one of the last one or two
commits.
Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
consistent, put each style that a gtkrc.* file creates
in a unique namespace, remove old files before installing.
Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
gtk_rc_init is called multiple times. (Yes, people who
do that have bugs in their code.)
Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
Remove it since it's generated by the Makefile anyway
Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputcommon.h (gdk_input_device_new): Free
device->info.axes for core pointer.
Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (destroy_idle_test): Rename idle to
idle_id, to deal with obsolete, broken C libraries.
Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
allocation->x/y twice!
* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
consistent with gtk_vscale_pos_trough().
Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
be queueing a resize on a toplevel container between
the time we show it and when we map it. So, we need
to test GTK_WIDGET_VISIBLE() for toplevels, and only
use GTK_WIDGET_DRAWABLE() for child windows.
Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
(fixes bug #2144)
Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
container DRAWABLE (instead of VISIBLE), so we don't queue
resizes on non-toplevel containers.
Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.[ch]: Make the data argument
const guchar *.
Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Try to behave sensibly if
the focus widget is the window itself. (Should
we allow this at all?)
Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_set_sensitive):
* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
* gtk/gtknotebook.c (gtk_notebook_set_show_border):
* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
in prototypes and implementations consistent (Tomas Ogren).
* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
before the widget is unparented (reported by damon).
* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
since we provide unsigned data anyways.
Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
the call to gtk_tooltips_layout_text() until later.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
Call gtk_widget_ensure_style() before using the style.
Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Added workaround
for old widgets that don't propagate draws to all
children. (Namely gnome-dock for gnome-libs <= 1.0.16)
Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
for a redraw but just the widget that requested the resize.
Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: added new widget level method
gtk_container_set_reallocate_redraws() and a GtkContainer flag
reallocate_redraws : 1 to reflect the setting, exported this through
the argument system as a boolean ::reallocate_redraws.
* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
on the widget because the allocation changes, do so as well for
widget->parent if the parent has reallocate_redraws set to TRUE.
with that containers requesting reallocation redraws get automatically
redrawn if their children changed allocation (this unfortunately
affects also other children that didn't change allocation, but we
cannot work around that before 1.3).
Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
_and_ height are >0 (not _or_).
* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
instead of gtk_container_queue_resize(), which is a core gtk internal
function (must have been on crack when i queued that).
* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
we can check more reliably if we want to discard expose events.
* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
flag.
* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
we simply trust these events. for deciding whether to discard exposes,
check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
queues of areas that are completely off screen.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
logic for handleboxes.
* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
check on width/height.
Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
we are fine with using $@ the way we do (if we actually encounter
brokeness with $@ in VPATH builds because of additional path prefixes,
we need to use $(@F) actually).
Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
short lived bugs, that would allow language bindings to do surgeries
to our guts.
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
where comparison was being done against an uninitialized
value causing intermittant results depending on
compiler flags. Also make it clearer that we aren't
ever initializing the child as 0x0 (though this will
be caught in gtk_widget_size_allocate())
Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
gtk_window_unset_transient_for() call after we do checks
involving the old transient parent.
[ From Lance Capser <lmc@cyberhighway.net> ]
1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
an empty file.
Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (gen_sources): Improve VPATH builds.
`$@' is valid only in the build dir, not after we've done
`cd $srcdir'. Also use `test -f' instead of less portable
`test -e'.
Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (correct_cache_insert): Rewrite
for simplicity, and hopefully correctness.
(Fixes bug #1322, which was a segfault when
on some insertions with the properties around
the insertion set up just wrong.)
* gtk/gtktext.c (gtk_text_adjustment): When we receive
a "changed" signal, clamp the new value to the adjustment
bounds to avoid segfaulting if someone tries to change
the adjustment to a bogus value. (Bug #1795)
Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c: Ignore unexpected destroy notifies
for children, for toplevel windows handle them
like delete_event.
* gtk/gtkplug.c: Add an unrealize handler so that
we unref plug->socket_window when we are done
with it.
Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (clear_area): Fix stupid signedness
problem that was causing background to sometimes
be misaligned.
Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
* gtk/gtkmenu.c (gtk_menu_position): Make
sure we never position menus with negative x, y,
since gtk_widget_set_uposition() can't handle that.
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
Modify the positioning code a bit so that we always
put the top-left corner onscreen. (This is for
UI reasons, gtk_menu_position() now takes care of
gtk_widet_set_uposition() brokeness.)
Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: fixed up things for -jx, x > 1.
Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
RC style that is passed in. The lack of the ref
before was a bug. If people worked around this
bug, this will introduce a slight memory leak
in their code. The code should typically look like:
rc_style = gtk_rc_style_new ();
[...]
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
the style if it was already set.
* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
style if it was set before.
Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (main): Add a check to see if we
are being run from the correct directory and
to quit nicely if we are not.
* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
static.
Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
* gtk/gtkwindow.c:
queue resizes unconditionally (gtk_widget_queue_resize will figure
what to do if the window is not realized).
(gtk_window_move_resize): only recenter the window
for GTK_WIN_POS_CENTER_ALWAYS.
(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
the same way as GTK_WIN_POS_CENTER.
Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
with (!(info->last_flags & GDK_HINT_POS)) instead of
(!info->last_flags & GDK_HINT_POS).
* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
new_height unconditionally, because we use these values even if
!default_size_changed && !hints_changed.
comented the (default_size_changed || hints_changed) case with
respect to resize rejects from the window manager.
* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
in the zvt condition hack, since this includes the window hints, set
the hints after the handling_resize case.
* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
window is initially shown with to the geometry.
Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize):
s/size_changed/default_size_changed/g so i know what's
really going on (frying brain on smaller flame now).
Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
we have size_changed upon handling_resize. this is a gross
workaround for the broken zvt widget and should be removed in
1.3 again (search for FIXME).
Owen provided an accurate comment for this:
/* We could be here for two reasons
* 1) We coincidentally got a resize while handling
* another resize.
* 2) Our computation of size_changed was completely
* screwed up, probably because one of our children
* is broken. It's probably a zvt widget.
*
* For 1), we could just go ahead and ask for the
* new size right now, but doing that for 2)
* might well be fighting the user (and can even
* trigger a loop). Since we really don't want to
* do that, we requeue a resize in hopes that
* by the time it gets handled, the child has seen
* the light and is willing to go along with the
* new size. (this happens for the zvt widget, since
* the size_allocate() above will have stored the
* requisition corresponding to the new size in the
* zvt widget)
*
* This doesn't buy us anything for 1), but it shouldn't
* hurt us too badly, since it is what would have
* happened if we had gotten the configure event before
* the new size had been set.
*/
Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c: deal properly with the fact that RC
style lists may include rc styles more than once.
* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
unused static function.
* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
stack of directories of RC files currently being
parsed and implicitely add them to pixmap path.
This fixes a bug where the directory would get
appended then overwritten by pixmap_path declarations.
(bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
theme's exit function. (Patch from Peter Wainwright,
bug #1454)
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
Add a destroy() handler to take care of removing
group for menu item. (Fixes bug #1197)
* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
in warning message.
Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
roundtrip to figure window's width and height, since we know that
anyways from widget->allocation.
Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Compute
the hints after we request the new size.
Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
GTK_WIDGET_REALIZED() assertion - we can compute the
hints before we are realized.
* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
hint changing so that we have a value of hints_changed
when we decide whether to constrain the window size.
* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
change back to G_MAXINT.
Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
contain uncluttered values.
(gtk_window_compute_hints): simply assert that window is realized
and that geometry_info is valid, since we rely on this anyways.
(gtk_window_constrain_size): major cleanups to the code.
if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
for the base size, instead of the minimums. use 32767 as max width
and height (like in gtkwindow.c) instead of G_MAXINT.
Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
* cleaned up the GtkContainer.need_resize flag handling mess, we
only need to force resize requests when we were prematurely
realized, or our widget tree was modified when we were temporarily
hidden. handling these cases directly upon showing the window (i.e.
while the GdkWindow is still unmapped) avoids the need to wait for
a configure event response and therefore makes the GUI more snappier
and avoids blank windows during the roundtrip.
* gtk/gtkwidget.c:
(gtk_widget_hide):
(gtk_widget_show): don't queue resizes on toplevels, they know how
to deal with matters.
* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
flag directly for not visible resize containers and spare us unecessary
signal emissions.
* gtk/gtkwindow.c:
(gtk_window_realize): if we need to enforce premature size allocation,
queue a container resize so we are correctly resized later on.
(gtk_window_init):
(gtk_window_size_request):
don't freak around with the ->need_resize flag,
gtk_container_queue_resize() will care about that.
(gtk_window_show):
handle initial resizing issues here, we can handle matters better in
this place, especially since we know that our GdkWindow is still
unmapped.
(gtk_window_move_resize):
don't care about ->need_resize at all.
handle size changes properly that occoured while we waited for a
configure event.
Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_uposition):
* gtk/gtkwindow.[hc] (gtk_window_reposition):
Move the hint setting code from gtk_widget_set_uposition
to here; set the hints so that we respect any previously
set geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
change the window hints here or move the window here,
let that happen in gtk_window_move_resize().
Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
to already queued resizes (and therefore redraws) on a widget, check
its anchestry as well.
* gtk/gtkcontainer.c:
(gtk_container_queue_resize): clear resize widgets for resize
containers before aborting prematurely. this is especially important
for toplevels which may need imemdiate processing or their resize
handler to be queued.
(gtk_container_dequeue_resize_handler): added new internal function for
gtkwindow.c.
* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
configure event, take possible changes in window position into account
as well.
if we request a new window size, queue up a resize handler that will
last until the configure event response arrives.
combined the ->need_resize case (initial show) with the general size
(hints) changed case and added even more comments.
if !auto_shrink, only revert to the old allocation if the new size
is smaller than the current allocation.
Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
gtk_window_set_geometry_hints
gtk_window_set_default_size):
When hints are set, queue a resize so that the hints will
be eventually reset on the toplevel.
* gtk/gtkwindow.c (gtk_window_show): Use
gtk_window_compute_default_size(). Clear the need_resize flag
on the initail map so that we don't unnecessarily trigger the
resize code.
* gtk/gtkwindow.c (gtk_window_move_resize): Split apart
into separate functions. Compare the hints we are setting
with what we set last time so that we can accurately
tell when we need to reset the hints.
* gtk/gtkwindow.c (gtk_window_compute_default_size): New
function to figure out the size from requisition
and default_size.
* gtk/gtkwindow.c (gtk_window_constrain_size): Function
from fvwm to constrain a size to the geometry hints.
* gtk/gtkwindow.c (gtk_window_compare_hints): New function
to compare two sets of geometry hints.
* gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
from gtk_window_set_hints(), just compute the hints,
don't set them.
* gtk/gtkwindow.c (gtk_window_compute_reposition): Move
code from gtk_window_move_resize() to separate function,
rationalize a bit.
Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
* gtkrc.h: Move the ref_count member out of the GtkRcStyle
structure into a new private structure.
* gtkrc.c: Split GtkRcStyle into public/private.
In the private part, add a list of pointers to the
RcStyle lists this RcStyle participates in.
* gtkrc.c: When a RcStyle is free, remove all
lists referencing it from the
realized_style_ht hash, and free those lists.
* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
gtk_rc_init(), since that adds the default styles
to the list of parsed RC files again.
* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
checks that ensure that a widget's allocation is at least 1 in width
and height. (GNOME note: this doesn't affect old panel code anymore,
because GtkSocket will request width and height of at least 1 since
Fri Jul 23).
* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
allocated yet (happens if the user realizes the window prematurely),
size request and allocate it.
(gtk_window_size_allocate): guard against guint underflows.
Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
in gtk_built_sources, so gtk.defs gets built prior to all other
sources.
Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am:
invoke indent on gtkmarshal.*.
rewrote source generation rules, use COPYING as oldest source tag for
a piggyback rule to generate all sources from (don't touch it ;).
major cleanups, strip spaces on build rules for GNU Make.
* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
source and target files from commandline arguments. don't invoke indent.
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
notebook after switch to avoid drawing problems.
(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
(gtk_notebook_pages_allocate): don't map not visible tab_labels,
show them instead.
(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
we use window->need_resize from configure_event now, to indicate that
the gtkwindow should keep its allocation (e.g. because the user resized
the window through window manager handles). resize_count is now reliably
used to figure whether we got the allocation we requested from the
window manager.
configure events get queued as resizes now, the real stuff (size
computation and allocation) now only goes on in gtk_window_move_resize().
GtkWindow's requisition now contains its *real* requisition (like all
other widgets), *not* taking usize into account.
geometry_info->last_{width|height} is now updated from set_hints() only
so it always contains the last hints we set for the window manager.
made some event handlers return TRUE instead of FALSE.
the overall code should be much more straight forward now, and the
significant code portions are accompanied by comments now.
(gtk_window_set_hints):
removed requisition argument and made it
fetch the requisition through gtk_widget_get_child_requisition.
we also don't move the gdkwindow here anymore, gtk_window_move_resize()
does that now.
(gtk_window_show):
ensure that the widget is realized before calling
gtk_container_check_resize() (and thus gtk_window_move_resize()), also
ensure that we got properly size requested and allocated before
realization.
(gtk_window_configure_event):
ignore plain window moves, or reallocate the widget tree through the
resize queue otherwise.
(gtk_window_move_resize):
mostly rewrote this function to figure window manager hints more
reliably, coalesce window moves and resizes to reduce configure events
and do actuall size allocations.
Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
that have a resize pending, because a redraw is already queued for them.
* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
hack to clear resize_widgets.
* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
for resize containers prior to size allocation. (this is also a bit
ugly, but avoids side effects for stopped emissions and is thus more
reliable).
(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
function from gtk_tooltips_expose, as we connect to ::expose_event
*and* ::draw now.
1999-08-18 Federico Mena Quintero <federico@redhat.com>
* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
checks.
(gtk_target_list_unref): Likewise.
* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
guard against division by zero. (Fixes bug #1339)
Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
Prevent the trivial leak of information of allowing
word motion when the entry is not visible.
Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
modality to error dialog as well as confirmation dialogs.
(Bug #1803, reported by Rosanna Wing Sze Yuen)
Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
tree->view_lines.
(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
* gtk/Makefile.am (install-data-local): Solaris apparently
has various troubles with ln -f; use rm first instead.
(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
use `cp' followed by `rm' (the `rm' was already there).
July 30, 1999 Elliot Lee <sopwith@redhat.com>
* configure.in: Fix autoconf warnings about cross compilation by
trying to provide sane defaults for AC_TRY_RUN.
* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
put them into $(srcdir) when generated. Also add a dependency of
gtksignal.h on gtkmarshal.h for -j builds.
* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
GDK_THREADS_{LEAVE,ENTER} pair.
(From Paul Fisher <pnfisher@redhat.com>)
Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
width and height are always >0 (owen).
Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
change that assured that a widget's allocated with and height are
always >1, since this breaks *buggy* panel code. unfortunately this
back-breaks the gimp's color selector.
* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
allocation is always >0 in width and height, before sending the
configure event; this is a *gross* hack to get the gimp back to work.
* marked both cases with TODO-1.3
Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Don't display wrap indicators when
text is not editable and word wrap is on.
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
option menus here as they are not derived from menu shell, assure that
the option menu has a menu we can add items to.
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
width/height to (gint) before calculations and check against < 0 to
avoid guint wraparounds.
Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
width and height is never zero. sanity check both dimensions against
32767 and issue a warning if the allocation is greater than that.
Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_events_pending): Unlock around call
to g_main_pending() as well.
Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main_iteration): Unlock around
call to g_main_iteration() - since that will regrab
GTK+ lock to process events.
Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c
- Regularize with the rest of GTK+ by making widget->requisition
not reflect the set_usize()
- Always recompute geometry hints, then check if they
changed before sending them to the X server. The
previous checks for changes would fail in a number
of circumstances.
Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c:
- Code cleanups
- Instantaneously update on modifier key presses
- Allow cancellation of the drag with Escape.
Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c (create_handle_box): Set the policy
to auto_shrink - otherwise the appearance is rather
strange when flipping between horizontal and vertical.
Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
(gtk_window_set_default_size): don't change a value if it's < 0.
queue a resize.
Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
add an extra "/" when concating "/" + filename.
(From Matt Grossman <mattg@oz.net>)
Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
for fg_gc if we set it for drawing pixmap.
Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
already set, call old engine's destroy function and
unref the old engine.
Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h: mark certain functions as internal.
Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
expand behaviour changed.
* gtk/gtklabel.c (gtk_label_set_pattern):
(gtk_label_set_justify):
(gtk_label_set_line_wrap):
don't bother invoking queue_clear, the reallocation does
that for us, always free_words so the upcoming resize will
relayout the label's contents.
Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
* applied argument implementation patches from Elena Devdariani
<elena@cogent.ca>.
* gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
::space_style, ::relief
* gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
* gtk/gtkpreview.c: ::expand
* gtk/gtkpaned.c: ::handle_size, ::gutter_size
* gtk/gtknotebook.c: ::homogeneous
* gtk/gtklabel.c: ::wrap
* gtk/gtklist.c: ::selection_mode
* gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
* gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
* gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
* gtk/gtkclist.c: ::sort_type
* gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
* gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c: Removed ill-thought-out part of last
comment.
Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_attach): Get the reference
counting right when we have to attach a new style
for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
* gtk/gtkstyle.c: Documented the refcounting
peculularities of gtk_style_attach.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
window types.
* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
of GTK_TOPLEVEL for creating the window.
1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
the last argument (reported by Per Winkvist).
Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
Fixes for invisible XOR lines (Frank Loemker
<floemker@TechFak.Uni-Bielefeld.DE>)
* gtk/gtkclist.c (gtk_clist_realize): Always use
a non-zero pixel for GDK_XOR.
* gtk/gtkvpaned.c gtk/gtkhpaned.c:
Use GDK_INVERT instead of GDK_XOR.
Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
signals if h/voffsets differ from adjustment values.
Reportet by Jerome Bolliet <bolliet@in2p3.fr>
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
|
|
|
gboolean scrollable)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
|
|
|
scrollable = (scrollable != FALSE);
|
|
|
|
|
|
|
|
if (scrollable != notebook->scrollable)
|
1998-07-19 19:09:27 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
notebook->scrollable = scrollable;
|
|
|
|
|
|
|
|
if (GTK_WIDGET_VISIBLE (notebook))
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
2001-05-17 16:22:06 +00:00
|
|
|
|
|
|
|
g_object_notify (G_OBJECT (notebook), "scrollable");
|
1998-07-19 19:09:27 +00:00
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
2001-06-24 15:34:48 +00:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* Public GtkNotebook Popup Menu Methods:
|
|
|
|
*
|
|
|
|
* gtk_notebook_popup_enable
|
|
|
|
* gtk_notebook_popup_disable
|
|
|
|
*/
|
2000-12-11 17:47:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gtk_notebook_popup_enable:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
*
|
|
|
|
* Enables the popup menu: if the user clicks with the right mouse button on
|
|
|
|
* the bookmarks, a menu with all the pages will be popped up.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_popup_enable (GtkNotebook *notebook)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GList *list;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->menu)
|
|
|
|
return;
|
|
|
|
|
|
|
|
notebook->menu = gtk_menu_new ();
|
|
|
|
for (list = gtk_notebook_search_page (notebook, NULL, STEP_NEXT, FALSE);
|
|
|
|
list;
|
|
|
|
list = gtk_notebook_search_page (notebook, list, STEP_NEXT, FALSE))
|
|
|
|
gtk_notebook_menu_item_create (notebook, list);
|
|
|
|
|
|
|
|
gtk_notebook_update_labels (notebook);
|
|
|
|
gtk_menu_attach_to_widget (GTK_MENU (notebook->menu),
|
|
|
|
GTK_WIDGET (notebook),
|
|
|
|
gtk_notebook_menu_detacher);
|
2001-05-17 16:22:06 +00:00
|
|
|
|
2005-03-26 05:49:15 +00:00
|
|
|
g_object_notify (G_OBJECT (notebook), "enable-popup");
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_popup_disable:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
*
|
|
|
|
* Disables the popup menu.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_popup_disable (GtkNotebook *notebook)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!notebook->menu)
|
|
|
|
return;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_container_foreach (GTK_CONTAINER (notebook->menu),
|
|
|
|
(GtkCallback) gtk_notebook_menu_label_unparent, NULL);
|
|
|
|
gtk_widget_destroy (notebook->menu);
|
2001-05-17 16:22:06 +00:00
|
|
|
|
2005-03-26 05:49:15 +00:00
|
|
|
g_object_notify (G_OBJECT (notebook), "enable-popup");
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
/* Public GtkNotebook Page Properties Functions:
|
|
|
|
*
|
1998-11-28 07:42:37 +00:00
|
|
|
* gtk_notebook_get_tab_label
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
* gtk_notebook_set_tab_label
|
|
|
|
* gtk_notebook_set_tab_label_text
|
1998-11-28 07:42:37 +00:00
|
|
|
* gtk_notebook_get_menu_label
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
* gtk_notebook_set_menu_label
|
|
|
|
* gtk_notebook_set_menu_label_text
|
|
|
|
* gtk_notebook_set_tab_label_packing
|
|
|
|
* gtk_notebook_query_tab_label_packing
|
|
|
|
*/
|
2000-12-11 17:47:24 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* gtk_notebook_get_tab_label:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the page
|
|
|
|
*
|
|
|
|
* Returns the tab label widget for the page @child. %NULL is returned
|
|
|
|
* if @child is not in @notebook or if no tab label has specifically
|
|
|
|
* been set for @child.
|
|
|
|
*
|
|
|
|
* Return value: the tab label
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkWidget *
|
1998-11-28 07:42:37 +00:00
|
|
|
gtk_notebook_get_tab_label (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), NULL);
|
2001-07-31 21:23:19 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
list = CHECK_FIND_CHILD (notebook, child);
|
|
|
|
if (!list)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
if (GTK_NOTEBOOK_PAGE (list)->default_tab)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
return GTK_NOTEBOOK_PAGE (list)->tab_label;
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_tab_label:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the page
|
|
|
|
* @tab_label: the tab label widget to use, or %NULL for default tab
|
|
|
|
* label.
|
|
|
|
*
|
|
|
|
* Changes the tab label for @child. If %NULL is specified
|
|
|
|
* for @tab_label, then the page will have the label 'page N'.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_tab_label (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
GtkWidget *tab_label)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
|
|
|
GtkNotebookPage *page;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GList *list;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
2001-07-31 21:23:19 +00:00
|
|
|
g_return_if_fail (GTK_IS_WIDGET (child));
|
2000-12-11 17:47:24 +00:00
|
|
|
|
|
|
|
list = CHECK_FIND_CHILD (notebook, child);
|
|
|
|
if (!list)
|
|
|
|
return;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
/* a NULL pointer indicates a default_tab setting, otherwise
|
|
|
|
* we need to set the associated label
|
|
|
|
*/
|
|
|
|
page = list->data;
|
2001-09-26 20:33:23 +00:00
|
|
|
|
|
|
|
if (page->tab_label == tab_label)
|
|
|
|
return;
|
|
|
|
|
2001-12-12 20:10:52 +00:00
|
|
|
|
2001-09-26 20:33:23 +00:00
|
|
|
gtk_notebook_remove_tab_label (notebook, page);
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (tab_label)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page->default_tab = FALSE;
|
|
|
|
page->tab_label = tab_label;
|
|
|
|
gtk_widget_set_parent (page->tab_label, GTK_WIDGET (notebook));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
page->default_tab = TRUE;
|
|
|
|
page->tab_label = NULL;
|
|
|
|
|
|
|
|
if (notebook->show_tabs)
|
1998-03-31 00:38:59 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gchar string[32];
|
1998-02-19 05:13:46 +00:00
|
|
|
|
1999-01-02 03:16:07 +00:00
|
|
|
g_snprintf (string, sizeof(string), _("Page %u"),
|
|
|
|
gtk_notebook_real_page_position (notebook, list));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page->tab_label = gtk_label_new (string);
|
|
|
|
gtk_widget_set_parent (page->tab_label, GTK_WIDGET (notebook));
|
|
|
|
}
|
|
|
|
}
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2001-12-12 20:10:52 +00:00
|
|
|
if (page->tab_label)
|
|
|
|
page->mnemonic_activate_signal =
|
2002-10-05 23:15:39 +00:00
|
|
|
g_signal_connect (page->tab_label,
|
|
|
|
"mnemonic_activate",
|
|
|
|
G_CALLBACK (gtk_notebook_mnemonic_activate_switch_page),
|
|
|
|
notebook);
|
2001-12-12 20:10:52 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->show_tabs && GTK_WIDGET_VISIBLE (child))
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_widget_show (page->tab_label);
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
2003-01-30 21:57:08 +00:00
|
|
|
|
|
|
|
gtk_notebook_update_tab_states (notebook);
|
2005-03-26 05:49:15 +00:00
|
|
|
gtk_widget_child_notify (child, "tab-label");
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
1998-07-19 19:09:27 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_tab_label_text:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the page
|
2001-01-09 16:23:57 +00:00
|
|
|
* @tab_text: the label text
|
2000-12-11 17:47:24 +00:00
|
|
|
*
|
|
|
|
* Creates a new label and sets it as the tab label for the page
|
|
|
|
* containing @child.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_tab_label_text (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
1998-11-23 13:53:25 +00:00
|
|
|
const gchar *tab_text)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
GtkWidget *tab_label = NULL;
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (tab_text)
|
|
|
|
tab_label = gtk_label_new (tab_text);
|
|
|
|
gtk_notebook_set_tab_label (notebook, child, tab_label);
|
2005-03-26 05:49:15 +00:00
|
|
|
gtk_widget_child_notify (child, "tab-label");
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
2001-06-24 15:34:48 +00:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_get_menu_label:
|
|
|
|
* @notebook: a #GtkNotebook
|
2001-06-24 15:34:48 +00:00
|
|
|
* @child: a widget contained in a page of @notebook
|
2000-12-11 17:47:24 +00:00
|
|
|
*
|
2001-06-24 15:34:48 +00:00
|
|
|
* Retrieves the menu label widget of the page containing @child.
|
2000-12-11 17:47:24 +00:00
|
|
|
*
|
2001-06-24 15:34:48 +00:00
|
|
|
* Return value: the menu label, or %NULL if the
|
|
|
|
* notebook page does not have a menu label other
|
|
|
|
* than the default (the tab label).
|
2000-12-11 17:47:24 +00:00
|
|
|
**/
|
1998-11-28 07:42:37 +00:00
|
|
|
GtkWidget*
|
|
|
|
gtk_notebook_get_menu_label (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), NULL);
|
2001-07-31 21:23:19 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
list = CHECK_FIND_CHILD (notebook, child);
|
|
|
|
if (!list)
|
|
|
|
return NULL;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (GTK_NOTEBOOK_PAGE (list)->default_menu)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
return GTK_NOTEBOOK_PAGE (list)->menu_label;
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_menu_label:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the child widget
|
|
|
|
* @menu_label: the menu label, or NULL for default
|
|
|
|
*
|
|
|
|
* Changes the menu label for the page containing @child.
|
|
|
|
**/
|
1998-02-19 05:13:46 +00:00
|
|
|
void
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gtk_notebook_set_menu_label (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
GtkWidget *menu_label)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
|
|
|
GtkNotebookPage *page;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GList *list;
|
1998-02-19 05:13:46 +00:00
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
2001-07-31 21:23:19 +00:00
|
|
|
g_return_if_fail (GTK_IS_WIDGET (child));
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
list = CHECK_FIND_CHILD (notebook, child);
|
|
|
|
if (!list)
|
|
|
|
return;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
page = list->data;
|
|
|
|
if (page->menu_label)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->menu)
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_container_remove (GTK_CONTAINER (notebook->menu),
|
|
|
|
page->menu_label->parent);
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (!page->default_menu)
|
2002-10-05 23:15:39 +00:00
|
|
|
g_object_unref (page->menu_label);
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (menu_label)
|
|
|
|
{
|
|
|
|
page->menu_label = menu_label;
|
2005-11-23 18:06:58 +00:00
|
|
|
g_object_ref_sink (page->menu_label);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page->default_menu = FALSE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
page->default_menu = TRUE;
|
|
|
|
|
|
|
|
if (notebook->menu)
|
|
|
|
gtk_notebook_menu_item_create (notebook, list);
|
2005-03-26 05:49:15 +00:00
|
|
|
gtk_widget_child_notify (child, "menu-label");
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_set_menu_label_text:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the child widget
|
|
|
|
* @menu_text: the label text
|
|
|
|
*
|
|
|
|
* Creates a new label and sets it as the menu label of @child.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_menu_label_text (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
1998-11-23 13:53:25 +00:00
|
|
|
const gchar *menu_text)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkWidget *menu_label = NULL;
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (menu_text)
|
|
|
|
menu_label = gtk_label_new (menu_text);
|
|
|
|
gtk_notebook_set_menu_label (notebook, child, menu_label);
|
2005-03-26 05:49:15 +00:00
|
|
|
gtk_widget_child_notify (child, "menu-label");
|
1998-02-19 05:13:46 +00:00
|
|
|
}
|
|
|
|
|
2001-06-24 15:34:48 +00:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/* Helper function called when pages are reordered
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gtk_notebook_child_reordered (GtkNotebook *notebook,
|
|
|
|
GtkNotebookPage *page)
|
|
|
|
{
|
|
|
|
if (notebook->menu)
|
|
|
|
{
|
|
|
|
GtkWidget *menu_item;
|
|
|
|
|
|
|
|
menu_item = page->menu_label->parent;
|
|
|
|
gtk_container_remove (GTK_CONTAINER (menu_item), page->menu_label);
|
|
|
|
gtk_container_remove (GTK_CONTAINER (notebook->menu), menu_item);
|
|
|
|
gtk_notebook_menu_item_create (notebook, g_list_find (notebook->children, page));
|
|
|
|
}
|
2003-01-30 21:57:08 +00:00
|
|
|
|
|
|
|
gtk_notebook_update_tab_states (notebook);
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_update_labels (notebook);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gtk_notebook_set_tab_label_packing:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the child widget
|
|
|
|
* @expand: whether to expand the bookmark or not
|
|
|
|
* @fill: whether the bookmark should fill the allocated area or not
|
|
|
|
* @pack_type: the position of the bookmark
|
|
|
|
*
|
|
|
|
* Sets the packing parameters for the tab label of the page
|
|
|
|
* containing @child. See gtk_box_pack_start() for the exact meaning
|
|
|
|
* of the parameters.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_set_tab_label_packing (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
gboolean expand,
|
|
|
|
gboolean fill,
|
|
|
|
GtkPackType pack_type)
|
1998-02-19 05:13:46 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GtkNotebookPage *page;
|
|
|
|
GList *list;
|
|
|
|
|
1998-02-19 05:13:46 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
2001-07-31 21:23:19 +00:00
|
|
|
g_return_if_fail (GTK_IS_WIDGET (child));
|
1998-02-19 05:13:46 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
list = CHECK_FIND_CHILD (notebook, child);
|
|
|
|
if (!list)
|
|
|
|
return;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
page = list->data;
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
expand = expand != FALSE;
|
|
|
|
fill = fill != FALSE;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page->pack == pack_type && page->expand == expand && page->fill == fill)
|
1998-02-19 05:13:46 +00:00
|
|
|
return;
|
|
|
|
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_widget_freeze_child_notify (child);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page->expand = expand;
|
2005-03-26 05:49:15 +00:00
|
|
|
gtk_widget_child_notify (child, "tab-expand");
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
page->fill = fill;
|
2005-03-26 05:49:15 +00:00
|
|
|
gtk_widget_child_notify (child, "tab-fill");
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (page->pack != pack_type)
|
|
|
|
{
|
|
|
|
page->pack = pack_type;
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_child_reordered (notebook, page);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
2005-03-26 05:49:15 +00:00
|
|
|
gtk_widget_child_notify (child, "tab-pack");
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_widget_child_notify (child, "position");
|
|
|
|
if (notebook->show_tabs)
|
|
|
|
gtk_notebook_pages_allocate (notebook);
|
|
|
|
gtk_widget_thaw_child_notify (child);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
}
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_query_tab_label_packing:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the page
|
|
|
|
* @expand: location to store the expand value (or NULL)
|
|
|
|
* @fill: location to store the fill value (or NULL)
|
|
|
|
* @pack_type: location to store the pack_type (or NULL)
|
|
|
|
*
|
|
|
|
* Query the packing attributes for the tab label of the page
|
|
|
|
* containing @child.
|
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_query_tab_label_packing (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
gboolean *expand,
|
|
|
|
gboolean *fill,
|
|
|
|
GtkPackType *pack_type)
|
1998-07-19 19:09:27 +00:00
|
|
|
{
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
GList *list;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
2001-07-31 21:23:19 +00:00
|
|
|
g_return_if_fail (GTK_IS_WIDGET (child));
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
list = CHECK_FIND_CHILD (notebook, child);
|
|
|
|
if (!list)
|
|
|
|
return;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
|
|
|
if (expand)
|
|
|
|
*expand = GTK_NOTEBOOK_PAGE (list)->expand;
|
|
|
|
if (fill)
|
|
|
|
*fill = GTK_NOTEBOOK_PAGE (list)->fill;
|
|
|
|
if (pack_type)
|
|
|
|
*pack_type = GTK_NOTEBOOK_PAGE (list)->pack;
|
1998-07-19 19:09:27 +00:00
|
|
|
}
|
1998-11-06 22:05:02 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/**
|
|
|
|
* gtk_notebook_reorder_child:
|
|
|
|
* @notebook: a #GtkNotebook
|
|
|
|
* @child: the child to move
|
2002-03-01 15:41:59 +00:00
|
|
|
* @position: the new position, or -1 to move to the end
|
2000-12-11 17:47:24 +00:00
|
|
|
*
|
|
|
|
* Reorders the page containing @child, so that it appears in position
|
2002-03-01 15:41:59 +00:00
|
|
|
* @position. If @position is greater than or equal to the number of
|
|
|
|
* children in the list or negative, @child will be moved to the end
|
|
|
|
* of the list.
|
2000-12-11 17:47:24 +00:00
|
|
|
**/
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
void
|
|
|
|
gtk_notebook_reorder_child (GtkNotebook *notebook,
|
|
|
|
GtkWidget *child,
|
|
|
|
gint position)
|
1998-11-06 22:05:02 +00:00
|
|
|
{
|
2000-12-11 17:47:24 +00:00
|
|
|
GList *list, *new_list;
|
|
|
|
GtkNotebookPage *page;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
gint old_pos;
|
2002-03-01 15:41:59 +00:00
|
|
|
gint max_pos;
|
1998-11-06 22:05:02 +00:00
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
|
|
|
g_return_if_fail (GTK_IS_WIDGET (child));
|
1998-11-06 22:05:02 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
list = CHECK_FIND_CHILD (notebook, child);
|
|
|
|
if (!list)
|
|
|
|
return;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2002-03-01 15:41:59 +00:00
|
|
|
max_pos = g_list_length (notebook->children) - 1;
|
|
|
|
if (position < 0 || position > max_pos)
|
|
|
|
position = max_pos;
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
old_pos = g_list_position (notebook->children, list);
|
|
|
|
|
|
|
|
if (old_pos == position)
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
return;
|
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
page = list->data;
|
|
|
|
notebook->children = g_list_delete_link (notebook->children, list);
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
notebook->children = g_list_insert (notebook->children, page, position);
|
|
|
|
new_list = g_list_nth (notebook->children, position);
|
1998-11-30 17:19:59 +00:00
|
|
|
|
2000-12-11 17:47:24 +00:00
|
|
|
/* Fix up GList references in GtkNotebook structure */
|
|
|
|
if (notebook->first_tab == list)
|
|
|
|
notebook->first_tab = new_list;
|
|
|
|
if (notebook->focus_tab == list)
|
|
|
|
notebook->focus_tab = new_list;
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_widget_freeze_child_notify (child);
|
|
|
|
|
2003-09-03 19:57:05 +00:00
|
|
|
/* Move around the menu items if necessary */
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_child_reordered (notebook, page);
|
2005-03-26 05:49:15 +00:00
|
|
|
gtk_widget_child_notify (child, "tab-pack");
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
gtk_widget_child_notify (child, "position");
|
|
|
|
|
new flags : homogeneous; new guints : tab_hborder, tab_vborder; marked
Tue Nov 17 00:06:29 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebook): new flags : homogeneous;
new guints : tab_hborder, tab_vborder; marked tab_border deprecated
(struct _GtkNotebookPage): new flags : expand, fill, pack
* gtk/gtknotebook.h/c
(gtk_notebook_set_homogeneous_tabs): new function. set homogeneneous
tabs
(gtk_notebook_set_tab_border): set tab_h/vborder to tab_border
(gtk_notebook_set_tab_hborder): new function. set tab_hborder
(gtk_notebook_set_tab_vborder): new function. set tab_vborder
(gtk_notebook_query_tab_label): new function. get tab_label widget.
(gtk_notebook_set_tab_label): new function. set tab_label widget.
(gtk_notebook_set_tab_label_text): new function. set tab_label text.
(gtk_notebook_query_menu_label): new function. get tab_label widget.
(gtk_notebook_set_menu_label): new function. set tab_label widget.
(gtk_notebook_set_menu_label_text): new function. set tab_label text.
(gtk_notebook_set_tab_label_packing): new function. set tab_label
fill, expand, fill_type
(gtk_notebook_query_tab_label_packing): new function. get tab_label
fill, expand, fill_type
(gtk_notebook_real_page_position): return logic page number
(gtk_notebook_search_page) search next/prev logic page
(gtk_notebook_update_labels): set logic page number.
(gtk_notebook_page_compare): renamed gtk_notebook_find_page
(gtk_notebook_set/get_child_arg): new args CHILD_ARG_TAB_EXPAND,
CHILD_ARG_TAB_FILL, CHILD_ARG_TAB_PACK
(gtk_notebook_button_press) (gtk_notebook_key_press)
(gtk_notebook_focus) (gtk_notebook_pages_allocate)
(gtk_notebook_calc_tabs) (gtk_notebook_switch_focus_tab)
use gtk_notebook_search_page
(gtk_notebook_page_allocate): fixed allocation bug
(gtk_notebook_set/get_arg): new args TAB_HBORDER, TAB_VBORDER.
(gtk_notebook_init): unset GTK_NO_WINDOW flag
(gtk_notebook_size_request): check whether page->child is visible.
changes due to tab h/vborder, homogeneous tabs
(gtk_notebook_paint): don't draw invisible tabs
(gtk_notebook_switch_page): calculate page_num if it's less than 0
(gtk_notebook_append_*) (gtk_notebook_prepend_*)
(gtk_notebook_insert_page): removed sanity checks
* gtk/testgtk.c (create_notebook): extended Notebook sample a bit.
1998-11-16 23:40:50 +00:00
|
|
|
if (notebook->show_tabs)
|
2000-12-11 17:47:24 +00:00
|
|
|
gtk_notebook_pages_allocate (notebook);
|
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
2001-06-19 12:54:10 +00:00
|
|
|
|
|
|
|
gtk_widget_thaw_child_notify (child);
|
1998-11-06 22:05:02 +00:00
|
|
|
}
|
2005-03-20 07:01:23 +00:00
|
|
|
|
|
|
|
#define __GTK_NOTEBOOK_C__
|
|
|
|
#include "gtkaliasdef.c"
|