[anjuta] project-manager: Remove New Library menu item
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] project-manager: Remove New Library menu item
- Date: Sun, 10 Feb 2013 15:22:35 +0000 (UTC)
commit 26fd7394e59bf6723f21bbdf9059655cc6069fe2
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Sun Feb 10 16:18:35 2013 +0100
project-manager: Remove New Library menu item
The dialog is still existing but can be reached only from the Add library
dialog. The goal is to make more difficult to only add a module without
using it in a target.
.../C/project-manager-module-add.page | 33 +++++++--
.../C/project-manager-module-new.page | 73 +++++++++++---------
.../C/project-manager-package-add.page | 49 -------------
manuals/anjuta-manual/Makefile.am | 1 -
plugins/project-manager/anjuta-project-manager.xml | 2 -
plugins/project-manager/plugin.c | 46 ------------
6 files changed, 64 insertions(+), 140 deletions(-)
---
diff --git a/manuals/anjuta-manual/C/project-manager-module-add.page b/manuals/anjuta-manual/C/project-manager-module-add.page
index 525197f..2c6308b 100644
--- a/manuals/anjuta-manual/C/project-manager-module-add.page
+++ b/manuals/anjuta-manual/C/project-manager-module-add.page
@@ -20,11 +20,13 @@
</credit>
</info>
- <title>Add a Module</title>
+ <title>Add packaged libraries</title>
- <p>Packages cannot be added directly to a target. You need to put them
- into a module first and add this module to the target. See
- <link xref="project-manager-module-new"/> to know how to do create a module.</p>
+ <p>On Linux, most libraries are distributed with additional data stored
+ in a <app>pkg-config</app> file. This file contains information like
+ the other libraries needed, the C compiler and the linker flags needed
+ to use that library. This file, the header files and the library files
+ themselves is called a package.</p>
<steps>
<item>
@@ -36,12 +38,27 @@
<gui>Add Library...</gui></guiseq>.</p>
</item>
<item>
- <p>You need to select the target where you want to add the module
- in the <gui>target button</gui> above, and select the module that
- you want to add in the <gui>module view</gui> below. If you
+ <p>You need to select the target where you want to add the library
+ in the <gui>target button</gui> above.</p>
+ </item>
+ <item>
+ <p>A library cannot be added directly to a target. You can add only
+ a module displayed in the <gui>module view</gui> below. If you
select a library inside a module, the parent module will be added.</p>
+ </item>
+ <item>
+ <p>If the library you want is not displayed in the <gui>module view</gui>,
+ you need to add it as a module first. Click on the button
+ <gui>New Library</gui> and follow the explanation
+ <link xref="project-manager-module-new">here</link>.</p>
+ <note style="tip">
+ <p>After creating a new module, you have to wait a few seconds while
+ the project files are reloaded to see the new module in the list.</p>
+ </note>
+ </item>
+ <item>
<p>When you are done, click on the <gui>Add</gui> button to add the
- module.</p>
+ selected module to the target.</p>
</item>
</steps>
diff --git a/manuals/anjuta-manual/C/project-manager-module-new.page b/manuals/anjuta-manual/C/project-manager-module-new.page
index 8faab52..2a99cd9 100644
--- a/manuals/anjuta-manual/C/project-manager-module-new.page
+++ b/manuals/anjuta-manual/C/project-manager-module-new.page
@@ -6,10 +6,11 @@
<facet:tag key="all-pages" value="whatever"/> <!--Include page in index-->
<link type="guide" xref="project-manager-library" group="first"/>
<link type="next" xref="project-manager-module-add"/>
+ <link type="next" xref="project-manager-library-add"/>
<link type="seealso" xref="project-manager-library"/>
<revision pkgversion="3.0" version="0.1" date="2011-03-27" status="incomplete"/>
<desc>
- Create a set of libraries.
+ Groups libraries in a module.
</desc>
<credit type="author">
<name>SÃbastien Granjoux</name>
@@ -21,53 +22,57 @@
</credit>
</info>
- <title>Create a Module</title>
+ <title>Add a Module</title>
- <p>On Linux, most libraries are distributed with additional data stored
- in a <app>pkg-config</app> file. This file contains information like
- the other libraries needed, the C compiler and the linker flags needed
- to use that library. This file, the header files and the library files
- themselves is called a package.</p>
-
- <p><app>Anjuta</app> provides an simple interface to use such library.
- If the library you need is not one of these, check the
- <link xref="project-manager-library-add">Add non-packaged libraries</link>
- page.</p>
-
- <p>A package cannot be added directly to your program; you first need to
- create a module for it, which is just a group of packages.</p>
+ <p>Packages cannot be added directly to a program but have to be grouped in
+ a module.</p>
<steps>
<item>
- <p>Select the program where you want to add the new library in
- the <gui>project view</gui>, click on the right mouse button to
- make the <gui>project context menu</gui> appear, and select
- <gui>Add Library</gui>. Then click on the <gui>New Library</gui>
- button on this dialog.</p>
-
+ <p>Select a program in the <gui>project view</gui>, click on the right
+ mouse button to make the <gui>project context menu</gui> appear, and
+ select <gui>Add Library</gui>.</p>
<p>Or from the <gui>main menu</gui>, select <guiseq><gui>Project</gui>
- <gui>New Library...</gui></guiseq>.</p>
+ <gui>Add Library...</gui></guiseq>.</p>
+ </item>
+ <item>
+ <p>On the <gui>Add Library</gui> dialog, click on the
+ <gui>New Library</gui> button.</p>
</item>
<item>
<p>You will get a list of all the packaged libraries installed on your
system. You can check one or more libraries.</p>
<note style="tip">
- <p>If the library you want does not appear here, perhaps it
- is because it is not installed on your system.
- Launch the application you
- use to install new programs and search for the library name.
- The package you need often has a "dev" or "devel" suffix and
- should include header files and a <app>pkg-config</app> file with a
- <file>.pc</file> extension.</p>
+ <p>If the library you want does not appear here:</p>
+ <list>
+ <item>
+ <p>Perhaps it is not installed on your system.
+ Launch the application you
+ use to install new programs and search for the library name.
+ The package you need often has a "dev" or "devel" suffix and
+ should include header files and a <app>pkg-config</app> file with a
+ <file>.pc</file> extension.</p>
+ </item>
+ <item>
+ <p>It could be that the library is not packaged, it is often the
+ case for libraries not developped on Linux. See the chapter
+ <link xref="project-manager-library-add"/> explaining how to
+ use them.</p>
+ </item>
+ </list>
</note>
+ </item>
+ <item>
<p>After selecting one library, a module name will be
- automatically generated but you can change it. When you are
- done, click on the <gui>Add</gui> button to create the new module
- with the selected libraries.</p>
+ automatically generated but you can change it. You can select an already
+ existing module name to add a new library to it and to all targets
+ already using it.</p>
</item>
<item>
- <p>Read the <link xref="project-manager-module-add">next page</link> to
- find out how to add this new module to your target.</p>
+ <p> When you are
+ done, click on the <gui>Add</gui> button to create the new module
+ with the selected libraries. You need to add a new module to at least
+ one target to really use it.</p>
</item>
</steps>
diff --git a/manuals/anjuta-manual/Makefile.am b/manuals/anjuta-manual/Makefile.am
index 491a563..4e8a447 100644
--- a/manuals/anjuta-manual/Makefile.am
+++ b/manuals/anjuta-manual/Makefile.am
@@ -55,7 +55,6 @@ HELP_FILES = \
project-manager-module-add.page \
project-manager-module-new.page \
project-manager-module-remove.page \
- project-manager-package-add.page \
project-manager-package-remove.page \
project-manager.page \
project-manager-root.page \
diff --git a/plugins/project-manager/anjuta-project-manager.xml b/plugins/project-manager/anjuta-project-manager.xml
index 3267a0a..9a30b33 100644
--- a/plugins/project-manager/anjuta-project-manager.xml
+++ b/plugins/project-manager/anjuta-project-manager.xml
@@ -14,7 +14,6 @@
<separator name="separator2"/>
<menuitem name="NewTarget" action="ActionProjectNewTarget" />
<menuitem name="NewFolder" action="ActionProjectNewFolder" />
- <menuitem name="NewLibrary" action="ActionProjectNewLibrary" />
<separator name="separator1"/>
<menuitem name="Properties" action="ActionProjectProperties"/>
</menu>
@@ -29,7 +28,6 @@
<separator name="separator1"/>
<menuitem name="NewTarget" action="ActionPopupProjectNewTarget"/>
<menuitem name="NewFolder" action="ActionPopupProjectNewFolder"/>
- <menuitem name="NewLibrary" action="ActionPopupProjectNewLibrary"/>
<separator name="separator2"/>
<menuitem name="Remove" action="ActionPopupProjectRemove"/>
<separator name="separator3"/>
diff --git a/plugins/project-manager/plugin.c b/plugins/project-manager/plugin.c
index d497df0..476d300 100644
--- a/plugins/project-manager/plugin.c
+++ b/plugins/project-manager/plugin.c
@@ -493,23 +493,6 @@ on_new_group (GtkAction *action, ProjectManagerPlugin *plugin)
}
static void
-on_new_package (GtkAction *action, ProjectManagerPlugin *plugin)
-{
- GtkTreeIter selected_module;
- GList *new_module;
- GbfTreeData *data;
-
- update_operation_begin (plugin);
- data = gbf_project_view_get_first_selected (plugin->view, &selected_module);
-
- new_module = anjuta_pm_project_new_package (plugin,
- get_plugin_parent_window (plugin),
- data == NULL ? NULL : &selected_module, NULL);
- g_list_free (new_module);
- update_operation_end (plugin, TRUE);
-}
-
-static void
on_add_module (GtkAction *action, ProjectManagerPlugin *plugin)
{
GtkTreeIter selected_target;
@@ -591,22 +574,6 @@ on_popup_sort_shortcuts (GtkAction *action, ProjectManagerPlugin *plugin)
}
static void
-on_popup_new_package (GtkAction *action, ProjectManagerPlugin *plugin)
-{
- GtkTreeIter selected_module;
- GList *packages;
-
- update_operation_begin (plugin);
- gbf_project_view_get_first_selected (plugin->view, &selected_module);
-
- packages = anjuta_pm_project_new_package (plugin,
- get_plugin_parent_window (plugin),
- &selected_module, NULL);
- g_list_free (packages);
- update_operation_end (plugin, TRUE);
-}
-
-static void
on_popup_add_module (GtkAction *action, ProjectManagerPlugin *plugin)
{
GtkTreeIter selected_target;
@@ -955,11 +922,6 @@ static GtkActionEntry pm_actions[] =
G_CALLBACK (on_add_module)
},
{
- "ActionProjectNewLibrary", GTK_STOCK_ADD,
- N_("New _Libraryâ"), NULL, N_("Add a new package to the project"),
- G_CALLBACK (on_new_package)
- },
- {
"ActionProjectProperties", GTK_STOCK_PROPERTIES,
N_("_Properties"), NULL, N_("Project properties"),
G_CALLBACK (on_properties)
@@ -994,11 +956,6 @@ static GtkActionEntry popup_actions[] =
G_CALLBACK (on_popup_add_module)
},
{
- "ActionPopupProjectNewLibrary", GTK_STOCK_ADD,
- N_("New _Library"), NULL, N_("Add a new library to the project"),
- G_CALLBACK (on_popup_new_package)
- },
- {
"ActionPopupProjectAddToProject", GTK_STOCK_ADD,
N_("_Add to Project"), NULL, N_("Add a source file to a target"),
G_CALLBACK (on_popup_add_to_project)
@@ -1138,9 +1095,6 @@ on_treeview_selection_changed (GtkTreeSelection *sel,
"ActionPopupProjectAddLibrary");
g_object_set (G_OBJECT (action), "sensitive", INT_TO_GBOOLEAN (state & ANJUTA_PROJECT_CAN_ADD_MODULE), NULL);
action = anjuta_ui_get_action (ui, "ActionGroupProjectManagerPopup",
- "ActionPopupProjectNewLibrary");
- g_object_set (G_OBJECT (action), "sensitive", INT_TO_GBOOLEAN (state & ANJUTA_PROJECT_CAN_ADD_PACKAGE), NULL);
- action = anjuta_ui_get_action (ui, "ActionGroupProjectManagerPopup",
"ActionPopupProjectRemove");
g_object_set (G_OBJECT (action), "sensitive", INT_TO_GBOOLEAN (state & ANJUTA_PROJECT_CAN_REMOVE), NULL);
action = anjuta_ui_get_action (ui, "ActionGroupProjectManagerPopup",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]