Commit b91036d2 authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

minor cleanups in function params

Sat Aug 08 14:46:16 1998  George Lebl  <jirka@5z.com>

        * *.c: minor cleanups in function params
parent 0482896e
Sat Aug 08 14:46:16 1998 George Lebl <jirka@5z.com>
* *.c: minor cleanups in function params
Sat Aug 08 01:29:31 1998 George Lebl <jirka@5z.com>
* panel.c: fixed a few warnings
......
Sat Aug 08 14:46:16 1998 George Lebl <jirka@5z.com>
* *.c: minor cleanups in function params
Sat Aug 08 01:29:31 1998 George Lebl <jirka@5z.com>
* panel.c: fixed a few warnings
......
......@@ -494,8 +494,8 @@ applet_destroy(GtkWidget *w, gpointer data)
int
register_toy(GtkWidget *applet,
gpointer data,
int pos,
PanelWidget *panel,
int pos,
AppletType type)
{
GtkWidget *eventbox;
......
......@@ -57,8 +57,8 @@ struct _AppletInfo {
int register_toy(GtkWidget *applet,
gpointer data,
int pos,
PanelWidget *panel,
int pos,
AppletType type);
void panel_clean_applet(int applet_id);
......
......@@ -443,7 +443,7 @@ button_size_alloc(GtkWidget *widget, GtkAllocation *alloc, Drawer *drawer)
void
load_drawer_applet(char *params, char *pixmap, char *tooltip,
int pos, PanelWidget *panel)
PanelWidget *panel, int pos)
{
Drawer *drawer;
......@@ -468,7 +468,7 @@ load_drawer_applet(char *params, char *pixmap, char *tooltip,
g_return_if_fail(drawer != NULL);
register_toy(drawer->button,drawer, pos, panel, APPLET_DRAWER);
register_toy(drawer->button,drawer, panel, pos, APPLET_DRAWER);
gtk_signal_connect_after(GTK_OBJECT(drawer->button),
"size_allocate",
......
......@@ -16,7 +16,7 @@ typedef struct {
} Drawer;
void load_drawer_applet(char *params, char *pixmap, char *tooltip,
int pos, PanelWidget *panel);
PanelWidget *panel, int pos);
void set_drawer_applet_orient(Drawer *drawer, PanelOrientType orient);
......
......@@ -316,7 +316,7 @@ reserve_applet_spot (Extern *ext, PanelWidget *panel, int pos,
/*we save the ior in the id field of the appletinfo and the
path in the path field*/
if(!register_toy(socket,ext,pos,panel,type)) {
if(!register_toy(socket,ext,panel,pos,type)) {
g_warning("Couldn't add applet");
return 0;
}
......@@ -334,8 +334,8 @@ applet_set_tooltip(int applet_id, const char *tooltip)
}
void
load_extern_applet(char *path, char *params, int pos, PanelWidget *panel,
char *cfgpath)
load_extern_applet(char *path, char *params, char *cfgpath,
PanelWidget *panel, int pos)
{
char *fullpath;
char *param;
......
......@@ -16,8 +16,8 @@ struct _Extern {
};
void extern_clean(Extern *ext);
void load_extern_applet(char *path, char *params, int pos, PanelWidget *panel,
char *cfgpath);
void load_extern_applet(char *path, char *params, char *cfgpath,
PanelWidget *panel, int pos);
/*stuff for corba*/
int applet_request_id (const char *path, const char *param,
......
......@@ -258,14 +258,14 @@ launcher_properties(Launcher *launcher)
static void
_load_launcher_applet(char *params, GnomeDesktopEntry *dentry,
int pos, PanelWidget *panel)
PanelWidget *panel, int pos)
{
Launcher *launcher;
launcher = create_launcher(params,dentry);
if(launcher) {
register_toy(launcher->button,launcher, pos,panel,
register_toy(launcher->button,launcher, panel, pos,
APPLET_LAUNCHER);
gtk_tooltips_set_tip (panel_tooltips,
......@@ -284,7 +284,7 @@ really_add_launcher(GtkWidget *d,int button, gpointer data)
GnomeDEntryEdit *dedit = GNOME_DENTRY_EDIT(data);
if(button==0)
_load_launcher_applet(NULL, gnome_dentry_get_dentry(dedit),
0, current_panel);
current_panel, 0);
gtk_widget_destroy(d);
}
......@@ -318,7 +318,7 @@ ask_about_launcher(void)
}
void
load_launcher_applet(char *params, int pos, PanelWidget *panel)
load_launcher_applet(char *params, PanelWidget *panel, int pos)
{
_load_launcher_applet(params,NULL,pos,panel);
_load_launcher_applet(params,NULL,panel, pos);
}
......@@ -23,7 +23,7 @@ typedef struct {
GnomeDesktopEntry *dentry;
} Launcher;
void load_launcher_applet(char *params, int pos, PanelWidget *panel);
void load_launcher_applet(char *params, PanelWidget *panel, int pos);
void launcher_properties(Launcher *launcher);
void ask_about_launcher(void);
......
......@@ -42,13 +42,13 @@ create_logout_widget(void)
}
void
load_logout_applet(int pos, PanelWidget *panel)
load_logout_applet(PanelWidget *panel, int pos)
{
GtkWidget *logout;
logout = create_logout_widget();
if(logout)
register_toy(logout,NULL, pos, panel,APPLET_LOGOUT);
register_toy(logout, NULL, panel, pos, APPLET_LOGOUT);
}
......@@ -12,7 +12,7 @@
BEGIN_GNOME_DECLS
void load_logout_applet(int pos, PanelWidget *panel);
void load_logout_applet(PanelWidget *panel, int pos);
END_GNOME_DECLS
......
......@@ -106,7 +106,7 @@ add_app_to_panel (GtkWidget *widget, void *data)
{
GnomeDesktopEntry *ii = data;
load_launcher_applet(ii->location,0,current_panel);
load_launcher_applet(ii->location,current_panel,0);
}
/*reads in the order file and makes a list*/
......@@ -182,7 +182,7 @@ add_drawers_from_dir(char *dirname, char *name, int pos, PanelWidget *panel)
pixmap_name = item_info?item_info->icon:NULL;
load_drawer_applet(NULL,pixmap_name,subdir_name,
pos, panel);
panel,pos);
info = get_applet_info(applet_count -1);
g_return_if_fail(info);
......@@ -206,8 +206,8 @@ add_drawers_from_dir(char *dirname, char *name, int pos, PanelWidget *panel)
/*we load the applet at the right
side, that is end of the drawer*/
load_launcher_applet(filename,
INT_MAX/2,
newpanel);
newpanel,
INT_MAX/2);
}
}
g_free(filename);
......@@ -232,9 +232,9 @@ add_menu_to_panel (GtkWidget *widget, void *data)
{
MenuFinfo *mf = data;
if(mf)
load_menu_applet(mf->menudir,0, 0, current_panel);
load_menu_applet(mf->menudir,0, current_panel, 0);
else
load_menu_applet(NULL,0, 0, current_panel);
load_menu_applet(NULL,0, current_panel, 0);
}
......@@ -513,14 +513,14 @@ static int
add_drawer_to_panel (GtkWidget *widget, void *data)
{
load_drawer_applet(NULL,NULL,NULL,
0, current_panel);
current_panel, 0);
return TRUE;
}
static int
add_logout_to_panel (GtkWidget *widget, void *data)
{
load_logout_applet(0,current_panel);
load_logout_applet(current_panel, 0);
return TRUE;
}
......@@ -540,7 +540,7 @@ add_applet (GtkWidget *w, gpointer data)
else
param = NULL;
load_extern_applet(path,param,0,current_panel,NULL);
load_extern_applet(path,param,NULL,current_panel,0);
if(param) g_free(param);
return TRUE;
......@@ -1686,7 +1686,7 @@ set_menu_applet_orient(Menu *menu, PanelOrientType orient)
void
load_menu_applet(char *params, int main_menu_type,
int pos, PanelWidget *panel)
PanelWidget *panel, int pos)
{
Menu *menu;
......@@ -1694,5 +1694,5 @@ load_menu_applet(char *params, int main_menu_type,
if(menu)
register_toy(menu->button,menu,
pos,panel,APPLET_MENU);
panel,pos,APPLET_MENU);
}
......@@ -20,7 +20,7 @@ struct _Menu {
};
void load_menu_applet(char *params, int main_menu_type,
int pos, PanelWidget *panel);
PanelWidget *panel, int pos);
void set_menu_applet_orient(Menu *menu, PanelOrientType orient);
......
......@@ -595,9 +595,9 @@ panel_quit(void)
static void
load_default_applets(void)
{
load_menu_applet(NULL,0, 0,panels->data);
load_extern_applet("gen_util_applet","--clock",
INT_MAX/2/*right flush*/,panels->data,NULL);
load_menu_applet(NULL,0, panels->data, 0);
load_extern_applet("gen_util_applet","--clock",NULL,
panels->data,INT_MAX/2/*right flush*/);
/*we laoded default applets, so we didn't find the config or
something else was wrong, so do complete save when next syncing*/
need_complete_save = TRUE;
......@@ -656,34 +656,34 @@ init_user_applets(void)
when it loads*/
g_snprintf(buf,256,"%sApplet_%d_Extern/",
old_panel_cfg_path,num);
load_extern_applet(path,params,pos,panel,buf);
load_extern_applet(path,params,buf,panel,pos);
g_free(path);
g_free(params);
} else if(strcmp(applet_name,LAUNCHER_ID) == 0) {
char *params = gnome_config_get_string("parameters=");
load_launcher_applet(params,pos,panel);
load_launcher_applet(params,panel,pos);
g_free(params);
} else if(strcmp(applet_name,LOGOUT_ID) == 0) {
load_logout_applet(pos,panel);
load_logout_applet(panel,pos);
} else if(strcmp(applet_name,SWALLOW_ID) == 0) {
char *path = gnome_config_get_string("execpath=");
char *params = gnome_config_get_string("parameters=");
int width = gnome_config_get_int("width=0");
int height = gnome_config_get_int("height=0");
load_swallow_applet(path,params,width,height,pos,panel);
load_swallow_applet(path,params,width,height,panel,pos);
g_free(path);
g_free(params);
} else if(strcmp(applet_name,MENU_ID) == 0) {
char *params = gnome_config_get_string("parameters=");
int main_menu_type =
gnome_config_get_int("main_menu_type=0");
load_menu_applet(params,main_menu_type,pos,panel);
load_menu_applet(params,main_menu_type,panel,pos);
g_free(params);
} else if(strcmp(applet_name,DRAWER_ID) == 0) {
char *params = gnome_config_get_string("parameters=");
char *pixmap = gnome_config_get_string("pixmap=");
char *tooltip = gnome_config_get_string("tooltip=");
load_drawer_applet(params,pixmap,tooltip,pos,panel);
load_drawer_applet(params,pixmap,tooltip,panel,pos);
g_free(params);
g_free(pixmap);
g_free(tooltip);
......
......@@ -129,7 +129,7 @@ really_add_swallow(GtkWidget *d,int button, gpointer data)
GTK_SPIN_BUTTON(width_s)),
gtk_spin_button_get_value_as_int(
GTK_SPIN_BUTTON(height_s)),
0, current_panel);
current_panel, 0);
gtk_widget_destroy(d);
}
......@@ -318,7 +318,7 @@ set_swallow_applet_orient(Swallow *swallow, SwallowOrient orient)
void
load_swallow_applet(char *path, char *params, int width, int height,
int pos, PanelWidget *panel)
PanelWidget *panel, int pos)
{
Swallow *swallow;
......@@ -327,7 +327,7 @@ load_swallow_applet(char *path, char *params, int width, int height,
if(!swallow)
return;
register_toy(swallow->table,swallow, pos, panel, APPLET_SWALLOW);
register_toy(swallow->table,swallow, panel, pos, APPLET_SWALLOW);
if(path && *path) {
char *s = g_copy_strings("(true; ",path," &)",NULL);
......
......@@ -23,7 +23,7 @@ typedef struct {
} Swallow;
void load_swallow_applet(char *path, char *params, int width, int height,
int pos, PanelWidget *panel);
PanelWidget *panela, int pos);
void set_swallow_applet_orient(Swallow *swallow, SwallowOrient orient);
/*I couldn't resist the naming of this function*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment