mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
gtk_object_query_args takes an additional pointer now which if supplied
Sat Feb 21 14:49:17 1998 Tim Janik <timj@gimp.org> * gtk/gtkobject.h: * gtk/gtkobject.c: gtk_object_query_args takes an additional pointer now which if supplied will point to an array holding the sequential argument ids. * gtk/gtktree.c: fix emission of selection_changed signal, supplied by Bolliet Jerome. * gtk/gtktreeitem.c: inline the plus and minus pixmaps, supplied by Bolliet Jerome. * gtk/gtknotebook.c: do a resize when a page is removed and don't refer to the removed page on the switch signal, supplied by Lars Hamann and Stefan Jeske. * gtk/gtktoolbar.h: * gtk/gtktoolbar.c: gtk_toolbar_append_item, gtk_toolbar_prepend_item, gtk_toolbar_insert_item, gtk_toolbar_append_widget, gtk_toolbar_prepend_widget, gtk_toolbar_insert_widget: take an additional gchar *tooltip_private_text as argument to fully support the underlying call to gtk_tooltip_set_tip. (made the ChangeLog catch up with my last commits).
This commit is contained in:
parent
a8d6f14c2d
commit
800afc55d7
25
ChangeLog
25
ChangeLog
@ -1,3 +1,28 @@
|
||||
Sat Feb 21 14:49:17 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* gtk/gtkobject.h:
|
||||
* gtk/gtkobject.c: gtk_object_query_args takes an additional pointer
|
||||
now which if supplied will point to an array holding the sequential
|
||||
argument ids.
|
||||
|
||||
* gtk/gtktree.c: fix emission of selection_changed signal, supplied
|
||||
by Bolliet Jerome.
|
||||
|
||||
* gtk/gtktreeitem.c: inline the plus and minus pixmaps, supplied by
|
||||
Bolliet Jerome.
|
||||
|
||||
* gtk/gtknotebook.c: do a resize when a page is removed and don't
|
||||
refer to the removed page on the switch signal, supplied by Lars Hamann
|
||||
and Stefan Jeske.
|
||||
|
||||
* gtk/gtktoolbar.h:
|
||||
* gtk/gtktoolbar.c:
|
||||
gtk_toolbar_append_item, gtk_toolbar_prepend_item,
|
||||
gtk_toolbar_insert_item, gtk_toolbar_append_widget,
|
||||
gtk_toolbar_prepend_widget, gtk_toolbar_insert_widget: take an additional
|
||||
gchar *tooltip_private_text as argument to fully support the underlying
|
||||
call to gtk_tooltip_set_tip.
|
||||
|
||||
Fri Feb 20 16:44:57 GMT 1998 Tony Gale <gale@gimp.org>
|
||||
|
||||
* docs/gtkfaq.sgml: added to list of GTK apps, added permissions notice
|
||||
|
@ -1,3 +1,28 @@
|
||||
Sat Feb 21 14:49:17 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* gtk/gtkobject.h:
|
||||
* gtk/gtkobject.c: gtk_object_query_args takes an additional pointer
|
||||
now which if supplied will point to an array holding the sequential
|
||||
argument ids.
|
||||
|
||||
* gtk/gtktree.c: fix emission of selection_changed signal, supplied
|
||||
by Bolliet Jerome.
|
||||
|
||||
* gtk/gtktreeitem.c: inline the plus and minus pixmaps, supplied by
|
||||
Bolliet Jerome.
|
||||
|
||||
* gtk/gtknotebook.c: do a resize when a page is removed and don't
|
||||
refer to the removed page on the switch signal, supplied by Lars Hamann
|
||||
and Stefan Jeske.
|
||||
|
||||
* gtk/gtktoolbar.h:
|
||||
* gtk/gtktoolbar.c:
|
||||
gtk_toolbar_append_item, gtk_toolbar_prepend_item,
|
||||
gtk_toolbar_insert_item, gtk_toolbar_append_widget,
|
||||
gtk_toolbar_prepend_widget, gtk_toolbar_insert_widget: take an additional
|
||||
gchar *tooltip_private_text as argument to fully support the underlying
|
||||
call to gtk_tooltip_set_tip.
|
||||
|
||||
Fri Feb 20 16:44:57 GMT 1998 Tony Gale <gale@gimp.org>
|
||||
|
||||
* docs/gtkfaq.sgml: added to list of GTK apps, added permissions notice
|
||||
|
@ -1,3 +1,28 @@
|
||||
Sat Feb 21 14:49:17 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* gtk/gtkobject.h:
|
||||
* gtk/gtkobject.c: gtk_object_query_args takes an additional pointer
|
||||
now which if supplied will point to an array holding the sequential
|
||||
argument ids.
|
||||
|
||||
* gtk/gtktree.c: fix emission of selection_changed signal, supplied
|
||||
by Bolliet Jerome.
|
||||
|
||||
* gtk/gtktreeitem.c: inline the plus and minus pixmaps, supplied by
|
||||
Bolliet Jerome.
|
||||
|
||||
* gtk/gtknotebook.c: do a resize when a page is removed and don't
|
||||
refer to the removed page on the switch signal, supplied by Lars Hamann
|
||||
and Stefan Jeske.
|
||||
|
||||
* gtk/gtktoolbar.h:
|
||||
* gtk/gtktoolbar.c:
|
||||
gtk_toolbar_append_item, gtk_toolbar_prepend_item,
|
||||
gtk_toolbar_insert_item, gtk_toolbar_append_widget,
|
||||
gtk_toolbar_prepend_widget, gtk_toolbar_insert_widget: take an additional
|
||||
gchar *tooltip_private_text as argument to fully support the underlying
|
||||
call to gtk_tooltip_set_tip.
|
||||
|
||||
Fri Feb 20 16:44:57 GMT 1998 Tony Gale <gale@gimp.org>
|
||||
|
||||
* docs/gtkfaq.sgml: added to list of GTK apps, added permissions notice
|
||||
|
@ -1,3 +1,28 @@
|
||||
Sat Feb 21 14:49:17 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* gtk/gtkobject.h:
|
||||
* gtk/gtkobject.c: gtk_object_query_args takes an additional pointer
|
||||
now which if supplied will point to an array holding the sequential
|
||||
argument ids.
|
||||
|
||||
* gtk/gtktree.c: fix emission of selection_changed signal, supplied
|
||||
by Bolliet Jerome.
|
||||
|
||||
* gtk/gtktreeitem.c: inline the plus and minus pixmaps, supplied by
|
||||
Bolliet Jerome.
|
||||
|
||||
* gtk/gtknotebook.c: do a resize when a page is removed and don't
|
||||
refer to the removed page on the switch signal, supplied by Lars Hamann
|
||||
and Stefan Jeske.
|
||||
|
||||
* gtk/gtktoolbar.h:
|
||||
* gtk/gtktoolbar.c:
|
||||
gtk_toolbar_append_item, gtk_toolbar_prepend_item,
|
||||
gtk_toolbar_insert_item, gtk_toolbar_append_widget,
|
||||
gtk_toolbar_prepend_widget, gtk_toolbar_insert_widget: take an additional
|
||||
gchar *tooltip_private_text as argument to fully support the underlying
|
||||
call to gtk_tooltip_set_tip.
|
||||
|
||||
Fri Feb 20 16:44:57 GMT 1998 Tony Gale <gale@gimp.org>
|
||||
|
||||
* docs/gtkfaq.sgml: added to list of GTK apps, added permissions notice
|
||||
|
@ -1,3 +1,28 @@
|
||||
Sat Feb 21 14:49:17 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* gtk/gtkobject.h:
|
||||
* gtk/gtkobject.c: gtk_object_query_args takes an additional pointer
|
||||
now which if supplied will point to an array holding the sequential
|
||||
argument ids.
|
||||
|
||||
* gtk/gtktree.c: fix emission of selection_changed signal, supplied
|
||||
by Bolliet Jerome.
|
||||
|
||||
* gtk/gtktreeitem.c: inline the plus and minus pixmaps, supplied by
|
||||
Bolliet Jerome.
|
||||
|
||||
* gtk/gtknotebook.c: do a resize when a page is removed and don't
|
||||
refer to the removed page on the switch signal, supplied by Lars Hamann
|
||||
and Stefan Jeske.
|
||||
|
||||
* gtk/gtktoolbar.h:
|
||||
* gtk/gtktoolbar.c:
|
||||
gtk_toolbar_append_item, gtk_toolbar_prepend_item,
|
||||
gtk_toolbar_insert_item, gtk_toolbar_append_widget,
|
||||
gtk_toolbar_prepend_widget, gtk_toolbar_insert_widget: take an additional
|
||||
gchar *tooltip_private_text as argument to fully support the underlying
|
||||
call to gtk_tooltip_set_tip.
|
||||
|
||||
Fri Feb 20 16:44:57 GMT 1998 Tony Gale <gale@gimp.org>
|
||||
|
||||
* docs/gtkfaq.sgml: added to list of GTK apps, added permissions notice
|
||||
|
@ -1,3 +1,28 @@
|
||||
Sat Feb 21 14:49:17 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* gtk/gtkobject.h:
|
||||
* gtk/gtkobject.c: gtk_object_query_args takes an additional pointer
|
||||
now which if supplied will point to an array holding the sequential
|
||||
argument ids.
|
||||
|
||||
* gtk/gtktree.c: fix emission of selection_changed signal, supplied
|
||||
by Bolliet Jerome.
|
||||
|
||||
* gtk/gtktreeitem.c: inline the plus and minus pixmaps, supplied by
|
||||
Bolliet Jerome.
|
||||
|
||||
* gtk/gtknotebook.c: do a resize when a page is removed and don't
|
||||
refer to the removed page on the switch signal, supplied by Lars Hamann
|
||||
and Stefan Jeske.
|
||||
|
||||
* gtk/gtktoolbar.h:
|
||||
* gtk/gtktoolbar.c:
|
||||
gtk_toolbar_append_item, gtk_toolbar_prepend_item,
|
||||
gtk_toolbar_insert_item, gtk_toolbar_append_widget,
|
||||
gtk_toolbar_prepend_widget, gtk_toolbar_insert_widget: take an additional
|
||||
gchar *tooltip_private_text as argument to fully support the underlying
|
||||
call to gtk_tooltip_set_tip.
|
||||
|
||||
Fri Feb 20 16:44:57 GMT 1998 Tony Gale <gale@gimp.org>
|
||||
|
||||
* docs/gtkfaq.sgml: added to list of GTK apps, added permissions notice
|
||||
|
@ -1,3 +1,28 @@
|
||||
Sat Feb 21 14:49:17 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* gtk/gtkobject.h:
|
||||
* gtk/gtkobject.c: gtk_object_query_args takes an additional pointer
|
||||
now which if supplied will point to an array holding the sequential
|
||||
argument ids.
|
||||
|
||||
* gtk/gtktree.c: fix emission of selection_changed signal, supplied
|
||||
by Bolliet Jerome.
|
||||
|
||||
* gtk/gtktreeitem.c: inline the plus and minus pixmaps, supplied by
|
||||
Bolliet Jerome.
|
||||
|
||||
* gtk/gtknotebook.c: do a resize when a page is removed and don't
|
||||
refer to the removed page on the switch signal, supplied by Lars Hamann
|
||||
and Stefan Jeske.
|
||||
|
||||
* gtk/gtktoolbar.h:
|
||||
* gtk/gtktoolbar.c:
|
||||
gtk_toolbar_append_item, gtk_toolbar_prepend_item,
|
||||
gtk_toolbar_insert_item, gtk_toolbar_append_widget,
|
||||
gtk_toolbar_prepend_widget, gtk_toolbar_insert_widget: take an additional
|
||||
gchar *tooltip_private_text as argument to fully support the underlying
|
||||
call to gtk_tooltip_set_tip.
|
||||
|
||||
Fri Feb 20 16:44:57 GMT 1998 Tony Gale <gale@gimp.org>
|
||||
|
||||
* docs/gtkfaq.sgml: added to list of GTK apps, added permissions notice
|
||||
|
@ -478,6 +478,7 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
|
||||
{
|
||||
GtkNotebookPage *page;
|
||||
GList * next_list;
|
||||
gint need_resize = FALSE;
|
||||
|
||||
if (list->prev)
|
||||
{
|
||||
@ -494,13 +495,12 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
|
||||
|
||||
if (notebook->cur_page == list->data)
|
||||
{
|
||||
notebook->cur_page = NULL;
|
||||
if (next_list)
|
||||
{
|
||||
page = next_list->data;
|
||||
gtk_notebook_switch_page (notebook, page, page_num);
|
||||
}
|
||||
else
|
||||
notebook->cur_page = NULL;
|
||||
}
|
||||
|
||||
if (list == notebook->first_tab)
|
||||
@ -510,6 +510,10 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
|
||||
|
||||
page = list->data;
|
||||
|
||||
if ((GTK_WIDGET_VISIBLE (page->child) ||
|
||||
GTK_WIDGET_VISIBLE (page->tab_label)) && GTK_WIDGET_VISIBLE (notebook))
|
||||
need_resize = TRUE;
|
||||
|
||||
gtk_widget_unparent (page->child);
|
||||
gtk_widget_unparent (page->tab_label);
|
||||
|
||||
@ -527,6 +531,10 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
|
||||
notebook->children = g_list_remove_link (notebook->children, list);
|
||||
g_list_free (list);
|
||||
g_free (page);
|
||||
|
||||
if (need_resize)
|
||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||
|
||||
}
|
||||
|
||||
gint
|
||||
|
@ -271,12 +271,10 @@ gtk_tree_add (GtkContainer *container,
|
||||
|
||||
tree->children = g_list_append (tree->children, widget);
|
||||
|
||||
#if 0
|
||||
if (!tree->selection && (tree->selection_mode == GTK_SELECTION_BROWSE))
|
||||
{
|
||||
gtk_tree_select_child (tree, widget);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container))
|
||||
gtk_widget_queue_resize (widget);
|
||||
@ -946,6 +944,8 @@ gtk_real_tree_select_child (GtkTree *tree,
|
||||
|
||||
gtk_signal_emit (GTK_OBJECT (tree->root_tree),
|
||||
tree_signals[SELECTION_CHANGED]);
|
||||
break;
|
||||
|
||||
|
||||
case GTK_SELECTION_BROWSE:
|
||||
selection = root_selection;
|
||||
|
@ -23,18 +23,11 @@
|
||||
#include "gtkmain.h"
|
||||
#include "gtksignal.h"
|
||||
|
||||
/* remove comment if you want replace loading pixmap by static bitmap
|
||||
for icons
|
||||
experimental code and it is buggy */
|
||||
/* #define WITH_BITMAP */
|
||||
#include "tree_plus.xpm"
|
||||
#include "tree_minus.xpm"
|
||||
|
||||
#define DEFAULT_DELTA 9
|
||||
|
||||
#ifdef WITH_BITMAP
|
||||
#include "tree_plus.xbm"
|
||||
#include "tree_minus.xbm"
|
||||
#endif
|
||||
|
||||
enum {
|
||||
COLLAPSE_TREE,
|
||||
EXPAND_TREE,
|
||||
@ -199,47 +192,27 @@ gtk_tree_item_init (GtkTreeItem *tree_item)
|
||||
GtkWidget *eventbox, *pixmapwid;
|
||||
static GdkPixmap *pixmap_plus = NULL;
|
||||
static GdkPixmap *pixmap_minus = NULL;
|
||||
#ifndef WITH_BITMAP
|
||||
static GdkBitmap *mask = NULL;
|
||||
#endif
|
||||
static GtkStyle *style = NULL;
|
||||
static GdkBitmap *mask_plus = NULL;
|
||||
static GdkBitmap *mask_minus = NULL;
|
||||
GdkColor xpmcolor;
|
||||
|
||||
tree_item->expanded = FALSE;
|
||||
tree_item->subtree = NULL;
|
||||
GTK_WIDGET_SET_FLAGS (tree_item, GTK_CAN_FOCUS);
|
||||
|
||||
if(style == NULL)
|
||||
/* check if icons are already created */
|
||||
if(pixmap_plus == NULL && pixmap_minus == NULL)
|
||||
{
|
||||
|
||||
style=gtk_widget_get_style(GTK_WIDGET(tree_item));
|
||||
|
||||
#ifndef WITH_BITMAP
|
||||
/* create pixmaps for one time, based on xpm file */
|
||||
pixmap_plus = gdk_pixmap_create_from_xpm (GTK_WIDGET(tree_item)->window, &mask,
|
||||
&style->bg[GTK_STATE_NORMAL],
|
||||
"tree_plus.xpm");
|
||||
if(!pixmap_plus)
|
||||
g_warning("gtk_tree_item_init: can't find tree_plus.xpm file !\n");
|
||||
|
||||
pixmap_minus = gdk_pixmap_create_from_xpm (GTK_WIDGET(tree_item)->window, &mask,
|
||||
&style->bg[GTK_STATE_NORMAL],
|
||||
"tree_minus.xpm");
|
||||
if(!pixmap_minus)
|
||||
g_warning("gtk_tree_item_init: can't find tree_minus.xpm file !\n");
|
||||
#else
|
||||
|
||||
pixmap_plus = gdk_pixmap_create_from_data(GTK_WIDGET(tree_item)->window,
|
||||
(gchar*) tree_plus_bits,
|
||||
tree_plus_width, tree_plus_height, -1,
|
||||
&style->black,
|
||||
&style->white);
|
||||
|
||||
pixmap_minus = gdk_pixmap_create_from_data(GTK_WIDGET(tree_item)->window,
|
||||
(gchar*) tree_minus_bits,
|
||||
tree_minus_width, tree_minus_height, -1,
|
||||
&style->black,
|
||||
&style->white);
|
||||
#endif /* WITH_BITMAP */
|
||||
/* create pixmaps for plus icon */
|
||||
pixmap_plus = gdk_pixmap_create_from_xpm_d(GTK_WIDGET(tree_item)->window,
|
||||
&mask_plus,
|
||||
&xpmcolor,
|
||||
tree_plus);
|
||||
/* create pixmaps for minus icon */
|
||||
pixmap_minus = gdk_pixmap_create_from_xpm_d(GTK_WIDGET(tree_item)->window,
|
||||
&mask_minus,
|
||||
&xpmcolor,
|
||||
tree_minus);
|
||||
}
|
||||
|
||||
if(pixmap_plus && pixmap_minus)
|
||||
@ -260,11 +233,7 @@ gtk_tree_item_init (GtkTreeItem *tree_item)
|
||||
tree_item->pixmaps_box = eventbox;
|
||||
|
||||
/* create pixmap for button '+' */
|
||||
#ifndef WITH_BITMAP
|
||||
pixmapwid = gtk_pixmap_new (pixmap_plus, mask);
|
||||
#else
|
||||
pixmapwid = gtk_pixmap_new (pixmap_plus, NULL);
|
||||
#endif
|
||||
pixmapwid = gtk_pixmap_new (pixmap_plus, mask_plus);
|
||||
if(!tree_item->expanded)
|
||||
gtk_container_add(GTK_CONTAINER(eventbox), pixmapwid);
|
||||
gtk_widget_show(pixmapwid);
|
||||
@ -273,11 +242,7 @@ gtk_tree_item_init (GtkTreeItem *tree_item)
|
||||
gtk_object_sink (GTK_OBJECT (tree_item->plus_pix_widget));
|
||||
|
||||
/* create pixmap for button '-' */
|
||||
#ifndef WITH_BITMAP
|
||||
pixmapwid = gtk_pixmap_new (pixmap_minus, mask);
|
||||
#else
|
||||
pixmapwid = gtk_pixmap_new (pixmap_minus, NULL);
|
||||
#endif
|
||||
pixmapwid = gtk_pixmap_new (pixmap_minus, mask_minus);
|
||||
if(tree_item->expanded)
|
||||
gtk_container_add(GTK_CONTAINER(eventbox), pixmapwid);
|
||||
gtk_widget_show(pixmapwid);
|
||||
|
@ -15,6 +15,8 @@ static void cb_tree_changed(GtkTree* tree) {
|
||||
GList* selected;
|
||||
gint nb_selected;
|
||||
|
||||
g_print("selection changed !\n");
|
||||
|
||||
tree_buttons = gtk_object_get_user_data(GTK_OBJECT(tree));
|
||||
|
||||
selected = tree->selection;
|
||||
|
Loading…
Reference in New Issue
Block a user