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
172d85db
Commit
172d85db
authored
Feb 26, 2009
by
Claes pwr46/data0/x4-6-0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Home button in help window added
parent
0f313ceb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
3 deletions
+56
-3
src/lib/co/gtk/co_xhelp_gtk.cpp
src/lib/co/gtk/co_xhelp_gtk.cpp
+23
-1
src/lib/co/gtk/co_xhelp_gtk.h
src/lib/co/gtk/co_xhelp_gtk.h
+1
-0
src/lib/co/src/co_xhelp.cpp
src/lib/co/src/co_xhelp.cpp
+5
-0
src/lib/co/src/co_xhelp.h
src/lib/co/src/co_xhelp.h
+1
-0
src/lib/co/src/co_xhelpnav.cpp
src/lib/co/src/co_xhelpnav.cpp
+25
-2
src/lib/co/src/co_xhelpnav.h
src/lib/co/src/co_xhelpnav.h
+1
-0
xtt/mmi/xtt/src/xtt_home.png
xtt/mmi/xtt/src/xtt_home.png
+0
-0
No files found.
src/lib/co/gtk/co_xhelp_gtk.cpp
View file @
172d85db
...
...
@@ -73,6 +73,13 @@ void CoXHelpGtk::activate_back( GtkWidget *w, gpointer data)
xhelp
->
back
();
}
void
CoXHelpGtk
::
activate_home
(
GtkWidget
*
w
,
gpointer
data
)
{
CoXHelpGtk
*
xhelp
=
(
CoXHelpGtk
*
)
data
;
xhelp
->
home
();
}
void
CoXHelpGtk
::
activate_nexttopic
(
GtkWidget
*
w
,
gpointer
data
)
{
CoXHelpGtk
*
xhelp
=
(
CoXHelpGtk
*
)
data
;
...
...
@@ -263,6 +270,12 @@ CoXHelpGtk::CoXHelpGtk(
GtkWidget
*
file_close
=
gtk_image_menu_item_new_from_stock
(
GTK_STOCK_CLOSE
,
accel_g
);
g_signal_connect
(
file_close
,
"activate"
,
G_CALLBACK
(
CoXHelpGtk
::
activate_close
),
this
);
GtkWidget
*
file_home
=
gtk_menu_item_new_with_mnemonic
(
"_Home"
);
g_signal_connect
(
file_home
,
"activate"
,
G_CALLBACK
(
activate_home
),
this
);
gtk_widget_add_accelerator
(
file_home
,
"activate"
,
accel_g
,
'a'
,
GDK_CONTROL_MASK
,
GTK_ACCEL_VISIBLE
);
GtkWidget
*
file_back
=
gtk_menu_item_new_with_mnemonic
(
"_Back"
);
g_signal_connect
(
file_back
,
"activate"
,
G_CALLBACK
(
activate_back
),
this
);
...
...
@@ -283,6 +296,7 @@ CoXHelpGtk::CoXHelpGtk(
GtkMenu
*
file_menu
=
(
GtkMenu
*
)
g_object_new
(
GTK_TYPE_MENU
,
NULL
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_close
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_home
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_back
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_nexttopic
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_prevtopic
);
...
...
@@ -305,7 +319,7 @@ CoXHelpGtk::CoXHelpGtk(
g_signal_connect
(
edit_searchprevious
,
"activate"
,
G_CALLBACK
(
CoXHelpGtk
::
activate_searchprevious
),
this
);
gtk_widget_add_accelerator
(
edit_searchprevious
,
"activate"
,
accel_g
,
'
g
'
,
GDK_CONTROL_MASK
,
GTK_ACCEL_VISIBLE
);
'
d
'
,
GDK_CONTROL_MASK
,
GTK_ACCEL_VISIBLE
);
GtkMenu
*
edit_menu
=
(
GtkMenu
*
)
g_object_new
(
GTK_TYPE_MENU
,
NULL
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
edit_menu
),
edit_search
);
...
...
@@ -352,6 +366,14 @@ CoXHelpGtk::CoXHelpGtk(
// Toolbar
GtkWidget
*
tools_home
=
gtk_button_new
();
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_home.png"
);
gtk_container_add
(
GTK_CONTAINER
(
tools_home
),
gtk_image_new_from_file
(
fname
));
g_signal_connect
(
tools_home
,
"clicked"
,
G_CALLBACK
(
activate_home
),
this
);
g_object_set
(
tools_home
,
"can-focus"
,
FALSE
,
NULL
);
gtk_toolbar_append_widget
(
tools
,
tools_home
,
CoWowGtk
::
translate_utf8
(
"Go to start page"
),
""
);
GtkWidget
*
tools_back
=
gtk_button_new
();
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_back.png"
);
gtk_container_add
(
GTK_CONTAINER
(
tools_back
),
...
...
src/lib/co/gtk/co_xhelp_gtk.h
View file @
172d85db
...
...
@@ -53,6 +53,7 @@ class CoXHelpGtk : public CoXHelp {
const
char
*
init_text
,
void
(
*
ok_cb
)(
CoXHelp
*
,
char
*
));
static
void
activate_close
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_home
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_back
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_nexttopic
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_previoustopic
(
GtkWidget
*
w
,
gpointer
data
);
...
...
src/lib/co/src/co_xhelp.cpp
View file @
172d85db
...
...
@@ -74,6 +74,11 @@ int CoXHelp::help( const char *key, const char *help_bookmark, navh_eHelpFile fi
file_name
,
0
,
strict
);
}
int
CoXHelp
::
home
()
{
return
xhelpnav
->
home
();
}
int
CoXHelp
::
back
()
{
return
xhelpnav
->
back
();
...
...
src/lib/co/src/co_xhelp.h
View file @
172d85db
...
...
@@ -54,6 +54,7 @@ class CoXHelp {
int
help
(
const
char
*
key
,
const
char
*
help_bookmark
,
navh_eHelpFile
file_type
,
const
char
*
file_name
,
bool
strict
);
int
help_index
(
navh_eHelpFile
file_type
,
const
char
*
file_name
);
int
home
();
int
back
();
int
next_topic
();
int
previous_topic
();
...
...
src/lib/co/src/co_xhelpnav.cpp
View file @
172d85db
...
...
@@ -164,7 +164,7 @@ void CoXHelpNavBrow::create_nodeclasses()
brow_AddAnnot
(
nc_object
,
11
,
0.6
,
2
,
flow_eDrawType_TextHelveticaBold
,
2
,
flow_eAnnotType_OneLine
,
1
);
brow_AddFrame
(
nc_object
,
0
,
0
,
20
,
0.8
,
flow_eDrawType_LineGray
,
-
1
,
1
);
brow_AddFrame
(
nc_object
,
0
,
0
,
20
,
0.8
3
,
flow_eDrawType_LineGray
,
-
1
,
1
);
// Create text
...
...
@@ -181,7 +181,7 @@ void CoXHelpNavBrow::create_nodeclasses()
brow_AddAnnot
(
nc_text
,
11
,
0.6
,
2
,
flow_eDrawType_TextHelvetica
,
2
,
flow_eAnnotType_OneLine
,
1
);
brow_AddFrame
(
nc_text
,
0
,
0
,
20
,
0.8
,
flow_eDrawType_LineGray
,
-
1
,
1
);
brow_AddFrame
(
nc_text
,
0
,
0
,
20
,
0.8
3
,
flow_eDrawType_LineGray
,
-
1
,
1
);
// Create Header
...
...
@@ -1214,6 +1214,29 @@ int CoXHelpNav::help( const char *help_key, const char *help_bookmark,
return
1
;
}
int
CoXHelpNav
::
home
()
{
navh_eHelpFile
current_filetype
;
char
topic
[
80
]
=
"index"
;
pwr_tFileName
current_filename
=
""
;
current_filetype
=
brow_stack
[
0
]
->
current_filetype
;
if
(
current_filetype
==
navh_eHelpFile_Other
)
strncpy
(
current_filename
,
brow_stack
[
0
]
->
current_filename
,
sizeof
(
current_filename
));
// if ( current_filetype == navh_eHelpFile_Other)
// current_filetype = navh_eHelpFile_Project;
if
(
current_filetype
==
navh_eHelpFile_Base
/*&& utility == xhelp_eUtility_Xtt*/
)
strcpy
(
topic
,
"overview"
);
brow_push_all
();
clear
();
help
(
topic
,
0
,
current_filetype
,
current_filename
[
0
]
==
0
?
0
:
current_filename
,
0
,
0
);
return
1
;
}
int
CoXHelpNav
::
back
()
{
brow_push
();
...
...
src/lib/co/src/co_xhelpnav.h
View file @
172d85db
...
...
@@ -135,6 +135,7 @@ class CoXHelpNav {
void
enable_events
(
CoXHelpNavBrow
*
brow
);
int
help
(
const
char
*
key
,
const
char
*
help_bookmark
,
navh_eHelpFile
file_type
,
const
char
*
file_name
,
int
pop
,
bool
strict
);
int
home
();
int
back
();
int
next_topic
();
int
previous_topic
();
...
...
xtt/mmi/xtt/src/xtt_home.png
0 → 100644
View file @
172d85db
544 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