Commit ce350f49 authored by Jody Goldberg's avatar Jody Goldberg
Browse files

Still more poking at the new bonobo ui.

Object toolbar is now mostly functional.
parent 1c9409f7
......@@ -417,27 +417,27 @@
<dockitem name="ObjectToolbar" homogeneous="0" look="icons" relief="none">
<toolitem type="std" name="Label" pixtype="stock" pixname="Gnumeric_Label"
_label="Label" _descr="Create a label" verb="testme"/>
_label="Label" _descr="Create a label" verb="CreateLabel"/>
<toolitem type="std" name="Frame" pixtype="stock" pixname="Gnumeric_Frame"
_label="Frame" _descr="Create a frame" verb="testme"/>
_label="Frame" _descr="Create a frame" verb="CreateFrame"/>
<toolitem type="std" name="Frame" pixtype="stock" pixname="Gnumeric_Button"
_label="Button" _descr="Create a button" verb="testme"/>
_label="Button" _descr="Create a button" verb="CreateButton"/>
<toolitem type="std" name="Frame" pixtype="stock" pixname="Gnumeric_Checkbutton"
_label="Checkbox" _descr="Create a checkbox" verb="testme"/>
_label="Checkbox" _descr="Create a checkbox" verb="CreateCheckbox"/>
<toolitem type="std" name="Frame" pixtype="stock" pixname="Gnumeric_Radiobutton"
_label="Radio Button" _descr="Create a radio button" verb="testme"/>
_label="Radio Button" _descr="Create a radio button" verb="CreateRadiobutton"/>
<toolitem type="std" name="List" pixtype="stock" pixname="Gnumeric_List"
_label="List" _descr="Create a list" verb="testme"/>
_label="List" _descr="Create a list" verb="CreateList"/>
<toolitem type="std" name="Combo" pixtype="stock" pixname="Gnumeric_Combo"
_label="Combo Box" _descr="Create a combo box" verb="testme"/>
_label="Combo Box" _descr="Create a combo box" verb="CreateCombobox"/>
<toolitem type="std" name="Line" pixtype="stock" pixname="Gnumeric_Line"
_label="Line" _descr="Create a line" verb="testme"/>
_label="Line" _descr="Create a line" verb="CreateLine"/>
<toolitem type="std" name="Arrow" pixtype="stock" pixname="Gnumeric_Arrow"
_label="Arrow" _descr="Create a frame" verb="testme"/>
_label="Arrow" _descr="Create a frame" verb="CreateArrow"/>
<toolitem type="std" name="Rectangle" pixtype="stock" pixname="Gnumeric_Rectangle"
_label="Rectangle" _descr="Draw a rectangle" verb="testme"/>
_label="Rectangle" _descr="Draw a rectangle" verb="CreateRectangle"/>
<toolitem type="std" name="Oval" pixtype="stock" pixname="Gnumeric_Oval"
_label="Oval" _descr="Draw an oval" verb="testme"/>
_label="Oval" _descr="Draw an oval" verb="CreateEllipse"/>
</dockitem>
</Root>
......@@ -417,27 +417,27 @@
<dockitem name="ObjectToolbar" homogeneous="0" look="icons" relief="none">
<toolitem type="std" name="Label" pixtype="stock" pixname="Gnumeric_Label"
_label="Label" _descr="Create a label" verb="testme"/>
_label="Label" _descr="Create a label" verb="CreateLabel"/>
<toolitem type="std" name="Frame" pixtype="stock" pixname="Gnumeric_Frame"
_label="Frame" _descr="Create a frame" verb="testme"/>
_label="Frame" _descr="Create a frame" verb="CreateFrame"/>
<toolitem type="std" name="Frame" pixtype="stock" pixname="Gnumeric_Button"
_label="Button" _descr="Create a button" verb="testme"/>
_label="Button" _descr="Create a button" verb="CreateButton"/>
<toolitem type="std" name="Frame" pixtype="stock" pixname="Gnumeric_Checkbutton"
_label="Checkbox" _descr="Create a checkbox" verb="testme"/>
_label="Checkbox" _descr="Create a checkbox" verb="CreateCheckbox"/>
<toolitem type="std" name="Frame" pixtype="stock" pixname="Gnumeric_Radiobutton"
_label="Radio Button" _descr="Create a radio button" verb="testme"/>
_label="Radio Button" _descr="Create a radio button" verb="CreateRadiobutton"/>
<toolitem type="std" name="List" pixtype="stock" pixname="Gnumeric_List"
_label="List" _descr="Create a list" verb="testme"/>
_label="List" _descr="Create a list" verb="CreateList"/>
<toolitem type="std" name="Combo" pixtype="stock" pixname="Gnumeric_Combo"
_label="Combo Box" _descr="Create a combo box" verb="testme"/>
_label="Combo Box" _descr="Create a combo box" verb="CreateCombobox"/>
<toolitem type="std" name="Line" pixtype="stock" pixname="Gnumeric_Line"
_label="Line" _descr="Create a line" verb="testme"/>
_label="Line" _descr="Create a line" verb="CreateLine"/>
<toolitem type="std" name="Arrow" pixtype="stock" pixname="Gnumeric_Arrow"
_label="Arrow" _descr="Create a frame" verb="testme"/>
_label="Arrow" _descr="Create a frame" verb="CreateArrow"/>
<toolitem type="std" name="Rectangle" pixtype="stock" pixname="Gnumeric_Rectangle"
_label="Rectangle" _descr="Draw a rectangle" verb="testme"/>
_label="Rectangle" _descr="Draw a rectangle" verb="CreateRectangle"/>
<toolitem type="std" name="Oval" pixtype="stock" pixname="Gnumeric_Oval"
_label="Oval" _descr="Draw an oval" verb="testme"/>
_label="Oval" _descr="Draw an oval" verb="CreateEllipse"/>
</dockitem>
</Root>
......@@ -162,6 +162,24 @@ static GnomeUIInfo workbook_object_toolbar [] = {
GNOMEUIINFO_END
};
#ifdef ENABLE_BONOBO
static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("CreateLabel", cmd_create_label),
BONOBO_UI_VERB ("CreateFrame", cmd_create_frame),
BONOBO_UI_VERB ("CreateButton", cmd_create_button),
BONOBO_UI_VERB ("CreateCheckbox", cmd_create_checkbox),
BONOBO_UI_VERB ("CreateRadiobutton", cmd_create_radiobutton),
BONOBO_UI_VERB ("CreateList", cmd_create_list),
BONOBO_UI_VERB ("CreateCombobox", cmd_create_combobox),
BONOBO_UI_VERB ("CreateLine", cmd_create_line),
BONOBO_UI_VERB ("CreateArrow", cmd_create_arrow),
BONOBO_UI_VERB ("CreateRectangle", cmd_create_rectangle),
BONOBO_UI_VERB ("CreateEllipse", cmd_create_ellipse),
BONOBO_UI_VERB_END
};
#endif
GtkWidget *
workbook_create_object_toolbar (Workbook *wb)
{
......@@ -189,6 +207,12 @@ workbook_create_object_toolbar (Workbook *wb)
name,
behavior,
GNOME_DOCK_TOP, 3, 0, 0);
#else
BonoboUIComponent *component =
bonobo_ui_compat_get_component (wb->priv->uih);
bonobo_ui_component_add_verb_list_with_data (
component, verbs, wb);
#endif
return toolbar;
......
......@@ -1132,7 +1132,7 @@ sort_descend_cmd (GtkWidget *widget, Workbook *wb)
#ifdef ENABLE_BONOBO
BonoboUIVerb verbs [] = {
static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("FileNew", new_cmd),
BONOBO_UI_VERB ("FileOpen", file_open_cmd),
......@@ -2766,6 +2766,8 @@ workbook_new (void)
wb->priv->menu_item_undo = workbook_menu_edit[0].widget;
wb->priv->menu_item_redo = workbook_menu_edit[1].widget;
wb->priv->menu_item_paste_special = workbook_menu_edit[6].widget;
workbook_create_toolbars (wb);
#else
wb->priv->main_vbox = gtk_vbox_new (FALSE, 0);
gtk_widget_show (wb->priv->main_vbox);
......@@ -2777,6 +2779,9 @@ workbook_new (void)
wb->priv->uih = bonobo_ui_handler_new ();
bonobo_ui_handler_set_app (wb->priv->uih, BONOBO_WIN (wb->toplevel));
/* Create before registering verbs so that we can merge some extra. */
workbook_create_toolbars (wb);
{
char *fname;
xmlNode *ui;
......@@ -2813,8 +2818,6 @@ workbook_new (void)
*/
workbook_view_set_paste_special_state (wb, TRUE);
workbook_create_toolbars (wb);
/* Minimized pixmap */
workbook_configure_minimized_pixmap (wb);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment