From: Andy S. <And...@co...> - 2010-10-26 15:44:47
|
diffing dir... Tue Oct 26 11:41:21 EDT 2010 Andy Stewart <laz...@gm...> * Use 'treelist' as directory name for historic reason Ignore-this: 82ca5bc77bbefaea65e0dd4a9d888368 { binary ./gtk/demo/modelview/resListDND/desktop.png rmfile ./gtk/demo/modelview/resListDND/desktop.png binary ./gtk/demo/modelview/resListDND/laptop.png rmfile ./gtk/demo/modelview/resListDND/laptop.png binary ./gtk/demo/modelview/resListDND/laptopSmall.png rmfile ./gtk/demo/modelview/resListDND/laptopSmall.png binary ./gtk/demo/modelview/resListDND/printer.png rmfile ./gtk/demo/modelview/resListDND/printer.png binary ./gtk/demo/modelview/resListDND/server.png rmfile ./gtk/demo/modelview/resListDND/server.png binary ./gtk/demo/modelview/resListDND/tower.png rmfile ./gtk/demo/modelview/resListDND/tower.png rmdir ./gtk/demo/modelview/resListDND hunk ./gtk/demo/modelview/Completion.hs 1 --- Demo to show off entry completion. - -import Graphics.UI.Gtk -import Data.Char -import Data.List - -data ColorDesc = ColorDesc { - cdColor :: Color, - cdName :: String - } deriving Show - -compareCol :: ColumnId ColorDesc String -compareCol = makeColumnIdString 0 - -invertColor (Color r g b) = Color (32767+r) (32767+g) (32767+b) ---Color (65535-r) (65535-g) (65535-b) - -parseColor s = ColorDesc c (dropWhile isSpace (upperToSpace name)) - where - s1 = dropWhile isSpace s - (s2,s3) = span isDigit s1 - s4 = dropWhile isSpace s3 - (s5,s6) = span isDigit s4 - s7 = dropWhile isSpace s6 - (s8,s9) = span isDigit s7 - n1 = read ('0':s2) - n2 = read ('0':s5) - n3 = read ('0':s8) - c = Color (n1*256+n1) (n2*256+n2) (n3*256+n3) - name = dropWhile isSpace s9 - upperToSpace [] = [] - upperToSpace (x:xs) | isUpper x = ' ':toLower x:upperToSpace xs - | otherwise = x:upperToSpace xs - -main = - do - initGUI - window <- windowNew - - contents <- readFile "rgb.txt" - let killDups [] = [] - killDups [x] = [x] - killDups (x:y:xs) | cdName x==cdName y = killDups (y:xs) - | otherwise = x:killDups (y:xs) - cols = killDups $ map parseColor (drop 1 (lines contents)) - store <- listStoreNew cols - customStoreSetColumn store compareCol cdName - - entry <- entryNew - completion <- entryCompletionNew - entrySetCompletion entry completion - - set completion [entryCompletionModel := Just store] - cell <- cellRendererTextNew - set cell [cellTextBackgroundSet := True, - cellTextForegroundSet := True] - cellLayoutPackStart completion cell True - cellLayoutSetAttributes completion cell store - (\cd -> [cellText := cdName cd, - cellTextBackgroundColor := cdColor cd, - cellTextForegroundColor := invertColor (cdColor cd)]) - entryCompletionSetMatchFunc completion (matchFunc store) - on completion matchSelected $ \model iter -> do - color <- treeModelGetValue model iter compareCol - entrySetText entry color - return True - set window [containerChild := entry] - widgetShowAll window - onDestroy window mainQuit - mainGUI - -matchFunc :: ListStore ColorDesc -> String -> TreeIter -> IO Bool -matchFunc model str iter = do - --putStrLn ("iter is "++show iter) - tp <- treeModelGetPath model iter - r <- case tp of - (i:_) -> do row <- listStoreGetValue model i - return $ any (isPrefixOf (map toLower str)) - (words (map toLower (cdName row))) - otherwise -> return False - return r rmfile ./gtk/demo/modelview/Completion.hs hunk ./gtk/demo/modelview/DirList.hs 1 -{-# OPTIONS -cpp #-} --- Test file for the ListView widget. -module Main(main) where - -import Graphics.UI.Gtk -import Graphics.UI.Gtk.ModelView as New - -import Control.Exception -import System.Directory -import System.IO -import System.Locale -import System.Time - -data FileInfo = FileInfo { - fName :: String, - fSize :: Integer, - fTime :: ClockTime -} - -main = do - initGUI - win <- windowNew - win `onDestroy` mainQuit - - curDir <- getCurrentDirectory - files <- getDirectoryContents curDir - fInfos <- (flip mapM) files $ \f -> do - s <- handle (\e -> -#if __GLASGOW_HASKELL__>=610 - case e :: SomeException of - e -> -#endif - return 0) $ do - h <- openFile f ReadMode - s <- hFileSize h - hClose h - return s - t <- getModificationTime f - return FileInfo { fName = f - , fSize = s - , fTime = t } - - store <- New.listStoreNew fInfos - - tv <- New.treeViewNewWithModel store - containerAdd win tv - - tvc <- New.treeViewColumnNew - set tvc [ New.treeViewColumnTitle := "File name" - , New.treeViewColumnResizable := True ] - New.treeViewAppendColumn tv tvc - - name <- New.cellRendererTextNew - New.treeViewColumnPackStart tvc name True - New.cellLayoutSetAttributes tvc name store $ \FileInfo { fName = name } -> - [ New.cellText := name ] - - tvc <- New.treeViewColumnNew - set tvc [ New.treeViewColumnTitle := "Size" - , New.treeViewColumnResizable := True ] - New.treeViewAppendColumn tv tvc - - size <- New.cellRendererTextNew - New.treeViewColumnPackStart tvc size True - New.cellLayoutSetAttributes tvc size store $ \FileInfo { fSize = size } -> - [ New.cellText := show size ] - - tvc <- New.treeViewColumnNew - set tvc [ New.treeViewColumnTitle := "Modification time" - , New.treeViewColumnResizable := True ] - New.treeViewAppendColumn tv tvc - - time <- New.cellRendererTextNew - New.treeViewColumnPackStart tvc time True - New.cellLayoutSetAttributes tvc time store $ \FileInfo { fTime = time } -> - [ New.cellText :=> do - calTime <- toCalendarTime time - return (formatCalendarTime defaultTimeLocale "%D %T" calTime) - ] - - widgetShowAll win - mainGUI rmfile ./gtk/demo/modelview/DirList.hs hunk ./gtk/demo/modelview/FilterDemo.hs 1 --- a demo that shows how to create a normal tree view and a tree view in --- which only a chosen subset of rows are shown (namely those with upper case letters) -module Main ( main ) where - -import Graphics.UI.Gtk -import Data.List -import Data.Char -import Debug.Trace - --- | Define a virtual column of the model that determines the visibility of a row in --- the model. -visCol :: ColumnId String Bool -visCol = makeColumnIdBool 0 - -main = do - initGUI - - win <- windowNew - onDestroy win mainQuit - - content <- readFile "FilterDemo.hs" - - -- create a view that shows all lines - model <- listStoreNew (lines content) - viewAll <- treeViewNewWithModel model - col <- treeViewColumnNew - ren <- cellRendererTextNew - cellLayoutPackStart col ren True - cellLayoutSetAttributes col ren model $ \row -> [ cellText := row ] - treeViewAppendColumn viewAll col - - -- create a view that only shows lines with upper case characters - fModel <- treeModelFilterNew model [] - - -- create a virtual column 'visCol' that contains @True@ if a certain row has - -- upper case letters. Then set this column to determine the visibility of a row. - customStoreSetColumn model visCol (any isUpper) - treeModelFilterSetVisibleColumn fModel visCol - -{- - -- this is an alternative way to determine the visibility of a row. In this case, - -- it is not necessary to create the column 'visCol'. - treeModelFilterSetVisibleFunc fModel $ Just $ \iter -> do - row <- treeModelGetRow model iter - return (any isUpper row) --} - -- note: it is important to insert the model into the view after the visibility - -- row or the visibility function have been set. Otherwise, the view is filled - -- first and setting a new visibility column/function will not update the view. - viewFew <- treeViewNewWithModel fModel - col <- treeViewColumnNew - ren <- cellRendererTextNew - cellLayoutPackStart col ren True - cellLayoutSetAttributes col ren model $ \row -> [ cellText := row ] - - treeViewAppendColumn viewFew col - - - - box <- vBoxNew False 0 - swAll <- scrolledWindowNew Nothing Nothing - containerAdd swAll viewAll - boxPackStart box swAll PackGrow 4 - - swFew <- scrolledWindowNew Nothing Nothing - containerAdd swFew viewFew - boxPackEnd box swFew PackGrow 4 - - containerAdd win box - widgetShowAll win - mainGUI rmfile ./gtk/demo/modelview/FilterDemo.hs hunk ./gtk/demo/modelview/ListDND.hs 1 -module Main where - -import Graphics.UI.Gtk -import Graphics.UI.Gtk.Gdk.EventM - -import System.Glib.GObject ( toGObject ) -import System.FilePath -import Control.Concurrent.MVar -import Control.Monad ( liftM ) -import Control.Monad.Trans ( liftIO ) -import Data.Maybe ( fromMaybe ) -import Data.List ( findIndex ) - -roomStrCol :: ColumnId String String -roomStrCol = makeColumnIdString 1 - --- Define a string column and an image column on the store holding the --- computer types. -compPicCol :: ColumnId CompType Pixbuf -compPicCol = makeColumnIdPixbuf 1 - -compStrCol :: ColumnId CompType String -compStrCol = makeColumnIdString 2 - -data Computer = Computer { - name :: String, - addr :: (Int, Int, Int, Int), - roomStore :: ListStore String, - roomSel :: Int, - cType :: CompType } - -data CompType - = MacBookPro - | MacBook - | Printer - | MacPro - | Xserve - | IMac - deriving (Enum, Bounded, Show) - -showCT :: CompType -> String -showCT ct = case show ct of - 'I':xs -> 'i':xs - xs -> xs - -main = do - initGUI - - win <- windowNew - onDestroy win mainQuit - - -- create a tag that we use as selection, target and selection type - compTypeTag <- atomNew "_CompType" - - let pNames = map ("resListDND" </>) - ["laptop.png","laptopSmall.png","printer.png", - "tower.png","server.png","desktop.png"] - pics <- mapM pixbufNewFromFile pNames - - smallPics <- mapM (\n -> pixbufNewFromFileAtScale n 48 48 True) pNames - - [noRoom, publicRoom, restrictedRoom] <- mapM listStoreNew - [["Paul (Home)","John (Home)","Fred (Home)"], - ["N12","S112", "S113", "S114"], - ["Server Room Upstairs", "Server Room Downstairs"]] - - -- define extractor function for the string column - treeModelSetColumn noRoom roomStrCol id - treeModelSetColumn publicRoom roomStrCol id - treeModelSetColumn restrictedRoom roomStrCol id - - let genRoomStore MacBookPro = noRoom - genRoomStore MacBook = noRoom - genRoomStore Printer = publicRoom - genRoomStore MacPro = publicRoom - genRoomStore Xserve = restrictedRoom - genRoomStore IMac = publicRoom - - -- the initial computer list - it's a coincidence that there's - -- one computer of each type - content <- listStoreNewDND - (map (\t -> Computer { name = showCT t, addr = (192,168,0,fromEnum t+1), - roomStore = genRoomStore t, roomSel = 0, cType = t}) - [minBound :: CompType .. maxBound]) - (Just listStoreDefaultDragSourceIface) - (Just DragDestIface { - treeDragDestRowDropPossible = \store path@(i:_) -> do - mCT <- selectionDataGet compTypeTag - case mCT :: Maybe [Int] of - Just [ct] -> return True - Nothing -> - (treeDragDestRowDropPossible listStoreDefaultDragDestIface) - store path - _ -> return False, - treeDragDestDragDataReceived = \store path@(i:_) -> do - mCT <- selectionDataGet compTypeTag - case mCT of - Just [ct] -> do - let t = toEnum ct - liftIO $ listStoreInsert store i - Computer { name = showCT t, addr = (192,168,0,254), - roomStore = genRoomStore t, roomSel = 0, - cType = t } - return True - Nothing -> - (treeDragDestDragDataReceived listStoreDefaultDragDestIface) - store path - }) - -- the area with the possible computer types - compTypes <- listStoreNewDND [minBound :: CompType .. maxBound] - (Just DragSourceIface { - treeDragSourceRowDraggable = \store (i:_) -> return True, - treeDragSourceDragDataGet = \store (i:_) -> do - ty <- selectionDataGetTarget - ct <- liftIO $ listStoreGetValue store i - selectionDataSet compTypeTag [fromEnum ct] - return True, - treeDragSourceDragDataDelete = \store path -> return True - }) - Nothing - - -- define extractor functions for the two column - treeModelSetColumn compTypes compPicCol $ - \t -> pics !! fromEnum t - treeModelSetColumn compTypes compStrCol showCT - - -- create an icon view of all the computer types - typesView <- iconViewNew - set typesView [iconViewModel := Just compTypes, - iconViewPixbufColumn := compPicCol, - iconViewTextColumn := compStrCol, - iconViewColumns := 6] - - -- create an editable list of computers - inventory <- treeViewNewWithModel content - - tyCol <- treeViewColumnNew - treeViewColumnSetTitle tyCol "Type" - picRen <- cellRendererPixbufNew - treeViewColumnPackStart tyCol picRen False - cellLayoutSetAttributes tyCol picRen content - (\Computer { cType = t} -> [cellPixbuf := smallPics !! fromEnum t]) - tyRen <- cellRendererTextNew - treeViewColumnPackStart tyCol tyRen False - cellLayoutSetAttributes tyCol tyRen content - (\Computer { cType = t} -> [cellText := showCT t]) - treeViewAppendColumn inventory tyCol - - nameCol <- treeViewColumnNew - treeViewColumnSetTitle nameCol "Name" - treeViewColumnSetResizable nameCol True - treeViewColumnSetMinWidth nameCol 100 - nameRen <- cellRendererTextNew - set nameRen [ cellTextEditable := True, - cellTextEditableSet := True, - cellTextEllipsize := EllipsizeEnd, - cellTextEllipsizeSet := True] - treeViewColumnPackStart nameCol nameRen True - cellLayoutSetAttributes nameCol nameRen content - (\Computer { name = n } -> [cellText := n]) - treeViewAppendColumn inventory nameCol - on nameRen edited $ \[i] str -> do - val <- listStoreGetValue content i - listStoreSetValue content i val { name = str } - - addrCol <- treeViewColumnNew - treeViewColumnSetTitle addrCol "Address" - oct1 <- cellRendererTextNew - dot1 <- cellRendererTextNew - oct2 <- cellRendererTextNew - dot2 <- cellRendererTextNew - oct3 <- cellRendererTextNew - dot3 <- cellRendererTextNew - oct4 <- cellRendererTextNew - mapM_ (uncurry (cellLayoutPackStart addrCol)) - [(oct1, True), (dot1, False), (oct2, True), - (dot2, False), (oct3, True), (dot3, False), (oct4, True)] - mapM_ (\d -> set d [cellText := ".", - cellTextWidthChars := 0]) [dot1, dot2, dot3] - mapM_ (\o -> set o [cellXAlign := 1.0, - cellTextWidthChars := 3]) [oct1, oct2, oct3, oct4] - cellLayoutSetAttributes addrCol oct1 content - (\Computer { addr = (o1,_,_,_)} -> [cellText := show o1]) - cellLayoutSetAttributes addrCol oct2 content - (\Computer { addr = (_,o2,_,_)} -> [cellText := show o2]) - cellLayoutSetAttributes addrCol oct3 content - (\Computer { addr = (_,_,o3,_)} -> [cellText := show o3]) - cellLayoutSetAttributes addrCol oct4 content - (\Computer { addr = (_,_,_,o4)} -> [cellText := show o4]) - treeViewAppendColumn inventory addrCol - - roomCol <- treeViewColumnNew - treeViewColumnSetTitle roomCol "Room" - treeViewColumnSetResizable roomCol True - treeViewColumnSetSizing roomCol TreeViewColumnAutosize - roomRen <- cellRendererComboNew - set roomRen [ cellTextEditable := True, - cellTextEditableSet := True, - cellComboHasEntry := True ] - treeViewColumnPackStart roomCol roomRen True - cellLayoutSetAttributes roomCol roomRen content - (\Computer { roomStore = t, roomSel = idx } -> - [cellText :=> listStoreGetValue t idx, - cellComboTextModel := (t, roomStrCol)]) - on roomRen edited $ \[i] str -> do - row@Computer { roomStore = t } <- listStoreGetValue content i - elems <- listStoreToList t - idx <- case (findIndex ((==) str) elems) of - Just idx -> return idx - Nothing -> listStoreAppend t str - listStoreSetValue content i row { roomSel = idx } - treeViewAppendColumn inventory roomCol - - -- make typesView a drag source for compTypeTag values - tl <- targetListNew - targetListAdd tl compTypeTag [TargetSameApp] 0 - iconViewEnableModelDragSource typesView [Button1] tl [ActionCopy] - - -- Due to a bug in Gtk+, the treeDragSourceDragDataGet handler in - -- the DND source handler is not called unless the IconView is also - -- set to be a DND destination. Bugzilla 550528 - tl <- targetListNew - iconViewEnableModelDragDest typesView tl [] - - -- make the inventory widget a drag destination for compTypeTag values - tl <- targetListNew - targetListAdd tl compTypeTag [TargetSameApp] 0 - targetListAdd tl targetTreeModelRow [TargetSameWidget] 0 - treeViewEnableModelDragDest inventory tl [ActionMove] - tl <- targetListNew - targetListAdd tl targetTreeModelRow [TargetSameWidget] 0 - treeViewEnableModelDragSource inventory [Button1] tl [ActionMove] - - -- Install drag and drop for permuting rows. This is now done above using - -- the explicit target 'targetTreeModelRow'. Calling the function below - -- will set a completely new 'TargetList' thereby removing our own - -- 'compTypeTag' from the inventory widget's target list. - - --treeViewSetReorderable inventory True - - -- arrange the widgets - v <- vPanedNew - panedAdd1 v typesView - panedAdd2 v inventory - containerAdd win v - - widgetShowAll win - mainGUI rmfile ./gtk/demo/modelview/ListDND.hs hunk ./gtk/demo/modelview/ListDemo.hs 1 -module Main where - -import Graphics.UI.Gtk -import System.Glib.Signals (on) -import Data.List ( isPrefixOf ) -import Data.Char ( toLower ) - -data Phone = Phone { name :: String, number :: Int, marked :: Bool } - -main = do - initGUI - - win <- windowNew - onDestroy win mainQuit - - -- create a new list model - model <- listStoreNew - [Phone { name = "Foo", number = 12345, marked = False } - ,Phone { name = "Bar", number = 67890, marked = True } - ,Phone { name = "Baz", number = 39496, marked = False }] - view <- treeViewNewWithModel model - - treeViewSetHeadersVisible view True - - -- add a couple columns - col1 <- treeViewColumnNew - col2 <- treeViewColumnNew - col3 <- treeViewColumnNew - - treeViewColumnSetTitle col1 "String column" - treeViewColumnSetTitle col2 "Int column" - treeViewColumnSetTitle col3 "Bool column" - - renderer1 <- cellRendererTextNew - renderer2 <- cellRendererTextNew - renderer3 <- cellRendererToggleNew - - cellLayoutPackStart col1 renderer1 True - cellLayoutPackStart col2 renderer2 True - cellLayoutPackStart col3 renderer3 True - - cellLayoutSetAttributes col1 renderer1 model $ \row -> [ cellText := name row ] - cellLayoutSetAttributes col2 renderer2 model $ \row -> [ cellText := show (number row) ] - cellLayoutSetAttributes col3 renderer3 model $ \row -> [ cellToggleActive := marked row ] - - treeViewAppendColumn view col1 - treeViewAppendColumn view col2 - treeViewAppendColumn view col3 - - -- update the model when the toggle buttons are activated - on renderer3 cellToggled $ \pathStr -> do - let (i:_) = stringToTreePath pathStr - val <- listStoreGetValue model i - listStoreSetValue model i val { marked = not (marked val) } - - - -- enable interactive search - treeViewSetEnableSearch view True - treeViewSetSearchEqualFunc view $ Just $ \str iter -> do - (i:_) <- treeModelGetPath model iter - row <- listStoreGetValue model i - return (map toLower str `isPrefixOf` map toLower (name row)) - - containerAdd win view - widgetShowAll win - mainGUI rmfile ./gtk/demo/modelview/ListDemo.hs hunk ./gtk/demo/modelview/ListTest.glade 1 -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> - -<widget class="GtkWindow" id="window"> - <property name="visible">True</property> - <property name="title" translatable="yes">List Test</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="focus_on_map">True</property> - - <child> - <widget class="GtkVBox" id="vbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property> - <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> - <property name="shadow_type">GTK_SHADOW_IN</property> - <property name="window_placement">GTK_CORNER_TOP_LEFT</property> - - <child> - <widget class="GtkTreeView" id="view"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="headers_visible">True</property> - <property name="rules_hint">False</property> - <property name="reorderable">False</property> - <property name="enable_search">True</property> - <property name="fixed_height_mode">False</property> - <property name="hover_selection">False</property> - <property name="hover_expand">False</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkVBox" id="vbox2"> - <property name="border_width">8</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkExpander" id="expander6"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="expanded">True</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkTable" id="table1"> - <property name="border_width">2</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">2</property> - <property name="column_spacing">18</property> - - <child> - <widget class="GtkSpinButton" id="intValue"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">True</property> - <property name="wrap">False</property> - <property name="adjustment">1 0 100 1 10 10</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="boolValue"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="label" translatable="yes">String value:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">1</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Number value:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">1</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="label" translatable="yes">Boolean value:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">1</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="stringValue"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">expand|shrink|fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label29"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Value</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkExpander" id="expander5"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="expanded">True</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkVBox" id="vbox7"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkHBox" id="hbox9"> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkButton" id="insert"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">insert</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label23"> - <property name="visible">True</property> - <property name="label" translatable="yes">new entry at</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">4</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="newIndex"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">1 0 100 1 10 10</property> - </widget> - <packing> - <property name="padding">4</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox7"> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkButton" id="prepend"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">prepend</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label21"> - <property name="visible">True</property> - <property name="label" translatable="yes">new entry</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">4</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label30"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox8"> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkButton" id="append"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">append</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label22"> - <property name="visible">True</property> - <property name="label" translatable="yes">new entry</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">4</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label31"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox6"> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkButton" id="update"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">update</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label20"> - <property name="visible">True</property> - <property name="label" translatable="yes">entry</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">4</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="updateIndex"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">1 0 100 1 10 10</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label28"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Insert and Update</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkExpander" id="expander1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="expanded">True</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkVBox" id="vbox8"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkHBox" id="hbox5"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkButton" id="remove"> - <property name="width_request">54</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">delete</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label19"> - <property name="visible">True</property> - <property name="label" translatable="yes">entry</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">4</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="removeIndex"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">1 0 100 1 10 10</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label32"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label33"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox10"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkButton" id="clear"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">clear</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label34"> - <property name="visible">True</property> - <property name="label" translatable="yes">all</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">4</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label35"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label36"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label37"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - ... [truncated message content] |