Lots of prototypes added, warnings removed -miguel
Этот коммит содержится в:
родитель
0f31fb67d0
Коммит
3b2ad8a238
@ -110,7 +110,6 @@ gtk_clip_label_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
GtkClipLabel *label;
|
||||
GSList *row;
|
||||
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (GTK_IS_CLIP_LABEL (widget));
|
||||
|
@ -13,16 +13,17 @@
|
||||
#include "panel.h"
|
||||
#include "gscreen.h"
|
||||
#include "main.h"
|
||||
#include "gmain.h"
|
||||
#include "cmd.h"
|
||||
#include "boxes.h"
|
||||
#include "panelize.h"
|
||||
#include "gcmd.h"
|
||||
#include "dialog.h"
|
||||
#include "layout.h"
|
||||
|
||||
void
|
||||
gnome_listing_cmd (GtkWidget *widget, WPanel *panel)
|
||||
{
|
||||
GtkAllocation *alloc = >K_WIDGET (panel->list)->allocation;
|
||||
int view_type, use_msformat;
|
||||
char *user, *status;
|
||||
|
||||
|
@ -36,3 +36,4 @@
|
||||
#define frontend_run_dlg(x) gtkrundlg_event (x)
|
||||
|
||||
void port_shutdown_extra_fds(void);
|
||||
void x_flush_events (void);
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "gpageprop.h"
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gdk/gdkprivate.h>
|
||||
#include "gcache.h"
|
||||
#include "gmain.h"
|
||||
|
||||
/* places used in the grid */
|
||||
static char *spot_array;
|
||||
@ -659,10 +661,7 @@ desktop_icon_drag_request (GtkWidget *widget, GdkEventDragRequest *event, deskto
|
||||
set_spot_val (di->grid_x, di->grid_y, 0);
|
||||
|
||||
if (icons_snap_to_grid){
|
||||
int px, py;
|
||||
|
||||
snap_to (di, 0, drop_x, drop_y);
|
||||
|
||||
get_icon_screen_x_y (di, &drop_x, &drop_y);
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,9 @@ GtkWidget *make_transparent_window (char *file);
|
||||
void drop_on_directory (GdkEventDropDataAvailable *event, char *dest, int force_manually);
|
||||
void gnome_arrange_icons (void);
|
||||
void artificial_drag_start (GdkWindow *source_window, int x, int y);
|
||||
void start_desktop (void);
|
||||
void stop_desktop (void);
|
||||
|
||||
extern int icons_snap_to_grid;
|
||||
|
||||
#endif
|
||||
|
@ -8,5 +8,4 @@
|
||||
void
|
||||
x_interactive_display ()
|
||||
{
|
||||
printf ("show help\n");
|
||||
}
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "gcmd.h"
|
||||
#include "gcliplabel.h"
|
||||
#include "gdesktop.h"
|
||||
#include "setup.h"
|
||||
#include "../vfs/vfs.h"
|
||||
|
||||
#define UNDEFINED_INDEX -1
|
||||
|
||||
@ -364,7 +366,7 @@ gnome_toggle_snap (void)
|
||||
}
|
||||
|
||||
void
|
||||
gnome_init_panels ()
|
||||
gnome_init_panels (void)
|
||||
{
|
||||
current_panel_ptr = NULL;
|
||||
other_panel_ptr = NULL;
|
||||
@ -394,7 +396,6 @@ create_container (Dlg_head *h, char *name)
|
||||
PanelContainer *container = g_new (PanelContainer, 1);
|
||||
WPanel *panel;
|
||||
GtkWidget *app, *vbox;
|
||||
int slot;
|
||||
|
||||
container->splitted = 0;
|
||||
app = gnome_app_new ("gmc", name);
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "gscreen.h"
|
||||
#include "tty.h" /* for KEY_BACKSPACE */
|
||||
#include "command.h"
|
||||
#include "cmd.h"
|
||||
#include "gdesktop.h"
|
||||
|
||||
GdkColorContext *mc_cc;
|
||||
|
||||
|
@ -26,6 +26,12 @@ void x_filter_changed (WPanel *panel);
|
||||
void x_list_insert (WListbox *l, WLEntry *p, WLEntry *e);
|
||||
void x_redefine_label (WButtonBar *bb, int idx);
|
||||
void x_add_widget (Dlg_head *h, Widget_Item *w);
|
||||
int translate_gdk_keysym_to_curses (GdkEventKey *event);
|
||||
void gnome_init_panels ();
|
||||
void set_current_panel (int index);
|
||||
void bind_gtk_keys (GtkWidget *w, Dlg_head *h);
|
||||
void new_panel_at (char *dir);
|
||||
void layout_panel_gone (WPanel *panel);
|
||||
|
||||
struct gmc_color_pairs_s {
|
||||
GdkColor *fore, *back;
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "gdesktop.h"
|
||||
#include "gpageprop.h"
|
||||
#include "gcliplabel.h"
|
||||
#include "../vfs/vfs.h"
|
||||
#include <gdk/gdkprivate.h>
|
||||
|
||||
/* The pixmaps */
|
||||
|
@ -1,14 +1,6 @@
|
||||
#ifndef __GSCREEN_H
|
||||
#define __GSCREEN_H
|
||||
|
||||
void x_panel_set_size (int index);
|
||||
void x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel);
|
||||
void x_adjust_top_file (WPanel *panel);
|
||||
void x_filter_changed (WPanel *panel);
|
||||
void x_add_sort_label (WPanel *panel, int index, char *text, char *tag, void *sr);
|
||||
void x_sort_label_start (WPanel *panel);
|
||||
void x_reset_sort_labels (WPanel *panel);
|
||||
|
||||
void panel_action_view_unfiltered (GtkWidget *widget, WPanel *panel);
|
||||
void panel_action_view (GtkWidget *widget, WPanel *panel);
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "util.h"
|
||||
#include <gnome.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <string.h>
|
||||
#include "gconf.h"
|
||||
#include "myslang.h"
|
||||
#include "dlg.h"
|
||||
@ -18,7 +19,6 @@
|
||||
#include "dialog.h"
|
||||
#include "color.h"
|
||||
#include "gmain.h"
|
||||
|
||||
Dlg_head *last_query_dlg;
|
||||
static int sel_pos;
|
||||
|
||||
@ -50,7 +50,7 @@ int query_dialog (char *header, char *text, int flags, int count, ...)
|
||||
h = create_dlg (0, 0, 0, 0, dialog_colors, default_dlg_callback, "[QueryBox]", "query",
|
||||
DLG_NO_TED | DLG_NO_TOPLEVEL);
|
||||
dialog = GTK_DIALOG (gtk_dialog_new ());
|
||||
x_dlg_set_window (h, dialog);
|
||||
x_dlg_set_window (h, GTK_WIDGET (dialog));
|
||||
gtk_window_set_policy (GTK_WINDOW (dialog), 0, 0, 0);
|
||||
|
||||
x_set_dialog_title (h, header);
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include <gnome.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <gdk/gdkprivate.h>
|
||||
#include "util.h"
|
||||
|
||||
int my_system_get_child_pid (int as_shell_command, const char *shell, const char *command, pid_t *pid)
|
||||
{
|
||||
|
@ -262,12 +262,6 @@ gnome_toggle_wrap (GtkWidget *widget, WView *view)
|
||||
toggle_wrap_mode (view);
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_toggle_parse (GtkWidget *widget, WView *view)
|
||||
{
|
||||
change_viewer (view);
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_toggle_format (GtkWidget *widget, WView *view)
|
||||
{
|
||||
|
@ -236,7 +236,6 @@ int
|
||||
x_create_check (Dlg_head *h, widget_data parent, WCheck *c)
|
||||
{
|
||||
GtkWidget *w;
|
||||
int i;
|
||||
|
||||
w = gtk_check_button_new_with_label (c->text);
|
||||
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (w), (c->state & C_BOOL));
|
||||
@ -394,9 +393,9 @@ listbox_select (GtkWidget *widget, int row, int column, GdkEvent *event, WListbo
|
||||
}
|
||||
|
||||
/* Send an artificial DLG_POST_KEY */
|
||||
if (event->type = GDK_BUTTON_PRESS){
|
||||
if (event->type == GDK_BUTTON_PRESS)
|
||||
(*l->widget.parent->callback)(l->widget.parent, 0, DLG_POST_KEY);
|
||||
}
|
||||
|
||||
inside = 0;
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,4 @@
|
||||
#ifndef __GWIDGET_H
|
||||
#define __GWIDGET_H
|
||||
|
||||
void x_button_set (WButton *b, char *text);
|
||||
int x_create_button (Dlg_head *h, widget_data parent, WButton *b);
|
||||
void x_listbox_select_nth (WListbox *l, int nth);
|
||||
void x_listbox_delete_nth (WListbox *l, int nth);
|
||||
void x_label_set_text (WLabel *label, char *text);
|
||||
int x_create_gauge (Dlg_head *h, widget_data parent, WGauge *g);
|
||||
void x_gauge_show (WGauge *g);
|
||||
void x_gauge_set_value (WGauge *g, int max, int current);
|
||||
|
||||
#endif /* __GWIDGET_H */
|
||||
|
490
po/mc.pot
490
po/mc.pot
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1174,7 +1174,7 @@ char *get_random_hint (void)
|
||||
return strdup ("");
|
||||
last = now;
|
||||
#else
|
||||
static last_sec;
|
||||
static int last_sec;
|
||||
static struct timeval tv;
|
||||
|
||||
gettimeofday (&tv, NULL);
|
||||
@ -1480,7 +1480,7 @@ listing_cmd (void)
|
||||
int view_type, use_msformat;
|
||||
char *user, *status;
|
||||
WPanel *p;
|
||||
int display_type, err;
|
||||
int display_type;
|
||||
|
||||
display_type = get_display_type (MENU_PANEL_IDX);
|
||||
if (display_type == view_listing)
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <ctype.h>
|
||||
#include "tty.h"
|
||||
#include <stdarg.h>
|
||||
#include "mad.h"
|
||||
|
10
src/dlg.h
10
src/dlg.h
@ -298,11 +298,13 @@ void update_cursor (Dlg_head *h);
|
||||
|
||||
#ifdef HAVE_X
|
||||
extern Dlg_head *midnight_dlg;
|
||||
void x_focus_widget (Widget_Item *p);
|
||||
void x_unfocus_widget (Widget_Item *p);
|
||||
void x_init_dlg (Dlg_head *h);
|
||||
void x_destroy_dlg (Dlg_head *h);
|
||||
void x_focus_widget (Widget_Item *p);
|
||||
void x_unfocus_widget (Widget_Item *p);
|
||||
void x_init_dlg (Dlg_head *h);
|
||||
void x_destroy_dlg (Dlg_head *h);
|
||||
void x_destroy_dlg_start (Dlg_head *h);
|
||||
void x_set_idle (Dlg_head *h, int enable_idle);
|
||||
void x_dialog_stop (Dlg_head *h);
|
||||
#else
|
||||
# define x_focus_widget(x) {}
|
||||
# define x_unfocus_widget(x) {}
|
||||
|
@ -137,12 +137,6 @@ extern const int status_using_ncurses;
|
||||
void clr_scr (void);
|
||||
void restore_console (void);
|
||||
|
||||
/* int do_panel_cd (WPanel *panel, char *new_dir); */
|
||||
/* FIXME: this declaration is *needed*, but forces every file that
|
||||
includes main.h to include panel.h first! Really, main.c shouldn't
|
||||
be a repository for all the little auxiliary functions that are used
|
||||
elsewhere. do_panel_cd should be moved to util.c or somewhere. */
|
||||
|
||||
enum cd_enum {
|
||||
cd_parse_command,
|
||||
cd_exact
|
||||
|
14
src/panel.h
14
src/panel.h
@ -176,9 +176,17 @@ void paint_dir (WPanel *panel);
|
||||
void show_dir (WPanel *panel);
|
||||
|
||||
/* NOTE: Have to be ifdefed for HAVE_X */
|
||||
void x_fill_panel (WPanel *panel);
|
||||
|
||||
void change_view (WPanel *panel, int view_type);
|
||||
void x_panel_set_size (int index);
|
||||
void x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel);
|
||||
void x_fill_panel (WPanel *panel);
|
||||
void x_adjust_top_file (WPanel *panel);
|
||||
void x_filter_changed (WPanel *panel);
|
||||
void x_add_sort_label (WPanel *panel, int index, char *text, char *tag, void *sr);
|
||||
void x_sort_label_start (WPanel *panel);
|
||||
void x_reset_sort_labels (WPanel *panel);
|
||||
void x_panel_destroy (WPanel *panel);
|
||||
void change_view (WPanel *panel, int view_type);
|
||||
void x_panel_update_marks (WPanel *panel);
|
||||
|
||||
extern void paint_info_panel (WPanel *);
|
||||
extern void paint_quick_view_panel (WPanel *);
|
||||
|
@ -6,8 +6,13 @@ void save_configure (void);
|
||||
void load_setup (void);
|
||||
void save_setup (void);
|
||||
void done_setup (void);
|
||||
#ifdef WANT_WIDGETS
|
||||
void panel_save_setup (WPanel *panel, char *section);
|
||||
void panel_load_setup (WPanel *panel, char *section);
|
||||
#else
|
||||
void panel_save_setup ();
|
||||
void panel_load_setup ();
|
||||
#endif
|
||||
void load_key_defs (void);
|
||||
void save_panel_types (void);
|
||||
char *load_anon_passwd ();
|
||||
|
@ -130,6 +130,8 @@ void normal_search_cmd (WView *);
|
||||
void continue_search (WView *);
|
||||
void change_nroff (WView *view);
|
||||
void set_monitor (WView *view, int set_on);
|
||||
void view_move_forward (WView *view, int i);
|
||||
void view_move_backward (WView *view, int i);
|
||||
#endif
|
||||
|
||||
/* Command: view a file, if _command != NULL we use popen on _command */
|
||||
@ -171,8 +173,6 @@ void view_add_string (WView *view, char *s);
|
||||
void view_gotoyx (WView *view, int r, int c);
|
||||
void view_set_color (WView *view, int font);
|
||||
void view_display_clean (WView *view, int h, int w);
|
||||
void view_move_backward (WView *view, int i);
|
||||
void view_move_forward (WView *view, int i);
|
||||
|
||||
void x_destroy_view (WView *);
|
||||
void x_create_viewer (WView *);
|
||||
|
12
src/widget.h
12
src/widget.h
@ -219,15 +219,27 @@ void buttonbar_hint (WButtonBar *bb, char *s);
|
||||
|
||||
#ifdef HAVE_X
|
||||
int x_create_radio (Dlg_head *h, widget_data parent, WRadio *r);
|
||||
int x_create_button (Dlg_head *h, widget_data parent, WButton *b);
|
||||
int x_create_check (Dlg_head *h, widget_data parent, WCheck *c);
|
||||
int x_create_label (Dlg_head *h, widget_data parent, WLabel *l);
|
||||
int x_create_input (Dlg_head *h, widget_data parent, WInput *in);
|
||||
int x_create_listbox (Dlg_head *h, widget_data parent, WListbox *l);
|
||||
int x_create_buttonbar (Dlg_head *h, widget_data parent, WButtonBar *bb);
|
||||
|
||||
void x_button_set (WButton *b, char *text);
|
||||
void x_label_set_text (WLabel *label, char *text);
|
||||
void x_listbox_select_nth (WListbox *l, int nth);
|
||||
void x_listbox_delete_nth (WListbox *l, int nth);
|
||||
void x_label_set_text (WLabel *label, char *text);
|
||||
int x_create_gauge (Dlg_head *h, widget_data parent, WGauge *g);
|
||||
void x_gauge_show (WGauge *g);
|
||||
void x_gauge_set_value (WGauge *g, int max, int current);
|
||||
void x_radio_toggle (WRadio *);
|
||||
void x_radio_focus_item (WRadio *radio);
|
||||
void x_listbox_select_nth (WListbox *, int);
|
||||
void x_list_insert (WListbox *, WLEntry *, WLEntry *);
|
||||
void x_redefine_label (WButtonBar *, int);
|
||||
void x_update_input (WInput *in);
|
||||
#endif
|
||||
|
||||
#endif /* __WIDGET_H */
|
||||
|
@ -44,7 +44,10 @@
|
||||
#include "vfs.h"
|
||||
#include "extfs.h"
|
||||
|
||||
static struct extfs_archive *first_archive = NULL;
|
||||
static struct extfs_entry *
|
||||
extfs_find_entry (struct extfs_entry *dir, char *name, int make_dirs, int make_file);
|
||||
|
||||
static struct extfs_archive *first_archive = NULL;;
|
||||
static int extfserrno = 0;
|
||||
static struct stat hstat; /* Stat struct corresponding */
|
||||
static char *current_file_name, *current_link_name;
|
||||
|
@ -67,8 +67,8 @@ struct ftpfs_connection {
|
||||
|
||||
extern char *ftpfs_anonymous_passwd;
|
||||
extern char *ftpfs_proxy_host;
|
||||
extern ftpfs_directory_timeout;
|
||||
extern ftpfs_always_use_proxy;
|
||||
extern int ftpfs_directory_timeout;
|
||||
extern int ftpfs_always_use_proxy;
|
||||
|
||||
void ftpfs_init_passwd ();
|
||||
#endif
|
||||
|
@ -1033,7 +1033,7 @@ struct _command {
|
||||
{ "utime", do_utime },
|
||||
};
|
||||
|
||||
static ncommands = sizeof(commands)/sizeof(struct _command);
|
||||
static int ncommands = sizeof(commands)/sizeof(struct _command);
|
||||
|
||||
void exec_command (int command)
|
||||
{
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user