gnome-control-center/capplets/file-types/service-info.h
Bradford Hovinen e32444ef56 Call get_service_info to handle case where the service was created and not
2002-01-27  Bradford Hovinen  <hovinen@ximian.com>

	* service-edit-dialog.c (validate_data): Call get_service_info to
	handle case where the service was created and not yet committed

	* mime-type-info.c (get_mime_type_info, get_mime_type_info_int):
	Implement

	* mime-edit-dialog.c (validate_data): Check if the MIME type is
	already known and we are adding a new type

	* service-edit-dialog.c (service_edit_dialog_init): Change dialog
	title

	* file-types-capplet.c (edit_count_cb): Rename from count_cb
	(selection_changed_cb): Initialize count
	(selection_changed_cb): Iterate on remove_count_cb and use that to
	set the sensitivity of the remove button
	(create_dialog): Desensitize the remove button
2002-01-27 16:58:43 +00:00

69 lines
2.2 KiB
C

/* -*- mode: c; style: linux -*- */
/* service-info.h
*
* Copyright (C) 2002 Ximian, Inc.
*
* Written by Bradford Hovinen <hovinen@ximian.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __SERVICE_INFO_H
#define __SERVICE_INFO_H
#include <gnome.h>
#include <bonobo.h>
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
#include "model-entry.h"
G_BEGIN_DECLS
#define SERVICE_INFO(obj) ((ServiceInfo *) obj)
typedef struct _ServiceInfo ServiceInfo;
struct _ServiceInfo {
ModelEntry entry;
gchar *protocol;
gchar *description;
gboolean run_program;
GnomeVFSMimeApplication *app;
gchar *custom_line;
gboolean need_terminal;
};
void load_all_services (GtkTreeModel *model);
ServiceInfo *service_info_new (const gchar *protocol,
GtkTreeModel *model);
void service_info_load_all (ServiceInfo *info);
const gchar *service_info_get_description (ServiceInfo *info);
void service_info_save (const ServiceInfo *info);
void service_info_delete (const ServiceInfo *info);
void service_info_free (ServiceInfo *info);
const GList *get_apps_for_service_type (gchar *protocol);
ModelEntry *get_services_category_entry (GtkTreeModel *model);
ServiceInfo *get_service_info (const gchar *protocol);
G_END_DECLS
#endif /* __SERVICE_INFO_H */