Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
f7945cb2
Commit
f7945cb2
authored
Oct 24, 2013
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt operator window, alarm info button for moretext added
parent
07453054
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
150 additions
and
23 deletions
+150
-23
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
+126
-20
xtt/lib/xtt/gtk/xtt_op_gtk.h
xtt/lib/xtt/gtk/xtt_op_gtk.h
+6
-0
xtt/lib/xtt/src/xtt_evlist.cpp
xtt/lib/xtt/src/xtt_evlist.cpp
+10
-0
xtt/lib/xtt/src/xtt_evlist.h
xtt/lib/xtt/src/xtt_evlist.h
+8
-3
xtt/mmi/xtt/src/xtt_alarm_info.png
xtt/mmi/xtt/src/xtt_alarm_info.png
+0
-0
No files found.
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
View file @
f7945cb2
...
@@ -61,6 +61,24 @@
...
@@ -61,6 +61,24 @@
#define OP_HEIGHT_MAX (OP_HEIGHT_MIN + 3 * OP_HEIGHT_INC)
#define OP_HEIGHT_MAX (OP_HEIGHT_MIN + 3 * OP_HEIGHT_INC)
#define OP_HEIGHT_STATUSBAR 30
#define OP_HEIGHT_STATUSBAR 30
static
GtkWidget
*
image_button
(
const
char
*
filename
)
{
GtkWidget
*
image
,
*
box
;
pwr_tFileName
fname
;
box
=
gtk_button_new
();
// gtk_container_set_border_width(GTK_CONTAINER(box), 2);
dcli_translate_filename
(
fname
,
filename
);
image
=
gtk_image_new_from_file
(
fname
);
gtk_container_add
(
GTK_CONTAINER
(
box
),
image
);
g_object_set
(
box
,
"can-focus"
,
FALSE
,
NULL
);
gtk_widget_show
(
image
);
return
box
;
}
static
void
cnv_pango_text
(
char
*
in
,
char
*
out
,
int
size
)
static
void
cnv_pango_text
(
char
*
in
,
char
*
out
,
int
size
)
{
{
...
@@ -135,72 +153,96 @@ OpGtk::OpGtk( void *op_parent_ctx,
...
@@ -135,72 +153,96 @@ OpGtk::OpGtk( void *op_parent_ctx,
alarmcnt_label
=
gtk_label_new
(
""
);
alarmcnt_label
=
gtk_label_new
(
""
);
GtkWidget
*
aalarm_mark
=
gtk_label_new
(
"A"
);
GtkWidget
*
aalarm_mark
=
gtk_label_new
(
"A"
);
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_alarm_active.png"
);
balarm_active
=
gtk_image_new_from_file
(
fname
);
balarm_active
=
gtk_image_new_from_file
(
fname
);
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_alarm_info.png"
);
balarm_info
=
gtk_image_new_from_file
(
fname
);
balarm_mark
=
gtk_label_new
(
""
);
balarm_mark
=
gtk_label_new
(
""
);
balarm_label
=
gtk_label_new
(
""
);
balarm_label
=
gtk_label_new
(
""
);
gtk_misc_set_alignment
(
GTK_MISC
(
balarm_label
),
0.02
,
0.5
);
gtk_misc_set_alignment
(
GTK_MISC
(
balarm_label
),
0.02
,
0.5
);
gtk_label_set_use_markup
(
GTK_LABEL
(
balarm_label
),
TRUE
);
gtk_label_set_use_markup
(
GTK_LABEL
(
balarm_label
),
TRUE
);
aalarm_box
[
0
]
=
gtk_
hbox_new
(
FALSE
,
0
);
aalarm_box
[
0
]
=
gtk_
fixed_new
(
);
GtkWidget
*
ebox1
=
gtk_event_box_new
();
GtkWidget
*
ebox1
=
gtk_event_box_new
();
gtk_container_add
(
GTK_CONTAINER
(
ebox1
),
aalarm_label
[
0
]);
gtk_container_add
(
GTK_CONTAINER
(
ebox1
),
aalarm_label
[
0
]);
gtk_widget_modify_bg
(
ebox1
,
GTK_STATE_NORMAL
,
&
red_color
);
gtk_widget_modify_bg
(
ebox1
,
GTK_STATE_NORMAL
,
&
red_color
);
GtkWidget
*
abox1
=
gtk_event_box_new
();
GtkWidget
*
abox1
=
gtk_event_box_new
();
gtk_widget_set_size_request
(
abox1
,
20
,
20
);
gtk_widget_set_size_request
(
abox1
,
20
,
20
);
gtk_container_add
(
GTK_CONTAINER
(
abox1
),
aalarm_active
[
0
]);
gtk_container_add
(
GTK_CONTAINER
(
abox1
),
aalarm_active
[
0
]);
gtk_box_pack_start
(
GTK_BOX
(
aalarm_box
[
0
]),
abox1
,
FALSE
,
FALSE
,
0
);
aalarm_info
[
0
]
=
image_button
(
"$pwr_exe/xtt_alarm_info.png"
);
gtk_box_pack_start
(
GTK_BOX
(
aalarm_box
[
0
]),
ebox1
,
TRUE
,
TRUE
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
0
]),
abox1
,
0
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
0
]),
aalarm_info
[
0
],
21
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
0
]),
ebox1
,
43
,
0
);
gtk_widget_set_size_request
(
aalarm_label
[
0
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_label
[
0
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_active
[
0
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_active
[
0
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_info
[
0
],
20
,
20
);
g_signal_connect
(
aalarm_info
[
0
],
"clicked"
,
G_CALLBACK
(
activate_info
),
this
);
aalarm_box
[
1
]
=
gtk_
hbox_new
(
FALSE
,
0
);
aalarm_box
[
1
]
=
gtk_
fixed_new
(
);
GtkWidget
*
ebox2
=
gtk_event_box_new
();
GtkWidget
*
ebox2
=
gtk_event_box_new
();
gtk_container_add
(
GTK_CONTAINER
(
ebox2
),
aalarm_label
[
1
]);
gtk_container_add
(
GTK_CONTAINER
(
ebox2
),
aalarm_label
[
1
]);
gtk_widget_modify_bg
(
ebox2
,
GTK_STATE_NORMAL
,
&
red_color
);
gtk_widget_modify_bg
(
ebox2
,
GTK_STATE_NORMAL
,
&
red_color
);
GtkWidget
*
abox2
=
gtk_event_box_new
();
GtkWidget
*
abox2
=
gtk_event_box_new
();
gtk_widget_set_size_request
(
abox2
,
20
,
20
);
gtk_widget_set_size_request
(
abox2
,
20
,
20
);
aalarm_info
[
1
]
=
image_button
(
"$pwr_exe/xtt_alarm_info.png"
);
gtk_container_add
(
GTK_CONTAINER
(
abox2
),
aalarm_active
[
1
]);
gtk_container_add
(
GTK_CONTAINER
(
abox2
),
aalarm_active
[
1
]);
gtk_box_pack_start
(
GTK_BOX
(
aalarm_box
[
1
]),
abox2
,
FALSE
,
FALSE
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
1
]),
abox2
,
0
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
aalarm_box
[
1
]),
ebox2
,
TRUE
,
TRUE
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
1
]),
aalarm_info
[
1
],
21
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
1
]),
ebox2
,
43
,
0
);
gtk_widget_set_size_request
(
aalarm_label
[
1
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_label
[
1
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_active
[
1
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_active
[
1
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_info
[
1
],
20
,
20
);
g_signal_connect
(
aalarm_info
[
1
],
"clicked"
,
G_CALLBACK
(
activate_info
),
this
);
aalarm_box
[
2
]
=
gtk_
hbox_new
(
FALSE
,
0
);
aalarm_box
[
2
]
=
gtk_
fixed_new
(
);
GtkWidget
*
ebox3
=
gtk_event_box_new
();
GtkWidget
*
ebox3
=
gtk_event_box_new
();
gtk_container_add
(
GTK_CONTAINER
(
ebox3
),
aalarm_label
[
2
]);
gtk_container_add
(
GTK_CONTAINER
(
ebox3
),
aalarm_label
[
2
]);
gtk_widget_modify_bg
(
ebox3
,
GTK_STATE_NORMAL
,
&
red_color
);
gtk_widget_modify_bg
(
ebox3
,
GTK_STATE_NORMAL
,
&
red_color
);
GtkWidget
*
abox3
=
gtk_event_box_new
();
GtkWidget
*
abox3
=
gtk_event_box_new
();
gtk_widget_set_size_request
(
abox3
,
20
,
20
);
gtk_widget_set_size_request
(
abox3
,
20
,
20
);
gtk_container_add
(
GTK_CONTAINER
(
abox3
),
aalarm_active
[
2
]);
gtk_container_add
(
GTK_CONTAINER
(
abox3
),
aalarm_active
[
2
]);
gtk_box_pack_start
(
GTK_BOX
(
aalarm_box
[
2
]),
abox3
,
FALSE
,
FALSE
,
0
);
aalarm_info
[
2
]
=
image_button
(
"$pwr_exe/xtt_alarm_info.png"
);
gtk_box_pack_start
(
GTK_BOX
(
aalarm_box
[
2
]),
ebox3
,
TRUE
,
TRUE
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
2
]),
abox3
,
0
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
2
]),
aalarm_info
[
2
],
21
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
2
]),
ebox3
,
43
,
0
);
gtk_widget_set_size_request
(
aalarm_label
[
2
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_label
[
2
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_active
[
2
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_active
[
2
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_info
[
2
],
20
,
20
);
g_signal_connect
(
aalarm_info
[
2
],
"clicked"
,
G_CALLBACK
(
activate_info
),
this
);
aalarm_box
[
3
]
=
gtk_
hbox_new
(
FALSE
,
0
);
aalarm_box
[
3
]
=
gtk_
fixed_new
(
);
GtkWidget
*
ebox4
=
gtk_event_box_new
();
GtkWidget
*
ebox4
=
gtk_event_box_new
();
gtk_container_add
(
GTK_CONTAINER
(
ebox4
),
aalarm_label
[
3
]);
gtk_container_add
(
GTK_CONTAINER
(
ebox4
),
aalarm_label
[
3
]);
gtk_widget_modify_bg
(
ebox4
,
GTK_STATE_NORMAL
,
&
red_color
);
gtk_widget_modify_bg
(
ebox4
,
GTK_STATE_NORMAL
,
&
red_color
);
GtkWidget
*
abox4
=
gtk_event_box_new
();
GtkWidget
*
abox4
=
gtk_event_box_new
();
gtk_widget_set_size_request
(
abox4
,
20
,
20
);
gtk_widget_set_size_request
(
abox4
,
20
,
20
);
gtk_container_add
(
GTK_CONTAINER
(
abox4
),
aalarm_active
[
3
]);
gtk_container_add
(
GTK_CONTAINER
(
abox4
),
aalarm_active
[
3
]);
gtk_box_pack_start
(
GTK_BOX
(
aalarm_box
[
3
]),
abox4
,
FALSE
,
FALSE
,
0
);
aalarm_info
[
3
]
=
image_button
(
"$pwr_exe/xtt_alarm_info.png"
);
gtk_box_pack_start
(
GTK_BOX
(
aalarm_box
[
3
]),
ebox4
,
TRUE
,
TRUE
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
3
]),
abox4
,
0
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
3
]),
aalarm_info
[
3
],
21
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
3
]),
ebox4
,
43
,
0
);
gtk_widget_set_size_request
(
aalarm_label
[
3
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_label
[
3
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_active
[
3
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_active
[
3
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_info
[
3
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_info
[
3
],
20
,
20
);
g_signal_connect
(
aalarm_info
[
3
],
"clicked"
,
G_CALLBACK
(
activate_info
),
this
);
aalarm_box
[
4
]
=
gtk_
hbox_new
(
FALSE
,
0
);
aalarm_box
[
4
]
=
gtk_
fixed_new
(
);
GtkWidget
*
ebox5
=
gtk_event_box_new
();
GtkWidget
*
ebox5
=
gtk_event_box_new
();
gtk_container_add
(
GTK_CONTAINER
(
ebox5
),
aalarm_label
[
4
]);
gtk_container_add
(
GTK_CONTAINER
(
ebox5
),
aalarm_label
[
4
]);
gtk_widget_modify_bg
(
ebox5
,
GTK_STATE_NORMAL
,
&
red_color
);
gtk_widget_modify_bg
(
ebox5
,
GTK_STATE_NORMAL
,
&
red_color
);
GtkWidget
*
abox5
=
gtk_event_box_new
();
GtkWidget
*
abox5
=
gtk_event_box_new
();
gtk_widget_set_size_request
(
abox5
,
20
,
20
);
gtk_widget_set_size_request
(
abox5
,
20
,
20
);
aalarm_info
[
4
]
=
image_button
(
"$pwr_exe/xtt_alarm_info.png"
);
gtk_container_add
(
GTK_CONTAINER
(
abox5
),
aalarm_active
[
4
]);
gtk_container_add
(
GTK_CONTAINER
(
abox5
),
aalarm_active
[
4
]);
gtk_box_pack_start
(
GTK_BOX
(
aalarm_box
[
4
]),
abox5
,
FALSE
,
FALSE
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
4
]),
abox5
,
0
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
aalarm_box
[
4
]),
ebox5
,
TRUE
,
TRUE
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
4
]),
aalarm_info
[
4
],
21
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
aalarm_box
[
4
]),
ebox5
,
43
,
0
);
gtk_widget_set_size_request
(
aalarm_label
[
4
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_label
[
4
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_active
[
4
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_active
[
4
],
-
1
,
20
);
gtk_widget_set_size_request
(
aalarm_info
[
4
],
20
,
20
);
g_signal_connect
(
aalarm_info
[
4
],
"clicked"
,
G_CALLBACK
(
activate_info
),
this
);
GtkWidget
*
vbox_aalarm
=
gtk_vbox_new
(
FALSE
,
0
);
GtkWidget
*
vbox_aalarm
=
gtk_vbox_new
(
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
vbox_aalarm
),
aalarm_box
[
0
],
FALSE
,
FALSE
,
1
);
gtk_box_pack_start
(
GTK_BOX
(
vbox_aalarm
),
aalarm_box
[
0
],
FALSE
,
FALSE
,
1
);
...
@@ -214,10 +256,14 @@ OpGtk::OpGtk( void *op_parent_ctx,
...
@@ -214,10 +256,14 @@ OpGtk::OpGtk( void *op_parent_ctx,
GtkWidget
*
bbox
=
gtk_event_box_new
();
GtkWidget
*
bbox
=
gtk_event_box_new
();
gtk_container_add
(
GTK_CONTAINER
(
bbox
),
balarm_active
);
gtk_container_add
(
GTK_CONTAINER
(
bbox
),
balarm_active
);
gtk_widget_set_size_request
(
bbox
,
20
,
20
);
gtk_widget_set_size_request
(
bbox
,
20
,
20
);
balarm_info
=
image_button
(
"$pwr_exe/xtt_alarm_info.png"
);
balarm_box
=
gtk_hbox_new
(
FALSE
,
0
);
balarm_box
=
gtk_fixed_new
();
gtk_box_pack_start
(
GTK_BOX
(
balarm_box
),
bbox
,
FALSE
,
FALSE
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
balarm_box
),
bbox
,
0
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
balarm_box
),
balarm_ebox
,
TRUE
,
TRUE
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
balarm_box
),
balarm_info
,
21
,
0
);
gtk_fixed_put
(
GTK_FIXED
(
balarm_box
),
balarm_ebox
,
43
,
0
);
gtk_widget_set_size_request
(
balarm_info
,
20
,
20
);
g_signal_connect
(
balarm_info
,
"clicked"
,
G_CALLBACK
(
activate_info
),
this
);
// Acknowledge button for a alarms
// Acknowledge button for a alarms
GtkWidget
*
aalarm_ack
=
gtk_button_new
();
GtkWidget
*
aalarm_ack
=
gtk_button_new
();
...
@@ -785,6 +831,7 @@ void OpGtk::update_alarm_info()
...
@@ -785,6 +831,7 @@ void OpGtk::update_alarm_info()
for
(
i
=
0
;
i
<
5
;
i
++
)
{
for
(
i
=
0
;
i
<
5
;
i
++
)
{
a_exist
[
i
]
=
info
.
a_alarm_exist
[
i
];
a_exist
[
i
]
=
info
.
a_alarm_exist
[
i
];
a_active
[
i
]
=
info
.
a_alarm_active
[
i
];
a_active
[
i
]
=
info
.
a_alarm_active
[
i
];
strcpy
(
a_alarm_moretext
[
i
],
info
.
a_alarm_moretext
[
i
]);
if
(
info
.
a_alarm_exist
[
i
])
{
if
(
info
.
a_alarm_exist
[
i
])
{
...
@@ -816,6 +863,12 @@ void OpGtk::update_alarm_info()
...
@@ -816,6 +863,12 @@ void OpGtk::update_alarm_info()
else
{
else
{
g_object_set
(
aalarm_active
[
i
],
"visible"
,
FALSE
,
NULL
);
g_object_set
(
aalarm_active
[
i
],
"visible"
,
FALSE
,
NULL
);
}
}
if
(
strcmp
(
info
.
a_alarm_moretext
[
i
],
""
)
!=
0
)
{
g_object_set
(
aalarm_info
[
i
],
"visible"
,
TRUE
,
NULL
);
}
else
{
g_object_set
(
aalarm_info
[
i
],
"visible"
,
FALSE
,
NULL
);
}
}
}
}
}
else
{
else
{
...
@@ -832,6 +885,7 @@ void OpGtk::update_alarm_info()
...
@@ -832,6 +885,7 @@ void OpGtk::update_alarm_info()
balarm_type
=
evlist_eEventType_Alarm
;
balarm_type
=
evlist_eEventType_Alarm
;
balarm_prio
=
mh_eEventPrio_B
;
balarm_prio
=
mh_eEventPrio_B
;
strcpy
(
b_alarm_moretext
,
info
.
b_alarm_moretext
[
0
]);
cnv_pango_text
(
info
.
b_alarm_text
[
0
],
ctext
,
sizeof
(
ctext
));
cnv_pango_text
(
info
.
b_alarm_text
[
0
],
ctext
,
sizeof
(
ctext
));
...
@@ -859,6 +913,12 @@ void OpGtk::update_alarm_info()
...
@@ -859,6 +913,12 @@ void OpGtk::update_alarm_info()
else
{
else
{
g_object_set
(
balarm_active
,
"visible"
,
FALSE
,
NULL
);
g_object_set
(
balarm_active
,
"visible"
,
FALSE
,
NULL
);
}
}
if
(
strcmp
(
info
.
b_alarm_moretext
[
0
],
""
)
!=
0
)
{
g_object_set
(
balarm_info
,
"visible"
,
TRUE
,
NULL
);
}
else
{
g_object_set
(
balarm_info
,
"visible"
,
FALSE
,
NULL
);
}
}
}
else
if
(
info
.
c_alarm_exist
[
0
])
{
else
if
(
info
.
c_alarm_exist
[
0
])
{
GdkColor
blue_color
;
GdkColor
blue_color
;
...
@@ -866,6 +926,7 @@ void OpGtk::update_alarm_info()
...
@@ -866,6 +926,7 @@ void OpGtk::update_alarm_info()
balarm_type
=
evlist_eEventType_Alarm
;
balarm_type
=
evlist_eEventType_Alarm
;
balarm_prio
=
mh_eEventPrio_C
;
balarm_prio
=
mh_eEventPrio_C
;
strcpy
(
b_alarm_moretext
,
info
.
c_alarm_moretext
[
0
]);
cnv_pango_text
(
info
.
c_alarm_text
[
0
],
ctext
,
sizeof
(
ctext
));
cnv_pango_text
(
info
.
c_alarm_text
[
0
],
ctext
,
sizeof
(
ctext
));
if
(
show_time
)
{
if
(
show_time
)
{
sts
=
time_AtoAscii
(
&
info
.
c_alarm_time
[
0
],
time_format
,
timestr
,
sizeof
(
timestr
));
sts
=
time_AtoAscii
(
&
info
.
c_alarm_time
[
0
],
time_format
,
timestr
,
sizeof
(
timestr
));
...
@@ -884,12 +945,18 @@ void OpGtk::update_alarm_info()
...
@@ -884,12 +945,18 @@ void OpGtk::update_alarm_info()
gtk_label_set_text
(
GTK_LABEL
(
balarm_mark
),
"C"
);
gtk_label_set_text
(
GTK_LABEL
(
balarm_mark
),
"C"
);
if
(
info
.
b
_alarm_active
[
0
])
{
if
(
info
.
c
_alarm_active
[
0
])
{
g_object_set
(
balarm_active
,
"visible"
,
TRUE
,
NULL
);
g_object_set
(
balarm_active
,
"visible"
,
TRUE
,
NULL
);
}
}
else
{
else
{
g_object_set
(
balarm_active
,
"visible"
,
FALSE
,
NULL
);
g_object_set
(
balarm_active
,
"visible"
,
FALSE
,
NULL
);
}
}
if
(
strcmp
(
info
.
c_alarm_moretext
[
0
],
""
)
!=
0
)
{
g_object_set
(
balarm_info
,
"visible"
,
TRUE
,
NULL
);
}
else
{
g_object_set
(
balarm_info
,
"visible"
,
FALSE
,
NULL
);
}
}
}
else
if
(
info
.
d_alarm_exist
[
0
])
else
if
(
info
.
d_alarm_exist
[
0
])
{
{
...
@@ -898,6 +965,7 @@ void OpGtk::update_alarm_info()
...
@@ -898,6 +965,7 @@ void OpGtk::update_alarm_info()
balarm_type
=
evlist_eEventType_Alarm
;
balarm_type
=
evlist_eEventType_Alarm
;
balarm_prio
=
mh_eEventPrio_D
;
balarm_prio
=
mh_eEventPrio_D
;
strcpy
(
b_alarm_moretext
,
info
.
d_alarm_moretext
[
0
]);
cnv_pango_text
(
info
.
d_alarm_text
[
0
],
ctext
,
sizeof
(
ctext
));
cnv_pango_text
(
info
.
d_alarm_text
[
0
],
ctext
,
sizeof
(
ctext
));
if
(
show_time
)
{
if
(
show_time
)
{
sts
=
time_AtoAscii
(
&
info
.
d_alarm_time
[
0
],
time_format
,
timestr
,
sizeof
(
timestr
));
sts
=
time_AtoAscii
(
&
info
.
d_alarm_time
[
0
],
time_format
,
timestr
,
sizeof
(
timestr
));
...
@@ -922,6 +990,12 @@ void OpGtk::update_alarm_info()
...
@@ -922,6 +990,12 @@ void OpGtk::update_alarm_info()
else
{
else
{
g_object_set
(
balarm_active
,
"visible"
,
FALSE
,
NULL
);
g_object_set
(
balarm_active
,
"visible"
,
FALSE
,
NULL
);
}
}
if
(
strcmp
(
info
.
d_alarm_moretext
[
0
],
""
)
!=
0
)
{
g_object_set
(
balarm_info
,
"visible"
,
TRUE
,
NULL
);
}
else
{
g_object_set
(
balarm_info
,
"visible"
,
FALSE
,
NULL
);
}
}
}
else
if
(
info
.
i_alarm_exist
[
0
])
else
if
(
info
.
i_alarm_exist
[
0
])
{
{
...
@@ -929,6 +1003,7 @@ void OpGtk::update_alarm_info()
...
@@ -929,6 +1003,7 @@ void OpGtk::update_alarm_info()
gdk_color_parse
(
"Green"
,
&
green_color
);
gdk_color_parse
(
"Green"
,
&
green_color
);
balarm_type
=
evlist_eEventType_Info
;
balarm_type
=
evlist_eEventType_Info
;
strcpy
(
b_alarm_moretext
,
info
.
i_alarm_moretext
[
0
]);
cnv_pango_text
(
info
.
i_alarm_text
[
0
],
ctext
,
sizeof
(
ctext
));
cnv_pango_text
(
info
.
i_alarm_text
[
0
],
ctext
,
sizeof
(
ctext
));
if
(
show_time
)
{
if
(
show_time
)
{
sts
=
time_AtoAscii
(
&
info
.
i_alarm_time
[
0
],
time_format
,
timestr
,
sizeof
(
timestr
));
sts
=
time_AtoAscii
(
&
info
.
i_alarm_time
[
0
],
time_format
,
timestr
,
sizeof
(
timestr
));
...
@@ -947,12 +1022,18 @@ void OpGtk::update_alarm_info()
...
@@ -947,12 +1022,18 @@ void OpGtk::update_alarm_info()
gtk_label_set_text
(
GTK_LABEL
(
balarm_mark
),
"I"
);
gtk_label_set_text
(
GTK_LABEL
(
balarm_mark
),
"I"
);
if
(
info
.
b
_alarm_active
[
0
])
{
if
(
info
.
i
_alarm_active
[
0
])
{
g_object_set
(
balarm_active
,
"visible"
,
TRUE
,
NULL
);
g_object_set
(
balarm_active
,
"visible"
,
TRUE
,
NULL
);
}
}
else
{
else
{
g_object_set
(
balarm_active
,
"visible"
,
FALSE
,
NULL
);
g_object_set
(
balarm_active
,
"visible"
,
FALSE
,
NULL
);
}
}
if
(
strcmp
(
info
.
i_alarm_moretext
[
0
],
""
)
!=
0
)
{
g_object_set
(
balarm_info
,
"visible"
,
TRUE
,
NULL
);
}
else
{
g_object_set
(
balarm_info
,
"visible"
,
FALSE
,
NULL
);
}
}
}
else
{
else
{
gtk_label_set_text
(
GTK_LABEL
(
balarm_label
),
""
);
gtk_label_set_text
(
GTK_LABEL
(
balarm_label
),
""
);
...
@@ -961,6 +1042,7 @@ void OpGtk::update_alarm_info()
...
@@ -961,6 +1042,7 @@ void OpGtk::update_alarm_info()
g_object_set
(
balarm_box
,
"visible"
,
FALSE
,
NULL
);
g_object_set
(
balarm_box
,
"visible"
,
FALSE
,
NULL
);
g_object_set
(
balarm_active
,
"visible"
,
FALSE
,
NULL
);
g_object_set
(
balarm_active
,
"visible"
,
FALSE
,
NULL
);
g_object_set
(
balarm_info
,
"visible"
,
FALSE
,
NULL
);
}
}
}
}
}
}
...
@@ -1270,6 +1352,7 @@ void OpGtk::activate_aalarm_decr( GtkWidget *w, gpointer data)
...
@@ -1270,6 +1352,7 @@ void OpGtk::activate_aalarm_decr( GtkWidget *w, gpointer data)
if
(
op
->
a_exist
[
i
])
{
if
(
op
->
a_exist
[
i
])
{
g_object_set
(
op
->
aalarm_box
[
i
],
"visible"
,
FALSE
,
NULL
);
g_object_set
(
op
->
aalarm_box
[
i
],
"visible"
,
FALSE
,
NULL
);
g_object_set
(
op
->
aalarm_active
[
i
],
"visible"
,
FALSE
,
NULL
);
g_object_set
(
op
->
aalarm_active
[
i
],
"visible"
,
FALSE
,
NULL
);
g_object_set
(
op
->
aalarm_info
[
i
],
"visible"
,
FALSE
,
NULL
);
}
}
}
}
}
}
...
@@ -1582,6 +1665,29 @@ void OpGtk::activate_appl25( GtkWidget *w, gpointer data)
...
@@ -1582,6 +1665,29 @@ void OpGtk::activate_appl25( GtkWidget *w, gpointer data)
op
->
appl_action
(
24
);
op
->
appl_action
(
24
);
}
}
void
OpGtk
::
activate_info
(
GtkWidget
*
w
,
gpointer
data
)
{
OpGtk
*
op
=
(
OpGtk
*
)
data
;
char
*
more
;
if
(
w
==
op
->
aalarm_info
[
0
])
more
=
op
->
a_alarm_moretext
[
0
];
else
if
(
w
==
op
->
aalarm_info
[
1
])
more
=
op
->
a_alarm_moretext
[
1
];
else
if
(
w
==
op
->
aalarm_info
[
2
])
more
=
op
->
a_alarm_moretext
[
2
];
else
if
(
w
==
op
->
aalarm_info
[
3
])
more
=
op
->
a_alarm_moretext
[
3
];
else
if
(
w
==
op
->
aalarm_info
[
4
])
more
=
op
->
a_alarm_moretext
[
4
];
else
if
(
w
==
op
->
balarm_info
)
more
=
op
->
b_alarm_moretext
;
else
return
;
op
->
wow
->
DisplayText
(
"Event MoreText"
,
more
);
}
int
OpGtk
::
get_cmd
(
GtkWidget
*
w
,
char
*
cmd
)
int
OpGtk
::
get_cmd
(
GtkWidget
*
w
,
char
*
cmd
)
{
{
for
(
unsigned
int
i
=
0
;
i
<
cmd_vect
.
size
();
i
++
)
{
for
(
unsigned
int
i
=
0
;
i
<
cmd_vect
.
size
();
i
++
)
{
...
...
xtt/lib/xtt/gtk/xtt_op_gtk.h
View file @
f7945cb2
...
@@ -72,9 +72,12 @@ class OpGtk : public Op {
...
@@ -72,9 +72,12 @@ class OpGtk : public Op {
GtkWidget
*
alarmcnt_label
;
GtkWidget
*
alarmcnt_label
;
GtkWidget
*
aalarm_label
[
5
];
GtkWidget
*
aalarm_label
[
5
];
GtkWidget
*
aalarm_active
[
5
];
GtkWidget
*
aalarm_active
[
5
];
GtkWidget
*
aalarm_info
[
5
];
GtkWidget
*
aalarm_filler
[
5
];
GtkWidget
*
aalarm_box
[
5
];
GtkWidget
*
aalarm_box
[
5
];
GtkWidget
*
balarm_label
;
GtkWidget
*
balarm_label
;
GtkWidget
*
balarm_active
;
GtkWidget
*
balarm_active
;
GtkWidget
*
balarm_info
;
GtkWidget
*
balarm_box
;
GtkWidget
*
balarm_box
;
GtkWidget
*
balarm_ebox
;
GtkWidget
*
balarm_ebox
;
GtkWidget
*
balarm_mark
;
GtkWidget
*
balarm_mark
;
...
@@ -88,6 +91,8 @@ class OpGtk : public Op {
...
@@ -88,6 +91,8 @@ class OpGtk : public Op {
int
a_height
;
int
a_height
;
int
a_exist
[
5
];
int
a_exist
[
5
];
int
a_active
[
5
];
int
a_active
[
5
];
char
a_alarm_moretext
[
5
][
256
];
char
b_alarm_moretext
[
256
];
int
text_size
;
int
text_size
;
CoWowFocusTimerGtk
poptimer
;
CoWowFocusTimerGtk
poptimer
;
vector
<
OpCmd
>
cmd_vect
;
vector
<
OpCmd
>
cmd_vect
;
...
@@ -152,6 +157,7 @@ class OpGtk : public Op {
...
@@ -152,6 +157,7 @@ class OpGtk : public Op {
static
void
activate_appl23
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_appl23
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_appl24
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_appl24
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_appl25
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_appl25
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_info
(
GtkWidget
*
w
,
gpointer
data
);
};
};
#endif
#endif
xtt/lib/xtt/src/xtt_evlist.cpp
View file @
f7945cb2
...
@@ -2395,6 +2395,8 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
...
@@ -2395,6 +2395,8 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
break
;
break
;
strncpy
(
info
->
a_alarm_text
[
a_cnt
],
eventtext
,
strncpy
(
info
->
a_alarm_text
[
a_cnt
],
eventtext
,
sizeof
(
info
->
a_alarm_text
[
0
]));
sizeof
(
info
->
a_alarm_text
[
0
]));
strncpy
(
info
->
a_alarm_moretext
[
a_cnt
],
object_item
->
eventmoretext
,
sizeof
(
info
->
a_alarm_moretext
[
0
]));
info
->
a_alarm_text
[
a_cnt
][
sizeof
(
info
->
a_alarm_text
[
0
])
-
1
]
=
0
;
info
->
a_alarm_text
[
a_cnt
][
sizeof
(
info
->
a_alarm_text
[
0
])
-
1
]
=
0
;
strncpy
(
info
->
a_alarm_alias
[
a_cnt
],
object_item
->
alias
,
strncpy
(
info
->
a_alarm_alias
[
a_cnt
],
object_item
->
alias
,
sizeof
(
info
->
a_alarm_alias
[
0
]));
sizeof
(
info
->
a_alarm_alias
[
0
]));
...
@@ -2408,6 +2410,8 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
...
@@ -2408,6 +2410,8 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
break
;
break
;
strncpy
(
info
->
b_alarm_text
[
b_cnt
],
eventtext
,
strncpy
(
info
->
b_alarm_text
[
b_cnt
],
eventtext
,
sizeof
(
info
->
b_alarm_text
[
0
]));
sizeof
(
info
->
b_alarm_text
[
0
]));
strncpy
(
info
->
b_alarm_moretext
[
b_cnt
],
object_item
->
eventmoretext
,
sizeof
(
info
->
b_alarm_moretext
[
0
]));
info
->
b_alarm_text
[
b_cnt
][
sizeof
(
info
->
b_alarm_text
[
0
])
-
1
]
=
0
;
info
->
b_alarm_text
[
b_cnt
][
sizeof
(
info
->
b_alarm_text
[
0
])
-
1
]
=
0
;
strncpy
(
info
->
b_alarm_alias
[
b_cnt
],
object_item
->
alias
,
strncpy
(
info
->
b_alarm_alias
[
b_cnt
],
object_item
->
alias
,
sizeof
(
info
->
b_alarm_alias
[
0
]));
sizeof
(
info
->
b_alarm_alias
[
0
]));
...
@@ -2421,6 +2425,8 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
...
@@ -2421,6 +2425,8 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
break
;
break
;
strncpy
(
info
->
c_alarm_text
[
c_cnt
],
eventtext
,
strncpy
(
info
->
c_alarm_text
[
c_cnt
],
eventtext
,
sizeof
(
info
->
c_alarm_text
[
0
]));
sizeof
(
info
->
c_alarm_text
[
0
]));
strncpy
(
info
->
c_alarm_moretext
[
c_cnt
],
object_item
->
eventmoretext
,
sizeof
(
info
->
c_alarm_moretext
[
0
]));
info
->
c_alarm_text
[
c_cnt
][
sizeof
(
info
->
c_alarm_text
[
0
])
-
1
]
=
0
;
info
->
c_alarm_text
[
c_cnt
][
sizeof
(
info
->
c_alarm_text
[
0
])
-
1
]
=
0
;
strncpy
(
info
->
c_alarm_alias
[
c_cnt
],
object_item
->
alias
,
strncpy
(
info
->
c_alarm_alias
[
c_cnt
],
object_item
->
alias
,
sizeof
(
info
->
c_alarm_alias
[
0
]));
sizeof
(
info
->
c_alarm_alias
[
0
]));
...
@@ -2434,6 +2440,8 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
...
@@ -2434,6 +2440,8 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
break
;
break
;
strncpy
(
info
->
d_alarm_text
[
d_cnt
],
eventtext
,
strncpy
(
info
->
d_alarm_text
[
d_cnt
],
eventtext
,
sizeof
(
info
->
d_alarm_text
[
0
]));
sizeof
(
info
->
d_alarm_text
[
0
]));
strncpy
(
info
->
d_alarm_moretext
[
d_cnt
],
object_item
->
eventmoretext
,
sizeof
(
info
->
d_alarm_moretext
[
0
]));
info
->
d_alarm_text
[
d_cnt
][
sizeof
(
info
->
d_alarm_text
[
0
])
-
1
]
=
0
;
info
->
d_alarm_text
[
d_cnt
][
sizeof
(
info
->
d_alarm_text
[
0
])
-
1
]
=
0
;
strncpy
(
info
->
d_alarm_alias
[
d_cnt
],
object_item
->
alias
,
strncpy
(
info
->
d_alarm_alias
[
d_cnt
],
object_item
->
alias
,
sizeof
(
info
->
d_alarm_alias
[
0
]));
sizeof
(
info
->
d_alarm_alias
[
0
]));
...
@@ -2455,6 +2463,8 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
...
@@ -2455,6 +2463,8 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
break
;
break
;
strncpy
(
info
->
i_alarm_text
[
i_cnt
],
object_item
->
eventtext
,
strncpy
(
info
->
i_alarm_text
[
i_cnt
],
object_item
->
eventtext
,
sizeof
(
info
->
i_alarm_text
[
0
]));
sizeof
(
info
->
i_alarm_text
[
0
]));
strncpy
(
info
->
i_alarm_moretext
[
i_cnt
],
object_item
->
eventmoretext
,
sizeof
(
info
->
i_alarm_moretext
[
0
]));
strncpy
(
info
->
i_alarm_alias
[
i_cnt
],
object_item
->
alias
,
strncpy
(
info
->
i_alarm_alias
[
i_cnt
],
object_item
->
alias
,
sizeof
(
info
->
i_alarm_alias
[
0
]));
sizeof
(
info
->
i_alarm_alias
[
0
]));
info
->
i_alarm_time
[
i_cnt
]
=
object_item
->
time
;
info
->
i_alarm_time
[
i_cnt
]
=
object_item
->
time
;
...
...
xtt/lib/xtt/src/xtt_evlist.h
View file @
f7945cb2
...
@@ -76,27 +76,32 @@ class ItemAlarm;
...
@@ -76,27 +76,32 @@ class ItemAlarm;
#define ALARM_INFO_I_SIZE 2
#define ALARM_INFO_I_SIZE 2
typedef
struct
{
typedef
struct
{
char
a_alarm_text
[
ALARM_INFO_A_SIZE
][
80
];
char
a_alarm_text
[
ALARM_INFO_A_SIZE
][
80
];
char
a_alarm_moretext
[
ALARM_INFO_A_SIZE
][
256
];
char
a_alarm_alias
[
ALARM_INFO_A_SIZE
][
40
];
char
a_alarm_alias
[
ALARM_INFO_A_SIZE
][
40
];
pwr_tTime
a_alarm_time
[
ALARM_INFO_A_SIZE
];
pwr_tTime
a_alarm_time
[
ALARM_INFO_A_SIZE
];
int
a_alarm_active
[
ALARM_INFO_A_SIZE
];
int
a_alarm_active
[
ALARM_INFO_A_SIZE
];
int
a_alarm_exist
[
ALARM_INFO_A_SIZE
];
int
a_alarm_exist
[
ALARM_INFO_A_SIZE
];
char
b_alarm_text
[
ALARM_INFO_B_SIZE
][
80
];
char
b_alarm_text
[
ALARM_INFO_B_SIZE
][
80
];
char
b_alarm_alias
[
ALARM_INFO_A_SIZE
][
40
];
char
b_alarm_moretext
[
ALARM_INFO_B_SIZE
][
256
];
char
b_alarm_alias
[
ALARM_INFO_B_SIZE
][
40
];
pwr_tTime
b_alarm_time
[
ALARM_INFO_B_SIZE
];
pwr_tTime
b_alarm_time
[
ALARM_INFO_B_SIZE
];
int
b_alarm_active
[
ALARM_INFO_B_SIZE
];
int
b_alarm_active
[
ALARM_INFO_B_SIZE
];
int
b_alarm_exist
[
ALARM_INFO_B_SIZE
];
int
b_alarm_exist
[
ALARM_INFO_B_SIZE
];
char
c_alarm_text
[
ALARM_INFO_C_SIZE
][
80
];
char
c_alarm_text
[
ALARM_INFO_C_SIZE
][
80
];
char
c_alarm_alias
[
ALARM_INFO_A_SIZE
][
40
];
char
c_alarm_moretext
[
ALARM_INFO_C_SIZE
][
256
];
char
c_alarm_alias
[
ALARM_INFO_C_SIZE
][
40
];
pwr_tTime
c_alarm_time
[
ALARM_INFO_C_SIZE
];
pwr_tTime
c_alarm_time
[
ALARM_INFO_C_SIZE
];
int
c_alarm_active
[
ALARM_INFO_C_SIZE
];
int
c_alarm_active
[
ALARM_INFO_C_SIZE
];
int
c_alarm_exist
[
ALARM_INFO_C_SIZE
];
int
c_alarm_exist
[
ALARM_INFO_C_SIZE
];
char
d_alarm_text
[
ALARM_INFO_D_SIZE
][
80
];
char
d_alarm_text
[
ALARM_INFO_D_SIZE
][
80
];
char
d_alarm_moretext
[
ALARM_INFO_A_SIZE
][
256
];
char
d_alarm_alias
[
ALARM_INFO_A_SIZE
][
40
];
char
d_alarm_alias
[
ALARM_INFO_A_SIZE
][
40
];
pwr_tTime
d_alarm_time
[
ALARM_INFO_D_SIZE
];
pwr_tTime
d_alarm_time
[
ALARM_INFO_D_SIZE
];
int
d_alarm_active
[
ALARM_INFO_D_SIZE
];
int
d_alarm_active
[
ALARM_INFO_D_SIZE
];
int
d_alarm_exist
[
ALARM_INFO_D_SIZE
];
int
d_alarm_exist
[
ALARM_INFO_D_SIZE
];
char
i_alarm_text
[
ALARM_INFO_I_SIZE
][
80
];
char
i_alarm_text
[
ALARM_INFO_I_SIZE
][
80
];
char
i_alarm_alias
[
ALARM_INFO_A_SIZE
][
40
];
char
i_alarm_moretext
[
ALARM_INFO_I_SIZE
][
256
];
char
i_alarm_alias
[
ALARM_INFO_I_SIZE
][
40
];
pwr_tTime
i_alarm_time
[
ALARM_INFO_I_SIZE
];
pwr_tTime
i_alarm_time
[
ALARM_INFO_I_SIZE
];
int
i_alarm_active
[
ALARM_INFO_I_SIZE
];
int
i_alarm_active
[
ALARM_INFO_I_SIZE
];
int
i_alarm_exist
[
ALARM_INFO_I_SIZE
];
int
i_alarm_exist
[
ALARM_INFO_I_SIZE
];
...
...
xtt/mmi/xtt/src/xtt_alarm_info.png
0 → 100644
View file @
f7945cb2
586 Bytes
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