? .cvsignore
? browser
? media-popup.patch
? media.interpolateUrl.patch
? images/icons/tango
? images/icons/tango-icon-theme-0.8.90.tar.gz
? test/media.filter.test
? test/media.testlib.inc
Index: media.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/media.admin.inc,v
retrieving revision 1.29
diff -u -r1.29 media.admin.inc
--- media.admin.inc	16 Feb 2011 14:18:01 -0000	1.29
+++ media.admin.inc	16 Feb 2011 16:22:14 -0000
@@ -567,3 +567,32 @@
     drupal_set_message(theme('item_list', array('items' => $results['success'])));
   }
 }
+
+/**
+ * Admin configruation form for media browser settings.
+ */
+function media_admin_config_browser($form, &$form_state) {
+  $theme_options = array();
+  foreach (list_themes() as $key => $theme) {
+    if ($theme->status) {
+      $theme_options[] = $key;
+    }
+  }
+
+  $form[media_variable_name('dialog_theme')] = array(
+    '#type' => 'select',
+    '#title' => t('Media browser theme'),
+    '#options' => $theme_options,
+    '#description' => t("This theme will be used for all media related dialogs.  It can be different from your site's theme because the many site themes do not work well in the small windows which media uses."),
+    '#default_value' => media_variable_get('dialog_theme'),
+  );
+
+  $form[media_variable_name('file_extensions')] = array(
+    '#type' => 'textfield',
+    '#title' => 'Allowed file extensions',
+    '#default_value' => media_variable_get('file_extensions'),
+    '#description' => t('File extensions which are accepted in the media browser.  Use spaces to separate (e.g. "jpg gif pdf doc"). <br/><em>Note that this can be overriden on a per-field basis when creating multimedia asset fields and files of certain extensions cannot be embedded at this time.</em>'),
+  );
+
+  return system_settings_form($form);
+}
\ No newline at end of file
Index: media.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/media.install,v
retrieving revision 1.18
diff -u -r1.18 media.install
--- media.install	13 Jan 2011 18:52:41 -0000	1.18
+++ media.install	16 Feb 2011 16:22:14 -0000
@@ -488,3 +488,14 @@
     filter_format_save($format);
   }
 }
+
+/**
+ * Renames the badly named variable for the theme used for the media browser
+ * and other media related dialogs.
+ */
+function media_update_7014() {
+  if ($old_value = variable_get('media__dialog_get_theme_name')) {
+    variable_del('media__dialog_get_theme_name');
+    variable_set('media__dialog_theme', $old_value);
+  }
+}
\ No newline at end of file
Index: media.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/media.module,v
retrieving revision 1.71
diff -u -r1.71 media.module
--- media.module	16 Feb 2011 14:18:01 -0000	1.71
+++ media.module	16 Feb 2011 16:22:14 -0000
@@ -59,6 +59,15 @@
  */
 function media_menu() {
   // For managing different types of media and the fields associated with them.
+  $items['admin/config/media/browser'] = array(
+    'title' => 'Media browser settings',
+    'description' => 'Configure the behavior and display of the media browser.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('media_admin_config_browser'),
+    'access arguments' => array('administer media'),
+    'file' => 'media.admin.inc',
+  );
+  // For managing different types of media and the fields associated with them.
   $items['admin/config/media/types'] = array(
     'title' => 'Media Types',
     'description' => 'Manage files used on your site.',
@@ -788,7 +797,7 @@
  */
 function media_dialog_get_theme_name() {
   // Set to empty to get the default theme.
-  return media_variable_get('dialog_get_theme_name');
+  return media_variable_get('dialog_theme');
 }
 
 /**
Index: includes/media.variables.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/includes/media.variables.inc,v
retrieving revision 1.13
diff -u -r1.13 media.variables.inc
--- includes/media.variables.inc	13 Jan 2011 00:27:06 -0000	1.13
+++ includes/media.variables.inc	16 Feb 2011 16:22:14 -0000
@@ -128,7 +128,7 @@
       'field_remove_media_text' => 'Remove media',
 
       // Name of the theme to use in media popup dialogs
-      'dialog_get_theme_name' => 'seven',
+      'dialog_theme' => 'seven',
       // @TODO: Make a configuration form with this.
       'file_extensions' => 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp mp3 mov m4v mp4 mpeg avi ogg wmv ico',
       'max_filesize' => '',
