Desensitize component select (populate_application_list): Desensitize
2002-01-25 Bradford Hovinen <hovinen@ximian.com> * mime-category-edit-dialog.c (fill_dialog): Desensitize component select (populate_application_list): Desensitize application select if there are no applications (fill_dialog): Flip logic on category defaults toggle sensitivity * service-edit-dialog.c (populate_app_list): Desensitize program select if there are no programs (fill_dialog): Use service_info_get_description for description entry
This commit is contained in:
parent
e9c8acc492
commit
fbdb86b151
4 changed files with 23 additions and 3 deletions
|
@ -1,5 +1,16 @@
|
|||
2002-01-25 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* mime-category-edit-dialog.c (fill_dialog): Desensitize component
|
||||
select
|
||||
(populate_application_list): Desensitize application select if
|
||||
there are no applications
|
||||
(fill_dialog): Flip logic on category defaults toggle sensitivity
|
||||
|
||||
* service-edit-dialog.c (populate_app_list): Desensitize program
|
||||
select if there are no programs
|
||||
(fill_dialog): Use service_info_get_description for description
|
||||
entry
|
||||
|
||||
* mime-edit-dialog.c (store_data): Construct an iterator if the
|
||||
one given is NULL
|
||||
(store_data): Don't notify row deletion if the object was not in
|
||||
|
|
|
@ -8,3 +8,5 @@
|
|||
- Implement setting of default action for a whole category
|
||||
- Implement retrieving the current default action for a whole category
|
||||
- Implement remove for Internet services
|
||||
- Implement add service
|
||||
- Refactor: Don't pass iter to add/edit dialogs, just pass structure. Generate iter on the fly
|
|
@ -297,9 +297,11 @@ fill_dialog (MimeCategoryEditDialog *dialog)
|
|||
|
||||
populate_application_list (dialog);
|
||||
|
||||
if (dialog->p->info->entry.parent->type != MODEL_ENTRY_NONE)
|
||||
if (dialog->p->info->entry.parent->type == MODEL_ENTRY_NONE)
|
||||
gtk_widget_set_sensitive (WID ("use_category_defaults_toggle"), FALSE);
|
||||
|
||||
gtk_widget_set_sensitive (WID ("component_box"), FALSE);
|
||||
|
||||
gtk_widget_show_all (dialog->p->dialog_win);
|
||||
}
|
||||
|
||||
|
@ -336,6 +338,9 @@ populate_application_list (MimeCategoryEditDialog *dialog)
|
|||
gtk_widget_show (menu_item);
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
gtk_widget_set_sensitive (WID ("default_action_box"), FALSE);
|
||||
|
||||
gtk_menu_append (menu, gtk_menu_item_new_with_label (_("Custom")));
|
||||
|
||||
if (found_idx < 0) {
|
||||
|
|
|
@ -276,8 +276,7 @@ fill_dialog (ServiceEditDialog *dialog)
|
|||
{
|
||||
service_info_load_all (dialog->p->info);
|
||||
|
||||
if (dialog->p->info->description != NULL)
|
||||
gtk_entry_set_text (GTK_ENTRY (WID ("description_entry")), dialog->p->info->description);
|
||||
gtk_entry_set_text (GTK_ENTRY (WID ("description_entry")), service_info_get_description (dialog->p->info));
|
||||
|
||||
if (dialog->p->info->protocol != NULL) {
|
||||
if (strcmp (dialog->p->info->protocol, "unknown"))
|
||||
|
@ -314,6 +313,9 @@ populate_app_list (ServiceEditDialog *dialog)
|
|||
menu = GTK_MENU (gtk_menu_new ());
|
||||
service_apps = get_apps_for_service_type (dialog->p->info->protocol);
|
||||
|
||||
if (service_apps == NULL)
|
||||
gtk_widget_set_sensitive (WID ("program_select"), FALSE);
|
||||
|
||||
while (service_apps != NULL) {
|
||||
app = service_apps->data;
|
||||
item = gtk_menu_item_new_with_label (app->name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue