projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not recalculate time width..
[lttv.git]
/
ltt
/
branches
/
poly
/
lttv
/
modules
/
gui
/
lttvwindow
/
lttvwindow
/
menu.c
diff --git
a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c
b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c
index 32c35c2c766b401d102cae5a9ab681a203acdc9a..33f170b0054dc2c49a6f52fe1ee27963b2470ecd 100644
(file)
--- a/
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c
+++ b/
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c
@@
-21,7
+21,7
@@
inline LttvMenus *lttv_menus_new() {
inline LttvMenus *lttv_menus_new() {
- return g_array_new(FALSE, FALSE, sizeof(
lttv_menu_c
losure));
+ return g_array_new(FALSE, FALSE, sizeof(
LttvMenuC
losure));
}
/* MD: delete elements of the array also, but don't free pointed addresses
}
/* MD: delete elements of the array also, but don't free pointed addresses
@@
-32,31
+32,39
@@
inline void lttv_menus_destroy(LttvMenus *h) {
g_array_free(h, TRUE);
}
g_array_free(h, TRUE);
}
-inline
void lttv_menus_add(LttvMenus *h, lttv_constructor f, char* menuPath, char* menuTex
t)
+inline
LttvMenuClosure lttv_menus_add(LttvMenus *h, lttvwindow_viewer_constructor f, char* menu_path, char* menu_text, GtkWidget *widge
t)
{
{
-
lttv_menu_c
losure c;
+
LttvMenuC
losure c;
/* if h is null, do nothing, or popup a warning message */
if(h == NULL)return;
c.con = f;
/* if h is null, do nothing, or popup a warning message */
if(h == NULL)return;
c.con = f;
- c.menuPath = menuPath;
- c.menuText = menuText;
+ c.menu_path = menu_path;
+ c.menu_text = menu_text;
+ c.widget = widget;
g_array_append_val(h,c);
g_array_append_val(h,c);
+
+ return c;
}
}
-
gboolean lttv_menus_remove(LttvMenus *h, lttv
_constructor f)
+
GtkWidget *lttv_menus_remove(LttvMenus *h, lttvwindow_viewer
_constructor f)
{
{
-
lttv_menu_c
losure * tmp;
+
LttvMenuC
losure * tmp;
gint i;
gint i;
+ GtkWidget *widget;
+
for(i=0;i<h->len;i++){
for(i=0;i<h->len;i++){
- tmp = & g_array_index(h, lttv_menu_closure, i);
- if(tmp->con == f)break;
+ tmp = & g_array_index(h, LttvMenuClosure, i);
+ if(tmp->con == f) {
+ widget = tmp->widget;
+ break;
+ }
}
if(i<h->len){
g_array_remove_index(h, i);
}
if(i<h->len){
g_array_remove_index(h, i);
- return
TRUE
;
- }else return
FALSE
;
+ return
widget
;
+ }else return
NULL
;
}
}
This page took
0.048299 seconds
and
4
git commands to generate.