Permalink
Browse files

Added nomenuitems attribute to install tag.

  • Loading branch information...
rcgordon committed May 18, 2006
1 parent 4681d2f commit d45b18a243b7f33cab965a862ff04497b1cc0e8c
Showing with 32 additions and 10 deletions.
  1. +1 −0 CHANGES
  2. +3 −0 README.xml
  3. +1 −1 carbon_ui.c
  4. +2 −2 console_ui.c
  5. +3 −3 dialog_ui.c
  6. +4 −3 gtk_ui.c
  7. +15 −1 install.c
  8. +3 −0 install.h
View
@@ -3,6 +3,7 @@ Ryan C. Gordon (???) - Thu May 18 03:37:58 PDT 2006
* EULAs can be optionally skipped when doing a reinstall.
* Reinstall can now be completely noninteractive, for automatic upgrades of
existing installations to newer versions.
+ * Added nomenuitems attribute to install tag.
Ryan C. Gordon (???) - Wed May 17 17:33:25 PDT 2006
* Fixed an incorrect gladefile reference (gtk+ warning on symlink checkbox).
Stephane Peter (Codehost) - Wed Mar 29 15:37:18 PST 2006
View
@@ -210,6 +210,9 @@ There are several optional attributes of the install element:
nopromptoverwrite If set to 'yes' existing files will be overwritten without
prompting the user. This was the default before setup 1.6.4
+ nomenuitems If set to 'yes', menu items for Gnome/KDE/etc will not be installed, and the
+ user will not be prompted about installing them.
+
appbundleid (CARBON ONLY) This string means that you are installing new files into an existing
Application Bundle. If the bundle isn't found, the installation aborts, otherwise, all
files are added relative to the base of the app bundle. The string specified here is
View
@@ -484,7 +484,7 @@ static void OnCommandContinue()
}
// Install desktop menu items
- if(!GetProductHasNoBinaries(cur_info))
+ if((!GetProductHasNoBinaries(cur_info)) && (GetProductInstallMenuItems(cur_info)))
cur_info->options.install_menuitems = 1;
carbon_ShowInstallScreen(MyRes, OPTION_PAGE);
View
@@ -379,7 +379,7 @@ static install_state console_setup(install_info *info)
if ( express_setup ) {
/* Install desktop menu items */
- if ( !GetProductHasNoBinaries(info) ) {
+ if((!GetProductHasNoBinaries(info)) && (GetProductInstallMenuItems(info))) {
info->options.install_menuitems = 1;
}
return SETUP_INSTALL;
@@ -565,7 +565,7 @@ static install_state console_setup(install_info *info)
}
/* Ask for desktop menu items */
- if ( !GetProductHasNoBinaries(info) &&
+ if ( !GetProductHasNoBinaries(info) && (GetProductInstallMenuItems(info)) &&
console_prompt(_("Do you want to install startup menu entries?"),
RESPONSE_YES) == RESPONSE_YES ) {
info->options.install_menuitems = 1;
View
@@ -2,7 +2,7 @@
* "dialog"-based UI frontend for setup.
* Dialog was turned into a library, shell commands are not called.
*
- * $Id: dialog_ui.c,v 1.35 2006-03-29 23:38:28 megastep Exp $
+ * $Id: dialog_ui.c,v 1.36 2006-05-18 19:49:45 icculus Exp $
*/
#include <limits.h>
@@ -536,7 +536,7 @@ install_state dialog_setup(install_info *info)
clear_the_screen();
/* Ask for desktop menu items */
- if ( !GetProductHasNoBinaries(info) &&
+ if ( !GetProductHasNoBinaries(info) && (GetProductInstallMenuItems(info)) &&
dialog_prompt(_("Do you want to install startup menu entries?"),
RESPONSE_YES) == RESPONSE_YES ) {
info->options.install_menuitems = 1;
@@ -547,7 +547,7 @@ install_state dialog_setup(install_info *info)
}
} else { /* Express setup */
/* Install desktop menu items */
- if ( !GetProductHasNoBinaries(info)) {
+ if((!GetProductHasNoBinaries(info)) && (GetProductInstallMenuItems(info))) {
info->options.install_menuitems = 1;
}
}
View
@@ -1,5 +1,5 @@
/* GTK-based UI
- $Id: gtk_ui.c,v 1.123 2006-05-18 12:25:06 icculus Exp $
+ $Id: gtk_ui.c,v 1.124 2006-05-18 19:49:46 icculus Exp $
*/
/* Modifications by Borland/Inprise Corp.
@@ -405,7 +405,7 @@ void on_class_continue_clicked( GtkWidget *w, gpointer data )
}
}
/* Install desktop menu items */
- if ( !GetProductHasNoBinaries(cur_info)) {
+ if((!GetProductHasNoBinaries(cur_info)) && (GetProductInstallMenuItems(cur_info))) {
cur_info->options.install_menuitems = 1;
}
widget = glade_xml_get_widget(setup_glade, "setup_notebook");
@@ -1370,10 +1370,11 @@ static void init_menuitems_option(install_info *info)
widget = glade_xml_get_widget(setup_glade, "setup_menuitems_checkbox");
if ( widget ) {
- if ( ! GetProductHasNoBinaries(info) ) {
+ if ( ( ! GetProductHasNoBinaries(info) ) && ( GetProductInstallMenuItems(info) ) ) {
setup_checkbox_menuitems_slot(widget, NULL);
} else {
gtk_widget_hide(widget);
+ info->options.install_menuitems = 0;
}
} else {
log_warning(_("Unable to locate 'setup_menuitems_checkbox'"));
View
@@ -1,4 +1,4 @@
-/* $Id: install.c,v 1.175 2006-05-18 12:25:06 icculus Exp $ */
+/* $Id: install.c,v 1.176 2006-05-18 19:49:46 icculus Exp $ */
/* Modifications by Borland/Inprise Corp.:
04/10/2000: Added code to expand ~ in a default path immediately after
@@ -380,6 +380,20 @@ int GetProductReinstallFast(install_info *info)
return ret;
}
+int GetProductInstallMenuItems(install_info *info)
+{
+ int ret = 1; /* yes */
+ char *str = (char *)xmlGetProp(XML_ROOT(info->config), BAD_CAST "nomenuitems");
+ if ( str && (!strcasecmp(str, "yes") || !strcasecmp(str, "true"))) {
+ ret = 0; /* no */
+ }
+ if (str) {
+ xmlFree(str);
+ }
+ return ret;
+}
+
+
/* returns true if any deviant paths are not writable. If path_ret is non-NULL
* it must point to a buffer of at least PATH_MAX characters. The first not
* writeable path is stored there if return value is true
View
@@ -276,6 +276,9 @@ extern int GetProductPromptOverwrite(install_info *info);
/** whether the product should reinstall with _zero_ user interaction. */
int GetProductReinstallFast(install_info *info);
+/** whether the product should not installe Gnome/KDE/etc menu items */
+int GetProductInstallMenuItems(install_info *info);
+
/** check if product can be installed. Returns NULL if product can be
* installed, otherwise reason why not. */
extern const char *IsReadyToInstall(install_info *info);

0 comments on commit d45b18a

Please sign in to comment.