Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
61478a60
Commit
61478a60
authored
19 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
rename some buttons/move them to make interface more logical. Add tooltips to buttons.
parent
48563093
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapControl/zmapControlWindowButtons.c
+70
-22
70 additions, 22 deletions
src/zmapControl/zmapControlWindowButtons.c
with
70 additions
and
22 deletions
src/zmapControl/zmapControlWindowButtons.c
+
70
−
22
View file @
61478a60
...
...
@@ -25,9 +25,9 @@
*
* Exported functions: See zmapControl_P.h
* HISTORY:
* Last edited:
Feb 20 15:43
2006 (edgrif)
* Last edited:
Mar 1 18:06
2006 (edgrif)
* Created: Thu Jul 24 14:36:27 2003 (edgrif)
* CVS info: $Id: zmapControlWindowButtons.c,v 1.3
3
2006-0
2-21 15
:15:
22
edgrif Exp $
* CVS info: $Id: zmapControlWindowButtons.c,v 1.3
4
2006-0
3-03 08
:15:
37
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -46,7 +46,7 @@ static void vertSplitPaneCB(GtkWidget *widget, gpointer data) ;
static
void
horizSplitPaneCB
(
GtkWidget
*
widget
,
gpointer
data
)
;
static
void
unlockCB
(
GtkWidget
*
widget
,
gpointer
data
)
;
static
void
revcompCB
(
GtkWidget
*
widget
,
gpointer
data
)
;
static
void
close
WindowCB
(
GtkWidget
*
widget
,
gpointer
data
)
;
static
void
unsplit
WindowCB
(
GtkWidget
*
widget
,
gpointer
data
)
;
...
...
@@ -60,7 +60,7 @@ GtkWidget *zmapControlWindowMakeButtons(ZMap zmap)
*
reload_button
,
*
stop_button
,
*
hsplit_button
,
*
vsplit_button
,
*
zoomin_button
,
*
zoomout_button
,
*
unlock_button
,
*
revcomp_button
,
*
close
_button
;
*
unlock_button
,
*
revcomp_button
,
*
unsplit
_button
;
hbox
=
gtk_hbox_new
(
FALSE
,
0
)
;
gtk_container_border_width
(
GTK_CONTAINER
(
hbox
),
5
);
...
...
@@ -85,6 +85,16 @@ GtkWidget *zmapControlWindowMakeButtons(ZMap zmap)
GTK_SIGNAL_FUNC
(
vertSplitPaneCB
),
(
gpointer
)
zmap
)
;
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
vsplit_button
,
FALSE
,
FALSE
,
0
)
;
zmap
->
unsplit_but
=
unsplit_button
=
gtk_button_new_with_label
(
"Unsplit"
)
;
gtk_signal_connect
(
GTK_OBJECT
(
unsplit_button
),
"clicked"
,
GTK_SIGNAL_FUNC
(
unsplitWindowCB
),
(
gpointer
)
zmap
)
;
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
unsplit_button
,
FALSE
,
FALSE
,
0
)
;
zmap
->
unlock_but
=
unlock_button
=
gtk_button_new_with_label
(
"Unlock"
);
gtk_signal_connect
(
GTK_OBJECT
(
unlock_button
),
"clicked"
,
GTK_SIGNAL_FUNC
(
unlockCB
),
(
gpointer
)
zmap
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
unlock_button
,
FALSE
,
FALSE
,
0
)
;
zmap
->
zoomin_but
=
zoomin_button
=
gtk_button_new_with_label
(
"Zoom In"
);
gtk_signal_connect
(
GTK_OBJECT
(
zoomin_button
),
"clicked"
,
GTK_SIGNAL_FUNC
(
zoomInCB
),
(
gpointer
)
zmap
);
...
...
@@ -95,37 +105,75 @@ GtkWidget *zmapControlWindowMakeButtons(ZMap zmap)
GTK_SIGNAL_FUNC
(
zoomOutCB
),
(
gpointer
)
zmap
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
zoomout_button
,
FALSE
,
FALSE
,
0
)
;
zmap
->
unlock_but
=
unlock_button
=
gtk_button_new_with_label
(
"Unlock"
);
gtk_signal_connect
(
GTK_OBJECT
(
unlock_button
),
"clicked"
,
GTK_SIGNAL_FUNC
(
unlockCB
),
(
gpointer
)
zmap
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
unlock_button
,
FALSE
,
FALSE
,
0
)
;
zmap
->
revcomp_but
=
revcomp_button
=
gtk_button_new_with_label
(
"Revcomp"
);
gtk_signal_connect
(
GTK_OBJECT
(
revcomp_button
),
"clicked"
,
GTK_SIGNAL_FUNC
(
revcompCB
),
(
gpointer
)
zmap
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
revcomp_button
,
FALSE
,
FALSE
,
0
)
;
zmap
->
close_but
=
close_button
=
gtk_button_new_with_label
(
"Close"
)
;
gtk_signal_connect
(
GTK_OBJECT
(
close_button
),
"clicked"
,
GTK_SIGNAL_FUNC
(
closeWindowCB
),
(
gpointer
)
zmap
)
;
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
close_button
,
FALSE
,
FALSE
,
0
)
;
/* Make Close button the default, its probably what user wants to do mostly. */
GTK_WIDGET_SET_FLAGS
(
close
_button
,
GTK_CAN_DEFAULT
)
;
gtk_window_set_default
(
GTK_WINDOW
(
zmap
->
toplevel
),
close
_button
)
;
GTK_WIDGET_SET_FLAGS
(
zoomin
_button
,
GTK_CAN_DEFAULT
)
;
gtk_window_set_default
(
GTK_WINDOW
(
zmap
->
toplevel
),
zoomin
_button
)
;
return
hbox
;
}
/* Add tooltips to main zmap buttons. */
void
*
zmapControlButtonTooltips
(
ZMap
zmap
)
{
gtk_tooltips_set_tip
(
zmap
->
tooltips
,
zmap
->
stop_button
,
"Stop loading of data, reset zmap"
,
"ZMap data loading is carried out by a separate thread "
"which can be halted and reset by clicking this button."
)
;
gtk_tooltips_set_tip
(
zmap
->
tooltips
,
zmap
->
load_button
,
"Reload data after a reset."
,
"If zmap fails to load, either because you clicked the
\"
Stop
\"
"
"button or the loading failed, then you ran attempt to reload "
"by clicking this button."
)
;
gtk_tooltips_set_tip
(
zmap
->
tooltips
,
zmap
->
hsplit_button
,
"Split window horizontally"
,
""
)
;
gtk_tooltips_set_tip
(
zmap
->
tooltips
,
zmap
->
vsplit_button
,
"Split window vertically"
,
""
)
;
gtk_tooltips_set_tip
(
zmap
->
tooltips
,
zmap
->
zoomin_but
,
"Zoom in 2x"
,
""
)
;
gtk_tooltips_set_tip
(
zmap
->
tooltips
,
zmap
->
zoomout_but
,
"Zoom out 2x"
,
""
)
;
gtk_tooltips_set_tip
(
zmap
->
tooltips
,
zmap
->
unlock_but
,
"Unlock zoom/scroll from sibling window"
,
""
)
;
gtk_tooltips_set_tip
(
zmap
->
tooltips
,
zmap
->
revcomp_but
,
"Reverse complement sequence view"
,
""
)
;
gtk_tooltips_set_tip
(
zmap
->
tooltips
,
zmap
->
unsplit_but
,
"Unsplit selected window"
,
""
)
;
return
;
}
/* Set button state according to the overall ZMap state and the current view state. */
void
zmapControlWindowSetButtonState
(
ZMap
zmap
)
{
ZMapWindowZoomStatus
zoom_status
=
ZMAP_ZOOM_INIT
;
gboolean
general
,
close
,
unlock
,
stop
,
reload
;
gboolean
general
,
unsplit
,
unlock
,
stop
,
reload
;
general
=
close
=
unlock
=
stop
=
reload
=
FALSE
;
general
=
unsplit
=
unlock
=
stop
=
reload
=
FALSE
;
switch
(
zmap
->
state
)
{
...
...
@@ -159,9 +207,9 @@ void zmapControlWindowSetButtonState(ZMap zmap)
general
=
TRUE
;
/* If we are down to the last view and that view has a single window then
* disable
close
button, stops user accidentally closing whole window. */
* disable
unsplit
button, stops user accidentally closing whole window. */
if
((
zmapControlNumViews
(
zmap
)
>
1
)
||
(
zMapViewNumWindows
(
zmap
->
focus_viewwindow
)
>
1
))
close
=
TRUE
;
unsplit
=
TRUE
;
zoom_status
=
zMapWindowGetZoomStatus
(
window
)
;
unlock
=
zMapWindowIsLocked
(
window
)
;
...
...
@@ -188,7 +236,7 @@ void zmapControlWindowSetButtonState(ZMap zmap)
zmapControlWindowSetZoomButtons
(
zmap
,
zoom_status
)
;
gtk_widget_set_sensitive
(
zmap
->
unlock_but
,
unlock
)
;
gtk_widget_set_sensitive
(
zmap
->
revcomp_but
,
general
)
;
gtk_widget_set_sensitive
(
zmap
->
close_but
,
close
)
;
gtk_widget_set_sensitive
(
zmap
->
unsplit_but
,
unsplit
)
;
return
;
}
...
...
@@ -345,7 +393,7 @@ static void revcompCB(GtkWidget *widget, gpointer data)
}
static
void
close
WindowCB
(
GtkWidget
*
widget
,
gpointer
data
)
static
void
unsplit
WindowCB
(
GtkWidget
*
widget
,
gpointer
data
)
{
ZMap
zmap
=
(
ZMap
)
data
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment