projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
init trace scrollbar bugfix
[lttv.git]
/
ltt
/
branches
/
poly
/
lttv
/
modules
/
gui
/
lttvwindow
/
lttvwindow
/
toolbar.c
diff --git
a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c
b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c
index 2a1dbb10d57fb50cc6af0ec162e899b6c937370a..feda92c57e830fa250d99c378acc22fce492eae1 100644
(file)
--- a/
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c
+++ b/
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c
@@
-19,9
+19,8
@@
#include <lttv/lttv.h>
#include <lttvwindow/toolbar.h>
#include <lttv/lttv.h>
#include <lttvwindow/toolbar.h>
-
inline LttvToolbars *lttv_toolbars_new() {
inline LttvToolbars *lttv_toolbars_new() {
- return g_array_new(FALSE, FALSE, sizeof(
lttv_toolbar_c
losure));
+ return g_array_new(FALSE, FALSE, sizeof(
LttvToolbarC
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,9
+31,9
@@
inline void lttv_toolbars_destroy(LttvToolbars *h) {
g_array_free(h, TRUE);
}
g_array_free(h, TRUE);
}
-inline
void lttv_toolbars_add(LttvToolbars *h, lttv_constructor f, char* tooltip, char ** pixmap
)
+inline
LttvToolbarClosure lttv_toolbars_add(LttvToolbars *h, lttvwindow_viewer_constructor f, char* tooltip, char ** pixmap, GtkWidget *widget
)
{
{
-
lttv_toolbar_c
losure c;
+
LttvToolbarC
losure c;
/* if h is null, do nothing, or popup a warning message */
if(h == NULL)return;
/* if h is null, do nothing, or popup a warning message */
if(h == NULL)return;
@@
-42,21
+41,29
@@
inline void lttv_toolbars_add(LttvToolbars *h, lttv_constructor f, char* tooltip
c.con = f;
c.tooltip = tooltip;
c.pixmap = pixmap;
c.con = f;
c.tooltip = tooltip;
c.pixmap = pixmap;
+ c.widget = widget;
g_array_append_val(h,c);
g_array_append_val(h,c);
+
+ return c;
}
}
-
gboolean lttv_toolbars_remove(LttvToolbars *h, lttv
_constructor f)
+
GtkWidget *lttv_toolbars_remove(LttvToolbars *h, lttvwindow_viewer
_constructor f)
{
{
-
lttv_toolbar_c
losure * tmp;
+
LttvToolbarC
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_toolbar_closure, i);
- if(tmp->con == f)break;
+ tmp = & g_array_index(h, LttvToolbarClosure, 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
;
}
unsigned lttv_toolbars_number(LttvToolbars *h)
}
unsigned lttv_toolbars_number(LttvToolbars *h)
This page took
0.024976 seconds
and
4
git commands to generate.