Commit 82fb504a authored by George Lebl's avatar George Lebl

other cosmetic changes

-George
parent 5462bf42
......@@ -34,7 +34,7 @@ GNOME::Panel_var panel_client;
typedef struct _CallbackInfo CallbackInfo;
struct _CallbackInfo {
char *name;
gint applet_id;
int applet_id;
AppletCallbackFunc func;
gpointer data;
};
......@@ -205,7 +205,7 @@ gnome_panel_applet_reinit_corba (void)
}
static CallbackInfo *
get_callback_info(gint applet_id, gchar *name)
get_callback_info(int applet_id, char *name)
{
GList *list;
for(list=applet_callbacks;list!=NULL;list=g_list_next(list)) {
......@@ -216,8 +216,8 @@ get_callback_info(gint applet_id, gchar *name)
return NULL;
}
static gchar*
make_sane_name(gchar *name)
static char*
make_sane_name(char *name)
{
if(!name)
return NULL;
......@@ -280,7 +280,7 @@ gnome_panel_applet_register_callback_dir(int applet_id,
char *stock_item,
char *menutext)
{
gchar *n;
char *n;
/*skip over leading '/'s*/
name = make_sane_name(name);
g_return_if_fail(name!=NULL);
......@@ -299,7 +299,7 @@ void
gnome_panel_applet_unregister_callback_dir(int applet_id,
char *name)
{
gchar *n;
char *n;
/*skip over leading '/'s*/
name = make_sane_name(name);
......@@ -316,12 +316,12 @@ gnome_panel_applet_unregister_callback_dir(int applet_id,
}
/*catch events relevant to the panel and notify the panel*/
static gint
static int
applet_event(GtkWidget *widget, GdkEvent *event, gpointer data)
{
int ourid = PTOI(data);
GdkEventButton *bevent;
gint in_drag;
int in_drag;
switch (event->type) {
case GDK_BUTTON_PRESS:
......@@ -365,7 +365,7 @@ listening_parent(GtkWidget *widget)
return widget;
}
static gint
static int
applet_sub_event_handler(GtkWidget *widget, GdkEvent *event, gpointer data)
{
switch (event->type) {
......@@ -503,21 +503,21 @@ gnome_panel_applet_register (GtkWidget *widget, int applet_id)
}
char *
gnome_panel_applet_abort_id (gint applet_id)
gnome_panel_applet_abort_id (int applet_id)
{
panel_client->applet_abort_id(cookie, applet_id);
return 0;
}
gint
gnome_panel_applet_get_panel_orient (gint applet_id)
int
gnome_panel_applet_get_panel_orient (int applet_id)
{
return panel_client->applet_get_panel_orient(cookie, applet_id);
}
char *
gnome_panel_applet_remove_from_panel (gint applet_id)
gnome_panel_applet_remove_from_panel (int applet_id)
{
panel_client->applet_remove_from_panel(cookie, applet_id);
......@@ -525,7 +525,7 @@ gnome_panel_applet_remove_from_panel (gint applet_id)
}
char *
gnome_panel_applet_add_tooltip (gint applet_id, char *tooltip)
gnome_panel_applet_add_tooltip (int applet_id, char *tooltip)
{
panel_client->applet_add_tooltip(cookie, applet_id,tooltip);
......@@ -533,7 +533,7 @@ gnome_panel_applet_add_tooltip (gint applet_id, char *tooltip)
}
char *
gnome_panel_applet_remove_tooltip (gint applet_id)
gnome_panel_applet_remove_tooltip (int applet_id)
{
panel_client->applet_remove_tooltip(cookie, applet_id);
......@@ -562,7 +562,7 @@ gnome_panel_applet_request_glob_cfg (char **globcfgpath)
}
void
gnome_panel_applet_cleanup(gint applet_id)
gnome_panel_applet_cleanup(int applet_id)
{
GList *list;
GList *nlist;
......
......@@ -16,26 +16,26 @@ char *get_full_path(char *argv0);
applet)*/
char *gnome_panel_applet_request_id (const char *path, const char *param,
gint dorestart,
gint *applet_id, char **cfgpath,
int dorestart,
int *applet_id, char **cfgpath,
char **globcfgpath, guint32 *winid);
char *gnome_panel_applet_register (GtkWidget *widget, gint applet_id);
char *gnome_panel_applet_abort_id (gint applet_id);
char *gnome_panel_applet_remove_from_panel (gint applet_id);
char *gnome_panel_applet_register (GtkWidget *widget, int applet_id);
char *gnome_panel_applet_abort_id (int applet_id);
char *gnome_panel_applet_remove_from_panel (int applet_id);
char *gnome_panel_applet_request_glob_cfg (char **globcfgpath);
gint gnome_panel_applet_get_panel_orient (gint applet_id);
int gnome_panel_applet_get_panel_orient (int applet_id);
char *gnome_panel_quit (void);
char *gnome_panel_sync_config (void);
int gnome_panel_applet_init_corba (void);
int gnome_panel_applet_reinit_corba (void);
void gnome_panel_applet_register_callback (gint applet_id,
void gnome_panel_applet_register_callback (int applet_id,
char *name,
char *stock_item,
char *menutext,
AppletCallbackFunc func,
gpointer data);
void gnome_panel_applet_unregister_callback(int applet_id, char *name);
void gnome_panel_applet_register_callback_dir (gint applet_id,
void gnome_panel_applet_register_callback_dir (int applet_id,
char *name,
char *stock_item,
char *menutext);
......@@ -44,10 +44,10 @@ void gnome_panel_applet_unregister_callback_dir(int applet_id, char *name);
void applet_corba_gtk_main (char *str);
void gnome_panel_applet_cleanup (gint applet_id);
void gnome_panel_applet_cleanup (int applet_id);
char * gnome_panel_applet_add_tooltip (gint applet_id, char *tooltip);
char * gnome_panel_applet_remove_tooltip (gint applet_id);
char * gnome_panel_applet_add_tooltip (int applet_id, char *tooltip);
char * gnome_panel_applet_remove_tooltip (int applet_id);
END_GNOME_DECLS
......
......@@ -27,7 +27,7 @@ static char *default_app_pixmap=NULL;
typedef struct {
int applet_id;
GtkWidget *button;
gint signal_click_tag;
int signal_click_tag;
GnomeDesktopEntry *dentry;
} Launcher;
......@@ -256,7 +256,7 @@ properties_apply_callback(GtkWidget *widget, int page, gpointer data)
#undef free_and_nullify
static gint
static int
properties_close_callback(GtkWidget *widget, gpointer data)
{
Properties *prop = data;
......@@ -287,7 +287,7 @@ create_properties_dialog(GnomeDesktopEntry *dentry, Launcher *launcher)
GtkWidget *dialog;
GtkWidget *table;
GtkWidget *toggle;
gchar *exec;
char *exec;
prop = g_new(Properties, 1);
prop->dentry = dentry;
......
......@@ -14,7 +14,7 @@
typedef struct {
int applet_id;
GtkWidget *button;
gint signal_click_tag;
int signal_click_tag;
GnomeDesktopEntry *dentry;
} Launcher;
......
......@@ -36,20 +36,20 @@
/*the timeout handeler for panel dragging id,
yes I am too lazy to get the events to work*/
static gint panel_dragged = 0;
static int panel_dragged = 0;
gint config_sync_timeout = 0;
gint config_changed = FALSE;
int config_sync_timeout = 0;
int config_changed = FALSE;
GArray *applets;
gint applet_count;
int applet_count;
extern GtkWidget * root_menu;
char *panel_cfg_path=NULL;
char *old_panel_cfg_path=NULL;
gint main_menu_count=0;
int main_menu_count=0;
GtkTooltips *panel_tooltips = NULL;
......@@ -66,14 +66,14 @@ GlobalConfig global_config = {
typedef struct _LoadApplet LoadApplet;
struct _LoadApplet {
gchar *id_str;
gchar *path;
gchar *params;
gchar *pixmap;
gchar *tooltip;
gint pos;
gint panel;
gchar *cfgpath;
char *id_str;
char *path;
char *params;
char *pixmap;
char *tooltip;
int pos;
int panel;
char *cfgpath;
};
GList * children = NULL;
......@@ -81,7 +81,7 @@ GList * children = NULL;
GList *load_queue=NULL;
/* True if parsing determined that all the work is already done. */
gint just_exit = 0;
int just_exit = 0;
/* The security cookie */
char *cookie;
......@@ -91,13 +91,13 @@ char *cookie;
/*execution queue stuff, execute only one applet in a row, thereby getting
rid of some problems with applet*/
gint current_exec = -1;
int current_exec = -1;
guint cur_timeout=0;
typedef struct _ExecQueue ExecQueue;
struct _ExecQueue {
gint applet_id;
gchar *path;
gchar *param;
int applet_id;
char *path;
char *param;
};
GList *exec_queue=NULL;
......@@ -133,10 +133,10 @@ static struct argp parser =
/*needed for drawers*/
static void panel_setup(PanelWidget *panel);
static gint really_exec_prog(gint applet_id, gchar *path, gchar *param);
static int really_exec_prog(int applet_id, char *path, char *param);
static void exec_queue_start_next(void);
static gint
static int
exec_queue_timeout(gpointer data)
{
g_warning("TIMED OUT waiting to applet ID: %d!",current_exec);
......@@ -145,8 +145,8 @@ exec_queue_timeout(gpointer data)
return FALSE;
}
static gint
really_exec_prog(gint applet_id, gchar *path, gchar *param)
static int
really_exec_prog(int applet_id, char *path, char *param)
{
/*check if this is an applet which is a multi applet and
has something already loaded*/
......@@ -191,7 +191,7 @@ static void
exec_queue_start_next(void)
{
ExecQueue *eq;
gint ret;
int ret;
current_exec = -1;
if(cur_timeout>0)
......@@ -218,7 +218,7 @@ exec_queue_start_next(void)
/* this applet has finished loading, if it was the one we were waiting
on, start the next applet */
void
exec_queue_done(gint applet_id)
exec_queue_done(int applet_id)
{
if(applet_id>-1 && applet_id==current_exec)
exec_queue_start_next();
......@@ -226,7 +226,7 @@ exec_queue_done(gint applet_id)
static void
exec_prog(gint applet_id, gchar *path, gchar *param)
exec_prog(int applet_id, char *path, char *param)
{
if(current_exec==-1) {
really_exec_prog(applet_id,path,param);
......@@ -244,9 +244,9 @@ exec_prog(gint applet_id, gchar *path, gchar *param)
static void
queue_load_applet(gchar *id_str, gchar *path, gchar *params,
gchar *pixmap, gchar *tooltip,
gint pos, gint panel, gchar *cfgpath)
queue_load_applet(char *id_str, char *path, char *params,
char *pixmap, char *tooltip,
int pos, int panel, char *cfgpath)
{
LoadApplet *l;
l = g_new(LoadApplet,1);
......@@ -264,7 +264,7 @@ queue_load_applet(gchar *id_str, gchar *path, gchar *params,
load_queue = g_list_append(load_queue,l);
}
static gint
static int
monitor_drawers(GtkWidget *w, gpointer data)
{
PanelWidget **panel=data;
......@@ -339,12 +339,12 @@ get_applet_orient(PanelWidget *panel)
void
load_applet(gchar *id_str, gchar *path, gchar *params,
gchar *pixmap, gchar *tooltip,
gint pos, gint panel, gchar *cfgpath)
load_applet(char *id_str, char *path, char *params,
char *pixmap, char *tooltip,
int pos, int panel, char *cfgpath)
{
if(strcmp(id_str,EXTERN_ID) == 0) {
gchar *fullpath;
char *fullpath;
char *param;
/*start nothing, applet is taking care of everything*/
......@@ -619,7 +619,7 @@ panel_realize(GtkWidget *widget, gpointer data)
static void orient_change_foreach(gpointer data, gpointer user_data);
void
orientation_change(gint applet_id, PanelWidget *panel)
orientation_change(int applet_id, PanelWidget *panel)
{
AppletInfo *info = get_applet_info(applet_id);
if(info->type == APPLET_EXTERN) {
......@@ -648,7 +648,7 @@ orientation_change(gint applet_id, PanelWidget *panel)
static void
orient_change_foreach(gpointer data, gpointer user_data)
{
gint applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(data)));
int applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(data)));
PanelWidget *panel = user_data;
orientation_change(applet_id,panel);
......@@ -669,7 +669,7 @@ panel_orient_change(GtkWidget *widget,
}
void
back_change(gint applet_id,
back_change(int applet_id,
PanelWidget *panel)
{
AppletInfo *info = get_applet_info(applet_id);
......@@ -685,7 +685,7 @@ back_change(gint applet_id,
static void
back_change_foreach(gpointer data, gpointer user_data)
{
gint applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(data)));
int applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(data)));
PanelWidget *panel = user_data;
back_change(applet_id,panel);
......@@ -694,7 +694,7 @@ back_change_foreach(gpointer data, gpointer user_data)
static void
panel_back_change(GtkWidget *widget,
PanelBackType type,
gchar *pixmap,
char *pixmap,
GdkColor *color)
{
panel_widget_foreach(PANEL_WIDGET(widget),back_change_foreach,widget);
......@@ -706,7 +706,7 @@ panel_back_change(GtkWidget *widget,
static void
state_restore_foreach(gpointer data, gpointer user_data)
{
gint applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(data)));
int applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(data)));
AppletInfo *info = get_applet_info(applet_id);
if(info->type == APPLET_DRAWER) {
......@@ -722,7 +722,7 @@ state_restore_foreach(gpointer data, gpointer user_data)
static void
state_hide_foreach(gpointer data, gpointer user_data)
{
gint applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(data)));
int applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(data)));
AppletInfo *info = get_applet_info(applet_id);
if(info->type == APPLET_DRAWER) {
......@@ -735,7 +735,7 @@ state_hide_foreach(gpointer data, gpointer user_data)
}
}
static gint
static int
panel_state_change(GtkWidget *widget,
PanelState state,
gpointer data)
......@@ -752,7 +752,7 @@ panel_state_change(GtkWidget *widget,
return TRUE;
}
static gint
static int
panel_size_allocate(GtkWidget *widget, GtkAllocation *alloc, gpointer data)
{
Drawer *drawer = gtk_object_get_data(GTK_OBJECT(widget),DRAWER_PANEL);
......@@ -766,11 +766,11 @@ panel_size_allocate(GtkWidget *widget, GtkAllocation *alloc, gpointer data)
}
struct _added_info {
gint applet_id;
int applet_id;
PanelWidget *panel;
};
static gint
static int
panel_applet_added_idle(gpointer data)
{
struct _added_info *ai = data;
......@@ -783,10 +783,10 @@ panel_applet_added_idle(gpointer data)
return FALSE;
}
static gint
static int
panel_applet_added(GtkWidget *widget, GtkWidget *applet, gpointer data)
{
gint applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(applet)));
int applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(applet)));
PanelWidget *panel = PANEL_WIDGET(widget);
struct _added_info *ai = g_new(struct _added_info,1);
......@@ -800,7 +800,7 @@ panel_applet_added(GtkWidget *widget, GtkWidget *applet, gpointer data)
return TRUE;
}
static gint
static int
panel_applet_removed(GtkWidget *widget, gpointer data)
{
config_changed = TRUE;
......@@ -808,7 +808,7 @@ panel_applet_removed(GtkWidget *widget, gpointer data)
}
static void
panel_menu_position (GtkMenu *menu, gint *x, gint *y, gpointer data)
panel_menu_position (GtkMenu *menu, int *x, int *y, gpointer data)
{
int wx, wy;
PanelWidget *panel = data;
......@@ -874,7 +874,7 @@ static void
panel_move(PanelWidget *panel, double x, double y)
{
PanelSnapped newloc;
gint minx, miny, maxx, maxy;
int minx, miny, maxx, maxy;
if(panel->snapped == PANEL_DRAWER || panel->snapped == PANEL_FREE)
return;
......@@ -916,10 +916,10 @@ panel_move(PanelWidget *panel, double x, double y)
}
}
static gint
static int
panel_move_timeout(gpointer data)
{
gint x,y;
int x,y;
gdk_window_get_pointer(NULL,&x,&y,NULL);
panel_move(data,x,y);
......@@ -927,7 +927,7 @@ panel_move_timeout(gpointer data)
}
/* DOES NOT WORK!
static gint
static int
panel_move_callback(GtkWidget *w, GdkEventMotion *event, gpointer data)
{
puts("TEST");
......@@ -937,7 +937,7 @@ panel_move_callback(GtkWidget *w, GdkEventMotion *event, gpointer data)
}*/
static gint
static int
panel_button_release_callback(GtkWidget *panel,GdkEventButton *event, gpointer data)
{
if(panel_dragged) {
......@@ -993,7 +993,7 @@ panel_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data)
return FALSE;
}
static gint
static int
panel_destroy(GtkWidget *widget, gpointer data)
{
GtkWidget *panel_menu = data;
......@@ -1007,7 +1007,7 @@ panel_destroy(GtkWidget *widget, gpointer data)
static void
applet_move_foreach(gpointer data, gpointer user_data)
{
gint applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(data)));
int applet_id = PTOI(gtk_object_get_user_data(GTK_OBJECT(data)));
AppletInfo *info = get_applet_info(applet_id);
if(info->type == APPLET_DRAWER) {
......@@ -1105,7 +1105,7 @@ init_user_panels(void)
PanelSnapped snapped;
PanelOrientation orient;
PanelMode mode;
gint fit_pixmap_bg;
int fit_pixmap_bg;
GtkWidget *panel;
PanelState state;
DrawerDropZonePos drop_pos;
......@@ -1208,9 +1208,9 @@ init_user_panels(void)
we don't want to clean the file before they load up, so now we
only call it on the discard cmdline argument*/
void
discard_session (gchar *id)
discard_session (char *id)
{
gchar *sess;
char *sess;
sess = g_copy_strings ("/panel-Session-", id, NULL);
......@@ -1239,10 +1239,10 @@ parse_an_arg (int key, char *arg, struct argp_state *state)
/*
static void
panel_connect_client (GnomeClient *client,
gint was_restarted,
int was_restarted,
gpointer client_data)
{
gchar *session_id;
char *session_id;
session_id = gnome_client_get_previous_id (client);
......@@ -1285,7 +1285,7 @@ sigchld_handler(int type)
}
}
static gint
static int
try_config_sync(gpointer data)
{
if(config_changed)
......@@ -1329,7 +1329,7 @@ main(int argc, char **argv)
GTK_SIGNAL_FUNC (panel_session_die), NULL);
if (GNOME_CLIENT_CONNECTED (client)) {
gchar *session_id;
char *session_id;
session_id= gnome_client_get_id (gnome_cloned_client ());
......
......@@ -6,19 +6,19 @@ BEGIN_GNOME_DECLS
void load_applet(char *id, char *path, char *params,
char *pixmap, char *tooltip,
int pos, int panel, char *cfgpath);
void orientation_change(gint applet_id, PanelWidget *panel);
void back_change(gint applet_id, PanelWidget *panel);
void orientation_change(int applet_id, PanelWidget *panel);
void back_change(int applet_id, PanelWidget *panel);
PanelOrientType get_applet_orient(PanelWidget *panel);
/* this applet has finished loading, if it was the one we were waiting
on, start the next applet */
void exec_queue_done(gint applet_id);
void exec_queue_done(int applet_id);
typedef struct _AppletChild AppletChild;
/*used in the SIGCHLD handler and as a list of started applets*/
struct _AppletChild {
gint applet_id;
int applet_id;
pid_t pid;
};
......
......@@ -37,7 +37,7 @@ extern GlobalConfig global_config;
typedef struct _FileInfo FileInfo;
struct _FileInfo {
gchar *name;
char *name;
time_t ctime;
};
......@@ -47,7 +47,7 @@ void
about_cb (GtkWidget *widget, gpointer data)
{
GtkWidget *about;
gchar *authors[] = {
char *authors[] = {
"George Lebl (jirka@5z.com)",
"Miguel de Icaza (miguel@kernel.org)",
"Federico Mena (quartic@gimp.org)",
......@@ -147,7 +147,7 @@ free_string (GtkWidget *widget, void *data)
g_free (data);
}
static gint
static int
add_to_panel (char *applet, char *path, char *arg)
{
load_applet(applet,path,arg,NULL,NULL,
......@@ -155,7 +155,7 @@ add_to_panel (char *applet, char *path, char *arg)
return TRUE;
}
static gint
static int
add_app_to_panel (GtkWidget *widget, void *data)
{
GnomeDesktopEntry *ii = data;
......@@ -163,20 +163,20 @@ add_app_to_panel (GtkWidget *widget, void *data)
return add_to_panel (LAUNCHER_ID, NULL, ii->location);
}
static gint
static int
add_dir_to_panel (GtkWidget *widget, void *data)
{
return add_to_panel (MENU_ID, NULL, data);
}
static gint
static int
add_applet (GtkWidget *w, gpointer data)
{
GnomeDesktopEntry *ii = data;
char *path;
char *param;
gint r;
int r;
path = ii->exec[0];
......@@ -193,7 +193,7 @@ add_applet (GtkWidget *w, gpointer data)
return r;
}
static gint
static int
check_finfo_list(GList *finfo)
{
struct stat s;
......@@ -229,7 +229,7 @@ free_finfo_list(GList *finfo)
}
static FileInfo *
make_finfo(gchar *name)
make_finfo(char *name)
{
struct stat s;
FileInfo *fi;
......@@ -244,7 +244,7 @@ make_finfo(gchar *name)
}
static FileInfo *
make_finfo_s(gchar *name, struct stat *s)
make_finfo_s(char *name, struct stat *s)
{
FileInfo *fi;
......@@ -478,7 +478,7 @@ create_menu_at (char *menudir,
}
void
menu_position (GtkMenu *menu, gint *x, gint *y, gpointer data)
menu_position (GtkMenu *menu, int *x, int *y, gpointer data)
{
Menu * menup = data;
GtkWidget *widget = menup->button;
......@@ -538,8 +538,8 @@ menu_deactivate(GtkWidget *w, gpointer data)
panel->autohide_inhibit = FALSE;
}
static gchar *
get_real_menu_path(gchar *arguments, gchar *menu_base)
static char *
get_real_menu_path(char *arguments, char *menu_base)
{
char *this_menu;
......@@ -577,7 +577,7 @@ add_applet_to_panel_data(GtkWidget *widget, gpointer data)
}
#ifdef _SWALLOW_
static gint
static int
act_really_add_swallow(GtkWidget *w, gpointer data)
{
GtkWidget *entry = data;
......@@ -589,8 +589,8 @@ act_really_add_swallow(GtkWidget *w, gpointer data)
return TRUE;
}
static gint
really_add_swallow(GtkWidget *d,gint button, gpointer data)
static int
really_add_swallow(GtkWidget *d,int button, gpointer data)
{
GtkWidget *entry = data;
......@@ -811,7 +811,7 @@ add_menu_widget (Menu *menu, char *menudir, int main_menu)
}
static gint
static int
menu_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data)
{
Menu *menu = data;
......@@ -836,7 +836,7 @@ menu_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data)
puts("debug: rereading menu");
if (this_menu) {
gint main_menu =
int main_menu =
(strcmp(menu->path,".")==0);
/*free the menu releated data*/
......
......@@ -82,7 +82,7 @@ public:
CORBA::Short applet_get_panel_orient (const char *ccookie,
CORBA::Short applet_id) {
CHECK_COOKIE_V (0);
return (gint)::applet_get_panel_orient (applet_id);
return (int)::applet_get_panel_orient (applet_id);
}
void applet_show_menu (const char *ccookie, CORBA::Short applet_id) {
CHECK_COOKIE ();
...