Re: How to change toolbar icon size?
- From: "Andrew E. Makeev" <andrew solvo ru>
- To: Diana Esch-Mosher <desch-mosher lanl gov>
- Cc: gtk-list gnome org, Gtkmm list <gtkmm-list gnome org>
- Subject: Re: How to change toolbar icon size?
- Date: Fri, 24 Dec 2004 12:01:54 +0300
Diana Esch-Mosher wrote:
Andrew E. Makeev wrote:
Hi,
What is alternative for deprecated Gtk::Toolbar->set_icon_size()
method if I would to change toolbar icons at runtime?
thanks in advance,
-andrew
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
I would love to know if there is a "correct way". Here is a completely
back door method!
Glib::RefPtr<Gtk::Settings> settings = Gtk::Settings::get_default();
Glib::PropertyProxy<IconSize> iconToolbar =
settings->property_gtk_toolbar_icon_size();
Gtk::IconSize iconsize(ICON_SIZE_SMALL_TOOLBAR);
iconToolbar=iconsize;
There are couple problems here.
First, not every widget Settings have property "gtk-toolbar-icon-size".
Second, I get following messages when I am trying to reparent my toolbar
to another window (prehaps, it is related to bug I've submitted on
toolbar items are inactive after reparenting).
Gtk-CRITICAL **: file gtkwidget.c: line 2221 (gtk_widget_realize):
assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
Gtk-CRITICAL **: file gtkwidget.c: line 2221 (gtk_widget_realize):
assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
Gtk-CRITICAL **: file gtkwidget.c: line 6458 (gtk_widget_real_map):
assertion `GTK_WIDGET_REALIZED (widget) == TRUE' failed
Gdk-CRITICAL **: file gdkwindow.c: line 2180
(gdk_window_invalidate_rect): assertion `window != NULL' failed
There is back trace from debug if someone would to see it at all:
#0 g_log (log_domain=0x3a175d3 "Gtk", log_level=60913107,
format=0x3a175d3 "Gtk") at gmessages.c:508
#1 0x039fa4ef in gtk_widget_realize (widget=0xa3094c8) at gtkwidget.c:2232
#2 0x039fdda5 in gtk_widget_set_parent (widget=0xa3094c8, parent=0xa10a698)
at gtkwidget.c:4297
#3 0x0383b1ec in gtk_bin_add (container=0xa10a698, child=0xa3094c8)
at gtkbin.c:128
#4 0x038400df in gtk_button_add (container=0xa10a698, widget=0xa3094c8)
at gtkbutton.c:486
#5 0x00bf135e in g_cclosure_marshal_VOID__OBJECT (closure=0xa0c4d88,
return_value=0x0, n_param_values=2, param_values=0xfefa1260,
invocation_hint=0xfefa1158, marshal_data=0x38400a0) at gmarshal.c:636
#6 0x00bdc4f7 in g_type_class_meta_marshal (closure=0xa0c4d88,
return_value=0x3a175d3, n_param_values=60913107, param_values=0xfefa1260,
invocation_hint=0x3a175d3, marshal_data=0x3a175d3) at gclosure.c:514
#7 0x00bdc160 in g_closure_invoke (closure=0xa0c4d88,
return_value=0x3a175d3,
n_param_values=60913107, param_values=0x3a175d3, invocation_hint=0x3a175d3)
at gclosure.c:437
#8 0x00bef98e in signal_emit_unlocked_R (node=0xa0c4dd0, detail=0,
instance=0xa10a698, emission_return=0x0, instance_and_params=0xfefa1260)
at gsignal.c:2365
#9 0x00bef127 in g_signal_emit_valist (instance=0xa10a698, signal_id=0,
detail=0, var_args=0xfefa13f0 "?\2240\nD\200?\003") at gsignal.c:2194
#10 0x00bef424 in g_signal_emit (instance=0x3a175d3, signal_id=60913107,
detail=60913107) at gsignal.c:2238
#11 0x03879527 in gtk_container_add (container=0xa10a698, widget=0xa3094c8)
at gtkcontainer.c:962
#12 0x039adc7a in gtk_tool_button_construct_contents (tool_item=0xa2eb770)
at gtktoolbutton.c:378
#13 0x00bf0661 in g_cclosure_marshal_VOID__VOID (closure=0xa2ea1d0,
return_value=0x0, n_param_values=1, param_values=0x3a175d3,
invocation_hint=0xfefa15c8, marshal_data=0x39ae470) at gmarshal.c:77
#14 0x00bdc4f7 in g_type_class_meta_marshal (closure=0xa2ea1d0,
return_value=0x3a175d3, n_param_values=60913107, param_values=0xfefa16d0,
invocation_hint=0x3a175d3, marshal_data=0x3a175d3) at gclosure.c:514
#15 0x00bdc160 in g_closure_invoke (closure=0xa2ea1d0,
return_value=0x3a175d3,
n_param_values=60913107, param_values=0x3a175d3, invocation_hint=0x3a175d3)
at gclosure.c:437
#16 0x00befb95 in signal_emit_unlocked_R (node=0xa2e83f0, detail=0,
instance=0xa2eb770, emission_return=0x0, instance_and_params=0xfefa16d0)
at gsignal.c:2473
#17 0x00bef127 in g_signal_emit_valist (instance=0xa2eb770, signal_id=224,
detail=0, var_args=0xfefa185c "") at gsignal.c:2194
#18 0x00bef424 in g_signal_emit (instance=0x3a175d3, signal_id=60913107,
detail=60913107) at gsignal.c:2238
#19 0x039b0b25 in _gtk_tool_item_toolbar_reconfigured (tool_item=0xa2eb770)
at gtktoolitem.c:1101
#20 0x039ace4f in toolbar_content_toolbar_reconfigured (content=0x3a175d3,
toolbar=0xa0967b8) at gtktoolbar.c:4422
#21 0x039a9da1 in gtk_toolbar_reconfigured (toolbar=0xa2e7c40)
at gtktoolbar.c:2439
#22 0x039ab197 in gtk_toolbar_set_icon_size (toolbar=0xa2e7c40,
icon_size=GTK_ICON_SIZE_MENU) at gtktoolbar.c:3073
#23 0x039ab291 in gtk_toolbar_unset_icon_size (toolbar=0xa2e7c40)
at gtktoolbar.c:3106
#24 0x039a8d73 in icon_size_change_notify (toolbar=0x0) at gtktoolbar.c:1906
#25 0x09a89fba in Gtk::Widget::on_screen_changed (this=0xa2e5100,
previous_screen= 0x3a175d3) at widget.h:321
#26 0x09a82f6e in Gtk::Widget_Class::screen_changed_callback
(self=0xfefa1960,
p0=0x0) at widget.cc:5001
#27 0x00bf135e in g_cclosure_marshal_VOID__OBJECT (closure=0xa06e590,
return_value=0x0, n_param_values=2, param_values=0xfefa1be0,
---Type <return> to continue, or q <return> to quit---
invocation_hint=0xfefa1ad8, marshal_data=0x9a82ea0) at gmarshal.c:636
#28 0x00bdc4f7 in g_type_class_meta_marshal (closure=0xa06e590,
return_value=0x3a175d3, n_param_values=60913107, param_values=0xfefa1be0,
invocation_hint=0x3a175d3, marshal_data=0x3a175d3) at gclosure.c:514
#29 0x00bdc160 in g_closure_invoke (closure=0xa06e590,
return_value=0x3a175d3,
n_param_values=60913107, param_values=0x3a175d3, invocation_hint=0x3a175d3)
at gclosure.c:437
#30 0x00befb95 in signal_emit_unlocked_R (node=0xa06e5e0, detail=0,
instance=0xa2e7c40, emission_return=0x0, instance_and_params=0xfefa1be0)
at gsignal.c:2473
#31 0x00bef127 in g_signal_emit_valist (instance=0xa2e7c40, signal_id=0,
detail=0, var_args=0xfefa1d70 "@|.\n\021") at gsignal.c:2194
#32 0x00bef424 in g_signal_emit (instance=0x3a175d3, signal_id=60913107,
detail=60913107) at gsignal.c:2238
#33 0x039fece3 in do_screen_change (widget=0xa2e7c40, old_screen=0x0,
new_screen=0xa081cb8) at gtkwidget.c:4766
#34 0x039fed8f in gtk_widget_propagate_hierarchy_changed_recurse (
widget=0xa2e7c40, client_data=0xfefa2270) at gtkwidget.c:4790
#35 0x0383f435 in gtk_box_forall (container=0xa2e20a8, include_internals=1,
callback=0x39fecf0 <gtk_widget_propagate_hierarchy_changed_recurse>,
callback_data=0xfefa2270) at gtkbox.c:701
#36 0x099f34ae in Gtk::Container::forall_vfunc (this=0xa1aa7f0,
include_internals=60913107, callback=0x3a175d3 <_fini+131>,
callback_data=0x3a175d3) at container.h:104
#37 0x099f1c83 in Gtk::Container_Class::forall_vfunc_callback
(self=0xa2e20a8,
include_internals=1,
callback=0x39fecf0 <gtk_widget_propagate_hierarchy_changed_recurse>,
callback_data=0xfefa2270) at container.cc:381
#38 0x03879f81 in gtk_container_forall (container=0xa2e20a8, callback=0x1,
callback_data=0x3a175d3) at gtkcontainer.c:1264
#39 0x039fedcb in gtk_widget_propagate_hierarchy_changed_recurse (
widget=0xa2e20a8, client_data=0xfefa2270) at gtkwidget.c:4793
#40 0x03920d3c in gtk_paned_forall (container=0xa1e3328,
include_internals=1,
callback=0x39fecf0 <gtk_widget_propagate_hierarchy_changed_recurse>,
callback_data=0xfefa2270) at gtkpaned.c:1068
#41 0x099f1c1e in Gtk::Container_Class::forall_vfunc_callback
(self=0xa1e3328,
include_internals=1,
callback=0x39fecf0 <gtk_widget_propagate_hierarchy_changed_recurse>,
callback_data=0xfefa2270) at container.cc:396
#42 0x03879f81 in gtk_container_forall (container=0xa1e3328, callback=0x1,
callback_data=0x3a175d3) at gtkcontainer.c:1264
#43 0x039fedcb in gtk_widget_propagate_hierarchy_changed_recurse (
widget=0xa1e3328, client_data=0xfefa2270) at gtkwidget.c:4793
#44 0x03913b24 in gtk_notebook_forall (container=0xa2f7a50,
include_internals=1,
callback=0x39fecf0 <gtk_widget_propagate_hierarchy_changed_recurse>,
callback_data=0xfefa2270) at gtknotebook.c:2432
#45 0x099f1c1e in Gtk::Container_Class::forall_vfunc_callback
(self=0xa216be0,
include_internals=1,
callback=0x39fecf0 <gtk_widget_propagate_hierarchy_changed_recurse>,
callback_data=0xfefa2270) at container.cc:396
#46 0x03879f81 in gtk_container_forall (container=0xa216be0, callback=0x1,
callback_data=0x3a175d3) at gtkcontainer.c:1264
#47 0x039fedcb in gtk_widget_propagate_hierarchy_changed_recurse (
widget=0xa216be0, client_data=0xfefa2270) at gtkwidget.c:4793
#48 0x0383b35c in gtk_bin_forall (container=0x3a175d3, include_internals=1,
callback=0xa0967b8, callback_data=0x3a175d3) at gtkbin.c:165
#49 0x099f1c1e in Gtk::Container_Class::forall_vfunc_callback
(self=0xa2fc358,
include_internals=1,
callback=0x39fecf0 <gtk_widget_propagate_hierarchy_changed_recurse>,
callback_data=0xfefa2270) at container.cc:396
#50 0x03879f81 in gtk_container_forall (container=0xa2fc358, callback=0x1,
---Type <return> to continue, or q <return> to quit---
callback_data=0x3a175d3) at gtkcontainer.c:1264
#51 0x039fedcb in gtk_widget_propagate_hierarchy_changed_recurse (
widget=0xa2fc358, client_data=0xfefa2270) at gtkwidget.c:4793
#52 0x0395f733 in gtk_table_forall (container=0x0, include_internals=1,
callback=0x39fecf0 <gtk_widget_propagate_hierarchy_changed_recurse>,
callback_data=0xfefa2270) at gtktable.c:961
#53 0x099f1c1e in Gtk::Container_Class::forall_vfunc_callback
(self=0xa1a9cc8,
include_internals=1,
callback=0x39fecf0 <gtk_widget_propagate_hierarchy_changed_recurse>,
callback_data=0xfefa2270) at container.cc:396
#54 0x03879f81 in gtk_container_forall (container=0xa1a9cc8, callback=0x1,
callback_data=0x3a175d3) at gtkcontainer.c:1264
#55 0x039fedcb in gtk_widget_propagate_hierarchy_changed_recurse (
widget=0xa1a9cc8, client_data=0xfefa2270) at gtkwidget.c:4793
#56 0x0383f435 in gtk_box_forall (container=0xa24ffd0, include_internals=1,
callback=0x39fecf0 <gtk_widget_propagate_hierarchy_changed_recurse>,
callback_data=0xfefa2270) at gtkbox.c:701
#57 0x099f1c1e in Gtk::Container_Class::forall_vfunc_callback
(self=0xa24ffd0,
include_internals=1,
callback=0x39fecf0 <gtk_widget_propagate_hierarchy_changed_recurse>,
callback_data=0xfefa2270) at container.cc:396
#58 0x03879f81 in gtk_container_forall (container=0xa24ffd0, callback=0x1,
callback_data=0x3a175d3) at gtkcontainer.c:1264
#59 0x039fedcb in gtk_widget_propagate_hierarchy_changed_recurse (
widget=0xa24ffd0, client_data=0xfefa2270) at gtkwidget.c:4793
#60 0x039fee6e in _gtk_widget_propagate_hierarchy_changed (widget=0xa24ffd0,
previous_toplevel=0x0) at gtkwidget.c:4830
#61 0x039fddb8 in gtk_widget_set_parent (widget=0xa24ffd0, parent=0xa312248)
at gtkwidget.c:4291
#62 0x0383b1ec in gtk_bin_add (container=0xa312248, child=0xa24ffd0)
at gtkbin.c:128
#63 0x099f3258 in Gtk::Container::on_add (this=0xa2f36c0, widget=0xa22e580)
at container.h:104
#64 0x099f2031 in Gtk::Container_Class::add_callback (self=0xa312248,
p0=0xa24ffd0) at container.cc:521
#65 0x00bf135e in g_cclosure_marshal_VOID__OBJECT (closure=0xa0c4d88,
return_value=0x0, n_param_values=2, param_values=0xfefa25d0,
invocation_hint=0xfefa24c8, marshal_data=0x99f1f70) at gmarshal.c:636
#66 0x00bdc4f7 in g_type_class_meta_marshal (closure=0xa0c4d88,
return_value=0x3a175d3, n_param_values=60913107, param_values=0xfefa25d0,
invocation_hint=0x3a175d3, marshal_data=0x3a175d3) at gclosure.c:514
#67 0x00bdc160 in g_closure_invoke (closure=0xa0c4d88,
return_value=0x3a175d3,
n_param_values=60913107, param_values=0x3a175d3, invocation_hint=0x3a175d3)
at gclosure.c:437
#68 0x00bef98e in signal_emit_unlocked_R (node=0xa0c4dd0, detail=0,
instance=0xa312248, emission_return=0x0, instance_and_params=0xfefa25d0)
at gsignal.c:2365
#69 0x00bef127 in g_signal_emit_valist (instance=0xa312248, signal_id=0,
detail=0, var_args=0xfefa2760 "\0160\020`\001") at gsignal.c:2194
#70 0x00bef424 in g_signal_emit (instance=0x3a175d3, signal_id=60913107,
detail=60913107) at gsignal.c:2238
#71 0x03879527 in gtk_container_add (container=0xa312248, widget=0xa24ffd0)
at gtkcontainer.c:962
#72 0x039fcd63 in gtk_widget_reparent (widget=0xa24ffd0,
new_parent=0xa312248)
at gtkwidget.c:3717
#73 0x09a838e8 in Gtk::Widget::reparent (this=0xa0967b8, new_parent= 0x0)
at widget.h:321
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]