Skip to content

Commit

Permalink
refactor: removed unused code
Browse files Browse the repository at this point in the history
FossilOrigin-Name: dbb1df4c60bdaa2dae2ad0a69981ee8b7931e3849c7cc1772921ac045528b2f5
  • Loading branch information
thindil committed Nov 13, 2023
1 parent ce40d1b commit 48ae64a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 47 deletions.
2 changes: 1 addition & 1 deletion nim/src/ui/table.nim
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ proc updateHeadersCommand*(table: TableWidget; command: string) {.sideEffect,
tclEval(script = table.canvas & " bind headerback" & $(i + 1) & " <Leave> {}")
tclEval(script = table.canvas & " bind headerback" & $(i + 1) & " <Button-1> {}")

proc updateCurrentRowCommand*(clientData: cint; interp: PInterp; argc: cint;
proc updateCurrentRowCommand(clientData: cint; interp: PInterp; argc: cint;
argv: openArray[cstring]): TclResults {.sideEffect, raises: [], tags: [].} =
## Update the Tcl variable currentrow and show the currently selected row in
## the table
Expand Down
46 changes: 0 additions & 46 deletions src/ui/table.adb
Original file line number Diff line number Diff line change
Expand Up @@ -295,49 +295,6 @@ package body Table is
Com => New_String(Str => Command), Width => N_Width);
end Update_Headers_Command;

-- ****o* Table/Table.Execute_Current_Row_Command
-- FUNCTION
-- Execute the Tcl command associated with the current row in the selected
-- Table_Widget
-- PARAMETERS
-- Client_Data - Custom data send to the command. Unused
-- Interp - Tcl interpreter in which command was executed.
-- Argc - Number of arguments passed to the command. Unused
-- Argv - Values of arguments passed to the command.
-- RESULT
-- This function always return TCL_OK
-- COMMANDS
-- ExecuteCurrentRow canvas
-- Canvas is the name of Table Tk_Canvas in which the Tcl command related
-- to the current row will be executed
-- SOURCE
function Execute_Current_Row_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with
Convention => C;
-- ****

function Execute_Current_Row_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int is
pragma Unreferenced(Client_Data, Argc);
Can: constant Tk_Canvas :=
Get_Widget
(pathName => CArgv.Arg(Argv => Argv, N => 1), Interp => Interp);
begin
Tcl_Eval
(interp => Interp,
strng =>
Bind
(CanvasWidget => Can, TagOrId => "row$currentrow",
Sequence =>
"<Button-" &
(if Get_Boolean_Setting(Name => "rightButton") then "3"
else "1") &
">"));
return TCL_OK;
end Execute_Current_Row_Command;

-- ****o* Table/Table.Hide_Current_Row_Command
-- FUNCTION
-- Set the normal background color for the current row in the selected
Expand Down Expand Up @@ -431,9 +388,6 @@ package body Table is
External_Name => "addAdaTableCommands";
begin
Add_Ada_Commands;
Add_Command
(Name => "ExecuteCurrentRow",
Ada_Command => Execute_Current_Row_Command'Access);
Add_Command
(Name => "HideCurrentRow",
Ada_Command => Hide_Current_Row_Command'Access);
Expand Down

0 comments on commit 48ae64a

Please sign in to comment.