diff options
Diffstat (limited to 'x11vnc/tkx11vnc.h')
-rw-r--r-- | x11vnc/tkx11vnc.h | 461 |
1 files changed, 311 insertions, 150 deletions
diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h index 1604b31..c9a2486 100644 --- a/x11vnc/tkx11vnc.h +++ b/x11vnc/tkx11vnc.h @@ -9,7 +9,7 @@ "exec wish \"$0\" \"$@\"\n" "catch {rename send {}}\n" "#\n" -"# Copyright (c) 2004 Karl J. Runge <[email protected]>\n" +"# Copyright (c) 2004-2005 Karl J. Runge <[email protected]>\n" "# All rights reserved.\n" "#\n" "# This is free software; you can redistribute it and/or modify\n" @@ -51,9 +51,6 @@ "# R means it is an action only valid in remote mode.\n" "# S means it is an action only valid in startup mode.\n" "# Q means it is an action worth querying after running.\n" -"# D means it is a good idea to delay a little before querying \n" -"# (i.e. perhaps it causes x11vnc to do a lot of work, new fb)\n" -"# No longer used, -sync is used instead.\n" "# P means the string can be +/- appended/deleted (string may not\n" "# be the same after the remote command)\n" "# G means gui internal item\n" @@ -72,61 +69,61 @@ "Actions\n" " =SA start\n" " =RA stop\n" -" =GA attach\n" -" =RA detach\n" +" =DGA attach\n" +" =DRA detach\n" " --\n" " =RA ping\n" " =RA update-all\n" " =GA clear-all\n" -" --\n" -" =RA stop+quit \n" -" =GA Quit \n" +" -- D\n" +" =DRA stop+quit \n" +" =DGA Quit \n" "\n" "Help\n" -" =GA gui\n" +" =DGA gui\n" " =GA all\n" "\n" "Clients\n" -" =RQA current:\n" -" =F connect:\n" -" =RQA disconnect:\n" +" =DRQA current:\n" +" =DF connect:\n" +" =DRQA disconnect:\n" " --\n" " accept:\n" " gone:\n" " vncconnect\n" -" --\n" -" http\n" +" -- D\n" +" =D http\n" " =F httpdir:\n" " httpport:\n" " enablehttpproxy\n" "\n" "Displays\n" -" display:\n" +" =D display:\n" " =F auth:\n" -" desktop:\n" -" rfbport:\n" +" =D desktop:\n" +" =D rfbport:\n" " =0 gui:\n" "\n" "Screen\n" " =DRA refresh\n" -" =DRA reset\n" +" =RA reset\n" " =DRA blacken\n" -" --\n" -" =D id:\n" -" =D sid:\n" +" -- D\n" +" id:\n" +" sid:\n" " =D scale:\n" " --\n" -" =D overlay\n" +" overlay\n" " overlay_nocursor\n" " --\n" -" =D visual:\n" +" visual:\n" " flashcmap\n" " notruecolor\n" " --\n" -" =DP blackout:\n" -" =D xinerama\n" +" =P blackout:\n" +" xinerama\n" " --\n" -" solid\n" +" =D solid\n" " solid_color:\n" " --\n" " = xrandr\n" @@ -134,8 +131,8 @@ " padgeom:\n" "\n" "Keyboard\n" -" norepeat\n" -" add_keysyms\n" +" =D norepeat\n" +" =D add_keysyms\n" " skip_keycodes:\n" " modtweak\n" " xkb\n" @@ -146,25 +143,27 @@ " clear_keys\n" "\n" "Pointer\n" -" =-C:none,arrow,X,some,most cursor:\n" +" =D-C:none,arrow,X,some,most cursor:\n" " noxfixes\n" " noalphablend\n" " --\n" " cursorpos\n" -" nocursorshape\n" +" =D nocursorshape\n" " --\n" " buttonmap:\n" " --\n" " xwarppointer\n" "\n" "Misc\n" +" =GD simple-gui\n" +" -- D\n" " =F rc:\n" " norc\n" " --\n" " nofb\n" " --\n" -" nobell\n" -" nosel\n" +" =D nobell\n" +" =D nosel\n" " noprimary\n" " --\n" " bg\n" @@ -184,29 +183,29 @@ " quiet\n" " --\n" " =GA show-start-cmd\n" -" =G debug_gui\n" +" =DG debug_gui\n" "\n" "Permissions\n" -" =RQA lock\n" -" =RQA unlock\n" +" =DRQA lock\n" +" =DRQA unlock\n" " =SQA deny_all\n" " --\n" -" =FP allow:\n" +" =DFP allow:\n" " localhost\n" " =RA allowonce:\n" -" --\n" +" -- D\n" " =RA noremote\n" " --\n" -" viewonly\n" -" shared\n" -" forever\n" +" =D viewonly\n" +" =D shared\n" +" =D forever\n" " timeout:\n" " --\n" " input:\n" " --\n" -" =SA alwaysshared\n" -" =SA nevershared\n" -" =SA dontdisconnect\n" +" =S alwaysshared\n" +" =S nevershared\n" +" =S dontdisconnect\n" " --\n" " viewpasswd:\n" " =F passwdfile:\n" @@ -218,22 +217,22 @@ " unsafe\n" "\n" "Tuning\n" -" =-C:0,1,2,3,4 pointer_mode:\n" +" =D-C:0,1,2,3,4 pointer_mode:\n" " input_skip:\n" -" nodragging\n" +" =D nodragging\n" " --\n" -" =D noshm\n" +" noshm\n" " flipbyteorder\n" " onetile\n" " --\n" " alphacut:\n" " alphafrac:\n" " alpharemove\n" -" --\n" +" -- D\n" " speeds:\n" -" wait:\n" +" =D wait:\n" " defer:\n" -" nap\n" +" =D nap\n" " screen_blank:\n" " --\n" " fs:\n" @@ -365,6 +364,12 @@ "Set the -xrandr mode value.\n" "\"\n" "\n" +" set helptext(simple-gui) \"\n" +"Toggle between menu items corresponding the most basic ones\n" +"and all possible settings. I.e. toggle between a simple gui\n" +"and one for power users.\n" +"\"\n" +"\n" " set helptext(all) $helpall\n" "\n" " set helptext(gui) \"\n" @@ -372,7 +377,7 @@ "provides an interface to each of the many x11vnc command line options and\n" "remote control commands. See \\\"Help -> all\\\" for much info about x11vnc.\n" "\n" -"Most menu items have a (?) button one can click on to get more information\n" +"All menu items have a (?) button one can click on to get more information\n" "about the option or command.\n" "\n" "There are two states tkx11vnc can be in:\n" @@ -472,6 +477,57 @@ "specified for x11vnc startup if desired.\n" "\n" "\"\n" +"\n" +"global beginner_mode\n" +"if {$beginner_mode} {\n" +" set helptext(gui) \"\n" +"tkx11vnc is a simple frontend to x11vnc. It is currently running in\n" +"\\\"ez\\\" or \\\"simple\\\" mode. For many more options run it in normal\n" +"mode buy toggling \\\"Misc -> simple_gui\\\".\n" +"\n" +"All menu items have a (?) button one can click on to get more information\n" +"about the option or command.\n" +"\n" +"GUI components: \n" +"--- ----------\n" +"\n" +"1) At the top of the gui is a info text label where information will\n" +"be posted, e.g. when traversing menu items text indicating how to get\n" +"help on the item and its current value will be displayed.\n" +"\n" +"2) Below the info label is the area where the menu buttons, Actions,\n" +"Clients, etc., are presented. If a menu item has a checkbox,\n" +"it corresponds to a boolean on/off variable. Otherwise it is\n" +"either a string variable, or an action not associated with a\n" +"variable (for the most part).\n" +"\n" +"3) Below the menu button area is a text label indicating the current x11vnc\n" +"X display being polled and the corresponding VNC display name. Both\n" +"will be \\\"(*none*)\\\" when there is no connection established.\n" +"\n" +"4) Below the x11 and vnc displays text label is a text area there scrolling\n" +"information about actions being taken and commands being run is displayed.\n" +"To scroll click in the area and use PageUp/PageDown or the arrow keys.\n" +"\n" +"5) At the bottom is an entry area. When one selects a menu item that\n" +"requires supplying a string value, the label will be set to the\n" +"parameter name and one types in the new value. Then one presses the\n" +"\\\"OK\\\" button or presses \\\"Enter\\\" to set the value. Or you can press\n" +"\\\"Skip\\\" or \\\"Escape\\\" to avoid changing the variable. Some variables\n" +"are boolean toggles (for example, \\\"Permissions -> viewonly\\\") or Radio\n" +"button selections. Selecting these menu items will not activate the\n" +"entry area but rather toggle the variable directly.\n" +"\n" +"\n" +"Cascades Bug: There is a bug not yet worked around for the cascade menus\n" +"where the (?) help button gets in the way. To get the mouse over to\n" +"the cascade menu click and release mouse to activate the cascade, then\n" +"you can click on its items. Dragging with a mouse button held down will\n" +"not work (sorry!).\n" +"\n" +"\"\n" +"}\n" +"\n" "}\n" "\n" "proc center_win {w} {\n" @@ -561,6 +617,10 @@ "\n" " if {[opt_match G $item]} {\n" " return 1\n" +" } elseif {[opt_match R $item]} {\n" +" return 1\n" +" } elseif {[opt_match S $item]} {\n" +" return 0\n" " } elseif {[is_action $item]} {\n" " if {[opt_match R $item]} {\n" " return 1\n" @@ -575,10 +635,27 @@ "}\n" "\n" "proc active_when_starting {item} {\n" -" global helpremote helptext\n" +" global helpremote helptext beginner_mode\n" +"\n" +" if {$beginner_mode} {\n" +" if {[opt_match G $item]} {\n" +" return 1\n" +" }\n" +" if {$item == \"display\"} {\n" +" return 1\n" +" }\n" +" if {$item == \"debug_gui\"} {\n" +" return 1\n" +" }\n" +" return 0\n" +" }\n" "\n" " if {[opt_match G $item]} {\n" " return 1\n" +" } elseif {[opt_match S $item]} {\n" +" return 1\n" +" } elseif {[opt_match R $item]} {\n" +" return 0\n" " } elseif {[is_action $item]} {\n" " if {[opt_match S $item]} {\n" " return 1\n" @@ -1126,8 +1203,10 @@ " global vl_bk vl_bm vl_bb vr_bk vr_bm vr_bb \n" "\n" " append_text \"\\nUse these checkboxes to set the input permissions, \"\n" -" append_text \"or type in the \\\"KMB...\\\"\\n-input string manually. \"\n" -" append_text \"Then press \\\"OK\\\" or \\\"Skip\\\".\\n\\n\"\n" +" append_text \"or type in the \\\"KMB...\\\"\\n\"\n" +" append_text \"-input string manually. Then press \\\"OK\\\" or \\\"Skip\\\".\\n\"\n" +" append_text \"(note: an empty setting means use the default behavior, \"\n" +" append_text \"see viewonly)\\n\\n\"\n" " set w \"$text_area.wk_f\"\n" " catch {destroy $w}\n" " frame $w -bd 1 -relief ridge -cursor {top_left_arrow}\n" @@ -1142,7 +1221,7 @@ " -pady 1 -command set_kmb_str -text \"Mouse Motion\" \n" " checkbutton $fl.bb -font $ffont -anchor w -variable vl_bb \\\n" " -pady 1 -command set_kmb_str -text \"Button Clicks\"\n" -" label $fr.l -pady 1 -font $ffont -text \"View-only clients:\"\n" +" label $fr.l -pady 1 -font $ffont -text \"View-Only clients:\"\n" " checkbutton $fr.bk -font $ffont -anchor w -variable vr_bk \\\n" " -pady 1 -command set_kmb_str -text \"Keystrokes\" \n" " checkbutton $fr.bm -font $ffont -anchor w -variable vr_bm \\\n" @@ -1629,7 +1708,7 @@ " set xterm_cmd \"xterm -sb -fn $ffont -geometry 80x45 -title x11vnc-logfile -e\"\n" " set cmd [split $xterm_cmd]\n" " lappend cmd \"tail\"\n" -" lappend cmd \"+1f\"\n" +" lappend cmd \"-3000f\"\n" " lappend cmd $logfile\n" " lappend cmd \"&\"\n" " catch {[eval exec $cmd]}\n" @@ -1671,14 +1750,18 @@ "\n" "# Menu item is an action:\n" "proc do_action {item} {\n" -" global menu_var connected_to_x11vnc\n" +" global menu_var connected_to_x11vnc beginner_mode\n" "\n" " if {[in_debug_mode]} {\n" " append_text \"action: \\\"$item\\\"\\n\"\n" " }\n" "\n" " if {$item == \"ping\"} {\n" -" try_connect\n" +" if {$beginner_mode} {\n" +" try_connect_and_query_all\n" +" } else {\n" +" try_connect\n" +" }\n" " return\n" " } elseif {$item == \"start\"} {\n" " start_x11vnc\n" @@ -1971,18 +2054,18 @@ " set input $m5\n" " set logvo $m6\n" " append_text \"Host: $host, Port: $port, IP: $ip, Id: $cid\\n\"\n" -" append_text \" - originally logged in as: \"\n" +" append_text \" - originally logged in as: \"\n" " if {$logvo == \"1\" } {\n" " append_text \"View-Only Client\\n\"\n" " } else {\n" " append_text \"Normal Client\\n\"\n" " }\n" -" append_text \" - currently allowed input: \"\n" +" append_text \" - currently allowed input: \"\n" " set sk 0\n" " set sm 0\n" " set sb 0\n" " if {[regexp -nocase {K} $input]} {\n" -" append_text \"Keystroke\"\n" +" append_text \"Keystrokes\"\n" " set sk 1\n" " }\n" " if {[regexp -nocase {M} $input]} {\n" @@ -1996,7 +2079,7 @@ " if {$sk || $sm} {\n" " append_text \", \"\n" " }\n" -" append_text \"Button-Click\"\n" +" append_text \"Button-Clicks\"\n" " set sb 1\n" " }\n" " if {! $sk && ! $sm && ! $sb} {\n" @@ -2026,7 +2109,7 @@ " } elseif {[regexp -nocase {(disconnect|close)} $val]} {\n" " disconnect_dialog $client\n" " } else {\n" -" regsub -all -nocase {[^KMB]} $val \"\" \n" +" regsub -all -nocase {[^KMB]} $val \"\" val\n" " set item_bool(client_input) 0\n" " push_new_value \"client_input\" \"client_input\" \"$cid:$val\" 0\n" " }\n" @@ -2125,6 +2208,10 @@ " set case $item_case($item)\n" " set menu $menu_m($case)\n" " set entry $item_entry($item)\n" +" if {$entry < 0} {\n" +" # skip case under beginner_mode \n" +" continue\n" +" }\n" " set type [$menu type $entry]\n" " if {$type == \"separator\" || $type == \"tearoff\"} {\n" " continue\n" @@ -2132,102 +2219,52 @@ " if {$connected_to_x11vnc} {\n" " if {[active_when_connected $item]} {\n" " $menu entryconfigure $entry -state normal\n" +"#puts \"n-1 $case / $item / $entry\"\n" " } else {\n" " $menu entryconfigure $entry -state disabled\n" +"#puts \"I-1 $case / $item / $entry\"\n" " }\n" " } else {\n" " if {[active_when_starting $item]} {\n" " $menu entryconfigure $entry -state normal\n" +"#puts \"n-2 $case / $item / $entry\"\n" " } else {\n" " $menu entryconfigure $entry -state disabled\n" +"#puts \"I-2 $case / $item / $entry\"\n" " }\n" " }\n" " }\n" "}\n" "\n" -"proc make_widgets {} {\n" -" global template \n" -" global menu_b menu_m\n" -" global item_opts item_bool item_case item_entry menu_var unset_str\n" -" global item_cascade\n" -" global info_label info_str x11_display vnc_display\n" -" global text_area\n" -" global entry_box entry_str entry_set entry_label entry_ok entry_browse\n" -" global entry_help entry_skip\n" -" global bfont ffont\n" -" global helptext helpremote helplabel\n" -"\n" -" set label_width 80\n" -"\n" -" set info_label .info\n" -" label $info_label -textvariable info_str -bd 2 -relief groove \\\n" -" -anchor w -width $label_width -font $ffont\n" -" pack $info_label -side top -fill x -expand 0\n" -"\n" -" # Extract the Rows:\n" -" set row 0;\n" -" set colmax 0;\n" -" foreach line [split $template \"\\n\"] {\n" -" if {[regexp {^Row: (.*)} $line rest]} {\n" -" set col 0\n" -" foreach case [split $rest] {\n" -" if {$case == \"\" || $case == \"Row:\"} {\n" -" continue\n" -" }\n" -" set menu_row($case) $row\n" -" set menu_col($case) $col\n" -" set menu_count($case) 0\n" +"proc toggle_simple_gui {} {\n" +" global beginner_mode simple_gui_created\n" +" global connected_to_x11vnc\n" "\n" -" lappend cases($col) $case;\n" -" set len [string length $case]\n" -" if {[info exists max_len($col)]} {\n" -" if {$len > $max_len($col)} {\n" -" set max_len($col) $len\n" -" }\n" -" } else {\n" -" set max_len($col) $len\n" -" }\n" -" incr col\n" -" if {$col > $colmax} {\n" -" set colmax $col\n" -" }\n" -" }\n" -" incr row;\n" -" }\n" +" if {$beginner_mode} {\n" +" append_text \"\\nSwitching to simple-gui mode.\\n\"\n" +" } else {\n" +" append_text \"\\nSwitching to power-user gui mode.\\n\"\n" " }\n" "\n" -" # Make frames for the rows and make the menu buttons.\n" -" set f \".menuframe\"\n" -" frame $f\n" -" for {set c 0} {$c < $colmax} {incr c} {\n" -" set colf \"$f.menuframe$c\"\n" -" frame $colf\n" -" pack $colf -side left -fill y\n" -" set fbg [$colf cget -background]\n" -" foreach case $cases($c) {\n" -" set menub \"$colf.menu$case\";\n" -" set menu \"$colf.menu$case.menu\";\n" -" set menu_b($case) $menub\n" -" set menu_m($case) $menu\n" -" set ul 0\n" -" foreach char [split $case \"\"] {\n" -" set char [string tolower $char]\n" -" if {![info exists underlined($char)]} {\n" -" set underlined($char) 1\n" -" break\n" -" }\n" -" incr ul\n" -" }\n" -" menubutton $menub -text \"$case\" -underline $ul \\\n" -" -anchor w -menu $menu -background $fbg \\\n" -" -font $bfont\n" -" pack $menub -side top -fill x\n" -" menu $menu -tearoff 0\n" -" }\n" +" set simple_gui_created 1\n" +" make_menu_items\n" +" set_widgets\n" +" set_internal_help\n" +" if {$connected_to_x11vnc} {\n" +" query_all\n" " }\n" -" pack $f -side top -fill x\n" +" append_text \"\\n\"\n" +"}\n" +"\n" +"proc make_menu_items {} {\n" +" global template \n" +" global menu_b menu_m menu_count\n" +" global item_opts item_bool item_case item_entry menu_var unset_str\n" +" global item_cascade\n" +" global bfont ffont beginner_mode simple_gui_created\n" +" global helptext helpremote helplabel\n" "\n" -" # Now extract the menu items:\n" +" # Extract the menu items:\n" " set case \"\";\n" " foreach line [split $template \"\\n\"] {\n" " if {[regexp {^Row:} $line]} {\n" @@ -2235,8 +2272,19 @@ " }\n" " if {[regexp {^[A-z]} $line]} {\n" " set case [string trim $line]\n" +"\n" +" if {$simple_gui_created} {\n" +" set i0 0\n" +" if {$case == \"Misc\"} {\n" +" # kludge for simple_gui\n" +" set i0 1\n" +" }\n" +" catch {$menu_m($case) delete $i0 end}\n" +" }\n" +" set menu_count($case) 0\n" " continue;\n" " }\n" +"\n" " set item [string trim $line]\n" " regsub -all { *} $item \" \" item\n" " if {$item == \"\"} {\n" @@ -2258,17 +2306,29 @@ " }\n" " regsub {:$} $item {} item\n" "\n" +" if {$item == \"-- D\"} {\n" +" set beginner_sep 1\n" +" set item \"--\"\n" +" } else {\n" +" set beginner_sep 0\n" +" }\n" +"\n" " set item_opts($item) $opts\n" " set item_case($item) $case\n" " set item_bool($item) $bool\n" " set item_cascade($item) \"\"\n" " set item_entry($item) $menu_count($case)\n" "\n" -" if {0} { puts \"ITEM: $item - $opts - $case - $bool - $menu_count($case)\" }\n" -"\n" " set mvar 0 \n" " set m $menu_m($case)\n" "\n" +" if {$beginner_mode && ! $beginner_sep && ![opt_match D $item]} {\n" +" set item_entry($item) \"-1\"\n" +" continue;\n" +" }\n" +"\n" +" if {0} { puts \"ITEM: $item\\t- $opts\\t- $case\\t- $bool\\t- $menu_count($case)\" }\n" +"\n" " # Create the menu items, its variables, etc., etc.\n" "\n" " if {$item == \"--\"} {\n" @@ -2288,7 +2348,8 @@ "\n" " } elseif {$item == \"current\"} {\n" " # Current clients cascade\n" -" set subm $m.cascade$menu_count($case)\n" +" set subm $m.current_cascade\n" +" catch {destroy $subm}\n" " set item_cascade($item) $subm\n" " update_clients_menu \"\"\n" " $m add cascade -label \"$item\" \\\n" @@ -2306,7 +2367,8 @@ " # String\n" " if {[regexp -- {-C:(.*)} $item_opts($item) m0 m1]} {\n" " # Radiobutton select\n" -" set subm $m.cascade$menu_count($case)\n" +" set subm $m.radio_cascade$menu_count($case)\n" +" catch {destroy $subm}\n" " menu $subm -tearoff 0 -font $ffont\n" " foreach val [split $m1 \",\"] {\n" " $subm add radiobutton -label \"$val\" \\\n" @@ -2327,6 +2389,13 @@ " }\n" " set mvar 1\n" "\n" +" } elseif {$item == \"simple-gui\"} {\n" +" if {! $simple_gui_created} {\n" +" $m add checkbutton -label \"$item\" \\\n" +" -command \"toggle_simple_gui\" \\\n" +" -font $ffont \\\n" +" -variable beginner_mode\n" +" }\n" " } else {\n" " # Boolean\n" " $m add checkbutton -label \"$item\" \\\n" @@ -2337,12 +2406,13 @@ " }\n" "\n" " incr menu_count($case)\n" +"\n" " if {$mvar} {\n" " set menu_var($item) $unset_str\n" " }\n" " }\n" "\n" -" # Now make the litte \"(?)\" help buttons\n" +" # Now make the little \"(?)\" help buttons\n" " foreach case [array names menu_m] {\n" " if {$case == \"Help\"} {\n" " continue;\n" @@ -2382,6 +2452,90 @@ " }\n" " }\n" " }\n" +"}\n" +"\n" +"proc make_widgets {} {\n" +" global template \n" +" global menu_b menu_m menu_count\n" +" global item_opts item_bool item_case item_entry menu_var unset_str\n" +" global item_cascade\n" +" global info_label info_str x11_display vnc_display\n" +" global text_area\n" +" global entry_box entry_str entry_set entry_label entry_ok entry_browse\n" +" global entry_help entry_skip\n" +" global bfont ffont beginner_mode\n" +" global helptext helpremote helplabel\n" +"\n" +" # Make the top label\n" +" set label_width 80\n" +" set info_label .info\n" +" label $info_label -textvariable info_str -bd 2 -relief groove \\\n" +" -anchor w -width $label_width -font $ffont\n" +" pack $info_label -side top -fill x -expand 0\n" +"\n" +" # Extract the Rows:\n" +" set row 0;\n" +" set colmax 0;\n" +" foreach line [split $template \"\\n\"] {\n" +" if {[regexp {^Row: (.*)} $line rest]} {\n" +" set col 0\n" +" foreach case [split $rest] {\n" +" if {$case == \"\" || $case == \"Row:\"} {\n" +" continue\n" +" }\n" +" set menu_row($case) $row\n" +" set menu_col($case) $col\n" +"\n" +" lappend cases($col) $case;\n" +" set len [string length $case]\n" +" if {[info exists max_len($col)]} {\n" +" if {$len > $max_len($col)} {\n" +" set max_len($col) $len\n" +" }\n" +" } else {\n" +" set max_len($col) $len\n" +" }\n" +" incr col\n" +" if {$col > $colmax} {\n" +" set colmax $col\n" +" }\n" +" }\n" +" incr row;\n" +" }\n" +" }\n" +"\n" +" # Make frames for the rows and make the menu buttons.\n" +" set f \".menuframe\"\n" +" frame $f\n" +" for {set c 0} {$c < $colmax} {incr c} {\n" +" set colf \"$f.menuframe$c\"\n" +" frame $colf\n" +" pack $colf -side left -fill y\n" +" set fbg [$colf cget -background]\n" +" foreach case $cases($c) {\n" +" set menub \"$colf.menu$case\";\n" +" set menu \"$colf.menu$case.menu\";\n" +" set menu_b($case) $menub\n" +" set menu_m($case) $menu\n" +" set ul 0\n" +" foreach char [split $case \"\"] {\n" +" set char [string tolower $char]\n" +" if {![info exists underlined($char)]} {\n" +" set underlined($char) 1\n" +" break\n" +" }\n" +" incr ul\n" +" }\n" +" menubutton $menub -text \"$case\" -underline $ul \\\n" +" -anchor w -menu $menu -background $fbg \\\n" +" -font $bfont\n" +" pack $menub -side top -fill x\n" +" menu $menu -tearoff 0\n" +" }\n" +" }\n" +" pack $f -side top -fill x\n" +"\n" +" make_menu_items\n" "\n" " # Make the x11 and vnc display label bar:\n" " set df .displayframe\n" @@ -2558,9 +2712,9 @@ "\n" "proc double_check_noremote {} {\n" " set msg \"\\n\\n\"\n" -" append msg \"WARNING: setting \\\"noremote\\\" will disable ALL remote control commands\\n\"\n" -" append msg \"WARNING: (i.e. this gui will be locked out) Do you really want to do this?\\n\"\n" -" append msg \"WARNING: If so, press \\\"OK\\\", otherwise press \\\"Skip\\\"\\n\"\n" +" append msg \"*** WARNING: setting \\\"noremote\\\" will disable ALL remote control commands (i.e.\\n\"\n" +" append msg \"*** WARNING: *this* gui will be locked out). Do you really want to do this?\\n\"\n" +" append msg \"*** WARNING: If so, press \\\"OK\\\", otherwise press \\\"Skip\\\"\\n\"\n" " append msg \"\\n\"\n" " bell\n" " return [warning_dialog $msg \"noremote\"]\n" @@ -2835,7 +2989,7 @@ "# main:\n" "\n" "global env x11vnc_prog x11vnc_cmdline x11vnc_xdisplay x11vnc_connect;\n" -"global x11vnc_auth_file\n" +"global x11vnc_auth_file beginner_mode simple_gui_created\n" "global helpall helptext helpremote helplabel hostname;\n" "global all_settings reply_xdisplay always_update\n" "global max_text_height max_text_width\n" @@ -2926,6 +3080,13 @@ " set x11vnc_auth_file \"\"\n" "}\n" "\n" +"set simple_gui_created 0\n" +"if {[info exists env(X11VNC_SIMPLE_GUI)]} {\n" +" set beginner_mode 1\n" +"} else {\n" +" set beginner_mode 0\n" +"}\n" +"\n" "\n" "set hostname [exec uname -n]\n" "#puts [exec env]\n" |