Commit 3d4cc2f9 authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

applied gtk-hamann_jeske-980218-0.patch.gz, a patch from Lars Hamann and

Thu Feb 19 05:40:51 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtknotebook.h:
        * gtk/gtknotebook.c:
        applied gtk-hamann_jeske-980218-0.patch.gz, a patch from
        Lars Hamann and Stefan Jeske which introduces major
        usability improvements.
        fixed bugs are:
        - container border_width>0 does now work correctly for show_tabs==TRUE
          and for tab_pos=GTK_POS_BOTTOM/GTK_POS_RIGHT.
        - toggleing visibility of the tab labels works now.
        - emission of GtkNotebook:switch_page and all page changes
        also the signature for the GtkNotebook:switch_page signal changed,
        callbacks should now look like:
        gint notebook_switch_page (GtkWidget *widget,   GtkNotebookPage *page,
                                   gint       page_num, gpointer         data);
parent 8923d60d
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
* gtk/gtknotebook.c:
applied gtk-hamann_jeske-980218-0.patch.gz, a patch from
Lars Hamann and Stefan Jeske which introduces major
usability improvements.
fixed bugs are:
- container border_width>0 does now work correctly for show_tabs==TRUE
and for tab_pos=GTK_POS_BOTTOM/GTK_POS_RIGHT.
- toggleing visibility of the tab labels works now.
- emission of GtkNotebook:switch_page and all page changes
also the signature for the GtkNotebook:switch_page signal changed,
callbacks should now look like:
gint notebook_switch_page (GtkWidget *widget, GtkNotebookPage *page,
gint page_num, gpointer data);
Wed Feb 18 01:09:56 PST 1998 Jay Painter <jpaint@serv.net>
* gdk/gdk.c: fixed ambigous else compiler warning
* gtk/gtkgamma.c: fixed ambigous else compiler warning
......
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
* gtk/gtknotebook.c:
applied gtk-hamann_jeske-980218-0.patch.gz, a patch from
Lars Hamann and Stefan Jeske which introduces major
usability improvements.
fixed bugs are:
- container border_width>0 does now work correctly for show_tabs==TRUE
and for tab_pos=GTK_POS_BOTTOM/GTK_POS_RIGHT.
- toggleing visibility of the tab labels works now.
- emission of GtkNotebook:switch_page and all page changes
also the signature for the GtkNotebook:switch_page signal changed,
callbacks should now look like:
gint notebook_switch_page (GtkWidget *widget, GtkNotebookPage *page,
gint page_num, gpointer data);
Wed Feb 18 01:09:56 PST 1998 Jay Painter <jpaint@serv.net>
* gdk/gdk.c: fixed ambigous else compiler warning
* gtk/gtkgamma.c: fixed ambigous else compiler warning
......
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
* gtk/gtknotebook.c:
applied gtk-hamann_jeske-980218-0.patch.gz, a patch from
Lars Hamann and Stefan Jeske which introduces major
usability improvements.
fixed bugs are:
- container border_width>0 does now work correctly for show_tabs==TRUE
and for tab_pos=GTK_POS_BOTTOM/GTK_POS_RIGHT.
- toggleing visibility of the tab labels works now.
- emission of GtkNotebook:switch_page and all page changes
also the signature for the GtkNotebook:switch_page signal changed,
callbacks should now look like:
gint notebook_switch_page (GtkWidget *widget, GtkNotebookPage *page,
gint page_num, gpointer data);
Wed Feb 18 01:09:56 PST 1998 Jay Painter <jpaint@serv.net>
* gdk/gdk.c: fixed ambigous else compiler warning
* gtk/gtkgamma.c: fixed ambigous else compiler warning
......
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
* gtk/gtknotebook.c:
applied gtk-hamann_jeske-980218-0.patch.gz, a patch from
Lars Hamann and Stefan Jeske which introduces major
usability improvements.
fixed bugs are:
- container border_width>0 does now work correctly for show_tabs==TRUE
and for tab_pos=GTK_POS_BOTTOM/GTK_POS_RIGHT.
- toggleing visibility of the tab labels works now.
- emission of GtkNotebook:switch_page and all page changes
also the signature for the GtkNotebook:switch_page signal changed,
callbacks should now look like:
gint notebook_switch_page (GtkWidget *widget, GtkNotebookPage *page,
gint page_num, gpointer data);
Wed Feb 18 01:09:56 PST 1998 Jay Painter <jpaint@serv.net>
* gdk/gdk.c: fixed ambigous else compiler warning
* gtk/gtkgamma.c: fixed ambigous else compiler warning
......
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
* gtk/gtknotebook.c:
applied gtk-hamann_jeske-980218-0.patch.gz, a patch from
Lars Hamann and Stefan Jeske which introduces major
usability improvements.
fixed bugs are:
- container border_width>0 does now work correctly for show_tabs==TRUE
and for tab_pos=GTK_POS_BOTTOM/GTK_POS_RIGHT.
- toggleing visibility of the tab labels works now.
- emission of GtkNotebook:switch_page and all page changes
also the signature for the GtkNotebook:switch_page signal changed,
callbacks should now look like:
gint notebook_switch_page (GtkWidget *widget, GtkNotebookPage *page,
gint page_num, gpointer data);
Wed Feb 18 01:09:56 PST 1998 Jay Painter <jpaint@serv.net>
* gdk/gdk.c: fixed ambigous else compiler warning
* gtk/gtkgamma.c: fixed ambigous else compiler warning
......
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
* gtk/gtknotebook.c:
applied gtk-hamann_jeske-980218-0.patch.gz, a patch from
Lars Hamann and Stefan Jeske which introduces major
usability improvements.
fixed bugs are:
- container border_width>0 does now work correctly for show_tabs==TRUE
and for tab_pos=GTK_POS_BOTTOM/GTK_POS_RIGHT.
- toggleing visibility of the tab labels works now.
- emission of GtkNotebook:switch_page and all page changes
also the signature for the GtkNotebook:switch_page signal changed,
callbacks should now look like:
gint notebook_switch_page (GtkWidget *widget, GtkNotebookPage *page,
gint page_num, gpointer data);
Wed Feb 18 01:09:56 PST 1998 Jay Painter <jpaint@serv.net>
* gdk/gdk.c: fixed ambigous else compiler warning
* gtk/gtkgamma.c: fixed ambigous else compiler warning
......
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
* gtk/gtknotebook.c:
applied gtk-hamann_jeske-980218-0.patch.gz, a patch from
Lars Hamann and Stefan Jeske which introduces major
usability improvements.
fixed bugs are:
- container border_width>0 does now work correctly for show_tabs==TRUE
and for tab_pos=GTK_POS_BOTTOM/GTK_POS_RIGHT.
- toggleing visibility of the tab labels works now.
- emission of GtkNotebook:switch_page and all page changes
also the signature for the GtkNotebook:switch_page signal changed,
callbacks should now look like:
gint notebook_switch_page (GtkWidget *widget, GtkNotebookPage *page,
gint page_num, gpointer data);
Wed Feb 18 01:09:56 PST 1998 Jay Painter <jpaint@serv.net>
* gdk/gdk.c: fixed ambigous else compiler warning
* gtk/gtkgamma.c: fixed ambigous else compiler warning
......
This diff is collapsed.
......@@ -43,10 +43,24 @@ struct _GtkNotebook
GtkNotebookPage *cur_page;
GList *children;
GList *first_tab;
GList *focus_tab;
GtkWidget *menu;
GdkWindow *panel;
guint32 timer;
gint16 tab_border;
guint show_tabs : 1;
guint show_border : 1;
guint tab_pos : 2;
guint scrollable : 1;
guint in_child : 2;
guint click_child : 2;
guint button : 2;
guint need_timer : 1;
};
struct _GtkNotebookClass
......@@ -61,6 +75,9 @@ struct _GtkNotebookPage
{
GtkWidget *child;
GtkWidget *tab_label;
GtkWidget *menu_label;
gint8 default_menu : 1;
gint8 default_tab : 1;
GtkRequisition requisition;
GtkAllocation allocation;
};
......@@ -68,30 +85,48 @@ struct _GtkNotebookPage
guint gtk_notebook_get_type (void);
GtkWidget* gtk_notebook_new (void);
void gtk_notebook_append_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label);
void gtk_notebook_prepend_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label);
void gtk_notebook_insert_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
gint position);
void gtk_notebook_remove_page (GtkNotebook *notebook,
gint page_num);
gint gtk_notebook_current_page (GtkNotebook *notebook);
void gtk_notebook_set_page (GtkNotebook *notebook,
gint page_num);
void gtk_notebook_next_page (GtkNotebook *notebook);
void gtk_notebook_prev_page (GtkNotebook *notebook);
void gtk_notebook_set_tab_pos (GtkNotebook *notebook,
GtkPositionType pos);
void gtk_notebook_set_show_tabs (GtkNotebook *notebook,
gint show_tabs);
void gtk_notebook_set_show_border (GtkNotebook *notebook,
gint show_border);
void gtk_notebook_append_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label);
void gtk_notebook_append_page_menu (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
GtkWidget *menu_label);
void gtk_notebook_prepend_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label);
void gtk_notebook_prepend_page_menu (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
GtkWidget *menu_label);
void gtk_notebook_insert_page (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
gint position);
void gtk_notebook_insert_page_menu (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
GtkWidget *menu_label,
gint position);
void gtk_notebook_remove_page (GtkNotebook *notebook,
gint page_num);
gint gtk_notebook_current_page (GtkNotebook *notebook);
void gtk_notebook_set_page (GtkNotebook *notebook,
gint page_num);
void gtk_notebook_next_page (GtkNotebook *notebook);
void gtk_notebook_prev_page (GtkNotebook *notebook);
void gtk_notebook_set_tab_pos (GtkNotebook *notebook,
GtkPositionType pos);
void gtk_notebook_set_show_tabs (GtkNotebook *notebook,
gint show_tabs);
void gtk_notebook_set_show_border (GtkNotebook *notebook,
gint show_border);
void gtk_notebook_set_scrollable (GtkNotebook *notebook,
gint scrollable);
void gtk_notebook_set_tab_border (GtkNotebook *notebook,
gint border_width);
void gtk_notebook_popup_enable (GtkNotebook *notebook);
void gtk_notebook_popup_disable (GtkNotebook *notebook);
#ifdef __cplusplus
}
......
......@@ -28,7 +28,7 @@ destroy_window (GtkWidget *widget,
*window = NULL;
}
void
static void
destroy_tooltips (GtkWidget *widget, GtkWindow **window)
{
GtkTooltips *tt = gtk_object_get_data (GTK_OBJECT (*window), "tooltips");
......@@ -37,7 +37,7 @@ destroy_tooltips (GtkWidget *widget, GtkWindow **window)
*window = NULL;
}
void
static void
button_window (GtkWidget *widget,
GtkWidget *button)
{
......@@ -47,7 +47,7 @@ button_window (GtkWidget *widget,
gtk_widget_hide (button);
}
void
static void
create_buttons ()
{
static GtkWidget *window = NULL;
......@@ -187,7 +187,7 @@ create_buttons ()
gtk_widget_destroy (window);
}
void
static void
create_toggle_buttons ()
{
static GtkWidget *window = NULL;
......@@ -262,7 +262,7 @@ create_toggle_buttons ()
gtk_widget_destroy (window);
}
void
static void
create_check_buttons ()
{
static GtkWidget *window = NULL;
......@@ -337,7 +337,7 @@ create_check_buttons ()
gtk_widget_destroy (window);
}
void
static void
create_radio_buttons ()
{
static GtkWidget *window = NULL;
......@@ -417,12 +417,12 @@ create_radio_buttons ()
gtk_widget_destroy (window);
}
void
static void
bbox_widget_destroy (GtkWidget* widget, GtkWidget* todestroy)
{
}
void
static void
create_bbox_window (gint horizontal,
char* title,
gint pos,
......@@ -492,7 +492,7 @@ create_bbox_window (gint horizontal,
gtk_widget_show (window);
}
void
static void
test_hbbox ()
{
create_bbox_window (TRUE, "Spread", 50, 40, 85, 28, GTK_BUTTONBOX_SPREAD);
......@@ -501,7 +501,7 @@ test_hbbox ()
create_bbox_window (TRUE, "End", 500, 15, 30, 25, GTK_BUTTONBOX_END);
}
void
static void
test_vbbox ()
{
create_bbox_window (FALSE, "Spread", 50, 40, 85, 25, GTK_BUTTONBOX_SPREAD);
......@@ -510,7 +510,7 @@ test_vbbox ()
create_bbox_window (FALSE, "End", 650, 15, 30, 25, GTK_BUTTONBOX_END);
}
void
static void
create_button_box ()
{
static GtkWidget* window = NULL;
......@@ -556,7 +556,7 @@ create_button_box ()
gtk_widget_destroy (window);
}
GtkWidget *
static GtkWidget*
new_pixmap (char *filename,
GdkWindow *window,
GdkColor *background)
......@@ -573,70 +573,70 @@ new_pixmap (char *filename,
return wpixmap;
}
void
static void
set_toolbar_horizontal (GtkWidget *widget,
gpointer data)
{
gtk_toolbar_set_orientation (GTK_TOOLBAR (data), GTK_ORIENTATION_HORIZONTAL);
}
void
static void
set_toolbar_vertical (GtkWidget *widget,
gpointer data)
{
gtk_toolbar_set_orientation (GTK_TOOLBAR (data), GTK_ORIENTATION_VERTICAL);
}
void
static void
set_toolbar_icons (GtkWidget *widget,
gpointer data)
{
gtk_toolbar_set_style (GTK_TOOLBAR (data), GTK_TOOLBAR_ICONS);
}
void
static void
set_toolbar_text (GtkWidget *widget,
gpointer data)
{
gtk_toolbar_set_style (GTK_TOOLBAR (data), GTK_TOOLBAR_TEXT);
}
void
static void
set_toolbar_both (GtkWidget *widget,
gpointer data)
{
gtk_toolbar_set_style (GTK_TOOLBAR (data), GTK_TOOLBAR_BOTH);
}
void
static void
set_toolbar_small_space (GtkWidget *widget,
gpointer data)
{
gtk_toolbar_set_space_size (GTK_TOOLBAR (data), 5);
}
void
static void
set_toolbar_big_space (GtkWidget *widget,
gpointer data)
{
gtk_toolbar_set_space_size (GTK_TOOLBAR (data), 10);
}
void
static void
set_toolbar_enable (GtkWidget *widget,
gpointer data)
{
gtk_toolbar_set_tooltips (GTK_TOOLBAR (data), TRUE);
}
void
static void
set_toolbar_disable (GtkWidget *widget,
gpointer data)
{
gtk_toolbar_set_tooltips (GTK_TOOLBAR (data), FALSE);
}
void
static void
create_toolbar (void)
{
static GtkWidget *window = NULL;
......@@ -723,7 +723,7 @@ create_toolbar (void)
gtk_widget_destroy (window);
}
GtkWidget *
static GtkWidget*
make_toolbar (GtkWidget *window)
{
GtkWidget *toolbar;
......@@ -782,7 +782,7 @@ make_toolbar (GtkWidget *window)
return toolbar;
}
void
static void
create_handle_box ()
{
static GtkWidget* window = NULL;
......@@ -818,7 +818,7 @@ create_handle_box ()
}
void
static void
reparent_label (GtkWidget *widget,
GtkWidget *new_parent)
{
......@@ -829,7 +829,19 @@ reparent_label (GtkWidget *widget,
gtk_widget_reparent (label, new_parent);
}
void
static void
set_parent_signal (GtkWidget *child,
GtkWidget *old_parent,
gpointer func_data)
{
g_print ("set_parent for \"%s\": new parent: \"%s\", old parent: \"%s\", data: %d\n",
gtk_type_name (GTK_OBJECT_TYPE (child)),
child->parent ? gtk_type_name (GTK_OBJECT_TYPE (child->parent)) : "NULL",
old_parent ? gtk_type_name (GTK_OBJECT_TYPE (old_parent)) : "NULL",
(gint) func_data);
}
static void
create_reparent ()
{
static GtkWidget *window = NULL;
......@@ -887,6 +899,10 @@ create_reparent ()
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (box3), label, FALSE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (label),
"set_parent",
GTK_SIGNAL_FUNC (set_parent_signal),
(GtkObject*) 42);
gtk_widget_show (label);
......@@ -935,7 +951,7 @@ create_reparent ()
gtk_widget_destroy (window);
}
void
static void
create_pixmap ()
{
static GtkWidget *window = NULL;
......@@ -1022,7 +1038,7 @@ create_pixmap ()
gtk_widget_destroy (window);
}
void
static void
create_tooltips ()
{
static GtkWidget *window = NULL;
......@@ -1107,7 +1123,7 @@ create_tooltips ()
gtk_widget_destroy (window);
}
GtkWidget*
static GtkWidget*
create_menu (int depth)
{
GtkWidget *menu;
......@@ -1138,7 +1154,7 @@ create_menu (int depth)
return menu;
}
void
static void
create_menus ()
{
static GtkWidget *window = NULL;
......@@ -1237,7 +1253,7 @@ create_menus ()
/*
* GtkScrolledWindow
*/
void
static void
create_scrolled_windows ()
{
static GtkWidget *window;
......@@ -1309,14 +1325,15 @@ create_scrolled_windows ()
* GtkEntry
*/
void entry_toggle_editable (GtkWidget *checkbutton,
GtkWidget *entry)
static void
entry_toggle_editable (GtkWidget *checkbutton,
GtkWidget *entry)
{
gtk_entry_set_editable(GTK_ENTRY(entry),
GTK_TOGGLE_BUTTON(checkbutton)->active);
}
void
static void
create_entry ()
{
static GtkWidget *window = NULL;
......@@ -1408,7 +1425,7 @@ create_entry ()
/*
* GtkList
*/
void
static void
list_add (GtkWidget *widget,
GtkWidget *list)
{
......@@ -1422,7 +1439,7 @@ list_add (GtkWidget *widget,
gtk_container_add (GTK_CONTAINER (list), list_item);
}
void
static void
list_remove (GtkWidget *widget,
GtkWidget *list)
{
......@@ -1445,7 +1462,7 @@ list_remove (GtkWidget *widget,
g_list_free (clear_list);
}
void
static void
create_list ()
{
static GtkWidget *window = NULL;
......@@ -1570,7 +1587,7 @@ create_list ()
static gint clist_rows = 0;
static gint clist_selected_row = 0;
void
static void
add1000_clist (GtkWidget *widget, gpointer data)
{
gint i, row;
......@@ -1607,7 +1624,7 @@ add1000_clist (GtkWidget *widget, gpointer data)
gdk_bitmap_unref (mask);
}
void
static void
add10000_clist (GtkWidget *widget, gpointer data)
{
gint i;
......@@ -1850,7 +1867,7 @@ create_clist ()
* the rest of the clist configuration
*/
gtk_clist_set_row_height (GTK_CLIST (clist), 20);
gtk_signal_connect (GTK_OBJECT (clist),
"select_row",
(GtkSignalFunc) select_clist,
......@@ -2411,14 +2428,234 @@ create_text ()
/*
* GtkNotebook
*/
void
GdkPixmap *book_open;
GdkPixmap *book_closed;
GdkBitmap *book_open_mask;
GdkBitmap *book_closed_mask;
static char * book_open_xpm[] = {
"16 16 11 1",
" c None",
". c #28A22CB228A2",
"X c #FFFFFFFFFFFF",
"o c #F7DEF7DEF7DE",
"O c #000000000000",
"+ c #FFFF6DB60000",
"@ c #CF3CCF3CCF3C",
"# c #FFFFDB6C0000",
"$ c #30C234D330C2",
"% c #C71BC30BC71B",
"& c #D75C6DB60000",
" ",
" .. ",
" .X. ",
" .oO ... ",
" .+Xo. ..oX.. ",
" .+oXo..XXoX.@..",
" .+ooX.@ooXo.@#.",
" .+XXo.@XooX.@+.",
" .+XoX.@XoXo.@#.",
" .+oXo.@oXXX.@+.",
" .++Xo$@oOO..%#.",
" ..+&X.@.O@@@@+.",
" .++........#.",
" .+..+++++++&$",
" .+++.......$.",
" ... "};
static char * book_closed_xpm[] = {
"16 16 12 1",
" c None",
". c #000000000000",
"X c #FFFF6DB60000",
"o c #082008200820",
"O c #AEBA00005144",
"+ c #FFFFDB6C0000",
"@ c #AEBA00000000",
"# c #D75CDB6C0000",
"$ c #28A22CB228A2",
"% c #FFFFFFFFFFFF",
"& c #F7DEF7DEF7DE",
"* c #30C234D330C2",
" ",
" .. ",
" ..XX. ",
" ..XXXXX. ",
" o.XXXXXXXX. ",
".O+XXXXXXXXX. ",
"o.@#XXXXXXXXX. ",
".X.O+XXXXXXXXXo ",
".XX.@+XXXXXXXX.$",
"oXXX.O+XXXXX..%$",
" .XXX.@+XX..&&&$",
" .XXX.O..&%&%.*",
" .XX$.&&%&.. ",
" .X$&%&.o ",
" .$%.. ",
" .o "};