Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add an about dialog

darcs-hash:20060809042317-4b390-18e945e9eaa2210efba040087f9eba12c2a8c3b6.gz
  • Loading branch information...
commit bb755b83228e21b57dd911e910210ff61bed3b07 1 parent 54b077f
@kfish authored
Showing with 12 additions and 0 deletions.
  1. +7 −0 data/main.glade
  2. +5 −0 src/cairo-appbase.hs
View
7 data/main.glade
@@ -212,4 +212,11 @@
</child>
</widget>
+<widget class="GtkAboutDialog" id="aboutdialog1">
+ <property name="destroy_with_parent">False</property>
+ <property name="name" translatable="yes">Application Name</property>
+ <property name="wrap_license">False</property>
+ <property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
+</widget>
+
</glade-interface>
View
5 src/cairo-appbase.hs
@@ -41,6 +41,10 @@ main = do
canvas <- Glade.xmlGetWidget dialogXml G.castToDrawingArea "drawingarea1"
quit1 <- Glade.xmlGetWidget dialogXml G.castToMenuItem "quit1"
+ about1 <- Glade.xmlGetWidget dialogXml G.castToMenuItem "about1"
+ aboutdialog1 <- Glade.xmlGetWidget dialogXml G.castToAboutDialog "aboutdialog1"
+ G.onActivateLeaf about1 $ G.widgetShow aboutdialog1
+
-- fix size
-- G.windowSetResizable window False
G.widgetSetSizeRequest window windowWidth windowHeight
@@ -48,6 +52,7 @@ main = do
-- quit on File->Quit menu selection
G.onActivateLeaf quit1 $ G.widgetDestroy window
G.onDestroy window G.mainQuit
+
G.onExpose canvas $ const (updateCanvas canvas)
G.widgetShowAll window
G.mainGUI
Please sign in to comment.
Something went wrong with that request. Please try again.