From 2f4efa8a787d175807a40b5bbafb1197e4dcc318 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Fri, 30 Nov 2012 14:22:44 -0500 Subject: Step 1. Remove junk and keep functionality. (bzr r11894.1.1) --- src/widgets/connector-toolbar.cpp | 67 --------------------------------------- src/widgets/toolbox.cpp | 3 -- 2 files changed, 70 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/connector-toolbar.cpp b/src/widgets/connector-toolbar.cpp index 87deffc71..7c72f8e0c 100644 --- a/src/widgets/connector-toolbar.cpp +++ b/src/widgets/connector-toolbar.cpp @@ -78,13 +78,6 @@ using Inkscape::UI::PrefPusher; //## Connector ## //######################### -static void sp_connector_mode_toggled( GtkToggleAction* act, GObject * /*tbl*/ ) -{ - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setBool("/tools/connector/mode", - gtk_toggle_action_get_active( act )); -} - static void sp_connector_path_set_avoid(void) { cc_selection_set_avoid(true); @@ -303,26 +296,6 @@ static void connector_tb_event_attr_changed(Inkscape::XML::Node *repr, } } -static void sp_connector_new_connection_point(GtkWidget *, GObject *tbl) -{ - SPDesktop *desktop = static_cast(g_object_get_data( tbl, "desktop" )); - SPConnectorContext* cc = SP_CONNECTOR_CONTEXT(desktop->event_context); - - if (cc->mode == SP_CONNECTOR_CONTEXT_EDITING_MODE) { - cc_create_connection_point(cc); - } -} - -static void sp_connector_remove_connection_point(GtkWidget *, GObject *tbl) -{ - SPDesktop *desktop = static_cast(g_object_get_data( tbl, "desktop" )); - SPConnectorContext* cc = SP_CONNECTOR_CONTEXT(desktop->event_context); - - if (cc->mode == SP_CONNECTOR_CONTEXT_EDITING_MODE) { - cc_remove_connection_point(cc); - } -} - static Inkscape::XML::NodeEventVector connector_tb_repr_events = { NULL, /* child_added */ NULL, /* child_removed */ @@ -351,22 +324,6 @@ void sp_connector_toolbox_prep( SPDesktop *desktop, GtkActionGroup* mainActions, Inkscape::Preferences *prefs = Inkscape::Preferences::get(); Inkscape::IconSize secondarySize = ToolboxFactory::prefToSize("/toolbox/secondary", 1); - // Editing mode toggle button - { - InkToggleAction* act = ink_toggle_action_new( "ConnectorEditModeAction", - _("EditMode"), - _("Switch between connection point editing and connector drawing mode"), - INKSCAPE_ICON("connector-edit"), - Inkscape::ICON_SIZE_DECORATION ); - gtk_action_group_add_action( mainActions, GTK_ACTION( act ) ); - - bool tbuttonstate = prefs->getBool("/tools/connector/mode"); - gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(act), ( tbuttonstate ? TRUE : FALSE )); - g_object_set_data( holder, "mode", act ); - g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(sp_connector_mode_toggled), holder ); - } - - { InkAction* inky = ink_action_new( "ConnectorAvoidAction", _("Avoid"), @@ -480,30 +437,6 @@ void sp_connector_toolbox_prep( SPDesktop *desktop, GtkActionGroup* mainActions, } - // New connection point button - { - InkAction* inky = ink_action_new( "ConnectorNewConnPointAction", - _("New connection point"), - _("Add a new connection point to the currently selected item"), - INKSCAPE_ICON("connector-new-connpoint"), - secondarySize ); - g_signal_connect_after( G_OBJECT(inky), "activate", G_CALLBACK(sp_connector_new_connection_point), holder ); - gtk_action_group_add_action( mainActions, GTK_ACTION(inky) ); - } - - // Remove selected connection point button - - { - InkAction* inky = ink_action_new( "ConnectorRemoveConnPointAction", - _("Remove connection point"), - _("Remove the currently selected connection point"), - INKSCAPE_ICON("connector-remove-connpoint"), - secondarySize ); - g_signal_connect_after( G_OBJECT(inky), "activate", G_CALLBACK(sp_connector_remove_connection_point), holder ); - gtk_action_group_add_action( mainActions, GTK_ACTION(inky) ); - } - - // Code to watch for changes to the connector-spacing attribute in // the XML. Inkscape::XML::Node *repr = desktop->namedview->getRepr(); diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index b758e4f0f..59e866881 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -526,7 +526,6 @@ static gchar const * ui_descr = " " " " -// " " " " " " " " @@ -536,8 +535,6 @@ static gchar const * ui_descr = " " " " " " -// " " -// " " " " "" -- cgit v1.2.3