Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gnome-panel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
gnome-panel
Commits
295e50ff
Commit
295e50ff
authored
Apr 16, 1998
by
George Lebl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
write 1000x on the blackboard:
"compile before commit" -George
parent
fa388a94
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
35 deletions
+20
-35
gnome-panel/mico-glue.cc
gnome-panel/mico-glue.cc
+0
-11
gnome-panel/panel.c
gnome-panel/panel.c
+19
-23
gnome-panel/panel.h
gnome-panel/panel.h
+1
-1
No files found.
gnome-panel/mico-glue.cc
View file @
295e50ff
...
...
@@ -213,17 +213,6 @@ send_applet_session_save (const char *ior, int applet_id, const char *cfgpath,
applet
->
session_save
(
applet_id
,
cfgpath
,
globcfgpath
);
}
void
send_applet_shutdown_applet
(
const
char
*
ior
,
int
applet_id
)
{
/* Use the ior that was sent to us to get an Applet CORBA object */
CORBA
::
Object_var
obj
=
orb_ptr
->
string_to_object
(
ior
);
GNOME
::
Applet_var
applet
=
GNOME
::
Applet
::
_narrow
(
obj
);
/* Now, use corba to invoke the routine in the panel */
applet
->
shutdown_applet
(
applet_id
);
}
void
send_applet_change_orient
(
const
char
*
ior
,
int
applet_id
,
int
orient
)
{
...
...
gnome-panel/panel.c
View file @
295e50ff
...
...
@@ -313,19 +313,6 @@ panel_quit(void)
}
}
static
PanelWidget
*
find_applet_panel
(
GtkWidget
*
applet
)
{
GList
*
list
;
for
(
list
=
panels
;
list
!=
NULL
;
list
=
g_list_next
(
list
))
if
(
panel_widget_get_pos
(
PANEL_WIDGET
(
list
->
data
),
applet
)
!=-
1
)
break
;
if
(
!
list
)
return
NULL
;
return
PANEL_WIDGET
(
list
->
data
);
}
static
void
move_applet_callback
(
GtkWidget
*
widget
,
gpointer
data
)
{
...
...
@@ -334,7 +321,8 @@ move_applet_callback(GtkWidget *widget, gpointer data)
info
=
data
;
if
(
!
(
panel
=
find_applet_panel
(
info
->
widget
)))
if
(
!
(
panel
=
gtk_object_get_data
(
GTK_OBJECT
(
info
->
widget
),
PANEL_APPLET_PARENT_KEY
)))
return
;
panel_widget_applet_drag_start
(
panel
,
info
->
widget
);
...
...
@@ -347,15 +335,14 @@ panel_clean_applet(AppletInfo *info)
g_return_if_fail
(
info
!=
NULL
);
if
(
info
->
type
==
APPLET_EXTERN
)
send_applet_shutdown_applet
(
info
->
id_str
,
info
->
applet_id
);
info
->
type
=
APPLET_EMPTY
;
if
(
!
(
panel
=
find_applet_panel
(
info
->
widget
)))
if
(
!
(
panel
=
gtk_object_get_data
(
GTK_OBJECT
(
info
->
widget
),
PANEL_APPLET_PARENT_KEY
)))
return
;
panel_widget_remove
(
panel
,
info
->
widget
);
gtk_widget_unref
(
info
->
widget
);
//
gtk_widget_unref(info->widget);
info
->
widget
=
NULL
;
if
(
info
->
type
==
APPLET_DRAWER
&&
info
->
assoc
)
{
panels
=
g_list_remove
(
panels
,
info
->
assoc
);
...
...
@@ -440,7 +427,8 @@ applet_menu_position (GtkMenu *menu, gint *x, gint *y, gpointer data)
{
AppletInfo
*
info
=
data
;
int
wx
,
wy
;
PanelWidget
*
panel
=
find_applet_panel
(
info
->
widget
);
PanelWidget
*
panel
=
gtk_object_get_data
(
GTK_OBJECT
(
info
->
widget
),
PANEL_APPLET_PARENT_KEY
);
g_return_if_fail
(
panel
!=
NULL
);
...
...
@@ -623,7 +611,9 @@ applet_drag_start(gint applet_id)
if
(
!
info
)
return
;
panel
=
find_applet_panel
(
info
->
widget
);
if
(
!
(
panel
=
gtk_object_get_data
(
GTK_OBJECT
(
info
->
widget
),
PANEL_APPLET_PARENT_KEY
)))
return
;
panel_widget_applet_drag_start_no_grab
(
panel
,
info
->
widget
);
panel_widget_applet_move_use_idle
(
panel
);
...
...
@@ -637,7 +627,9 @@ applet_drag_stop(gint applet_id)
if
(
!
info
)
return
;
panel
=
find_applet_panel
(
info
->
widget
);
if
(
!
(
panel
=
gtk_object_get_data
(
GTK_OBJECT
(
info
->
widget
),
PANEL_APPLET_PARENT_KEY
)))
return
;
panel_widget_applet_drag_end_no_grab
(
panel
);
}
...
...
@@ -796,7 +788,7 @@ create_panel_root_menu(PanelWidget *panel)
void
applet_set_tooltip
(
gint
applet_id
,
char
*
tooltip
)
applet_set_tooltip
(
gint
applet_id
,
c
onst
c
har
*
tooltip
)
{
AppletInfo
*
info
=
get_applet_by_id
(
applet_id
);
if
(
!
info
)
...
...
@@ -809,7 +801,11 @@ static gint
panel_dnd_drag_request(GtkWidget *widget, GdkEvent *event, gpointer data)
{
AppletInfo *info = data;
PanelWidget *panel = find_applet_panel(info->widget);
PanelWidget *panel;
if(!(panel = gtk_object_get_data(GTK_OBJECT(info->widget),
PANEL_APPLET_PARENT_KEY)))
return;
gtk_widget_dnd_data_set (widget, event, &info->widget,
sizeof(GtkWidget *));
...
...
gnome-panel/panel.h
View file @
295e50ff
...
...
@@ -118,7 +118,7 @@ void applet_drag_stop(gint applet_id);
void
applet_add_callback
(
gint
applet_id
,
char
*
callback_name
,
char
*
menuitem_text
);
void
applet_set_tooltip
(
gint
applet_id
,
char
*
tooltip
);
void
applet_set_tooltip
(
gint
applet_id
,
c
onst
c
har
*
tooltip
);
void
applet_remove_from_panel
(
gint
applet_id
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment