No more warnings.

1999-03-15  Jonathan Blandford  <jrb@redhat.com>

	* capplets/mime-type/: No more warnings.
This commit is contained in:
Jonathan Blandford 1999-03-15 19:31:13 +00:00 committed by Jonathan Blandford
parent 0ab962a483
commit 61871c426e
7 changed files with 33 additions and 24 deletions

View file

@ -1,5 +1,7 @@
1999-03-15 Jonathan Blandford <jrb@redhat.com>
* capplets/mime-type/: No more warnings.
* capplets/mime-type/mime-info.c (write_initial_keys): Now we
explicitly remove then recreate the file, so that we can guarantee
that the mime-type gets reread.

View file

@ -1,4 +1,6 @@
#include "edit-window.h"
#include "mime-data.h"
#include "mime-info.h"
#include "capplet-widget.h"
@ -37,7 +39,7 @@ entry_changed (GtkWidget *widget, gpointer data)
static void
apply_entry_change (GtkWidget *entry, gchar *key, MimeInfo *mi)
{
gchar *buf;
const gchar *buf;
gchar *text;
/* buf is the value that existed before when we
* started the capplet */
@ -198,7 +200,7 @@ initialize_main_win ()
static void
setup_entry (gchar *key, GtkWidget *g_entry, MimeInfo *mi)
{
gchar *buf;
const gchar *buf;
GtkWidget *entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (g_entry));
buf = local_mime_get_value (mi->mime_type, key);
if (buf == NULL)
@ -209,7 +211,7 @@ setup_entry (gchar *key, GtkWidget *g_entry, MimeInfo *mi)
gtk_entry_set_text (GTK_ENTRY (entry), "");
}
void
initialize_main_win_vals ()
initialize_main_win_vals (void)
{
MimeInfo *mi = main_win->mi;
gchar *title;
@ -283,13 +285,13 @@ launch_edit_window (MimeInfo *mi)
}
void
hide_edit_window ()
hide_edit_window (void)
{
if (main_win && main_win->mi && main_win->window)
gtk_widget_hide (main_win->window);
}
void
show_edit_window ()
show_edit_window (void)
{
if (main_win && main_win->mi && main_win->window)
gtk_widget_show (main_win->window);

View file

@ -2,14 +2,15 @@
/* Copyright (C) 1998 Redhat Software Inc.
* Authors: Jonathan Blandford <jrb@redhat.com>
*/
#include "mime-data.h"
#ifndef _EDIT_WINDOW_H_
#define _EDIT_WINDOW_H_
#include "mime-data.h"
void launch_edit_window (MimeInfo *mi);
void initialize_main_win_vals ();
void hide_edit_window ();
void show_edit_window ();
void edit_clicked ();
void initialize_main_win_vals (void);
void hide_edit_window (void);
void show_edit_window (void);
void edit_clicked (void);
#endif

View file

@ -10,6 +10,7 @@
#include <dirent.h>
#include <regex.h>
#include <ctype.h>
#include "edit-window.h"
#include "mime-data.h"
#include "mime-info.h"
/* Prototypes */
@ -274,17 +275,19 @@ void
edit_clicked ()
{
MimeInfo *mi;
gint row;
gint row = 0;
if (GTK_CLIST (clist)->selection)
row = GINT_TO_POINTER ((GTK_CLIST (clist)->selection)->data);
row = GPOINTER_TO_INT ((GTK_CLIST (clist)->selection)->data);
else
return;
mi = (MimeInfo *) gtk_clist_get_row_data (GTK_CLIST (clist), row);
if (mi)
launch_edit_window (mi);
}
GtkWidget *
get_mime_clist ()
get_mime_clist (void)
{
GtkWidget *retval;
gchar *titles[2];
@ -310,7 +313,7 @@ get_mime_clist ()
return retval;
}
void
init_mime_type ()
init_mime_type (void)
{
char *mime_info_dir;

View file

@ -17,8 +17,8 @@ typedef struct {
GList *keys;
} MimeInfo;
GtkWidget *get_mime_clist ();
void init_mime_type ();
GtkWidget *get_mime_clist (void);
void init_mime_type (void);
#endif

View file

@ -10,6 +10,7 @@
#include <dirent.h>
#include <regex.h>
#include <ctype.h>
#include "mime-info.h"
#include "mime-data.h"
#include <errno.h>
#include <sys/stat.h>
@ -312,7 +313,7 @@ set_mime_key_value (gchar *mime_type, gchar *key, gchar *value)
}
void
init_mime_info ()
init_mime_info (void)
{
gchar *filename;
@ -448,17 +449,17 @@ write_keys (GHashTable *spec_hash, GHashTable *generic_hash)
fclose (file);
}
void
write_initial_keys ()
write_initial_keys (void)
{
write_keys (initial_generic_types, initial_specific_types);
}
void
write_user_keys ()
write_user_keys (void)
{
write_keys (generic_types, specific_types);
}
void
discard_mime_info ()
discard_mime_info (void)
{
gchar *filename;

View file

@ -7,11 +7,11 @@
#include "gnome.h"
#include <regex.h>
/* Typedefs */
void init_mime_info ();
void discard_mime_info ();
void init_mime_info (void);
void discard_mime_info (void);
void set_mime_key_value (gchar *mime_type, gchar *key, gchar *value);
const char * local_mime_get_value (const char *mime_type, char *key);
void write_user_keys ();
void write_initial_keys ();
void write_user_keys (void);
void write_initial_keys (void);
#endif